@opencrvs/toolkit 2.1.0-rc.edf2492 → 2.1.0-rc.f5f3da9
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 +1 -0
- package/dist/application-config/index.js +2 -1
- package/dist/cli.js +217 -77
- package/dist/commons/api/router.d.ts +3293 -3310
- package/dist/commons/application-config/index.d.ts +6 -6
- package/dist/commons/conditionals/conditionals.d.ts +259 -2102
- package/dist/commons/events/ActionConfig.d.ts +105 -105
- package/dist/commons/events/ActionDocument.d.ts +119 -119
- package/dist/commons/events/ActionInput.d.ts +0 -6
- package/dist/commons/events/ActionType.d.ts +62 -62
- package/dist/commons/events/AdvancedSearchConfig.d.ts +507 -507
- package/dist/commons/events/AuditLog.d.ts +43 -43
- package/dist/commons/events/CompositeFieldValue.d.ts +4 -4
- package/dist/commons/events/Conditional.d.ts +3 -3
- package/dist/commons/events/CountryConfigQueryInput.d.ts +590 -590
- package/dist/commons/events/Draft.d.ts +37 -37
- package/dist/commons/events/DynamicFieldValue.d.ts +9 -9
- package/dist/commons/events/EventConfig.d.ts +5 -5
- package/dist/commons/events/EventDocument.d.ts +48 -48
- package/dist/commons/events/EventIndex.d.ts +62 -62
- package/dist/commons/events/EventMetadata.d.ts +40 -40
- package/dist/commons/events/FieldConfig.d.ts +336 -336
- package/dist/commons/events/FieldType.d.ts +51 -51
- package/dist/commons/events/FieldTypeMapping.d.ts +100 -100
- package/dist/commons/events/FieldValue.d.ts +12 -12
- package/dist/commons/events/Flag.d.ts +15 -15
- package/dist/commons/events/TemplateConfig.d.ts +1 -1
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +40 -40
- package/dist/commons/events/WorkqueueConfig.d.ts +826 -826
- package/dist/commons/events/deduplication.d.ts +1 -1
- package/dist/commons/events/event.d.ts +2 -2
- package/dist/commons/events/field.d.ts +78 -895
- package/dist/commons/events/locations.d.ts +96 -6
- package/dist/commons/events/mocks.test.utils.d.ts +18 -4
- package/dist/commons/events/scopes.d.ts +4 -4
- package/dist/commons/events/state/index.d.ts +17 -17
- package/dist/commons/events/state/utils.d.ts +7 -7
- package/dist/commons/events/test.utils.d.ts +40 -43
- package/dist/commons/events/utils.d.ts +114 -114
- package/dist/commons/notification/UserNotifications.d.ts +10 -10
- package/dist/environment/derived-variables.d.ts +119 -119
- package/dist/environment/derived-variables.d.ts.map +1 -1
- package/dist/environment/index.d.ts +1 -0
- package/dist/environment/index.d.ts.map +1 -1
- package/dist/environment/index.js +10 -0
- package/dist/environment/logger.d.ts.map +1 -1
- package/dist/environment/paths.d.ts +13 -0
- package/dist/environment/paths.d.ts.map +1 -0
- package/dist/environment/paths.js +94 -0
- package/dist/environment/questions.d.ts +75 -74
- package/dist/environment/questions.d.ts.map +1 -1
- package/dist/environment/setup-environment.js +10 -15
- package/dist/environment/templates.d.ts.map +1 -1
- package/dist/environment/templates.js +2 -1
- package/dist/environment/update-workflows.d.ts.map +1 -1
- package/dist/environment/update-workflows.js +4 -3
- package/dist/environment/upgrade.d.ts +2 -0
- package/dist/environment/upgrade.d.ts.map +1 -0
- package/dist/environment/upgrade.js +100 -0
- package/dist/environment/users.js +11 -13
- package/dist/environment/utils.d.ts +1 -1
- package/dist/events/deduplication.d.ts +1 -1
- package/dist/events/index.js +62 -58
- package/dist/migrations/v2.0/migrate-application-config-url.js +4 -3
- package/dist/notification/index.js +48 -57
- package/dist/scopes/index.d.ts +146 -146
- package/opencrvs-toolkit-2.1.0-rc.f5f3da9.tgz +0 -0
- package/package.json +3 -4
- package/tsconfig.tsbuildinfo +1 -1
- package/opencrvs-toolkit-2.1.0-rc.edf2492.tgz +0 -0
|
@@ -1,122 +1,122 @@
|
|
|
1
1
|
export declare const derivedVariables: readonly [{
|
|
2
|
-
readonly name:
|
|
3
|
-
readonly valueLabel:
|
|
4
|
-
readonly valueType:
|
|
5
|
-
readonly type:
|
|
6
|
-
readonly scope:
|
|
7
|
-
}, {
|
|
8
|
-
readonly name:
|
|
9
|
-
readonly valueLabel:
|
|
10
|
-
readonly valueType:
|
|
11
|
-
readonly type:
|
|
12
|
-
readonly scope:
|
|
13
|
-
}, {
|
|
14
|
-
readonly name:
|
|
15
|
-
readonly valueLabel:
|
|
16
|
-
readonly valueType:
|
|
17
|
-
readonly type:
|
|
18
|
-
readonly scope:
|
|
19
|
-
}, {
|
|
20
|
-
readonly name:
|
|
21
|
-
readonly valueLabel:
|
|
22
|
-
readonly valueType:
|
|
23
|
-
readonly type:
|
|
24
|
-
readonly scope:
|
|
25
|
-
}, {
|
|
26
|
-
readonly name:
|
|
27
|
-
readonly valueLabel:
|
|
28
|
-
readonly valueType:
|
|
29
|
-
readonly type:
|
|
30
|
-
readonly scope:
|
|
31
|
-
}, {
|
|
32
|
-
readonly name:
|
|
33
|
-
readonly valueLabel:
|
|
34
|
-
readonly valueType:
|
|
35
|
-
readonly type:
|
|
36
|
-
readonly scope:
|
|
37
|
-
}, {
|
|
38
|
-
readonly name:
|
|
39
|
-
readonly valueLabel:
|
|
40
|
-
readonly valueType:
|
|
41
|
-
readonly type:
|
|
42
|
-
readonly scope:
|
|
43
|
-
}, {
|
|
44
|
-
readonly name:
|
|
45
|
-
readonly valueLabel:
|
|
46
|
-
readonly valueType:
|
|
47
|
-
readonly type:
|
|
48
|
-
readonly scope:
|
|
49
|
-
}, {
|
|
50
|
-
readonly name:
|
|
51
|
-
readonly valueLabel:
|
|
52
|
-
readonly valueType:
|
|
53
|
-
readonly type:
|
|
54
|
-
readonly scope:
|
|
55
|
-
}, {
|
|
56
|
-
readonly name:
|
|
57
|
-
readonly valueLabel:
|
|
58
|
-
readonly valueType:
|
|
59
|
-
readonly type:
|
|
60
|
-
readonly scope:
|
|
61
|
-
}, {
|
|
62
|
-
readonly name:
|
|
63
|
-
readonly valueLabel:
|
|
64
|
-
readonly valueType:
|
|
65
|
-
readonly type:
|
|
66
|
-
readonly scope:
|
|
67
|
-
}, {
|
|
68
|
-
readonly name:
|
|
69
|
-
readonly valueLabel:
|
|
70
|
-
readonly valueType:
|
|
71
|
-
readonly type:
|
|
72
|
-
readonly scope:
|
|
73
|
-
}, {
|
|
74
|
-
readonly name:
|
|
75
|
-
readonly valueLabel:
|
|
76
|
-
readonly valueType:
|
|
77
|
-
readonly type:
|
|
78
|
-
readonly scope:
|
|
79
|
-
}, {
|
|
80
|
-
readonly name:
|
|
81
|
-
readonly valueLabel:
|
|
82
|
-
readonly valueType:
|
|
83
|
-
readonly type:
|
|
84
|
-
readonly scope:
|
|
85
|
-
}, {
|
|
86
|
-
readonly name:
|
|
87
|
-
readonly valueLabel:
|
|
88
|
-
readonly valueType:
|
|
89
|
-
readonly type:
|
|
90
|
-
readonly scope:
|
|
91
|
-
}, {
|
|
92
|
-
readonly name:
|
|
93
|
-
readonly valueLabel:
|
|
94
|
-
readonly valueType:
|
|
95
|
-
readonly type:
|
|
96
|
-
readonly scope:
|
|
97
|
-
}, {
|
|
98
|
-
readonly name:
|
|
99
|
-
readonly valueLabel:
|
|
100
|
-
readonly valueType:
|
|
101
|
-
readonly type:
|
|
102
|
-
readonly scope:
|
|
103
|
-
}, {
|
|
104
|
-
readonly name:
|
|
105
|
-
readonly valueLabel:
|
|
106
|
-
readonly valueType:
|
|
107
|
-
readonly type:
|
|
108
|
-
readonly scope:
|
|
109
|
-
}, {
|
|
110
|
-
readonly name:
|
|
111
|
-
readonly valueLabel:
|
|
112
|
-
readonly valueType:
|
|
113
|
-
readonly type:
|
|
114
|
-
readonly scope:
|
|
115
|
-
}, {
|
|
116
|
-
readonly name:
|
|
117
|
-
readonly valueLabel:
|
|
118
|
-
readonly valueType:
|
|
119
|
-
readonly type:
|
|
120
|
-
readonly scope:
|
|
2
|
+
readonly name: 'ACTIVATE_USERS';
|
|
3
|
+
readonly valueLabel: 'ACTIVATE_USERS';
|
|
4
|
+
readonly valueType: 'VARIABLE';
|
|
5
|
+
readonly type: 'disabled';
|
|
6
|
+
readonly scope: 'ENVIRONMENT';
|
|
7
|
+
}, {
|
|
8
|
+
readonly name: 'COUNTRY_CONFIG_HOST';
|
|
9
|
+
readonly valueLabel: 'COUNTRY_CONFIG_HOST';
|
|
10
|
+
readonly valueType: 'VARIABLE';
|
|
11
|
+
readonly type: 'disabled';
|
|
12
|
+
readonly scope: 'ENVIRONMENT';
|
|
13
|
+
}, {
|
|
14
|
+
readonly name: 'GATEWAY_HOST';
|
|
15
|
+
readonly valueLabel: 'GATEWAY_HOST';
|
|
16
|
+
readonly valueType: 'VARIABLE';
|
|
17
|
+
readonly type: 'disabled';
|
|
18
|
+
readonly scope: 'ENVIRONMENT';
|
|
19
|
+
}, {
|
|
20
|
+
readonly name: 'CONTENT_SECURITY_POLICY_WILDCARD';
|
|
21
|
+
readonly valueLabel: 'CONTENT_SECURITY_POLICY_WILDCARD';
|
|
22
|
+
readonly valueType: 'VARIABLE';
|
|
23
|
+
readonly type: 'disabled';
|
|
24
|
+
readonly scope: 'ENVIRONMENT';
|
|
25
|
+
}, {
|
|
26
|
+
readonly name: 'CLIENT_APP_URL';
|
|
27
|
+
readonly valueLabel: 'CLIENT_APP_URL';
|
|
28
|
+
readonly valueType: 'VARIABLE';
|
|
29
|
+
readonly type: 'disabled';
|
|
30
|
+
readonly scope: 'ENVIRONMENT';
|
|
31
|
+
}, {
|
|
32
|
+
readonly name: 'LOGIN_URL';
|
|
33
|
+
readonly valueLabel: 'LOGIN_URL';
|
|
34
|
+
readonly valueType: 'VARIABLE';
|
|
35
|
+
readonly type: 'disabled';
|
|
36
|
+
readonly scope: 'ENVIRONMENT';
|
|
37
|
+
}, {
|
|
38
|
+
readonly name: 'ELASTICSEARCH_SUPERUSER_PASSWORD';
|
|
39
|
+
readonly valueLabel: 'ELASTICSEARCH_SUPERUSER_PASSWORD';
|
|
40
|
+
readonly valueType: 'SECRET';
|
|
41
|
+
readonly type: 'disabled';
|
|
42
|
+
readonly scope: 'ENVIRONMENT';
|
|
43
|
+
}, {
|
|
44
|
+
readonly name: 'KIBANA_SYSTEM_PASSWORD';
|
|
45
|
+
readonly valueLabel: 'KIBANA_SYSTEM_PASSWORD';
|
|
46
|
+
readonly valueType: 'SECRET';
|
|
47
|
+
readonly type: 'disabled';
|
|
48
|
+
readonly scope: 'ENVIRONMENT';
|
|
49
|
+
}, {
|
|
50
|
+
readonly name: 'MINIO_ROOT_USER';
|
|
51
|
+
readonly valueLabel: 'MINIO_ROOT_USER';
|
|
52
|
+
readonly valueType: 'SECRET';
|
|
53
|
+
readonly type: 'disabled';
|
|
54
|
+
readonly scope: 'ENVIRONMENT';
|
|
55
|
+
}, {
|
|
56
|
+
readonly name: 'MINIO_ROOT_PASSWORD';
|
|
57
|
+
readonly valueLabel: 'MINIO_ROOT_PASSWORD';
|
|
58
|
+
readonly valueType: 'SECRET';
|
|
59
|
+
readonly type: 'disabled';
|
|
60
|
+
readonly scope: 'ENVIRONMENT';
|
|
61
|
+
}, {
|
|
62
|
+
readonly name: 'POSTGRES_USER';
|
|
63
|
+
readonly valueLabel: 'POSTGRES_USER';
|
|
64
|
+
readonly valueType: 'SECRET';
|
|
65
|
+
readonly type: 'disabled';
|
|
66
|
+
readonly scope: 'ENVIRONMENT';
|
|
67
|
+
}, {
|
|
68
|
+
readonly name: 'POSTGRES_PASSWORD';
|
|
69
|
+
readonly valueLabel: 'POSTGRES_PASSWORD';
|
|
70
|
+
readonly valueType: 'SECRET';
|
|
71
|
+
readonly type: 'disabled';
|
|
72
|
+
readonly scope: 'ENVIRONMENT';
|
|
73
|
+
}, {
|
|
74
|
+
readonly name: 'SUPER_USER_PASSWORD';
|
|
75
|
+
readonly valueLabel: 'SUPER_USER_PASSWORD';
|
|
76
|
+
readonly valueType: 'SECRET';
|
|
77
|
+
readonly type: 'disabled';
|
|
78
|
+
readonly scope: 'ENVIRONMENT';
|
|
79
|
+
}, {
|
|
80
|
+
readonly name: 'ENCRYPTION_KEY';
|
|
81
|
+
readonly valueLabel: 'ENCRYPTION_KEY';
|
|
82
|
+
readonly valueType: 'SECRET';
|
|
83
|
+
readonly type: 'disabled';
|
|
84
|
+
readonly scope: 'ENVIRONMENT';
|
|
85
|
+
}, {
|
|
86
|
+
readonly name: 'GH_ENCRYPTION_PASSWORD';
|
|
87
|
+
readonly valueLabel: 'GH_ENCRYPTION_PASSWORD';
|
|
88
|
+
readonly valueType: 'SECRET';
|
|
89
|
+
readonly type: 'disabled';
|
|
90
|
+
readonly scope: 'REPOSITORY';
|
|
91
|
+
}, {
|
|
92
|
+
readonly name: 'BACKUP_ENCRYPTION_PASSPHRASE';
|
|
93
|
+
readonly valueLabel: 'BACKUP_ENCRYPTION_PASSPHRASE';
|
|
94
|
+
readonly valueType: 'SECRET';
|
|
95
|
+
readonly type: 'disabled';
|
|
96
|
+
readonly scope: 'ENVIRONMENT';
|
|
97
|
+
}, {
|
|
98
|
+
readonly name: 'BACKUP_HOST_PRIVATE_KEY';
|
|
99
|
+
readonly valueLabel: 'BACKUP_HOST_PRIVATE_KEY';
|
|
100
|
+
readonly valueType: 'SECRET';
|
|
101
|
+
readonly type: 'disabled';
|
|
102
|
+
readonly scope: 'ENVIRONMENT';
|
|
103
|
+
}, {
|
|
104
|
+
readonly name: 'BACKUP_HOST_PUBLIC_KEY';
|
|
105
|
+
readonly valueLabel: 'BACKUP_HOST_PUBLIC_KEY';
|
|
106
|
+
readonly valueType: 'SECRET';
|
|
107
|
+
readonly type: 'disabled';
|
|
108
|
+
readonly scope: 'ENVIRONMENT';
|
|
109
|
+
}, {
|
|
110
|
+
readonly name: 'RESTORE_ENVIRONMENT_NAME';
|
|
111
|
+
readonly valueLabel: 'RESTORE_ENVIRONMENT_NAME';
|
|
112
|
+
readonly valueType: 'VARIABLE';
|
|
113
|
+
readonly type: 'disabled';
|
|
114
|
+
readonly scope: 'ENVIRONMENT';
|
|
115
|
+
}, {
|
|
116
|
+
readonly name: 'NOTIFICATION_TRANSPORT';
|
|
117
|
+
readonly valueLabel: 'NOTIFICATION_TRANSPORT';
|
|
118
|
+
readonly valueType: 'VARIABLE';
|
|
119
|
+
readonly type: 'disabled';
|
|
120
|
+
readonly scope: 'ENVIRONMENT';
|
|
121
121
|
}];
|
|
122
122
|
//# sourceMappingURL=derived-variables.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derived-variables.d.ts","sourceRoot":"","sources":["../../src/environment/derived-variables.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"derived-variables.d.ts","sourceRoot":"","sources":["../../src/environment/derived-variables.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare function runEnvironmentInit(): Promise<void>;
|
|
2
|
+
export declare function runEnvironmentUpgrade(): Promise<void>;
|
|
2
3
|
export declare function runEnvironmentUpdateWorkflows(): Promise<void>;
|
|
3
4
|
export declare function runEnvironmentUsers(): Promise<void>;
|
|
4
5
|
export declare function runEnvironmentSwarmToK8s(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/environment/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/environment/index.ts"],"names":[],"mappings":"AAyCA,wBAAsB,kBAAkB,kBAIvC;AAED,wBAAsB,qBAAqB,kBAI1C;AAED,wBAAsB,6BAA6B,kBAIlD;AAED,wBAAsB,mBAAmB,kBAIxC;AAED,wBAAsB,wBAAwB,kBAG7C"}
|
|
@@ -20,11 +20,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.runEnvironmentInit = runEnvironmentInit;
|
|
23
|
+
exports.runEnvironmentUpgrade = runEnvironmentUpgrade;
|
|
23
24
|
exports.runEnvironmentUpdateWorkflows = runEnvironmentUpdateWorkflows;
|
|
24
25
|
exports.runEnvironmentUsers = runEnvironmentUsers;
|
|
25
26
|
exports.runEnvironmentSwarmToK8s = runEnvironmentSwarmToK8s;
|
|
26
27
|
const fs_1 = require("fs");
|
|
27
28
|
const path_1 = require("path");
|
|
29
|
+
const paths_1 = require("./paths");
|
|
28
30
|
const REQUIRED_REPOSITORY_DIRECTORIES = [
|
|
29
31
|
'.github/workflows',
|
|
30
32
|
'environments',
|
|
@@ -46,9 +48,17 @@ function validateRepositoryStructure(repositoryRoot = process.cwd()) {
|
|
|
46
48
|
function runEnvironmentInit() {
|
|
47
49
|
return __awaiter(this, void 0, void 0, function* () {
|
|
48
50
|
validateRepositoryStructure();
|
|
51
|
+
(0, paths_1.assertNoOldInventoryLayout)();
|
|
49
52
|
yield import('./setup-environment.js');
|
|
50
53
|
});
|
|
51
54
|
}
|
|
55
|
+
function runEnvironmentUpgrade() {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
validateRepositoryStructure();
|
|
58
|
+
const { upgradeEnvironmentLayout } = yield import('./upgrade.js');
|
|
59
|
+
yield upgradeEnvironmentLayout();
|
|
60
|
+
});
|
|
61
|
+
}
|
|
52
62
|
function runEnvironmentUpdateWorkflows() {
|
|
53
63
|
return __awaiter(this, void 0, void 0, function* () {
|
|
54
64
|
validateRepositoryStructure();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/environment/logger.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,GAAG,mDAAc,CAAA;AAC9B,eAAO,MAAM,IAAI,mDAAe,CAAA;AAChC,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/environment/logger.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,GAAG,mDAAc,CAAA;AAC9B,eAAO,MAAM,IAAI,mDAAe,CAAA;AAChC,eAAO,MAAM,OAAO,YAAa,GAAG,EAAE,SACI,CAAA;AAC1C,eAAO,MAAM,IAAI,mDAAe,CAAA;AAChC,eAAO,MAAM,KAAK,YAAa,GAAG,EAAE,SAA2C,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const OLD_INVENTORY_DIR: string;
|
|
2
|
+
export declare const INVENTORY_FILE_NAME = "inventory.yml";
|
|
3
|
+
export declare const INVENTORY_VARS_FILE_NAME = "inventory-vars.yml";
|
|
4
|
+
export declare function getEnvironmentDir(environment: string): string;
|
|
5
|
+
export declare function getEnvironmentInventoryPath(environment: string): string;
|
|
6
|
+
export declare function getEnvironmentInventoryVarsPath(environment: string): string;
|
|
7
|
+
export declare function getOldInventoryPath(environment: string): string;
|
|
8
|
+
export declare function findOldInventoryFiles(): string[];
|
|
9
|
+
export declare function getEnvironmentNameFromOldInventoryPath(filePath: string): string;
|
|
10
|
+
export declare function hasOldInventoryLayout(): boolean;
|
|
11
|
+
export declare function assertNoOldInventoryLayout(): void;
|
|
12
|
+
export declare function hasEnvironmentInventory(environment: string): boolean;
|
|
13
|
+
//# sourceMappingURL=paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/environment/paths.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,iBAAiB,QAI7B,CAAA;AAED,eAAO,MAAM,mBAAmB,kBAAkB,CAAA;AAClD,eAAO,MAAM,wBAAwB,uBAAuB,CAAA;AAE5D,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,UAEpD;AAED,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,MAAM,UAE9D;AAED,wBAAgB,+BAA+B,CAAC,WAAW,EAAE,MAAM,UAElE;AAED,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,UAEtD;AAED,wBAAgB,qBAAqB,aAEpC;AAED,wBAAgB,sCAAsC,CAAC,QAAQ,EAAE,MAAM,UAEtE;AAED,wBAAgB,qBAAqB,YAEpC;AAED,wBAAgB,0BAA0B,SAWzC;AAED,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,MAAM,WAE1D"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
6
|
+
*
|
|
7
|
+
* OpenCRVS is also distributed under the terms of the Civil Registration
|
|
8
|
+
* & Healthcare Disclaimer located at http://opencrvs.org/license.
|
|
9
|
+
*
|
|
10
|
+
* Copyright (C) The OpenCRVS Authors located at https://github.com/opencrvs/opencrvs-core/blob/master/AUTHORS.
|
|
11
|
+
*/
|
|
12
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
15
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
16
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
17
|
+
}
|
|
18
|
+
Object.defineProperty(o, k2, desc);
|
|
19
|
+
}) : (function(o, m, k, k2) {
|
|
20
|
+
if (k2 === undefined) k2 = k;
|
|
21
|
+
o[k2] = m[k];
|
|
22
|
+
}));
|
|
23
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
24
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
25
|
+
}) : function(o, v) {
|
|
26
|
+
o["default"] = v;
|
|
27
|
+
});
|
|
28
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
29
|
+
var ownKeys = function(o) {
|
|
30
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
31
|
+
var ar = [];
|
|
32
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
33
|
+
return ar;
|
|
34
|
+
};
|
|
35
|
+
return ownKeys(o);
|
|
36
|
+
};
|
|
37
|
+
return function (mod) {
|
|
38
|
+
if (mod && mod.__esModule) return mod;
|
|
39
|
+
var result = {};
|
|
40
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
41
|
+
__setModuleDefault(result, mod);
|
|
42
|
+
return result;
|
|
43
|
+
};
|
|
44
|
+
})();
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.INVENTORY_VARS_FILE_NAME = exports.INVENTORY_FILE_NAME = exports.OLD_INVENTORY_DIR = void 0;
|
|
47
|
+
exports.getEnvironmentDir = getEnvironmentDir;
|
|
48
|
+
exports.getEnvironmentInventoryPath = getEnvironmentInventoryPath;
|
|
49
|
+
exports.getEnvironmentInventoryVarsPath = getEnvironmentInventoryVarsPath;
|
|
50
|
+
exports.getOldInventoryPath = getOldInventoryPath;
|
|
51
|
+
exports.findOldInventoryFiles = findOldInventoryFiles;
|
|
52
|
+
exports.getEnvironmentNameFromOldInventoryPath = getEnvironmentNameFromOldInventoryPath;
|
|
53
|
+
exports.hasOldInventoryLayout = hasOldInventoryLayout;
|
|
54
|
+
exports.assertNoOldInventoryLayout = assertNoOldInventoryLayout;
|
|
55
|
+
exports.hasEnvironmentInventory = hasEnvironmentInventory;
|
|
56
|
+
const fs_1 = require("fs");
|
|
57
|
+
const path_1 = require("path");
|
|
58
|
+
const glob = __importStar(require("glob"));
|
|
59
|
+
exports.OLD_INVENTORY_DIR = (0, path_1.join)('infrastructure', 'server-setup', 'inventory');
|
|
60
|
+
exports.INVENTORY_FILE_NAME = 'inventory.yml';
|
|
61
|
+
exports.INVENTORY_VARS_FILE_NAME = 'inventory-vars.yml';
|
|
62
|
+
function getEnvironmentDir(environment) {
|
|
63
|
+
return (0, path_1.join)('environments', environment);
|
|
64
|
+
}
|
|
65
|
+
function getEnvironmentInventoryPath(environment) {
|
|
66
|
+
return (0, path_1.join)(getEnvironmentDir(environment), exports.INVENTORY_FILE_NAME);
|
|
67
|
+
}
|
|
68
|
+
function getEnvironmentInventoryVarsPath(environment) {
|
|
69
|
+
return (0, path_1.join)(getEnvironmentDir(environment), exports.INVENTORY_VARS_FILE_NAME);
|
|
70
|
+
}
|
|
71
|
+
function getOldInventoryPath(environment) {
|
|
72
|
+
return (0, path_1.join)(exports.OLD_INVENTORY_DIR, `${environment}.yml`);
|
|
73
|
+
}
|
|
74
|
+
function findOldInventoryFiles() {
|
|
75
|
+
return glob.sync((0, path_1.join)(exports.OLD_INVENTORY_DIR, '*.yml')).sort();
|
|
76
|
+
}
|
|
77
|
+
function getEnvironmentNameFromOldInventoryPath(filePath) {
|
|
78
|
+
return (0, path_1.basename)(filePath, '.yml');
|
|
79
|
+
}
|
|
80
|
+
function hasOldInventoryLayout() {
|
|
81
|
+
return findOldInventoryFiles().length > 0;
|
|
82
|
+
}
|
|
83
|
+
function assertNoOldInventoryLayout() {
|
|
84
|
+
if (!hasOldInventoryLayout()) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
throw new Error([
|
|
88
|
+
`Old inventory layout detected at ${exports.OLD_INVENTORY_DIR}.`,
|
|
89
|
+
'Please run `yarn environment:upgrade` before running `yarn environment:init`.'
|
|
90
|
+
].join(' '));
|
|
91
|
+
}
|
|
92
|
+
function hasEnvironmentInventory(environment) {
|
|
93
|
+
return (0, fs_1.existsSync)(getEnvironmentInventoryPath(environment));
|
|
94
|
+
}
|