@opencrvs/toolkit 2.1.0-rc.12673aa → 2.1.0-rc.14fb6a5

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 (188) hide show
  1. package/build.sh +14 -4
  2. package/create-countryconfig/index.js +59 -30
  3. package/dist/application-config/index.js +26 -13
  4. package/dist/authentication/index.d.ts +8 -9
  5. package/dist/authentication/index.js +23 -8
  6. package/dist/cli.js +2268 -1385
  7. package/dist/commons/api/router.d.ts +252 -290
  8. package/dist/commons/application-config/index.d.ts +0 -2
  9. package/dist/commons/conditionals/conditionals.d.ts +6 -6
  10. package/dist/commons/conditionals/validate.d.ts +18 -3
  11. package/dist/commons/events/ActionConfig.d.ts +5 -14
  12. package/dist/commons/events/ActionDocument.d.ts +30 -4
  13. package/dist/commons/events/AdvancedSearchConfig.d.ts +24 -12
  14. package/dist/commons/events/AuditLog.d.ts +1 -0
  15. package/dist/commons/events/Draft.d.ts +1 -21
  16. package/dist/commons/events/EventDocument.d.ts +4 -4
  17. package/dist/commons/events/FieldConfig.d.ts +20 -10
  18. package/dist/commons/events/FieldTypeMapping.d.ts +10 -10
  19. package/dist/commons/events/FieldValue.d.ts +1 -0
  20. package/dist/commons/events/FormConfig.d.ts +6 -0
  21. package/dist/commons/events/PageConfig.d.ts +4 -0
  22. package/dist/commons/events/scopes.d.ts +21 -1
  23. package/dist/commons/events/test.utils.d.ts +53 -21
  24. package/dist/commons/events/utils.d.ts +26 -2
  25. package/dist/conditionals/index.js +21 -7
  26. package/dist/environment/index.d.ts.map +1 -1
  27. package/dist/environment/index.js +2 -1
  28. package/dist/environment/setup-environment.d.ts +1 -1
  29. package/dist/environment/setup-environment.d.ts.map +1 -1
  30. package/dist/environment/setup-environment.js +586 -569
  31. package/dist/environment/swarm-to-k8s.js +3 -4
  32. package/dist/events/index.js +282 -138
  33. package/dist/migrations/v2.1/add-recovery-link-notifications.js +4 -4
  34. package/dist/migrations/v2.1/add-translations.d.ts.map +1 -1
  35. package/dist/migrations/v2.1/add-translations.js +4 -68
  36. package/dist/migrations/v2.1/enable-telemetry.d.ts.map +1 -1
  37. package/dist/migrations/v2.1/enable-telemetry.js +30 -13
  38. package/dist/migrations/v2.1/index.d.ts.map +1 -1
  39. package/dist/migrations/v2.1/index.js +927 -33
  40. package/dist/migrations/v2.1/migrate-infrastructure-to-assets.d.ts +14 -0
  41. package/dist/migrations/v2.1/migrate-infrastructure-to-assets.d.ts.map +1 -0
  42. package/dist/migrations/v2.1/migrate-infrastructure-to-assets.js +348 -0
  43. package/dist/migrations/v2.1/remove-metabase-package-installs.d.ts +2 -0
  44. package/dist/migrations/v2.1/remove-metabase-package-installs.d.ts.map +1 -0
  45. package/dist/migrations/v2.1/remove-metabase-package-installs.js +161 -0
  46. package/dist/migrations/{v2.0/migrate-scopes.d.ts → v2.1/remove-sentry.d.ts} +1 -1
  47. package/dist/migrations/v2.1/remove-sentry.d.ts.map +1 -0
  48. package/dist/migrations/v2.1/remove-sentry.js +354 -0
  49. package/dist/migrations/{v2.0/rename-api-paths.d.ts → v2.1/rename-trigger-paths.d.ts} +1 -1
  50. package/dist/migrations/v2.1/rename-trigger-paths.d.ts.map +1 -0
  51. package/dist/migrations/{v2.0/rename-api-paths.js → v2.1/rename-trigger-paths.js} +69 -40
  52. package/dist/migrations/v2.1/template-files.d.ts +8 -0
  53. package/dist/migrations/v2.1/template-files.d.ts.map +1 -0
  54. package/dist/migrations/v2.1/template-files.js +49 -0
  55. package/dist/migrations/v2.1/upgrade-tilt.d.ts +8 -0
  56. package/dist/migrations/v2.1/upgrade-tilt.d.ts.map +1 -0
  57. package/dist/migrations/v2.1/upgrade-tilt.js +139 -0
  58. package/dist/notification/index.js +105 -61
  59. package/dist/scopes/index.d.ts +288 -5
  60. package/dist/scopes/index.js +22 -7
  61. package/dist/telemetry/index.js +4 -0
  62. package/dist/templates/charts-values/dependencies/values.yaml +6 -0
  63. package/dist/templates/charts-values/opencrvs-services/values.yaml +6 -0
  64. package/dist/templates/charts-values/opentelemetry/values.yaml +7 -0
  65. package/dist/templates/countryconfig-template/.tiltignore +1 -0
  66. package/dist/templates/countryconfig-template/Dockerfile.assets +7 -0
  67. package/dist/templates/countryconfig-template/Tiltfile +112 -0
  68. package/dist/templates/countryconfig-template/assets/README.md +1 -0
  69. package/dist/templates/countryconfig-template/assets/clear-all-data-dev.sh +61 -0
  70. package/dist/templates/countryconfig-template/assets/deployment/deploy.sh +455 -0
  71. package/dist/templates/countryconfig-template/assets/deployment/reindex.sh +168 -0
  72. package/dist/templates/countryconfig-template/assets/deployment/validate-required-variables-in-compose-files.ts +67 -0
  73. package/dist/templates/countryconfig-template/assets/elasticsearch/reindex.sh +168 -0
  74. package/dist/templates/countryconfig-template/assets/metabase/README.md +34 -0
  75. package/dist/templates/countryconfig-template/assets/metabase/environment-configuration.sql +36 -0
  76. package/dist/templates/countryconfig-template/assets/metabase/initialize-database.sh +46 -0
  77. package/dist/templates/countryconfig-template/assets/metabase/metabase.init.db.sql +27737 -0
  78. package/dist/templates/countryconfig-template/assets/metabase/open-shell.sh +21 -0
  79. package/dist/templates/countryconfig-template/assets/metabase/package.json +13 -0
  80. package/dist/templates/countryconfig-template/assets/metabase/run-dev.sh +108 -0
  81. package/dist/templates/countryconfig-template/assets/metabase/run.sh +120 -0
  82. package/dist/templates/countryconfig-template/assets/metabase/update-database.sh +40 -0
  83. package/dist/templates/countryconfig-template/assets/postgres/setup-analytics.sh +135 -0
  84. package/dist/templates/countryconfig-template/assets/postgres/setup-reference-data.sh +108 -0
  85. package/dist/templates/countryconfig-template/tilt/clear-all-data.ps1 +50 -0
  86. package/dist/templates/countryconfig-template/tilt/clear-all-data.sh +35 -0
  87. package/dist/templates/countryconfig-template/tilt/common.tilt +145 -0
  88. package/dist/templates/countryconfig-template/tilt/examples/dependencies/values.yaml +15 -0
  89. package/dist/templates/countryconfig-template/tilt/examples/opencrvs-services/values.yaml +56 -0
  90. package/dist/templates/countryconfig-template/tilt/examples/traefik/values-minikube.yaml +21 -0
  91. package/dist/templates/countryconfig-template/tilt/examples/traefik/values.yaml +38 -0
  92. package/dist/templates/countryconfig-template/tilt/helm/dependencies/values.yaml +17 -0
  93. package/dist/templates/countryconfig-template/tilt/helm/opencrvs-services/values.yaml +16 -0
  94. package/dist/templates/countryconfig-template/tilt/lib.tilt +95 -0
  95. package/dist/templates/countryconfig-template/tilt/opencrvs.tilt +136 -0
  96. package/dist/translations/template.d.ts +11 -0
  97. package/dist/translations/template.d.ts.map +1 -0
  98. package/dist/translations/template.js +100 -0
  99. package/dist/verify/endpoints.d.ts.map +1 -1
  100. package/dist/verify/endpoints.js +179 -14
  101. package/opencrvs-toolkit-2.1.0-rc.14fb6a5.tgz +0 -0
  102. package/package.json +2 -1
  103. package/tsconfig.build.tsbuildinfo +1 -1
  104. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts +0 -3
  105. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts.map +0 -1
  106. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.js +0 -429
  107. package/dist/migrations/v2.0/add-resend-invite-notification.d.ts +0 -3
  108. package/dist/migrations/v2.0/add-resend-invite-notification.d.ts.map +0 -1
  109. package/dist/migrations/v2.0/add-resend-invite-notification.js +0 -373
  110. package/dist/migrations/v2.0/checkout-upstream-files.d.ts +0 -22
  111. package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +0 -1
  112. package/dist/migrations/v2.0/checkout-upstream-files.js +0 -146
  113. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts +0 -2
  114. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts.map +0 -1
  115. package/dist/migrations/v2.0/convert-config-files-to-ts.js +0 -838
  116. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts +0 -3
  117. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts.map +0 -1
  118. package/dist/migrations/v2.0/convert-paragraph-to-heading.js +0 -158
  119. package/dist/migrations/v2.0/create-events-index.d.ts +0 -3
  120. package/dist/migrations/v2.0/create-events-index.d.ts.map +0 -1
  121. package/dist/migrations/v2.0/create-events-index.js +0 -325
  122. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts +0 -11
  123. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts.map +0 -1
  124. package/dist/migrations/v2.0/delete-infrastructure-directory.js +0 -123
  125. package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts +0 -3
  126. package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts.map +0 -1
  127. package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.js +0 -110
  128. package/dist/migrations/v2.0/index.d.ts +0 -13
  129. package/dist/migrations/v2.0/index.d.ts.map +0 -1
  130. package/dist/migrations/v2.0/index.js +0 -103
  131. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts +0 -3
  132. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts.map +0 -1
  133. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.js +0 -432
  134. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts +0 -13
  135. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts.map +0 -1
  136. package/dist/migrations/v2.0/merge-infrastructure-directory.js +0 -222
  137. package/dist/migrations/v2.0/migrate-application-config-url.d.ts +0 -3
  138. package/dist/migrations/v2.0/migrate-application-config-url.d.ts.map +0 -1
  139. package/dist/migrations/v2.0/migrate-application-config-url.js +0 -343
  140. package/dist/migrations/v2.0/migrate-scopes.d.ts.map +0 -1
  141. package/dist/migrations/v2.0/migrate-scopes.js +0 -305
  142. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts +0 -3
  143. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts.map +0 -1
  144. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.js +0 -267
  145. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts +0 -3
  146. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts.map +0 -1
  147. package/dist/migrations/v2.0/migrate-workqueue-configs.js +0 -317
  148. package/dist/migrations/v2.0/remove-delete-actions.d.ts +0 -3
  149. package/dist/migrations/v2.0/remove-delete-actions.d.ts.map +0 -1
  150. package/dist/migrations/v2.0/remove-delete-actions.js +0 -156
  151. package/dist/migrations/v2.0/remove-demo-scope.d.ts +0 -3
  152. package/dist/migrations/v2.0/remove-demo-scope.d.ts.map +0 -1
  153. package/dist/migrations/v2.0/remove-demo-scope.js +0 -74
  154. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts +0 -3
  155. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts.map +0 -1
  156. package/dist/migrations/v2.0/remove-deprecated-imports.js +0 -96
  157. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts +0 -3
  158. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts.map +0 -1
  159. package/dist/migrations/v2.0/remove-fhir-url-helpers.js +0 -163
  160. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts +0 -3
  161. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts.map +0 -1
  162. package/dist/migrations/v2.0/remove-hearth-migrations.js +0 -87
  163. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts +0 -3
  164. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts.map +0 -1
  165. package/dist/migrations/v2.0/remove-old-statistics-service.js +0 -356
  166. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts +0 -3
  167. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts.map +0 -1
  168. package/dist/migrations/v2.0/remove-pending-certification-flag.js +0 -109
  169. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts +0 -3
  170. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts.map +0 -1
  171. package/dist/migrations/v2.0/remove-review-from-register-action.js +0 -163
  172. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts +0 -3
  173. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts.map +0 -1
  174. package/dist/migrations/v2.0/remove-unused-environment-variables.js +0 -186
  175. package/dist/migrations/v2.0/rename-api-paths.d.ts.map +0 -1
  176. package/dist/migrations/v2.0/rename-location-parent-id.d.ts +0 -3
  177. package/dist/migrations/v2.0/rename-location-parent-id.d.ts.map +0 -1
  178. package/dist/migrations/v2.0/rename-location-parent-id.js +0 -180
  179. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts +0 -3
  180. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts.map +0 -1
  181. package/dist/migrations/v2.0/simplify-analytics-precalculations.js +0 -195
  182. package/dist/migrations/v2.0/update-package-json.d.ts +0 -3
  183. package/dist/migrations/v2.0/update-package-json.d.ts.map +0 -1
  184. package/dist/migrations/v2.0/update-package-json.js +0 -105
  185. package/dist/translations/check.d.ts +0 -21
  186. package/dist/translations/check.d.ts.map +0 -1
  187. package/dist/translations/check.js +0 -132
  188. package/opencrvs-toolkit-2.1.0-rc.12673aa.tgz +0 -0
@@ -0,0 +1,354 @@
1
+ "use strict";
2
+ /*
3
+ * This Source Code Form is subject to the terms of the Mozilla Public
4
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
5
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
6
+ *
7
+ * OpenCRVS is also distributed under the terms of the Civil Registration
8
+ * & Healthcare Disclaimer located at http://opencrvs.org/license.
9
+ *
10
+ * Copyright (C) The OpenCRVS Authors located at https://github.com/opencrvs/opencrvs-core/blob/master/AUTHORS.
11
+ */
12
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
+ return new (P || (P = Promise))(function (resolve, reject) {
15
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
19
+ });
20
+ };
21
+ var __importDefault = (this && this.__importDefault) || function (mod) {
22
+ return (mod && mod.__esModule) ? mod : { "default": mod };
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.main = main;
26
+ /**
27
+ * Codemod: remove the Sentry wiring from a country config.
28
+ *
29
+ * Sentry is gone from OpenCRVS core: nothing reads `SENTRY_DSN` or
30
+ * `window.config.SENTRY` any more, and neither `ClientConfig` nor
31
+ * `LoginConfig` in `../commons` declares a `SENTRY` field. A v2.0
32
+ * country config that still sets it no longer compiles against the v2.1
33
+ * toolkit, so this step drops:
34
+ * - the `SENTRY` key from `src/client-config.ts`, `src/client-config.prod.ts`,
35
+ * `src/login-config.ts` and `src/login-config.prod.ts`,
36
+ * - `SENTRY_DSN` from `src/environment.ts` and `src/constants.ts`,
37
+ * - the `hapi-sentry` plugin registration and the `onRequest` scope
38
+ * extension from `src/index.ts`, along with their imports,
39
+ * - `SENTRY` from `IApplicationConfig` in `src/utils/index.ts`,
40
+ * - `hapi-sentry` and any `@sentry/*` package from `package.json`, and
41
+ * - `typings/hapi-sentry.d.ts`, the ambient declaration the untyped plugin
42
+ * needed.
43
+ *
44
+ * Any `SENTRY_DSN` left in the environment is simply ignored from here on.
45
+ * Anything already absent is left alone, and every step is independent — one
46
+ * that cannot find the structure it edits warns and lets the rest run.
47
+ */
48
+ const fs_1 = require("fs");
49
+ const path_1 = __importDefault(require("path"));
50
+ const ts_morph_1 = require("ts-morph");
51
+ const CONFIG_FILES = [
52
+ 'src/client-config.ts',
53
+ 'src/client-config.prod.ts',
54
+ 'src/login-config.ts',
55
+ 'src/login-config.prod.ts'
56
+ ];
57
+ const ENVIRONMENT_FILE = 'src/environment.ts';
58
+ const CONSTANTS_FILE = 'src/constants.ts';
59
+ const INDEX_FILE = 'src/index.ts';
60
+ const UTILS_FILE = 'src/utils/index.ts';
61
+ const PACKAGE_JSON_FILE = 'package.json';
62
+ const TYPINGS_FILE = 'typings/hapi-sentry.d.ts';
63
+ const SENTRY_PLUGIN = 'hapi-sentry';
64
+ const skipped = [];
65
+ function warnSkipped(message) {
66
+ skipped.push(message);
67
+ console.warn(` ⚠️ ${message}`);
68
+ }
69
+ // ─── Shared helpers ──────────────────────────────────────────────────────────
70
+ /**
71
+ * True when `name` appears in the file outside of import declarations, i.e.
72
+ * when something still uses what was imported under that name.
73
+ */
74
+ function isReferenced(sourceFile, name) {
75
+ return sourceFile
76
+ .getDescendantsOfKind(ts_morph_1.SyntaxKind.Identifier)
77
+ .some((identifier) => identifier.getText() === name &&
78
+ !identifier.getFirstAncestorByKind(ts_morph_1.SyntaxKind.ImportDeclaration));
79
+ }
80
+ /** Drop an import declaration once nothing it brings in is used any more. */
81
+ function removeIfUnused(sourceFile, importDeclaration) {
82
+ var _a, _b;
83
+ const names = [
84
+ (_a = importDeclaration.getDefaultImport()) === null || _a === void 0 ? void 0 : _a.getText(),
85
+ (_b = importDeclaration.getNamespaceImport()) === null || _b === void 0 ? void 0 : _b.getText(),
86
+ ...importDeclaration.getNamedImports().map((named) => named.getName())
87
+ ].filter((name) => Boolean(name));
88
+ if (names.length > 0 &&
89
+ names.every((name) => !isReferenced(sourceFile, name))) {
90
+ importDeclaration.remove();
91
+ return true;
92
+ }
93
+ return false;
94
+ }
95
+ /**
96
+ * Remove the named import `name` from the declaration importing
97
+ * `moduleSpecifier`, dropping the whole declaration when nothing is left.
98
+ */
99
+ function removeNamedImport(sourceFile, moduleSpecifier, name) {
100
+ const importDeclaration = sourceFile
101
+ .getImportDeclarations()
102
+ .find((declaration) => declaration.getModuleSpecifierValue() === moduleSpecifier);
103
+ if (!importDeclaration)
104
+ return false;
105
+ const named = importDeclaration
106
+ .getNamedImports()
107
+ .find((namedImport) => namedImport.getName() === name);
108
+ if (!named)
109
+ return false;
110
+ named.remove();
111
+ if (importDeclaration.getNamedImports().length === 0 &&
112
+ !importDeclaration.getDefaultImport() &&
113
+ !importDeclaration.getNamespaceImport()) {
114
+ importDeclaration.remove();
115
+ }
116
+ return true;
117
+ }
118
+ // ─── The four config files ───────────────────────────────────────────────────
119
+ /**
120
+ * Drop `SENTRY: ...` from `defineClientConfig` / `defineLoginConfig`. The prod
121
+ * login config reads `env.SENTRY_DSN` and has no other use for `env`, so the
122
+ * now-dangling `./environment` import goes with it.
123
+ */
124
+ function removeSentryFromConfigs(project, cwd) {
125
+ var _a, _b;
126
+ for (const file of CONFIG_FILES) {
127
+ const sourceFile = project.addSourceFileAtPathIfExists(path_1.default.join(cwd, file));
128
+ if (!sourceFile)
129
+ continue;
130
+ const property = sourceFile
131
+ .getDescendantsOfKind(ts_morph_1.SyntaxKind.PropertyAssignment)
132
+ .find((assignment) => assignment.getName() === 'SENTRY');
133
+ if (!property)
134
+ continue;
135
+ // What the value read — `env` for `env.SENTRY_DSN ?? ''`, nothing for a
136
+ // literal. Those are the only imports removing the key can strand.
137
+ const usedNames = new Set(property
138
+ .getDescendantsOfKind(ts_morph_1.SyntaxKind.Identifier)
139
+ .map((identifier) => identifier.getText()));
140
+ property.remove();
141
+ for (const importDeclaration of [...sourceFile.getImportDeclarations()]) {
142
+ const imported = [
143
+ (_a = importDeclaration.getDefaultImport()) === null || _a === void 0 ? void 0 : _a.getText(),
144
+ (_b = importDeclaration.getNamespaceImport()) === null || _b === void 0 ? void 0 : _b.getText(),
145
+ ...importDeclaration.getNamedImports().map((named) => named.getName())
146
+ ].filter((name) => Boolean(name));
147
+ if (imported.some((name) => usedNames.has(name))) {
148
+ removeIfUnused(sourceFile, importDeclaration);
149
+ }
150
+ }
151
+ console.log(` ✓ ${file}: SENTRY`);
152
+ }
153
+ }
154
+ // ─── environment.ts / constants.ts ───────────────────────────────────────────
155
+ function removeEnvironmentVariable(project, cwd) {
156
+ var _a;
157
+ const sourceFile = project.addSourceFileAtPathIfExists(path_1.default.join(cwd, ENVIRONMENT_FILE));
158
+ if (!sourceFile)
159
+ return;
160
+ const options = (_a = sourceFile
161
+ .getDescendantsOfKind(ts_morph_1.SyntaxKind.CallExpression)
162
+ .find((call) => call.getExpression().getText() === 'cleanEnv')) === null || _a === void 0 ? void 0 : _a.getArguments()[1];
163
+ if (!options || !ts_morph_1.Node.isObjectLiteralExpression(options)) {
164
+ warnSkipped(`Could not find the cleanEnv(...) config object in ${ENVIRONMENT_FILE}; remove SENTRY_DSN by hand`);
165
+ return;
166
+ }
167
+ const property = options.getProperty('SENTRY_DSN');
168
+ if (!property)
169
+ return;
170
+ property.remove();
171
+ console.log(` ✓ ${ENVIRONMENT_FILE}: SENTRY_DSN`);
172
+ }
173
+ /**
174
+ * Drop the constant re-exporting the DSN. Matched by name and by initializer,
175
+ * so a country that renamed `SENTRY_DSN` but still reads `env.SENTRY_DSN` is
176
+ * cleaned up too.
177
+ */
178
+ function removeConstant(project, cwd) {
179
+ const sourceFile = project.addSourceFileAtPathIfExists(path_1.default.join(cwd, CONSTANTS_FILE));
180
+ if (!sourceFile)
181
+ return;
182
+ for (const statement of [...sourceFile.getVariableStatements()]) {
183
+ const declarations = statement.getDeclarations();
184
+ const matching = declarations.filter((declaration) => { var _a; var _b; return declaration.getName() === 'SENTRY_DSN' ||
185
+ /\benv\.SENTRY_DSN\b/.test((_b = (_a = declaration.getInitializer()) === null || _a === void 0 ? void 0 : _a.getText()) !== null && _b !== void 0 ? _b : ''); });
186
+ if (matching.length === 0)
187
+ continue;
188
+ const names = matching.map((declaration) => declaration.getName());
189
+ if (matching.length === declarations.length) {
190
+ statement.remove();
191
+ }
192
+ else {
193
+ for (const declaration of matching) {
194
+ declaration.remove();
195
+ }
196
+ }
197
+ console.log(` ✓ ${CONSTANTS_FILE}: ${names.join(', ')}`);
198
+ }
199
+ }
200
+ // ─── index.ts ────────────────────────────────────────────────────────────────
201
+ /**
202
+ * Unregister the plugin and the request hook it fed:
203
+ * - `if (SENTRY_DSN) { plugins.push({ plugin: Sentry, ... }) }`
204
+ * - `server.ext({ type: 'onRequest', method(request: ... sentryScope ...) })`
205
+ * and then the imports both relied on.
206
+ */
207
+ function unwireIndex(project, cwd) {
208
+ var _a, _b;
209
+ var _c, _d;
210
+ const sourceFile = project.addSourceFileAtPathIfExists(path_1.default.join(cwd, INDEX_FILE));
211
+ if (!sourceFile)
212
+ return;
213
+ const pluginImport = sourceFile
214
+ .getImportDeclarations()
215
+ .find((declaration) => declaration.getModuleSpecifierValue() === SENTRY_PLUGIN);
216
+ // `import * as Sentry from 'hapi-sentry'` in the template, but the local
217
+ // name is the country's to choose.
218
+ const pluginName = (_d = (_c = (_a = pluginImport === null || pluginImport === void 0 ? void 0 : pluginImport.getNamespaceImport()) === null || _a === void 0 ? void 0 : _a.getText()) !== null && _c !== void 0 ? _c : (_b = pluginImport === null || pluginImport === void 0 ? void 0 : pluginImport.getDefaultImport()) === null || _b === void 0 ? void 0 : _b.getText()) !== null && _d !== void 0 ? _d : 'Sentry';
219
+ const registration = sourceFile
220
+ .getDescendantsOfKind(ts_morph_1.SyntaxKind.IfStatement)
221
+ .find((statement) => /\bSENTRY_DSN\b/.test(statement.getExpression().getText()) &&
222
+ new RegExp(`\\bplugin:\\s*${pluginName}\\b`).test(statement.getText()));
223
+ if (registration) {
224
+ registration.remove();
225
+ console.log(` ✓ ${INDEX_FILE}: hapi-sentry plugin registration`);
226
+ }
227
+ else if (sourceFile.getText().includes(SENTRY_PLUGIN)) {
228
+ warnSkipped(`Could not find the hapi-sentry plugin registration in ${INDEX_FILE}; remove it by hand`);
229
+ }
230
+ const scopeExtension = sourceFile
231
+ .getDescendantsOfKind(ts_morph_1.SyntaxKind.ExpressionStatement)
232
+ .find((statement) => statement.getText().includes('sentryScope') &&
233
+ statement.getText().startsWith('server.ext'));
234
+ if (scopeExtension) {
235
+ scopeExtension.remove();
236
+ console.log(` ✓ ${INDEX_FILE}: onRequest Sentry scope extension`);
237
+ }
238
+ else if (sourceFile.getText().includes('sentryScope')) {
239
+ warnSkipped(`Found 'sentryScope' in ${INDEX_FILE} outside a server.ext(...) call; remove it by hand`);
240
+ }
241
+ if (pluginImport && removeIfUnused(sourceFile, pluginImport)) {
242
+ console.log(` ✓ ${INDEX_FILE}: import '${SENTRY_PLUGIN}'`);
243
+ }
244
+ // The DSN is imported from the constants module, whose specifier countries
245
+ // write either as a path alias or relatively.
246
+ if (!isReferenced(sourceFile, 'SENTRY_DSN')) {
247
+ for (const declaration of [...sourceFile.getImportDeclarations()]) {
248
+ const specifier = declaration.getModuleSpecifierValue();
249
+ if (removeNamedImport(sourceFile, specifier, 'SENTRY_DSN')) {
250
+ console.log(` ✓ ${INDEX_FILE}: import SENTRY_DSN from '${specifier}'`);
251
+ break;
252
+ }
253
+ }
254
+ }
255
+ }
256
+ // ─── utils/index.ts ──────────────────────────────────────────────────────────
257
+ /** Drop `SENTRY` from the country config's own `IApplicationConfig`. */
258
+ function removeApplicationConfigField(project, cwd) {
259
+ var _a;
260
+ const sourceFile = project.addSourceFileAtPathIfExists(path_1.default.join(cwd, UTILS_FILE));
261
+ if (!sourceFile)
262
+ return;
263
+ const property = (_a = sourceFile
264
+ .getInterface('IApplicationConfig')) === null || _a === void 0 ? void 0 : _a.getProperty('SENTRY');
265
+ if (!property)
266
+ return;
267
+ property.remove();
268
+ console.log(` ✓ ${UTILS_FILE}: IApplicationConfig.SENTRY`);
269
+ }
270
+ function isSentryPackage(name) {
271
+ return name === SENTRY_PLUGIN || name.startsWith('@sentry/');
272
+ }
273
+ function removeDependencies(cwd) {
274
+ const packageJsonPath = path_1.default.join(cwd, PACKAGE_JSON_FILE);
275
+ if (!(0, fs_1.existsSync)(packageJsonPath))
276
+ return;
277
+ const raw = (0, fs_1.readFileSync)(packageJsonPath, 'utf8');
278
+ let parsed;
279
+ try {
280
+ parsed = JSON.parse(raw);
281
+ }
282
+ catch (error) {
283
+ warnSkipped(`${PACKAGE_JSON_FILE} could not be parsed (${error.message}); remove the Sentry dependencies by hand`);
284
+ return;
285
+ }
286
+ const removed = [];
287
+ for (const bucket of ['dependencies', 'devDependencies']) {
288
+ const dependencies = parsed[bucket];
289
+ if (!dependencies)
290
+ continue;
291
+ for (const name of Object.keys(dependencies)) {
292
+ if (isSentryPackage(name)) {
293
+ delete dependencies[name];
294
+ removed.push(name);
295
+ }
296
+ }
297
+ }
298
+ if (removed.length === 0)
299
+ return;
300
+ // Keep the file's trailing newline, if it had one.
301
+ const trailingNewline = raw.endsWith('\n') ? '\n' : '';
302
+ (0, fs_1.writeFileSync)(packageJsonPath, `${JSON.stringify(parsed, null, 2)}${trailingNewline}`);
303
+ console.log(` ✓ ${PACKAGE_JSON_FILE}: ${removed.join(', ')}`);
304
+ }
305
+ // ─── typings/hapi-sentry.d.ts ────────────────────────────────────────────────
306
+ /**
307
+ * `hapi-sentry` ships no types, so country configs declare the module
308
+ * themselves. Delete that declaration — but only when it is all the file says,
309
+ * in case a country has folded other ambient declarations into it.
310
+ */
311
+ function removeTypings(cwd) {
312
+ const typingsPath = path_1.default.join(cwd, TYPINGS_FILE);
313
+ if (!(0, fs_1.existsSync)(typingsPath))
314
+ return;
315
+ const declarations = (0, fs_1.readFileSync)(typingsPath, 'utf8')
316
+ .replace(/\/\*[\s\S]*?\*\//g, '')
317
+ .replace(/^\s*\/\/.*$/gm, '')
318
+ .trim();
319
+ if (!/^declare module ['"]hapi-sentry['"];?$/.test(declarations)) {
320
+ warnSkipped(`${TYPINGS_FILE} declares more than the 'hapi-sentry' module; remove the declaration by hand`);
321
+ return;
322
+ }
323
+ (0, fs_1.rmSync)(typingsPath);
324
+ console.log(` ✓ ${TYPINGS_FILE}: deleted`);
325
+ }
326
+ // ─── Entry point ─────────────────────────────────────────────────────────────
327
+ function main() {
328
+ return __awaiter(this, void 0, void 0, function* () {
329
+ const cwd = process.cwd();
330
+ console.log('\nRemoving Sentry...\n');
331
+ const project = new ts_morph_1.Project({
332
+ // ts-morph indents with four spaces and double-quotes strings by default,
333
+ // both of which the country config's prettier run would undo.
334
+ manipulationSettings: {
335
+ indentationText: ts_morph_1.IndentationText.TwoSpaces,
336
+ quoteKind: ts_morph_1.QuoteKind.Single
337
+ }
338
+ });
339
+ removeSentryFromConfigs(project, cwd);
340
+ removeEnvironmentVariable(project, cwd);
341
+ removeConstant(project, cwd);
342
+ unwireIndex(project, cwd);
343
+ removeApplicationConfigField(project, cwd);
344
+ yield project.save();
345
+ removeDependencies(cwd);
346
+ removeTypings(cwd);
347
+ if (skipped.length > 0) {
348
+ console.warn(`\n⚠️ ${skipped.length} Sentry removal step(s) were skipped. Handle the following by hand:`);
349
+ for (const message of skipped) {
350
+ console.warn(` - ${message}`);
351
+ }
352
+ }
353
+ });
354
+ }
@@ -1,3 +1,3 @@
1
1
  declare function main(): Promise<void>;
2
2
  export { main };
3
- //# sourceMappingURL=rename-api-paths.d.ts.map
3
+ //# sourceMappingURL=rename-trigger-paths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rename-trigger-paths.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.1/rename-trigger-paths.ts"],"names":[],"mappings":"AAiMA,iBAAe,IAAI,kBAiDlB;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
@@ -24,35 +24,44 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
25
  exports.main = main;
26
26
  /**
27
- * Codemod: Rename Hapi route `path` values inside route configuration objects.
27
+ * Codemod: Rename the `/triggers/...` country config routes to `/trigger/...`.
28
28
  *
29
29
  * Usage:
30
- * ts-node -r tsconfig-paths/register src/migrations/v2.0/rename-api-paths.ts
30
+ * ts-node -r tsconfig-paths/register src/migrations/v2.1/rename-trigger-paths.ts
31
+ *
32
+ * Why:
33
+ * The user-notification and system-ready triggers were served under
34
+ * `/triggers/`, while the event action and telemetry triggers use
35
+ * `/trigger/`. v2.1 settles on the singular prefix for all of them, so core
36
+ * now posts to `/trigger/user/*` and gets `/trigger/system/ready`. A route
37
+ * left on the old path answers 404, which core logs and moves on from — the
38
+ * notification is simply never sent and the country config's integrations
39
+ * are never registered. See CHANGELOG.md ("Country config triggers are all
40
+ * served under /trigger").
31
41
  *
32
42
  * What it does:
33
43
  * - Scans all TypeScript files under `src/`
34
- * - Finds every object literal that looks like a Hapi route config, i.e. one that
35
- * has both a `method` property whose value is a recognised HTTP verb (or an array
36
- * of them) and a `path` property whose value is a string literal
37
- * - Applies every rename listed in PATH_RENAMES to the `path` value
44
+ * - Finds every object literal that looks like a Hapi route config (a
45
+ * `method` property holding an HTTP verb, or an array of them, plus a
46
+ * string-literal `path`)
47
+ * - Rewrites a `path` starting with any prefix in PATH_PREFIX_RENAMES
38
48
  * - Saves the modified files in-place
39
- *
40
- * Adding new renames:
41
- * Add an entry to the PATH_RENAMES map below. Keys are the old path strings,
42
- * values are the new path strings. Exact string matching is used — no wildcards.
49
+ * - Warns about every remaining `/triggers/` occurrence under `src/`, which
50
+ * is anything this codemod cannot rewrite safely: a path built from a
51
+ * template literal or variable, a route config it did not recognise, or a
52
+ * test that requests the old path
43
53
  */
44
54
  const ts_morph_1 = require("ts-morph");
45
55
  const path_1 = __importDefault(require("path"));
46
56
  // ─── Path rename table ────────────────────────────────────────────────────────
47
- // Add new renames here as further API paths are changed between versions.
48
- const PATH_RENAMES = {
49
- '/events': '/config/events',
50
- '/application-config': '/config/application',
51
- '/workqueue': '/config/workqueues',
52
- '/locations': '/config/locations',
53
- '/users': '/config/users',
54
- '/roles': '/config/roles'
57
+ // Prefixes rather than whole paths: `/triggers/user/` covers one route per
58
+ // `TriggerEvent`, and a country config may have added its own.
59
+ const PATH_PREFIX_RENAMES = {
60
+ '/triggers/user/': '/trigger/user/',
61
+ '/triggers/system/': '/trigger/system/'
55
62
  };
63
+ /** Matched against the remaining source text once the renames are applied. */
64
+ const STALE_PREFIX = '/triggers/';
56
65
  // ─── Constants ────────────────────────────────────────────────────────────────
57
66
  const METHOD_PROPERTY_NAME = 'method';
58
67
  const PATH_PROPERTY_NAME = 'path';
@@ -68,15 +77,11 @@ const HTTP_VERBS = new Set([
68
77
  ]);
69
78
  // ─── Helpers ──────────────────────────────────────────────────────────────────
70
79
  /**
71
- * Returns true when the given object literal looks like a Hapi route config.
72
- *
73
- * A route config must have:
74
- * - a `method` property whose value is either a recognised HTTP verb string
75
- * literal, or an array literal whose elements are all recognised verb strings
76
- * - a `path` property whose value is a string literal
80
+ * Returns true when the given object literal looks like a Hapi route config,
81
+ * i.e. it has a `method` property holding a recognised HTTP verb string (or an
82
+ * array of them) and a string-literal `path` property.
77
83
  */
78
84
  function isRouteConfig(obj) {
79
- // ── method check ────────────────────────────────────────────────────────────
80
85
  const methodProp = obj.getProperty(METHOD_PROPERTY_NAME);
81
86
  if (!methodProp || !ts_morph_1.Node.isPropertyAssignment(methodProp))
82
87
  return false;
@@ -98,7 +103,6 @@ function isRouteConfig(obj) {
98
103
  else {
99
104
  return false;
100
105
  }
101
- // ── path check ──────────────────────────────────────────────────────────────
102
106
  const pathProp = obj.getProperty(PATH_PROPERTY_NAME);
103
107
  if (!pathProp || !ts_morph_1.Node.isPropertyAssignment(pathProp))
104
108
  return false;
@@ -106,8 +110,8 @@ function isRouteConfig(obj) {
106
110
  return !!pathInit && ts_morph_1.Node.isStringLiteral(pathInit);
107
111
  }
108
112
  /**
109
- * Applies PATH_RENAMES to the `path` property of a confirmed route config object.
110
- * Returns the new path string if a rename was applied, or null if no change was made.
113
+ * Applies PATH_PREFIX_RENAMES to the `path` of a confirmed route config.
114
+ * Returns the new path, or null when no prefix matched.
111
115
  */
112
116
  function renameRoutePath(obj) {
113
117
  const pathProp = obj.getProperty(PATH_PROPERTY_NAME);
@@ -117,9 +121,11 @@ function renameRoutePath(obj) {
117
121
  if (!pathInit || !ts_morph_1.Node.isStringLiteral(pathInit))
118
122
  return null;
119
123
  const oldPath = pathInit.getLiteralValue();
120
- const newPath = PATH_RENAMES[oldPath];
121
- if (!newPath)
124
+ const match = Object.entries(PATH_PREFIX_RENAMES).find(([from]) => oldPath.startsWith(from));
125
+ if (!match)
122
126
  return null;
127
+ const [from, to] = match;
128
+ const newPath = to + oldPath.slice(from.length);
123
129
  pathInit.replaceWithText(`'${newPath}'`);
124
130
  return newPath;
125
131
  }
@@ -143,14 +149,35 @@ function processFile(filePath, project) {
143
149
  }
144
150
  return renamedCount;
145
151
  }
152
+ /**
153
+ * Reports leftover `/triggers/` occurrences. Rewriting these is guesswork —
154
+ * the path may be assembled at runtime — but leaving them unmentioned would
155
+ * hide a route that still answers on the old path.
156
+ */
157
+ function warnAboutStalePaths(sourceFiles) {
158
+ const stale = [];
159
+ for (const sourceFile of sourceFiles) {
160
+ const relPath = path_1.default.relative(process.cwd(), sourceFile.getFilePath());
161
+ const lines = sourceFile.getFullText().split('\n');
162
+ lines.forEach((line, index) => {
163
+ if (line.includes(STALE_PREFIX)) {
164
+ stale.push(` ${relPath}:${index + 1}: ${line.trim()}`);
165
+ }
166
+ });
167
+ }
168
+ if (stale.length === 0)
169
+ return;
170
+ console.log(`\nWARNING: ${stale.length} remaining '${STALE_PREFIX}' reference(s) need to be renamed by hand:`);
171
+ console.log(stale.join('\n'));
172
+ }
146
173
  // ─── Entry point ─────────────────────────────────────────────────────────────
147
174
  function main() {
148
175
  return __awaiter(this, void 0, void 0, function* () {
149
176
  const srcDir = path_1.default.join(process.cwd(), 'src');
150
177
  console.log(`Scanning for Hapi route configs in: ${srcDir}\n`);
151
178
  console.log('Active path renames:');
152
- for (const [from, to] of Object.entries(PATH_RENAMES)) {
153
- console.log(` '${from}' → '${to}'`);
179
+ for (const [from, to] of Object.entries(PATH_PREFIX_RENAMES)) {
180
+ console.log(` '${from}*' → '${to}*'`);
154
181
  }
155
182
  console.log();
156
183
  const project = new ts_morph_1.Project({
@@ -173,15 +200,17 @@ function main() {
173
200
  }
174
201
  }
175
202
  if (modifiedFiles.length === 0) {
176
- console.log('No matching route paths found. Nothing to do.');
177
- return;
203
+ console.log('No trigger route paths to rename.');
178
204
  }
179
- console.log(`\nSaving ${modifiedFiles.length} modified file(s)...`);
180
- for (const filePath of modifiedFiles) {
181
- const sourceFile = project.getSourceFileOrThrow(filePath);
182
- yield sourceFile.save();
183
- console.log(` Saved: ${path_1.default.relative(process.cwd(), filePath)}`);
205
+ else {
206
+ console.log(`\nSaving ${modifiedFiles.length} modified file(s)...`);
207
+ for (const filePath of modifiedFiles) {
208
+ const sourceFile = project.getSourceFileOrThrow(filePath);
209
+ yield sourceFile.save();
210
+ console.log(` Saved: ${path_1.default.relative(process.cwd(), filePath)}`);
211
+ }
212
+ console.log(`\nDone. Renamed ${totalRenamed} route path(s).`);
184
213
  }
185
- console.log(`\nDone. Renamed ${totalRenamed} route path(s).`);
214
+ warnAboutStalePaths(sourceFiles);
186
215
  });
187
216
  }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Where the bundled template files are: next to the built CLI in `dist/`, or
3
+ * the template package itself when running from source (tests, ts-node).
4
+ */
5
+ export declare function findTemplateDir(): string;
6
+ /** Every file under `dir`, relative to `root`, with forward slashes. */
7
+ export declare function listFiles(root: string, dir: string): string[];
8
+ //# sourceMappingURL=template-files.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template-files.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.1/template-files.ts"],"names":[],"mappings":"AAmBA;;;GAGG;AACH,wBAAgB,eAAe,WAiB9B;AAED,wEAAwE;AACxE,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAW7D"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ /*
3
+ * This Source Code Form is subject to the terms of the Mozilla Public
4
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
5
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
6
+ *
7
+ * OpenCRVS is also distributed under the terms of the Civil Registration
8
+ * & Healthcare Disclaimer located at http://opencrvs.org/license.
9
+ *
10
+ * Copyright (C) The OpenCRVS Authors located at https://github.com/opencrvs/opencrvs-core/blob/master/AUTHORS.
11
+ */
12
+ var __importDefault = (this && this.__importDefault) || function (mod) {
13
+ return (mod && mod.__esModule) ? mod : { "default": mod };
14
+ };
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.findTemplateDir = findTemplateDir;
17
+ exports.listFiles = listFiles;
18
+ /**
19
+ * Country config template files bundled into the toolkit by `build.sh`, shared
20
+ * by the codemods that copy them into a country config.
21
+ */
22
+ const fs_1 = require("fs");
23
+ const path_1 = __importDefault(require("path"));
24
+ /**
25
+ * Where the bundled template files are: next to the built CLI in `dist/`, or
26
+ * the template package itself when running from source (tests, ts-node).
27
+ */
28
+ function findTemplateDir() {
29
+ const candidates = [
30
+ path_1.default.resolve(__dirname, 'templates', 'countryconfig-template'),
31
+ path_1.default.resolve(__dirname, '../../../../countryconfig-template')
32
+ ];
33
+ const templateDir = candidates.find((candidate) => (0, fs_1.existsSync)(path_1.default.join(candidate, 'Tiltfile')));
34
+ if (!templateDir) {
35
+ throw new Error(`Country config template files not found in any of: ${candidates.join(', ')}`);
36
+ }
37
+ return templateDir;
38
+ }
39
+ /** Every file under `dir`, relative to `root`, with forward slashes. */
40
+ function listFiles(root, dir) {
41
+ const absolute = path_1.default.join(root, dir);
42
+ if (!(0, fs_1.existsSync)(absolute)) {
43
+ return [];
44
+ }
45
+ return (0, fs_1.readdirSync)(absolute, { withFileTypes: true }).flatMap((entry) => {
46
+ const relative = path_1.default.posix.join(dir, entry.name);
47
+ return entry.isDirectory() ? listFiles(root, relative) : [relative];
48
+ });
49
+ }
@@ -0,0 +1,8 @@
1
+ /** TODO: ????? The template Tiltfile, keeping the image name the country already uses. */
2
+ export declare function renderTiltfile(template: string, existing?: string): string;
3
+ /** `contents` with `line` appended, unless an equivalent entry is there already. */
4
+ export declare function withIgnoreEntry(contents: string, line: string): string;
5
+ export declare function upgradeTilt(cwd: string, templateDir: string): void;
6
+ declare function main(): Promise<void>;
7
+ export { main };
8
+ //# sourceMappingURL=upgrade-tilt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upgrade-tilt.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.1/upgrade-tilt.ts"],"names":[],"mappings":"AAyFA,0FAA0F;AAC1F,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,UAYjE;AAED,oFAAoF;AACpF,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAc7D;AAQD,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,QA0D3D;AAED,iBAAe,IAAI,kBAQlB;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}