@bluealba/pae-bootstrap-lib 2.1.3-develop-78 → 2.1.3-develop-92
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/README.md +2 -1
- package/dist/src/bootstrap/bootstrap-platform.d.ts.map +1 -1
- package/dist/src/bootstrap/bootstrap-platform.js +11 -15
- package/dist/src/bootstrap/bootstrap-platform.js.map +1 -1
- package/dist/src/bootstrap/domain/bootstrap-sync-metadata.interface.d.ts +18 -6
- package/dist/src/bootstrap/domain/bootstrap-sync-metadata.interface.d.ts.map +1 -1
- package/dist/src/bootstrap/domain/domain-validation.test.js +8 -8
- package/dist/src/bootstrap/entity-synchronizer.js.map +1 -1
- package/dist/src/bootstrap/read-bootstrap-applications.d.ts +1 -1
- package/dist/src/bootstrap/read-bootstrap-applications.d.ts.map +1 -1
- package/dist/src/bootstrap/read-bootstrap-applications.js +92 -7
- package/dist/src/bootstrap/read-bootstrap-applications.js.map +1 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +7 -1
- package/dist/src/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/src/bootstrap/fix-created-by.d.ts +0 -10
- package/dist/src/bootstrap/fix-created-by.d.ts.map +0 -1
- package/dist/src/bootstrap/fix-created-by.js +0 -36
- package/dist/src/bootstrap/fix-created-by.js.map +0 -1
- package/dist/src/bootstrap/initialize-pae-client.d.ts +0 -7
- package/dist/src/bootstrap/initialize-pae-client.d.ts.map +0 -1
- package/dist/src/bootstrap/initialize-pae-client.js +0 -24
- package/dist/src/bootstrap/initialize-pae-client.js.map +0 -1
- package/dist/src/bootstrap/run-bootstrap-sync.service.d.ts +0 -4
- package/dist/src/bootstrap/run-bootstrap-sync.service.d.ts.map +0 -1
- package/dist/src/bootstrap/run-bootstrap-sync.service.js +0 -29
- package/dist/src/bootstrap/run-bootstrap-sync.service.js.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-applications.d.ts +0 -4
- package/dist/src/bootstrap/synchronizers/sync-applications.d.ts.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-applications.js +0 -53
- package/dist/src/bootstrap/synchronizers/sync-applications.js.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-authz-entities.d.ts +0 -11
- package/dist/src/bootstrap/synchronizers/sync-authz-entities.d.ts.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-authz-entities.js +0 -58
- package/dist/src/bootstrap/synchronizers/sync-authz-entities.js.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-catalog.d.ts +0 -5
- package/dist/src/bootstrap/synchronizers/sync-catalog.d.ts.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-catalog.js +0 -95
- package/dist/src/bootstrap/synchronizers/sync-catalog.js.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-entities/performDeletes.d.ts +0 -11
- package/dist/src/bootstrap/synchronizers/sync-entities/performDeletes.d.ts.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-entities/performDeletes.js +0 -38
- package/dist/src/bootstrap/synchronizers/sync-entities/performDeletes.js.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-entities/performUpdates.d.ts +0 -12
- package/dist/src/bootstrap/synchronizers/sync-entities/performUpdates.d.ts.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-entities/performUpdates.js +0 -43
- package/dist/src/bootstrap/synchronizers/sync-entities/performUpdates.js.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-entities.d.ts +0 -19
- package/dist/src/bootstrap/synchronizers/sync-entities.d.ts.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-entities.js +0 -59
- package/dist/src/bootstrap/synchronizers/sync-entities.js.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-entities.test.d.ts +0 -2
- package/dist/src/bootstrap/synchronizers/sync-entities.test.d.ts.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-entities.test.js +0 -158
- package/dist/src/bootstrap/synchronizers/sync-entities.test.js.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-entity-options.d.ts +0 -11
- package/dist/src/bootstrap/synchronizers/sync-entity-options.d.ts.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-entity-options.js +0 -3
- package/dist/src/bootstrap/synchronizers/sync-entity-options.js.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-feature-flags.d.ts +0 -8
- package/dist/src/bootstrap/synchronizers/sync-feature-flags.d.ts.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-feature-flags.js +0 -68
- package/dist/src/bootstrap/synchronizers/sync-feature-flags.js.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-modules-config.d.ts +0 -4
- package/dist/src/bootstrap/synchronizers/sync-modules-config.d.ts.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-modules-config.js +0 -28
- package/dist/src/bootstrap/synchronizers/sync-modules-config.js.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-operations.d.ts +0 -5
- package/dist/src/bootstrap/synchronizers/sync-operations.d.ts.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-operations.js +0 -41
- package/dist/src/bootstrap/synchronizers/sync-operations.js.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-role-operations.d.ts +0 -8
- package/dist/src/bootstrap/synchronizers/sync-role-operations.d.ts.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-role-operations.js +0 -74
- package/dist/src/bootstrap/synchronizers/sync-role-operations.js.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-roles.d.ts +0 -5
- package/dist/src/bootstrap/synchronizers/sync-roles.d.ts.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-roles.js +0 -41
- package/dist/src/bootstrap/synchronizers/sync-roles.js.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-shared-libraries.d.ts +0 -4
- package/dist/src/bootstrap/synchronizers/sync-shared-libraries.d.ts.map +0 -1
- package/dist/src/bootstrap/synchronizers/sync-shared-libraries.js +0 -32
- package/dist/src/bootstrap/synchronizers/sync-shared-libraries.js.map +0 -1
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ bootstrapPlatform({
|
|
|
14
14
|
# Folder & Files conventions
|
|
15
15
|
|
|
16
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`
|
|
17
|
+
Each folder might optionally contain definition files that must follow the names: `(modules | operations | roles | jobs).json`
|
|
18
18
|
If it defines an `application.json` then all resources declared in the previously mentioned files will be automatically
|
|
19
19
|
created scoped to that application.
|
|
20
20
|
Otherwise a folder that doesn't have `application.json` might define resources as well but they will be created
|
|
@@ -30,6 +30,7 @@ At the top there are platform defitions such as `shared-libraries.json`
|
|
|
30
30
|
modules.json
|
|
31
31
|
operations.json
|
|
32
32
|
roles.json
|
|
33
|
+
jobs.json (optional)
|
|
33
34
|
- another-application
|
|
34
35
|
application.json
|
|
35
36
|
modules.json
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap-platform.d.ts","sourceRoot":"","sources":["../../../src/bootstrap/bootstrap-platform.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;
|
|
1
|
+
{"version":3,"file":"bootstrap-platform.d.ts","sourceRoot":"","sources":["../../../src/bootstrap/bootstrap-platform.ts"],"names":[],"mappings":"AAEA,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;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,GAAU,SAAS,gBAAgB,kBAsEhE,CAAC"}
|
|
@@ -8,14 +8,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
12
|
exports.bootstrapPlatform = void 0;
|
|
16
|
-
const read_bootstrap_applications_1 = require("./read-bootstrap-applications");
|
|
17
13
|
const pae_core_1 = require("@bluealba/pae-core");
|
|
18
|
-
const
|
|
14
|
+
const read_bootstrap_applications_1 = require("./read-bootstrap-applications");
|
|
19
15
|
/**
|
|
20
16
|
* Reads the current application src/data folder assembles all the platform definitions
|
|
21
17
|
* and sends them to the gateway's /bootstrap/sync endpoint for synchronization.
|
|
@@ -25,18 +21,16 @@ const initialize_pae_client_1 = __importDefault(require("./initialize-pae-client
|
|
|
25
21
|
* The function signature remains unchanged for backward compatibility.
|
|
26
22
|
*/
|
|
27
23
|
const bootstrapPlatform = (options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
28
|
-
var _a, _b, _c;
|
|
24
|
+
var _a, _b, _c, _d;
|
|
29
25
|
if (!options.scopedTo) {
|
|
30
26
|
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');
|
|
31
27
|
}
|
|
32
28
|
console.log('[Bootstrap] Reading platform data from:', (_a = options.path) !== null && _a !== void 0 ? _a : process.cwd());
|
|
33
|
-
// init PAE
|
|
34
|
-
const pae = yield (0, initialize_pae_client_1.default)();
|
|
35
29
|
// Read all files from filesystem (maintains current logic)
|
|
36
30
|
const platform = (0, read_bootstrap_applications_1.readPlatformBootstrapFolder)((_b = options.path) !== null && _b !== void 0 ? _b : process.cwd(), options);
|
|
37
31
|
const applications = Object.values(platform.applications);
|
|
38
32
|
console.log(`[Bootstrap] Found ${applications.length} applications`);
|
|
39
|
-
console.log(`[Bootstrap] Found ${(_c = platform.sharedLibraries) === null || _c === void 0 ? void 0 : _c.length} shared libraries`);
|
|
33
|
+
console.log(`[Bootstrap] Found ${(_d = (_c = platform.sharedLibraries) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0} shared libraries`);
|
|
40
34
|
// Handle transformModules option if provided (backward compatibility)
|
|
41
35
|
if (options.transformModules) {
|
|
42
36
|
console.warn('[DEPRECATED] transformModules option is deprecated and will be removed in a future version.');
|
|
@@ -58,15 +52,17 @@ const bootstrapPlatform = (options) => __awaiter(void 0, void 0, void 0, functio
|
|
|
58
52
|
}
|
|
59
53
|
});
|
|
60
54
|
}
|
|
61
|
-
// Get gateway URL from environment
|
|
62
|
-
const gatewayUrl = (0, pae_core_1.fromEnv)('GATEWAY_SERVICE_URL');
|
|
63
|
-
const url = `${gatewayUrl}/bootstrap/sync`;
|
|
64
|
-
console.log(`[Bootstrap] Sending data to gateway: ${url}`);
|
|
65
|
-
console.log(`[Bootstrap] Scoped to: ${options.scopedTo}`);
|
|
66
55
|
try {
|
|
67
|
-
|
|
56
|
+
// Get gateway URL from environment
|
|
57
|
+
const gatewayUrl = (0, pae_core_1.fromEnv)('GATEWAY_SERVICE_URL');
|
|
58
|
+
const url = `${gatewayUrl}/bootstrap/sync`;
|
|
59
|
+
console.log(`[Bootstrap] Sending data to gateway: ${url}`);
|
|
60
|
+
console.log(`[Bootstrap] Scoped to: ${options.scopedTo}`);
|
|
61
|
+
const response = yield fetch(url, {
|
|
68
62
|
method: 'POST',
|
|
69
63
|
headers: {
|
|
64
|
+
'Authorization': `Bearer ${(0, pae_core_1.fromEnv)("SERVICE_ACCESS_SECRET")}`,
|
|
65
|
+
'Accept': 'application/json',
|
|
70
66
|
'Content-Type': 'application/json',
|
|
71
67
|
'x-bootstrap-scoped-to': options.scopedTo,
|
|
72
68
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap-platform.js","sourceRoot":"","sources":["../../../src/bootstrap/bootstrap-platform.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bootstrap-platform.js","sourceRoot":"","sources":["../../../src/bootstrap/bootstrap-platform.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAAsE;AACtE,+EAA4E;AA+B5E;;;;;;;GAOG;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,OAAO,CAAC,GAAG,CAAC,yCAAyC,EAAE,MAAA,OAAO,CAAC,IAAI,mCAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAEtF,2DAA2D;IAC3D,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,OAAO,CAAC,GAAG,CAAC,qBAAqB,YAAY,CAAC,MAAM,eAAe,CAAC,CAAC;IACrE,OAAO,CAAC,GAAG,CAAC,qBAAqB,MAAA,MAAA,QAAQ,CAAC,eAAe,0CAAE,MAAM,mCAAI,CAAC,mBAAmB,CAAC,CAAC;IAE3F,sEAAsE;IACtE,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;QAC7B,OAAO,CAAC,IAAI,CAAC,6FAA6F,CAAC,CAAC;QAC5G,MAAM,kBAAkB,GAAG,OAAO,CAAC,gBAAgB,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC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,kBAAkB;gBAClC,uBAAuB,EAAE,OAAO,CAAC,QAAQ;aAC1C;YACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;SAC/B,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,qCAAqC,QAAQ,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC,CAAC;QACxF,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC;IACzD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC3B,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;YACzD,MAAM,KAAK,CAAC;QACd,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC,CAAA,CAAC;AAtEW,QAAA,iBAAiB,qBAsE5B"}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import { CreateOperationDTO } from "@bluealba/pae-core
|
|
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";
|
|
1
|
+
import type { CreateApplicationDTO, CreateOperationDTO, CreateOrUpdateModule, CreateRoleDTO, CreateSharedLibraryDTO, UpdateModuleUIConfigDTO } from "@bluealba/pae-core";
|
|
7
2
|
import { BootstrapOptions } from "../bootstrap-platform";
|
|
8
3
|
export interface BootstrapFeatureFlag {
|
|
9
4
|
name: string;
|
|
@@ -16,6 +11,14 @@ export interface BootstrapFeatureFlag {
|
|
|
16
11
|
values?: string[];
|
|
17
12
|
}>;
|
|
18
13
|
}
|
|
14
|
+
export interface BootstrapJob {
|
|
15
|
+
name: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
enabled?: boolean;
|
|
18
|
+
pattern: string;
|
|
19
|
+
taskType: string;
|
|
20
|
+
taskConfig: Record<string, any>;
|
|
21
|
+
}
|
|
19
22
|
export interface OperationAuthzBootstrap extends Omit<CreateOperationDTO, 'applicationName'>, Partial<Pick<CreateOperationDTO, 'applicationName'>> {
|
|
20
23
|
roles?: string[];
|
|
21
24
|
}
|
|
@@ -23,6 +26,14 @@ export interface ModuleConfig {
|
|
|
23
26
|
name: string;
|
|
24
27
|
config: Record<string, any>;
|
|
25
28
|
}
|
|
29
|
+
export interface BootstrapJob {
|
|
30
|
+
name: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
enabled?: boolean;
|
|
33
|
+
pattern: string;
|
|
34
|
+
taskType: string;
|
|
35
|
+
taskConfig: Record<string, any>;
|
|
36
|
+
}
|
|
26
37
|
export interface BootstrapSyncMetadata {
|
|
27
38
|
syncConfig: {
|
|
28
39
|
scopedTo: BootstrapOptions['scopedTo'];
|
|
@@ -41,6 +52,7 @@ export type BootstrapApplication = CreateApplicationDTO & {
|
|
|
41
52
|
operations: CreateOperationDTO[];
|
|
42
53
|
roles: CreateRoleDTO[];
|
|
43
54
|
modulesConfig: ModuleConfig[];
|
|
55
|
+
jobs: BootstrapJob[];
|
|
44
56
|
featureFlags?: BootstrapFeatureFlag[];
|
|
45
57
|
};
|
|
46
58
|
export type BootstrapPlatform = {
|
|
@@ -1 +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,
|
|
1
|
+
{"version":3,"file":"bootstrap-sync-metadata.interface.d.ts","sourceRoot":"","sources":["../../../../src/bootstrap/domain/bootstrap-sync-metadata.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,EACb,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,KAAK,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;KACnB,CAAC,CAAC;CACJ;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACjC;AAED,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,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strapSyncMetadata - type validations', () => {
|
|
|
51
51
|
if (undefined === value)
|
|
52
52
|
return true;
|
|
53
53
|
return true;
|
|
54
|
-
}); const _io10 = input => "aws" === input.provider && "boolean" === typeof input.requiresSignature; const _io11 = input => (undefined === input.operations || Array.isArray(input.operations) && input.operations.every(elem => "string" === typeof elem)) && (undefined === input.routes || Array.isArray(input.routes) && input.routes.every(elem => "object" === typeof elem && null !== elem && _io12(elem))); const _io12 = input => (undefined === input.methods || Array.isArray(input.methods) && input.methods.every(elem => "
|
|
54
|
+
}); const _io10 = input => "aws" === input.provider && "boolean" === typeof input.requiresSignature; const _io11 = input => (undefined === input.operations || Array.isArray(input.operations) && input.operations.every(elem => "string" === typeof elem)) && (undefined === input.routes || Array.isArray(input.routes) && input.routes.every(elem => "object" === typeof elem && null !== elem && _io12(elem))); const _io12 = input => (undefined === input.methods || Array.isArray(input.methods) && input.methods.every(elem => "POST" === elem || "DELETE" === elem || "GET" === elem || "HEAD" === elem || "OPTIONS" === elem || "PUT" === elem || "PATCH" === elem || "CONNECT" === elem || "TRACE" === elem)) && "string" === typeof input.pattern && (Array.isArray(input.operations) && input.operations.every(elem => "string" === typeof elem)); const _io13 = input => "string" === typeof input.name && (undefined === input.displayName || "string" === typeof input.displayName) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.allowedByDefault || "boolean" === typeof input.allowedByDefault); const _io14 = input => (undefined === input.applicationName || "string" === typeof input.applicationName) && "string" === typeof input.name && (undefined === input.description || "string" === typeof input.description); const _io15 = input => (undefined === input.roles || Array.isArray(input.roles) && input.roles.every(elem => "string" === typeof elem)) && "string" === typeof input.name && (undefined === input.description || "string" === typeof input.description) && (undefined === input.applicationName || "string" === typeof input.applicationName); const _io16 = input => "string" === typeof input.moduleName && ("object" === typeof input.customProps && null !== input.customProps && false === Array.isArray(input.customProps) && _io17(input.customProps)); const _io17 = input => Object.keys(input).every(key => {
|
|
55
55
|
const value = input[key];
|
|
56
56
|
if (undefined === value)
|
|
57
57
|
return true;
|
|
@@ -433,7 +433,7 @@ describe('BootstrapSyncMetadata - type validations', () => {
|
|
|
433
433
|
path: _path + ".methods",
|
|
434
434
|
expected: "(Array<HttpMethod> | undefined)",
|
|
435
435
|
value: input.methods
|
|
436
|
-
})) && input.methods.map((elem, _index28) => "
|
|
436
|
+
})) && input.methods.map((elem, _index28) => "POST" === elem || "DELETE" === elem || "GET" === elem || "HEAD" === elem || "OPTIONS" === elem || "PUT" === elem || "PATCH" === elem || "CONNECT" === elem || "TRACE" === elem || _report(_exceptionable, {
|
|
437
437
|
path: _path + ".methods[" + _index28 + "]",
|
|
438
438
|
expected: "(\"CONNECT\" | \"DELETE\" | \"GET\" | \"HEAD\" | \"OPTIONS\" | \"PATCH\" | \"POST\" | \"PUT\" | \"TRACE\")",
|
|
439
439
|
value: elem
|
|
@@ -565,7 +565,7 @@ describe('BootstrapSyncMetadata - type validations', () => {
|
|
|
565
565
|
if (undefined === value)
|
|
566
566
|
return true;
|
|
567
567
|
return true;
|
|
568
|
-
}); const _io10 = input => "aws" === input.provider && "boolean" === typeof input.requiresSignature; const _io11 = input => (undefined === input.operations || Array.isArray(input.operations) && input.operations.every(elem => "string" === typeof elem)) && (undefined === input.routes || Array.isArray(input.routes) && input.routes.every(elem => "object" === typeof elem && null !== elem && _io12(elem))); const _io12 = input => (undefined === input.methods || Array.isArray(input.methods) && input.methods.every(elem => "
|
|
568
|
+
}); const _io10 = input => "aws" === input.provider && "boolean" === typeof input.requiresSignature; const _io11 = input => (undefined === input.operations || Array.isArray(input.operations) && input.operations.every(elem => "string" === typeof elem)) && (undefined === input.routes || Array.isArray(input.routes) && input.routes.every(elem => "object" === typeof elem && null !== elem && _io12(elem))); const _io12 = input => (undefined === input.methods || Array.isArray(input.methods) && input.methods.every(elem => "POST" === elem || "DELETE" === elem || "GET" === elem || "HEAD" === elem || "OPTIONS" === elem || "PUT" === elem || "PATCH" === elem || "CONNECT" === elem || "TRACE" === elem)) && "string" === typeof input.pattern && (Array.isArray(input.operations) && input.operations.every(elem => "string" === typeof elem)); const _io13 = input => "string" === typeof input.name && (undefined === input.displayName || "string" === typeof input.displayName) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.allowedByDefault || "boolean" === typeof input.allowedByDefault); const _io14 = input => (undefined === input.applicationName || "string" === typeof input.applicationName) && "string" === typeof input.name && (undefined === input.description || "string" === typeof input.description); const _io15 = input => (undefined === input.roles || Array.isArray(input.roles) && input.roles.every(elem => "string" === typeof elem)) && "string" === typeof input.name && (undefined === input.description || "string" === typeof input.description) && (undefined === input.applicationName || "string" === typeof input.applicationName); const _io16 = input => "string" === typeof input.moduleName && ("object" === typeof input.customProps && null !== input.customProps && false === Array.isArray(input.customProps) && _io17(input.customProps)); const _io17 = input => Object.keys(input).every(key => {
|
|
569
569
|
const value = input[key];
|
|
570
570
|
if (undefined === value)
|
|
571
571
|
return true;
|
|
@@ -947,7 +947,7 @@ describe('BootstrapSyncMetadata - type validations', () => {
|
|
|
947
947
|
path: _path + ".methods",
|
|
948
948
|
expected: "(Array<HttpMethod> | undefined)",
|
|
949
949
|
value: input.methods
|
|
950
|
-
})) && input.methods.map((elem, _index28) => "
|
|
950
|
+
})) && input.methods.map((elem, _index28) => "POST" === elem || "DELETE" === elem || "GET" === elem || "HEAD" === elem || "OPTIONS" === elem || "PUT" === elem || "PATCH" === elem || "CONNECT" === elem || "TRACE" === elem || _report(_exceptionable, {
|
|
951
951
|
path: _path + ".methods[" + _index28 + "]",
|
|
952
952
|
expected: "(\"CONNECT\" | \"DELETE\" | \"GET\" | \"HEAD\" | \"OPTIONS\" | \"PATCH\" | \"POST\" | \"PUT\" | \"TRACE\")",
|
|
953
953
|
value: elem
|
|
@@ -1100,7 +1100,7 @@ describe('BootstrapSyncMetadata - type validations', () => {
|
|
|
1100
1100
|
if (undefined === value)
|
|
1101
1101
|
return true;
|
|
1102
1102
|
return true;
|
|
1103
|
-
}); const _io10 = input => "aws" === input.provider && "boolean" === typeof input.requiresSignature; const _io11 = input => (undefined === input.operations || Array.isArray(input.operations) && input.operations.every(elem => "string" === typeof elem)) && (undefined === input.routes || Array.isArray(input.routes) && input.routes.every(elem => "object" === typeof elem && null !== elem && _io12(elem))); const _io12 = input => (undefined === input.methods || Array.isArray(input.methods) && input.methods.every(elem => "
|
|
1103
|
+
}); const _io10 = input => "aws" === input.provider && "boolean" === typeof input.requiresSignature; const _io11 = input => (undefined === input.operations || Array.isArray(input.operations) && input.operations.every(elem => "string" === typeof elem)) && (undefined === input.routes || Array.isArray(input.routes) && input.routes.every(elem => "object" === typeof elem && null !== elem && _io12(elem))); const _io12 = input => (undefined === input.methods || Array.isArray(input.methods) && input.methods.every(elem => "POST" === elem || "DELETE" === elem || "GET" === elem || "HEAD" === elem || "OPTIONS" === elem || "PUT" === elem || "PATCH" === elem || "CONNECT" === elem || "TRACE" === elem)) && "string" === typeof input.pattern && (Array.isArray(input.operations) && input.operations.every(elem => "string" === typeof elem)); const _io13 = input => "string" === typeof input.name && (undefined === input.displayName || "string" === typeof input.displayName) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.allowedByDefault || "boolean" === typeof input.allowedByDefault); const _io14 = input => (undefined === input.applicationName || "string" === typeof input.applicationName) && "string" === typeof input.name && (undefined === input.description || "string" === typeof input.description); const _io15 = input => (undefined === input.roles || Array.isArray(input.roles) && input.roles.every(elem => "string" === typeof elem)) && "string" === typeof input.name && (undefined === input.description || "string" === typeof input.description) && (undefined === input.applicationName || "string" === typeof input.applicationName); const _io16 = input => "string" === typeof input.moduleName && ("object" === typeof input.customProps && null !== input.customProps && false === Array.isArray(input.customProps) && _io17(input.customProps)); const _io17 = input => Object.keys(input).every(key => {
|
|
1104
1104
|
const value = input[key];
|
|
1105
1105
|
if (undefined === value)
|
|
1106
1106
|
return true;
|
|
@@ -1482,7 +1482,7 @@ describe('BootstrapSyncMetadata - type validations', () => {
|
|
|
1482
1482
|
path: _path + ".methods",
|
|
1483
1483
|
expected: "(Array<HttpMethod> | undefined)",
|
|
1484
1484
|
value: input.methods
|
|
1485
|
-
})) && input.methods.map((elem, _index28) => "
|
|
1485
|
+
})) && input.methods.map((elem, _index28) => "POST" === elem || "DELETE" === elem || "GET" === elem || "HEAD" === elem || "OPTIONS" === elem || "PUT" === elem || "PATCH" === elem || "CONNECT" === elem || "TRACE" === elem || _report(_exceptionable, {
|
|
1486
1486
|
path: _path + ".methods[" + _index28 + "]",
|
|
1487
1487
|
expected: "(\"CONNECT\" | \"DELETE\" | \"GET\" | \"HEAD\" | \"OPTIONS\" | \"PATCH\" | \"POST\" | \"PUT\" | \"TRACE\")",
|
|
1488
1488
|
value: elem
|
|
@@ -1635,7 +1635,7 @@ describe('BootstrapSyncMetadata - type validations', () => {
|
|
|
1635
1635
|
if (undefined === value)
|
|
1636
1636
|
return true;
|
|
1637
1637
|
return true;
|
|
1638
|
-
}); const _io10 = input => "aws" === input.provider && "boolean" === typeof input.requiresSignature; const _io11 = input => (undefined === input.operations || Array.isArray(input.operations) && input.operations.every(elem => "string" === typeof elem)) && (undefined === input.routes || Array.isArray(input.routes) && input.routes.every(elem => "object" === typeof elem && null !== elem && _io12(elem))); const _io12 = input => (undefined === input.methods || Array.isArray(input.methods) && input.methods.every(elem => "
|
|
1638
|
+
}); const _io10 = input => "aws" === input.provider && "boolean" === typeof input.requiresSignature; const _io11 = input => (undefined === input.operations || Array.isArray(input.operations) && input.operations.every(elem => "string" === typeof elem)) && (undefined === input.routes || Array.isArray(input.routes) && input.routes.every(elem => "object" === typeof elem && null !== elem && _io12(elem))); const _io12 = input => (undefined === input.methods || Array.isArray(input.methods) && input.methods.every(elem => "POST" === elem || "DELETE" === elem || "GET" === elem || "HEAD" === elem || "OPTIONS" === elem || "PUT" === elem || "PATCH" === elem || "CONNECT" === elem || "TRACE" === elem)) && "string" === typeof input.pattern && (Array.isArray(input.operations) && input.operations.every(elem => "string" === typeof elem)); const _io13 = input => "string" === typeof input.name && (undefined === input.displayName || "string" === typeof input.displayName) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.allowedByDefault || "boolean" === typeof input.allowedByDefault); const _io14 = input => (undefined === input.applicationName || "string" === typeof input.applicationName) && "string" === typeof input.name && (undefined === input.description || "string" === typeof input.description); const _io15 = input => (undefined === input.roles || Array.isArray(input.roles) && input.roles.every(elem => "string" === typeof elem)) && "string" === typeof input.name && (undefined === input.description || "string" === typeof input.description) && (undefined === input.applicationName || "string" === typeof input.applicationName); const _io16 = input => "string" === typeof input.moduleName && ("object" === typeof input.customProps && null !== input.customProps && false === Array.isArray(input.customProps) && _io17(input.customProps)); const _io17 = input => Object.keys(input).every(key => {
|
|
1639
1639
|
const value = input[key];
|
|
1640
1640
|
if (undefined === value)
|
|
1641
1641
|
return true;
|
|
@@ -2017,7 +2017,7 @@ describe('BootstrapSyncMetadata - type validations', () => {
|
|
|
2017
2017
|
path: _path + ".methods",
|
|
2018
2018
|
expected: "(Array<HttpMethod> | undefined)",
|
|
2019
2019
|
value: input.methods
|
|
2020
|
-
})) && input.methods.map((elem, _index28) => "
|
|
2020
|
+
})) && input.methods.map((elem, _index28) => "POST" === elem || "DELETE" === elem || "GET" === elem || "HEAD" === elem || "OPTIONS" === elem || "PUT" === elem || "PATCH" === elem || "CONNECT" === elem || "TRACE" === elem || _report(_exceptionable, {
|
|
2021
2021
|
path: _path + ".methods[" + _index28 + "]",
|
|
2022
2022
|
expected: "(\"CONNECT\" | \"DELETE\" | \"GET\" | \"HEAD\" | \"OPTIONS\" | \"PATCH\" | \"POST\" | \"PUT\" | \"TRACE\")",
|
|
2023
2023
|
value: elem
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-synchronizer.js","sourceRoot":"","sources":["../../../src/bootstrap/entity-synchronizer.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"entity-synchronizer.js","sourceRoot":"","sources":["../../../src/bootstrap/entity-synchronizer.ts"],"names":[],"mappings":";;;AAAA,iCAA+B;AAa/B;;;GAGG;AACU,QAAA,mBAAmB,GAAG,CAAC,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AA,kBAAkB,sBA+B7B;AAEF;;;;;;;;GAQG;AACU,QAAA,sBAAsB,GAAG,IAAA,0BAAkB,GAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BootstrapPlatform } from "./domain/bootstrap-sync-metadata.interface";
|
|
2
1
|
import { BootstrapOptions } from "./bootstrap-platform";
|
|
2
|
+
import { BootstrapPlatform } from "./domain/bootstrap-sync-metadata.interface";
|
|
3
3
|
/**
|
|
4
4
|
* Inspects the filesystem reading all application definitions
|
|
5
5
|
* NOTE: this is a really quick implementation pretty raw.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-bootstrap-applications.d.ts","sourceRoot":"","sources":["../../../src/bootstrap/read-bootstrap-applications.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"read-bootstrap-applications.d.ts","sourceRoot":"","sources":["../../../src/bootstrap/read-bootstrap-applications.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAKL,iBAAiB,EAElB,MAAM,4CAA4C,CAAC;AAYpD;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,GAAI,MAAM,MAAM,EAAE,SAAS,gBAAgB,KAAG,iBAsCrF,CAAA"}
|
|
@@ -39,10 +39,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.readPlatformBootstrapFolder = void 0;
|
|
40
40
|
const __typia_transform__assertGuard = __importStar(require("typia/lib/internal/_assertGuard.js"));
|
|
41
41
|
const __typia_transform__accessExpressionAsString = __importStar(require("typia/lib/internal/_accessExpressionAsString.js"));
|
|
42
|
-
const path_1 = require("path");
|
|
43
|
-
const io_1 = require("../utils/io");
|
|
44
42
|
const pae_core_1 = require("@bluealba/pae-core");
|
|
43
|
+
const path_1 = require("path");
|
|
45
44
|
const typia_1 = __importDefault(require("typia"));
|
|
45
|
+
const io_1 = require("../utils/io");
|
|
46
46
|
// conventions
|
|
47
47
|
const FILE_SHARED_LIBRARIES = 'shared-libraries.json';
|
|
48
48
|
const FILE_FEATURE_FLAGS = 'feature-flags.json';
|
|
@@ -51,6 +51,7 @@ const FILE_OPERATIONS = 'operations.json';
|
|
|
51
51
|
const FILE_MODULES = 'modules.json';
|
|
52
52
|
const FILE_MODULES_CONFIG = 'modules-config.json';
|
|
53
53
|
const FILE_ROLES = 'roles.json';
|
|
54
|
+
const FILE_JOBS = 'jobs.json';
|
|
54
55
|
/**
|
|
55
56
|
* Inspects the filesystem reading all application definitions
|
|
56
57
|
* NOTE: this is a really quick implementation pretty raw.
|
|
@@ -62,7 +63,7 @@ const readPlatformBootstrapFolder = (path, options) => {
|
|
|
62
63
|
const { readdirSync } = require("fs");
|
|
63
64
|
// @ts-ignore
|
|
64
65
|
return readdirSync(path, { withFileTypes: true }).reduce((acc, item) => {
|
|
65
|
-
var _a, _b, _c;
|
|
66
|
+
var _a, _b, _c, _d, _e;
|
|
66
67
|
if (item.name === FILE_SHARED_LIBRARIES) {
|
|
67
68
|
try {
|
|
68
69
|
acc.sharedLibraries = (() => { const _io0 = input => "string" === typeof input.name && "string" === typeof input.url && (undefined === input.description || "string" === typeof input.description); const _ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
@@ -223,6 +224,9 @@ const readPlatformBootstrapFolder = (path, options) => {
|
|
|
223
224
|
acc.featureFlags = [...((_c = acc.featureFlags) !== null && _c !== void 0 ? _c : []), ...app.featureFlags];
|
|
224
225
|
}
|
|
225
226
|
}
|
|
227
|
+
if ((_d = app.featureFlags) === null || _d === void 0 ? void 0 : _d.length) {
|
|
228
|
+
acc.featureFlags = [...((_e = acc.featureFlags) !== null && _e !== void 0 ? _e : []), ...app.featureFlags];
|
|
229
|
+
}
|
|
226
230
|
}
|
|
227
231
|
return acc;
|
|
228
232
|
}, { applications: { [pae_core_1.GLOBAL_APPLICATION_NAME]: globalApplication } });
|
|
@@ -234,7 +238,8 @@ const createGlobalApplication = () => ({
|
|
|
234
238
|
modules: [],
|
|
235
239
|
operations: [],
|
|
236
240
|
roles: [],
|
|
237
|
-
modulesConfig: []
|
|
241
|
+
modulesConfig: [],
|
|
242
|
+
jobs: []
|
|
238
243
|
});
|
|
239
244
|
const readApplicationDirectory = (path, globalApplication) => {
|
|
240
245
|
const { existsSync } = require("fs");
|
|
@@ -277,7 +282,7 @@ const readApplicationDirectory = (path, globalApplication) => {
|
|
|
277
282
|
}
|
|
278
283
|
return input;
|
|
279
284
|
}; })();
|
|
280
|
-
const application = existsSync((0, path_1.join)(path, FILE_APPLICATION)) ? Object.assign(Object.assign({}, assert((0, io_1.readJSONFile)((0, path_1.join)(path, FILE_APPLICATION)))), { modules: [], operations: [], roles: [], modulesConfig: [] }) : globalApplication;
|
|
285
|
+
const application = existsSync((0, path_1.join)(path, FILE_APPLICATION)) ? Object.assign(Object.assign({}, assert((0, io_1.readJSONFile)((0, path_1.join)(path, FILE_APPLICATION)))), { modules: [], operations: [], roles: [], modulesConfig: [], jobs: [] }) : globalApplication;
|
|
281
286
|
// read modules setting the application (if app is not global)
|
|
282
287
|
if (existsSync((0, path_1.join)(path, FILE_MODULES))) {
|
|
283
288
|
const data = readApplicationItems(path, FILE_MODULES, application, 'application');
|
|
@@ -287,7 +292,7 @@ const readApplicationDirectory = (path, globalApplication) => {
|
|
|
287
292
|
if (undefined === value)
|
|
288
293
|
return true;
|
|
289
294
|
return true;
|
|
290
|
-
}); const _io5 = input => "aws" === input.provider && "boolean" === typeof input.requiresSignature; const _io6 = input => (undefined === input.operations || Array.isArray(input.operations) && input.operations.every(elem => "string" === typeof elem)) && (undefined === input.routes || Array.isArray(input.routes) && input.routes.every(elem => "object" === typeof elem && null !== elem && _io7(elem))); const _io7 = input => (undefined === input.methods || Array.isArray(input.methods) && input.methods.every(elem => "
|
|
295
|
+
}); const _io5 = input => "aws" === input.provider && "boolean" === typeof input.requiresSignature; const _io6 = input => (undefined === input.operations || Array.isArray(input.operations) && input.operations.every(elem => "string" === typeof elem)) && (undefined === input.routes || Array.isArray(input.routes) && input.routes.every(elem => "object" === typeof elem && null !== elem && _io7(elem))); const _io7 = input => (undefined === input.methods || Array.isArray(input.methods) && input.methods.every(elem => "POST" === elem || "DELETE" === elem || "GET" === elem || "HEAD" === elem || "OPTIONS" === elem || "PUT" === elem || "PATCH" === elem || "CONNECT" === elem || "TRACE" === elem)) && "string" === typeof input.pattern && (Array.isArray(input.operations) && input.operations.every(elem => "string" === typeof elem)); const _ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
291
296
|
method: "typia.assert",
|
|
292
297
|
path: _path + ".name",
|
|
293
298
|
expected: "string",
|
|
@@ -522,7 +527,7 @@ const readApplicationDirectory = (path, globalApplication) => {
|
|
|
522
527
|
path: _path + ".methods",
|
|
523
528
|
expected: "(Array<HttpMethod> | undefined)",
|
|
524
529
|
value: input.methods
|
|
525
|
-
}, _errorFactory)) && input.methods.every((elem, _index11) => "
|
|
530
|
+
}, _errorFactory)) && input.methods.every((elem, _index11) => "POST" === elem || "DELETE" === elem || "GET" === elem || "HEAD" === elem || "OPTIONS" === elem || "PUT" === elem || "PATCH" === elem || "CONNECT" === elem || "TRACE" === elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
526
531
|
method: "typia.assert",
|
|
527
532
|
path: _path + ".methods[" + _index11 + "]",
|
|
528
533
|
expected: "(\"CONNECT\" | \"DELETE\" | \"GET\" | \"HEAD\" | \"OPTIONS\" | \"PATCH\" | \"POST\" | \"PUT\" | \"TRACE\")",
|
|
@@ -744,6 +749,86 @@ const readApplicationDirectory = (path, globalApplication) => {
|
|
|
744
749
|
throw new Error(`Error reading ${(0, path_1.join)(path, FILE_ROLES)} file: ${e}`);
|
|
745
750
|
}
|
|
746
751
|
}
|
|
752
|
+
if (existsSync((0, path_1.join)(path, FILE_JOBS))) {
|
|
753
|
+
const data = (0, io_1.readJSONFile)((0, path_1.join)(path, FILE_JOBS));
|
|
754
|
+
try {
|
|
755
|
+
application.jobs.push(...(() => { const _io0 = input => "string" === typeof input.name && (undefined === input.description || "string" === typeof input.description) && (undefined === input.enabled || "boolean" === typeof input.enabled) && "string" === typeof input.pattern && "string" === typeof input.taskType && ("object" === typeof input.taskConfig && null !== input.taskConfig && false === Array.isArray(input.taskConfig) && _io1(input.taskConfig)); const _io1 = input => Object.keys(input).every(key => {
|
|
756
|
+
const value = input[key];
|
|
757
|
+
if (undefined === value)
|
|
758
|
+
return true;
|
|
759
|
+
return true;
|
|
760
|
+
}); const _ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
761
|
+
method: "typia.assert",
|
|
762
|
+
path: _path + ".name",
|
|
763
|
+
expected: "string",
|
|
764
|
+
value: input.name
|
|
765
|
+
}, _errorFactory)) && (undefined === input.description || "string" === typeof input.description || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
766
|
+
method: "typia.assert",
|
|
767
|
+
path: _path + ".description",
|
|
768
|
+
expected: "(string | undefined)",
|
|
769
|
+
value: input.description
|
|
770
|
+
}, _errorFactory)) && (undefined === input.enabled || "boolean" === typeof input.enabled || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
771
|
+
method: "typia.assert",
|
|
772
|
+
path: _path + ".enabled",
|
|
773
|
+
expected: "(boolean | undefined)",
|
|
774
|
+
value: input.enabled
|
|
775
|
+
}, _errorFactory)) && ("string" === typeof input.pattern || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
776
|
+
method: "typia.assert",
|
|
777
|
+
path: _path + ".pattern",
|
|
778
|
+
expected: "string",
|
|
779
|
+
value: input.pattern
|
|
780
|
+
}, _errorFactory)) && ("string" === typeof input.taskType || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
781
|
+
method: "typia.assert",
|
|
782
|
+
path: _path + ".taskType",
|
|
783
|
+
expected: "string",
|
|
784
|
+
value: input.taskType
|
|
785
|
+
}, _errorFactory)) && (("object" === typeof input.taskConfig && null !== input.taskConfig && false === Array.isArray(input.taskConfig) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
786
|
+
method: "typia.assert",
|
|
787
|
+
path: _path + ".taskConfig",
|
|
788
|
+
expected: "Record<string, any>",
|
|
789
|
+
value: input.taskConfig
|
|
790
|
+
}, _errorFactory)) && _ao1(input.taskConfig, _path + ".taskConfig", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
791
|
+
method: "typia.assert",
|
|
792
|
+
path: _path + ".taskConfig",
|
|
793
|
+
expected: "Record<string, any>",
|
|
794
|
+
value: input.taskConfig
|
|
795
|
+
}, _errorFactory)); const _ao1 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
796
|
+
const value = input[key];
|
|
797
|
+
if (undefined === value)
|
|
798
|
+
return true;
|
|
799
|
+
return true;
|
|
800
|
+
}); const __is = input => Array.isArray(input) && input.every(elem => "object" === typeof elem && null !== elem && _io0(elem)); let _errorFactory; return (input, errorFactory) => {
|
|
801
|
+
if (false === __is(input)) {
|
|
802
|
+
_errorFactory = errorFactory;
|
|
803
|
+
((input, _path, _exceptionable = true) => (Array.isArray(input) || __typia_transform__assertGuard._assertGuard(true, {
|
|
804
|
+
method: "typia.assert",
|
|
805
|
+
path: _path + "",
|
|
806
|
+
expected: "Array<BootstrapJob>",
|
|
807
|
+
value: input
|
|
808
|
+
}, _errorFactory)) && input.every((elem, _index2) => ("object" === typeof elem && null !== elem || __typia_transform__assertGuard._assertGuard(true, {
|
|
809
|
+
method: "typia.assert",
|
|
810
|
+
path: _path + "[" + _index2 + "]",
|
|
811
|
+
expected: "BootstrapJob",
|
|
812
|
+
value: elem
|
|
813
|
+
}, _errorFactory)) && _ao0(elem, _path + "[" + _index2 + "]", true) || __typia_transform__assertGuard._assertGuard(true, {
|
|
814
|
+
method: "typia.assert",
|
|
815
|
+
path: _path + "[" + _index2 + "]",
|
|
816
|
+
expected: "BootstrapJob",
|
|
817
|
+
value: elem
|
|
818
|
+
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(true, {
|
|
819
|
+
method: "typia.assert",
|
|
820
|
+
path: _path + "",
|
|
821
|
+
expected: "Array<BootstrapJob>",
|
|
822
|
+
value: input
|
|
823
|
+
}, _errorFactory))(input, "$input", true);
|
|
824
|
+
}
|
|
825
|
+
return input;
|
|
826
|
+
}; })()(data));
|
|
827
|
+
}
|
|
828
|
+
catch (e) {
|
|
829
|
+
throw new Error(`Error reading ${(0, path_1.join)(path, FILE_JOBS)} file: ${e}`);
|
|
830
|
+
}
|
|
831
|
+
}
|
|
747
832
|
if (existsSync((0, path_1.join)(path, FILE_FEATURE_FLAGS))) {
|
|
748
833
|
try {
|
|
749
834
|
const rawFlags = (() => { const _io0 = input => "string" === typeof input.name && (undefined === input.description || "string" === typeof input.description) && (undefined === input.enabled || "boolean" === typeof input.enabled) && (undefined === input.applicationName || "string" === typeof input.applicationName) && (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, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-bootstrap-applications.js","sourceRoot":"","sources":["../../../src/bootstrap/read-bootstrap-applications.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA4B;
|
|
1
|
+
{"version":3,"file":"read-bootstrap-applications.js","sourceRoot":"","sources":["../../../src/bootstrap/read-bootstrap-applications.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAK4B;AAC5B,+B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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"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './bootstrap/domain';
|
|
2
|
-
export * from './bootstrap/run-bootstrap-sync.service';
|
|
3
2
|
export * from './bootstrap/bootstrap-platform';
|
|
3
|
+
export * from './bootstrap/entity-synchronizer';
|
|
4
|
+
export { default as compareListsBy } from './utils/compare-lists-by';
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,iCAAiC,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/src/index.js
CHANGED
|
@@ -13,8 +13,14 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
13
13
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
+
};
|
|
16
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.compareListsBy = void 0;
|
|
17
21
|
__exportStar(require("./bootstrap/domain"), exports);
|
|
18
|
-
__exportStar(require("./bootstrap/run-bootstrap-sync.service"), exports);
|
|
19
22
|
__exportStar(require("./bootstrap/bootstrap-platform"), exports);
|
|
23
|
+
__exportStar(require("./bootstrap/entity-synchronizer"), exports);
|
|
24
|
+
var compare_lists_by_1 = require("./utils/compare-lists-by");
|
|
25
|
+
Object.defineProperty(exports, "compareListsBy", { enumerable: true, get: function () { return __importDefault(compare_lists_by_1).default; } });
|
|
20
26
|
//# 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,iEAA8C;AAC9C,kEAAgD;AAChD,6DAAqE;AAA5D,mIAAA,OAAO,OAAkB"}
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PAE } from "@bluealba/pae-core";
|
|
2
|
-
import { BootstrapPlatform } from "./domain/bootstrap-sync-metadata.interface";
|
|
3
|
-
/**
|
|
4
|
-
* Temporary behavior to fix modules after running the migration that adds the created_by & updated_by fields.
|
|
5
|
-
* Since they are created with "system" value, but the owner is the "scopedTo" of each bootstrap (env var)
|
|
6
|
-
* we must re-create them.
|
|
7
|
-
*/
|
|
8
|
-
declare const fixCreatedBy: (platform: BootstrapPlatform, pae: PAE, scopedTo: string) => Promise<void[] | undefined>;
|
|
9
|
-
export default fixCreatedBy;
|
|
10
|
-
//# sourceMappingURL=fix-created-by.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fix-created-by.d.ts","sourceRoot":"","sources":["../../../src/bootstrap/fix-created-by.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAEzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAE/E;;;;GAIG;AACH,QAAA,MAAM,YAAY,GAAU,UAAU,iBAAiB,EAAE,KAAK,GAAG,EAAE,UAAU,MAAM,gCAwBlF,CAAA;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -1,36 +0,0 @@
|
|
|
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
|
-
/**
|
|
13
|
-
* Temporary behavior to fix modules after running the migration that adds the created_by & updated_by fields.
|
|
14
|
-
* Since they are created with "system" value, but the owner is the "scopedTo" of each bootstrap (env var)
|
|
15
|
-
* we must re-create them.
|
|
16
|
-
*/
|
|
17
|
-
const fixCreatedBy = (platform, pae, scopedTo) => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
-
const modules = Object.values(platform.applications).flatMap(a => a.modules);
|
|
19
|
-
const serverModules = yield pae.getAllModules();
|
|
20
|
-
// those in the server but with a different "createdBy". We will "fix" the
|
|
21
|
-
const modulesToFix = modules.filter(module => serverModules.some(m => m.name === module.name
|
|
22
|
-
// it was automatically generated by the migration that added this column
|
|
23
|
-
&& m.createdBy === 'system'));
|
|
24
|
-
if (modulesToFix.length === 0) {
|
|
25
|
-
console.log(`>>> [FIXING] no modules to fix`);
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
return Promise.all(modulesToFix.map((m) => __awaiter(void 0, void 0, void 0, function* () {
|
|
29
|
-
console.log(`>>> [FIXING] module ${m.name} author by recreating it author [${scopedTo}]`);
|
|
30
|
-
// we delete and recreate it. This will pick up our user as author (scopedTo)
|
|
31
|
-
yield pae.deleteModule(m.name);
|
|
32
|
-
yield pae.createModule(m);
|
|
33
|
-
})));
|
|
34
|
-
});
|
|
35
|
-
exports.default = fixCreatedBy;
|
|
36
|
-
//# sourceMappingURL=fix-created-by.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fix-created-by.js","sourceRoot":"","sources":["../../../src/bootstrap/fix-created-by.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA;;;;GAIG;AACH,MAAM,YAAY,GAAG,CAAO,QAA2B,EAAE,GAAQ,EAAE,QAAgB,EAAE,EAAE;IACrF,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;IAC5E,MAAM,aAAa,GAAG,MAAM,GAAG,CAAC,aAAa,EAAE,CAAA;IAE/C,0EAA0E;IAC1E,MAAM,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAC3C,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CACrB,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI;QACtB,yEAAyE;WACtE,CAAC,CAAC,SAAS,KAAK,QAAQ,CAC5B,CACF,CAAA;IAED,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAA;QAC7C,OAAO;IACT,CAAC;IAED,OAAO,OAAO,CAAC,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