@opencrvs/toolkit 2.0.0-rc.bd55713 → 2.0.0-rc.bd854e0
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/build.sh +3 -3
- package/dist/application-config/index.js +17 -6
- package/dist/cli.js +362 -305
- package/dist/commons/api/router.d.ts +10 -0
- package/dist/commons/conditionals/conditionals.d.ts +3 -3
- package/dist/commons/events/AdvancedSearchConfig.d.ts +12 -0
- package/dist/commons/events/CountryConfigQueryInput.d.ts +42 -0
- package/dist/commons/events/EventConfig.d.ts +2 -0
- package/dist/commons/events/EventIndex.d.ts +25 -0
- package/dist/commons/events/EventMetadata.d.ts +26 -0
- package/dist/commons/events/FieldConfig.d.ts +10 -0
- package/dist/commons/events/WorkqueueConfig.d.ts +39 -0
- package/dist/commons/events/locations.d.ts +1 -0
- package/dist/commons/events/state/index.d.ts +8 -0
- package/dist/commons/events/state/utils.d.ts +9 -0
- package/dist/conditionals/index.js +10 -5
- package/dist/environment/custom-types.d.ts.map +1 -1
- package/dist/environment/custom-types.js +10 -0
- package/dist/environment/derived-variables.d.ts.map +1 -1
- package/dist/environment/derived-variables.js +11 -1
- package/dist/environment/editor-questions.d.ts +0 -1
- package/dist/environment/editor-questions.d.ts.map +1 -1
- package/dist/environment/editor-questions.js +16 -5
- package/dist/environment/git.d.ts.map +1 -1
- package/dist/environment/git.js +15 -5
- package/dist/environment/github.d.ts.map +1 -1
- package/dist/environment/github.js +25 -12
- package/dist/environment/index.d.ts +0 -1
- package/dist/environment/index.d.ts.map +1 -1
- package/dist/environment/index.js +12 -2
- package/dist/environment/logger.d.ts.map +1 -1
- package/dist/environment/logger.js +10 -0
- package/dist/environment/manage-users.d.ts.map +1 -1
- package/dist/environment/manage-users.js +21 -8
- package/dist/environment/questions-helper.d.ts.map +1 -1
- package/dist/environment/questions-helper.js +15 -5
- package/dist/environment/questions.d.ts +0 -23
- package/dist/environment/questions.d.ts.map +1 -1
- package/dist/environment/questions.js +24 -67
- package/dist/environment/setup-environment.js +85 -54
- package/dist/environment/ssh-keygen.d.ts.map +1 -1
- package/dist/environment/ssh-keygen.js +15 -2
- package/dist/environment/swarm-to-k8s.js +26 -15
- package/dist/environment/templates.d.ts.map +1 -1
- package/dist/environment/templates.js +26 -12
- package/dist/environment/update-workflows.d.ts.map +1 -1
- package/dist/environment/update-workflows.js +48 -30
- package/dist/environment/users.d.ts +1 -1
- package/dist/environment/users.d.ts.map +1 -1
- package/dist/environment/users.js +29 -9
- package/dist/environment/utils.d.ts.map +1 -1
- package/dist/environment/utils.js +11 -1
- package/dist/events/index.js +40 -6
- package/dist/migrations/v2.0/index.js +10 -5
- package/dist/notification/index.js +17 -6
- package/dist/scopes/index.d.ts +89 -1
- package/dist/scopes/index.js +10 -5
- package/dist/{environment/templates → templates}/charts-values/dependencies/values.yaml +7 -6
- package/dist/{environment/templates/charts-values/dependencies → templates/charts-values/opencrvs-services}/values.override.yaml +1 -1
- package/dist/{environment/templates → templates}/charts-values/opencrvs-services/values.yaml +8 -6
- package/dist/{environment/templates → templates}/charts-values/traefik/values.override.yaml +1 -1
- package/dist/{environment/templates → templates}/charts-values/traefik/values.yaml +6 -7
- package/dist/{environment/templates → templates}/inventory/production.example.yml +2 -2
- package/opencrvs-toolkit-2.0.0-rc.bd854e0.tgz +0 -0
- package/package.json +1 -1
- package/opencrvs-toolkit-2.0.0-rc.bd55713.tgz +0 -0
- /package/dist/{environment/templates/charts-values/opencrvs-services → templates/charts-values/dependencies}/values.override.yaml +0 -0
- /package/dist/{environment/templates → templates}/inventory/inventory.template.yml +0 -0
- /package/dist/{environment/templates → templates}/inventory/qa.example.yml +0 -0
|
@@ -1,4 +1,14 @@
|
|
|
1
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
|
+
*/
|
|
2
12
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
13
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
14
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -12,7 +22,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
22
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
23
|
};
|
|
14
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.editorQuestion = editorQuestion;
|
|
16
25
|
exports.askQuestionWithEditor = askQuestionWithEditor;
|
|
17
26
|
const utils_1 = require("./utils");
|
|
18
27
|
const kleur_1 = __importDefault(require("kleur"));
|
|
@@ -22,22 +31,24 @@ function editorQuestion(question) {
|
|
|
22
31
|
}
|
|
23
32
|
function askQuestionWithEditor(questions, existingValues) {
|
|
24
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
|
|
34
|
+
const answers = [];
|
|
26
35
|
for (const question of questions) {
|
|
27
36
|
const questionWithVariableLabel = Object.assign(Object.assign({}, question), { message: `${kleur_1.default.cyan(question.valueLabel || '')}: ${question.message}` });
|
|
28
37
|
if (!questionWithVariableLabel.valueLabel) {
|
|
29
|
-
throw Error(
|
|
38
|
+
throw Error('Undefined Label');
|
|
30
39
|
}
|
|
31
40
|
const existingSecret = (0, utils_1.findExistingValue)(questionWithVariableLabel.valueLabel, 'SECRET', questionWithVariableLabel.scope, existingValues);
|
|
32
41
|
let updateSecret = true;
|
|
33
42
|
if (existingSecret) {
|
|
34
|
-
updateSecret = (yield (0, prompts_1.default)([
|
|
43
|
+
updateSecret = (yield (0, prompts_1.default)([
|
|
44
|
+
{
|
|
35
45
|
name: 'overWrite',
|
|
36
46
|
type: 'confirm',
|
|
37
47
|
message: `${kleur_1.default.yellow(`${existingSecret.scope === 'REPOSITORY'
|
|
38
48
|
? 'Repository secret'
|
|
39
49
|
: 'Secret'} ${kleur_1.default.cyan(existingSecret.name)} already exists in Github. Do you want to update it?`)}`
|
|
40
|
-
}
|
|
50
|
+
}
|
|
51
|
+
])).overWrite;
|
|
41
52
|
}
|
|
42
53
|
if (!existingSecret || updateSecret === true) {
|
|
43
54
|
const question_answer = yield editorQuestion(questionWithVariableLabel.message);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/environment/git.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/environment/git.ts"],"names":[],"mappings":"AAaA,wBAAgB,WAAW;;;EAyB1B"}
|
package/dist/environment/git.js
CHANGED
|
@@ -1,18 +1,28 @@
|
|
|
1
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
|
+
*/
|
|
2
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
13
|
exports.getRepoInfo = getRepoInfo;
|
|
4
14
|
const child_process_1 = require("child_process");
|
|
5
15
|
function getRepoInfo() {
|
|
6
16
|
try {
|
|
7
|
-
const remoteUrl = (0, child_process_1.execSync)(
|
|
8
|
-
stdio: [
|
|
17
|
+
const remoteUrl = (0, child_process_1.execSync)('git config --get remote.origin.url', {
|
|
18
|
+
stdio: ['ignore', 'pipe', 'ignore']
|
|
9
19
|
})
|
|
10
20
|
.toString()
|
|
11
21
|
.trim();
|
|
12
22
|
// Handle both SSH and HTTPS formats
|
|
13
23
|
const match = remoteUrl.match(/github\.com[:/](.+?)\/(.+?)(\.git)?$/);
|
|
14
24
|
if (!match) {
|
|
15
|
-
return { organization:
|
|
25
|
+
return { organization: '', repository: '' };
|
|
16
26
|
}
|
|
17
27
|
return {
|
|
18
28
|
organization: match[1],
|
|
@@ -21,8 +31,8 @@ function getRepoInfo() {
|
|
|
21
31
|
}
|
|
22
32
|
catch (_a) {
|
|
23
33
|
return {
|
|
24
|
-
organization:
|
|
25
|
-
repository:
|
|
34
|
+
organization: '',
|
|
35
|
+
repository: ''
|
|
26
36
|
};
|
|
27
37
|
}
|
|
28
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../src/environment/github.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../src/environment/github.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
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
|
+
*/
|
|
2
12
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
13
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
14
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -8,6 +18,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
18
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
19
|
});
|
|
10
20
|
};
|
|
21
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
+
};
|
|
11
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
25
|
exports.createEnvironmentVariable = createEnvironmentVariable;
|
|
13
26
|
exports.updateEnvironmentVariable = updateEnvironmentVariable;
|
|
@@ -22,7 +35,7 @@ exports.listEnvironmentSecrets = listEnvironmentSecrets;
|
|
|
22
35
|
exports.listRepositorySecrets = listRepositorySecrets;
|
|
23
36
|
exports.listEnvironmentVariables = listEnvironmentVariables;
|
|
24
37
|
exports.listRepositoryVariables = listRepositoryVariables;
|
|
25
|
-
const
|
|
38
|
+
const libsodium_wrappers_1 = __importDefault(require("libsodium-wrappers"));
|
|
26
39
|
const logger_1 = require("./logger");
|
|
27
40
|
function createEnvironmentVariable(octokit, repositoryId, environment, name, value) {
|
|
28
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -115,15 +128,15 @@ function getPublicKey(octokit, environment, ORGANISATION, REPOSITORY_NAME) {
|
|
|
115
128
|
function createEnvironmentSecret(octokit, repositoryId, environment, name, secret, organisationName, repositoryName) {
|
|
116
129
|
return __awaiter(this, void 0, void 0, function* () {
|
|
117
130
|
//Check if libsodium is ready and then proceed.
|
|
118
|
-
yield
|
|
131
|
+
yield libsodium_wrappers_1.default.ready;
|
|
119
132
|
const { key, key_id } = yield getPublicKey(octokit, environment, organisationName, repositoryName);
|
|
120
133
|
// Convert Secret & Base64 key to Uint8Array.
|
|
121
|
-
const binkey =
|
|
122
|
-
const binsec =
|
|
134
|
+
const binkey = libsodium_wrappers_1.default.from_base64(key, libsodium_wrappers_1.default.base64_variants.ORIGINAL);
|
|
135
|
+
const binsec = libsodium_wrappers_1.default.from_string(secret);
|
|
123
136
|
//Encrypt the secret using LibSodium
|
|
124
|
-
const encBytes =
|
|
137
|
+
const encBytes = libsodium_wrappers_1.default.crypto_box_seal(binsec, binkey);
|
|
125
138
|
// Convert encrypted Uint8Array to Base64
|
|
126
|
-
const encryptedValue =
|
|
139
|
+
const encryptedValue = libsodium_wrappers_1.default.to_base64(encBytes, libsodium_wrappers_1.default.base64_variants.ORIGINAL);
|
|
127
140
|
yield octokit.request(`PUT /repositories/${repositoryId}/environments/${environment}/secrets/${name}`, {
|
|
128
141
|
repository_id: repositoryId,
|
|
129
142
|
environment_name: environment,
|
|
@@ -139,15 +152,15 @@ function createEnvironmentSecret(octokit, repositoryId, environment, name, secre
|
|
|
139
152
|
function createRepositorySecret(octokit, repositoryId, name, secret, organisationName, repositoryName) {
|
|
140
153
|
return __awaiter(this, void 0, void 0, function* () {
|
|
141
154
|
//Check if libsodium is ready and then proceed.
|
|
142
|
-
yield
|
|
155
|
+
yield libsodium_wrappers_1.default.ready;
|
|
143
156
|
const { key, key_id } = yield getRepositoryPublicKey(octokit, organisationName, repositoryName);
|
|
144
157
|
// Convert Secret & Base64 key to Uint8Array.
|
|
145
|
-
const binkey =
|
|
146
|
-
const binsec =
|
|
158
|
+
const binkey = libsodium_wrappers_1.default.from_base64(key, libsodium_wrappers_1.default.base64_variants.ORIGINAL);
|
|
159
|
+
const binsec = libsodium_wrappers_1.default.from_string(secret);
|
|
147
160
|
//Encrypt the secret using LibSodium
|
|
148
|
-
const encBytes =
|
|
161
|
+
const encBytes = libsodium_wrappers_1.default.crypto_box_seal(binsec, binkey);
|
|
149
162
|
// Convert encrypted Uint8Array to Base64
|
|
150
|
-
const encryptedValue =
|
|
163
|
+
const encryptedValue = libsodium_wrappers_1.default.to_base64(encBytes, libsodium_wrappers_1.default.base64_variants.ORIGINAL);
|
|
151
164
|
yield octokit.request(`PUT /repositories/${repositoryId}/actions/secrets/${name}`, {
|
|
152
165
|
encrypted_value: encryptedValue,
|
|
153
166
|
key_id,
|
|
@@ -162,7 +175,7 @@ function getRepositoryEnvironments(octokit, githubOrganisation, repository) {
|
|
|
162
175
|
var _a;
|
|
163
176
|
const response = yield octokit.request('GET /repos/{githubOrganisation}/{repository}/environments', {
|
|
164
177
|
githubOrganisation,
|
|
165
|
-
repository
|
|
178
|
+
repository
|
|
166
179
|
});
|
|
167
180
|
// Safe access with fallback to empty array if undefined
|
|
168
181
|
const environments = ((_a = response.data.environments) !== null && _a !== void 0 ? _a : []).map((env) => env.name);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export declare function validateRepositoryStructure(repositoryRoot?: string): void;
|
|
2
1
|
export declare function runEnvironmentInit(): Promise<void>;
|
|
3
2
|
export declare function runEnvironmentUpdateWorkflows(): Promise<void>;
|
|
4
3
|
export declare function runEnvironmentUsers(): 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":"AAwCA,wBAAsB,kBAAkB,kBAGvC;AAED,wBAAsB,6BAA6B,kBAIlD;AAED,wBAAsB,mBAAmB,kBAIxC;AAED,wBAAsB,wBAAwB,kBAG7C"}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
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
|
+
*/
|
|
2
12
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
13
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
14
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -9,7 +19,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
19
|
});
|
|
10
20
|
};
|
|
11
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.validateRepositoryStructure = validateRepositoryStructure;
|
|
13
22
|
exports.runEnvironmentInit = runEnvironmentInit;
|
|
14
23
|
exports.runEnvironmentUpdateWorkflows = runEnvironmentUpdateWorkflows;
|
|
15
24
|
exports.runEnvironmentUsers = runEnvironmentUsers;
|
|
@@ -50,7 +59,8 @@ function runEnvironmentUpdateWorkflows() {
|
|
|
50
59
|
function runEnvironmentUsers() {
|
|
51
60
|
return __awaiter(this, void 0, void 0, function* () {
|
|
52
61
|
validateRepositoryStructure();
|
|
53
|
-
yield import('./users.js');
|
|
62
|
+
const { manageEnvironmentUsers } = yield import('./users.js');
|
|
63
|
+
yield manageEnvironmentUsers();
|
|
54
64
|
});
|
|
55
65
|
}
|
|
56
66
|
function runEnvironmentSwarmToK8s() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/environment/logger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/environment/logger.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,GAAG;;;CAAc,CAAA;AAC9B,eAAO,MAAM,IAAI;;;CAAe,CAAA;AAChC,eAAO,MAAM,OAAO,YAAa,GAAG,EAAE,SACI,CAAA;AAC1C,eAAO,MAAM,IAAI;;;CAAe,CAAA;AAChC,eAAO,MAAM,KAAK,YAAa,GAAG,EAAE,SAA2C,CAAA"}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
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
|
+
*/
|
|
2
12
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
14
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manage-users.d.ts","sourceRoot":"","sources":["../../src/environment/manage-users.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"manage-users.d.ts","sourceRoot":"","sources":["../../src/environment/manage-users.ts"],"names":[],"mappings":"AAkCA,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,KAAK,EAAE,SAAS,GAAG,QAAQ,CAAA;IAC3B,IAAI,EAAE,OAAO,GAAG,UAAU,CAAA;CAC3B;AAkWD;;GAEG;AACH,wBAAsB,WAAW,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAqIxE"}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
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
|
+
*/
|
|
2
12
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
13
|
if (k2 === undefined) k2 = k;
|
|
4
14
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -34,6 +44,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
34
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
45
|
exports.manageUsers = manageUsers;
|
|
36
46
|
const os = __importStar(require("os"));
|
|
47
|
+
/* eslint-disable no-console */
|
|
37
48
|
const fs = __importStar(require("fs"));
|
|
38
49
|
const path = __importStar(require("path"));
|
|
39
50
|
function inquirerPrompt(name, options) {
|
|
@@ -153,7 +164,7 @@ function askToAddCurrentUser(existingUsers) {
|
|
|
153
164
|
const currentUsername = getCurrentUsername();
|
|
154
165
|
const currentKeys = getCurrentUserSSHKeys();
|
|
155
166
|
// Check if user already exists
|
|
156
|
-
if (existingUsers.find(u => u.name === currentUsername)) {
|
|
167
|
+
if (existingUsers.find((u) => u.name === currentUsername)) {
|
|
157
168
|
(0, logger_1.info)(`ℹ️ User "${currentUsername}" already exists in inventory.`);
|
|
158
169
|
return null;
|
|
159
170
|
}
|
|
@@ -189,7 +200,7 @@ function addNewUser(existingUsers) {
|
|
|
189
200
|
if (!value.trim()) {
|
|
190
201
|
return 'Username required';
|
|
191
202
|
}
|
|
192
|
-
if (existingUsers.find(u => u.name === value.trim())) {
|
|
203
|
+
if (existingUsers.find((u) => u.name === value.trim())) {
|
|
193
204
|
return `User "${value}" already exists`;
|
|
194
205
|
}
|
|
195
206
|
if (!/^[a-z_][a-z0-9_-]*[$]?$/.test(value.trim())) {
|
|
@@ -211,7 +222,7 @@ function addNewUser(existingUsers) {
|
|
|
211
222
|
}
|
|
212
223
|
const role = yield selectRole();
|
|
213
224
|
// New users always active
|
|
214
|
-
const state =
|
|
225
|
+
const state = 'present';
|
|
215
226
|
return {
|
|
216
227
|
name: name.trim(),
|
|
217
228
|
ssh_keys,
|
|
@@ -368,7 +379,9 @@ function editUser(user) {
|
|
|
368
379
|
*/
|
|
369
380
|
function manageUsers(inventoryPath) {
|
|
370
381
|
return __awaiter(this, void 0, void 0, function* () {
|
|
371
|
-
let users = fs.existsSync(inventoryPath)
|
|
382
|
+
let users = fs.existsSync(inventoryPath)
|
|
383
|
+
? parseInventoryFile(inventoryPath)
|
|
384
|
+
: [];
|
|
372
385
|
if (users.length > 0) {
|
|
373
386
|
displayUserSummary(users);
|
|
374
387
|
}
|
|
@@ -408,12 +421,12 @@ function manageUsers(inventoryPath) {
|
|
|
408
421
|
}
|
|
409
422
|
const userToEdit = yield select({
|
|
410
423
|
message: 'Select user to edit:',
|
|
411
|
-
choices: users.map(u => ({
|
|
424
|
+
choices: users.map((u) => ({
|
|
412
425
|
name: `${u.name} (${u.role}, ${u.state})`,
|
|
413
426
|
value: u.name
|
|
414
427
|
}))
|
|
415
428
|
});
|
|
416
|
-
const userIndex = users.findIndex(u => u.name === userToEdit);
|
|
429
|
+
const userIndex = users.findIndex((u) => u.name === userToEdit);
|
|
417
430
|
if (userIndex !== -1) {
|
|
418
431
|
users[userIndex] = yield editUser(users[userIndex]);
|
|
419
432
|
console.log(`✅ User "${userToEdit}" updated.\n`);
|
|
@@ -426,7 +439,7 @@ function manageUsers(inventoryPath) {
|
|
|
426
439
|
}
|
|
427
440
|
const usersToRemove = yield checkbox({
|
|
428
441
|
message: 'Select user(s) to remove:',
|
|
429
|
-
choices: users.map(u => ({
|
|
442
|
+
choices: users.map((u) => ({
|
|
430
443
|
name: `${u.name} (${u.role}, ${u.state})`,
|
|
431
444
|
value: u.name
|
|
432
445
|
}))
|
|
@@ -437,7 +450,7 @@ function manageUsers(inventoryPath) {
|
|
|
437
450
|
default: false
|
|
438
451
|
});
|
|
439
452
|
if (confirmRemove) {
|
|
440
|
-
users = users.filter(u => !usersToRemove.includes(u.name));
|
|
453
|
+
users = users.filter((u) => !usersToRemove.includes(u.name));
|
|
441
454
|
console.log(`✅ Removed ${usersToRemove.length} user(s).\n`);
|
|
442
455
|
}
|
|
443
456
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"questions-helper.d.ts","sourceRoot":"","sources":["../../src/environment/questions-helper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"questions-helper.d.ts","sourceRoot":"","sources":["../../src/environment/questions-helper.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAYhC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,UASnE;AAED,KAAK,uBAAuB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,SAAS;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IACnD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,uBAAuB,GAC9B,OAAO,CAAC,MAAM,CAAC,CAkCjB"}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
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
|
+
*/
|
|
2
12
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
13
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
14
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -35,7 +45,7 @@ function getIndexFromChoices(choices, value) {
|
|
|
35
45
|
}
|
|
36
46
|
function selectWithCustom(config) {
|
|
37
47
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
const { message, choices, initial = undefined, customLabel = 'Other...', customInputMessage = 'Enter custom value:'
|
|
48
|
+
const { message, choices, initial = undefined, customLabel = 'Other...', customInputMessage = 'Enter custom value:' } = config;
|
|
39
49
|
const CUSTOM = '__custom__';
|
|
40
50
|
const selected = yield select({
|
|
41
51
|
message,
|
|
@@ -43,15 +53,15 @@ function selectWithCustom(config) {
|
|
|
43
53
|
...choices,
|
|
44
54
|
{
|
|
45
55
|
value: CUSTOM,
|
|
46
|
-
name: customLabel
|
|
47
|
-
}
|
|
56
|
+
name: customLabel
|
|
57
|
+
}
|
|
48
58
|
],
|
|
49
|
-
default: initial
|
|
59
|
+
default: initial
|
|
50
60
|
});
|
|
51
61
|
if (selected === CUSTOM) {
|
|
52
62
|
const customValue = yield input({
|
|
53
63
|
message: customInputMessage,
|
|
54
|
-
validate: (value) => value.trim().length > 0 ? true : 'Value cannot be empty'
|
|
64
|
+
validate: (value) => value.trim().length > 0 ? true : 'Value cannot be empty'
|
|
55
65
|
});
|
|
56
66
|
return customValue;
|
|
57
67
|
}
|
|
@@ -152,29 +152,6 @@ export declare const databaseAndMonitoringQuestions: {
|
|
|
152
152
|
initial: string;
|
|
153
153
|
scope: "ENVIRONMENT";
|
|
154
154
|
}[];
|
|
155
|
-
export declare const notificationTransportQuestions: {
|
|
156
|
-
name: string;
|
|
157
|
-
type: "select";
|
|
158
|
-
message: string;
|
|
159
|
-
choices: {
|
|
160
|
-
title: string;
|
|
161
|
-
value: string;
|
|
162
|
-
}[];
|
|
163
|
-
valueLabel: string;
|
|
164
|
-
valueType: "VARIABLE";
|
|
165
|
-
scope: "ENVIRONMENT";
|
|
166
|
-
initial: string | undefined;
|
|
167
|
-
}[];
|
|
168
|
-
export declare const smsQuestions: {
|
|
169
|
-
name: string;
|
|
170
|
-
type: "text";
|
|
171
|
-
message: string;
|
|
172
|
-
valueType: "SECRET";
|
|
173
|
-
validate: (value: string | number) => true | "Please enter a value";
|
|
174
|
-
valueLabel: string;
|
|
175
|
-
initial: string | undefined;
|
|
176
|
-
scope: "ENVIRONMENT";
|
|
177
|
-
}[];
|
|
178
155
|
export declare const emailQuestions: ({
|
|
179
156
|
name: string;
|
|
180
157
|
type: "text";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"questions.d.ts","sourceRoot":"","sources":["../../src/environment/questions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"questions.d.ts","sourceRoot":"","sources":["../../src/environment/questions.ts"],"names":[],"mappings":"AA+BA,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAgBnD;AAED,eAAO,MAAM,kBAAkB;;;;;;sBAlCN,MAAM,GAAG,MAAM;;;GA4EvC,CAAA;AAED,eAAO,MAAM,eAAe;;;;sBA9EH,MAAM,GAAG,MAAM;;;GA+FvC,CAAA;AACD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;sBAhGR,MAAM,GAAG,MAAM;;;;IA+HvC,CAAA;AACD,eAAO,MAAM,mBAAmB;;;;sBAhIP,MAAM,GAAG,MAAM;;;;;GA2IvC,CAAA;AAED,eAAO,MAAM,gBAAgB;;;;;;;;GAW5B,CAAA;AAED,eAAO,MAAM,uBAAuB;;;;;sBA1JX,MAAM,GAAG,MAAM;;;;;;;;;;;;;;;;;;;;;;IAmMvC,CAAA;AAED,eAAO,MAAM,sBAAsB;;;;;sBArMV,MAAM,GAAG,MAAM;;;;GA0NvC,CAAA;AAED,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;sBA5NH,MAAM,GAAG,MAAM;;;;;;;;;;;;;;sBAAf,MAAM,GAAG,MAAM;;;;IAqQvC,CAAA;AAED,eAAO,MAAM,aAAa;;;;;sBAvQD,MAAM,GAAG,MAAM;;;;GAoRvC,CAAA;AAED,eAAO,MAAM,8BAA8B;;;;;sBAtRlB,MAAM,GAAG,MAAM;;;;GA2SvC,CAAA;AAED,eAAO,MAAM,cAAc;;;;;sBA7SF,MAAM,GAAG,MAAM;;;;;;;;;;;;;;sBAAf,MAAM,GAAG,MAAM;;;;IA+XvC,CAAA;AAED,eAAO,MAAM,eAAe;;;;;sBAjYH,MAAM,GAAG,MAAM;;;;GA4YvC,CAAA;AAED,eAAO,MAAM,sBAAsB;;;;;;;;GAoBlC,CAAA"}
|
|
@@ -1,9 +1,19 @@
|
|
|
1
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
|
+
*/
|
|
2
12
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
14
|
};
|
|
5
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.metabaseAdminQuestions = exports.sentryQuestions = exports.emailQuestions = exports.
|
|
16
|
+
exports.metabaseAdminQuestions = exports.sentryQuestions = exports.emailQuestions = exports.databaseAndMonitoringQuestions = exports.diskQuestions = exports.backupQuestions = exports.staticSSLCertQuestions = exports.infrastructureQuestions = exports.countryQuestions = exports.githubTokenQuestion = exports.githubOtherQuestions = exports.githubQuestions = exports.dockerhubQuestions = void 0;
|
|
7
17
|
const kleur_1 = __importDefault(require("kleur"));
|
|
8
18
|
const utils_1 = require("./utils");
|
|
9
19
|
const git_1 = require("./git");
|
|
@@ -88,7 +98,7 @@ exports.githubQuestions = [
|
|
|
88
98
|
validate: notEmpty,
|
|
89
99
|
initial: process.env.GITHUB_REPOSITORY || (0, git_1.getRepoInfo)().repository,
|
|
90
100
|
scope: 'REPOSITORY'
|
|
91
|
-
}
|
|
101
|
+
}
|
|
92
102
|
];
|
|
93
103
|
exports.githubOtherQuestions = [
|
|
94
104
|
{
|
|
@@ -119,7 +129,7 @@ exports.githubOtherQuestions = [
|
|
|
119
129
|
valueLabel: 'APPROVAL_REQUIRED',
|
|
120
130
|
initial: process.env.APPROVAL_REQUIRED,
|
|
121
131
|
scope: 'ENVIRONMENT'
|
|
122
|
-
}
|
|
132
|
+
}
|
|
123
133
|
];
|
|
124
134
|
exports.githubTokenQuestion = [
|
|
125
135
|
{
|
|
@@ -172,8 +182,8 @@ exports.infrastructureQuestions = [
|
|
|
172
182
|
valueType: 'VARIABLE',
|
|
173
183
|
validate: validateCIDRs,
|
|
174
184
|
valueLabel: 'KUBE_API_ALLOWED_CIDRS',
|
|
175
|
-
initial: process.env.KUBE_API_ALLOWED_CIDRS ||
|
|
176
|
-
scope: 'ENVIRONMENT'
|
|
185
|
+
initial: process.env.KUBE_API_ALLOWED_CIDRS || '',
|
|
186
|
+
scope: 'ENVIRONMENT'
|
|
177
187
|
},
|
|
178
188
|
{
|
|
179
189
|
name: 'kubeWorkerNodes',
|
|
@@ -183,8 +193,8 @@ exports.infrastructureQuestions = [
|
|
|
183
193
|
// validate: notEmpty,
|
|
184
194
|
valueLabel: 'KUBE_WORKER_NODES',
|
|
185
195
|
initial: process.env.KUBE_WORKER_NODES || '',
|
|
186
|
-
scope: 'ENVIRONMENT'
|
|
187
|
-
}
|
|
196
|
+
scope: 'ENVIRONMENT'
|
|
197
|
+
}
|
|
188
198
|
];
|
|
189
199
|
exports.staticSSLCertQuestions = [
|
|
190
200
|
{
|
|
@@ -206,7 +216,7 @@ exports.staticSSLCertQuestions = [
|
|
|
206
216
|
valueLabel: 'SSL_KEY',
|
|
207
217
|
initial: process.env.SSL_KEY,
|
|
208
218
|
scope: 'ENVIRONMENT'
|
|
209
|
-
}
|
|
219
|
+
}
|
|
210
220
|
];
|
|
211
221
|
exports.backupQuestions = [
|
|
212
222
|
{
|
|
@@ -217,7 +227,7 @@ exports.backupQuestions = [
|
|
|
217
227
|
// validate: notEmpty,
|
|
218
228
|
valueLabel: 'BACKUP_HOST',
|
|
219
229
|
initial: process.env.BACKUP_HOST || '',
|
|
220
|
-
scope: 'ENVIRONMENT'
|
|
230
|
+
scope: 'ENVIRONMENT'
|
|
221
231
|
},
|
|
222
232
|
{
|
|
223
233
|
name: 'backupUser',
|
|
@@ -227,7 +237,7 @@ exports.backupQuestions = [
|
|
|
227
237
|
validate: notEmpty,
|
|
228
238
|
valueLabel: 'BACKUP_SERVER_USER',
|
|
229
239
|
initial: process.env.BACKUP_SERVER_USER || 'backup',
|
|
230
|
-
scope: 'ENVIRONMENT'
|
|
240
|
+
scope: 'ENVIRONMENT'
|
|
231
241
|
},
|
|
232
242
|
{
|
|
233
243
|
name: 'backupType',
|
|
@@ -247,8 +257,8 @@ exports.backupQuestions = [
|
|
|
247
257
|
validate: notEmpty,
|
|
248
258
|
valueLabel: 'BACKUP_ENVIRONMENT_MODE',
|
|
249
259
|
initial: process.env.BACKUP_ENVIRONMENT_MODE,
|
|
250
|
-
scope: 'ENVIRONMENT'
|
|
251
|
-
}
|
|
260
|
+
scope: 'ENVIRONMENT'
|
|
261
|
+
}
|
|
252
262
|
];
|
|
253
263
|
exports.diskQuestions = [
|
|
254
264
|
{
|
|
@@ -261,8 +271,8 @@ exports.diskQuestions = [
|
|
|
261
271
|
validate: notEmpty,
|
|
262
272
|
valueLabel: 'DISK_SPACE',
|
|
263
273
|
initial: process.env.DISK_SPACE || '200g',
|
|
264
|
-
scope: 'ENVIRONMENT'
|
|
265
|
-
}
|
|
274
|
+
scope: 'ENVIRONMENT'
|
|
275
|
+
}
|
|
266
276
|
];
|
|
267
277
|
exports.databaseAndMonitoringQuestions = [
|
|
268
278
|
{
|
|
@@ -286,59 +296,6 @@ exports.databaseAndMonitoringQuestions = [
|
|
|
286
296
|
scope: 'ENVIRONMENT'
|
|
287
297
|
}
|
|
288
298
|
];
|
|
289
|
-
exports.notificationTransportQuestions = [
|
|
290
|
-
{
|
|
291
|
-
name: 'notificationTransport',
|
|
292
|
-
type: 'select',
|
|
293
|
-
message: 'Notification transport for 2FA, informant and user messaging',
|
|
294
|
-
choices: [
|
|
295
|
-
{
|
|
296
|
-
title: 'Email (with SMTP details)',
|
|
297
|
-
value: 'email'
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
title: 'SMS (Infobip)',
|
|
301
|
-
value: 'sms'
|
|
302
|
-
}
|
|
303
|
-
],
|
|
304
|
-
valueLabel: 'NOTIFICATION_TRANSPORT',
|
|
305
|
-
valueType: 'VARIABLE',
|
|
306
|
-
scope: 'ENVIRONMENT',
|
|
307
|
-
initial: process.env.NOTIFICATION_TRANSPORT
|
|
308
|
-
}
|
|
309
|
-
];
|
|
310
|
-
exports.smsQuestions = [
|
|
311
|
-
{
|
|
312
|
-
name: 'infobipApiKey',
|
|
313
|
-
type: 'text',
|
|
314
|
-
message: 'What is your Infobip API key?',
|
|
315
|
-
valueType: 'SECRET',
|
|
316
|
-
validate: notEmpty,
|
|
317
|
-
valueLabel: 'INFOBIP_API_KEY',
|
|
318
|
-
initial: process.env.INFOBIP_API_KEY,
|
|
319
|
-
scope: 'ENVIRONMENT'
|
|
320
|
-
},
|
|
321
|
-
{
|
|
322
|
-
name: 'infobipGatewayEndpoint',
|
|
323
|
-
type: 'text',
|
|
324
|
-
message: 'What is your Infobip gateway endpoint?',
|
|
325
|
-
valueType: 'SECRET',
|
|
326
|
-
validate: notEmpty,
|
|
327
|
-
valueLabel: 'INFOBIP_GATEWAY_ENDPOINT',
|
|
328
|
-
initial: process.env.INFOBIP_GATEWAY_ENDPOINT,
|
|
329
|
-
scope: 'ENVIRONMENT'
|
|
330
|
-
},
|
|
331
|
-
{
|
|
332
|
-
name: 'infobipSenderId',
|
|
333
|
-
type: 'text',
|
|
334
|
-
message: 'What is your Infobip sender ID?',
|
|
335
|
-
valueType: 'SECRET',
|
|
336
|
-
validate: notEmpty,
|
|
337
|
-
valueLabel: 'INFOBIP_SENDER_ID',
|
|
338
|
-
initial: process.env.INFOBIP_SENDER_ID,
|
|
339
|
-
scope: 'ENVIRONMENT'
|
|
340
|
-
}
|
|
341
|
-
];
|
|
342
299
|
exports.emailQuestions = [
|
|
343
300
|
{
|
|
344
301
|
name: 'smtpHost',
|