@opencrvs/toolkit 2.0.0-rc.c2e6093 → 2.0.0-rc.c303fe9

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 (31) hide show
  1. package/dist/application-config/index.js +53 -34
  2. package/dist/cli.js +10 -4
  3. package/dist/commons/api/router.d.ts +92 -17
  4. package/dist/commons/application-config/index.d.ts +1 -0
  5. package/dist/commons/conditionals/conditionals.d.ts +348 -4
  6. package/dist/commons/conditionals/validate.d.ts +51 -2
  7. package/dist/commons/events/ActionConfig.d.ts +28 -2
  8. package/dist/commons/events/ActionDocument.d.ts +6 -0
  9. package/dist/commons/events/ActionInput.d.ts +6 -0
  10. package/dist/commons/events/AdvancedSearchConfig.d.ts +342 -0
  11. package/dist/commons/events/EventDocument.d.ts +3 -0
  12. package/dist/commons/events/FieldConfig.d.ts +378 -50
  13. package/dist/commons/events/FieldType.d.ts +1 -0
  14. package/dist/commons/events/FieldTypeMapping.d.ts +1 -1
  15. package/dist/commons/events/FieldValue.d.ts +6 -0
  16. package/dist/commons/events/field.d.ts +53 -1
  17. package/dist/commons/events/index.d.ts +1 -0
  18. package/dist/commons/events/state/flags.d.ts +1 -0
  19. package/dist/commons/events/state/utils.d.ts +12 -287
  20. package/dist/commons/events/utils.d.ts +12 -1
  21. package/dist/conditionals/index.js +48 -1
  22. package/dist/events/index.js +382 -147
  23. package/dist/migrations/v2.0/checkout-upstream-files.d.ts +1 -1
  24. package/dist/migrations/v2.0/checkout-upstream-files.js +1 -1
  25. package/dist/migrations/v2.0/index.js +10 -4
  26. package/dist/notification/index.js +248 -39
  27. package/dist/scopes/index.d.ts +4 -6
  28. package/dist/scopes/index.js +9 -3
  29. package/opencrvs-toolkit-2.0.0-rc.c303fe9.tgz +0 -0
  30. package/package.json +1 -1
  31. package/opencrvs-toolkit-2.0.0-rc.c2e6093.tgz +0 -0
@@ -206,6 +206,11 @@ var FieldTypesToHideInReview = [
206
206
  FieldType.ALPHA_PRINT_BUTTON,
207
207
  FieldType.ALPHA_HIDDEN
208
208
  ];
209
+ var HiddenFieldTypes = [
210
+ FieldType.HTTP,
211
+ FieldType.QUERY_PARAM_READER,
212
+ FieldType.ALPHA_HIDDEN
213
+ ];
209
214
 
210
215
  // ../commons/src/events/FieldValue.ts
211
216
  var z7 = __toESM(require("zod/v4"));
@@ -324,7 +329,7 @@ var PlainDate = import_zod.z.string().date().brand("PlainDate").describe("Date i
324
329
  // ../commons/src/events/FieldValue.ts
325
330
  var TextValue = z7.string();
326
331
  var HiddenFieldValue = z7.string();
327
- var NonEmptyTextValue = TextValue.min(1);
332
+ var NonEmptyTextValue = z7.string().trim().min(1);
328
333
  var DateValue = z7.iso.date().describe("Date in the format YYYY-MM-DD");
329
334
  var AgeValue = z7.object({
330
335
  age: z7.number(),
@@ -353,6 +358,7 @@ var DateRangeFieldValue = z7.object({
353
358
  var EmailValue = z7.email();
354
359
  var CheckboxFieldValue = z7.boolean();
355
360
  var NumberFieldValue = z7.number();
361
+ var SignatureFieldValue = FileFieldValue;
356
362
  var ButtonFieldValue = z7.number();
357
363
  var VerificationStatusValue = z7.enum([
358
364
  "verified",
@@ -989,8 +995,9 @@ var RequestedCorrectionAction = ActionBase.extend(
989
995
  var ApprovedCorrectionAction = ActionBase.extend(
990
996
  z13.object({
991
997
  type: z13.literal(ActionType.APPROVE_CORRECTION),
992
- requestId: z13.string()
998
+ requestId: z13.string(),
993
999
  // TODO move into 'content' property
1000
+ content: z13.object({ immediateCorrection: z13.boolean().optional() }).optional()
994
1001
  }).shape
995
1002
  );
996
1003
  var RejectedCorrectionAction = ActionBase.extend(
@@ -1410,8 +1417,18 @@ var FieldReference = import_v43.default.object({
1410
1417
  $$field: FieldId.describe("Id of the field to reference"),
1411
1418
  $$subfield: import_v43.default.array(import_v43.default.string()).optional().default([]).describe(
1412
1419
  'If the FieldValue is an object, subfield can be used to refer to e.g. `["foo", "bar"]` in `{ foo: { bar: 3 } }`'
1420
+ ),
1421
+ $$code: import_v43.default.string().optional().describe(
1422
+ "Serialised client-side function body. When present the expression is evaluated rather than dereferenced."
1423
+ )
1424
+ }).describe(
1425
+ "Reference to a field value, with an optional client-side computation applied."
1426
+ );
1427
+ var ComputedDefaultValue = import_v43.default.object({
1428
+ $$code: import_v43.default.string().describe(
1429
+ "Serialised client-side function body. Receives (undefined, context) where context includes $now, $online, and system variables."
1413
1430
  )
1414
- }).describe("Reference to a field by its ID");
1431
+ }).describe("A context-only computation used as a field default value.");
1415
1432
  var ValidationConfig = import_v43.default.object({
1416
1433
  validator: Conditional.describe(
1417
1434
  "Conditional expression that must hold for the field value to be considered valid."
@@ -1452,7 +1469,7 @@ var BaseField = import_v43.default.object({
1452
1469
  "Indicates whether the field can be modified during record correction."
1453
1470
  ),
1454
1471
  value: FieldReference.or(import_v43.default.array(FieldReference)).optional().describe(
1455
- "Reference to the source field or fields. When a value is defined, it is copied from the parent field when changed. If multiple references are provided, the first truthy value is used."
1472
+ "Reference to the source field or fields. When a value is defined, it is copied from the parent field when changed. If multiple references are provided, the first truthy value is used. A FieldReference with $$code computes the value via a custom client-side function."
1456
1473
  ),
1457
1474
  analytics: import_v43.default.boolean().default(false).optional().describe(
1458
1475
  "Indicates whether the field is included in analytics. When enabled, its value becomes available in the analytics dashboard."
@@ -1466,7 +1483,7 @@ var Divider = BaseField.extend({
1466
1483
  });
1467
1484
  var TextField = BaseField.extend({
1468
1485
  type: import_v43.default.literal(FieldType.TEXT),
1469
- defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
1486
+ defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField, ComputedDefaultValue]).optional(),
1470
1487
  configuration: import_v43.default.object({
1471
1488
  maxLength: import_v43.default.number().optional().describe("Maximum length of the text"),
1472
1489
  type: import_v43.default.enum(["text", "password"]).optional(),
@@ -1479,10 +1496,11 @@ var TextField = BaseField.extend({
1479
1496
  });
1480
1497
  var NumberField = BaseField.extend({
1481
1498
  type: import_v43.default.literal(FieldType.NUMBER),
1482
- defaultValue: NumberFieldValue.optional(),
1499
+ defaultValue: NumberFieldValue.or(ComputedDefaultValue).optional(),
1483
1500
  configuration: import_v43.default.object({
1484
1501
  min: import_v43.default.number().optional().describe("Minimum value"),
1485
1502
  max: import_v43.default.number().optional().describe("Maximum value"),
1503
+ integer: import_v43.default.boolean().optional().describe("When true, only whole numbers are allowed"),
1486
1504
  prefix: TranslationConfig.optional(),
1487
1505
  postfix: TranslationConfig.optional()
1488
1506
  }).optional()
@@ -1492,7 +1510,7 @@ var NumberField = BaseField.extend({
1492
1510
  });
1493
1511
  var TextAreaField = BaseField.extend({
1494
1512
  type: import_v43.default.literal(FieldType.TEXTAREA),
1495
- defaultValue: NonEmptyTextValue.optional(),
1513
+ defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
1496
1514
  configuration: import_v43.default.object({
1497
1515
  maxLength: import_v43.default.number().optional().describe("Maximum length of the text"),
1498
1516
  rows: import_v43.default.number().optional().describe("Number of visible text lines"),
@@ -1526,7 +1544,7 @@ var SignatureField = BaseField.extend({
1526
1544
  signaturePromptLabel: TranslationConfig.describe(
1527
1545
  "Title of the signature modal"
1528
1546
  ),
1529
- defaultValue: FieldValue.optional(),
1547
+ defaultValue: SignatureFieldValue.or(ComputedDefaultValue).optional(),
1530
1548
  configuration: import_v43.default.object({
1531
1549
  maxFileSize: import_v43.default.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
1532
1550
  acceptedFileTypes: MimeType.array().optional().describe("List of allowed file formats for the signature")
@@ -1542,14 +1560,14 @@ var EmailField = BaseField.extend({
1542
1560
  configuration: import_v43.default.object({
1543
1561
  maxLength: import_v43.default.number().optional().describe("Maximum length of the text")
1544
1562
  }).default({ maxLength: 255 }).optional(),
1545
- defaultValue: NonEmptyTextValue.optional()
1563
+ defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional()
1546
1564
  }).meta({
1547
1565
  description: "An email input field",
1548
1566
  id: "EmailField"
1549
1567
  });
1550
1568
  var DateField = BaseField.extend({
1551
1569
  type: import_v43.default.literal(FieldType.DATE),
1552
- defaultValue: SerializedNowDateTime.or(PlainDate).optional().describe("Default date value(yyyy-MM-dd)"),
1570
+ defaultValue: SerializedNowDateTime.or(PlainDate).or(ComputedDefaultValue).optional().describe("Default date value(yyyy-MM-dd)"),
1553
1571
  configuration: import_v43.default.object({
1554
1572
  notice: TranslationConfig.describe(
1555
1573
  "Text to display above the date input"
@@ -1561,7 +1579,7 @@ var DateField = BaseField.extend({
1561
1579
  });
1562
1580
  var AgeField = BaseField.extend({
1563
1581
  type: import_v43.default.literal(FieldType.AGE),
1564
- defaultValue: NumberFieldValue.optional(),
1582
+ defaultValue: NumberFieldValue.or(ComputedDefaultValue).optional(),
1565
1583
  configuration: import_v43.default.object({
1566
1584
  asOfDate: FieldReference,
1567
1585
  prefix: TranslationConfig.optional(),
@@ -1573,7 +1591,7 @@ var AgeField = BaseField.extend({
1573
1591
  });
1574
1592
  var TimeField = BaseField.extend({
1575
1593
  type: import_v43.default.literal(FieldType.TIME),
1576
- defaultValue: SerializedNowDateTime.or(TimeValue).optional().describe("Default time value (HH-mm)"),
1594
+ defaultValue: SerializedNowDateTime.or(TimeValue).or(ComputedDefaultValue).optional().describe("Default time value (HH-mm)"),
1577
1595
  configuration: import_v43.default.object({
1578
1596
  use12HourFormat: import_v43.default.boolean().optional().describe("Whether to use 12-hour format"),
1579
1597
  notice: TranslationConfig.describe(
@@ -1586,7 +1604,7 @@ var TimeField = BaseField.extend({
1586
1604
  });
1587
1605
  var DateRangeField = BaseField.extend({
1588
1606
  type: import_v43.default.literal(FieldType.DATE_RANGE),
1589
- defaultValue: DateRangeFieldValue.optional(),
1607
+ defaultValue: DateRangeFieldValue.or(ComputedDefaultValue).optional(),
1590
1608
  configuration: import_v43.default.object({
1591
1609
  notice: TranslationConfig.describe(
1592
1610
  "Text to display above the date input"
@@ -1665,7 +1683,7 @@ var PageHeader = BaseField.extend({
1665
1683
  });
1666
1684
  var File = BaseField.extend({
1667
1685
  type: import_v43.default.literal(FieldType.FILE),
1668
- defaultValue: FileFieldValue.optional(),
1686
+ defaultValue: FileFieldValue.or(ComputedDefaultValue).optional(),
1669
1687
  configuration: import_v43.default.object({
1670
1688
  maxFileSize: import_v43.default.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
1671
1689
  acceptedFileTypes: MimeType.array().optional().describe("List of allowed file formats for the signature"),
@@ -1692,7 +1710,7 @@ var SelectOption = import_v43.default.object({
1692
1710
  });
1693
1711
  var NumberWithUnitField = BaseField.extend({
1694
1712
  type: import_v43.default.literal(FieldType.NUMBER_WITH_UNIT),
1695
- defaultValue: NumberWithUnitFieldValue.optional(),
1713
+ defaultValue: NumberWithUnitFieldValue.or(ComputedDefaultValue).optional(),
1696
1714
  options: import_v43.default.array(SelectOption).describe("A list of options for the unit select"),
1697
1715
  configuration: import_v43.default.object({
1698
1716
  min: import_v43.default.number().optional().describe("Minimum value of the number field"),
@@ -1707,7 +1725,7 @@ var NumberWithUnitField = BaseField.extend({
1707
1725
  });
1708
1726
  var RadioGroup = BaseField.extend({
1709
1727
  type: import_v43.default.literal(FieldType.RADIO_GROUP),
1710
- defaultValue: TextValue.optional(),
1728
+ defaultValue: TextValue.or(ComputedDefaultValue).optional(),
1711
1729
  options: import_v43.default.array(SelectOption).describe("A list of options"),
1712
1730
  configuration: import_v43.default.object({
1713
1731
  styles: import_v43.default.object({
@@ -1732,7 +1750,7 @@ var BulletList = BaseField.extend({
1732
1750
  });
1733
1751
  var Select = BaseField.extend({
1734
1752
  type: import_v43.default.literal(FieldType.SELECT),
1735
- defaultValue: TextValue.optional(),
1753
+ defaultValue: TextValue.or(ComputedDefaultValue).optional(),
1736
1754
  options: import_v43.default.array(SelectOption).describe("A list of options"),
1737
1755
  noOptionsMessage: TranslationConfig.optional().describe(
1738
1756
  `
@@ -1754,7 +1772,7 @@ var SelectDateRangeOption = import_v43.default.object({
1754
1772
  });
1755
1773
  var SelectDateRangeField = BaseField.extend({
1756
1774
  type: import_v43.default.literal(FieldType.SELECT_DATE_RANGE),
1757
- defaultValue: SelectDateRangeValue.optional(),
1775
+ defaultValue: SelectDateRangeValue.or(ComputedDefaultValue).optional(),
1758
1776
  options: import_v43.default.array(SelectDateRangeOption).describe("A list of options")
1759
1777
  }).meta({
1760
1778
  description: "A date range selection field",
@@ -1771,7 +1789,7 @@ var NameField = BaseField.extend({
1771
1789
  firstname: SerializedUserField.or(NonEmptyTextValue).optional(),
1772
1790
  middlename: SerializedUserField.or(NonEmptyTextValue).optional(),
1773
1791
  surname: SerializedUserField.or(NonEmptyTextValue).optional()
1774
- }).optional(),
1792
+ }).or(ComputedDefaultValue).optional(),
1775
1793
  configuration: import_v43.default.object({
1776
1794
  name: NameConfig.default({
1777
1795
  firstname: { required: true },
@@ -1795,14 +1813,14 @@ var NameField = BaseField.extend({
1795
1813
  id: "NameField"
1796
1814
  });
1797
1815
  var PhoneField = BaseField.extend({
1798
- defaultValue: NonEmptyTextValue.optional(),
1816
+ defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
1799
1817
  type: import_v43.default.literal(FieldType.PHONE)
1800
1818
  }).meta({
1801
1819
  description: "A field for entering a phone number",
1802
1820
  id: "PhoneField"
1803
1821
  });
1804
1822
  var IdField = BaseField.extend({
1805
- defaultValue: NonEmptyTextValue.optional(),
1823
+ defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
1806
1824
  type: import_v43.default.literal(FieldType.ID)
1807
1825
  }).meta({
1808
1826
  description: "A field for entering an ID",
@@ -1810,14 +1828,14 @@ var IdField = BaseField.extend({
1810
1828
  });
1811
1829
  var Checkbox = BaseField.extend({
1812
1830
  type: import_v43.default.literal(FieldType.CHECKBOX),
1813
- defaultValue: CheckboxFieldValue.default(false)
1831
+ defaultValue: CheckboxFieldValue.or(ComputedDefaultValue).default(false)
1814
1832
  }).meta({
1815
1833
  description: "A boolean checkbox field",
1816
1834
  id: "Checkbox"
1817
1835
  });
1818
1836
  var Country = BaseField.extend({
1819
1837
  type: import_v43.default.literal(FieldType.COUNTRY),
1820
- defaultValue: NonEmptyTextValue.optional(),
1838
+ defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
1821
1839
  optionOverrides: import_v43.default.array(SelectOption.omit({ label: true })).optional().describe(
1822
1840
  "Conditionals for specific countries. Countries not listed are always shown and enabled."
1823
1841
  )
@@ -1835,7 +1853,7 @@ var AdministrativeAreas = import_v43.default.enum([
1835
1853
  ]);
1836
1854
  var AdministrativeAreaField = BaseField.extend({
1837
1855
  type: import_v43.default.literal(FieldType.ADMINISTRATIVE_AREA),
1838
- defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
1856
+ defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField, ComputedDefaultValue]).optional(),
1839
1857
  configuration: import_v43.default.object({
1840
1858
  partOf: FieldReference.optional().describe("Parent location"),
1841
1859
  type: AdministrativeAreas,
@@ -1847,7 +1865,7 @@ var AdministrativeAreaField = BaseField.extend({
1847
1865
  });
1848
1866
  var LocationInput = BaseField.extend({
1849
1867
  type: import_v43.default.literal(FieldType.LOCATION),
1850
- defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
1868
+ defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField, ComputedDefaultValue]).optional(),
1851
1869
  configuration: import_v43.default.object({
1852
1870
  locationTypes: import_v43.default.array(import_v43.default.string()).optional().describe("Types of the locations that are available for selection."),
1853
1871
  allowedLocations: AllowedLocations
@@ -1859,7 +1877,7 @@ var LocationInput = BaseField.extend({
1859
1877
  var FileUploadWithOptions = BaseField.extend({
1860
1878
  type: import_v43.default.literal(FieldType.FILE_WITH_OPTIONS),
1861
1879
  options: import_v43.default.array(SelectOption).describe("A list of options"),
1862
- defaultValue: FileFieldWithOptionValue.optional(),
1880
+ defaultValue: FileFieldWithOptionValue.or(ComputedDefaultValue).optional(),
1863
1881
  configuration: import_v43.default.object({
1864
1882
  maxFileSize: import_v43.default.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
1865
1883
  maxImageSize: import_v43.default.object({
@@ -1875,12 +1893,12 @@ var FileUploadWithOptions = BaseField.extend({
1875
1893
  });
1876
1894
  var Facility = BaseField.extend({
1877
1895
  type: import_v43.default.literal(FieldType.FACILITY),
1878
- defaultValue: NonEmptyTextValue.optional(),
1896
+ defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
1879
1897
  configuration: import_v43.default.object({ allowedLocations: AllowedLocations }).optional()
1880
1898
  }).describe("Input field for a facility");
1881
1899
  var Office = BaseField.extend({
1882
1900
  type: import_v43.default.literal(FieldType.OFFICE),
1883
- defaultValue: NonEmptyTextValue.optional(),
1901
+ defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
1884
1902
  configuration: import_v43.default.object({ allowedLocations: AllowedLocations }).optional()
1885
1903
  }).describe("Input field for an office");
1886
1904
  var DefaultAddressFieldValue = DomesticAddressFieldValue.extend({
@@ -1916,7 +1934,7 @@ var Address = BaseField.extend({
1916
1934
  ).optional(),
1917
1935
  allowedLocations: AllowedLocations
1918
1936
  }).optional(),
1919
- defaultValue: DefaultAddressFieldValue.optional()
1937
+ defaultValue: DefaultAddressFieldValue.or(ComputedDefaultValue).optional()
1920
1938
  }).meta({
1921
1939
  description: "Address input field \u2013 a combination of location and text fields",
1922
1940
  id: "Address"
@@ -1963,7 +1981,7 @@ var ButtonConfiguration = import_v43.default.object({
1963
1981
  });
1964
1982
  var ButtonField = BaseField.extend({
1965
1983
  type: import_v43.default.literal(FieldType.BUTTON),
1966
- defaultValue: ButtonFieldValue.optional(),
1984
+ defaultValue: ButtonFieldValue.or(ComputedDefaultValue).optional(),
1967
1985
  configuration: ButtonConfiguration
1968
1986
  }).meta({
1969
1987
  description: "A generic button that can be used to trigger an action",
@@ -1991,7 +2009,7 @@ var AlphaPrintButton = BaseField.extend({
1991
2009
  });
1992
2010
  var HttpField = BaseField.extend({
1993
2011
  type: import_v43.default.literal(FieldType.HTTP),
1994
- defaultValue: HttpFieldValue.optional(),
2012
+ defaultValue: HttpFieldValue.or(ComputedDefaultValue).optional(),
1995
2013
  configuration: import_v43.default.object({
1996
2014
  trigger: FieldReference.optional().describe(
1997
2015
  "Reference to the field that triggers the HTTP request when its value changes. If not provided, the HTTP request is triggered once on component mount."
@@ -2077,7 +2095,7 @@ var LinkButtonField = BaseField.extend({
2077
2095
  });
2078
2096
  var VerificationStatus = BaseField.extend({
2079
2097
  type: import_v43.default.literal(FieldType.VERIFICATION_STATUS),
2080
- defaultValue: VerificationStatusValue.optional(),
2098
+ defaultValue: VerificationStatusValue.or(ComputedDefaultValue).optional(),
2081
2099
  configuration: import_v43.default.object({
2082
2100
  status: TranslationConfig.describe("Text to display on the status pill."),
2083
2101
  description: TranslationConfig.describe(
@@ -2099,7 +2117,7 @@ var QueryParamReaderField = BaseField.extend({
2099
2117
  });
2100
2118
  var QrReaderField = BaseField.extend({
2101
2119
  type: import_v43.default.literal(FieldType.QR_READER),
2102
- defaultValue: QrReaderFieldValue.optional(),
2120
+ defaultValue: QrReaderFieldValue.or(ComputedDefaultValue).optional(),
2103
2121
  configuration: import_v43.default.object({
2104
2122
  validator: import_v43.default.any().meta({
2105
2123
  description: "JSON Schema to validate the scanned QR code data against before populating the form fields.",
@@ -2112,7 +2130,7 @@ var QrReaderField = BaseField.extend({
2112
2130
  });
2113
2131
  var IdReaderField = BaseField.extend({
2114
2132
  type: import_v43.default.literal(FieldType.ID_READER),
2115
- defaultValue: IdReaderFieldValue.optional(),
2133
+ defaultValue: IdReaderFieldValue.or(ComputedDefaultValue).optional(),
2116
2134
  methods: import_v43.default.array(
2117
2135
  import_v43.default.union([QrReaderField, LinkButtonField]).describe("Methods for reading an ID")
2118
2136
  )
@@ -2273,6 +2291,7 @@ var ClientConfig = z20.object({
2273
2291
  COUNTRY: z20.string(),
2274
2292
  LANGUAGES: z20.array(z20.string()),
2275
2293
  SENTRY: z20.string().optional(),
2294
+ LOGIN_URL: z20.string().optional(),
2276
2295
  REGISTER_BACKGROUND: BackgroundConfig,
2277
2296
  DASHBOARDS: z20.array(
2278
2297
  z20.object({
package/dist/cli.js CHANGED
@@ -2382,14 +2382,20 @@ var encodeScope = (scope) => {
2382
2382
  encode: false
2383
2383
  });
2384
2384
  };
2385
- var decodeScope = (query) => {
2386
- const scope = qs.parse(query, {
2385
+ var decodedScopeCache = /* @__PURE__ */ new Map();
2386
+ var decodeScope = (encodedScope) => {
2387
+ if (decodedScopeCache.has(encodedScope)) {
2388
+ return decodedScopeCache.get(encodedScope);
2389
+ }
2390
+ const scope = qs.parse(encodedScope, {
2387
2391
  ignoreQueryPrefix: true,
2388
2392
  comma: true,
2389
2393
  allowDots: true
2390
2394
  });
2391
2395
  const unflattenedScope = unflattenScope(scope);
2392
- return Scope2.safeParse(unflattenedScope)?.data;
2396
+ const result = Scope2.safeParse(unflattenedScope)?.data;
2397
+ decodedScopeCache.set(encodedScope, result);
2398
+ return result;
2393
2399
  };
2394
2400
  var DEFAULT_SCOPE_OPTIONS = {
2395
2401
  placeOfEvent: JurisdictionFilter.enum.all,
@@ -4294,7 +4300,7 @@ Saved ${handlerRelPath}.`);
4294
4300
  // src/migrations/v2.0/checkout-upstream-files.ts
4295
4301
  var import_child_process = require("child_process");
4296
4302
  var UPSTREAM_URL = "https://github.com/opencrvs/opencrvs-countryconfig.git";
4297
- var UPSTREAM_BRANCH = "release-v2.0.0";
4303
+ var UPSTREAM_BRANCH = "release/v2.0.0";
4298
4304
  var TEMP_REMOTE = "opencrvs-upgrade-v19-v20-codemod";
4299
4305
  var FILES_TO_CHECKOUT = [
4300
4306
  "src/analytics/analytics.ts",