@opencrvs/toolkit 2.2.0-rc.3af310b → 2.2.0-rc.5bf5dfc

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 (82) hide show
  1. package/build.sh +7 -2
  2. package/dist/application-config/index.js +9 -9
  3. package/dist/authentication/index.d.ts +2 -1
  4. package/dist/authentication/index.js +20 -12
  5. package/dist/cli.js +633 -333
  6. package/dist/commons/api/router.d.ts +249 -249
  7. package/dist/commons/application-config/index.d.ts +2 -2
  8. package/dist/commons/conditionals/conditionals.d.ts +4 -4
  9. package/dist/commons/conditionals/index.d.ts +1 -0
  10. package/dist/commons/conditionals/validate.d.ts +6 -1
  11. package/dist/commons/events/ActionConfig.d.ts +2 -2
  12. package/dist/commons/events/ActionDocument.d.ts +1 -0
  13. package/dist/commons/events/ActionInput.d.ts +4 -4
  14. package/dist/commons/events/ActionStatus.d.ts +2 -2
  15. package/dist/commons/events/ActionType.d.ts +2 -0
  16. package/dist/commons/events/AdvancedSearchConfig.d.ts +3 -0
  17. package/dist/commons/events/CompositeFieldValue.d.ts +5 -1
  18. package/dist/commons/events/Draft.d.ts +34 -1
  19. package/dist/commons/events/EventConfig.d.ts +1 -10
  20. package/dist/commons/events/EventIndex.d.ts +2 -2
  21. package/dist/commons/events/FieldConfig.d.ts +1 -1
  22. package/dist/commons/events/FieldTypeMapping.d.ts +17 -17
  23. package/dist/commons/events/Flag.d.ts +1 -1
  24. package/dist/commons/events/PlainDate.d.ts +1 -0
  25. package/dist/commons/events/eventConfigValidation.d.ts +1 -1
  26. package/dist/commons/events/field.d.ts +5 -0
  27. package/dist/commons/events/index.d.ts +3 -0
  28. package/dist/commons/events/locations.d.ts +1 -1
  29. package/dist/commons/events/scopes.d.ts +2 -1
  30. package/dist/commons/events/test.utils.d.ts +5 -6
  31. package/dist/commons/events/toNotificationForm.d.ts +17 -0
  32. package/dist/commons/events/utils.d.ts +26 -5
  33. package/dist/commons/users/Role.d.ts +23 -0
  34. package/dist/commons/users/User.d.ts +263 -0
  35. package/dist/commons/users/authentication.d.ts +67 -0
  36. package/dist/commons/users/index.d.ts +5 -0
  37. package/dist/commons/users/roleValidations.d.ts +15 -0
  38. package/dist/commons/users/scopes.d.ts +1402 -0
  39. package/dist/commons/users/userReferences.d.ts +176 -0
  40. package/dist/conditionals/index.js +5 -5
  41. package/dist/environment/custom-types.d.ts +1 -0
  42. package/dist/environment/custom-types.d.ts.map +1 -1
  43. package/dist/environment/derived-variables.d.ts +6 -4
  44. package/dist/environment/derived-variables.d.ts.map +1 -1
  45. package/dist/environment/derived-variables.js +6 -4
  46. package/dist/environment/questions.d.ts +42 -9
  47. package/dist/environment/questions.d.ts.map +1 -1
  48. package/dist/environment/questions.js +70 -47
  49. package/dist/environment/registry.d.ts +15 -0
  50. package/dist/environment/registry.d.ts.map +1 -0
  51. package/dist/environment/registry.js +112 -0
  52. package/dist/environment/setup-environment.d.ts.map +1 -1
  53. package/dist/environment/setup-environment.js +85 -29
  54. package/dist/events/index.js +214 -152
  55. package/dist/migrations/add-notify-config.d.ts +40 -0
  56. package/dist/migrations/add-notify-config.d.ts.map +1 -0
  57. package/dist/migrations/add-notify-config.js +249 -0
  58. package/dist/migrations/index.d.ts.map +1 -1
  59. package/dist/migrations/index.js +345 -143
  60. package/dist/migrations/move-declaration-to-declare-action.d.ts.map +1 -1
  61. package/dist/migrations/move-declaration-to-declare-action.js +27 -144
  62. package/dist/migrations/read-declaration-through-helper.d.ts.map +1 -1
  63. package/dist/migrations/read-declaration-through-helper.js +3 -61
  64. package/dist/migrations/utils.d.ts +61 -0
  65. package/dist/migrations/utils.d.ts.map +1 -0
  66. package/dist/migrations/utils.js +218 -0
  67. package/dist/notification/index.js +282 -90
  68. package/dist/roles/index.d.ts +2 -0
  69. package/dist/roles/index.d.ts.map +1 -0
  70. package/dist/roles/index.js +719 -0
  71. package/dist/scopes/index.d.ts +54 -61
  72. package/dist/scopes/index.js +15 -11
  73. package/dist/templates/charts-values/opencrvs-services/values.yaml +3 -4
  74. package/opencrvs-toolkit-2.2.0-rc.5bf5dfc.tgz +0 -0
  75. package/package.json +5 -3
  76. package/tsconfig.build.tsbuildinfo +1 -1
  77. package/tsconfig.json +3 -5
  78. package/dist/commons/events/notificationFormFallback.d.ts +0 -10
  79. package/dist/environment/dockerhub.d.ts +0 -15
  80. package/dist/environment/dockerhub.d.ts.map +0 -1
  81. package/dist/environment/dockerhub.js +0 -104
  82. package/opencrvs-toolkit-2.2.0-rc.3af310b.tgz +0 -0
@@ -0,0 +1,176 @@
1
+ import { JurisdictionFilter, ScopeType, ScopeOptionKey } from './scopes';
2
+ import z from 'zod/v4';
3
+ declare const ScopeOptionReference: z.ZodObject<{
4
+ $scope: z.ZodEnum<{
5
+ "attachment.upload": "attachment.upload";
6
+ bypassratelimit: "bypassratelimit";
7
+ "config.update-all": "config.update-all";
8
+ "dashboard.view": "dashboard.view";
9
+ "integration.audit.read": "integration.audit.read";
10
+ "integration.create": "integration.create";
11
+ "location.edit": "location.edit";
12
+ "organisation.read-locations": "organisation.read-locations";
13
+ "performance.read": "performance.read";
14
+ "performance.read-dashboards": "performance.read-dashboards";
15
+ "performance.vital-statistics-export": "performance.vital-statistics-export";
16
+ "profile.electronic-signature": "profile.electronic-signature";
17
+ "record.action.accept": "record.action.accept";
18
+ "record.action.reject": "record.action.reject";
19
+ "record.archive": "record.archive";
20
+ "record.correct": "record.correct";
21
+ "record.create": "record.create";
22
+ "record.custom-action": "record.custom-action";
23
+ "record.declare": "record.declare";
24
+ "record.edit": "record.edit";
25
+ "record.import": "record.import";
26
+ "record.notify": "record.notify";
27
+ "record.print-certified-copies": "record.print-certified-copies";
28
+ "record.read": "record.read";
29
+ "record.register": "record.register";
30
+ "record.reindex": "record.reindex";
31
+ "record.reinstate-registration": "record.reinstate-registration";
32
+ "record.reject": "record.reject";
33
+ "record.request-correction": "record.request-correction";
34
+ "record.review-duplicates": "record.review-duplicates";
35
+ "record.revoke-registration": "record.revoke-registration";
36
+ "record.search": "record.search";
37
+ "record.unarchive": "record.unarchive";
38
+ "record.unassign-others": "record.unassign-others";
39
+ "user.create": "user.create";
40
+ "user.data-seeding": "user.data-seeding";
41
+ "user.edit": "user.edit";
42
+ "user.read": "user.read";
43
+ "user.read-only-my-audit": "user.read-only-my-audit";
44
+ "user.search": "user.search";
45
+ workqueue: "workqueue";
46
+ }>;
47
+ $option: z.ZodEnum<{
48
+ accessLevel: "accessLevel";
49
+ createdBy: "createdBy";
50
+ createdIn: "createdIn";
51
+ declaredBy: "declaredBy";
52
+ declaredIn: "declaredIn";
53
+ event: "event";
54
+ flags: "flags";
55
+ ids: "ids";
56
+ notifiedBy: "notifiedBy";
57
+ notifiedIn: "notifiedIn";
58
+ placeOfEvent: "placeOfEvent";
59
+ registeredBy: "registeredBy";
60
+ registeredIn: "registeredIn";
61
+ role: "role";
62
+ status: "status";
63
+ }>;
64
+ }, z.core.$strip>;
65
+ type ScopeOptionReference = z.infer<typeof ScopeOptionReference>;
66
+ export declare const JurisdictionReference: z.ZodObject<{
67
+ $jurisdiction: z.ZodUnion<[z.ZodEnum<{
68
+ administrativeArea: "administrativeArea";
69
+ all: "all";
70
+ location: "location";
71
+ }>, z.ZodObject<{
72
+ $scope: z.ZodEnum<{
73
+ "attachment.upload": "attachment.upload";
74
+ bypassratelimit: "bypassratelimit";
75
+ "config.update-all": "config.update-all";
76
+ "dashboard.view": "dashboard.view";
77
+ "integration.audit.read": "integration.audit.read";
78
+ "integration.create": "integration.create";
79
+ "location.edit": "location.edit";
80
+ "organisation.read-locations": "organisation.read-locations";
81
+ "performance.read": "performance.read";
82
+ "performance.read-dashboards": "performance.read-dashboards";
83
+ "performance.vital-statistics-export": "performance.vital-statistics-export";
84
+ "profile.electronic-signature": "profile.electronic-signature";
85
+ "record.action.accept": "record.action.accept";
86
+ "record.action.reject": "record.action.reject";
87
+ "record.archive": "record.archive";
88
+ "record.correct": "record.correct";
89
+ "record.create": "record.create";
90
+ "record.custom-action": "record.custom-action";
91
+ "record.declare": "record.declare";
92
+ "record.edit": "record.edit";
93
+ "record.import": "record.import";
94
+ "record.notify": "record.notify";
95
+ "record.print-certified-copies": "record.print-certified-copies";
96
+ "record.read": "record.read";
97
+ "record.register": "record.register";
98
+ "record.reindex": "record.reindex";
99
+ "record.reinstate-registration": "record.reinstate-registration";
100
+ "record.reject": "record.reject";
101
+ "record.request-correction": "record.request-correction";
102
+ "record.review-duplicates": "record.review-duplicates";
103
+ "record.revoke-registration": "record.revoke-registration";
104
+ "record.search": "record.search";
105
+ "record.unarchive": "record.unarchive";
106
+ "record.unassign-others": "record.unassign-others";
107
+ "user.create": "user.create";
108
+ "user.data-seeding": "user.data-seeding";
109
+ "user.edit": "user.edit";
110
+ "user.read": "user.read";
111
+ "user.read-only-my-audit": "user.read-only-my-audit";
112
+ "user.search": "user.search";
113
+ workqueue: "workqueue";
114
+ }>;
115
+ $option: z.ZodEnum<{
116
+ accessLevel: "accessLevel";
117
+ createdBy: "createdBy";
118
+ createdIn: "createdIn";
119
+ declaredBy: "declaredBy";
120
+ declaredIn: "declaredIn";
121
+ event: "event";
122
+ flags: "flags";
123
+ ids: "ids";
124
+ notifiedBy: "notifiedBy";
125
+ notifiedIn: "notifiedIn";
126
+ placeOfEvent: "placeOfEvent";
127
+ registeredBy: "registeredBy";
128
+ registeredIn: "registeredIn";
129
+ role: "role";
130
+ status: "status";
131
+ }>;
132
+ }, z.core.$strip>]>;
133
+ }, z.core.$strip>;
134
+ export type JurisdictionReference = z.infer<typeof JurisdictionReference>;
135
+ /**
136
+ * Resolves a jurisdiction reference to a jurisdiction filter.
137
+ *
138
+ * @param jurisdictionReference - The jurisdiction reference to resolve. This can be a plain jurisdiction filter or a scope option reference.
139
+ * @returns The jurisdiction filter or undefined if the jurisdiction reference is not valid.
140
+ */
141
+ export declare function resolveJurisdictionReference(jurisdictionReference: JurisdictionReference | undefined, token?: string, eventType?: string): JurisdictionFilter | undefined;
142
+ /** Functions for referencing values from the logged in user's details */
143
+ export declare const userReferenceFunctions: {
144
+ scope: (scope: ScopeType) => {
145
+ /**
146
+ * user.scope().attribute() is used to create a scope option reference.
147
+ *
148
+ * E.g.: user.scope('record.create').attribute('placeOfEvent')
149
+ *
150
+ * @param option - The option to create a reference for.
151
+ * @returns A scope option reference.
152
+ */
153
+ attribute: (option: ScopeOptionKey) => {
154
+ $scope: "attachment.upload" | "bypassratelimit" | "config.update-all" | "dashboard.view" | "integration.audit.read" | "integration.create" | "location.edit" | "organisation.read-locations" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "profile.electronic-signature" | "record.action.accept" | "record.action.reject" | "record.archive" | "record.correct" | "record.create" | "record.custom-action" | "record.declare" | "record.edit" | "record.import" | "record.notify" | "record.print-certified-copies" | "record.read" | "record.register" | "record.reindex" | "record.reinstate-registration" | "record.reject" | "record.request-correction" | "record.review-duplicates" | "record.revoke-registration" | "record.search" | "record.unarchive" | "record.unassign-others" | "user.create" | "user.data-seeding" | "user.edit" | "user.read" | "user.read-only-my-audit" | "user.search" | "workqueue";
155
+ $option: "accessLevel" | "createdBy" | "createdIn" | "declaredBy" | "declaredIn" | "event" | "flags" | "ids" | "notifiedBy" | "notifiedIn" | "placeOfEvent" | "registeredBy" | "registeredIn" | "role" | "status";
156
+ };
157
+ };
158
+ /**
159
+ * user.jurisdicton() accepts two different kinds of parameters, either:
160
+ *
161
+ * 1. a plain jurisdiction filter: user.jurisdiction('administrativeArea')
162
+ * 2. a scope option reference: user.jurisdiction(user.scope('record.create').attribute('placeOfEvent'))
163
+ *
164
+ * These will be resolved during runtime.
165
+ *
166
+ * @param jurisdiction - The jurisdiction to resolve.
167
+ */
168
+ jurisdiction: (jurisdiction: JurisdictionFilter | ScopeOptionReference) => {
169
+ $jurisdiction: "administrativeArea" | "all" | "location" | {
170
+ $scope: "attachment.upload" | "bypassratelimit" | "config.update-all" | "dashboard.view" | "integration.audit.read" | "integration.create" | "location.edit" | "organisation.read-locations" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "profile.electronic-signature" | "record.action.accept" | "record.action.reject" | "record.archive" | "record.correct" | "record.create" | "record.custom-action" | "record.declare" | "record.edit" | "record.import" | "record.notify" | "record.print-certified-copies" | "record.read" | "record.register" | "record.reindex" | "record.reinstate-registration" | "record.reject" | "record.request-correction" | "record.review-duplicates" | "record.revoke-registration" | "record.search" | "record.unarchive" | "record.unassign-others" | "user.create" | "user.data-seeding" | "user.edit" | "user.read" | "user.read-only-my-audit" | "user.search" | "workqueue";
171
+ $option: "accessLevel" | "createdBy" | "createdIn" | "declaredBy" | "declaredIn" | "event" | "flags" | "ids" | "notifiedBy" | "notifiedIn" | "placeOfEvent" | "registeredBy" | "registeredIn" | "role" | "status";
172
+ };
173
+ };
174
+ };
175
+ export {};
176
+ //# sourceMappingURL=userReferences.d.ts.map
@@ -123,7 +123,7 @@ function todayDateTimeValueSerializer() {
123
123
  return { $$now: true };
124
124
  }
125
125
 
126
- // ../commons/src/scopes.ts
126
+ // ../commons/src/users/scopes.ts
127
127
  var z11 = __toESM(require("zod/v4"));
128
128
  var qs = __toESM(require("qs"));
129
129
 
@@ -132,7 +132,7 @@ var import_uuid = require("uuid");
132
132
  var z4 = __toESM(require("zod/v4"));
133
133
  var UUID = z4.uuid().brand("UUID");
134
134
 
135
- // ../commons/src/authentication.ts
135
+ // ../commons/src/users/authentication.ts
136
136
  var import_jwt_decode = __toESM(require("jwt-decode"));
137
137
  var z5 = __toESM(require("zod/v4"));
138
138
  var TokenUserType = z5.enum(["user", "system"]);
@@ -262,7 +262,7 @@ var ActionStatus = {
262
262
  };
263
263
 
264
264
  // ../commons/src/events/Flag.ts
265
- var z9 = __toESM(require("zod/v4"));
265
+ var z9 = __toESM(require("zod"));
266
266
 
267
267
  // ../commons/src/events/TranslationConfig.ts
268
268
  var z7 = __toESM(require("zod/v4"));
@@ -358,7 +358,7 @@ var CustomFlag = z9.string().refine((val) => !Object.values(InherentFlags).inclu
358
358
  message: `Custom flag cannot be one of the inherent flags: ${Object.values(
359
359
  InherentFlags
360
360
  ).join(", ")}`
361
- }).refine((val) => !ActionFlag.safeParse(val).success, {
361
+ }).refine((val) => !ActionFlag.validate(val), {
362
362
  message: "Custom flag cannot match the ActionFlag pattern (ActionType:ActionStatus)."
363
363
  }).describe("Custom flag identifier defined by the country config.");
364
364
  var Flag = ActionFlag.or(z9.enum(InherentFlags)).or(CustomFlag);
@@ -401,7 +401,7 @@ var EventStatus = z10.enum([
401
401
  "ARCHIVED"
402
402
  ]);
403
403
 
404
- // ../commons/src/scopes.ts
404
+ // ../commons/src/users/scopes.ts
405
405
  var JurisdictionFilter = z11.enum(["administrativeArea", "location", "all"]).describe(
406
406
  "Filters based on user jurisdiction relative to their office location in hierarchy."
407
407
  );
@@ -5,6 +5,7 @@ export type Question<T extends string> = PromptObject<T> & {
5
5
  valueType?: 'SECRET' | 'VARIABLE';
6
6
  scope: 'ENVIRONMENT' | 'REPOSITORY';
7
7
  valueLabel?: string;
8
+ legacyValueLabel?: string;
8
9
  };
9
10
  export type QuestionDescriptor<T extends string> = Omit<Question<T>, 'type'> & {
10
11
  type: 'disabled' | PromptObject<T>['type'];
@@ -1 +1 @@
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,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAE3C,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,CA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AAI,CAAA;CACtC,CAAC,CAAA"}
@@ -47,14 +47,16 @@ export declare const derivedVariables: readonly [{
47
47
  readonly type: 'disabled';
48
48
  readonly scope: 'ENVIRONMENT';
49
49
  }, {
50
- readonly name: 'MINIO_ROOT_USER';
51
- readonly valueLabel: 'MINIO_ROOT_USER';
50
+ readonly name: 'S3_ADMIN_ACCESS_KEY';
51
+ readonly valueLabel: 'S3_ADMIN_ACCESS_KEY';
52
+ readonly legacyValueLabel: 'MINIO_ROOT_USER';
52
53
  readonly valueType: 'SECRET';
53
54
  readonly type: 'disabled';
54
55
  readonly scope: 'ENVIRONMENT';
55
56
  }, {
56
- readonly name: 'MINIO_ROOT_PASSWORD';
57
- readonly valueLabel: 'MINIO_ROOT_PASSWORD';
57
+ readonly name: 'S3_ADMIN_SECRET_KEY';
58
+ readonly valueLabel: 'S3_ADMIN_SECRET_KEY';
59
+ readonly legacyValueLabel: 'MINIO_ROOT_PASSWORD';
58
60
  readonly valueType: 'SECRET';
59
61
  readonly type: 'disabled';
60
62
  readonly scope: 'ENVIRONMENT';
@@ -1 +1 @@
1
- {"version":3,"file":"derived-variables.d.ts","sourceRoot":"","sources":["../../src/environment/derived-variables.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,gBAAgB;aAEzB,IAAI,EAAE,gBAAgB;aACtB,UAAU,EAAE,gBAAgB;aAC5B,SAAS,EAAE,UAAU;aACrB,IAAI,EAAE,UAAU;aAChB,KAAK,EAAE,aAAa;;aAGpB,IAAI,EAAE,qBAAqB;aAC3B,UAAU,EAAE,qBAAqB;aACjC,SAAS,EAAE,UAAU;aACrB,IAAI,EAAE,UAAU;aAChB,KAAK,EAAE,aAAa;;aAGpB,IAAI,EAAE,cAAc;aACpB,UAAU,EAAE,cAAc;aAC1B,SAAS,EAAE,UAAU;aACrB,IAAI,EAAE,UAAU;aAChB,KAAK,EAAE,aAAa;;aAGpB,IAAI,EAAE,kCAAkC;aACxC,UAAU,EAAE,kCAAkC;aAC9C,SAAS,EA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EAAE,UAAU;aAChB,KAAK,EAAE,aAAa;;aAGpB,IAAI,EAAE,oBAAoB;aAC1B,UAAU,EAAE,oBAAoB;aAChC,SAAS,EAAE,UAAU;aACrB,IAAI,EAAE,UAAU;aAChB,KAAK,EAAE,aAAa;EAEd,CAAA"}
1
+ {"version":3,"file":"derived-variables.d.ts","sourceRoot":"","sources":["../../src/environment/derived-variables.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,gBAAgB;aAEzB,IAAI,EAAE,gBAAgB;aACtB,UAAU,EAAE,gBAAgB;aAC5B,SAAS,EAAE,UAAU;aACrB,IAAI,EAAE,UAAU;aAChB,KAAK,EAAE,aAAa;;aAGpB,IAAI,EAAE,qBAAqB;aAC3B,UAAU,EAAE,qBAAqB;aACjC,SAAS,EAAE,UAAU;aACrB,IAAI,EAAE,UAAU;aAChB,KAAK,EAAE,aAAa;;aAGpB,IAAI,EAAE,cAAc;aACpB,UAAU,EAAE,cAAc;aAC1B,SAAS,EAAE,UAAU;aACrB,IAAI,EAAE,UAAU;aAChB,KAAK,EAAE,aAAa;;aAGpB,IAAI,EAAE,kCAAkC;aACxC,UAAU,EAAE,kCAAkC;aAC9C,SAAS,EAAE,UAAU;aACrB,IAAI,EAAE,UAAU;aAChB,KAAK,EAAE,aAAa;;aAGpB,IAAI,EAAE,gBAAgB;aACtB,UAAU,EAAE,gBAAgB;aAC5B,SAAS,EAAE,UAAU;aACrB,IAAI,EAAE,UAAU;aAChB,KAAK,EAAE,aAAa;;aAGpB,IAAI,EAAE,WAAW;aACjB,UAAU,EAAE,WAAW;aACvB,SAAS,EAAE,UAAU;aACrB,IAAI,EAAE,UAAU;aAChB,KAAK,EAAE,aAAa;;aAGpB,IAAI,EAAE,kCAAkC;aACxC,UAAU,EAAE,kCAAkC;aAC9C,SAAS,EAAE,QAAQ;aACnB,IAAI,EAAE,UAAU;aAChB,KAAK,EAAE,aAAa;;aAGpB,IAAI,EAAE,wBAAwB;aAC9B,UAAU,EAAE,wBAAwB;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S,EAAE,QAAQ;aACnB,IAAI,EAAE,UAAU;aAChB,KAAK,EAAE,aAAa;;aAGpB,IAAI,EAAE,wBAAwB;aAC9B,UAAU,EAAE,wBAAwB;aACpC,SAAS,EAAE,QAAQ;aACnB,IAAI,EAAE,UAAU;aAChB,KAAK,EAAE,aAAa;;aAGpB,IAAI,EAAE,0BAA0B;aAChC,UAAU,EAAE,0BAA0B;aACtC,SAAS,EAAE,UAAU;aACrB,IAAI,EAAE,UAAU;aAChB,KAAK,EAAE,aAAa;;aAGpB,IAAI,EAAE,0BAA0B;aAChC,UAAU,EAAE,0BAA0B;aACtC,SAAS,EAAE,UAAU;aACrB,IAAI,EAAE,UAAU;aAChB,KAAK,EAAE,aAAa;;aAGpB,IAAI,EAAE,cAAc;aACpB,UAAU,EAAE,cAAc;aAC1B,SAAS,EAAE,UAAU;aACrB,IAAI,EAAE,UAAU;aAChB,KAAK,EAAE,aAAa;;aAGpB,IAAI,EAAE,wBAAwB;aAC9B,UAAU,EAAE,wBAAwB;aACpC,SAAS,EAAE,UAAU;aACrB,IAAI,EAAE,UAAU;aAChB,KAAK,EAAE,aAAa;;aAGpB,IAAI,EAAE,gBAAgB;aACtB,UAAU,EAAE,gBAAgB;aAC5B,SAAS,EAAE,UAAU;aACrB,IAAI,EAAE,UAAU;aAChB,KAAK,EAAE,aAAa;;aAGpB,IAAI,EAAE,oBAAoB;aAC1B,UAAU,EAAE,oBAAoB;aAChC,SAAS,EAAE,UAAU;aACrB,IAAI,EAAE,UAAU;aAChB,KAAK,EAAE,aAAa;EAEd,CAAA"}
@@ -69,15 +69,17 @@ exports.derivedVariables = [
69
69
  scope: 'ENVIRONMENT'
70
70
  },
71
71
  {
72
- name: 'MINIO_ROOT_USER',
73
- valueLabel: 'MINIO_ROOT_USER',
72
+ name: 'S3_ADMIN_ACCESS_KEY',
73
+ valueLabel: 'S3_ADMIN_ACCESS_KEY',
74
+ legacyValueLabel: 'MINIO_ROOT_USER',
74
75
  valueType: 'SECRET',
75
76
  type: 'disabled',
76
77
  scope: 'ENVIRONMENT'
77
78
  },
78
79
  {
79
- name: 'MINIO_ROOT_PASSWORD',
80
- valueLabel: 'MINIO_ROOT_PASSWORD',
80
+ name: 'S3_ADMIN_SECRET_KEY',
81
+ valueLabel: 'S3_ADMIN_SECRET_KEY',
82
+ legacyValueLabel: 'MINIO_ROOT_PASSWORD',
81
83
  valueType: 'SECRET',
82
84
  type: 'disabled',
83
85
  scope: 'ENVIRONMENT'
@@ -1,15 +1,27 @@
1
1
  declare const notEmpty: (value: string | number) => "Please enter a value" | true;
2
2
  declare function validateCIDRs(input: string): true | string;
3
- export declare const dockerhubQuestions: {
3
+ declare function validateRegistryHost(input: string): true | string;
4
+ export declare const registryQuestions: ({
5
+ name: string;
6
+ type: 'text';
7
+ message: string;
8
+ valueType: 'VARIABLE';
9
+ valueLabel: string;
10
+ validate: typeof validateRegistryHost;
11
+ initial: string;
12
+ scope: 'REPOSITORY';
13
+ legacyValueLabel?: undefined;
14
+ } | {
4
15
  name: string;
5
16
  type: 'text';
6
17
  message: string;
7
18
  valueType: 'SECRET';
8
19
  valueLabel: string;
20
+ legacyValueLabel: string;
9
21
  validate: typeof notEmpty;
10
22
  initial: string | undefined;
11
23
  scope: 'REPOSITORY';
12
- }[];
24
+ })[];
13
25
  export declare const githubQuestions: {
14
26
  name: string;
15
27
  type: 'text';
@@ -18,7 +30,21 @@ export declare const githubQuestions: {
18
30
  initial: string;
19
31
  scope: 'REPOSITORY';
20
32
  }[];
21
- export declare const githubOtherQuestions: ({
33
+ export declare const githubApprovalRequiredQuestion: {
34
+ name: string;
35
+ type: 'select';
36
+ message: string;
37
+ choices: {
38
+ title: string;
39
+ value: string;
40
+ }[];
41
+ valueType: 'VARIABLE';
42
+ validate: typeof notEmpty;
43
+ valueLabel: string;
44
+ initial: string | undefined;
45
+ scope: 'ENVIRONMENT';
46
+ };
47
+ export declare const githubApproversQuestion: {
22
48
  name: string;
23
49
  type: 'text';
24
50
  message: string;
@@ -26,9 +52,8 @@ export declare const githubOtherQuestions: ({
26
52
  valueType: 'VARIABLE';
27
53
  valueLabel: string;
28
54
  scope: 'REPOSITORY';
29
- choices?: undefined;
30
- validate?: undefined;
31
- } | {
55
+ };
56
+ export declare const githubOtherQuestions: ({
32
57
  name: string;
33
58
  type: 'select';
34
59
  message: string;
@@ -41,6 +66,14 @@ export declare const githubOtherQuestions: ({
41
66
  valueLabel: string;
42
67
  initial: string | undefined;
43
68
  scope: 'ENVIRONMENT';
69
+ } | {
70
+ name: string;
71
+ type: 'text';
72
+ message: string;
73
+ initial: string | undefined;
74
+ valueType: 'VARIABLE';
75
+ valueLabel: string;
76
+ scope: 'REPOSITORY';
44
77
  })[];
45
78
  export declare const githubTokenQuestion: {
46
79
  name: string;
@@ -71,7 +104,6 @@ export declare const infrastructureQuestions: ({
71
104
  initial: string | undefined;
72
105
  scope: 'ENVIRONMENT';
73
106
  } | {
74
- validate?: undefined;
75
107
  name: string;
76
108
  type: 'text';
77
109
  message: string;
@@ -79,6 +111,7 @@ export declare const infrastructureQuestions: ({
79
111
  valueLabel: string;
80
112
  initial: string | undefined;
81
113
  scope: 'ENVIRONMENT';
114
+ validate?: undefined;
82
115
  } | {
83
116
  name: string;
84
117
  type: 'text';
@@ -100,7 +133,6 @@ export declare const staticSSLCertQuestions: {
100
133
  scope: 'ENVIRONMENT';
101
134
  }[];
102
135
  export declare const backupQuestions: ({
103
- choices?: undefined;
104
136
  validate?: undefined;
105
137
  name: string;
106
138
  type: 'text';
@@ -109,8 +141,8 @@ export declare const backupQuestions: ({
109
141
  valueLabel: string;
110
142
  initial: string;
111
143
  scope: 'ENVIRONMENT';
112
- } | {
113
144
  choices?: undefined;
145
+ } | {
114
146
  name: string;
115
147
  type: 'text';
116
148
  message: string;
@@ -119,6 +151,7 @@ export declare const backupQuestions: ({
119
151
  valueLabel: string;
120
152
  initial: string;
121
153
  scope: 'ENVIRONMENT';
154
+ choices?: undefined;
122
155
  } | {
123
156
  name: string;
124
157
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;WACZ,YAAY;;GAGtB,CAAA;AAED,eAAO,MAAM,gBAAgB;;UAGnB,MAAM;;eAGD,UAAU;;;WAGd,YAAY;GAEtB,CAAA;AAED,eAAO,MAAM,uBAAuB;;UAG1B,MAAM;;eAED,UAAU;;;;WAId,aAAa;;;UAId,MAAM;;eAED,UAAU;;;WAGd,aAAa;;;;UAsBd,MAAM;;eAED,UAAU;;;;WAId,aAAa;IAEvB,CAAA;AAED,eAAO,MAAM,sBAAsB;;UAGzB,MAAM;;eAED,QAAQ;;;;WAIZ,aAAa;GAYvB,CAAA;AAED,eAAO,MAAM,eAAe;;;UAGlB,MAAM;;eAED,UAAU;;;WAGd,aAAa;;;;UAId,MAAM;;eAED,QAAQ;;;;WAIZ,aAAa;;;;UAId,QAAQ;;;;;;eAYH,UAAU;;;;WAId,aAAa;IAEvB,CAAA;AAED,eAAO,MAAM,aAAa;;UAGhB,MAAM;;eAID,UAAU;;;;WAId,aAAa;GAEvB,CAAA;AAED,eAAO,MAAM,8BAA8B;;UAGjC,MAAM;;eAED,QAAQ;;;;WAIZ,aAAa;GAYvB,CAAA;AAED,eAAO,MAAM,cAAc;;;UAGjB,MAAM;;eAED,QAAQ;;;;WAIZ,aAAa;;;UAkCd,QAAQ;;;;;;eAYH,QAAQ;;;;WAIZ,aAAa;IAuBvB,CAAA;AAED,eAAO,MAAM,eAAe;;UAGlB,MAAM;;eAED,QAAQ;;;;WAIZ,aAAa;GAEvB,CAAA;AAED,eAAO,MAAM,sBAAsB;eAEpB,QAAQ;;UAEb,MAAM;;;WAIL,aAAa;;GAYvB,CAAA"}
@@ -13,7 +13,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  return (mod && mod.__esModule) ? mod : { "default": mod };
14
14
  };
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.metabaseAdminQuestions = exports.sentryQuestions = exports.emailQuestions = exports.databaseAndMonitoringQuestions = exports.diskQuestions = exports.backupQuestions = exports.staticSSLCertQuestions = exports.infrastructureQuestions = exports.countryQuestions = exports.githubTokenQuestion = exports.githubOtherQuestions = exports.githubQuestions = exports.dockerhubQuestions = void 0;
16
+ exports.metabaseAdminQuestions = exports.sentryQuestions = exports.emailQuestions = exports.databaseAndMonitoringQuestions = exports.diskQuestions = exports.backupQuestions = exports.staticSSLCertQuestions = exports.infrastructureQuestions = exports.countryQuestions = exports.githubTokenQuestion = exports.githubOtherQuestions = exports.githubApproversQuestion = exports.githubApprovalRequiredQuestion = exports.githubQuestions = exports.registryQuestions = void 0;
17
17
  const kleur_1 = __importDefault(require("kleur"));
18
18
  const utils_1 = require("./utils");
19
19
  const git_1 = require("./git");
@@ -40,45 +40,66 @@ function validateCIDRs(input) {
40
40
  }
41
41
  return true;
42
42
  }
43
- exports.dockerhubQuestions = [
43
+ // A host with an optional port, without protocol or path (e.g. docker.io, ghcr.io, registry.example.org:5000)
44
+ function validateRegistryHost(input) {
45
+ return /^[a-z0-9]([a-z0-9.-]*[a-z0-9])?(:[0-9]+)?$/i.test(input)
46
+ ? true
47
+ : 'Please enter a registry host without protocol or path (e.g. docker.io, ghcr.io)';
48
+ }
49
+ // The DOCKER_* and DOCKERHUB_* secrets are the previous names of the REGISTRY_* secrets
50
+ exports.registryQuestions = [
51
+ {
52
+ name: 'registryHost',
53
+ type: 'text',
54
+ message: 'What is the host of your container registry? (e.g. docker.io, ghcr.io)',
55
+ valueType: 'VARIABLE',
56
+ valueLabel: 'REGISTRY_HOST',
57
+ validate: validateRegistryHost,
58
+ initial: process.env.REGISTRY_HOST || 'docker.io',
59
+ scope: 'REPOSITORY'
60
+ },
44
61
  {
45
- name: 'dockerhubOrganisation',
62
+ name: 'registryOrganisation',
46
63
  type: 'text',
47
- message: 'What is the name of your Docker Hub organisation?',
64
+ message: 'What is the name of your organisation (or user) in the container registry?',
48
65
  valueType: 'SECRET',
49
- valueLabel: 'DOCKERHUB_ACCOUNT',
66
+ valueLabel: 'REGISTRY_ORGANISATION',
67
+ legacyValueLabel: 'DOCKERHUB_ACCOUNT',
50
68
  validate: notEmpty,
51
- initial: process.env.DOCKER_ORGANISATION,
69
+ initial: process.env.REGISTRY_ORGANISATION,
52
70
  scope: 'REPOSITORY'
53
71
  },
54
72
  {
55
- name: 'dockerhubRepository',
73
+ name: 'registryRepository',
56
74
  type: 'text',
57
- message: 'What is the name of your private Docker Hub repository?',
75
+ message: 'What is the name of your private container repository?',
58
76
  valueType: 'SECRET',
59
- valueLabel: 'DOCKERHUB_REPO',
77
+ valueLabel: 'REGISTRY_REPOSITORY',
78
+ legacyValueLabel: 'DOCKERHUB_REPO',
60
79
  validate: notEmpty,
61
- initial: process.env.DOCKER_REPO,
80
+ initial: process.env.REGISTRY_REPOSITORY,
62
81
  scope: 'REPOSITORY'
63
82
  },
64
83
  {
65
- name: 'dockerhubUsername',
84
+ name: 'registryUsername',
66
85
  type: 'text',
67
- message: 'What is the Docker Hub username the the target server should be using?',
86
+ message: 'What is the container registry username the target server should be using?',
68
87
  valueType: 'SECRET',
69
- valueLabel: 'DOCKER_USERNAME',
88
+ valueLabel: 'REGISTRY_USERNAME',
89
+ legacyValueLabel: 'DOCKER_USERNAME',
70
90
  validate: notEmpty,
71
- initial: process.env.DOCKER_USERNAME,
91
+ initial: process.env.REGISTRY_USERNAME,
72
92
  scope: 'REPOSITORY'
73
93
  },
74
94
  {
75
- name: 'dockerhubToken',
95
+ name: 'registryToken',
76
96
  type: 'text',
77
- message: 'What is the token of this Docker Hub account?',
97
+ message: 'What is the token of this container registry account?',
78
98
  valueType: 'SECRET',
79
- valueLabel: 'DOCKER_TOKEN',
99
+ valueLabel: 'REGISTRY_TOKEN',
100
+ legacyValueLabel: 'DOCKER_TOKEN',
80
101
  validate: notEmpty,
81
- initial: process.env.DOCKER_TOKEN,
102
+ initial: process.env.REGISTRY_TOKEN,
82
103
  scope: 'REPOSITORY'
83
104
  }
84
105
  ];
@@ -100,36 +121,38 @@ exports.githubQuestions = [
100
121
  scope: 'REPOSITORY'
101
122
  }
102
123
  ];
124
+ exports.githubApprovalRequiredQuestion = {
125
+ name: 'approvalRequired',
126
+ type: 'select',
127
+ message: 'Would you like to enable approvals process for GitHub action workflows?',
128
+ choices: [
129
+ {
130
+ title: 'True',
131
+ value: 'true'
132
+ },
133
+ {
134
+ title: 'False',
135
+ value: 'false'
136
+ }
137
+ ],
138
+ valueType: 'VARIABLE',
139
+ validate: notEmpty,
140
+ valueLabel: 'APPROVAL_REQUIRED',
141
+ initial: process.env.APPROVAL_REQUIRED,
142
+ scope: 'ENVIRONMENT'
143
+ };
144
+ exports.githubApproversQuestion = {
145
+ name: 'githubApprovers',
146
+ type: 'text',
147
+ message: 'Please provide/update list of approvers?',
148
+ initial: process.env.GH_APPROVERS,
149
+ valueType: 'VARIABLE',
150
+ valueLabel: 'GH_APPROVERS',
151
+ scope: 'REPOSITORY'
152
+ };
103
153
  exports.githubOtherQuestions = [
104
- {
105
- name: 'githubApprovers',
106
- type: 'text',
107
- message: 'Please provide/update list of production approvers?',
108
- initial: process.env.GH_APPROVERS,
109
- valueType: 'VARIABLE',
110
- valueLabel: 'GH_APPROVERS',
111
- scope: 'REPOSITORY'
112
- },
113
- {
114
- name: 'approvalRequired',
115
- type: 'select',
116
- message: 'Would you like to enable approvals process for GitHub action workflows?',
117
- choices: [
118
- {
119
- title: 'True',
120
- value: 'true'
121
- },
122
- {
123
- title: 'False',
124
- value: 'false'
125
- }
126
- ],
127
- valueType: 'VARIABLE',
128
- validate: notEmpty,
129
- valueLabel: 'APPROVAL_REQUIRED',
130
- initial: process.env.APPROVAL_REQUIRED,
131
- scope: 'ENVIRONMENT'
132
- }
154
+ exports.githubApprovalRequiredQuestion,
155
+ exports.githubApproversQuestion
133
156
  ];
134
157
  exports.githubTokenQuestion = [
135
158
  {
@@ -0,0 +1,15 @@
1
+ type RegistryValidationResult = {
2
+ status: 'valid' | 'skipped' | 'invalid-credentials' | 'repository-not-found' | 'unreachable';
3
+ reason?: string;
4
+ };
5
+ /**
6
+ * Checks, using the OCI Distribution (Docker Registry HTTP API v2) that every
7
+ * registry implements, that the username/token pair is accepted by the registry
8
+ * and that the organisation/repository is visible to that account.
9
+ *
10
+ * Existing GitHub secrets cannot be read back, so when any value is missing
11
+ * (kept from an existing secret) the check is skipped.
12
+ */
13
+ export declare function validateRegistryCredentials(registry: string | undefined, organisation: string | undefined, repository: string | undefined, username: string | undefined, token: string | undefined): Promise<RegistryValidationResult>;
14
+ export {};
15
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/environment/registry.ts"],"names":[],"mappings":"AAaA,KAAK,wBAAwB,GAAG;IAC9B,MAAM,EACF,OAAO,GAEP,SAAS,GACT,qBAAqB,GACrB,sBAAsB,GAEtB,aAAa,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAyCD;;;;;;;GAOG;AACH,wBAAsB,2BAA2B,CAC/C,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,OAAO,CAAC,wBAAwB,CAAC,CA0DnC"}