@bluealba/pae-bootstrap-lib 1.7.2-develop-1171

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/LICENSE +134 -0
  2. package/README.md +43 -0
  3. package/dist/src/bootstrap/bootstrap-platform.d.ts +32 -0
  4. package/dist/src/bootstrap/bootstrap-platform.d.ts.map +1 -0
  5. package/dist/src/bootstrap/bootstrap-platform.js +75 -0
  6. package/dist/src/bootstrap/bootstrap-platform.js.map +1 -0
  7. package/dist/src/bootstrap/domain/bootstrap-sync-metadata.interface.d.ts +37 -0
  8. package/dist/src/bootstrap/domain/bootstrap-sync-metadata.interface.d.ts.map +1 -0
  9. package/dist/src/bootstrap/domain/bootstrap-sync-metadata.interface.js +3 -0
  10. package/dist/src/bootstrap/domain/bootstrap-sync-metadata.interface.js.map +1 -0
  11. package/dist/src/bootstrap/domain/domain-validation.test.d.ts +2 -0
  12. package/dist/src/bootstrap/domain/domain-validation.test.d.ts.map +1 -0
  13. package/dist/src/bootstrap/domain/domain-validation.test.js +1872 -0
  14. package/dist/src/bootstrap/domain/domain-validation.test.js.map +1 -0
  15. package/dist/src/bootstrap/entity-synchronizer.d.ts +53 -0
  16. package/dist/src/bootstrap/entity-synchronizer.d.ts.map +1 -0
  17. package/dist/src/bootstrap/entity-synchronizer.js +69 -0
  18. package/dist/src/bootstrap/entity-synchronizer.js.map +1 -0
  19. package/dist/src/bootstrap/entity-synchronizer.test.d.ts +2 -0
  20. package/dist/src/bootstrap/entity-synchronizer.test.d.ts.map +1 -0
  21. package/dist/src/bootstrap/entity-synchronizer.test.js +270 -0
  22. package/dist/src/bootstrap/entity-synchronizer.test.js.map +1 -0
  23. package/dist/src/bootstrap/fix-created-by.d.ts +10 -0
  24. package/dist/src/bootstrap/fix-created-by.d.ts.map +1 -0
  25. package/dist/src/bootstrap/fix-created-by.js +36 -0
  26. package/dist/src/bootstrap/fix-created-by.js.map +1 -0
  27. package/dist/src/bootstrap/initialize-pae-client.d.ts +7 -0
  28. package/dist/src/bootstrap/initialize-pae-client.d.ts.map +1 -0
  29. package/dist/src/bootstrap/initialize-pae-client.js +24 -0
  30. package/dist/src/bootstrap/initialize-pae-client.js.map +1 -0
  31. package/dist/src/bootstrap/read-bootstrap-applications.d.ts +10 -0
  32. package/dist/src/bootstrap/read-bootstrap-applications.d.ts.map +1 -0
  33. package/dist/src/bootstrap/read-bootstrap-applications.js +650 -0
  34. package/dist/src/bootstrap/read-bootstrap-applications.js.map +1 -0
  35. package/dist/src/bootstrap/run-bootstrap-sync.service.d.ts +4 -0
  36. package/dist/src/bootstrap/run-bootstrap-sync.service.d.ts.map +1 -0
  37. package/dist/src/bootstrap/run-bootstrap-sync.service.js +27 -0
  38. package/dist/src/bootstrap/run-bootstrap-sync.service.js.map +1 -0
  39. package/dist/src/bootstrap/synchronizers/sync-applications.d.ts +4 -0
  40. package/dist/src/bootstrap/synchronizers/sync-applications.d.ts.map +1 -0
  41. package/dist/src/bootstrap/synchronizers/sync-applications.js +53 -0
  42. package/dist/src/bootstrap/synchronizers/sync-applications.js.map +1 -0
  43. package/dist/src/bootstrap/synchronizers/sync-authz-entities.d.ts +11 -0
  44. package/dist/src/bootstrap/synchronizers/sync-authz-entities.d.ts.map +1 -0
  45. package/dist/src/bootstrap/synchronizers/sync-authz-entities.js +58 -0
  46. package/dist/src/bootstrap/synchronizers/sync-authz-entities.js.map +1 -0
  47. package/dist/src/bootstrap/synchronizers/sync-catalog.d.ts +5 -0
  48. package/dist/src/bootstrap/synchronizers/sync-catalog.d.ts.map +1 -0
  49. package/dist/src/bootstrap/synchronizers/sync-catalog.js +73 -0
  50. package/dist/src/bootstrap/synchronizers/sync-catalog.js.map +1 -0
  51. package/dist/src/bootstrap/synchronizers/sync-entities/performDeletes.d.ts +11 -0
  52. package/dist/src/bootstrap/synchronizers/sync-entities/performDeletes.d.ts.map +1 -0
  53. package/dist/src/bootstrap/synchronizers/sync-entities/performDeletes.js +38 -0
  54. package/dist/src/bootstrap/synchronizers/sync-entities/performDeletes.js.map +1 -0
  55. package/dist/src/bootstrap/synchronizers/sync-entities/performUpdates.d.ts +12 -0
  56. package/dist/src/bootstrap/synchronizers/sync-entities/performUpdates.d.ts.map +1 -0
  57. package/dist/src/bootstrap/synchronizers/sync-entities/performUpdates.js +43 -0
  58. package/dist/src/bootstrap/synchronizers/sync-entities/performUpdates.js.map +1 -0
  59. package/dist/src/bootstrap/synchronizers/sync-entities.d.ts +19 -0
  60. package/dist/src/bootstrap/synchronizers/sync-entities.d.ts.map +1 -0
  61. package/dist/src/bootstrap/synchronizers/sync-entities.js +59 -0
  62. package/dist/src/bootstrap/synchronizers/sync-entities.js.map +1 -0
  63. package/dist/src/bootstrap/synchronizers/sync-entities.test.d.ts +2 -0
  64. package/dist/src/bootstrap/synchronizers/sync-entities.test.d.ts.map +1 -0
  65. package/dist/src/bootstrap/synchronizers/sync-entities.test.js +158 -0
  66. package/dist/src/bootstrap/synchronizers/sync-entities.test.js.map +1 -0
  67. package/dist/src/bootstrap/synchronizers/sync-entity-options.d.ts +11 -0
  68. package/dist/src/bootstrap/synchronizers/sync-entity-options.d.ts.map +1 -0
  69. package/dist/src/bootstrap/synchronizers/sync-entity-options.js +3 -0
  70. package/dist/src/bootstrap/synchronizers/sync-entity-options.js.map +1 -0
  71. package/dist/src/bootstrap/synchronizers/sync-modules-config.d.ts +4 -0
  72. package/dist/src/bootstrap/synchronizers/sync-modules-config.d.ts.map +1 -0
  73. package/dist/src/bootstrap/synchronizers/sync-modules-config.js +28 -0
  74. package/dist/src/bootstrap/synchronizers/sync-modules-config.js.map +1 -0
  75. package/dist/src/bootstrap/synchronizers/sync-operations.d.ts +5 -0
  76. package/dist/src/bootstrap/synchronizers/sync-operations.d.ts.map +1 -0
  77. package/dist/src/bootstrap/synchronizers/sync-operations.js +41 -0
  78. package/dist/src/bootstrap/synchronizers/sync-operations.js.map +1 -0
  79. package/dist/src/bootstrap/synchronizers/sync-role-operations.d.ts +8 -0
  80. package/dist/src/bootstrap/synchronizers/sync-role-operations.d.ts.map +1 -0
  81. package/dist/src/bootstrap/synchronizers/sync-role-operations.js +74 -0
  82. package/dist/src/bootstrap/synchronizers/sync-role-operations.js.map +1 -0
  83. package/dist/src/bootstrap/synchronizers/sync-roles.d.ts +5 -0
  84. package/dist/src/bootstrap/synchronizers/sync-roles.d.ts.map +1 -0
  85. package/dist/src/bootstrap/synchronizers/sync-roles.js +41 -0
  86. package/dist/src/bootstrap/synchronizers/sync-roles.js.map +1 -0
  87. package/dist/src/bootstrap/synchronizers/sync-shared-libraries.d.ts +4 -0
  88. package/dist/src/bootstrap/synchronizers/sync-shared-libraries.d.ts.map +1 -0
  89. package/dist/src/bootstrap/synchronizers/sync-shared-libraries.js +32 -0
  90. package/dist/src/bootstrap/synchronizers/sync-shared-libraries.js.map +1 -0
  91. package/dist/src/index.d.ts +3 -0
  92. package/dist/src/index.d.ts.map +1 -0
  93. package/dist/src/index.js +19 -0
  94. package/dist/src/index.js.map +1 -0
  95. package/dist/src/utils/compare-lists-by.d.ts +23 -0
  96. package/dist/src/utils/compare-lists-by.d.ts.map +1 -0
  97. package/dist/src/utils/compare-lists-by.js +34 -0
  98. package/dist/src/utils/compare-lists-by.js.map +1 -0
  99. package/dist/src/utils/format-diff.d.ts +106 -0
  100. package/dist/src/utils/format-diff.d.ts.map +1 -0
  101. package/dist/src/utils/format-diff.js +166 -0
  102. package/dist/src/utils/format-diff.js.map +1 -0
  103. package/dist/src/utils/format-diff.test.d.ts +2 -0
  104. package/dist/src/utils/format-diff.test.d.ts.map +1 -0
  105. package/dist/src/utils/format-diff.test.js +242 -0
  106. package/dist/src/utils/format-diff.test.js.map +1 -0
  107. package/dist/src/utils/get-common-keys.d.ts +6 -0
  108. package/dist/src/utils/get-common-keys.d.ts.map +1 -0
  109. package/dist/src/utils/get-common-keys.js +9 -0
  110. package/dist/src/utils/get-common-keys.js.map +1 -0
  111. package/dist/src/utils/io.d.ts +3 -0
  112. package/dist/src/utils/io.d.ts.map +1 -0
  113. package/dist/src/utils/io.js +13 -0
  114. package/dist/src/utils/io.js.map +1 -0
  115. package/package.json +34 -0
package/LICENSE ADDED
@@ -0,0 +1,134 @@
1
+ Required Notice: Copyright Blue Alba LLC 2025 (https://bluealba.com)
2
+
3
+ # PolyForm Noncommercial License 1.0.0
4
+
5
+ <https://polyformproject.org/licenses/noncommercial/1.0.0>
6
+
7
+ ## Acceptance
8
+
9
+ In order to get any license under these terms, you
10
+ must agree to them as both strict obligations and
11
+ conditions to all your licenses.
12
+
13
+ ## Copyright License
14
+
15
+ The licensor grants you a copyright license for the
16
+ software to do everything you might do with the
17
+ software that would otherwise infringe the licensor's
18
+ copyright in it for any permitted purpose. However,
19
+ you may only distribute the software according to
20
+ [Distribution License](#distribution-license) and make
21
+ changes or new works based on the software according to
22
+ [Changes and New Works License](#changes-and-new-works-license).
23
+
24
+ ## Distribution License
25
+
26
+ The licensor grants you an additional copyright license
27
+ to distribute copies of the software. Your license
28
+ to distribute covers distributing the software with
29
+ changes and new works permitted by [Changes and New Works
30
+ License](#changes-and-new-works-license).
31
+
32
+ ## Notices
33
+
34
+ You must ensure that anyone who gets a copy of any part of
35
+ the software from you also gets a copy of these terms or
36
+ the URL for them above, as well as copies of any plain-text
37
+ lines beginning with `Required Notice:` that the licensor
38
+ provided with the software. For example:
39
+
40
+ > Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
41
+
42
+ ## Changes and New Works License
43
+
44
+ The licensor grants you an additional copyright license to
45
+ make changes and new works based on the software for any
46
+ permitted purpose.
47
+
48
+ ## Patent License
49
+
50
+ The licensor grants you a patent license for the software
51
+ that covers patent claims the licensor can license, as well
52
+ as patent claims that the licensor becomes able to license.
53
+
54
+ ## Noncommercial Purposes
55
+
56
+ Any noncommercial purpose is a permitted purpose.
57
+
58
+ ## Personal Uses
59
+
60
+ Personal use for research, experiment, and testing for
61
+ the benefit of public knowledge, personal study, private
62
+ entertainment, hobby projects, amateur pursuits, or religious
63
+ observance, without any anticipated commercial application,
64
+ is use for a permitted purpose.
65
+
66
+ ## Noncommercial Organizations
67
+
68
+ Use by any charitable organization, educational institution,
69
+ public research organization, public safety or health
70
+ organization, environmental protection organization, or
71
+ government institution is use for a permitted purpose
72
+ regardless of the source of funding or obligations resulting
73
+ from the funding.
74
+
75
+ ## Fair Use
76
+
77
+ You may have "fair use" rights for the software under the
78
+ law. These terms do not limit them.
79
+
80
+ ## No Other Rights
81
+
82
+ These terms do not allow you to sublicense or transfer any of
83
+ your licenses to anyone else, or prevent the licensor from
84
+ granting licenses to anyone else. These terms do not imply
85
+ any other licenses.
86
+
87
+ ## Patent Defense
88
+
89
+ If you make any written claim that the software infringes or
90
+ contributes to infringement of any patent, your patent license
91
+ for the software granted under these terms ends immediately. If
92
+ your company makes such a claim, your patent license ends
93
+ immediately for work on behalf of your company.
94
+
95
+ ## Violations
96
+
97
+ The first time you are notified in writing that you have
98
+ violated any of these terms, or done anything with the software
99
+ not covered by your licenses, your licenses can nonetheless
100
+ continue if you come into full compliance with these terms,
101
+ and take practical steps to correct past violations, within
102
+ 32 days of receiving notice. Otherwise, all your licenses
103
+ end immediately.
104
+
105
+ ## No Liability
106
+
107
+ ***As far as the law allows, the software comes as is, without
108
+ any warranty or condition, and the licensor will not be liable
109
+ to you for any damages arising out of these terms or the use
110
+ or nature of the software, under any kind of legal claim.***
111
+
112
+ ## Definitions
113
+
114
+ The **licensor** is the individual or entity offering these
115
+ terms, and the **software** is the software the licensor makes
116
+ available under these terms, including any portion of the
117
+ software.
118
+
119
+ **You** refers to the individual or entity agreeing to these
120
+ terms.
121
+
122
+ **Your company** is any legal entity, sole proprietorship,
123
+ or other kind of organization that you work for, plus all
124
+ organizations that have control over, are under the control of,
125
+ or are under common control with that organization. **Control**
126
+ means ownership of substantially all the assets of an entity,
127
+ or the power to direct its management and policies by vote,
128
+ contract, or otherwise. Control can be direct or indirect.
129
+
130
+ **Your licenses** are all the licenses granted to you for the
131
+ software under these terms.
132
+
133
+ **Use** means anything you do with the software requiring one
134
+ of your licenses.
package/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # pae-boostrap-lib
2
+
3
+ BlueAlba Platform Boostrapping library.
4
+ Used by bootstrap modules to setup the platform applications definitions.
5
+
6
+ Example usage
7
+
8
+ ```typescript jsx
9
+ bootstrapPlatform({
10
+ path: join(process.cwd(), 'src', 'data')
11
+ })
12
+ ```
13
+
14
+ # Folder & Files conventions
15
+
16
+ Each folder potentially represents an application if it has an `application.json` file.
17
+ Each folder might optionally contain definition files that must follow the names: `(modules | operations | roles).json`
18
+ If it defines an `application.json` then all resources declared in the previously mentioned files will be automatically
19
+ created scoped to that application.
20
+ Otherwise a folder that doesn't have `application.json` might define resources as well but they will be created
21
+ as global resources.
22
+
23
+ At the top there are platform defitions such as `shared-libraries.json`
24
+
25
+ ```
26
+ .
27
+ - shared-libraries.json
28
+ - my-application
29
+ application.json
30
+ modules.json
31
+ operations.json
32
+ roles.json
33
+ - another-application
34
+ application.json
35
+ modules.json
36
+ operations.json
37
+ - third-application
38
+ application.json
39
+ modules.json
40
+ - global (all folders without an application.json will create global resources)
41
+ modules.json
42
+ operations.json
43
+ ```
@@ -0,0 +1,32 @@
1
+ import { BootstrapModule } from "./domain/bootstrap-sync-metadata.interface";
2
+ /**
3
+ * Optional properties to customize the bootstrapPlatform process.
4
+ */
5
+ export type BootstrapOptions = {
6
+ /**
7
+ * A path to the folder where all the data definition resides which is going to be processed/sync
8
+ * Default is the current working directory (CWD)
9
+ */
10
+ path?: string;
11
+ /**
12
+ * A list of application folder names to be excluded
13
+ */
14
+ exclude?: string[];
15
+ /**
16
+ * Limit the scope of synchronization only to the elements created by the service indicated in this setting
17
+ */
18
+ scopedTo: string;
19
+ /**
20
+ * Optionally customize the computed raw list of platform modules.
21
+ * This is for backward compatibility with projects which had a single bootstrap for multiple platforms
22
+ * Adding and overriding some modules according to some env vars.
23
+ */
24
+ transformModules?: (modules: BootstrapModule[]) => BootstrapModule[];
25
+ };
26
+ /**
27
+ * Reads the current application src/data folder assembles all the platform definitions
28
+ * and calls PAE API's to synchronize.
29
+ * This is the single-entry point to implement bootstrap projects without any code at all.
30
+ */
31
+ export declare const bootstrapPlatform: (options: BootstrapOptions) => Promise<void>;
32
+ //# sourceMappingURL=bootstrap-platform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bootstrap-platform.d.ts","sourceRoot":"","sources":["../../../src/bootstrap/bootstrap-platform.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAE7E;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,eAAe,EAAE,CAAC;CACtE,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAU,SAAS,gBAAgB,kBAqChE,CAAC"}
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __rest = (this && this.__rest) || function (s, e) {
12
+ var t = {};
13
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
+ t[p] = s[p];
15
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
+ t[p[i]] = s[p[i]];
19
+ }
20
+ return t;
21
+ };
22
+ var __importDefault = (this && this.__importDefault) || function (mod) {
23
+ return (mod && mod.__esModule) ? mod : { "default": mod };
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.bootstrapPlatform = void 0;
27
+ const read_bootstrap_applications_1 = require("./read-bootstrap-applications");
28
+ const initialize_pae_client_1 = __importDefault(require("./initialize-pae-client"));
29
+ const ramda_1 = require("ramda");
30
+ const run_bootstrap_sync_service_1 = require("./run-bootstrap-sync.service");
31
+ const pae_core_1 = require("@bluealba/pae-core");
32
+ const fix_created_by_1 = __importDefault(require("./fix-created-by"));
33
+ /**
34
+ * Reads the current application src/data folder assembles all the platform definitions
35
+ * and calls PAE API's to synchronize.
36
+ * This is the single-entry point to implement bootstrap projects without any code at all.
37
+ */
38
+ const bootstrapPlatform = (options) => __awaiter(void 0, void 0, void 0, function* () {
39
+ var _a, _b;
40
+ if (!options.scopedTo) {
41
+ throw new Error('No options.scopedTo was provider neither the env var SERVICE_ACCESS_NAME is present ! Set one to identify the bootstrap as author for creating/updating entities in the platform');
42
+ }
43
+ // init PAE
44
+ const pae = yield (0, initialize_pae_client_1.default)();
45
+ // read all files
46
+ const platform = (0, read_bootstrap_applications_1.readPlatformBootstrapFolder)((_a = options.path) !== null && _a !== void 0 ? _a : process.cwd(), options);
47
+ const applications = Object.values(platform.applications);
48
+ // REVIEWME: this is a temporal behavior for the moment when added the missing createdBy/updatedBy fields
49
+ // it must be removed after all projects already run this once in 1.4.2
50
+ yield (0, fix_created_by_1.default)(platform, pae, options.scopedTo);
51
+ // sync
52
+ yield (0, run_bootstrap_sync_service_1.runBootstrapSync)(pae, {
53
+ syncConfig: {
54
+ scopedTo: options.scopedTo,
55
+ },
56
+ sharedLibraries: platform.sharedLibraries,
57
+ // TODO: refactor this. We should be passing the list of applications.
58
+ // this way we will be synchronizing "apps" instead of individual entities. And we could create better logs.
59
+ catalog: ((_b = options.transformModules) !== null && _b !== void 0 ? _b : ramda_1.identity)(applications.flatMap(app => app.modules)),
60
+ modulesConfig: (applications.flatMap(app => app.modulesConfig) || [])
61
+ .map(({ name, config }) => ({ moduleName: name, customProps: config })),
62
+ applicationsAuthz: applications
63
+ .filter(app => app.name !== pae_core_1.GLOBAL_APPLICATION_NAME)
64
+ .map(
65
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
66
+ (_a) => {
67
+ var { modules, operations, roles, modulesConfig } = _a, others = __rest(_a, ["modules", "operations", "roles", "modulesConfig"]);
68
+ return others;
69
+ }),
70
+ rolesAuthz: applications.flatMap(app => app.roles),
71
+ operationsAuthz: applications.flatMap(app => app.operations)
72
+ });
73
+ });
74
+ exports.bootstrapPlatform = bootstrapPlatform;
75
+ //# sourceMappingURL=bootstrap-platform.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bootstrap-platform.js","sourceRoot":"","sources":["../../../src/bootstrap/bootstrap-platform.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+EAA4E;AAC5E,oFAA0D;AAC1D,iCAAiC;AACjC,6EAAgE;AAChE,iDAA6D;AAC7D,sEAA4C;AA+B5C;;;;GAIG;AACI,MAAM,iBAAiB,GAAG,CAAO,OAAyB,EAAE,EAAE;;IACnE,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,kLAAkL,CAAC,CAAA;IACrM,CAAC;IAED,WAAW;IACX,MAAM,GAAG,GAAG,MAAM,IAAA,+BAAmB,GAAE,CAAC;IAExC,iBAAiB;IACjB,MAAM,QAAQ,GAAG,IAAA,yDAA2B,EAAC,MAAA,OAAO,CAAC,IAAI,mCAAI,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,CAAC;IACrF,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAE1D,yGAAyG;IACzG,uEAAuE;IACvE,MAAM,IAAA,wBAAY,EAAC,QAAQ,EAAE,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAA;IAEnD,OAAO;IACP,MAAM,IAAA,6CAAgB,EAAC,GAAG,EAAE;QAC1B,UAAU,EAAE;YACV,QAAQ,EAAE,OAAO,CAAC,QAAQ;SAC3B;QACD,eAAe,EAAE,QAAQ,CAAC,eAAe;QACzC,sEAAsE;QACtE,8GAA8G;QAE9G,OAAO,EAAE,CAAC,MAAA,OAAO,CAAC,gBAAgB,mCAAI,gBAAQ,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACzF,aAAa,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;aAClE,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,CAAC;QACzE,iBAAiB,EAAE,YAAY;aAC5B,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,kCAAuB,CAAC;aACnD,GAAG;QACF,6DAA6D;QAC7D,CAAC,EAAwD,EAAE,EAAE;gBAA5D,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,OAAa,EAAR,MAAM,cAAtD,mDAAwD,CAAF;YAAO,OAAA,MAAM,CAAA;SAAA,CACrE;QACH,UAAU,EAAE,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC;QAClD,eAAe,EAAE,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC;KAC7D,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AArCW,QAAA,iBAAiB,qBAqC5B"}
@@ -0,0 +1,37 @@
1
+ import { CreateOperationDTO } from "@bluealba/pae-core/dist/src/authorization/dto/create-operation.dto";
2
+ import { CreateSharedLibraryDTO } from "@bluealba/pae-core/dist/src/orchestrator/dto/create-shared-library.dto";
3
+ import { CreateOrUpdateModule } from "@bluealba/pae-core";
4
+ import { CreateApplicationDTO } from "@bluealba/pae-core/dist/src/authorization/dto/create-application.dto";
5
+ import { CreateRoleDTO } from "@bluealba/pae-core/dist/src/authorization/dto/create-role.dto";
6
+ import { UpdateModuleUIConfigDTO } from "@bluealba/pae-core/dist/src/catalog/dto/update-module-ui-config.dto";
7
+ import { BootstrapOptions } from "../bootstrap-platform";
8
+ export interface OperationAuthzBootstrap extends Omit<CreateOperationDTO, 'applicationName'>, Partial<Pick<CreateOperationDTO, 'applicationName'>> {
9
+ roles?: string[];
10
+ }
11
+ export interface ModuleConfig {
12
+ name: string;
13
+ config: Record<string, any>;
14
+ }
15
+ export interface BootstrapSyncMetadata {
16
+ syncConfig: {
17
+ scopedTo: BootstrapOptions['scopedTo'];
18
+ };
19
+ sharedLibraries?: CreateSharedLibraryDTO[];
20
+ catalog?: BootstrapModule[];
21
+ applicationsAuthz?: CreateApplicationDTO[];
22
+ rolesAuthz?: CreateRoleDTO[];
23
+ operationsAuthz?: OperationAuthzBootstrap[];
24
+ modulesConfig?: UpdateModuleUIConfigDTO[];
25
+ }
26
+ export type BootstrapModule = CreateOrUpdateModule;
27
+ export type BootstrapApplication = CreateApplicationDTO & {
28
+ modules: BootstrapModule[];
29
+ operations: CreateOperationDTO[];
30
+ roles: CreateRoleDTO[];
31
+ modulesConfig: ModuleConfig[];
32
+ };
33
+ export type BootstrapPlatform = {
34
+ sharedLibraries: CreateSharedLibraryDTO[];
35
+ applications: Record<string, BootstrapApplication>;
36
+ };
37
+ //# sourceMappingURL=bootstrap-sync-metadata.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bootstrap-sync-metadata.interface.d.ts","sourceRoot":"","sources":["../../../../src/bootstrap/domain/bootstrap-sync-metadata.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oEAAoE,CAAC;AACxG,OAAO,EAAE,sBAAsB,EAAE,MAAM,wEAAwE,CAAC;AAChH,OAAO,EAAE,oBAAoB,EAAkB,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,sEAAsE,CAAC;AAC5G,OAAO,EAAE,aAAa,EAAE,MAAM,+DAA+D,CAAC;AAC9F,OAAO,EAAE,uBAAuB,EAAE,MAAM,qEAAqE,CAAC;AAC9G,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,WAAW,uBAAwB,SACvC,IAAI,CAAC,kBAAkB,EAAE,iBAAiB,CAAC,EAC3C,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,iBAAiB,CAAC,CAAC;IACpD,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7B;AAED,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE;QACV,QAAQ,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;KACxC,CAAC;IACF,eAAe,CAAC,EAAE,sBAAsB,EAAE,CAAC;IAC3C,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,iBAAiB,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAC3C,UAAU,CAAC,EAAE,aAAa,EAAE,CAAC;IAC7B,eAAe,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAC5C,aAAa,CAAC,EAAE,uBAAuB,EAAE,CAAC;CAC3C;AAED,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAA;AAElD,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,GAAG;IACxD,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,UAAU,EAAE,kBAAkB,EAAE,CAAC;IACjC,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,aAAa,EAAE,YAAY,EAAE,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,eAAe,EAAE,sBAAsB,EAAE,CAAC;IAC1C,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;CACpD,CAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=bootstrap-sync-metadata.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bootstrap-sync-metadata.interface.js","sourceRoot":"","sources":["../../../../src/bootstrap/domain/bootstrap-sync-metadata.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=domain-validation.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domain-validation.test.d.ts","sourceRoot":"","sources":["../../../../src/bootstrap/domain/domain-validation.test.ts"],"names":[],"mappings":""}