policies.cjs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. "use strict";
  2. var __defProp = Object.defineProperty;
  3. var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  4. var __getOwnPropNames = Object.getOwnPropertyNames;
  5. var __hasOwnProp = Object.prototype.hasOwnProperty;
  6. var __export = (target, all) => {
  7. for (var name in all)
  8. __defProp(target, name, { get: all[name], enumerable: true });
  9. };
  10. var __copyProps = (to, from, except, desc) => {
  11. if (from && typeof from === "object" || typeof from === "function") {
  12. for (let key of __getOwnPropNames(from))
  13. if (!__hasOwnProp.call(to, key) && key !== except)
  14. __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  15. }
  16. return to;
  17. };
  18. var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
  19. var policies_exports = {};
  20. __export(policies_exports, {
  21. GelPolicy: () => GelPolicy,
  22. gelPolicy: () => gelPolicy
  23. });
  24. module.exports = __toCommonJS(policies_exports);
  25. var import_entity = require("../entity.cjs");
  26. class GelPolicy {
  27. constructor(name, config) {
  28. this.name = name;
  29. if (config) {
  30. this.as = config.as;
  31. this.for = config.for;
  32. this.to = config.to;
  33. this.using = config.using;
  34. this.withCheck = config.withCheck;
  35. }
  36. }
  37. static [import_entity.entityKind] = "GelPolicy";
  38. as;
  39. for;
  40. to;
  41. using;
  42. withCheck;
  43. /** @internal */
  44. _linkedTable;
  45. link(table) {
  46. this._linkedTable = table;
  47. return this;
  48. }
  49. }
  50. function gelPolicy(name, config) {
  51. return new GelPolicy(name, config);
  52. }
  53. // Annotate the CommonJS export names for ESM import in node:
  54. 0 && (module.exports = {
  55. GelPolicy,
  56. gelPolicy
  57. });
  58. //# sourceMappingURL=policies.cjs.map