@bluealba/pae-bootstrap-lib 2.0.0 → 2.0.1-develop-1297
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.
- package/dist/src/bootstrap/bootstrap-platform.d.ts +5 -2
- package/dist/src/bootstrap/bootstrap-platform.d.ts.map +1 -1
- package/dist/src/bootstrap/bootstrap-platform.js +60 -45
- package/dist/src/bootstrap/bootstrap-platform.js.map +1 -1
- package/dist/src/bootstrap/domain/bootstrap-sync-metadata.interface.d.ts +12 -0
- package/dist/src/bootstrap/domain/bootstrap-sync-metadata.interface.d.ts.map +1 -1
- package/dist/src/bootstrap/domain/domain-validation.test.js +500 -244
- package/dist/src/bootstrap/domain/domain-validation.test.js.map +1 -1
- package/dist/src/bootstrap/domain/index.d.ts +2 -0
- package/dist/src/bootstrap/domain/index.d.ts.map +1 -0
- package/dist/src/bootstrap/domain/index.js +18 -0
- package/dist/src/bootstrap/domain/index.js.map +1 -0
- package/dist/src/bootstrap/read-bootstrap-applications.d.ts.map +1 -1
- package/dist/src/bootstrap/read-bootstrap-applications.js +98 -3
- package/dist/src/bootstrap/read-bootstrap-applications.js.map +1 -1
- package/dist/src/bootstrap/run-bootstrap-sync.service.d.ts.map +1 -1
- package/dist/src/bootstrap/run-bootstrap-sync.service.js +3 -1
- package/dist/src/bootstrap/run-bootstrap-sync.service.js.map +1 -1
- package/dist/src/bootstrap/synchronizers/sync-feature-flags.d.ts +8 -0
- package/dist/src/bootstrap/synchronizers/sync-feature-flags.d.ts.map +1 -0
- package/dist/src/bootstrap/synchronizers/sync-feature-flags.js +67 -0
- package/dist/src/bootstrap/synchronizers/sync-feature-flags.js.map +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domain-validation.test.js","sourceRoot":"","sources":["../../../../src/bootstrap/domain/domain-validation.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAI1B,QAAQ,CAAC,0CAA0C,EAAE,GAAG,EAAE;IAExD,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE;QAC1C,MAAM,WAAW,GAA0B;YACzC,UAAU,EAAE;gBACV,QAAQ,EAAE,MAAM;aACjB;SACuB,CAAC;QAE3B,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"domain-validation.test.js","sourceRoot":"","sources":["../../../../src/bootstrap/domain/domain-validation.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAI1B,QAAQ,CAAC,0CAA0C,EAAE,GAAG,EAAE;IAExD,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE;QAC1C,MAAM,WAAW,GAA0B;YACzC,UAAU,EAAE;gBACV,QAAQ,EAAE,MAAM;aACjB;SACuB,CAAC;QAE3B,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ources":["../../../../src/bootstrap/domain/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./bootstrap-sync-metadata.interface"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/bootstrap/domain/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sEAAoD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-bootstrap-applications.d.ts","sourceRoot":"","sources":["../../../src/bootstrap/read-bootstrap-applications.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,iBAAiB,EAElB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"read-bootstrap-applications.d.ts","sourceRoot":"","sources":["../../../src/bootstrap/read-bootstrap-applications.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,iBAAiB,EAElB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAexD;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,GAAI,MAAM,MAAM,EAAE,SAAS,gBAAgB,KAAG,iBAgCrF,CAAA"}
|
|
@@ -45,6 +45,7 @@ const pae_core_1 = require("@bluealba/pae-core");
|
|
|
45
45
|
const typia_1 = __importDefault(require("typia"));
|
|
46
46
|
// conventions
|
|
47
47
|
const FILE_SHARED_LIBRARIES = 'shared-libraries.json';
|
|
48
|
+
const FILE_FEATURE_FLAGS = 'feature-flags.json';
|
|
48
49
|
const FILE_APPLICATION = 'application.json';
|
|
49
50
|
const FILE_OPERATIONS = 'operations.json';
|
|
50
51
|
const FILE_MODULES = 'modules.json';
|
|
@@ -111,6 +112,100 @@ const readPlatformBootstrapFolder = (path, options) => {
|
|
|
111
112
|
throw new Error(`Error reading ${FILE_SHARED_LIBRARIES} file: ${e}`);
|
|
112
113
|
}
|
|
113
114
|
}
|
|
115
|
+
else if (item.name === FILE_FEATURE_FLAGS) {
|
|
116
|
+
try {
|
|
117
|
+
acc.featureFlags = (() => { const _io0 = input => "string" === typeof input.name && (undefined === input.description || "string" === typeof input.description) && (undefined === input.enabled || "boolean" === typeof input.enabled) && (undefined === input.constraints || Array.isArray(input.constraints) && input.constraints.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = input => "string" === typeof input.contextName && "string" === typeof input.operator && (undefined === input.values || Array.isArray(input.values) && input.values.every(elem => "string" === typeof elem)); const _ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
118
|
+
method: "typia.assert",
|
|
119
|
+
path: _path + ".name",
|
|
120
|
+
expected: "string",
|
|
121
|
+
value: input.name
|
|
122
|
+
}, _errorFactory)) && (undefined === input.description || "string" === typeof input.description || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
123
|
+
method: "typia.assert",
|
|
124
|
+
path: _path + ".description",
|
|
125
|
+
expected: "(string | undefined)",
|
|
126
|
+
value: input.description
|
|
127
|
+
}, _errorFactory)) && (undefined === input.enabled || "boolean" === typeof input.enabled || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
128
|
+
method: "typia.assert",
|
|
129
|
+
path: _path + ".enabled",
|
|
130
|
+
expected: "(boolean | undefined)",
|
|
131
|
+
value: input.enabled
|
|
132
|
+
}, _errorFactory)) && (undefined === input.constraints || (Array.isArray(input.constraints) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
133
|
+
method: "typia.assert",
|
|
134
|
+
path: _path + ".constraints",
|
|
135
|
+
expected: "(Array<__type> | undefined)",
|
|
136
|
+
value: input.constraints
|
|
137
|
+
}, _errorFactory)) && input.constraints.every((elem, _index5) => ("object" === typeof elem && null !== elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
138
|
+
method: "typia.assert",
|
|
139
|
+
path: _path + ".constraints[" + _index5 + "]",
|
|
140
|
+
expected: "__type",
|
|
141
|
+
value: elem
|
|
142
|
+
}, _errorFactory)) && _ao1(elem, _path + ".constraints[" + _index5 + "]", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
143
|
+
method: "typia.assert",
|
|
144
|
+
path: _path + ".constraints[" + _index5 + "]",
|
|
145
|
+
expected: "__type",
|
|
146
|
+
value: elem
|
|
147
|
+
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
148
|
+
method: "typia.assert",
|
|
149
|
+
path: _path + ".constraints",
|
|
150
|
+
expected: "(Array<__type> | undefined)",
|
|
151
|
+
value: input.constraints
|
|
152
|
+
}, _errorFactory)); const _ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.contextName || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
153
|
+
method: "typia.assert",
|
|
154
|
+
path: _path + ".contextName",
|
|
155
|
+
expected: "string",
|
|
156
|
+
value: input.contextName
|
|
157
|
+
}, _errorFactory)) && ("string" === typeof input.operator || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
158
|
+
method: "typia.assert",
|
|
159
|
+
path: _path + ".operator",
|
|
160
|
+
expected: "string",
|
|
161
|
+
value: input.operator
|
|
162
|
+
}, _errorFactory)) && (undefined === input.values || (Array.isArray(input.values) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
163
|
+
method: "typia.assert",
|
|
164
|
+
path: _path + ".values",
|
|
165
|
+
expected: "(Array<string> | undefined)",
|
|
166
|
+
value: input.values
|
|
167
|
+
}, _errorFactory)) && input.values.every((elem, _index6) => "string" === typeof elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
168
|
+
method: "typia.assert",
|
|
169
|
+
path: _path + ".values[" + _index6 + "]",
|
|
170
|
+
expected: "string",
|
|
171
|
+
value: elem
|
|
172
|
+
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
173
|
+
method: "typia.assert",
|
|
174
|
+
path: _path + ".values",
|
|
175
|
+
expected: "(Array<string> | undefined)",
|
|
176
|
+
value: input.values
|
|
177
|
+
}, _errorFactory)); const __is = input => undefined === input || Array.isArray(input) && input.every(elem => "object" === typeof elem && null !== elem && _io0(elem)); let _errorFactory; return (input, errorFactory) => {
|
|
178
|
+
if (false === __is(input)) {
|
|
179
|
+
_errorFactory = errorFactory;
|
|
180
|
+
((input, _path, _exceptionable = true) => undefined === input || (Array.isArray(input) || __typia_transform__assertGuard._assertGuard(true, {
|
|
181
|
+
method: "typia.assert",
|
|
182
|
+
path: _path + "",
|
|
183
|
+
expected: "(Array<BootstrapFeatureFlag> | undefined)",
|
|
184
|
+
value: input
|
|
185
|
+
}, _errorFactory)) && input.every((elem, _index4) => ("object" === typeof elem && null !== elem || __typia_transform__assertGuard._assertGuard(true, {
|
|
186
|
+
method: "typia.assert",
|
|
187
|
+
path: _path + "[" + _index4 + "]",
|
|
188
|
+
expected: "BootstrapFeatureFlag",
|
|
189
|
+
value: elem
|
|
190
|
+
}, _errorFactory)) && _ao0(elem, _path + "[" + _index4 + "]", true) || __typia_transform__assertGuard._assertGuard(true, {
|
|
191
|
+
method: "typia.assert",
|
|
192
|
+
path: _path + "[" + _index4 + "]",
|
|
193
|
+
expected: "BootstrapFeatureFlag",
|
|
194
|
+
value: elem
|
|
195
|
+
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(true, {
|
|
196
|
+
method: "typia.assert",
|
|
197
|
+
path: _path + "",
|
|
198
|
+
expected: "(Array<BootstrapFeatureFlag> | undefined)",
|
|
199
|
+
value: input
|
|
200
|
+
}, _errorFactory))(input, "$input", true);
|
|
201
|
+
}
|
|
202
|
+
return input;
|
|
203
|
+
}; })()((0, io_1.readJSONFile)((0, path_1.join)(path, FILE_FEATURE_FLAGS)));
|
|
204
|
+
}
|
|
205
|
+
catch (e) {
|
|
206
|
+
throw new Error(`Error reading ${FILE_FEATURE_FLAGS} file: ${e}`);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
114
209
|
else if (item.isDirectory()) {
|
|
115
210
|
if (((_a = options.exclude) !== null && _a !== void 0 ? _a : []).includes(item.name)) {
|
|
116
211
|
console.log(`Excluding application [${item.name}] !`);
|
|
@@ -179,7 +274,7 @@ const readApplicationDirectory = (path, globalApplication) => {
|
|
|
179
274
|
if (existsSync((0, path_1.join)(path, FILE_MODULES))) {
|
|
180
275
|
const data = readApplicationItems(path, FILE_MODULES, application, 'application');
|
|
181
276
|
try {
|
|
182
|
-
application.modules.push(...(() => { const _io0 = input => "string" === typeof input.name && "string" === typeof input.displayName && ("service" === input.type || "app" === input.type || "utility" === input.type || "cloud-function" === input.type) && "string" === typeof input.baseUrl && ("object" === typeof input.service && null !== input.service && _io1(input.service)) && (Array.isArray(input.dependsOn) && input.dependsOn.every(elem => "string" === typeof elem)) && (undefined === input.commonPaths || "object" === typeof input.commonPaths && null !== input.commonPaths && false === Array.isArray(input.commonPaths) && _io2(input.commonPaths)) && (undefined === input.ui || "object" === typeof input.ui && null !== input.ui && _io3(input.ui)) && (undefined === input.cloudFunction || "object" === typeof input.cloudFunction && null !== input.cloudFunction && _io5(input.cloudFunction)) && (undefined === input.authorization || "object" === typeof input.authorization && null !== input.authorization && false === Array.isArray(input.authorization) && _io6(input.authorization)) && (undefined === input.application || "string" === typeof input.application) && (undefined === input.version || "string" === typeof input.version) && (undefined === input.isPublic || "boolean" === typeof input.isPublic) && (undefined === input.id || "number" === typeof input.id); const _io1 = input => "string" === typeof input.host && "number" === typeof input.port && (undefined === input.protocol || "string" === typeof input.protocol) && (undefined === input.includeBaseURL || "boolean" === typeof input.includeBaseURL); const _io2 = input => (undefined === input.apiDocs || "string" === typeof input.apiDocs) && (undefined === input.version || "string" === typeof input.version) && (undefined === input.health || "string" === typeof input.health) && (undefined === input.changelog || "string" === typeof input.changelog); const _io3 = input => "string" === typeof input.route && (null === input.mountAtSelector || undefined === input.mountAtSelector || "string" === typeof input.mountAtSelector) && "string" === typeof input.bundleFile && ("object" === typeof input.customProps && null !== input.customProps && false === Array.isArray(input.customProps) && _io4(input.customProps)) && (undefined === input.shell || "boolean" === typeof input.shell) && (undefined === input.isPlatformCustomization || "boolean" === typeof input.isPlatformCustomization); const _io4 = input => Object.keys(input).every(key => {
|
|
277
|
+
application.modules.push(...(() => { const _io0 = input => "string" === typeof input.name && "string" === typeof input.displayName && ("service" === input.type || "app" === input.type || "utility" === input.type || "cloud-function" === input.type || "documentation" === input.type) && "string" === typeof input.baseUrl && ("object" === typeof input.service && null !== input.service && _io1(input.service)) && (Array.isArray(input.dependsOn) && input.dependsOn.every(elem => "string" === typeof elem)) && (undefined === input.commonPaths || "object" === typeof input.commonPaths && null !== input.commonPaths && false === Array.isArray(input.commonPaths) && _io2(input.commonPaths)) && (undefined === input.ui || "object" === typeof input.ui && null !== input.ui && _io3(input.ui)) && (undefined === input.cloudFunction || "object" === typeof input.cloudFunction && null !== input.cloudFunction && _io5(input.cloudFunction)) && (undefined === input.authorization || "object" === typeof input.authorization && null !== input.authorization && false === Array.isArray(input.authorization) && _io6(input.authorization)) && (undefined === input.application || "string" === typeof input.application) && (undefined === input.version || "string" === typeof input.version) && (undefined === input.isPublic || "boolean" === typeof input.isPublic) && (undefined === input.id || "number" === typeof input.id); const _io1 = input => "string" === typeof input.host && "number" === typeof input.port && (undefined === input.protocol || "string" === typeof input.protocol) && (undefined === input.includeBaseURL || "boolean" === typeof input.includeBaseURL); const _io2 = input => (undefined === input.apiDocs || "string" === typeof input.apiDocs) && (undefined === input.version || "string" === typeof input.version) && (undefined === input.health || "string" === typeof input.health) && (undefined === input.changelog || "string" === typeof input.changelog); const _io3 = input => "string" === typeof input.route && (null === input.mountAtSelector || undefined === input.mountAtSelector || "string" === typeof input.mountAtSelector) && "string" === typeof input.bundleFile && ("object" === typeof input.customProps && null !== input.customProps && false === Array.isArray(input.customProps) && _io4(input.customProps)) && (undefined === input.shell || "boolean" === typeof input.shell) && (undefined === input.isPlatformCustomization || "boolean" === typeof input.isPlatformCustomization); const _io4 = input => Object.keys(input).every(key => {
|
|
183
278
|
const value = input[key];
|
|
184
279
|
if (undefined === value)
|
|
185
280
|
return true;
|
|
@@ -194,10 +289,10 @@ const readApplicationDirectory = (path, globalApplication) => {
|
|
|
194
289
|
path: _path + ".displayName",
|
|
195
290
|
expected: "string",
|
|
196
291
|
value: input.displayName
|
|
197
|
-
}, _errorFactory)) && ("service" === input.type || "app" === input.type || "utility" === input.type || "cloud-function" === input.type || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
292
|
+
}, _errorFactory)) && ("service" === input.type || "app" === input.type || "utility" === input.type || "cloud-function" === input.type || "documentation" === input.type || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
198
293
|
method: "typia.assert",
|
|
199
294
|
path: _path + ".type",
|
|
200
|
-
expected: "(\"app\" | \"cloud-function\" | \"service\" | \"utility\")",
|
|
295
|
+
expected: "(\"app\" | \"cloud-function\" | \"documentation\" | \"service\" | \"utility\")",
|
|
201
296
|
value: input.type
|
|
202
297
|
}, _errorFactory)) && ("string" === typeof input.baseUrl || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
203
298
|
method: "typia.assert",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-bootstrap-applications.js","sourceRoot":"","sources":["../../../src/bootstrap/read-bootstrap-applications.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA4B;AAE5B,oCAA2C;AAQ3C,iDAAmF;AAGnF,kDAA0B;AAE1B,cAAc;AACd,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AACtD,MAAM,gBAAgB,GAAG,kBAAkB,CAAA;AAC3C,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAC1C,MAAM,YAAY,GAAG,cAAc,CAAC;AACpC,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAClD,MAAM,UAAU,GAAG,YAAY,CAAA;AAE/B;;;;;GAKG;AACI,MAAM,2BAA2B,GAAG,CAAC,IAAY,EAAE,OAAyB,EAAqB,EAAE;IACxG,MAAM,iBAAiB,GAAG,uBAAuB,EAAE,CAAA;IAEnD,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtC,aAAa;IACb,OAAO,WAAW,CAAC,IAAI,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;;QACrE,IAAI,IAAI,CAAC,IAAI,KAAK,qBAAqB,EAAE,CAAC;YACxC,IAAI,CAAC;gBACH,GAAG,CAAC,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAAsD,IAAA,iBAAY,EAAC,IAAA,WAAI,EAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC;YAC5H,CAAC;YAAC,OAAO,CAAC,E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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAAgB,IAAI,CAAC,CAAC,CAAC;QAChD,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CAAC,iBAAiB,IAAA,WAAI,EAAC,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QACxE,CAAC;IACH,CAAC;IACD,OAAO,WAAW,CAAA;AACpB,CAAC,CAAA;AAED,MAAM,oBAAoB,GAAG,CAAI,IAAY,EAAE,QAAgB,EAAE,WAAiC,EAAE,YAAoB,iBAAiB,EAAE,EAAE,CAC1I,IAAA,iBAAY,EAAC,IAAA,WAAI,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAoB;KACnD,GAAG,CAAC,IAAI,CAAC,EAAE;IACV,OAAO,WAAW,CAAC,IAAI,KAAK,kCAAuB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,iCACxD,IAAI,KACP,CAAC,SAAS,CAAC,EAAE,WAAW,CAAC,IAAI,IAC7B,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-bootstrap-sync.service.d.ts","sourceRoot":"","sources":["../../../src/bootstrap/run-bootstrap-sync.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AAQnF,eAAO,MAAM,gBAAgB,GAC3B,KAAK,GAAG,EACR,QAAQ,qBAAqB,
|
|
1
|
+
{"version":3,"file":"run-bootstrap-sync.service.d.ts","sourceRoot":"","sources":["../../../src/bootstrap/run-bootstrap-sync.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AAQnF,eAAO,MAAM,gBAAgB,GAC3B,KAAK,GAAG,EACR,QAAQ,qBAAqB,kBAe9B,CAAA"}
|
|
@@ -12,14 +12,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.runBootstrapSync = void 0;
|
|
13
13
|
const sync_catalog_1 = require("./synchronizers/sync-catalog");
|
|
14
14
|
const sync_shared_libraries_1 = require("./synchronizers/sync-shared-libraries");
|
|
15
|
+
const sync_feature_flags_1 = require("./synchronizers/sync-feature-flags");
|
|
15
16
|
const sync_applications_1 = require("./synchronizers/sync-applications");
|
|
16
17
|
const sync_authz_entities_1 = require("./synchronizers/sync-authz-entities");
|
|
17
18
|
const sync_modules_config_1 = require("./synchronizers/sync-modules-config");
|
|
18
19
|
const runBootstrapSync = (pae, config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
19
|
-
const { catalog, sharedLibraries, applicationsAuthz, rolesAuthz, operationsAuthz, modulesConfig, syncConfig } = config;
|
|
20
|
+
const { catalog, sharedLibraries, featureFlags, applicationsAuthz, rolesAuthz, operationsAuthz, modulesConfig, syncConfig } = config;
|
|
20
21
|
yield (0, sync_catalog_1.syncCatalog)(pae, catalog, syncConfig);
|
|
21
22
|
yield (0, sync_modules_config_1.syncModulesConfig)(pae, modulesConfig);
|
|
22
23
|
yield (0, sync_shared_libraries_1.syncSharedLibraries)(pae, sharedLibraries, syncConfig);
|
|
24
|
+
yield (0, sync_feature_flags_1.syncFeatureFlags)(pae, featureFlags, syncConfig);
|
|
23
25
|
yield (0, sync_applications_1.syncApplications)(pae, applicationsAuthz, syncConfig);
|
|
24
26
|
yield (0, sync_authz_entities_1.syncAuthzEntities)(pae, rolesAuthz, operationsAuthz, syncConfig);
|
|
25
27
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-bootstrap-sync.service.js","sourceRoot":"","sources":["../../../src/bootstrap/run-bootstrap-sync.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,+DAA2D;AAC3D,iFAA4E;AAC5E,yEAAqE;AACrE,6EAAwE;AACxE,6EAAwE;
|
|
1
|
+
{"version":3,"file":"run-bootstrap-sync.service.js","sourceRoot":"","sources":["../../../src/bootstrap/run-bootstrap-sync.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,+DAA2D;AAC3D,iFAA4E;AAC5E,2EAAsE;AACtE,yEAAqE;AACrE,6EAAwE;AACxE,6EAAwE;AAEjE,MAAM,gBAAgB,GAAG,CAC9B,GAAQ,EACR,MAA6B,EAC7B,EAAE;IACF,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,eAAe,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;IAErI,MAAM,IAAA,0BAAW,EAAC,GAAG,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;IAE5C,MAAM,IAAA,uCAAiB,EAAC,GAAG,EAAE,aAAa,CAAC,CAAC;IAE5C,MAAM,IAAA,2CAAmB,EAAC,GAAG,EAAE,eAAe,EAAE,UAAU,CAAC,CAAC;IAE5D,MAAM,IAAA,qCAAgB,EAAC,GAAG,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;IAEtD,MAAM,IAAA,oCAAgB,EAAC,GAAG,EAAE,iBAAiB,EAAE,UAAU,CAAC,CAAC;IAE3D,MAAM,IAAA,uCAAiB,EAAC,GAAG,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,CAAC,CAAC;AACxE,CAAC,CAAA,CAAA;AAjBY,QAAA,gBAAgB,oBAiB5B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PAE } from "@bluealba/pae-core";
|
|
2
|
+
import { BootstrapSyncMetadata } from "../domain/bootstrap-sync-metadata.interface";
|
|
3
|
+
/**
|
|
4
|
+
* Synchronize feature flags with the PAE gateway
|
|
5
|
+
* Calls the bootstrap endpoint which performs upsert operations
|
|
6
|
+
*/
|
|
7
|
+
export declare const syncFeatureFlags: (pae: PAE, featureFlags: BootstrapSyncMetadata["featureFlags"], syncConfig: BootstrapSyncMetadata["syncConfig"]) => Promise<void>;
|
|
8
|
+
//# sourceMappingURL=sync-feature-flags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync-feature-flags.d.ts","sourceRoot":"","sources":["../../../../src/bootstrap/synchronizers/sync-feature-flags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAwB,MAAM,6CAA6C,CAAC;AA4C1G;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAC3B,KAAK,GAAG,EACR,cAAc,qBAAqB,CAAC,cAAc,CAAC,EACnD,YAAY,qBAAqB,CAAC,YAAY,CAAC,kBAwChD,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.syncFeatureFlags = void 0;
|
|
13
|
+
/**
|
|
14
|
+
* Transform bootstrap feature flag format to gateway format
|
|
15
|
+
* Wraps constraints in a boolean strategy
|
|
16
|
+
*/
|
|
17
|
+
const transformFeatureFlag = (flag) => {
|
|
18
|
+
var _a, _b;
|
|
19
|
+
return {
|
|
20
|
+
name: flag.name,
|
|
21
|
+
description: (_a = flag.description) !== null && _a !== void 0 ? _a : '',
|
|
22
|
+
enabled: (_b = flag.enabled) !== null && _b !== void 0 ? _b : false,
|
|
23
|
+
strategies: [{
|
|
24
|
+
type: 'boolean',
|
|
25
|
+
parameters: {},
|
|
26
|
+
constraints: flag.constraints || []
|
|
27
|
+
}]
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Synchronize feature flags with the PAE gateway
|
|
32
|
+
* Calls the bootstrap endpoint which performs upsert operations
|
|
33
|
+
*/
|
|
34
|
+
const syncFeatureFlags = (pae, featureFlags, syncConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
|
35
|
+
if (!featureFlags || featureFlags.length === 0) {
|
|
36
|
+
console.log('No feature flags to synchronize - SKIPPED');
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
try {
|
|
40
|
+
console.log(`Synchronizing Feature Flags (${featureFlags.length} flags) - START ...`);
|
|
41
|
+
// Transform bootstrap format to gateway format
|
|
42
|
+
const transformedFlags = featureFlags.map(transformFeatureFlag);
|
|
43
|
+
const dto = {
|
|
44
|
+
flags: transformedFlags
|
|
45
|
+
};
|
|
46
|
+
// Call the bootstrap endpoint
|
|
47
|
+
const response = yield pae.invoke('/_/feature-flags/bootstrap', {
|
|
48
|
+
method: 'POST',
|
|
49
|
+
headers: {
|
|
50
|
+
'Content-Type': 'application/json',
|
|
51
|
+
},
|
|
52
|
+
body: JSON.stringify(dto),
|
|
53
|
+
});
|
|
54
|
+
if (!response.ok) {
|
|
55
|
+
const errorText = yield response.text();
|
|
56
|
+
throw new Error(`Failed to bootstrap feature flags: ${response.status} - ${errorText}`);
|
|
57
|
+
}
|
|
58
|
+
const result = yield response.json();
|
|
59
|
+
console.log(`Synchronizing Feature Flags - COMPLETED (created: ${result.created}, updated: ${result.updated}, flags: ${result.flagNames.join(', ')})`);
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
console.error('Synchronizing Feature Flags - ERROR', error);
|
|
63
|
+
throw error;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
exports.syncFeatureFlags = syncFeatureFlags;
|
|
67
|
+
//# sourceMappingURL=sync-feature-flags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync-feature-flags.js","sourceRoot":"","sources":["../../../../src/bootstrap/synchronizers/sync-feature-flags.ts"],"names":[],"mappings":";;;;;;;;;;;;AA4BA;;;GAGG;AACH,MAAM,oBAAoB,GAAG,CAAC,IAA0B,EAAwB,EAAE;;IAChF,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,WAAW,EAAE,MAAA,IAAI,CAAC,WAAW,mCAAI,EAAE;QACnC,OAAO,EAAE,MAAA,IAAI,CAAC,OAAO,mCAAI,KAAK;QAC9B,UAAU,EAAE,CAAC;gBACX,IAAI,EAAE,SAAS;gBACf,UAAU,EAAE,EAAE;gBACd,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,EAAE;aACpC,CAAC;KACH,CAAC;AACJ,CAAC,CAAC;AAEF;;;GAGG;AACI,MAAM,gBAAgB,GAAG,CAC9B,GAAQ,EACR,YAAmD,EACnD,UAA+C,EAC/C,EAAE;IACF,IAAI,CAAC,YAAY,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/C,OAAO,CAAC,GAAG,CAAC,2CAA2C,CAAC,CAAC;QACzD,OAAO;IACT,CAAC;IAED,IAAI,CAAC;QACH,OAAO,CAAC,GAAG,CAAC,gCAAgC,YAAY,CAAC,MAAM,qBAAqB,CAAC,CAAC;QAEtF,+CAA+C;QAC/C,MAAM,gBAAgB,GAAG,YAAY,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;QAEhE,MAAM,GAAG,GAA6B;YACpC,KAAK,EAAE,gBAAgB;SACxB,CAAC;QAEF,8BAA8B;QAC9B,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,MAAM,CAAC,4BAA4B,EAAE;YAC9D,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;aACnC;YACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC;SAC1B,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,MAAM,SAAS,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACxC,MAAM,IAAI,KAAK,CAAC,sCAAsC,QAAQ,CAAC,MAAM,MAAM,SAAS,EAAE,CAAC,CAAC;QAC1F,CAAC;QAED,MAAM,MAAM,GAAkC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QAEpE,OAAO,CAAC,GAAG,CACT,qDAAqD,MAAM,CAAC,OAAO,cAAc,MAAM,CAAC,OAAO,YAAY,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAC1I,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,qCAAqC,EAAE,KAAK,CAAC,CAAC;QAC5D,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAA,CAAC;AA3CW,QAAA,gBAAgB,oBA2C3B"}
|
package/dist/src/index.d.ts
CHANGED
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,wCAAwC,CAAC;AACvD,cAAc,gCAAgC,CAAA"}
|
package/dist/src/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./bootstrap/domain"), exports);
|
|
17
18
|
__exportStar(require("./bootstrap/run-bootstrap-sync.service"), exports);
|
|
18
19
|
__exportStar(require("./bootstrap/bootstrap-platform"), exports);
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,yEAAuD;AACvD,iEAA8C"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bluealba/pae-bootstrap-lib",
|
|
3
3
|
"description": "PAE library for bootstrapping platforms",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.1-develop-1297",
|
|
5
5
|
"main": "./dist/src/index.js",
|
|
6
6
|
"types": "./dist/src/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"license": "PolyForm-Noncommercial-1.0.0",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@bluealba/pae-core": "*",
|
|
22
|
-
"jest-diff": "^
|
|
22
|
+
"jest-diff": "^29.7.0",
|
|
23
23
|
"ramda": "^0.30.1",
|
|
24
24
|
"typia": "^9.1.1"
|
|
25
25
|
},
|