@opencrvs/toolkit 2.1.0-rc.d13869e → 2.1.0-rc.d235243

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 (265) hide show
  1. package/README.md +3 -12
  2. package/build.sh +23 -5
  3. package/create-countryconfig/index.js +441 -59
  4. package/create-countryconfig/node_modules/.bin/degit +21 -0
  5. package/create-countryconfig/package.json +4 -1
  6. package/dist/application-config/index.js +362 -284
  7. package/dist/authentication/index.d.ts +66 -0
  8. package/dist/authentication/index.d.ts.map +1 -0
  9. package/dist/authentication/index.js +765 -0
  10. package/dist/cli.js +2119 -1321
  11. package/dist/commons/api/router.d.ts +940 -363
  12. package/dist/commons/application-config/index.d.ts +0 -2
  13. package/dist/commons/conditionals/conditionals.d.ts +6 -6
  14. package/dist/commons/conditionals/validate.d.ts +34 -8
  15. package/dist/commons/events/ActionConfig.d.ts +5 -14
  16. package/dist/commons/events/ActionDocument.d.ts +35 -15
  17. package/dist/commons/events/ActionInput.d.ts +4 -4
  18. package/dist/commons/events/ActionStatus.d.ts +14 -0
  19. package/dist/commons/events/AdvancedSearchConfig.d.ts +48 -12
  20. package/dist/commons/events/AuditLog.d.ts +148 -0
  21. package/dist/commons/events/Draft.d.ts +1 -21
  22. package/dist/commons/events/EventConfig.d.ts +3 -0
  23. package/dist/commons/events/EventDocument.d.ts +472 -4
  24. package/dist/commons/events/EventIndex.d.ts +3 -26
  25. package/dist/commons/events/EventMetadata.d.ts +1 -11
  26. package/dist/commons/events/EventStatus.d.ts +19 -0
  27. package/dist/commons/events/FieldConfig.d.ts +109 -63
  28. package/dist/commons/events/FieldTypeMapping.d.ts +17 -17
  29. package/dist/commons/events/FieldValue.d.ts +3 -2
  30. package/dist/commons/events/Flag.d.ts +42 -0
  31. package/dist/commons/events/FormConfig.d.ts +6 -0
  32. package/dist/commons/events/PageConfig.d.ts +4 -0
  33. package/dist/commons/events/PlainDate.d.ts +8 -0
  34. package/dist/commons/events/SummaryConfig.d.ts +249 -0
  35. package/dist/commons/events/WorkqueueConfig.d.ts +17 -14
  36. package/dist/commons/events/event.d.ts +12 -0
  37. package/dist/commons/events/index.d.ts +1 -0
  38. package/dist/commons/events/locationPayloads.d.ts +95 -0
  39. package/dist/commons/events/locations.d.ts +169 -26
  40. package/dist/commons/events/mocks.test.utils.d.ts +30 -0
  41. package/dist/commons/events/scopes.d.ts +21 -1
  42. package/dist/commons/events/test.utils.d.ts +78 -25
  43. package/dist/commons/events/utils.d.ts +39 -4
  44. package/dist/commons/notification/UserNotifications.d.ts +28 -13
  45. package/dist/commons/notification/dispatch.d.ts +10 -0
  46. package/dist/commons/notification/index.d.ts +1 -0
  47. package/dist/conditionals/index.js +349 -65
  48. package/dist/csv.d.ts +25 -0
  49. package/dist/csv.d.ts.map +1 -0
  50. package/dist/csv.js +120 -0
  51. package/dist/environment/derived-variables.d.ts +18 -0
  52. package/dist/environment/derived-variables.d.ts.map +1 -1
  53. package/dist/environment/derived-variables.js +21 -0
  54. package/dist/environment/index.d.ts +1 -0
  55. package/dist/environment/index.d.ts.map +1 -1
  56. package/dist/environment/index.js +12 -1
  57. package/dist/environment/logger.d.ts +15 -3
  58. package/dist/environment/logger.d.ts.map +1 -1
  59. package/dist/environment/manage-users.js +1 -1
  60. package/dist/environment/paths.d.ts +7 -0
  61. package/dist/environment/paths.d.ts.map +1 -0
  62. package/dist/environment/paths.js +72 -0
  63. package/dist/environment/questions.d.ts +16 -0
  64. package/dist/environment/questions.d.ts.map +1 -1
  65. package/dist/environment/questions.js +46 -15
  66. package/dist/environment/setup-environment.d.ts +1 -1
  67. package/dist/environment/setup-environment.d.ts.map +1 -1
  68. package/dist/environment/setup-environment.js +634 -560
  69. package/dist/environment/swarm-to-k8s.js +3 -4
  70. package/dist/environment/templates.d.ts +0 -1
  71. package/dist/environment/templates.d.ts.map +1 -1
  72. package/dist/environment/templates.js +5 -9
  73. package/dist/environment/update-workflows.d.ts.map +1 -1
  74. package/dist/environment/update-workflows.js +23 -6
  75. package/dist/environment/upgrade.d.ts +2 -0
  76. package/dist/environment/upgrade.d.ts.map +1 -0
  77. package/dist/environment/upgrade.js +82 -0
  78. package/dist/environment/users.js +11 -13
  79. package/dist/environment/utils.d.ts +0 -12
  80. package/dist/environment/utils.d.ts.map +1 -1
  81. package/dist/environment/utils.js +1 -28
  82. package/dist/events/index.js +7689 -7063
  83. package/dist/migrations/v2.1/add-recovery-link-notifications.d.ts +3 -0
  84. package/dist/migrations/v2.1/add-recovery-link-notifications.d.ts.map +1 -0
  85. package/dist/migrations/v2.1/add-recovery-link-notifications.js +511 -0
  86. package/dist/migrations/v2.1/add-translations.d.ts +9 -0
  87. package/dist/migrations/v2.1/add-translations.d.ts.map +1 -0
  88. package/dist/migrations/v2.1/add-translations.js +149 -0
  89. package/dist/migrations/{v2.0/rename-api-paths.d.ts → v2.1/enable-telemetry.d.ts} +1 -1
  90. package/dist/migrations/v2.1/enable-telemetry.d.ts.map +1 -0
  91. package/dist/migrations/v2.1/enable-telemetry.js +455 -0
  92. package/dist/migrations/v2.1/index.d.ts.map +1 -1
  93. package/dist/migrations/v2.1/index.js +47 -215
  94. package/dist/migrations/v2.1/migrate-infrastructure-to-assets.d.ts +14 -0
  95. package/dist/migrations/v2.1/migrate-infrastructure-to-assets.d.ts.map +1 -0
  96. package/dist/migrations/v2.1/migrate-infrastructure-to-assets.js +348 -0
  97. package/dist/migrations/v2.1/remove-metabase-package-installs.d.ts +2 -0
  98. package/dist/migrations/v2.1/remove-metabase-package-installs.d.ts.map +1 -0
  99. package/dist/migrations/v2.1/remove-metabase-package-installs.js +161 -0
  100. package/dist/migrations/{v2.0/migrate-scopes.d.ts → v2.1/remove-sentry.d.ts} +1 -1
  101. package/dist/migrations/v2.1/remove-sentry.d.ts.map +1 -0
  102. package/dist/migrations/v2.1/remove-sentry.js +354 -0
  103. package/dist/migrations/{v2.0/create-events-index.d.ts → v2.1/rename-trigger-paths.d.ts} +1 -1
  104. package/dist/migrations/v2.1/rename-trigger-paths.d.ts.map +1 -0
  105. package/dist/migrations/{v2.0/rename-api-paths.js → v2.1/rename-trigger-paths.js} +69 -40
  106. package/dist/migrations/v2.1/template-files.d.ts +8 -0
  107. package/dist/migrations/v2.1/template-files.d.ts.map +1 -0
  108. package/dist/migrations/v2.1/template-files.js +49 -0
  109. package/dist/migrations/v2.1/upgrade-tilt.d.ts +8 -0
  110. package/dist/migrations/v2.1/upgrade-tilt.d.ts.map +1 -0
  111. package/dist/migrations/v2.1/upgrade-tilt.js +139 -0
  112. package/dist/migrations/v2.2/add-e2e-tests.d.ts +19 -0
  113. package/dist/migrations/v2.2/add-e2e-tests.d.ts.map +1 -0
  114. package/dist/migrations/v2.2/add-e2e-tests.js +143 -0
  115. package/dist/migrations/v2.2/index.d.ts +6 -0
  116. package/dist/migrations/v2.2/index.d.ts.map +1 -0
  117. package/dist/migrations/v2.2/index.js +279 -0
  118. package/dist/migrations/v2.2/template-files.d.ts +8 -0
  119. package/dist/migrations/v2.2/template-files.d.ts.map +1 -0
  120. package/dist/migrations/v2.2/template-files.js +49 -0
  121. package/dist/migrations/v2.2/upgrade-tilt.d.ts +8 -0
  122. package/dist/migrations/v2.2/upgrade-tilt.d.ts.map +1 -0
  123. package/dist/migrations/v2.2/upgrade-tilt.js +139 -0
  124. package/dist/notification/index.js +1887 -1438
  125. package/dist/scopes/index.d.ts +614 -36
  126. package/dist/scopes/index.js +351 -65
  127. package/dist/telemetry/index.d.ts +45 -0
  128. package/dist/telemetry/index.d.ts.map +1 -0
  129. package/dist/telemetry/index.js +43 -0
  130. package/dist/templates/charts-values/dependencies/values.yaml +8 -0
  131. package/dist/templates/charts-values/opencrvs-services/values.yaml +10 -3
  132. package/dist/templates/charts-values/opentelemetry/values.yaml +102 -0
  133. package/dist/templates/charts-values/traefik/values.yaml +25 -12
  134. package/dist/templates/countryconfig-template/.tiltignore +1 -0
  135. package/dist/templates/countryconfig-template/Dockerfile.assets +7 -0
  136. package/dist/templates/countryconfig-template/Tiltfile +112 -0
  137. package/dist/templates/countryconfig-template/assets/README.md +1 -0
  138. package/dist/templates/countryconfig-template/assets/clear-all-data-dev.sh +61 -0
  139. package/dist/templates/countryconfig-template/assets/deployment/deploy.sh +455 -0
  140. package/dist/templates/countryconfig-template/assets/deployment/reindex.sh +168 -0
  141. package/dist/templates/countryconfig-template/assets/deployment/validate-required-variables-in-compose-files.ts +67 -0
  142. package/dist/templates/countryconfig-template/assets/elasticsearch/reindex.sh +168 -0
  143. package/dist/templates/countryconfig-template/assets/metabase/README.md +34 -0
  144. package/dist/templates/countryconfig-template/assets/metabase/environment-configuration.sql +36 -0
  145. package/dist/templates/countryconfig-template/assets/metabase/initialize-database.sh +46 -0
  146. package/dist/templates/countryconfig-template/assets/metabase/metabase.init.db.sql +27737 -0
  147. package/dist/templates/countryconfig-template/assets/metabase/open-shell.sh +21 -0
  148. package/dist/templates/countryconfig-template/assets/metabase/package.json +13 -0
  149. package/dist/templates/countryconfig-template/assets/metabase/run-dev.sh +108 -0
  150. package/dist/templates/countryconfig-template/assets/metabase/run.sh +120 -0
  151. package/dist/templates/countryconfig-template/assets/metabase/update-database.sh +40 -0
  152. package/dist/templates/countryconfig-template/assets/postgres/setup-analytics.sh +135 -0
  153. package/dist/templates/countryconfig-template/assets/postgres/setup-reference-data.sh +108 -0
  154. package/dist/templates/countryconfig-template/e2e/README.md +36 -0
  155. package/dist/templates/countryconfig-template/e2e/constants.ts +28 -0
  156. package/dist/templates/countryconfig-template/e2e/login.e2e.ts +59 -0
  157. package/dist/templates/countryconfig-template/package.json +153 -0
  158. package/dist/templates/countryconfig-template/playwright.config.ts +42 -0
  159. package/dist/templates/countryconfig-template/tilt/clear-all-data.ps1 +50 -0
  160. package/dist/templates/countryconfig-template/tilt/clear-all-data.sh +35 -0
  161. package/dist/templates/countryconfig-template/tilt/common.tilt +159 -0
  162. package/dist/templates/countryconfig-template/tilt/examples/dependencies/values.yaml +15 -0
  163. package/dist/templates/countryconfig-template/tilt/examples/opencrvs-services/values.yaml +56 -0
  164. package/dist/templates/countryconfig-template/tilt/examples/traefik/values-minikube.yaml +21 -0
  165. package/dist/templates/countryconfig-template/tilt/examples/traefik/values.yaml +38 -0
  166. package/dist/templates/countryconfig-template/tilt/helm/dependencies/values.yaml +17 -0
  167. package/dist/templates/countryconfig-template/tilt/helm/opencrvs-services/values.yaml +16 -0
  168. package/dist/templates/countryconfig-template/tilt/lib.tilt +95 -0
  169. package/dist/templates/countryconfig-template/tilt/opencrvs.tilt +136 -0
  170. package/dist/templates/inventory/inventory.template.yml +1 -3
  171. package/dist/translations/template.d.ts +11 -0
  172. package/dist/translations/template.d.ts.map +1 -0
  173. package/dist/translations/template.js +100 -0
  174. package/dist/verify/endpoints.d.ts +2 -0
  175. package/dist/verify/endpoints.d.ts.map +1 -0
  176. package/dist/verify/endpoints.js +510 -0
  177. package/opencrvs-toolkit-2.1.0-rc.d235243.tgz +0 -0
  178. package/package.json +13 -7
  179. package/tsconfig.build.json +11 -0
  180. package/tsconfig.build.tsbuildinfo +1 -0
  181. package/tsconfig.json +3 -0
  182. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts +0 -3
  183. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts.map +0 -1
  184. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.js +0 -429
  185. package/dist/migrations/v2.0/add-resend-invite-notification.d.ts +0 -3
  186. package/dist/migrations/v2.0/add-resend-invite-notification.d.ts.map +0 -1
  187. package/dist/migrations/v2.0/add-resend-invite-notification.js +0 -373
  188. package/dist/migrations/v2.0/checkout-upstream-files.d.ts +0 -22
  189. package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +0 -1
  190. package/dist/migrations/v2.0/checkout-upstream-files.js +0 -146
  191. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts +0 -2
  192. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts.map +0 -1
  193. package/dist/migrations/v2.0/convert-config-files-to-ts.js +0 -838
  194. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts +0 -3
  195. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts.map +0 -1
  196. package/dist/migrations/v2.0/convert-paragraph-to-heading.js +0 -158
  197. package/dist/migrations/v2.0/create-events-index.d.ts.map +0 -1
  198. package/dist/migrations/v2.0/create-events-index.js +0 -325
  199. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts +0 -11
  200. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts.map +0 -1
  201. package/dist/migrations/v2.0/delete-infrastructure-directory.js +0 -123
  202. package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts +0 -3
  203. package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts.map +0 -1
  204. package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.js +0 -110
  205. package/dist/migrations/v2.0/index.d.ts +0 -13
  206. package/dist/migrations/v2.0/index.d.ts.map +0 -1
  207. package/dist/migrations/v2.0/index.js +0 -103
  208. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts +0 -3
  209. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts.map +0 -1
  210. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.js +0 -432
  211. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts +0 -13
  212. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts.map +0 -1
  213. package/dist/migrations/v2.0/merge-infrastructure-directory.js +0 -222
  214. package/dist/migrations/v2.0/migrate-application-config-url.d.ts +0 -3
  215. package/dist/migrations/v2.0/migrate-application-config-url.d.ts.map +0 -1
  216. package/dist/migrations/v2.0/migrate-application-config-url.js +0 -343
  217. package/dist/migrations/v2.0/migrate-scopes.d.ts.map +0 -1
  218. package/dist/migrations/v2.0/migrate-scopes.js +0 -305
  219. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts +0 -3
  220. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts.map +0 -1
  221. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.js +0 -267
  222. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts +0 -3
  223. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts.map +0 -1
  224. package/dist/migrations/v2.0/migrate-workqueue-configs.js +0 -317
  225. package/dist/migrations/v2.0/remove-delete-actions.d.ts +0 -3
  226. package/dist/migrations/v2.0/remove-delete-actions.d.ts.map +0 -1
  227. package/dist/migrations/v2.0/remove-delete-actions.js +0 -156
  228. package/dist/migrations/v2.0/remove-demo-scope.d.ts +0 -3
  229. package/dist/migrations/v2.0/remove-demo-scope.d.ts.map +0 -1
  230. package/dist/migrations/v2.0/remove-demo-scope.js +0 -74
  231. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts +0 -3
  232. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts.map +0 -1
  233. package/dist/migrations/v2.0/remove-deprecated-imports.js +0 -96
  234. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts +0 -3
  235. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts.map +0 -1
  236. package/dist/migrations/v2.0/remove-fhir-url-helpers.js +0 -163
  237. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts +0 -3
  238. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts.map +0 -1
  239. package/dist/migrations/v2.0/remove-hearth-migrations.js +0 -87
  240. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts +0 -3
  241. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts.map +0 -1
  242. package/dist/migrations/v2.0/remove-old-statistics-service.js +0 -356
  243. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts +0 -3
  244. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts.map +0 -1
  245. package/dist/migrations/v2.0/remove-pending-certification-flag.js +0 -109
  246. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts +0 -3
  247. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts.map +0 -1
  248. package/dist/migrations/v2.0/remove-review-from-register-action.js +0 -163
  249. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts +0 -3
  250. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts.map +0 -1
  251. package/dist/migrations/v2.0/remove-unused-environment-variables.js +0 -186
  252. package/dist/migrations/v2.0/rename-api-paths.d.ts.map +0 -1
  253. package/dist/migrations/v2.0/rename-location-parent-id.d.ts +0 -3
  254. package/dist/migrations/v2.0/rename-location-parent-id.d.ts.map +0 -1
  255. package/dist/migrations/v2.0/rename-location-parent-id.js +0 -180
  256. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts +0 -3
  257. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts.map +0 -1
  258. package/dist/migrations/v2.0/simplify-analytics-precalculations.js +0 -195
  259. package/dist/migrations/v2.0/update-package-json.d.ts +0 -3
  260. package/dist/migrations/v2.0/update-package-json.d.ts.map +0 -1
  261. package/dist/migrations/v2.0/update-package-json.js +0 -105
  262. package/dist/templates/inventory/production.example.yml +0 -77
  263. package/dist/templates/inventory/qa.example.yml +0 -48
  264. package/opencrvs-toolkit-2.1.0-rc.d13869e.tgz +0 -0
  265. package/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1,161 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.main = main;
23
+ /**
24
+ * Codemod: Stop the Metabase startup scripts installing packages over the
25
+ * internet.
26
+ *
27
+ * `run.sh` used to `apk add gettext util-linux` on every start. Since chart
28
+ * v2.1.0 the dashboards Deployment renders NetworkPolicies and the chart
29
+ * default `network_policy.egress_mode: private` allows RFC1918 only, so the
30
+ * fetch to dl-cdn.alpinelinux.org is dropped, apk reports "Permission denied"
31
+ * and Metabase never starts. Both tools have in-image equivalents:
32
+ *
33
+ * - uuidgen (util-linux) -> /proc/sys/kernel/random/uuid, keeping uuidgen
34
+ * as the fallback for local macOS runs
35
+ * - envsubst (gettext) -> bash's own heredoc expansion
36
+ *
37
+ * This is the country-config side of core's #13778, which fixed the same
38
+ * scripts in `countryconfig-template` and `testland` — i.e. only for newly
39
+ * scaffolded country configs.
40
+ *
41
+ * What it does:
42
+ * Rewrites `run.sh` and `update-database.sh` under `infrastructure/metabase/`
43
+ * (and `assets/metabase/`, in case the directory has already been renamed)
44
+ * to match the fixed upstream versions.
45
+ *
46
+ * Caveats:
47
+ * - Anchored on the exact upstream v2.0 wording. A script that was edited
48
+ * locally is left alone with a warning rather than half-patched, and the
49
+ * dev applies core's #13778 by hand.
50
+ * - No-op when the files are absent (Swarm configs that dropped
51
+ * `infrastructure/`, or configs scaffolded from the fixed template).
52
+ */
53
+ const fs_1 = require("fs");
54
+ const path_1 = require("path");
55
+ const METABASE_DIRS = ['infrastructure/metabase', 'assets/metabase'];
56
+ // ─── run.sh ──────────────────────────────────────────────────────────────────
57
+ const APK_BLOCK = [
58
+ 'apk update',
59
+ 'apk upgrade',
60
+ 'apk add --no-cache gettext',
61
+ 'apk add --no-cache util-linux',
62
+ '',
63
+ ''
64
+ ].join('\n');
65
+ const SALT_LINE = 'export OPENCRVS_METABASE_ADMIN_PASSWORD_SALT=$(uuidgen)\n';
66
+ const FIXED_SALT_LINE = 'export OPENCRVS_METABASE_ADMIN_PASSWORD_SALT=' +
67
+ '$(cat /proc/sys/kernel/random/uuid 2>/dev/null || uuidgen)\n\n';
68
+ const FIXED_SALT_MARKER = '/proc/sys/kernel/random/uuid';
69
+ // ─── update-database.sh ──────────────────────────────────────────────────────
70
+ const ENVSUBST_GUARD = [
71
+ 'if ! which envsubst >/dev/null; then',
72
+ ' echo "envsubst could not be found. Please install envsubst before continuing."',
73
+ ' echo "MacOS: brew install gettext && brew link --force gettext"',
74
+ ' exit 1',
75
+ 'fi',
76
+ ''
77
+ ].join('\n');
78
+ const ENVSUBST_CALL = 'envsubst < $environment_configuration_sql_file > ' +
79
+ '$environment_configuration_sql_file.tmp\n';
80
+ const FIXED_EXPANSION = [
81
+ '',
82
+ "# Expand $VAR / ${VAR} using bash's own heredoc expansion instead of envsubst,",
83
+ '# because envsubst is not installed in the Metabase image',
84
+ 'eval "cat <<OPENCRVS_ENV_EOF',
85
+ '$(cat "$environment_configuration_sql_file")',
86
+ 'OPENCRVS_ENV_EOF" > "$environment_configuration_sql_file.tmp"',
87
+ ''
88
+ ].join('\n');
89
+ const FIXED_EXPANSION_MARKER = 'OPENCRVS_ENV_EOF';
90
+ /**
91
+ * Rewrites `run.sh` to read the salt from the kernel instead of installing
92
+ * util-linux for uuidgen.
93
+ *
94
+ * Returns the source unchanged when it is already fixed, and `undefined` when
95
+ * it does not match the upstream v2.0 wording — the caller warns and skips.
96
+ */
97
+ function patchRunScript(source) {
98
+ if (source.includes(FIXED_SALT_MARKER) && !source.includes(APK_BLOCK)) {
99
+ return source;
100
+ }
101
+ if (!source.includes(APK_BLOCK) || !source.includes(SALT_LINE)) {
102
+ return undefined;
103
+ }
104
+ return source.replace(APK_BLOCK, '').replace(SALT_LINE, FIXED_SALT_LINE);
105
+ }
106
+ /**
107
+ * Rewrites `update-database.sh` to expand the environment configuration with
108
+ * bash instead of installing gettext for envsubst.
109
+ *
110
+ * Returns the source unchanged when it is already fixed, and `undefined` when
111
+ * it does not match the upstream v2.0 wording — the caller warns and skips.
112
+ */
113
+ function patchUpdateDatabaseScript(source) {
114
+ if (source.includes(FIXED_EXPANSION_MARKER) &&
115
+ !source.includes(ENVSUBST_CALL)) {
116
+ return source;
117
+ }
118
+ if (!source.includes(ENVSUBST_GUARD) || !source.includes(ENVSUBST_CALL)) {
119
+ return undefined;
120
+ }
121
+ return source
122
+ .replace(ENVSUBST_GUARD, '')
123
+ .replace(ENVSUBST_CALL, FIXED_EXPANSION);
124
+ }
125
+ /**
126
+ * Applies `patch` to `relativePath`, writing it back only when the contents
127
+ * actually change. Warns and leaves the file alone when it has been edited
128
+ * locally, because a half-patched script still fails to start — silently.
129
+ */
130
+ function patchFile(relativePath, patch, removed) {
131
+ const filePath = (0, path_1.join)(process.cwd(), relativePath);
132
+ if (!(0, fs_1.existsSync)(filePath)) {
133
+ return;
134
+ }
135
+ const source = (0, fs_1.readFileSync)(filePath, 'utf8');
136
+ const patched = patch(source);
137
+ if (patched === undefined) {
138
+ // eslint-disable-next-line no-console
139
+ console.warn(` ⚠️ ${relativePath} does not match the upstream v2.0 version, so it ` +
140
+ `was left alone. Apply ` +
141
+ `https://github.com/opencrvs/opencrvs-core/pull/13778 by hand, or ` +
142
+ `Metabase will fail to start behind the chart's private egress policy.`);
143
+ return;
144
+ }
145
+ if (patched === source) {
146
+ return;
147
+ }
148
+ (0, fs_1.writeFileSync)(filePath, patched);
149
+ // eslint-disable-next-line no-console
150
+ console.log(` ✓ ${relativePath}: ${removed}`);
151
+ }
152
+ function main() {
153
+ return __awaiter(this, void 0, void 0, function* () {
154
+ // eslint-disable-next-line no-console
155
+ console.log('\nRemoving the Metabase package installs...\n');
156
+ for (const dir of METABASE_DIRS) {
157
+ patchFile((0, path_1.join)(dir, 'run.sh'), patchRunScript, 'apk add gettext util-linux');
158
+ patchFile((0, path_1.join)(dir, 'update-database.sh'), patchUpdateDatabaseScript, 'envsubst');
159
+ }
160
+ });
161
+ }
@@ -1,3 +1,3 @@
1
1
  declare function main(): Promise<void>;
2
2
  export { main };
3
- //# sourceMappingURL=migrate-scopes.d.ts.map
3
+ //# sourceMappingURL=remove-sentry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove-sentry.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.1/remove-sentry.ts"],"names":[],"mappings":"AAwaA,iBAAe,IAAI,kBAiClB;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
@@ -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=create-events-index.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"}