@opencrvs/toolkit 2.2.0-rc.045257f → 2.2.0-rc.19ec10b

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 (84) hide show
  1. package/build.sh +7 -2
  2. package/dist/application-config/index.js +16 -5
  3. package/dist/authentication/index.d.ts +1 -1
  4. package/dist/authentication/index.js +4 -8
  5. package/dist/cli.js +927 -356
  6. package/dist/commons/api/router.d.ts +17 -4
  7. package/dist/commons/application-config/index.d.ts +1 -1
  8. package/dist/commons/conditionals/conditionals.d.ts +55 -4
  9. package/dist/commons/conditionals/validate.d.ts +1 -1
  10. package/dist/commons/events/ActionStatus.d.ts +2 -2
  11. package/dist/commons/events/ActionType.d.ts +2 -0
  12. package/dist/commons/events/AdvancedSearchConfig.d.ts +3 -0
  13. package/dist/commons/events/Draft.d.ts +34 -1
  14. package/dist/commons/events/EventConfig.d.ts +446 -0
  15. package/dist/commons/events/EventDocument.d.ts +2 -0
  16. package/dist/commons/events/EventIndex.d.ts +1 -0
  17. package/dist/commons/events/EventInput.d.ts +1 -0
  18. package/dist/commons/events/EventMetadata.d.ts +1 -0
  19. package/dist/commons/events/FieldTypeMapping.d.ts +19 -19
  20. package/dist/commons/events/PlainDate.d.ts +5 -0
  21. package/dist/commons/events/defineConfig.d.ts +7 -2
  22. package/dist/commons/events/event.d.ts +20 -1
  23. package/dist/commons/events/field.d.ts +37 -0
  24. package/dist/commons/events/locations.d.ts +1 -1
  25. package/dist/commons/events/scopes.d.ts +2 -1
  26. package/dist/commons/events/state/index.d.ts +1 -0
  27. package/dist/commons/events/test.utils.d.ts +59 -6
  28. package/dist/commons/events/utils.d.ts +28 -2
  29. package/dist/commons/users/Role.d.ts +23 -0
  30. package/dist/commons/users/User.d.ts +263 -0
  31. package/dist/commons/users/authentication.d.ts +67 -0
  32. package/dist/commons/users/index.d.ts +5 -0
  33. package/dist/commons/users/roleValidations.d.ts +15 -0
  34. package/dist/commons/users/scopes.d.ts +1402 -0
  35. package/dist/commons/users/userReferences.d.ts +176 -0
  36. package/dist/conditionals/index.js +13 -5
  37. package/dist/environment/custom-types.d.ts +1 -0
  38. package/dist/environment/custom-types.d.ts.map +1 -1
  39. package/dist/environment/derived-variables.d.ts +8 -0
  40. package/dist/environment/derived-variables.d.ts.map +1 -1
  41. package/dist/environment/derived-variables.js +9 -0
  42. package/dist/environment/questions.d.ts +42 -9
  43. package/dist/environment/questions.d.ts.map +1 -1
  44. package/dist/environment/questions.js +70 -47
  45. package/dist/environment/registry.d.ts +15 -0
  46. package/dist/environment/registry.d.ts.map +1 -0
  47. package/dist/environment/registry.js +112 -0
  48. package/dist/environment/setup-environment.d.ts.map +1 -1
  49. package/dist/environment/setup-environment.js +104 -23
  50. package/dist/events/index.js +1627 -1100
  51. package/dist/migrations/add-notify-config.d.ts +40 -0
  52. package/dist/migrations/add-notify-config.d.ts.map +1 -0
  53. package/dist/migrations/add-notify-config.js +249 -0
  54. package/dist/migrations/index.d.ts.map +1 -1
  55. package/dist/migrations/index.js +602 -143
  56. package/dist/migrations/move-declaration-to-declare-action.d.ts.map +1 -1
  57. package/dist/migrations/move-declaration-to-declare-action.js +27 -144
  58. package/dist/migrations/read-declaration-through-helper.d.ts.map +1 -1
  59. package/dist/migrations/read-declaration-through-helper.js +3 -61
  60. package/dist/migrations/resolve-versioned-event-config.d.ts +56 -0
  61. package/dist/migrations/resolve-versioned-event-config.d.ts.map +1 -0
  62. package/dist/migrations/resolve-versioned-event-config.js +353 -0
  63. package/dist/migrations/utils.d.ts +61 -0
  64. package/dist/migrations/utils.d.ts.map +1 -0
  65. package/dist/migrations/utils.js +218 -0
  66. package/dist/notification/index.js +707 -119
  67. package/dist/roles/index.d.ts +2 -0
  68. package/dist/roles/index.d.ts.map +1 -0
  69. package/dist/roles/index.js +730 -0
  70. package/dist/scopes/index.d.ts +0 -10
  71. package/dist/scopes/index.js +3 -7
  72. package/dist/templates/charts-values/dependencies/values.yaml +5 -2
  73. package/dist/templates/charts-values/opencrvs-services/values.yaml +2 -5
  74. package/dist/verify/endpoints.d.ts +11 -0
  75. package/dist/verify/endpoints.d.ts.map +1 -1
  76. package/dist/verify/endpoints.js +21 -27
  77. package/opencrvs-toolkit-2.2.0-rc.19ec10b.tgz +0 -0
  78. package/package.json +4 -2
  79. package/tsconfig.build.tsbuildinfo +1 -1
  80. package/tsconfig.json +3 -5
  81. package/dist/environment/dockerhub.d.ts +0 -15
  82. package/dist/environment/dockerhub.d.ts.map +0 -1
  83. package/dist/environment/dockerhub.js +0 -104
  84. package/opencrvs-toolkit-2.2.0-rc.045257f.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
@@ -37,6 +37,7 @@ __export(conditionals_exports, {
37
37
  defineConditional: () => defineConditional,
38
38
  defineFormConditional: () => defineFormConditional,
39
39
  flag: () => flag,
40
+ isActionDateReference: () => isActionDateReference,
40
41
  isEventFieldReference: () => isEventFieldReference,
41
42
  isFieldReference: () => isFieldReference,
42
43
  never: () => never,
@@ -123,7 +124,7 @@ function todayDateTimeValueSerializer() {
123
124
  return { $$now: true };
124
125
  }
125
126
 
126
- // ../commons/src/scopes.ts
127
+ // ../commons/src/users/scopes.ts
127
128
  var z11 = __toESM(require("zod/v4"));
128
129
  var qs = __toESM(require("qs"));
129
130
 
@@ -132,7 +133,7 @@ var import_uuid = require("uuid");
132
133
  var z4 = __toESM(require("zod/v4"));
133
134
  var UUID = z4.uuid().brand("UUID");
134
135
 
135
- // ../commons/src/authentication.ts
136
+ // ../commons/src/users/authentication.ts
136
137
  var import_jwt_decode = __toESM(require("jwt-decode"));
137
138
  var z5 = __toESM(require("zod/v4"));
138
139
  var TokenUserType = z5.enum(["user", "system"]);
@@ -401,7 +402,7 @@ var EventStatus = z10.enum([
401
402
  "ARCHIVED"
402
403
  ]);
403
404
 
404
- // ../commons/src/scopes.ts
405
+ // ../commons/src/users/scopes.ts
405
406
  var JurisdictionFilter = z11.enum(["administrativeArea", "location", "all"]).describe(
406
407
  "Filters based on user jurisdiction relative to their office location in hierarchy."
407
408
  );
@@ -847,6 +848,9 @@ function isFieldReference(value) {
847
848
  function isEventFieldReference(value) {
848
849
  return typeof value === "object" && value !== null && "$$event" in value;
849
850
  }
851
+ function isActionDateReference(value) {
852
+ return typeof value === "object" && value !== null && "$action" in value;
853
+ }
850
854
  function getDateRangeToFieldReference(field, comparedField, clause) {
851
855
  return {
852
856
  type: "object",
@@ -1034,7 +1038,9 @@ function createFieldConditionals(fieldId) {
1034
1038
  },
1035
1039
  fromNow: () => {
1036
1040
  return defineFormConditional(getDayRange(this, days, "after"));
1037
- }
1041
+ },
1042
+ beforeAction: (action) => defineFormConditional(getDayRange(this, -days, "after", action)),
1043
+ afterAction: (action) => defineFormConditional(getDayRange(this, days, "after", action))
1038
1044
  }),
1039
1045
  date: (date) => {
1040
1046
  if (isFieldReference(date)) {
@@ -1075,7 +1081,9 @@ function createFieldConditionals(fieldId) {
1075
1081
  },
1076
1082
  fromNow: () => {
1077
1083
  return defineFormConditional(getDayRange(this, -days, "before"));
1078
- }
1084
+ },
1085
+ beforeAction: (action) => defineFormConditional(getDayRange(this, -days, "before", action)),
1086
+ afterAction: (action) => defineFormConditional(getDayRange(this, days, "before", action))
1079
1087
  }),
1080
1088
  date: (date) => {
1081
1089
  if (isFieldReference(date)) {
@@ -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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AM,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"}
@@ -49,12 +49,14 @@ export declare const derivedVariables: readonly [{
49
49
  }, {
50
50
  readonly name: 'S3_ADMIN_ACCESS_KEY';
51
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
57
  readonly name: 'S3_ADMIN_SECRET_KEY';
57
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';
@@ -142,5 +144,11 @@ export declare const derivedVariables: readonly [{
142
144
  readonly valueType: 'VARIABLE';
143
145
  readonly type: 'disabled';
144
146
  readonly scope: 'ENVIRONMENT';
147
+ }, {
148
+ readonly name: 'RUSTFS_HOST_DATA_PATH';
149
+ readonly valueLabel: 'RUSTFS_HOST_DATA_PATH';
150
+ readonly valueType: 'VARIABLE';
151
+ readonly type: 'disabled';
152
+ readonly scope: 'ENVIRONMENT';
145
153
  }];
146
154
  //# sourceMappingURL=derived-variables.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"derived-variables.d.ts","sourceRoot":"","sources":["../../src/environment/derived-variables.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,gBAAgB;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;aACpC,SAAS,EAAE,QAAQ;aACnB,IAAI,EAAE,UAAU;aAChB,KAAK,EAAE,aAAa;;aAGpB,IAAI,EAAE,q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AAI,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"}
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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E,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;;aAGpB,IAAI,EAAE,uBAAuB;aAC7B,UAAU,EAAE,uBAAuB;aACnC,SAAS,EAAE,UAAU;aACrB,IAAI,EAAE,UAAU;aAChB,KAAK,EAAE,aAAa;EAEd,CAAA"}
@@ -71,6 +71,7 @@ exports.derivedVariables = [
71
71
  {
72
72
  name: 'S3_ADMIN_ACCESS_KEY',
73
73
  valueLabel: 'S3_ADMIN_ACCESS_KEY',
74
+ legacyValueLabel: 'MINIO_ROOT_USER',
74
75
  valueType: 'SECRET',
75
76
  type: 'disabled',
76
77
  scope: 'ENVIRONMENT'
@@ -78,6 +79,7 @@ exports.derivedVariables = [
78
79
  {
79
80
  name: 'S3_ADMIN_SECRET_KEY',
80
81
  valueLabel: 'S3_ADMIN_SECRET_KEY',
82
+ legacyValueLabel: 'MINIO_ROOT_PASSWORD',
81
83
  valueType: 'SECRET',
82
84
  type: 'disabled',
83
85
  scope: 'ENVIRONMENT'
@@ -179,5 +181,12 @@ exports.derivedVariables = [
179
181
  valueType: 'VARIABLE',
180
182
  type: 'disabled',
181
183
  scope: 'ENVIRONMENT'
184
+ },
185
+ {
186
+ name: 'RUSTFS_HOST_DATA_PATH',
187
+ valueLabel: 'RUSTFS_HOST_DATA_PATH',
188
+ valueType: 'VARIABLE',
189
+ type: 'disabled',
190
+ scope: 'ENVIRONMENT'
182
191
  }
183
192
  ];
@@ -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
  type: 'select';
@@ -1 +1 @@
1
- {"version":3,"file":"questions.d.ts","sourceRoot":"","sources":["../../src/environment/questions.ts"],"names":[],"mappings":"AAeA,QAAA,MAAM,QAAQ,UAAW,MAAM,GAAG,MAAM,kCAC4B,CAAA;AAepE,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAgBnD;AAED,eAAO,MAAM,kBAAkB;;UAGrB,MAAM;;eAED,QAAQ;;;;WAIZ,YAAY;GAiCtB,CAAA;AA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;;;;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"}