@opencrvs/toolkit 2.0.0-rc.ac3c151 → 2.0.0-rc.ac51ac7

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.
Files changed (67) hide show
  1. package/README.md +0 -14
  2. package/build.sh +0 -1
  3. package/dist/cli.js +46 -3161
  4. package/opencrvs-toolkit-2.0.0-rc.ac51ac7.tgz +0 -0
  5. package/package.json +1 -15
  6. package/tsconfig.tsbuildinfo +1 -1
  7. package/dist/environment/custom-types.d.ts +0 -33
  8. package/dist/environment/custom-types.d.ts.map +0 -1
  9. package/dist/environment/custom-types.js +0 -12
  10. package/dist/environment/derived-variables.d.ts +0 -134
  11. package/dist/environment/derived-variables.d.ts.map +0 -1
  12. package/dist/environment/derived-variables.js +0 -169
  13. package/dist/environment/editor-questions.d.ts +0 -4
  14. package/dist/environment/editor-questions.d.ts.map +0 -1
  15. package/dist/environment/editor-questions.js +0 -65
  16. package/dist/environment/git.d.ts +0 -5
  17. package/dist/environment/git.d.ts.map +0 -1
  18. package/dist/environment/git.js +0 -38
  19. package/dist/environment/github.d.ts +0 -26
  20. package/dist/environment/github.d.ts.map +0 -1
  21. package/dist/environment/github.js +0 -244
  22. package/dist/environment/index.d.ts +0 -5
  23. package/dist/environment/index.d.ts.map +0 -1
  24. package/dist/environment/index.js +0 -71
  25. package/dist/environment/logger.d.ts +0 -15
  26. package/dist/environment/logger.d.ts.map +0 -1
  27. package/dist/environment/logger.js +0 -25
  28. package/dist/environment/manage-users.d.ts +0 -11
  29. package/dist/environment/manage-users.d.ts.map +0 -1
  30. package/dist/environment/manage-users.js +0 -494
  31. package/dist/environment/questions-helper.d.ts +0 -15
  32. package/dist/environment/questions-helper.d.ts.map +0 -1
  33. package/dist/environment/questions-helper.js +0 -70
  34. package/dist/environment/questions.d.ts +0 -199
  35. package/dist/environment/questions.d.ts.map +0 -1
  36. package/dist/environment/questions.js +0 -412
  37. package/dist/environment/setup-environment.d.ts +0 -2
  38. package/dist/environment/setup-environment.d.ts.map +0 -1
  39. package/dist/environment/setup-environment.js +0 -773
  40. package/dist/environment/ssh-keygen.d.ts +0 -5
  41. package/dist/environment/ssh-keygen.d.ts.map +0 -1
  42. package/dist/environment/ssh-keygen.js +0 -18
  43. package/dist/environment/swarm-to-k8s.d.ts +0 -2
  44. package/dist/environment/swarm-to-k8s.d.ts.map +0 -1
  45. package/dist/environment/swarm-to-k8s.js +0 -172
  46. package/dist/environment/templates.d.ts +0 -27
  47. package/dist/environment/templates.d.ts.map +0 -1
  48. package/dist/environment/templates.js +0 -159
  49. package/dist/environment/update-workflows.d.ts +0 -2
  50. package/dist/environment/update-workflows.d.ts.map +0 -1
  51. package/dist/environment/update-workflows.js +0 -168
  52. package/dist/environment/users.d.ts +0 -2
  53. package/dist/environment/users.d.ts.map +0 -1
  54. package/dist/environment/users.js +0 -110
  55. package/dist/environment/utils.d.ts +0 -18
  56. package/dist/environment/utils.d.ts.map +0 -1
  57. package/dist/environment/utils.js +0 -100
  58. package/dist/templates/charts-values/dependencies/values.override.yaml +0 -4
  59. package/dist/templates/charts-values/dependencies/values.yaml +0 -82
  60. package/dist/templates/charts-values/opencrvs-services/values.override.yaml +0 -4
  61. package/dist/templates/charts-values/opencrvs-services/values.yaml +0 -79
  62. package/dist/templates/charts-values/traefik/values.override.yaml +0 -4
  63. package/dist/templates/charts-values/traefik/values.yaml +0 -116
  64. package/dist/templates/inventory/inventory.template.yml +0 -100
  65. package/dist/templates/inventory/production.example.yml +0 -77
  66. package/dist/templates/inventory/qa.example.yml +0 -48
  67. package/opencrvs-toolkit-2.0.0-rc.ac3c151.tgz +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencrvs/toolkit",
3
- "version": "2.0.0-rc.ac3c151",
3
+ "version": "2.0.0-rc.ac51ac7",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "bin": {
@@ -25,26 +25,16 @@
25
25
  "url": "git+https://github.com/opencrvs/opencrvs-core.git"
26
26
  },
27
27
  "dependencies": {
28
- "@inquirer/prompts": "^8.3.0",
29
- "@octokit/core": "4.2.1",
30
28
  "@trpc/client": "11.4.3",
31
29
  "@trpc/server": "^11.8.0",
32
30
  "ajv": "^8.17.1",
33
31
  "ajv-formats": "^3.0.1",
34
32
  "date-fns": "^2.28.0",
35
- "dotenv": "^16.4.5",
36
- "glob": "11.0.3",
37
- "handlebars": "^4.7.8",
38
- "js-yaml": "4.1.0",
39
33
  "jwt-decode": "^3.0.0",
40
34
  "lodash": "^4.17.10",
41
- "libsodium-wrappers": "^0.7.13",
42
35
  "object-hash": "^3.0.0",
43
- "kleur": "^4.1.5",
44
- "prompts": "^2.4.2",
45
36
  "qs": "6.15.2",
46
37
  "superjson": "1.9.0-0",
47
- "ssh2": "^1.17.0",
48
38
  "ts-morph": "^27.0.2",
49
39
  "uuid": "^9.0.0",
50
40
  "zod": "^4.2.1",
@@ -53,10 +43,6 @@
53
43
  "devDependencies": {
54
44
  "@opencrvs/events": "^2.0.0",
55
45
  "@types/object-hash": "^3.0.6",
56
- "@types/js-yaml": "4.0.9",
57
- "@types/libsodium-wrappers": "^0.7.10",
58
- "@types/prompts": "^2.4.9",
59
- "@types/ssh2": "^1.15.5",
60
46
  "@types/uuid": "^9.0.3",
61
47
  "esbuild": "^0.24.0",
62
48
  "typescript": "^5.6.3"
@@ -1 +1 @@
1
- {"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/notification/index.ts","./src/scopes/index.ts"],"version":"5.6.3"}
1
+ {"root":["./src/cli.ts","./src/api/index.ts","./src/application-config/index.ts","./src/conditionals/index.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/notification/index.ts","./src/scopes/index.ts"],"version":"5.6.3"}
@@ -1,33 +0,0 @@
1
- import { PromptObject } from 'prompts';
2
- import { Secret, Variable } from './github';
3
- export type Question<T extends string> = PromptObject<T> & {
4
- name: T;
5
- valueType?: 'SECRET' | 'VARIABLE';
6
- scope: 'ENVIRONMENT' | 'REPOSITORY';
7
- valueLabel?: string;
8
- };
9
- export type QuestionDescriptor<T extends string> = Omit<Question<T>, 'type'> & {
10
- type: 'disabled' | PromptObject<T>['type'];
11
- };
12
- export type SecretAnswer = {
13
- type: 'SECRET';
14
- scope: 'ENVIRONMENT' | 'REPOSITORY';
15
- name: string;
16
- value: string;
17
- didExist: Secret | undefined;
18
- };
19
- export type VariableAnswer = {
20
- type: 'VARIABLE';
21
- name: string;
22
- didExist: Variable | undefined;
23
- value: string;
24
- scope: 'ENVIRONMENT' | 'REPOSITORY';
25
- };
26
- export type Answer = SecretAnswer | VariableAnswer;
27
- export type Answers = Answer[];
28
- export type AnswerWithNullValue = (Omit<SecretAnswer, 'value'> & {
29
- value: SecretAnswer['value'] | null;
30
- }) | (Omit<VariableAnswer, 'value'> & {
31
- value: VariableAnswer['value'] | null;
32
- });
33
- //# sourceMappingURL=custom-types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"custom-types.d.ts","sourceRoot":"","sources":["../../src/environment/custom-types.ts"],"names":[],"mappings":"AAWA,OAAgB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,EACH,MAAM,EACN,QAAQ,EACX,MAAM,UAAU,CAAA;AAEjB,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,MAAM,IAAI,YAAY,CAAC,CAAC,CAAC,GAAG;IACzD,IAAI,EAAE,CAAC,CAAA;IACP,SAAS,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAA;IACjC,KAAK,EAAE,aAAa,GAAG,YAAY,CAAA;IACnC,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG;IAC7E,IAAI,EAAE,UAAU,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;CAC3C,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,QAAQ,CAAA;IACd,KAAK,EAAE,aAAa,GAAG,YAAY,CAAA;IACnC,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,UAAU,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAAA;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,aAAa,GAAG,YAAY,CAAA;CACpC,CAAA;AAED,MAAM,MAAM,MAAM,GAAG,YAAY,GAAG,cAAc,CAAA;AAClD,MAAM,MAAM,OAAO,GAAG,MAAM,EAAE,CAAA;AAC9B,MAAM,MAAM,mBAAmB,GAC3B,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,GAAG;IAC7B,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,GAAG,IAAI,CAAA;CACpC,CAAC,GACF,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,GAAG;IAC/B,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,GAAG,IAAI,CAAA;CACtC,CAAC,CAAA"}
@@ -1,12 +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
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,134 +0,0 @@
1
- export declare const derivedVariables: readonly [{
2
- readonly name: "ACTIVATE_USERS";
3
- readonly valueLabel: "ACTIVATE_USERS";
4
- readonly valueType: "VARIABLE";
5
- readonly type: "disabled";
6
- readonly scope: "ENVIRONMENT";
7
- }, {
8
- readonly name: "COUNTRY_CONFIG_HOST";
9
- readonly valueLabel: "COUNTRY_CONFIG_HOST";
10
- readonly valueType: "VARIABLE";
11
- readonly type: "disabled";
12
- readonly scope: "ENVIRONMENT";
13
- }, {
14
- readonly name: "GATEWAY_HOST";
15
- readonly valueLabel: "GATEWAY_HOST";
16
- readonly valueType: "VARIABLE";
17
- readonly type: "disabled";
18
- readonly scope: "ENVIRONMENT";
19
- }, {
20
- readonly name: "CONTENT_SECURITY_POLICY_WILDCARD";
21
- readonly valueLabel: "CONTENT_SECURITY_POLICY_WILDCARD";
22
- readonly valueType: "VARIABLE";
23
- readonly type: "disabled";
24
- readonly scope: "ENVIRONMENT";
25
- }, {
26
- readonly name: "CLIENT_APP_URL";
27
- readonly valueLabel: "CLIENT_APP_URL";
28
- readonly valueType: "VARIABLE";
29
- readonly type: "disabled";
30
- readonly scope: "ENVIRONMENT";
31
- }, {
32
- readonly name: "LOGIN_URL";
33
- readonly valueLabel: "LOGIN_URL";
34
- readonly valueType: "VARIABLE";
35
- readonly type: "disabled";
36
- readonly scope: "ENVIRONMENT";
37
- }, {
38
- readonly name: "ELASTICSEARCH_SUPERUSER_PASSWORD";
39
- readonly valueLabel: "ELASTICSEARCH_SUPERUSER_PASSWORD";
40
- readonly valueType: "SECRET";
41
- readonly type: "disabled";
42
- readonly scope: "ENVIRONMENT";
43
- }, {
44
- readonly name: "KIBANA_SYSTEM_PASSWORD";
45
- readonly valueLabel: "KIBANA_SYSTEM_PASSWORD";
46
- readonly valueType: "SECRET";
47
- readonly type: "disabled";
48
- readonly scope: "ENVIRONMENT";
49
- }, {
50
- readonly name: "MINIO_ROOT_USER";
51
- readonly valueLabel: "MINIO_ROOT_USER";
52
- readonly valueType: "SECRET";
53
- readonly type: "disabled";
54
- readonly scope: "ENVIRONMENT";
55
- }, {
56
- readonly name: "MINIO_ROOT_PASSWORD";
57
- readonly valueLabel: "MINIO_ROOT_PASSWORD";
58
- readonly valueType: "SECRET";
59
- readonly type: "disabled";
60
- readonly scope: "ENVIRONMENT";
61
- }, {
62
- readonly name: "MONGODB_ADMIN_USER";
63
- readonly valueLabel: "MONGODB_ADMIN_USER";
64
- readonly valueType: "SECRET";
65
- readonly type: "disabled";
66
- readonly scope: "ENVIRONMENT";
67
- }, {
68
- readonly name: "MONGODB_ADMIN_PASSWORD";
69
- readonly valueLabel: "MONGODB_ADMIN_PASSWORD";
70
- readonly valueType: "SECRET";
71
- readonly type: "disabled";
72
- readonly scope: "ENVIRONMENT";
73
- }, {
74
- readonly name: "POSTGRES_USER";
75
- readonly valueLabel: "POSTGRES_USER";
76
- readonly valueType: "SECRET";
77
- readonly type: "disabled";
78
- readonly scope: "ENVIRONMENT";
79
- }, {
80
- readonly name: "POSTGRES_PASSWORD";
81
- readonly valueLabel: "POSTGRES_PASSWORD";
82
- readonly valueType: "SECRET";
83
- readonly type: "disabled";
84
- readonly scope: "ENVIRONMENT";
85
- }, {
86
- readonly name: "SUPER_USER_PASSWORD";
87
- readonly valueLabel: "SUPER_USER_PASSWORD";
88
- readonly valueType: "SECRET";
89
- readonly type: "disabled";
90
- readonly scope: "ENVIRONMENT";
91
- }, {
92
- readonly name: "ENCRYPTION_KEY";
93
- readonly valueLabel: "ENCRYPTION_KEY";
94
- readonly valueType: "SECRET";
95
- readonly type: "disabled";
96
- readonly scope: "ENVIRONMENT";
97
- }, {
98
- readonly name: "GH_ENCRYPTION_PASSWORD";
99
- readonly valueLabel: "GH_ENCRYPTION_PASSWORD";
100
- readonly valueType: "SECRET";
101
- readonly type: "disabled";
102
- readonly scope: "REPOSITORY";
103
- }, {
104
- readonly name: "BACKUP_ENCRYPTION_PASSPHRASE";
105
- readonly valueLabel: "BACKUP_ENCRYPTION_PASSPHRASE";
106
- readonly valueType: "SECRET";
107
- readonly type: "disabled";
108
- readonly scope: "ENVIRONMENT";
109
- }, {
110
- readonly name: "BACKUP_HOST_PRIVATE_KEY";
111
- readonly valueLabel: "BACKUP_HOST_PRIVATE_KEY";
112
- readonly valueType: "SECRET";
113
- readonly type: "disabled";
114
- readonly scope: "ENVIRONMENT";
115
- }, {
116
- readonly name: "BACKUP_HOST_PUBLIC_KEY";
117
- readonly valueLabel: "BACKUP_HOST_PUBLIC_KEY";
118
- readonly valueType: "SECRET";
119
- readonly type: "disabled";
120
- readonly scope: "ENVIRONMENT";
121
- }, {
122
- readonly name: "RESTORE_ENVIRONMENT_NAME";
123
- readonly valueLabel: "RESTORE_ENVIRONMENT_NAME";
124
- readonly valueType: "VARIABLE";
125
- readonly type: "disabled";
126
- readonly scope: "ENVIRONMENT";
127
- }, {
128
- readonly name: "NOTIFICATION_TRANSPORT";
129
- readonly valueLabel: "NOTIFICATION_TRANSPORT";
130
- readonly valueType: "VARIABLE";
131
- readonly type: "disabled";
132
- readonly scope: "ENVIRONMENT";
133
- }];
134
- //# sourceMappingURL=derived-variables.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"derived-variables.d.ts","sourceRoot":"","sources":["../../src/environment/derived-variables.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2JnB,CAAC"}
@@ -1,169 +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
- Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.derivedVariables = void 0;
14
- exports.derivedVariables = [
15
- {
16
- name: 'ACTIVATE_USERS',
17
- valueLabel: 'ACTIVATE_USERS',
18
- valueType: 'VARIABLE',
19
- type: 'disabled',
20
- scope: 'ENVIRONMENT'
21
- },
22
- {
23
- name: 'COUNTRY_CONFIG_HOST',
24
- valueLabel: 'COUNTRY_CONFIG_HOST',
25
- valueType: 'VARIABLE',
26
- type: 'disabled',
27
- scope: 'ENVIRONMENT'
28
- },
29
- {
30
- name: 'GATEWAY_HOST',
31
- valueLabel: 'GATEWAY_HOST',
32
- valueType: 'VARIABLE',
33
- type: 'disabled',
34
- scope: 'ENVIRONMENT'
35
- },
36
- {
37
- name: 'CONTENT_SECURITY_POLICY_WILDCARD',
38
- valueLabel: 'CONTENT_SECURITY_POLICY_WILDCARD',
39
- valueType: 'VARIABLE',
40
- type: 'disabled',
41
- scope: 'ENVIRONMENT'
42
- },
43
- {
44
- name: 'CLIENT_APP_URL',
45
- valueLabel: 'CLIENT_APP_URL',
46
- valueType: 'VARIABLE',
47
- type: 'disabled',
48
- scope: 'ENVIRONMENT'
49
- },
50
- {
51
- name: 'LOGIN_URL',
52
- valueLabel: 'LOGIN_URL',
53
- valueType: 'VARIABLE',
54
- type: 'disabled',
55
- scope: 'ENVIRONMENT'
56
- },
57
- {
58
- name: 'ELASTICSEARCH_SUPERUSER_PASSWORD',
59
- valueLabel: 'ELASTICSEARCH_SUPERUSER_PASSWORD',
60
- valueType: 'SECRET',
61
- type: 'disabled',
62
- scope: 'ENVIRONMENT'
63
- },
64
- {
65
- name: 'KIBANA_SYSTEM_PASSWORD',
66
- valueLabel: 'KIBANA_SYSTEM_PASSWORD',
67
- valueType: 'SECRET',
68
- type: 'disabled',
69
- scope: 'ENVIRONMENT'
70
- },
71
- {
72
- name: 'MINIO_ROOT_USER',
73
- valueLabel: 'MINIO_ROOT_USER',
74
- valueType: 'SECRET',
75
- type: 'disabled',
76
- scope: 'ENVIRONMENT'
77
- },
78
- {
79
- name: 'MINIO_ROOT_PASSWORD',
80
- valueLabel: 'MINIO_ROOT_PASSWORD',
81
- valueType: 'SECRET',
82
- type: 'disabled',
83
- scope: 'ENVIRONMENT'
84
- },
85
- {
86
- name: 'MONGODB_ADMIN_USER',
87
- valueLabel: 'MONGODB_ADMIN_USER',
88
- valueType: 'SECRET',
89
- type: 'disabled',
90
- scope: 'ENVIRONMENT'
91
- },
92
- {
93
- name: 'MONGODB_ADMIN_PASSWORD',
94
- valueLabel: 'MONGODB_ADMIN_PASSWORD',
95
- valueType: 'SECRET',
96
- type: 'disabled',
97
- scope: 'ENVIRONMENT'
98
- },
99
- {
100
- name: 'POSTGRES_USER',
101
- valueLabel: 'POSTGRES_USER',
102
- valueType: 'SECRET',
103
- type: 'disabled',
104
- scope: 'ENVIRONMENT'
105
- },
106
- {
107
- name: 'POSTGRES_PASSWORD',
108
- valueLabel: 'POSTGRES_PASSWORD',
109
- valueType: 'SECRET',
110
- type: 'disabled',
111
- scope: 'ENVIRONMENT'
112
- },
113
- {
114
- name: 'SUPER_USER_PASSWORD',
115
- valueLabel: 'SUPER_USER_PASSWORD',
116
- valueType: 'SECRET',
117
- type: 'disabled',
118
- scope: 'ENVIRONMENT'
119
- },
120
- {
121
- name: 'ENCRYPTION_KEY',
122
- valueLabel: 'ENCRYPTION_KEY',
123
- valueType: 'SECRET',
124
- type: 'disabled',
125
- scope: 'ENVIRONMENT'
126
- },
127
- {
128
- name: 'GH_ENCRYPTION_PASSWORD',
129
- valueLabel: 'GH_ENCRYPTION_PASSWORD',
130
- valueType: 'SECRET',
131
- type: 'disabled',
132
- scope: 'REPOSITORY'
133
- },
134
- {
135
- name: 'BACKUP_ENCRYPTION_PASSPHRASE',
136
- valueLabel: 'BACKUP_ENCRYPTION_PASSPHRASE',
137
- valueType: 'SECRET',
138
- type: 'disabled',
139
- scope: 'ENVIRONMENT'
140
- },
141
- {
142
- name: 'BACKUP_HOST_PRIVATE_KEY',
143
- valueLabel: 'BACKUP_HOST_PRIVATE_KEY',
144
- valueType: 'SECRET',
145
- type: 'disabled',
146
- scope: 'ENVIRONMENT'
147
- },
148
- {
149
- name: 'BACKUP_HOST_PUBLIC_KEY',
150
- valueLabel: 'BACKUP_HOST_PUBLIC_KEY',
151
- valueType: 'SECRET',
152
- type: 'disabled',
153
- scope: 'ENVIRONMENT'
154
- },
155
- {
156
- name: 'RESTORE_ENVIRONMENT_NAME',
157
- valueLabel: 'RESTORE_ENVIRONMENT_NAME',
158
- valueType: 'VARIABLE',
159
- type: 'disabled',
160
- scope: 'ENVIRONMENT'
161
- },
162
- {
163
- name: 'NOTIFICATION_TRANSPORT',
164
- valueLabel: 'NOTIFICATION_TRANSPORT',
165
- valueType: 'VARIABLE',
166
- type: 'disabled',
167
- scope: 'ENVIRONMENT'
168
- },
169
- ];
@@ -1,4 +0,0 @@
1
- import { Secret, Variable } from './github';
2
- import { AnswerWithNullValue, QuestionDescriptor } from './custom-types';
3
- export declare function askQuestionWithEditor(questions: Array<QuestionDescriptor<any>>, existingValues: Array<Secret | Variable>): Promise<AnswerWithNullValue[]>;
4
- //# sourceMappingURL=editor-questions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"editor-questions.d.ts","sourceRoot":"","sources":["../../src/environment/editor-questions.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAW,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAWlF,wBAAsB,qBAAqB,CACvC,SAAS,EAAE,KAAK,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,EACzC,cAAc,EAAE,KAAK,CAAC,MAAM,GAAG,QAAQ,CAAC,GACzC,OAAO,CAAC,mBAAmB,EAAE,CAAC,CA6ChC"}
@@ -1,65 +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.askQuestionWithEditor = askQuestionWithEditor;
26
- const utils_1 = require("./utils");
27
- const kleur_1 = __importDefault(require("kleur"));
28
- const prompts_1 = __importDefault(require("prompts"));
29
- function editorQuestion(question) {
30
- return import('@inquirer/prompts').then(({ editor }) => editor({ message: question }));
31
- }
32
- function askQuestionWithEditor(questions, existingValues) {
33
- return __awaiter(this, void 0, void 0, function* () {
34
- let answers = [];
35
- for (const question of questions) {
36
- const questionWithVariableLabel = Object.assign(Object.assign({}, question), { message: `${kleur_1.default.cyan(question.valueLabel || '')}: ${question.message}` });
37
- if (!questionWithVariableLabel.valueLabel) {
38
- throw Error("Undefined Label");
39
- }
40
- const existingSecret = (0, utils_1.findExistingValue)(questionWithVariableLabel.valueLabel, 'SECRET', questionWithVariableLabel.scope, existingValues);
41
- let updateSecret = true;
42
- if (existingSecret) {
43
- updateSecret = (yield (0, prompts_1.default)([{
44
- name: 'overWrite',
45
- type: 'confirm',
46
- message: `${kleur_1.default.yellow(`${existingSecret.scope === 'REPOSITORY'
47
- ? 'Repository secret'
48
- : 'Secret'} ${kleur_1.default.cyan(existingSecret.name)} already exists in Github. Do you want to update it?`)}`
49
- }])).overWrite;
50
- }
51
- if (!existingSecret || updateSecret === true) {
52
- const question_answer = yield editorQuestion(questionWithVariableLabel.message);
53
- const answer = {
54
- type: 'SECRET',
55
- scope: 'ENVIRONMENT',
56
- name: questionWithVariableLabel.valueLabel,
57
- value: question_answer,
58
- didExist: existingSecret
59
- };
60
- answers.push(answer);
61
- }
62
- }
63
- return answers;
64
- });
65
- }
@@ -1,5 +0,0 @@
1
- export declare function getRepoInfo(): {
2
- organization: string;
3
- repository: string;
4
- };
5
- //# sourceMappingURL=git.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/environment/git.ts"],"names":[],"mappings":"AAaA,wBAAgB,WAAW;;;EAyB1B"}
@@ -1,38 +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
- Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.getRepoInfo = getRepoInfo;
14
- const child_process_1 = require("child_process");
15
- function getRepoInfo() {
16
- try {
17
- const remoteUrl = (0, child_process_1.execSync)("git config --get remote.origin.url", {
18
- stdio: ["ignore", "pipe", "ignore"]
19
- })
20
- .toString()
21
- .trim();
22
- // Handle both SSH and HTTPS formats
23
- const match = remoteUrl.match(/github\.com[:/](.+?)\/(.+?)(\.git)?$/);
24
- if (!match) {
25
- return { organization: "", repository: "" };
26
- }
27
- return {
28
- organization: match[1],
29
- repository: match[2]
30
- };
31
- }
32
- catch (_a) {
33
- return {
34
- organization: "",
35
- repository: ""
36
- };
37
- }
38
- }
@@ -1,26 +0,0 @@
1
- import { Octokit } from '@octokit/core';
2
- export declare function createEnvironmentVariable(octokit: Octokit, repositoryId: number, environment: string, name: string, value: string): Promise<void>;
3
- export declare function updateEnvironmentVariable(octokit: Octokit, repositoryId: number, environment: string, name: string, value: string): Promise<void>;
4
- export declare function createRepositoryVariable(octokit: Octokit, repositoryId: number, name: string, value: string): Promise<void>;
5
- export declare function updateRepositoryVariable(octokit: Octokit, repositoryId: number, name: string, value: string): Promise<void>;
6
- export declare function getRepositoryId(octokit: Octokit, owner: string, repo: string): Promise<number>;
7
- export declare function createEnvironmentSecret(octokit: Octokit, repositoryId: number, environment: string, name: string, secret: string, organisationName: string, repositoryName: string): Promise<void>;
8
- export declare function createRepositorySecret(octokit: Octokit, repositoryId: number, name: string, secret: string, organisationName: string, repositoryName: string): Promise<void>;
9
- export declare function getRepositoryEnvironments(octokit: Octokit, githubOrganisation: string, repository: string): Promise<string[]>;
10
- export declare function createEnvironment(octokit: Octokit, environment: string, ORGANISATION: string, REPOSITORY_NAME: string): Promise<boolean>;
11
- export type Secret = {
12
- type: 'SECRET';
13
- name: string;
14
- scope: 'ENVIRONMENT' | 'REPOSITORY';
15
- };
16
- export type Variable = {
17
- type: 'VARIABLE';
18
- name: string;
19
- value: string;
20
- scope: 'ENVIRONMENT' | 'REPOSITORY';
21
- };
22
- export declare function listEnvironmentSecrets(octokit: Octokit, owner: string, repositoryId: number, environmentName: string): Promise<Secret[]>;
23
- export declare function listRepositorySecrets(octokit: Octokit, owner: string, repositoryName: string): Promise<Secret[]>;
24
- export declare function listEnvironmentVariables(octokit: Octokit, repositoryId: number, environmentName: string): Promise<Variable[]>;
25
- export declare function listRepositoryVariables(octokit: Octokit, owner: string, repositoryName: string): Promise<Variable[]>;
26
- //# sourceMappingURL=github.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../src/environment/github.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAGvC,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,IAAI,CAAC,CAaf;AACD,wBAAsB,yBAAyB,CAC7C,OAAO,E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