@opencrvs/toolkit 2.2.0-rc.30529dd → 2.2.0-rc.3de6f63

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 (48) hide show
  1. package/dist/application-config/index.js +1 -1
  2. package/dist/authentication/index.js +10 -2
  3. package/dist/cli.js +586 -303
  4. package/dist/commons/events/ActionConfig.d.ts +2 -2
  5. package/dist/commons/events/EventConfig.d.ts +1 -10
  6. package/dist/commons/events/eventConfigValidation.d.ts +1 -1
  7. package/dist/commons/events/index.d.ts +1 -0
  8. package/dist/commons/events/test.utils.d.ts +2 -3
  9. package/dist/commons/events/toNotificationForm.d.ts +17 -0
  10. package/dist/commons/events/utils.d.ts +77 -56
  11. package/dist/environment/custom-types.d.ts +1 -0
  12. package/dist/environment/custom-types.d.ts.map +1 -1
  13. package/dist/environment/derived-variables.d.ts +6 -4
  14. package/dist/environment/derived-variables.d.ts.map +1 -1
  15. package/dist/environment/derived-variables.js +6 -4
  16. package/dist/environment/questions.d.ts +14 -2
  17. package/dist/environment/questions.d.ts.map +1 -1
  18. package/dist/environment/questions.js +39 -18
  19. package/dist/environment/registry.d.ts +15 -0
  20. package/dist/environment/registry.d.ts.map +1 -0
  21. package/dist/environment/registry.js +112 -0
  22. package/dist/environment/setup-environment.d.ts.map +1 -1
  23. package/dist/environment/setup-environment.js +76 -28
  24. package/dist/events/index.js +60 -97
  25. package/dist/migrations/add-notify-config.d.ts +40 -0
  26. package/dist/migrations/add-notify-config.d.ts.map +1 -0
  27. package/dist/migrations/add-notify-config.js +249 -0
  28. package/dist/migrations/index.d.ts.map +1 -1
  29. package/dist/migrations/index.js +345 -143
  30. package/dist/migrations/move-declaration-to-declare-action.d.ts.map +1 -1
  31. package/dist/migrations/move-declaration-to-declare-action.js +27 -144
  32. package/dist/migrations/read-declaration-through-helper.d.ts.map +1 -1
  33. package/dist/migrations/read-declaration-through-helper.js +3 -61
  34. package/dist/migrations/utils.d.ts +61 -0
  35. package/dist/migrations/utils.d.ts.map +1 -0
  36. package/dist/migrations/utils.js +218 -0
  37. package/dist/notification/index.js +47 -75
  38. package/dist/scopes/index.d.ts +5 -2
  39. package/dist/scopes/index.js +10 -2
  40. package/dist/templates/charts-values/opencrvs-services/values.yaml +3 -4
  41. package/opencrvs-toolkit-2.2.0-rc.3de6f63.tgz +0 -0
  42. package/package.json +2 -1
  43. package/tsconfig.build.tsbuildinfo +1 -1
  44. package/dist/commons/events/notificationFormFallback.d.ts +0 -10
  45. package/dist/environment/dockerhub.d.ts +0 -15
  46. package/dist/environment/dockerhub.d.ts.map +0 -1
  47. package/dist/environment/dockerhub.js +0 -104
  48. package/opencrvs-toolkit-2.2.0-rc.30529dd.tgz +0 -0
@@ -199,7 +199,7 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
199
199
  conditional: z.ZodAny;
200
200
  }, z.core.$strip>], "type">>>;
201
201
  type: z.ZodLiteral<"NOTIFY">;
202
- notificationForm: z.ZodOptional<z.ZodObject<{
202
+ notificationForm: z.ZodObject<{
203
203
  label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
204
204
  pages: z.ZodArray<z.ZodObject<{
205
205
  id: z.ZodString;
@@ -210,7 +210,7 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
210
210
  conditional: z.ZodOptional<z.ZodAny>;
211
211
  type: z.ZodDefault<z.ZodLiteral<"FORM">>;
212
212
  }, z.core.$strip>>;
213
- }, z.core.$strip>>;
213
+ }, z.core.$strip>;
214
214
  review: z.ZodObject<{
215
215
  title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
216
216
  fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
@@ -40,9 +40,6 @@ type ActionConfigInput = z.input<typeof ActionConfig>;
40
40
  type DeclareActionConfigInput = Extract<ActionConfigInput, {
41
41
  type: typeof ActionType.DECLARE;
42
42
  }>;
43
- type NotifyActionConfigInput = Extract<ActionConfigInput, {
44
- type: typeof ActionType.NOTIFY;
45
- }>;
46
43
  /**
47
44
  * Input accepted by `EventConfig.parse`. `declaration` lives only on the DECLARE action,
48
45
  * and NOTIFY carries its `notificationForm` and `review`.
@@ -60,18 +57,12 @@ type EventConfigSchemaInput = Omit<EventConfig, 'advancedSearch' | 'flags' | 'ac
60
57
  * `declaration` may be given at the top level (kept for backwards compatibility)
61
58
  * or on the DECLARE action.
62
59
  * `defineConfig` checks at runtime that it is given in exactly one of these places.
63
- *
64
- * The NOTIFY action, and its `notificationForm` and `review`, are optional.
65
- * `defineConfig` generates whatever is missing from the DECLARE action.
66
60
  */
67
61
  export type EventConfigInput = Omit<EventConfigSchemaInput, 'actions'> & {
68
62
  /** @deprecated Define `declaration` on the DECLARE action instead. */
69
63
  declaration?: DeclarationFormConfigInput;
70
- actions: Array<Exclude<ActionConfigInput, DeclareActionConfigInput | NotifyActionConfigInput> | (Omit<DeclareActionConfigInput, 'declaration'> & {
64
+ actions: Array<Exclude<ActionConfigInput, DeclareActionConfigInput> | (Omit<DeclareActionConfigInput, 'declaration'> & {
71
65
  declaration?: DeclarationFormConfigInput;
72
- }) | (Omit<NotifyActionConfigInput, 'notificationForm' | 'review'> & {
73
- notificationForm?: NotifyActionConfigInput['notificationForm'];
74
- review?: NotifyActionConfigInput['review'];
75
66
  })>;
76
67
  };
77
68
  export declare const EventConfig: z.ZodType<EventConfig, EventConfigSchemaInput>;
@@ -22,7 +22,7 @@ export declare function validateExactlyOneDeclareAction<T extends {
22
22
  */
23
23
  export declare function validateDeclarationGivenExactlyOnce(config: EventConfigInput, ctx: z.RefinementCtx<EventConfigInput>): void;
24
24
  /**
25
- * Validation which ensures that *if* a NOTIFY notificationForm is configured, it:
25
+ * Validation which ensures that a NOTIFY notificationForm:
26
26
  * - only includes fields with ids that are also in the declaration form
27
27
  * - the field types match the ones on the declaration form
28
28
  *
@@ -26,6 +26,7 @@ export * from './state';
26
26
  export * from './state/flags';
27
27
  export * from './utils';
28
28
  export * from './defineConfig';
29
+ export * from './toNotificationForm';
29
30
  export * from './DeduplicationConfig';
30
31
  export * from './transactions';
31
32
  export * from './FieldType';
@@ -352,10 +352,9 @@ export declare const generateEventConfig: ({ id, fields, placeOfEventId, dateOfE
352
352
  actions?: EventConfigInput['actions'];
353
353
  }) => EventConfig;
354
354
  /**
355
- * The notification form is dropped, since it may refer to fields of the replaced declaration.
356
- * `getNotificationForm` then derives it from the new declaration.
355
+ * The notification form is replaced too, since it may refer to fields of the replaced declaration.
357
356
  *
358
- * @returns a copy of the configuration with the DECLARE action's declaration replaced.
357
+ * @returns a copy of the configuration with the DECLARE action's declaration replaced, and the NOTIFY action's notification form made from it.
359
358
  */
360
359
  export declare function withDeclaration(configuration: EventConfig, declaration: DeclarationFormConfig): EventConfig;
361
360
  /**
@@ -0,0 +1,17 @@
1
+ import * as z from 'zod/v4';
2
+ import { DeclarationFormConfig, DeclarationFormConfigInput } from './FormConfig';
3
+ import { DeclarationReviewConfig } from './ActionConfig';
4
+ type DeclarationReviewConfigInput = z.input<typeof DeclarationReviewConfig>;
5
+ type DeclarationReviewConfigOutput = z.infer<typeof DeclarationReviewConfig>;
6
+ /**
7
+ * NOTIFY submits incomplete records, and its notification form is validated like any form.
8
+ *
9
+ * @returns a copy of the declaration form with every field optional and without validations, to use as the NOTIFY `notificationForm`.
10
+ */
11
+ export declare function toNotificationForm<F extends DeclarationFormConfig | DeclarationFormConfigInput>(declaration: F): F;
12
+ /**
13
+ * @returns a copy of the DECLARE review with every field optional and without validations, to use as the NOTIFY `review`.
14
+ */
15
+ export declare function toNotificationReview<R extends DeclarationReviewConfigOutput | DeclarationReviewConfigInput>(review: R): R;
16
+ export {};
17
+ //# sourceMappingURL=toNotificationForm.d.ts.map
@@ -47,14 +47,35 @@ export declare function getDeclarationPages(configuration: EventConfig): {
47
47
  }[];
48
48
  export declare function getDeclarationFields(configuration: EventConfig): FieldConfig[];
49
49
  /**
50
- * @returns the notification form of the event: the one configured on the NOTIFY action,
51
- * or the declaration with every field optional when none is configured.
52
- *
53
- * The fallback is derived here rather than in `defineConfig`, so that it is not part of the
54
- * served event configuration.
50
+ * @returns the notification form configured on the NOTIFY action.
51
+ * @throws when the event has no NOTIFY action.
55
52
  */
56
53
  export declare function getNotificationForm(configuration: EventConfig): DeclarationFormConfig;
57
54
  export declare function getNotificationFields(configuration: EventConfig): FieldConfig[];
55
+ /**
56
+ * Form a user fills in to submit the given action:
57
+ * the notification form for NOTIFY, the declaration form for DECLARE.
58
+ */
59
+ export declare function getActionForm(configuration: EventConfig, actionType: typeof ActionType.NOTIFY | typeof ActionType.DECLARE): {
60
+ label: {
61
+ id: string;
62
+ defaultMessage: string;
63
+ description: string;
64
+ };
65
+ pages: {
66
+ id: string;
67
+ title: {
68
+ id: string;
69
+ defaultMessage: string;
70
+ description: string;
71
+ };
72
+ requireCompletionToContinue: boolean;
73
+ showClearButton?: boolean | undefined;
74
+ fields: FieldConfig[];
75
+ conditional?: any;
76
+ type: "FORM";
77
+ }[];
78
+ };
58
79
  export declare function isActionConfigType(type: ActionType): type is ActionConfigTypes;
59
80
  export declare function getActionConfig({ eventConfiguration, actionType, customActionType }: {
60
81
  eventConfiguration: EventConfig;
@@ -182,8 +203,7 @@ export declare function findLastAssignmentAction(actions: Action[]): {
182
203
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
183
204
  status: "Accepted" | "Rejected" | "Requested";
184
205
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
185
- type: "REGISTER";
186
- registrationNumber?: string | undefined;
206
+ type: "CREATE";
187
207
  } | {
188
208
  id: string & import("zod").$brand<"UUID">;
189
209
  transactionId: string;
@@ -197,12 +217,9 @@ export declare function findLastAssignmentAction(actions: Action[]): {
197
217
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
198
218
  status: "Accepted" | "Rejected" | "Requested";
199
219
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
200
- type: "DUPLICATE_DETECTED";
220
+ type: "REJECT";
201
221
  content: {
202
- duplicates: {
203
- id: string & import("zod").$brand<"UUID">;
204
- trackingId: string;
205
- }[];
222
+ reason: string;
206
223
  };
207
224
  } | {
208
225
  id: string & import("zod").$brand<"UUID">;
@@ -217,10 +234,13 @@ export declare function findLastAssignmentAction(actions: Action[]): {
217
234
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
218
235
  status: "Accepted" | "Rejected" | "Requested";
219
236
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
220
- type: "EDIT";
221
- content?: {
222
- comment?: string | undefined;
223
- } | undefined;
237
+ type: "DUPLICATE_DETECTED";
238
+ content: {
239
+ duplicates: {
240
+ id: string & import("zod").$brand<"UUID">;
241
+ trackingId: string;
242
+ }[];
243
+ };
224
244
  } | {
225
245
  id: string & import("zod").$brand<"UUID">;
226
246
  transactionId: string;
@@ -234,10 +254,7 @@ export declare function findLastAssignmentAction(actions: Action[]): {
234
254
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
235
255
  status: "Accepted" | "Rejected" | "Requested";
236
256
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
237
- type: "PRINT_CERTIFICATE";
238
- content?: {
239
- templateId?: string | undefined;
240
- } | null | undefined;
257
+ type: "MARK_AS_NOT_DUPLICATE";
241
258
  } | {
242
259
  id: string & import("zod").$brand<"UUID">;
243
260
  transactionId: string;
@@ -251,7 +268,10 @@ export declare function findLastAssignmentAction(actions: Action[]): {
251
268
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
252
269
  status: "Accepted" | "Rejected" | "Requested";
253
270
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
254
- type: "REQUEST_CORRECTION";
271
+ type: "MARK_AS_DUPLICATE";
272
+ content?: {
273
+ duplicateOf: string & import("zod").$brand<"UUID">;
274
+ } | undefined;
255
275
  } | {
256
276
  id: string & import("zod").$brand<"UUID">;
257
277
  transactionId: string;
@@ -265,8 +285,10 @@ export declare function findLastAssignmentAction(actions: Action[]): {
265
285
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
266
286
  status: "Accepted" | "Rejected" | "Requested";
267
287
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
268
- type: "CUSTOM";
269
- customActionType: string;
288
+ type: "ARCHIVE";
289
+ content?: {
290
+ reason: string;
291
+ } | undefined;
270
292
  } | {
271
293
  id: string & import("zod").$brand<"UUID">;
272
294
  transactionId: string;
@@ -280,8 +302,7 @@ export declare function findLastAssignmentAction(actions: Action[]): {
280
302
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
281
303
  status: "Accepted" | "Rejected" | "Requested";
282
304
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
283
- type: "ASSIGN";
284
- assignedTo: string;
305
+ type: "UNARCHIVE";
285
306
  } | {
286
307
  id: string & import("zod").$brand<"UUID">;
287
308
  transactionId: string;
@@ -295,7 +316,7 @@ export declare function findLastAssignmentAction(actions: Action[]): {
295
316
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
296
317
  status: "Accepted" | "Rejected" | "Requested";
297
318
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
298
- type: "UNASSIGN";
319
+ type: "REVOKE_REGISTRATION";
299
320
  } | {
300
321
  id: string & import("zod").$brand<"UUID">;
301
322
  transactionId: string;
@@ -309,7 +330,7 @@ export declare function findLastAssignmentAction(actions: Action[]): {
309
330
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
310
331
  status: "Accepted" | "Rejected" | "Requested";
311
332
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
312
- type: "DECLARE";
333
+ type: "REINSTATE_REGISTRATION";
313
334
  } | {
314
335
  id: string & import("zod").$brand<"UUID">;
315
336
  transactionId: string;
@@ -323,10 +344,7 @@ export declare function findLastAssignmentAction(actions: Action[]): {
323
344
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
324
345
  status: "Accepted" | "Rejected" | "Requested";
325
346
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
326
- type: "REJECT";
327
- content: {
328
- reason: string;
329
- };
347
+ type: "NOTIFY";
330
348
  } | {
331
349
  id: string & import("zod").$brand<"UUID">;
332
350
  transactionId: string;
@@ -340,7 +358,8 @@ export declare function findLastAssignmentAction(actions: Action[]): {
340
358
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
341
359
  status: "Accepted" | "Rejected" | "Requested";
342
360
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
343
- type: "MARK_AS_NOT_DUPLICATE";
361
+ type: "REGISTER";
362
+ registrationNumber?: string | undefined;
344
363
  } | {
345
364
  id: string & import("zod").$brand<"UUID">;
346
365
  transactionId: string;
@@ -354,10 +373,7 @@ export declare function findLastAssignmentAction(actions: Action[]): {
354
373
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
355
374
  status: "Accepted" | "Rejected" | "Requested";
356
375
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
357
- type: "MARK_AS_DUPLICATE";
358
- content?: {
359
- duplicateOf: string & import("zod").$brand<"UUID">;
360
- } | undefined;
376
+ type: "DECLARE";
361
377
  } | {
362
378
  id: string & import("zod").$brand<"UUID">;
363
379
  transactionId: string;
@@ -371,10 +387,8 @@ export declare function findLastAssignmentAction(actions: Action[]): {
371
387
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
372
388
  status: "Accepted" | "Rejected" | "Requested";
373
389
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
374
- type: "ARCHIVE";
375
- content?: {
376
- reason: string;
377
- } | undefined;
390
+ type: "ASSIGN";
391
+ assignedTo: string;
378
392
  } | {
379
393
  id: string & import("zod").$brand<"UUID">;
380
394
  transactionId: string;
@@ -388,7 +402,7 @@ export declare function findLastAssignmentAction(actions: Action[]): {
388
402
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
389
403
  status: "Accepted" | "Rejected" | "Requested";
390
404
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
391
- type: "UNARCHIVE";
405
+ type: "REQUEST_CORRECTION";
392
406
  } | {
393
407
  id: string & import("zod").$brand<"UUID">;
394
408
  transactionId: string;
@@ -402,7 +416,11 @@ export declare function findLastAssignmentAction(actions: Action[]): {
402
416
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
403
417
  status: "Accepted" | "Rejected" | "Requested";
404
418
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
405
- type: "REVOKE_REGISTRATION";
419
+ type: "APPROVE_CORRECTION";
420
+ requestId: string & import("zod").$brand<"UUID">;
421
+ content?: {
422
+ immediateCorrection?: boolean | undefined;
423
+ } | undefined;
406
424
  } | {
407
425
  id: string & import("zod").$brand<"UUID">;
408
426
  transactionId: string;
@@ -416,7 +434,11 @@ export declare function findLastAssignmentAction(actions: Action[]): {
416
434
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
417
435
  status: "Accepted" | "Rejected" | "Requested";
418
436
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
419
- type: "REINSTATE_REGISTRATION";
437
+ type: "REJECT_CORRECTION";
438
+ requestId: string & import("zod").$brand<"UUID">;
439
+ content: {
440
+ reason: string;
441
+ };
420
442
  } | {
421
443
  id: string & import("zod").$brand<"UUID">;
422
444
  transactionId: string;
@@ -430,7 +452,7 @@ export declare function findLastAssignmentAction(actions: Action[]): {
430
452
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
431
453
  status: "Accepted" | "Rejected" | "Requested";
432
454
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
433
- type: "CREATE";
455
+ type: "UNASSIGN";
434
456
  } | {
435
457
  id: string & import("zod").$brand<"UUID">;
436
458
  transactionId: string;
@@ -444,7 +466,10 @@ export declare function findLastAssignmentAction(actions: Action[]): {
444
466
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
445
467
  status: "Accepted" | "Rejected" | "Requested";
446
468
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
447
- type: "NOTIFY";
469
+ type: "PRINT_CERTIFICATE";
470
+ content?: {
471
+ templateId?: string | undefined;
472
+ } | null | undefined;
448
473
  } | {
449
474
  id: string & import("zod").$brand<"UUID">;
450
475
  transactionId: string;
@@ -458,11 +483,7 @@ export declare function findLastAssignmentAction(actions: Action[]): {
458
483
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
459
484
  status: "Accepted" | "Rejected" | "Requested";
460
485
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
461
- type: "APPROVE_CORRECTION";
462
- requestId: string & import("zod").$brand<"UUID">;
463
- content?: {
464
- immediateCorrection?: boolean | undefined;
465
- } | undefined;
486
+ type: "READ";
466
487
  } | {
467
488
  id: string & import("zod").$brand<"UUID">;
468
489
  transactionId: string;
@@ -476,11 +497,10 @@ export declare function findLastAssignmentAction(actions: Action[]): {
476
497
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
477
498
  status: "Accepted" | "Rejected" | "Requested";
478
499
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
479
- type: "REJECT_CORRECTION";
480
- requestId: string & import("zod").$brand<"UUID">;
481
- content: {
482
- reason: string;
483
- };
500
+ type: "EDIT";
501
+ content?: {
502
+ comment?: string | undefined;
503
+ } | undefined;
484
504
  } | {
485
505
  id: string & import("zod").$brand<"UUID">;
486
506
  transactionId: string;
@@ -494,7 +514,8 @@ export declare function findLastAssignmentAction(actions: Action[]): {
494
514
  annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
495
515
  status: "Accepted" | "Rejected" | "Requested";
496
516
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
497
- type: "READ";
517
+ type: "CUSTOM";
518
+ customActionType: string;
498
519
  } | {
499
520
  id: string & import("zod").$brand<"UUID">;
500
521
  transactionId: string;
@@ -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,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,E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AAE,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"}
@@ -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,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,IA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Q;aACnB,IAAI,EAAE,UAAU;aAChB,KAAK,EAAE,aAAa;;aAGpB,IAAI,EAAE,yBAAyB;aAC/B,UAAU,EAAE,yBAAyB;aACrC,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,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,U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;;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';
@@ -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;AAED,eAAO,MAAM,eAAe;;UAGlB,MAAM;;;;WAIL,YAAY;GAUtB,CAAA;AACD,eAAO,MAAM,oBAAoB;;UAGvB,MAAM;;;eAGD,UAAU;;WAEd,YAAY;;;;;UAIb,QAAQ;;;;;;eAaH,UAAU;;;;WAId,aAAa;IAEvB,CAAA;AACD,eAAO,MAAM,mBAAmB;;UAGtB,MAAM;;;;eAID,QAAQ;WACZ,YAAY;;GAGtB,CAAA;AAED,eAAO,MAAM,gBAAgB;;UAGnB,MAAM;;eAGD,UAAU;;;WAGd,YAAY;GAEtB,CAAA;AAED,eAAO,MAAM,uBAAuB;;UAG1B,MA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M;;;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.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
  ];
@@ -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"}