@opencrvs/toolkit 2.1.0-rc.f5f3da9 → 2.1.0-rc.f90c283
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 +0 -1
- package/dist/cli.js +77 -217
- package/dist/environment/index.d.ts +0 -1
- package/dist/environment/index.d.ts.map +1 -1
- package/dist/environment/index.js +0 -10
- package/dist/environment/setup-environment.js +1 -2
- package/dist/environment/templates.d.ts.map +1 -1
- package/dist/environment/templates.js +1 -2
- package/dist/environment/update-workflows.d.ts.map +1 -1
- package/dist/environment/update-workflows.js +3 -4
- package/dist/environment/users.js +13 -11
- package/opencrvs-toolkit-2.1.0-rc.f90c283.tgz +0 -0
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/environment/paths.d.ts +0 -13
- package/dist/environment/paths.d.ts.map +0 -1
- package/dist/environment/paths.js +0 -94
- package/dist/environment/upgrade.d.ts +0 -2
- package/dist/environment/upgrade.d.ts.map +0 -1
- package/dist/environment/upgrade.js +0 -100
- package/opencrvs-toolkit-2.1.0-rc.f5f3da9.tgz +0 -0
package/README.md
CHANGED
package/dist/cli.js
CHANGED
|
@@ -30,53 +30,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
mod
|
|
31
31
|
));
|
|
32
32
|
|
|
33
|
-
// src/environment/paths.ts
|
|
34
|
-
function getEnvironmentDir(environment) {
|
|
35
|
-
return (0, import_path2.join)("environments", environment);
|
|
36
|
-
}
|
|
37
|
-
function getEnvironmentInventoryPath(environment) {
|
|
38
|
-
return (0, import_path2.join)(getEnvironmentDir(environment), INVENTORY_FILE_NAME);
|
|
39
|
-
}
|
|
40
|
-
function getEnvironmentInventoryVarsPath(environment) {
|
|
41
|
-
return (0, import_path2.join)(getEnvironmentDir(environment), INVENTORY_VARS_FILE_NAME);
|
|
42
|
-
}
|
|
43
|
-
function findOldInventoryFiles() {
|
|
44
|
-
return glob.sync((0, import_path2.join)(OLD_INVENTORY_DIR, "*.yml")).sort();
|
|
45
|
-
}
|
|
46
|
-
function getEnvironmentNameFromOldInventoryPath(filePath) {
|
|
47
|
-
return (0, import_path2.basename)(filePath, ".yml");
|
|
48
|
-
}
|
|
49
|
-
function hasOldInventoryLayout() {
|
|
50
|
-
return findOldInventoryFiles().length > 0;
|
|
51
|
-
}
|
|
52
|
-
function assertNoOldInventoryLayout() {
|
|
53
|
-
if (!hasOldInventoryLayout()) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
throw new Error(
|
|
57
|
-
[
|
|
58
|
-
`Old inventory layout detected at ${OLD_INVENTORY_DIR}.`,
|
|
59
|
-
"Please run `yarn environment:upgrade` before running `yarn environment:init`."
|
|
60
|
-
].join(" ")
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
var import_fs, import_path2, glob, OLD_INVENTORY_DIR, INVENTORY_FILE_NAME, INVENTORY_VARS_FILE_NAME;
|
|
64
|
-
var init_paths = __esm({
|
|
65
|
-
"src/environment/paths.ts"() {
|
|
66
|
-
"use strict";
|
|
67
|
-
import_fs = require("fs");
|
|
68
|
-
import_path2 = require("path");
|
|
69
|
-
glob = __toESM(require("glob"));
|
|
70
|
-
OLD_INVENTORY_DIR = (0, import_path2.join)(
|
|
71
|
-
"infrastructure",
|
|
72
|
-
"server-setup",
|
|
73
|
-
"inventory"
|
|
74
|
-
);
|
|
75
|
-
INVENTORY_FILE_NAME = "inventory.yml";
|
|
76
|
-
INVENTORY_VARS_FILE_NAME = "inventory-vars.yml";
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
|
|
80
33
|
// src/environment/logger.ts
|
|
81
34
|
var import_kleur, log, warn, success, info, error;
|
|
82
35
|
var init_logger = __esm({
|
|
@@ -518,9 +471,9 @@ function storeSecrets(environment, answers) {
|
|
|
518
471
|
let envConfig = {};
|
|
519
472
|
try {
|
|
520
473
|
envConfig = import_dotenv.default.parse(
|
|
521
|
-
(0,
|
|
474
|
+
(0, import_fs.readFileSync)(`${process.cwd()}/.env.${environment}`)
|
|
522
475
|
);
|
|
523
|
-
} catch (
|
|
476
|
+
} catch (error4) {
|
|
524
477
|
envConfig = {};
|
|
525
478
|
}
|
|
526
479
|
const linesFromAnswers = answers.map(
|
|
@@ -528,10 +481,10 @@ function storeSecrets(environment, answers) {
|
|
|
528
481
|
);
|
|
529
482
|
const linesFromEnvConfig = Object.entries(envConfig).filter(([name]) => !answers.find((update) => update.name === name)).map(([name, value]) => `${name}="${value}"`);
|
|
530
483
|
const allLines = [...linesFromEnvConfig, ...linesFromAnswers].sort();
|
|
531
|
-
(0,
|
|
484
|
+
(0, import_fs.writeFileSync)(`.env.${environment}`, allLines.join("\n"));
|
|
532
485
|
}
|
|
533
486
|
function readYamlFile(filePath) {
|
|
534
|
-
const fileContent =
|
|
487
|
+
const fileContent = import_fs.default.readFileSync(filePath, "utf8");
|
|
535
488
|
return yaml.load(fileContent);
|
|
536
489
|
}
|
|
537
490
|
function writeYamlFile(filePath, data) {
|
|
@@ -544,16 +497,16 @@ function writeYamlFile(filePath, data) {
|
|
|
544
497
|
noRefs: true,
|
|
545
498
|
sortKeys: false
|
|
546
499
|
});
|
|
547
|
-
|
|
548
|
-
} catch (
|
|
549
|
-
throw new Error(`Failed to write inventory file: ${
|
|
500
|
+
import_fs.default.writeFileSync(filePath, yamlContent, "utf8");
|
|
501
|
+
} catch (error4) {
|
|
502
|
+
throw new Error(`Failed to write inventory file: ${error4}`);
|
|
550
503
|
}
|
|
551
504
|
}
|
|
552
|
-
var
|
|
505
|
+
var import_fs, yaml, import_dotenv;
|
|
553
506
|
var init_utils = __esm({
|
|
554
507
|
"src/environment/utils.ts"() {
|
|
555
508
|
"use strict";
|
|
556
|
-
|
|
509
|
+
import_fs = __toESM(require("fs"));
|
|
557
510
|
yaml = __toESM(require("js-yaml"));
|
|
558
511
|
import_dotenv = __toESM(require("dotenv"));
|
|
559
512
|
}
|
|
@@ -606,29 +559,29 @@ function extractWorkerNodes(data) {
|
|
|
606
559
|
return worker_hosts;
|
|
607
560
|
}
|
|
608
561
|
function copyChartsValues(env, values) {
|
|
609
|
-
const srcDir =
|
|
610
|
-
const destDir =
|
|
611
|
-
|
|
562
|
+
const srcDir = import_path2.default.resolve(__dirname, "templates", "charts-values");
|
|
563
|
+
const destDir = import_path2.default.resolve(process.cwd(), "environments", env);
|
|
564
|
+
import_fs2.default.mkdirSync(destDir, { recursive: true });
|
|
612
565
|
values["lets_encrypt"] = values["traefik_mode"] === "lets_encrypt";
|
|
613
566
|
values["static_ssl"] = values["traefik_mode"] === "static_ssl";
|
|
614
567
|
values["opencrvs_environment"] = env;
|
|
615
568
|
function copyRecursive(src, dest) {
|
|
616
|
-
const stat =
|
|
569
|
+
const stat = import_fs2.default.statSync(src);
|
|
617
570
|
if (stat.isDirectory()) {
|
|
618
|
-
|
|
619
|
-
for (const item of
|
|
620
|
-
copyRecursive(
|
|
571
|
+
import_fs2.default.mkdirSync(dest, { recursive: true });
|
|
572
|
+
for (const item of import_fs2.default.readdirSync(src)) {
|
|
573
|
+
copyRecursive(import_path2.default.join(src, item), import_path2.default.join(dest, item));
|
|
621
574
|
}
|
|
622
575
|
} else {
|
|
623
|
-
const content =
|
|
576
|
+
const content = import_fs2.default.readFileSync(src, "utf8");
|
|
624
577
|
const template = import_handlebars.default.compile(content);
|
|
625
578
|
const updated = template(values);
|
|
626
579
|
const isOverridesFile = dest.endsWith("override.yaml");
|
|
627
|
-
if (isOverridesFile &&
|
|
580
|
+
if (isOverridesFile && import_fs2.default.existsSync(dest)) {
|
|
628
581
|
log(` \u21B7 Skipped existing overrides file: ${dest}`);
|
|
629
582
|
return;
|
|
630
583
|
}
|
|
631
|
-
|
|
584
|
+
import_fs2.default.writeFileSync(dest, updated, "utf8");
|
|
632
585
|
log(` \u2713 Created: ${dest}`);
|
|
633
586
|
}
|
|
634
587
|
}
|
|
@@ -639,31 +592,36 @@ function copyChartsValues(env, values) {
|
|
|
639
592
|
`);
|
|
640
593
|
}
|
|
641
594
|
function generateInventory(env, values) {
|
|
642
|
-
const templatePath =
|
|
595
|
+
const templatePath = import_path2.default.join(
|
|
643
596
|
__dirname,
|
|
644
597
|
"templates",
|
|
645
598
|
"inventory",
|
|
646
599
|
"inventory.template.yml"
|
|
647
600
|
);
|
|
648
|
-
const outputPath =
|
|
649
|
-
|
|
601
|
+
const outputPath = import_path2.default.join(
|
|
602
|
+
process.cwd(),
|
|
603
|
+
"infrastructure",
|
|
604
|
+
"server-setup",
|
|
605
|
+
"inventory",
|
|
606
|
+
`${env}.yml`
|
|
607
|
+
);
|
|
608
|
+
const templateFile = import_fs2.default.readFileSync(templatePath, "utf-8");
|
|
650
609
|
const template = import_handlebars.default.compile(templateFile);
|
|
651
610
|
values["single_node"] = values["kube_worker_nodes"].length > 0 || values["backup_host"] ? "false" : "true";
|
|
652
611
|
const updated = template(values);
|
|
653
|
-
|
|
654
|
-
|
|
612
|
+
import_fs2.default.mkdirSync(import_path2.default.dirname(outputPath), { recursive: true });
|
|
613
|
+
import_fs2.default.writeFileSync(outputPath, updated);
|
|
655
614
|
log(`
|
|
656
615
|
\u2705 Generated inventory file at ${outputPath}
|
|
657
616
|
`);
|
|
658
617
|
}
|
|
659
|
-
var
|
|
618
|
+
var import_fs2, import_path2, import_handlebars;
|
|
660
619
|
var init_templates = __esm({
|
|
661
620
|
"src/environment/templates.ts"() {
|
|
662
621
|
"use strict";
|
|
663
|
-
|
|
664
|
-
|
|
622
|
+
import_fs2 = __toESM(require("fs"));
|
|
623
|
+
import_path2 = __toESM(require("path"));
|
|
665
624
|
init_logger();
|
|
666
|
-
init_paths();
|
|
667
625
|
import_handlebars = __toESM(require("handlebars"));
|
|
668
626
|
import_handlebars.default.registerHelper("data_label_idx", function(value) {
|
|
669
627
|
return parseInt(value) + 2;
|
|
@@ -1279,7 +1237,7 @@ function getCurrentUserSSHKeys() {
|
|
|
1279
1237
|
keys.push(keyContent);
|
|
1280
1238
|
}
|
|
1281
1239
|
}
|
|
1282
|
-
} catch (
|
|
1240
|
+
} catch (error4) {
|
|
1283
1241
|
continue;
|
|
1284
1242
|
}
|
|
1285
1243
|
}
|
|
@@ -1815,7 +1773,6 @@ var init_setup_environment = __esm({
|
|
|
1815
1773
|
init_editor_questions();
|
|
1816
1774
|
init_questions_helper();
|
|
1817
1775
|
init_manage_users();
|
|
1818
|
-
init_paths();
|
|
1819
1776
|
ALL_QUESTIONS = [];
|
|
1820
1777
|
ALL_ANSWERS = [];
|
|
1821
1778
|
ALL_QUESTIONS.push(
|
|
@@ -1979,7 +1936,9 @@ var init_setup_environment = __esm({
|
|
|
1979
1936
|
);
|
|
1980
1937
|
const kubeWorkerNodes = infrastructure.kubeWorkerNodes ? infrastructure.kubeWorkerNodes.split(",").map((ip) => ip.trim()) : [];
|
|
1981
1938
|
log("\n", import_kleur4.default.bold().underline("SSH Users"), "\n");
|
|
1982
|
-
const users = await manageUsers(
|
|
1939
|
+
const users = await manageUsers(
|
|
1940
|
+
`infrastructure/server-setup/inventory/${environment}.yml`
|
|
1941
|
+
);
|
|
1983
1942
|
log("\n", import_kleur4.default.bold().underline("Traefik SSL Certificate"), "\n");
|
|
1984
1943
|
const sslCertExists = findExistingValue(
|
|
1985
1944
|
"SSL_CRT",
|
|
@@ -2793,11 +2752,11 @@ __export(update_workflows_exports, {
|
|
|
2793
2752
|
updateWorkflowEnvironments: () => updateWorkflowEnvironments
|
|
2794
2753
|
});
|
|
2795
2754
|
async function extractInfrastructureNames() {
|
|
2796
|
-
const files =
|
|
2797
|
-
const infraEnvironments = files.map((file) => (0,
|
|
2755
|
+
const files = glob.sync("infrastructure/server-setup/inventory/*.yml");
|
|
2756
|
+
const infraEnvironments = files.map((file) => (0, import_path3.basename)(file, ".yml"));
|
|
2798
2757
|
if (infraEnvironments.length === 0) {
|
|
2799
2758
|
console.log(
|
|
2800
|
-
|
|
2759
|
+
"\u26A0\uFE0F Warning: No environment directories found in infrastructure/server-setup/inventory/"
|
|
2801
2760
|
);
|
|
2802
2761
|
return [];
|
|
2803
2762
|
}
|
|
@@ -2807,8 +2766,8 @@ async function extractInfrastructureNames() {
|
|
|
2807
2766
|
async function extractEnvironmentNames() {
|
|
2808
2767
|
const entries = await (0, import_promises.readdir)("environments");
|
|
2809
2768
|
const environments = entries.filter((entry) => {
|
|
2810
|
-
const fullPath = (0,
|
|
2811
|
-
return (0,
|
|
2769
|
+
const fullPath = (0, import_path3.join)("environments", entry);
|
|
2770
|
+
return (0, import_fs3.statSync)(fullPath).isDirectory();
|
|
2812
2771
|
});
|
|
2813
2772
|
if (environments.length === 0) {
|
|
2814
2773
|
console.log(
|
|
@@ -2834,7 +2793,7 @@ async function updateWorkflows(envList, config) {
|
|
|
2834
2793
|
const { workflows } = config;
|
|
2835
2794
|
for (const workflowPath of workflows) {
|
|
2836
2795
|
try {
|
|
2837
|
-
const fileContents = (0,
|
|
2796
|
+
const fileContents = (0, import_fs3.readFileSync)(workflowPath, "utf8");
|
|
2838
2797
|
const workflowData = yaml2.load(fileContents);
|
|
2839
2798
|
if (!workflowData?.on?.workflow_dispatch?.inputs?.environment?.options) {
|
|
2840
2799
|
throw new Error(
|
|
@@ -2842,15 +2801,15 @@ async function updateWorkflows(envList, config) {
|
|
|
2842
2801
|
);
|
|
2843
2802
|
}
|
|
2844
2803
|
const updatedContent = updateOptionsInYaml(fileContents, envList);
|
|
2845
|
-
(0,
|
|
2804
|
+
(0, import_fs3.writeFileSync)(workflowPath, updatedContent, "utf8");
|
|
2846
2805
|
log(` \u2713 Successfully updated ${workflowPath}`);
|
|
2847
|
-
} catch (
|
|
2806
|
+
} catch (error4) {
|
|
2848
2807
|
console.error(
|
|
2849
2808
|
`
|
|
2850
2809
|
\u26A0\uFE0F Error updating ${workflowPath} with environments: [${envList.join(", ")}]`
|
|
2851
2810
|
);
|
|
2852
|
-
console.error(`\u2717 Failed to update ${workflowPath}:`,
|
|
2853
|
-
throw
|
|
2811
|
+
console.error(`\u2717 Failed to update ${workflowPath}:`, error4);
|
|
2812
|
+
throw error4;
|
|
2854
2813
|
}
|
|
2855
2814
|
}
|
|
2856
2815
|
}
|
|
@@ -2891,111 +2850,21 @@ async function updateWorkflowEnvironments() {
|
|
|
2891
2850
|
} else {
|
|
2892
2851
|
log("\u2139\uFE0F No workflows were updated.");
|
|
2893
2852
|
}
|
|
2894
|
-
} catch (
|
|
2895
|
-
console.error("\n\u274C Error updating workflows:",
|
|
2853
|
+
} catch (error4) {
|
|
2854
|
+
console.error("\n\u274C Error updating workflows:", error4);
|
|
2896
2855
|
process.exit(1);
|
|
2897
2856
|
}
|
|
2898
2857
|
}
|
|
2899
|
-
var import_promises,
|
|
2858
|
+
var import_promises, import_fs3, import_path3, glob, yaml2;
|
|
2900
2859
|
var init_update_workflows = __esm({
|
|
2901
2860
|
"src/environment/update-workflows.ts"() {
|
|
2902
2861
|
"use strict";
|
|
2903
2862
|
import_promises = require("fs/promises");
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2863
|
+
import_fs3 = require("fs");
|
|
2864
|
+
import_path3 = require("path");
|
|
2865
|
+
glob = __toESM(require("glob"));
|
|
2907
2866
|
yaml2 = __toESM(require("js-yaml"));
|
|
2908
2867
|
init_logger();
|
|
2909
|
-
init_paths();
|
|
2910
|
-
}
|
|
2911
|
-
});
|
|
2912
|
-
|
|
2913
|
-
// src/environment/upgrade.ts
|
|
2914
|
-
var upgrade_exports = {};
|
|
2915
|
-
__export(upgrade_exports, {
|
|
2916
|
-
upgradeEnvironmentLayout: () => upgradeEnvironmentLayout
|
|
2917
|
-
});
|
|
2918
|
-
function moveFileIfDestinationMissing(sourcePath, destinationPath) {
|
|
2919
|
-
if (!(0, import_fs5.existsSync)(sourcePath)) {
|
|
2920
|
-
return false;
|
|
2921
|
-
}
|
|
2922
|
-
if ((0, import_fs5.existsSync)(destinationPath)) {
|
|
2923
|
-
warn(
|
|
2924
|
-
`\u26A0\uFE0F Skipped ${sourcePath}; destination already exists at ${destinationPath}`
|
|
2925
|
-
);
|
|
2926
|
-
return false;
|
|
2927
|
-
}
|
|
2928
|
-
(0, import_fs5.mkdirSync)((0, import_path5.dirname)(destinationPath), { recursive: true });
|
|
2929
|
-
(0, import_fs5.renameSync)(sourcePath, destinationPath);
|
|
2930
|
-
log(` \u2713 Moved ${sourcePath} -> ${destinationPath}`);
|
|
2931
|
-
return true;
|
|
2932
|
-
}
|
|
2933
|
-
function migrateInventoryFiles() {
|
|
2934
|
-
const oldInventoryFiles = findOldInventoryFiles();
|
|
2935
|
-
if (oldInventoryFiles.length === 0) {
|
|
2936
|
-
log(`\u2139\uFE0F No old inventory files found at ${OLD_INVENTORY_DIR}`);
|
|
2937
|
-
return false;
|
|
2938
|
-
}
|
|
2939
|
-
log(import_kleur5.default.bold("\nMigrating Ansible inventory files"));
|
|
2940
|
-
let didMoveInventory = false;
|
|
2941
|
-
for (const oldInventoryFile of oldInventoryFiles) {
|
|
2942
|
-
const environment = getEnvironmentNameFromOldInventoryPath(oldInventoryFile);
|
|
2943
|
-
didMoveInventory = moveFileIfDestinationMissing(
|
|
2944
|
-
oldInventoryFile,
|
|
2945
|
-
getEnvironmentInventoryPath(environment)
|
|
2946
|
-
) || didMoveInventory;
|
|
2947
|
-
}
|
|
2948
|
-
try {
|
|
2949
|
-
if ((0, import_fs5.existsSync)(OLD_INVENTORY_DIR) && (0, import_fs5.readdirSync)(OLD_INVENTORY_DIR).length === 0) {
|
|
2950
|
-
(0, import_fs5.rmdirSync)(OLD_INVENTORY_DIR);
|
|
2951
|
-
log(` \u2713 Removed empty ${OLD_INVENTORY_DIR}`);
|
|
2952
|
-
}
|
|
2953
|
-
} catch {
|
|
2954
|
-
warn(`\u26A0\uFE0F Could not remove ${OLD_INVENTORY_DIR}; please review it manually`);
|
|
2955
|
-
}
|
|
2956
|
-
return didMoveInventory;
|
|
2957
|
-
}
|
|
2958
|
-
function migrateInventoryVarsFiles() {
|
|
2959
|
-
if (!(0, import_fs5.existsSync)("environments")) {
|
|
2960
|
-
return false;
|
|
2961
|
-
}
|
|
2962
|
-
log(import_kleur5.default.bold("\nMigrating optional inventory variable files"));
|
|
2963
|
-
let didMoveVars = false;
|
|
2964
|
-
for (const entry of (0, import_fs5.readdirSync)("environments")) {
|
|
2965
|
-
const environmentDir = (0, import_path5.join)("environments", entry);
|
|
2966
|
-
if (!(0, import_fs5.statSync)(environmentDir).isDirectory()) {
|
|
2967
|
-
continue;
|
|
2968
|
-
}
|
|
2969
|
-
didMoveVars = moveFileIfDestinationMissing(
|
|
2970
|
-
(0, import_path5.join)(environmentDir, "inventory.override.yml"),
|
|
2971
|
-
getEnvironmentInventoryVarsPath(entry)
|
|
2972
|
-
) || didMoveVars;
|
|
2973
|
-
}
|
|
2974
|
-
if (!didMoveVars) {
|
|
2975
|
-
log(`\u2139\uFE0F No inventory override files found to rename to ${INVENTORY_VARS_FILE_NAME}`);
|
|
2976
|
-
}
|
|
2977
|
-
return didMoveVars;
|
|
2978
|
-
}
|
|
2979
|
-
async function upgradeEnvironmentLayout() {
|
|
2980
|
-
const didMoveInventory = migrateInventoryFiles();
|
|
2981
|
-
const didMoveVars = migrateInventoryVarsFiles();
|
|
2982
|
-
await updateWorkflowEnvironments();
|
|
2983
|
-
if (didMoveInventory || didMoveVars) {
|
|
2984
|
-
success("\n\u2705 Environment layout upgrade completed successfully.");
|
|
2985
|
-
return;
|
|
2986
|
-
}
|
|
2987
|
-
success("\n\u2705 Environment layout already uses the current structure.");
|
|
2988
|
-
}
|
|
2989
|
-
var import_fs5, import_path5, import_kleur5;
|
|
2990
|
-
var init_upgrade = __esm({
|
|
2991
|
-
"src/environment/upgrade.ts"() {
|
|
2992
|
-
"use strict";
|
|
2993
|
-
import_fs5 = require("fs");
|
|
2994
|
-
import_path5 = require("path");
|
|
2995
|
-
import_kleur5 = __toESM(require("kleur"));
|
|
2996
|
-
init_logger();
|
|
2997
|
-
init_paths();
|
|
2998
|
-
init_update_workflows();
|
|
2999
2868
|
}
|
|
3000
2869
|
});
|
|
3001
2870
|
|
|
@@ -3008,7 +2877,7 @@ async function select4(options) {
|
|
|
3008
2877
|
const inquirer = await import("@inquirer/prompts");
|
|
3009
2878
|
return inquirer.select(options);
|
|
3010
2879
|
}
|
|
3011
|
-
async function selectInventoryFile(dirPath = "./
|
|
2880
|
+
async function selectInventoryFile(dirPath = "./infrastructure/server-setup/inventory/") {
|
|
3012
2881
|
if (!fs4.existsSync(dirPath)) {
|
|
3013
2882
|
warn(`\u26A0\uFE0F No environment configuration directory found at ${dirPath}`);
|
|
3014
2883
|
warn(
|
|
@@ -3016,20 +2885,22 @@ async function selectInventoryFile(dirPath = "./environments") {
|
|
|
3016
2885
|
);
|
|
3017
2886
|
return null;
|
|
3018
2887
|
}
|
|
3019
|
-
const
|
|
3020
|
-
const filePath = path4.join(dirPath,
|
|
3021
|
-
|
|
2888
|
+
const files = fs4.readdirSync(dirPath).filter((file) => {
|
|
2889
|
+
const filePath = path4.join(dirPath, file);
|
|
2890
|
+
const isFile = fs4.statSync(filePath).isFile();
|
|
2891
|
+
const ext = path4.extname(file).slice(1).toLowerCase();
|
|
2892
|
+
return isFile && (ext === "yml" || ext === "yaml");
|
|
3022
2893
|
}).sort();
|
|
3023
|
-
if (
|
|
2894
|
+
if (files.length === 0) {
|
|
3024
2895
|
warn(`\u26A0\uFE0F No environment configuration files found at ${dirPath}`);
|
|
3025
2896
|
warn(
|
|
3026
2897
|
"Hint: If this is a new infrastructure repository, run `opencrvs environment init` first."
|
|
3027
2898
|
);
|
|
3028
2899
|
return null;
|
|
3029
2900
|
}
|
|
3030
|
-
const choices =
|
|
3031
|
-
name:
|
|
3032
|
-
value:
|
|
2901
|
+
const choices = files.map((file) => ({
|
|
2902
|
+
name: path4.basename(file, path4.extname(file)),
|
|
2903
|
+
value: path4.join(dirPath, file)
|
|
3033
2904
|
}));
|
|
3034
2905
|
const selectedFile = await select4({
|
|
3035
2906
|
message: "Select environment (inventory file) to load users:",
|
|
@@ -3038,34 +2909,33 @@ async function selectInventoryFile(dirPath = "./environments") {
|
|
|
3038
2909
|
return selectedFile;
|
|
3039
2910
|
}
|
|
3040
2911
|
async function manageEnvironmentUsers() {
|
|
3041
|
-
console.log("\n",
|
|
2912
|
+
console.log("\n", import_kleur5.default.bold().underline("Manage users"), "\n");
|
|
3042
2913
|
const inventory_file = await selectInventoryFile();
|
|
3043
2914
|
if (!inventory_file) {
|
|
3044
2915
|
return;
|
|
3045
2916
|
}
|
|
3046
2917
|
await manageUsers(inventory_file);
|
|
3047
2918
|
}
|
|
3048
|
-
var fs4, path4,
|
|
2919
|
+
var fs4, path4, import_kleur5;
|
|
3049
2920
|
var init_users = __esm({
|
|
3050
2921
|
"src/environment/users.ts"() {
|
|
3051
2922
|
"use strict";
|
|
3052
2923
|
fs4 = __toESM(require("fs"));
|
|
3053
2924
|
path4 = __toESM(require("path"));
|
|
3054
|
-
|
|
2925
|
+
import_kleur5 = __toESM(require("kleur"));
|
|
3055
2926
|
init_manage_users();
|
|
3056
2927
|
init_logger();
|
|
3057
|
-
init_paths();
|
|
3058
2928
|
}
|
|
3059
2929
|
});
|
|
3060
2930
|
|
|
3061
2931
|
// src/environment/swarm-to-k8s.ts
|
|
3062
2932
|
var swarm_to_k8s_exports = {};
|
|
3063
|
-
var path5,
|
|
2933
|
+
var path5, import_kleur6, import_core2;
|
|
3064
2934
|
var init_swarm_to_k8s = __esm({
|
|
3065
2935
|
"src/environment/swarm-to-k8s.ts"() {
|
|
3066
2936
|
"use strict";
|
|
3067
2937
|
path5 = __toESM(require("path"));
|
|
3068
|
-
|
|
2938
|
+
import_kleur6 = __toESM(require("kleur"));
|
|
3069
2939
|
init_logger();
|
|
3070
2940
|
init_utils();
|
|
3071
2941
|
init_templates();
|
|
@@ -3074,7 +2944,7 @@ var init_swarm_to_k8s = __esm({
|
|
|
3074
2944
|
init_github();
|
|
3075
2945
|
(async () => {
|
|
3076
2946
|
log(
|
|
3077
|
-
|
|
2947
|
+
import_kleur6.default.bold(
|
|
3078
2948
|
"------------------------------------------------\nOpenCRVS Infrastructure migration script: \nMigrating Swarm configurations to Kubernetes\n------------------------------------------------\n"
|
|
3079
2949
|
)
|
|
3080
2950
|
);
|
|
@@ -3105,7 +2975,7 @@ var init_swarm_to_k8s = __esm({
|
|
|
3105
2975
|
);
|
|
3106
2976
|
process.exit(0);
|
|
3107
2977
|
}
|
|
3108
|
-
log(
|
|
2978
|
+
log(import_kleur6.default.bold().underline("Migration properties:"));
|
|
3109
2979
|
log(` \u2713 Environment: ${environment}`);
|
|
3110
2980
|
const old_inventory_path = process.env.OLD_INVENTORY_PATH || "";
|
|
3111
2981
|
if (!old_inventory_path) {
|
|
@@ -3423,9 +3293,8 @@ async function runUpgrade(dockerSwarm) {
|
|
|
3423
3293
|
}
|
|
3424
3294
|
|
|
3425
3295
|
// src/environment/index.ts
|
|
3426
|
-
var
|
|
3427
|
-
var
|
|
3428
|
-
init_paths();
|
|
3296
|
+
var import_fs4 = require("fs");
|
|
3297
|
+
var import_path4 = require("path");
|
|
3429
3298
|
var REQUIRED_REPOSITORY_DIRECTORIES = [
|
|
3430
3299
|
".github/workflows",
|
|
3431
3300
|
"environments",
|
|
@@ -3435,7 +3304,7 @@ function validateRepositoryStructure(repositoryRoot = process.cwd()) {
|
|
|
3435
3304
|
const missingDirectories = REQUIRED_REPOSITORY_DIRECTORIES.filter(
|
|
3436
3305
|
(directory) => {
|
|
3437
3306
|
try {
|
|
3438
|
-
return !(0,
|
|
3307
|
+
return !(0, import_fs4.statSync)((0, import_path4.resolve)(repositoryRoot, directory)).isDirectory();
|
|
3439
3308
|
} catch {
|
|
3440
3309
|
return true;
|
|
3441
3310
|
}
|
|
@@ -3449,14 +3318,8 @@ function validateRepositoryStructure(repositoryRoot = process.cwd()) {
|
|
|
3449
3318
|
}
|
|
3450
3319
|
async function runEnvironmentInit() {
|
|
3451
3320
|
validateRepositoryStructure();
|
|
3452
|
-
assertNoOldInventoryLayout();
|
|
3453
3321
|
await Promise.resolve().then(() => (init_setup_environment(), setup_environment_exports));
|
|
3454
3322
|
}
|
|
3455
|
-
async function runEnvironmentUpgrade() {
|
|
3456
|
-
validateRepositoryStructure();
|
|
3457
|
-
const { upgradeEnvironmentLayout: upgradeEnvironmentLayout2 } = await Promise.resolve().then(() => (init_upgrade(), upgrade_exports));
|
|
3458
|
-
await upgradeEnvironmentLayout2();
|
|
3459
|
-
}
|
|
3460
3323
|
async function runEnvironmentUpdateWorkflows() {
|
|
3461
3324
|
validateRepositoryStructure();
|
|
3462
3325
|
const { updateWorkflowEnvironments: updateWorkflowEnvironments2 } = await Promise.resolve().then(() => (init_update_workflows(), update_workflows_exports));
|
|
@@ -3526,7 +3389,6 @@ Usage: opencrvs environment <subcommand>
|
|
|
3526
3389
|
|
|
3527
3390
|
Subcommands:
|
|
3528
3391
|
init Initialise a new environment
|
|
3529
|
-
upgrade Upgrade existing environment configuration layout
|
|
3530
3392
|
update-workflows Update workflow environment options
|
|
3531
3393
|
users Manage environment users
|
|
3532
3394
|
swarm-to-k8s Migrate Docker Swarm configuration to Kubernetes
|
|
@@ -3537,8 +3399,6 @@ Subcommands:
|
|
|
3537
3399
|
switch (subcommand) {
|
|
3538
3400
|
case "init":
|
|
3539
3401
|
return runEnvironmentCommand("initialisation", runEnvironmentInit);
|
|
3540
|
-
case "upgrade":
|
|
3541
|
-
return runEnvironmentCommand("environment upgrade", runEnvironmentUpgrade);
|
|
3542
3402
|
case "update-workflows":
|
|
3543
3403
|
return runEnvironmentCommand(
|
|
3544
3404
|
"workflow update",
|
|
@@ -3559,10 +3419,10 @@ Subcommands:
|
|
|
3559
3419
|
async function runEnvironmentCommand(operation, command) {
|
|
3560
3420
|
try {
|
|
3561
3421
|
await command();
|
|
3562
|
-
} catch (
|
|
3422
|
+
} catch (error4) {
|
|
3563
3423
|
console.error(
|
|
3564
3424
|
`Environment ${operation} failed:`,
|
|
3565
|
-
|
|
3425
|
+
error4 instanceof Error ? error4.message : error4
|
|
3566
3426
|
);
|
|
3567
3427
|
process.exit(1);
|
|
3568
3428
|
}
|
|
@@ -3588,8 +3448,8 @@ async function handleUpgrade() {
|
|
|
3588
3448
|
try {
|
|
3589
3449
|
await runUpgrade(dockerSwarm);
|
|
3590
3450
|
console.log("Upgrade completed successfully!");
|
|
3591
|
-
} catch (
|
|
3592
|
-
console.error("Upgrade failed:",
|
|
3451
|
+
} catch (error4) {
|
|
3452
|
+
console.error("Upgrade failed:", error4);
|
|
3593
3453
|
process.exit(1);
|
|
3594
3454
|
}
|
|
3595
3455
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export declare function runEnvironmentInit(): Promise<void>;
|
|
2
|
-
export declare function runEnvironmentUpgrade(): Promise<void>;
|
|
3
2
|
export declare function runEnvironmentUpdateWorkflows(): Promise<void>;
|
|
4
3
|
export declare function runEnvironmentUsers(): Promise<void>;
|
|
5
4
|
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":"AAwCA,wBAAsB,kBAAkB,kBAGvC;AAED,wBAAsB,6BAA6B,kBAIlD;AAED,wBAAsB,mBAAmB,kBAIxC;AAED,wBAAsB,wBAAwB,kBAG7C"}
|
|
@@ -20,13 +20,11 @@ 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;
|
|
24
23
|
exports.runEnvironmentUpdateWorkflows = runEnvironmentUpdateWorkflows;
|
|
25
24
|
exports.runEnvironmentUsers = runEnvironmentUsers;
|
|
26
25
|
exports.runEnvironmentSwarmToK8s = runEnvironmentSwarmToK8s;
|
|
27
26
|
const fs_1 = require("fs");
|
|
28
27
|
const path_1 = require("path");
|
|
29
|
-
const paths_1 = require("./paths");
|
|
30
28
|
const REQUIRED_REPOSITORY_DIRECTORIES = [
|
|
31
29
|
'.github/workflows',
|
|
32
30
|
'environments',
|
|
@@ -48,17 +46,9 @@ function validateRepositoryStructure(repositoryRoot = process.cwd()) {
|
|
|
48
46
|
function runEnvironmentInit() {
|
|
49
47
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50
48
|
validateRepositoryStructure();
|
|
51
|
-
(0, paths_1.assertNoOldInventoryLayout)();
|
|
52
49
|
yield import('./setup-environment.js');
|
|
53
50
|
});
|
|
54
51
|
}
|
|
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
|
-
}
|
|
62
52
|
function runEnvironmentUpdateWorkflows() {
|
|
63
53
|
return __awaiter(this, void 0, void 0, function* () {
|
|
64
54
|
validateRepositoryStructure();
|
|
@@ -59,7 +59,6 @@ const questions_1 = require("./questions");
|
|
|
59
59
|
const editor_questions_1 = require("./editor-questions");
|
|
60
60
|
const questions_helper_1 = require("./questions-helper");
|
|
61
61
|
const manage_users_1 = require("./manage-users");
|
|
62
|
-
const paths_1 = require("./paths");
|
|
63
62
|
function questionToPrompt(_a) {
|
|
64
63
|
var { valueType, valueLabel, scope } = _a, promptOptions = __rest(_a, ["valueType", "valueLabel", "scope"]);
|
|
65
64
|
return promptOptions;
|
|
@@ -272,7 +271,7 @@ ALL_QUESTIONS.push(...questions_1.githubTokenQuestion, ...questions_1.githubOthe
|
|
|
272
271
|
? infrastructure.kubeWorkerNodes.split(',').map((ip) => ip.trim())
|
|
273
272
|
: [];
|
|
274
273
|
(0, logger_1.log)('\n', kleur_1.default.bold().underline('SSH Users'), '\n');
|
|
275
|
-
const users = yield (0, manage_users_1.manageUsers)(
|
|
274
|
+
const users = yield (0, manage_users_1.manageUsers)(`infrastructure/server-setup/inventory/${environment}.yml`);
|
|
276
275
|
(0, logger_1.log)('\n', kleur_1.default.bold().underline('Traefik SSL Certificate'), '\n');
|
|
277
276
|
const sslCertExists = (0, utils_1.findExistingValue)('SSL_CRT', 'SECRET', 'ENVIRONMENT', existingValues);
|
|
278
277
|
let ssl_answers = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/environment/templates.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/environment/templates.ts"],"names":[],"mappings":"AAsBA,wBAAgB,QAAQ,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG,CAKvC;AAID,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG,CAYpD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM,CAWpD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM,CASnD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM,EAAE,CAStD;AAGD;;;;GAIG;AACH;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,QA0CzC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QA4BzE"}
|
|
@@ -34,7 +34,6 @@ exports.generateInventory = generateInventory;
|
|
|
34
34
|
const fs_1 = __importDefault(require("fs"));
|
|
35
35
|
const path_1 = __importDefault(require("path"));
|
|
36
36
|
const logger_1 = require("./logger");
|
|
37
|
-
const paths_1 = require("./paths");
|
|
38
37
|
const handlebars_1 = __importDefault(require("handlebars"));
|
|
39
38
|
// Register a helper to increment numbers
|
|
40
39
|
handlebars_1.default.registerHelper('data_label_idx', function (value) {
|
|
@@ -150,7 +149,7 @@ function copyChartsValues(env, values) {
|
|
|
150
149
|
function generateInventory(env, values) {
|
|
151
150
|
// Template and output paths
|
|
152
151
|
const templatePath = path_1.default.join(__dirname, 'templates', 'inventory', 'inventory.template.yml');
|
|
153
|
-
const outputPath = path_1.default.
|
|
152
|
+
const outputPath = path_1.default.join(process.cwd(), 'infrastructure', 'server-setup', 'inventory', `${env}.yml`);
|
|
154
153
|
const templateFile = fs_1.default.readFileSync(templatePath, 'utf-8');
|
|
155
154
|
const template = handlebars_1.default.compile(templateFile);
|
|
156
155
|
values['single_node'] =
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-workflows.d.ts","sourceRoot":"","sources":["../../src/environment/update-workflows.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"update-workflows.d.ts","sourceRoot":"","sources":["../../src/environment/update-workflows.ts"],"names":[],"mappings":"AAgHA,wBAAsB,0BAA0B,IAAI,OAAO,CAAC,IAAI,CAAC,CAgDhE"}
|
|
@@ -60,13 +60,12 @@ const path_1 = require("path");
|
|
|
60
60
|
const glob = __importStar(require("glob"));
|
|
61
61
|
const yaml = __importStar(require("js-yaml"));
|
|
62
62
|
const logger_1 = require("./logger");
|
|
63
|
-
const paths_1 = require("./paths");
|
|
64
63
|
function extractInfrastructureNames() {
|
|
65
64
|
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
-
const files = glob.sync(
|
|
67
|
-
const infraEnvironments = files.map((file) => (0, path_1.basename)(
|
|
65
|
+
const files = glob.sync('infrastructure/server-setup/inventory/*.yml');
|
|
66
|
+
const infraEnvironments = files.map((file) => (0, path_1.basename)(file, '.yml'));
|
|
68
67
|
if (infraEnvironments.length === 0) {
|
|
69
|
-
console.log(
|
|
68
|
+
console.log('⚠️ Warning: No environment directories found in infrastructure/server-setup/inventory/');
|
|
70
69
|
return [];
|
|
71
70
|
}
|
|
72
71
|
(0, logger_1.log)('🔍 Found infrastructure configurations:', infraEnvironments.join(', '));
|
|
@@ -62,7 +62,6 @@ const path = __importStar(require("path"));
|
|
|
62
62
|
const kleur_1 = __importDefault(require("kleur"));
|
|
63
63
|
const manage_users_1 = require("./manage-users");
|
|
64
64
|
const logger_1 = require("./logger");
|
|
65
|
-
const paths_1 = require("./paths");
|
|
66
65
|
function select(options) {
|
|
67
66
|
return __awaiter(this, void 0, void 0, function* () {
|
|
68
67
|
const inquirer = yield import('@inquirer/prompts');
|
|
@@ -77,29 +76,32 @@ function select(options) {
|
|
|
77
76
|
* * @returns {string} Inventory file
|
|
78
77
|
*/
|
|
79
78
|
function selectInventoryFile() {
|
|
80
|
-
return __awaiter(this, arguments, void 0, function* (dirPath = './
|
|
79
|
+
return __awaiter(this, arguments, void 0, function* (dirPath = './infrastructure/server-setup/inventory/') {
|
|
81
80
|
// Check if directory exists
|
|
82
81
|
if (!fs.existsSync(dirPath)) {
|
|
83
82
|
(0, logger_1.warn)(`⚠️ No environment configuration directory found at ${dirPath}`);
|
|
84
83
|
(0, logger_1.warn)('Hint: If this is a new infrastructure repository, run `opencrvs environment init` first.');
|
|
85
84
|
return null;
|
|
86
85
|
}
|
|
87
|
-
|
|
86
|
+
// Read and filter files
|
|
87
|
+
const files = fs
|
|
88
88
|
.readdirSync(dirPath)
|
|
89
|
-
.filter((
|
|
90
|
-
const filePath = path.join(dirPath,
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
.filter((file) => {
|
|
90
|
+
const filePath = path.join(dirPath, file);
|
|
91
|
+
const isFile = fs.statSync(filePath).isFile();
|
|
92
|
+
const ext = path.extname(file).slice(1).toLowerCase();
|
|
93
|
+
return isFile && (ext === 'yml' || ext === 'yaml');
|
|
93
94
|
})
|
|
94
95
|
.sort();
|
|
95
|
-
if (
|
|
96
|
+
if (files.length === 0) {
|
|
96
97
|
(0, logger_1.warn)(`⚠️ No environment configuration files found at ${dirPath}`);
|
|
97
98
|
(0, logger_1.warn)('Hint: If this is a new infrastructure repository, run `opencrvs environment init` first.');
|
|
98
99
|
return null;
|
|
99
100
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
// Create choices - remove extension from display
|
|
102
|
+
const choices = files.map((file) => ({
|
|
103
|
+
name: path.basename(file, path.extname(file)),
|
|
104
|
+
value: path.join(dirPath, file)
|
|
103
105
|
}));
|
|
104
106
|
const selectedFile = yield select({
|
|
105
107
|
message: 'Select environment (inventory file) to load users:',
|
|
Binary file
|
package/package.json
CHANGED
package/tsconfig.tsbuildinfo
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"7.0.2","root":["./src/cli.ts","./src/api/index.ts","./src/application-config/index.ts","./src/conditionals/index.ts","./src/environment/custom-types.ts","./src/environment/derived-variables.ts","./src/environment/editor-questions.ts","./src/environment/git.ts","./src/environment/github.ts","./src/environment/index.ts","./src/environment/logger.ts","./src/environment/manage-users.ts","./src/environment/paths.ts","./src/environment/questions-helper.ts","./src/environment/questions.ts","./src/environment/setup-environment.ts","./src/environment/ssh-keygen.ts","./src/environment/swarm-to-k8s.ts","./src/environment/templates.ts","./src/environment/update-workflows.ts","./src/environment/upgrade.ts","./src/environment/users.ts","./src/environment/utils.ts","./src/events/deduplication.ts","./src/events/index.ts","./src/migrations/v2.0/add-birth-certificate-issuance-flag.ts","./src/migrations/v2.0/add-resend-invite-notification.ts","./src/migrations/v2.0/checkout-upstream-files.ts","./src/migrations/v2.0/convert-config-files-to-ts.ts","./src/migrations/v2.0/convert-paragraph-to-heading.ts","./src/migrations/v2.0/create-events-index.ts","./src/migrations/v2.0/delete-infrastructure-directory.ts","./src/migrations/v2.0/fix-accept-requested-registration-function-type.ts","./src/migrations/v2.0/index.ts","./src/migrations/v2.0/make-built-in-validate-actions-custom.ts","./src/migrations/v2.0/merge-infrastructure-directory.ts","./src/migrations/v2.0/migrate-application-config-url.ts","./src/migrations/v2.0/migrate-scopes.ts","./src/migrations/v2.0/migrate-validated-workqueue-status-to-flag.ts","./src/migrations/v2.0/migrate-workqueue-configs.ts","./src/migrations/v2.0/remove-delete-actions.ts","./src/migrations/v2.0/remove-demo-scope.ts","./src/migrations/v2.0/remove-deprecated-imports.ts","./src/migrations/v2.0/remove-fhir-url-helpers.ts","./src/migrations/v2.0/remove-hearth-migrations.ts","./src/migrations/v2.0/remove-old-statistics-service.ts","./src/migrations/v2.0/remove-pending-certification-flag.ts","./src/migrations/v2.0/remove-review-from-register-action.ts","./src/migrations/v2.0/remove-unused-environment-variables.ts","./src/migrations/v2.0/rename-api-paths.ts","./src/migrations/v2.0/rename-location-parent-id.ts","./src/migrations/v2.0/simplify-analytics-precalculations.ts","./src/migrations/v2.0/update-package-json.ts","./src/migrations/v2.1/add-explicit-correction-flags.ts","./src/migrations/v2.1/index.ts","./src/notification/index.ts","./src/scopes/index.ts"],"packageJsons":["../../node_modules/@hapi/boom/package.json","../../node_modules/@hapi/catbox/node_modules/@hapi/podium/package.json","../../node_modules/@hapi/catbox/package.json","../../node_modules/@hapi/hapi/node_modules/@hapi/podium/package.json","../../node_modules/@hapi/hapi/package.json","../../node_modules/@hapi/mimos/package.json","../../node_modules/@hapi/shot/package.json","../../node_modules/@hapi/statehood/node_modules/@hapi/iron/package.json","../../node_modules/@hapi/statehood/package.json","../../node_modules/@inquirer/checkbox/package.json","../../node_modules/@inquirer/core/package.json","../../node_modules/@inquirer/editor/package.json","../../node_modules/@inquirer/expand/package.json","../../node_modules/@inquirer/external-editor/package.json","../../node_modules/@inquirer/input/package.json","../../node_modules/@inquirer/number/package.json","../../node_modules/@inquirer/password/package.json","../../node_modules/@inquirer/prompts/node_modules/@inquirer/confirm/package.json","../../node_modules/@inquirer/prompts/package.json","../../node_modules/@inquirer/rawlist/package.json","../../node_modules/@inquirer/search/package.json","../../node_modules/@inquirer/select/package.json","../../node_modules/@inquirer/type/package.json","../../node_modules/@octokit/graphql/package.json","../../node_modules/@octokit/openapi-types/package.json","../../node_modules/@octokit/request-error/package.json","../../node_modules/@octokit/request/package.json","../../node_modules/@octokit/types/package.json","../../node_modules/@trpc/server/http/package.json","../../node_modules/@trpc/server/observable/package.json","../../node_modules/@trpc/server/package.json","../../node_modules/@trpc/server/unstable-core-do-not-import/package.json","../../node_modules/@ts-morph/common/package.json","../../node_modules/@types/js-yaml/package.json","../../node_modules/@types/libsodium-wrappers/package.json","../../node_modules/@types/lodash/package.json","../../node_modules/@types/node-fetch/package.json","../../node_modules/@types/node/package.json","../../node_modules/@types/prompts/package.json","../../node_modules/assert/package.json","../../node_modules/before-after-hook/package.json","../../node_modules/buffer/package.json","../../node_modules/colorette/package.json","../../node_modules/dotenv/package.json","../../node_modules/events/package.json","../../node_modules/form-data/package.json","../../node_modules/handlebars/package.json","../../node_modules/joi/package.json","../../node_modules/js-yaml/package.json","../../node_modules/kleur/package.json","../../node_modules/libsodium-wrappers/package.json","../../node_modules/lodash/package.json","../../node_modules/minipass/dist/commonjs/package.json","../../node_modules/minipass/package.json","../../node_modules/node-fetch/package.json","../../node_modules/pino-pretty/node_modules/pino-abstract-transport/package.json","../../node_modules/pino-pretty/package.json","../../node_modules/pino-std-serializers/package.json","../../node_modules/pino/package.json","../../node_modules/process/package.json","../../node_modules/prompts/package.json","../../node_modules/punycode/package.json","../../node_modules/querystring/package.json","../../node_modules/sonic-boom/package.json","../../node_modules/string_decoder/package.json","../../node_modules/superjson/package.json","../../node_modules/ts-morph/package.json","../../node_modules/typescript/package.json","../../node_modules/undici-types/package.json","../../node_modules/util/package.json","../../node_modules/zod-openapi/package.json","../../node_modules/zod/package.json","../../node_modules/zod/v4/classic/package.json","../../node_modules/zod/v4/core/package.json","../../node_modules/zod/v4/locales/package.json","../../node_modules/zod/v4/package.json","../commons/node_modules/ajv/package.json","../commons/package.json","../events/package.json","./node_modules/@octokit/core/package.json","./node_modules/@trpc/client/package.json","./node_modules/@types/node/package.json","./node_modules/@types/ssh2/package.json","./node_modules/glob/dist/commonjs/package.json","./node_modules/glob/package.json","./node_modules/kleur/package.json","./node_modules/lru-cache/dist/commonjs/package.json","./node_modules/lru-cache/package.json","./node_modules/minimatch/dist/commonjs/package.json","./node_modules/minimatch/package.json","./node_modules/path-scurry/dist/commonjs/package.json","./node_modules/path-scurry/package.json","./package.json"],"missingPackageJsons":["../../node_modules/@hapi/boom/lib/package.json","../../node_modules/@hapi/catbox/lib/package.json","../../node_modules/@hapi/catbox/node_modules/@hapi/podium/lib/package.json","../../node_modules/@hapi/hapi/lib/package.json","../../node_modules/@hapi/hapi/lib/types/package.json","../../node_modules/@hapi/hapi/lib/types/server/package.json","../../node_modules/@hapi/hapi/node_modules/@hapi/boom/package.json","../../node_modules/@hapi/hapi/node_modules/@hapi/catbox/package.json","../../node_modules/@hapi/hapi/node_modules/@hapi/mimos/package.json","../../node_modules/@hapi/hapi/node_modules/@hapi/podium/lib/package.json","../../node_modules/@hapi/hapi/node_modules/@hapi/shot/package.json","../../node_modules/@hapi/hapi/node_modules/@hapi/statehood/package.json","../../node_modules/@hapi/hapi/node_modules/http/package.json","../../node_modules/@hapi/hapi/node_modules/https/package.json","../../node_modules/@hapi/hapi/node_modules/joi/package.json","../../node_modules/@hapi/hapi/node_modules/stream/package.json","../../node_modules/@hapi/hapi/node_modules/url/package.json","../../node_modules/@hapi/hapi/node_modules/zlib/package.json","../../node_modules/@hapi/mimos/lib/package.json","../../node_modules/@hapi/shot/lib/package.json","../../node_modules/@hapi/statehood/lib/package.json","../../node_modules/@hapi/statehood/node_modules/@hapi/boom/package.json","../../node_modules/@hapi/statehood/node_modules/@hapi/iron/lib/package.json","../../node_modules/@inquirer/checkbox/dist/package.json","../../node_modules/@inquirer/core/dist/lib/package.json","../../node_modules/@inquirer/core/dist/lib/pagination/package.json","../../node_modules/@inquirer/core/dist/package.json","../../node_modules/@inquirer/core/node_modules/@inquirer/type/package.json","../../node_modules/@inquirer/editor/dist/package.json","../../node_modules/@inquirer/expand/dist/package.json","../../node_modules/@inquirer/external-editor/dist/package.json","../../node_modules/@inquirer/input/dist/package.json","../../node_modules/@inquirer/number/dist/package.json","../../node_modules/@inquirer/password/dist/package.json","../../node_modules/@inquirer/prompts/dist/package.json","../../node_modules/@inquirer/prompts/node_modules/@inquirer/checkbox/package.json","../../node_modules/@inquirer/prompts/node_modules/@inquirer/confirm/dist/package.json","../../node_modules/@inquirer/prompts/node_modules/@inquirer/core/package.json","../../node_modules/@inquirer/prompts/node_modules/@inquirer/editor/package.json","../../node_modules/@inquirer/prompts/node_modules/@inquirer/expand/package.json","../../node_modules/@inquirer/prompts/node_modules/@inquirer/input/package.json","../../node_modules/@inquirer/prompts/node_modules/@inquirer/number/package.json","../../node_modules/@inquirer/prompts/node_modules/@inquirer/password/package.json","../../node_modules/@inquirer/prompts/node_modules/@inquirer/rawlist/package.json","../../node_modules/@inquirer/prompts/node_modules/@inquirer/search/package.json","../../node_modules/@inquirer/prompts/node_modules/@inquirer/select/package.json","../../node_modules/@inquirer/prompts/node_modules/@inquirer/type/package.json","../../node_modules/@inquirer/prompts/node_modules/@types/node/package.json","../../node_modules/@inquirer/rawlist/dist/package.json","../../node_modules/@inquirer/search/dist/package.json","../../node_modules/@inquirer/select/dist/package.json","../../node_modules/@inquirer/type/dist/package.json","../../node_modules/@octokit/graphql/dist-types/package.json","../../node_modules/@octokit/request-error/dist-types/package.json","../../node_modules/@octokit/request/dist-types/package.json","../../node_modules/@octokit/types/dist-types/generated/package.json","../../node_modules/@octokit/types/dist-types/package.json","../../node_modules/@opencrvs/events/build/types/router/package.json","../../node_modules/@trpc/server/dist/observable/package.json","../../node_modules/@trpc/server/dist/package.json","../../node_modules/@ts-morph/common/lib/package.json","../../node_modules/@types/assert/package.json","../../node_modules/@types/async_hooks/package.json","../../node_modules/@types/child_process/package.json","../../node_modules/@types/cluster/package.json","../../node_modules/@types/constants/package.json","../../node_modules/@types/crypto/package.json","../../node_modules/@types/dgram/package.json","../../node_modules/@types/diagnostics_channel/package.json","../../node_modules/@types/dns/package.json","../../node_modules/@types/dns/promises/package.json","../../node_modules/@types/domain/package.json","../../node_modules/@types/events/package.json","../../node_modules/@types/fs/package.json","../../node_modules/@types/fs/promises/package.json","../../node_modules/@types/http/package.json","../../node_modules/@types/http2/package.json","../../node_modules/@types/https/package.json","../../node_modules/@types/inspector/package.json","../../node_modules/@types/lodash/common/package.json","../../node_modules/@types/module/package.json","../../node_modules/@types/net/package.json","../../node_modules/@types/opencrvs__events/build/types/router/package.json","../../node_modules/@types/opencrvs__events/package.json","../../node_modules/@types/os/package.json","../../node_modules/@types/path/package.json","../../node_modules/@types/path/posix/package.json","../../node_modules/@types/path/win32/package.json","../../node_modules/@types/perf_hooks/package.json","../../node_modules/@types/process/package.json","../../node_modules/@types/punycode/package.json","../../node_modules/@types/readline/package.json","../../node_modules/@types/readline/promises/package.json","../../node_modules/@types/repl/package.json","../../node_modules/@types/stream/consumers/package.json","../../node_modules/@types/stream/package.json","../../node_modules/@types/stream/promises/package.json","../../node_modules/@types/stream/web/package.json","../../node_modules/@types/string_decoder/package.json","../../node_modules/@types/timers/package.json","../../node_modules/@types/timers/promises/package.json","../../node_modules/@types/tls/package.json","../../node_modules/@types/trace_events/package.json","../../node_modules/@types/tty/package.json","../../node_modules/@types/url/package.json","../../node_modules/@types/util/package.json","../../node_modules/@types/util/types/package.json","../../node_modules/@types/v8/package.json","../../node_modules/@types/vm/package.json","../../node_modules/@types/wasi/package.json","../../node_modules/@types/worker_threads/package.json","../../node_modules/@types/zlib/package.json","../../node_modules/async_hooks/package.json","../../node_modules/child_process/package.json","../../node_modules/cluster/package.json","../../node_modules/constants/package.json","../../node_modules/crypto/package.json","../../node_modules/dgram/package.json","../../node_modules/diagnostics_channel/package.json","../../node_modules/dns/package.json","../../node_modules/dns/promises/package.json","../../node_modules/domain/package.json","../../node_modules/dotenv/lib/package.json","../../node_modules/form-data/node_modules/http/package.json","../../node_modules/form-data/node_modules/stream/package.json","../../node_modules/fs/package.json","../../node_modules/fs/promises/package.json","../../node_modules/handlebars/types/package.json","../../node_modules/http/package.json","../../node_modules/http2/package.json","../../node_modules/https/package.json","../../node_modules/inspector/package.json","../../node_modules/joi/lib/package.json","../../node_modules/module/package.json","../../node_modules/net/package.json","../../node_modules/os/package.json","../../node_modules/path/package.json","../../node_modules/path/posix/package.json","../../node_modules/path/win32/package.json","../../node_modules/perf_hooks/package.json","../../node_modules/pino-pretty/node_modules/colorette/package.json","../../node_modules/pino-pretty/node_modules/pino/package.json","../../node_modules/pino-pretty/node_modules/stream/package.json","../../node_modules/readline/package.json","../../node_modules/readline/promises/package.json","../../node_modules/repl/package.json","../../node_modules/sonic-boom/types/package.json","../../node_modules/stream/consumers/package.json","../../node_modules/stream/package.json","../../node_modules/stream/promises/package.json","../../node_modules/stream/web/package.json","../../node_modules/superjson/dist/package.json","../../node_modules/timers/package.json","../../node_modules/timers/promises/package.json","../../node_modules/tls/package.json","../../node_modules/trace_events/package.json","../../node_modules/ts-morph/lib/package.json","../../node_modules/tty/package.json","../../node_modules/url/package.json","../../node_modules/util/types/package.json","../../node_modules/v8/package.json","../../node_modules/vm/package.json","../../node_modules/wasi/package.json","../../node_modules/worker_threads/package.json","../../node_modules/zlib/package.json","../../node_modules/zod-openapi/dist/package.json","../commons/node_modules/@hapi/hapi/package.json","../commons/node_modules/@types/hapi__hapi/package.json","../commons/node_modules/@types/lodash/package.json","../commons/node_modules/@types/node-fetch/package.json","../commons/node_modules/@types/pino/package.json","../commons/node_modules/@types/zod-openapi/package.json","../commons/node_modules/@types/zod/package.json","../commons/node_modules/@types/zod/v4/package.json","../commons/node_modules/ajv/dist/package.json","../commons/node_modules/ajv/dist/types/json-schema/package.json","../commons/node_modules/ajv/dist/types/package.json","../commons/node_modules/lodash/package.json","../commons/node_modules/node-fetch/package.json","../commons/node_modules/pino/package.json","../commons/node_modules/zod-openapi/package.json","../commons/node_modules/zod/package.json","../commons/node_modules/zod/v4/package.json","./node_modules/@inquirer/prompts/package.json","./node_modules/@octokit/core/dist-types/package.json","./node_modules/@octokit/graphql/package.json","./node_modules/@octokit/request-error/package.json","./node_modules/@octokit/request/package.json","./node_modules/@octokit/types/package.json","./node_modules/@opencrvs/events/build/types/router/package.json","./node_modules/@opencrvs/events/package.json","./node_modules/@trpc/client/dist/package.json","./node_modules/@trpc/client/node_modules/@trpc/server/http/package.json","./node_modules/@trpc/client/node_modules/@trpc/server/observable/package.json","./node_modules/@trpc/client/node_modules/@trpc/server/package.json","./node_modules/@trpc/client/node_modules/@trpc/server/unstable-core-do-not-import/package.json","./node_modules/@trpc/server/http/package.json","./node_modules/@trpc/server/observable/package.json","./node_modules/@trpc/server/package.json","./node_modules/@trpc/server/unstable-core-do-not-import/package.json","./node_modules/@types/assert/package.json","./node_modules/@types/async_hooks/package.json","./node_modules/@types/before-after-hook/package.json","./node_modules/@types/buffer/package.json","./node_modules/@types/child_process/package.json","./node_modules/@types/cluster/package.json","./node_modules/@types/constants/package.json","./node_modules/@types/crypto/package.json","./node_modules/@types/dgram/package.json","./node_modules/@types/diagnostics_channel/package.json","./node_modules/@types/dns/package.json","./node_modules/@types/dns/promises/package.json","./node_modules/@types/domain/package.json","./node_modules/@types/dotenv/package.json","./node_modules/@types/events/package.json","./node_modules/@types/fs/package.json","./node_modules/@types/fs/promises/package.json","./node_modules/@types/handlebars/package.json","./node_modules/@types/http/package.json","./node_modules/@types/http2/package.json","./node_modules/@types/https/package.json","./node_modules/@types/inquirer__prompts/package.json","./node_modules/@types/inspector/package.json","./node_modules/@types/js-yaml/package.json","./node_modules/@types/libsodium-wrappers/package.json","./node_modules/@types/minipass/package.json","./node_modules/@types/module/package.json","./node_modules/@types/net/package.json","./node_modules/@types/node/assert/package.json","./node_modules/@types/node/dns/package.json","./node_modules/@types/node/fs/package.json","./node_modules/@types/node/readline/package.json","./node_modules/@types/node/stream/package.json","./node_modules/@types/node/timers/package.json","./node_modules/@types/octokit__graphql/package.json","./node_modules/@types/octokit__request-error/package.json","./node_modules/@types/octokit__request/package.json","./node_modules/@types/octokit__types/package.json","./node_modules/@types/opencrvs__events/build/types/router/package.json","./node_modules/@types/opencrvs__events/package.json","./node_modules/@types/os/package.json","./node_modules/@types/path/package.json","./node_modules/@types/path/posix/package.json","./node_modules/@types/path/win32/package.json","./node_modules/@types/perf_hooks/package.json","./node_modules/@types/process/package.json","./node_modules/@types/prompts/package.json","./node_modules/@types/punycode/package.json","./node_modules/@types/querystring/package.json","./node_modules/@types/readline/package.json","./node_modules/@types/readline/promises/package.json","./node_modules/@types/repl/package.json","./node_modules/@types/stream/consumers/package.json","./node_modules/@types/stream/package.json","./node_modules/@types/stream/promises/package.json","./node_modules/@types/stream/web/package.json","./node_modules/@types/string_decoder/package.json","./node_modules/@types/superjson/package.json","./node_modules/@types/timers/package.json","./node_modules/@types/timers/promises/package.json","./node_modules/@types/tls/package.json","./node_modules/@types/trace_events/package.json","./node_modules/@types/trpc__server/http/package.json","./node_modules/@types/trpc__server/observable/package.json","./node_modules/@types/trpc__server/package.json","./node_modules/@types/trpc__server/unstable-core-do-not-import/package.json","./node_modules/@types/ts-morph/package.json","./node_modules/@types/tty/package.json","./node_modules/@types/undici-types/package.json","./node_modules/@types/url/package.json","./node_modules/@types/util/package.json","./node_modules/@types/util/types/package.json","./node_modules/@types/v8/package.json","./node_modules/@types/vm/package.json","./node_modules/@types/wasi/package.json","./node_modules/@types/worker_threads/package.json","./node_modules/@types/zlib/package.json","./node_modules/@types/zod/package.json","./node_modules/@types/zod/v4/package.json","./node_modules/assert/package.json","./node_modules/async_hooks/package.json","./node_modules/before-after-hook/package.json","./node_modules/buffer/package.json","./node_modules/child_process/package.json","./node_modules/cluster/package.json","./node_modules/constants/package.json","./node_modules/crypto/package.json","./node_modules/dgram/package.json","./node_modules/diagnostics_channel/package.json","./node_modules/dns/package.json","./node_modules/dns/promises/package.json","./node_modules/domain/package.json","./node_modules/dotenv/package.json","./node_modules/events/package.json","./node_modules/fs/package.json","./node_modules/fs/promises/package.json","./node_modules/handlebars/package.json","./node_modules/http/package.json","./node_modules/http2/package.json","./node_modules/https/package.json","./node_modules/inspector/package.json","./node_modules/js-yaml/package.json","./node_modules/libsodium-wrappers/package.json","./node_modules/minipass/package.json","./node_modules/module/package.json","./node_modules/net/package.json","./node_modules/os/package.json","./node_modules/path/package.json","./node_modules/path/posix/package.json","./node_modules/path/win32/package.json","./node_modules/perf_hooks/package.json","./node_modules/process/package.json","./node_modules/prompts/package.json","./node_modules/punycode/package.json","./node_modules/querystring/package.json","./node_modules/readline/package.json","./node_modules/readline/promises/package.json","./node_modules/repl/package.json","./node_modules/ssh2/package.json","./node_modules/stream/consumers/package.json","./node_modules/stream/package.json","./node_modules/stream/promises/package.json","./node_modules/stream/web/package.json","./node_modules/string_decoder/package.json","./node_modules/superjson/package.json","./node_modules/timers/package.json","./node_modules/timers/promises/package.json","./node_modules/tls/package.json","./node_modules/trace_events/package.json","./node_modules/ts-morph/package.json","./node_modules/tty/package.json","./node_modules/typescript/package.json","./node_modules/undici-types/package.json","./node_modules/url/package.json","./node_modules/util/package.json","./node_modules/util/types/package.json","./node_modules/v8/package.json","./node_modules/vm/package.json","./node_modules/wasi/package.json","./node_modules/worker_threads/package.json","./node_modules/zlib/package.json","./node_modules/zod/package.json","./node_modules/zod/v4/package.json"]}
|
|
1
|
+
{"version":"7.0.2","root":["./src/cli.ts","./src/api/index.ts","./src/application-config/index.ts","./src/conditionals/index.ts","./src/environment/custom-types.ts","./src/environment/derived-variables.ts","./src/environment/editor-questions.ts","./src/environment/git.ts","./src/environment/github.ts","./src/environment/index.ts","./src/environment/logger.ts","./src/environment/manage-users.ts","./src/environment/questions-helper.ts","./src/environment/questions.ts","./src/environment/setup-environment.ts","./src/environment/ssh-keygen.ts","./src/environment/swarm-to-k8s.ts","./src/environment/templates.ts","./src/environment/update-workflows.ts","./src/environment/users.ts","./src/environment/utils.ts","./src/events/deduplication.ts","./src/events/index.ts","./src/migrations/v2.0/add-birth-certificate-issuance-flag.ts","./src/migrations/v2.0/add-resend-invite-notification.ts","./src/migrations/v2.0/checkout-upstream-files.ts","./src/migrations/v2.0/convert-config-files-to-ts.ts","./src/migrations/v2.0/convert-paragraph-to-heading.ts","./src/migrations/v2.0/create-events-index.ts","./src/migrations/v2.0/delete-infrastructure-directory.ts","./src/migrations/v2.0/fix-accept-requested-registration-function-type.ts","./src/migrations/v2.0/index.ts","./src/migrations/v2.0/make-built-in-validate-actions-custom.ts","./src/migrations/v2.0/merge-infrastructure-directory.ts","./src/migrations/v2.0/migrate-application-config-url.ts","./src/migrations/v2.0/migrate-scopes.ts","./src/migrations/v2.0/migrate-validated-workqueue-status-to-flag.ts","./src/migrations/v2.0/migrate-workqueue-configs.ts","./src/migrations/v2.0/remove-delete-actions.ts","./src/migrations/v2.0/remove-demo-scope.ts","./src/migrations/v2.0/remove-deprecated-imports.ts","./src/migrations/v2.0/remove-fhir-url-helpers.ts","./src/migrations/v2.0/remove-hearth-migrations.ts","./src/migrations/v2.0/remove-old-statistics-service.ts","./src/migrations/v2.0/remove-pending-certification-flag.ts","./src/migrations/v2.0/remove-review-from-register-action.ts","./src/migrations/v2.0/remove-unused-environment-variables.ts","./src/migrations/v2.0/rename-api-paths.ts","./src/migrations/v2.0/rename-location-parent-id.ts","./src/migrations/v2.0/simplify-analytics-precalculations.ts","./src/migrations/v2.0/update-package-json.ts","./src/migrations/v2.1/add-explicit-correction-flags.ts","./src/migrations/v2.1/index.ts","./src/notification/index.ts","./src/scopes/index.ts"],"packageJsons":["../../node_modules/@hapi/boom/package.json","../../node_modules/@hapi/catbox/node_modules/@hapi/podium/package.json","../../node_modules/@hapi/catbox/package.json","../../node_modules/@hapi/hapi/node_modules/@hapi/podium/package.json","../../node_modules/@hapi/hapi/package.json","../../node_modules/@hapi/mimos/package.json","../../node_modules/@hapi/shot/package.json","../../node_modules/@hapi/statehood/node_modules/@hapi/iron/package.json","../../node_modules/@hapi/statehood/package.json","../../node_modules/@inquirer/checkbox/package.json","../../node_modules/@inquirer/core/package.json","../../node_modules/@inquirer/editor/package.json","../../node_modules/@inquirer/expand/package.json","../../node_modules/@inquirer/external-editor/package.json","../../node_modules/@inquirer/input/package.json","../../node_modules/@inquirer/number/package.json","../../node_modules/@inquirer/password/package.json","../../node_modules/@inquirer/prompts/node_modules/@inquirer/confirm/package.json","../../node_modules/@inquirer/prompts/package.json","../../node_modules/@inquirer/rawlist/package.json","../../node_modules/@inquirer/search/package.json","../../node_modules/@inquirer/select/package.json","../../node_modules/@inquirer/type/package.json","../../node_modules/@octokit/graphql/package.json","../../node_modules/@octokit/openapi-types/package.json","../../node_modules/@octokit/request-error/package.json","../../node_modules/@octokit/request/package.json","../../node_modules/@octokit/types/package.json","../../node_modules/@trpc/server/http/package.json","../../node_modules/@trpc/server/observable/package.json","../../node_modules/@trpc/server/package.json","../../node_modules/@trpc/server/unstable-core-do-not-import/package.json","../../node_modules/@ts-morph/common/package.json","../../node_modules/@types/js-yaml/package.json","../../node_modules/@types/libsodium-wrappers/package.json","../../node_modules/@types/lodash/package.json","../../node_modules/@types/node-fetch/package.json","../../node_modules/@types/node/package.json","../../node_modules/@types/prompts/package.json","../../node_modules/assert/package.json","../../node_modules/before-after-hook/package.json","../../node_modules/buffer/package.json","../../node_modules/colorette/package.json","../../node_modules/dotenv/package.json","../../node_modules/events/package.json","../../node_modules/form-data/package.json","../../node_modules/handlebars/package.json","../../node_modules/joi/package.json","../../node_modules/js-yaml/package.json","../../node_modules/kleur/package.json","../../node_modules/libsodium-wrappers/package.json","../../node_modules/lodash/package.json","../../node_modules/minipass/dist/commonjs/package.json","../../node_modules/minipass/package.json","../../node_modules/node-fetch/package.json","../../node_modules/pino-pretty/node_modules/pino-abstract-transport/package.json","../../node_modules/pino-pretty/package.json","../../node_modules/pino-std-serializers/package.json","../../node_modules/pino/package.json","../../node_modules/process/package.json","../../node_modules/prompts/package.json","../../node_modules/punycode/package.json","../../node_modules/querystring/package.json","../../node_modules/sonic-boom/package.json","../../node_modules/string_decoder/package.json","../../node_modules/superjson/package.json","../../node_modules/ts-morph/package.json","../../node_modules/typescript/package.json","../../node_modules/undici-types/package.json","../../node_modules/util/package.json","../../node_modules/zod-openapi/package.json","../../node_modules/zod/package.json","../../node_modules/zod/v4/classic/package.json","../../node_modules/zod/v4/core/package.json","../../node_modules/zod/v4/locales/package.json","../../node_modules/zod/v4/package.json","../commons/node_modules/ajv/package.json","../commons/package.json","../events/package.json","./node_modules/@octokit/core/package.json","./node_modules/@trpc/client/package.json","./node_modules/@types/node/package.json","./node_modules/@types/ssh2/package.json","./node_modules/glob/dist/commonjs/package.json","./node_modules/glob/package.json","./node_modules/kleur/package.json","./node_modules/lru-cache/dist/commonjs/package.json","./node_modules/lru-cache/package.json","./node_modules/minimatch/dist/commonjs/package.json","./node_modules/minimatch/package.json","./node_modules/path-scurry/dist/commonjs/package.json","./node_modules/path-scurry/package.json","./package.json"],"missingPackageJsons":["../../node_modules/@hapi/boom/lib/package.json","../../node_modules/@hapi/catbox/lib/package.json","../../node_modules/@hapi/catbox/node_modules/@hapi/podium/lib/package.json","../../node_modules/@hapi/hapi/lib/package.json","../../node_modules/@hapi/hapi/lib/types/package.json","../../node_modules/@hapi/hapi/lib/types/server/package.json","../../node_modules/@hapi/hapi/node_modules/@hapi/boom/package.json","../../node_modules/@hapi/hapi/node_modules/@hapi/catbox/package.json","../../node_modules/@hapi/hapi/node_modules/@hapi/mimos/package.json","../../node_modules/@hapi/hapi/node_modules/@hapi/podium/lib/package.json","../../node_modules/@hapi/hapi/node_modules/@hapi/shot/package.json","../../node_modules/@hapi/hapi/node_modules/@hapi/statehood/package.json","../../node_modules/@hapi/hapi/node_modules/http/package.json","../../node_modules/@hapi/hapi/node_modules/https/package.json","../../node_modules/@hapi/hapi/node_modules/joi/package.json","../../node_modules/@hapi/hapi/node_modules/stream/package.json","../../node_modules/@hapi/hapi/node_modules/url/package.json","../../node_modules/@hapi/hapi/node_modules/zlib/package.json","../../node_modules/@hapi/mimos/lib/package.json","../../node_modules/@hapi/shot/lib/package.json","../../node_modules/@hapi/statehood/lib/package.json","../../node_modules/@hapi/statehood/node_modules/@hapi/boom/package.json","../../node_modules/@hapi/statehood/node_modules/@hapi/iron/lib/package.json","../../node_modules/@inquirer/checkbox/dist/package.json","../../node_modules/@inquirer/core/dist/lib/package.json","../../node_modules/@inquirer/core/dist/lib/pagination/package.json","../../node_modules/@inquirer/core/dist/package.json","../../node_modules/@inquirer/core/node_modules/@inquirer/type/package.json","../../node_modules/@inquirer/editor/dist/package.json","../../node_modules/@inquirer/expand/dist/package.json","../../node_modules/@inquirer/external-editor/dist/package.json","../../node_modules/@inquirer/input/dist/package.json","../../node_modules/@inquirer/number/dist/package.json","../../node_modules/@inquirer/password/dist/package.json","../../node_modules/@inquirer/prompts/dist/package.json","../../node_modules/@inquirer/prompts/node_modules/@inquirer/checkbox/package.json","../../node_modules/@inquirer/prompts/node_modules/@inquirer/confirm/dist/package.json","../../node_modules/@inquirer/prompts/node_modules/@inquirer/core/package.json","../../node_modules/@inquirer/prompts/node_modules/@inquirer/editor/package.json","../../node_modules/@inquirer/prompts/node_modules/@inquirer/expand/package.json","../../node_modules/@inquirer/prompts/node_modules/@inquirer/input/package.json","../../node_modules/@inquirer/prompts/node_modules/@inquirer/number/package.json","../../node_modules/@inquirer/prompts/node_modules/@inquirer/password/package.json","../../node_modules/@inquirer/prompts/node_modules/@inquirer/rawlist/package.json","../../node_modules/@inquirer/prompts/node_modules/@inquirer/search/package.json","../../node_modules/@inquirer/prompts/node_modules/@inquirer/select/package.json","../../node_modules/@inquirer/prompts/node_modules/@inquirer/type/package.json","../../node_modules/@inquirer/prompts/node_modules/@types/node/package.json","../../node_modules/@inquirer/rawlist/dist/package.json","../../node_modules/@inquirer/search/dist/package.json","../../node_modules/@inquirer/select/dist/package.json","../../node_modules/@inquirer/type/dist/package.json","../../node_modules/@octokit/graphql/dist-types/package.json","../../node_modules/@octokit/request-error/dist-types/package.json","../../node_modules/@octokit/request/dist-types/package.json","../../node_modules/@octokit/types/dist-types/generated/package.json","../../node_modules/@octokit/types/dist-types/package.json","../../node_modules/@opencrvs/events/build/types/router/package.json","../../node_modules/@trpc/server/dist/observable/package.json","../../node_modules/@trpc/server/dist/package.json","../../node_modules/@ts-morph/common/lib/package.json","../../node_modules/@types/assert/package.json","../../node_modules/@types/async_hooks/package.json","../../node_modules/@types/child_process/package.json","../../node_modules/@types/cluster/package.json","../../node_modules/@types/constants/package.json","../../node_modules/@types/crypto/package.json","../../node_modules/@types/dgram/package.json","../../node_modules/@types/diagnostics_channel/package.json","../../node_modules/@types/dns/package.json","../../node_modules/@types/dns/promises/package.json","../../node_modules/@types/domain/package.json","../../node_modules/@types/events/package.json","../../node_modules/@types/fs/package.json","../../node_modules/@types/fs/promises/package.json","../../node_modules/@types/http/package.json","../../node_modules/@types/http2/package.json","../../node_modules/@types/https/package.json","../../node_modules/@types/inspector/package.json","../../node_modules/@types/lodash/common/package.json","../../node_modules/@types/module/package.json","../../node_modules/@types/net/package.json","../../node_modules/@types/opencrvs__events/build/types/router/package.json","../../node_modules/@types/opencrvs__events/package.json","../../node_modules/@types/os/package.json","../../node_modules/@types/path/package.json","../../node_modules/@types/path/posix/package.json","../../node_modules/@types/path/win32/package.json","../../node_modules/@types/perf_hooks/package.json","../../node_modules/@types/process/package.json","../../node_modules/@types/punycode/package.json","../../node_modules/@types/readline/package.json","../../node_modules/@types/readline/promises/package.json","../../node_modules/@types/repl/package.json","../../node_modules/@types/stream/consumers/package.json","../../node_modules/@types/stream/package.json","../../node_modules/@types/stream/promises/package.json","../../node_modules/@types/stream/web/package.json","../../node_modules/@types/string_decoder/package.json","../../node_modules/@types/timers/package.json","../../node_modules/@types/timers/promises/package.json","../../node_modules/@types/tls/package.json","../../node_modules/@types/trace_events/package.json","../../node_modules/@types/tty/package.json","../../node_modules/@types/url/package.json","../../node_modules/@types/util/package.json","../../node_modules/@types/util/types/package.json","../../node_modules/@types/v8/package.json","../../node_modules/@types/vm/package.json","../../node_modules/@types/wasi/package.json","../../node_modules/@types/worker_threads/package.json","../../node_modules/@types/zlib/package.json","../../node_modules/async_hooks/package.json","../../node_modules/child_process/package.json","../../node_modules/cluster/package.json","../../node_modules/constants/package.json","../../node_modules/crypto/package.json","../../node_modules/dgram/package.json","../../node_modules/diagnostics_channel/package.json","../../node_modules/dns/package.json","../../node_modules/dns/promises/package.json","../../node_modules/domain/package.json","../../node_modules/dotenv/lib/package.json","../../node_modules/form-data/node_modules/http/package.json","../../node_modules/form-data/node_modules/stream/package.json","../../node_modules/fs/package.json","../../node_modules/fs/promises/package.json","../../node_modules/handlebars/types/package.json","../../node_modules/http/package.json","../../node_modules/http2/package.json","../../node_modules/https/package.json","../../node_modules/inspector/package.json","../../node_modules/joi/lib/package.json","../../node_modules/module/package.json","../../node_modules/net/package.json","../../node_modules/os/package.json","../../node_modules/path/package.json","../../node_modules/path/posix/package.json","../../node_modules/path/win32/package.json","../../node_modules/perf_hooks/package.json","../../node_modules/pino-pretty/node_modules/colorette/package.json","../../node_modules/pino-pretty/node_modules/pino/package.json","../../node_modules/pino-pretty/node_modules/stream/package.json","../../node_modules/readline/package.json","../../node_modules/readline/promises/package.json","../../node_modules/repl/package.json","../../node_modules/sonic-boom/types/package.json","../../node_modules/stream/consumers/package.json","../../node_modules/stream/package.json","../../node_modules/stream/promises/package.json","../../node_modules/stream/web/package.json","../../node_modules/superjson/dist/package.json","../../node_modules/timers/package.json","../../node_modules/timers/promises/package.json","../../node_modules/tls/package.json","../../node_modules/trace_events/package.json","../../node_modules/ts-morph/lib/package.json","../../node_modules/tty/package.json","../../node_modules/url/package.json","../../node_modules/util/types/package.json","../../node_modules/v8/package.json","../../node_modules/vm/package.json","../../node_modules/wasi/package.json","../../node_modules/worker_threads/package.json","../../node_modules/zlib/package.json","../../node_modules/zod-openapi/dist/package.json","../commons/node_modules/@hapi/hapi/package.json","../commons/node_modules/@types/hapi__hapi/package.json","../commons/node_modules/@types/lodash/package.json","../commons/node_modules/@types/node-fetch/package.json","../commons/node_modules/@types/pino/package.json","../commons/node_modules/@types/zod-openapi/package.json","../commons/node_modules/@types/zod/package.json","../commons/node_modules/@types/zod/v4/package.json","../commons/node_modules/ajv/dist/package.json","../commons/node_modules/ajv/dist/types/json-schema/package.json","../commons/node_modules/ajv/dist/types/package.json","../commons/node_modules/lodash/package.json","../commons/node_modules/node-fetch/package.json","../commons/node_modules/pino/package.json","../commons/node_modules/zod-openapi/package.json","../commons/node_modules/zod/package.json","../commons/node_modules/zod/v4/package.json","./node_modules/@inquirer/prompts/package.json","./node_modules/@octokit/core/dist-types/package.json","./node_modules/@octokit/graphql/package.json","./node_modules/@octokit/request-error/package.json","./node_modules/@octokit/request/package.json","./node_modules/@octokit/types/package.json","./node_modules/@opencrvs/events/build/types/router/package.json","./node_modules/@opencrvs/events/package.json","./node_modules/@trpc/client/dist/package.json","./node_modules/@trpc/client/node_modules/@trpc/server/http/package.json","./node_modules/@trpc/client/node_modules/@trpc/server/observable/package.json","./node_modules/@trpc/client/node_modules/@trpc/server/package.json","./node_modules/@trpc/client/node_modules/@trpc/server/unstable-core-do-not-import/package.json","./node_modules/@trpc/server/http/package.json","./node_modules/@trpc/server/observable/package.json","./node_modules/@trpc/server/package.json","./node_modules/@trpc/server/unstable-core-do-not-import/package.json","./node_modules/@types/assert/package.json","./node_modules/@types/async_hooks/package.json","./node_modules/@types/before-after-hook/package.json","./node_modules/@types/buffer/package.json","./node_modules/@types/child_process/package.json","./node_modules/@types/cluster/package.json","./node_modules/@types/constants/package.json","./node_modules/@types/crypto/package.json","./node_modules/@types/dgram/package.json","./node_modules/@types/diagnostics_channel/package.json","./node_modules/@types/dns/package.json","./node_modules/@types/dns/promises/package.json","./node_modules/@types/domain/package.json","./node_modules/@types/dotenv/package.json","./node_modules/@types/events/package.json","./node_modules/@types/fs/package.json","./node_modules/@types/fs/promises/package.json","./node_modules/@types/handlebars/package.json","./node_modules/@types/http/package.json","./node_modules/@types/http2/package.json","./node_modules/@types/https/package.json","./node_modules/@types/inquirer__prompts/package.json","./node_modules/@types/inspector/package.json","./node_modules/@types/js-yaml/package.json","./node_modules/@types/libsodium-wrappers/package.json","./node_modules/@types/minipass/package.json","./node_modules/@types/module/package.json","./node_modules/@types/net/package.json","./node_modules/@types/node/assert/package.json","./node_modules/@types/node/dns/package.json","./node_modules/@types/node/fs/package.json","./node_modules/@types/node/readline/package.json","./node_modules/@types/node/stream/package.json","./node_modules/@types/node/timers/package.json","./node_modules/@types/octokit__graphql/package.json","./node_modules/@types/octokit__request-error/package.json","./node_modules/@types/octokit__request/package.json","./node_modules/@types/octokit__types/package.json","./node_modules/@types/opencrvs__events/build/types/router/package.json","./node_modules/@types/opencrvs__events/package.json","./node_modules/@types/os/package.json","./node_modules/@types/path/package.json","./node_modules/@types/path/posix/package.json","./node_modules/@types/path/win32/package.json","./node_modules/@types/perf_hooks/package.json","./node_modules/@types/process/package.json","./node_modules/@types/prompts/package.json","./node_modules/@types/punycode/package.json","./node_modules/@types/querystring/package.json","./node_modules/@types/readline/package.json","./node_modules/@types/readline/promises/package.json","./node_modules/@types/repl/package.json","./node_modules/@types/stream/consumers/package.json","./node_modules/@types/stream/package.json","./node_modules/@types/stream/promises/package.json","./node_modules/@types/stream/web/package.json","./node_modules/@types/string_decoder/package.json","./node_modules/@types/superjson/package.json","./node_modules/@types/timers/package.json","./node_modules/@types/timers/promises/package.json","./node_modules/@types/tls/package.json","./node_modules/@types/trace_events/package.json","./node_modules/@types/trpc__server/http/package.json","./node_modules/@types/trpc__server/observable/package.json","./node_modules/@types/trpc__server/package.json","./node_modules/@types/trpc__server/unstable-core-do-not-import/package.json","./node_modules/@types/ts-morph/package.json","./node_modules/@types/tty/package.json","./node_modules/@types/undici-types/package.json","./node_modules/@types/url/package.json","./node_modules/@types/util/package.json","./node_modules/@types/util/types/package.json","./node_modules/@types/v8/package.json","./node_modules/@types/vm/package.json","./node_modules/@types/wasi/package.json","./node_modules/@types/worker_threads/package.json","./node_modules/@types/zlib/package.json","./node_modules/@types/zod/package.json","./node_modules/@types/zod/v4/package.json","./node_modules/assert/package.json","./node_modules/async_hooks/package.json","./node_modules/before-after-hook/package.json","./node_modules/buffer/package.json","./node_modules/child_process/package.json","./node_modules/cluster/package.json","./node_modules/constants/package.json","./node_modules/crypto/package.json","./node_modules/dgram/package.json","./node_modules/diagnostics_channel/package.json","./node_modules/dns/package.json","./node_modules/dns/promises/package.json","./node_modules/domain/package.json","./node_modules/dotenv/package.json","./node_modules/events/package.json","./node_modules/fs/package.json","./node_modules/fs/promises/package.json","./node_modules/handlebars/package.json","./node_modules/http/package.json","./node_modules/http2/package.json","./node_modules/https/package.json","./node_modules/inspector/package.json","./node_modules/js-yaml/package.json","./node_modules/libsodium-wrappers/package.json","./node_modules/minipass/package.json","./node_modules/module/package.json","./node_modules/net/package.json","./node_modules/os/package.json","./node_modules/path/package.json","./node_modules/path/posix/package.json","./node_modules/path/win32/package.json","./node_modules/perf_hooks/package.json","./node_modules/process/package.json","./node_modules/prompts/package.json","./node_modules/punycode/package.json","./node_modules/querystring/package.json","./node_modules/readline/package.json","./node_modules/readline/promises/package.json","./node_modules/repl/package.json","./node_modules/ssh2/package.json","./node_modules/stream/consumers/package.json","./node_modules/stream/package.json","./node_modules/stream/promises/package.json","./node_modules/stream/web/package.json","./node_modules/string_decoder/package.json","./node_modules/superjson/package.json","./node_modules/timers/package.json","./node_modules/timers/promises/package.json","./node_modules/tls/package.json","./node_modules/trace_events/package.json","./node_modules/ts-morph/package.json","./node_modules/tty/package.json","./node_modules/typescript/package.json","./node_modules/undici-types/package.json","./node_modules/url/package.json","./node_modules/util/package.json","./node_modules/util/types/package.json","./node_modules/v8/package.json","./node_modules/vm/package.json","./node_modules/wasi/package.json","./node_modules/worker_threads/package.json","./node_modules/zlib/package.json","./node_modules/zod/package.json","./node_modules/zod/v4/package.json"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,94 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade.d.ts","sourceRoot":"","sources":["../../src/environment/upgrade.ts"],"names":[],"mappings":"AAiHA,wBAAsB,wBAAwB,kBAY7C"}
|
|
@@ -1,100 +0,0 @@
|
|
|
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
-
};
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.upgradeEnvironmentLayout = upgradeEnvironmentLayout;
|
|
26
|
-
const fs_1 = require("fs");
|
|
27
|
-
const path_1 = require("path");
|
|
28
|
-
const kleur_1 = __importDefault(require("kleur"));
|
|
29
|
-
const logger_1 = require("./logger");
|
|
30
|
-
const paths_1 = require("./paths");
|
|
31
|
-
const update_workflows_1 = require("./update-workflows");
|
|
32
|
-
function moveFileIfDestinationMissing(sourcePath, destinationPath) {
|
|
33
|
-
if (!(0, fs_1.existsSync)(sourcePath)) {
|
|
34
|
-
return false;
|
|
35
|
-
}
|
|
36
|
-
if ((0, fs_1.existsSync)(destinationPath)) {
|
|
37
|
-
(0, logger_1.warn)(`⚠️ Skipped ${sourcePath}; destination already exists at ${destinationPath}`);
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
40
|
-
(0, fs_1.mkdirSync)((0, path_1.dirname)(destinationPath), { recursive: true });
|
|
41
|
-
(0, fs_1.renameSync)(sourcePath, destinationPath);
|
|
42
|
-
(0, logger_1.log)(` ✓ Moved ${sourcePath} -> ${destinationPath}`);
|
|
43
|
-
return true;
|
|
44
|
-
}
|
|
45
|
-
function migrateInventoryFiles() {
|
|
46
|
-
const oldInventoryFiles = (0, paths_1.findOldInventoryFiles)();
|
|
47
|
-
if (oldInventoryFiles.length === 0) {
|
|
48
|
-
(0, logger_1.log)(`ℹ️ No old inventory files found at ${paths_1.OLD_INVENTORY_DIR}`);
|
|
49
|
-
return false;
|
|
50
|
-
}
|
|
51
|
-
(0, logger_1.log)(kleur_1.default.bold('\nMigrating Ansible inventory files'));
|
|
52
|
-
let didMoveInventory = false;
|
|
53
|
-
for (const oldInventoryFile of oldInventoryFiles) {
|
|
54
|
-
const environment = (0, paths_1.getEnvironmentNameFromOldInventoryPath)(oldInventoryFile);
|
|
55
|
-
didMoveInventory =
|
|
56
|
-
moveFileIfDestinationMissing(oldInventoryFile, (0, paths_1.getEnvironmentInventoryPath)(environment)) || didMoveInventory;
|
|
57
|
-
}
|
|
58
|
-
try {
|
|
59
|
-
if ((0, fs_1.existsSync)(paths_1.OLD_INVENTORY_DIR) &&
|
|
60
|
-
(0, fs_1.readdirSync)(paths_1.OLD_INVENTORY_DIR).length === 0) {
|
|
61
|
-
(0, fs_1.rmdirSync)(paths_1.OLD_INVENTORY_DIR);
|
|
62
|
-
(0, logger_1.log)(` ✓ Removed empty ${paths_1.OLD_INVENTORY_DIR}`);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
catch (_a) {
|
|
66
|
-
(0, logger_1.warn)(`⚠️ Could not remove ${paths_1.OLD_INVENTORY_DIR}; please review it manually`);
|
|
67
|
-
}
|
|
68
|
-
return didMoveInventory;
|
|
69
|
-
}
|
|
70
|
-
function migrateInventoryVarsFiles() {
|
|
71
|
-
if (!(0, fs_1.existsSync)('environments')) {
|
|
72
|
-
return false;
|
|
73
|
-
}
|
|
74
|
-
(0, logger_1.log)(kleur_1.default.bold('\nMigrating optional inventory variable files'));
|
|
75
|
-
let didMoveVars = false;
|
|
76
|
-
for (const entry of (0, fs_1.readdirSync)('environments')) {
|
|
77
|
-
const environmentDir = (0, path_1.join)('environments', entry);
|
|
78
|
-
if (!(0, fs_1.statSync)(environmentDir).isDirectory()) {
|
|
79
|
-
continue;
|
|
80
|
-
}
|
|
81
|
-
didMoveVars =
|
|
82
|
-
moveFileIfDestinationMissing((0, path_1.join)(environmentDir, 'inventory.override.yml'), (0, paths_1.getEnvironmentInventoryVarsPath)(entry)) || didMoveVars;
|
|
83
|
-
}
|
|
84
|
-
if (!didMoveVars) {
|
|
85
|
-
(0, logger_1.log)(`ℹ️ No inventory override files found to rename to ${paths_1.INVENTORY_VARS_FILE_NAME}`);
|
|
86
|
-
}
|
|
87
|
-
return didMoveVars;
|
|
88
|
-
}
|
|
89
|
-
function upgradeEnvironmentLayout() {
|
|
90
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
-
const didMoveInventory = migrateInventoryFiles();
|
|
92
|
-
const didMoveVars = migrateInventoryVarsFiles();
|
|
93
|
-
yield (0, update_workflows_1.updateWorkflowEnvironments)();
|
|
94
|
-
if (didMoveInventory || didMoveVars) {
|
|
95
|
-
(0, logger_1.success)('\n✅ Environment layout upgrade completed successfully.');
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
(0, logger_1.success)('\n✅ Environment layout already uses the current structure.');
|
|
99
|
-
});
|
|
100
|
-
}
|
|
Binary file
|