@opencrvs/toolkit 1.9.12-rc.f522379 → 1.9.12-rc.f5d99e1

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 (72) hide show
  1. package/dist/application-config/index.js +12 -20
  2. package/dist/cli.js +142 -1036
  3. package/dist/commons/api/router.d.ts +12 -0
  4. package/dist/commons/events/ActionInput.d.ts +36 -0
  5. package/dist/commons/events/Draft.d.ts +1 -0
  6. package/dist/events/index.js +13 -20
  7. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts.map +1 -1
  8. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.js +4 -3
  9. package/dist/migrations/v2.0/checkout-upstream-files.d.ts +0 -19
  10. package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -1
  11. package/dist/migrations/v2.0/checkout-upstream-files.js +13 -17
  12. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts.map +1 -1
  13. package/dist/migrations/v2.0/convert-config-files-to-ts.js +5 -4
  14. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts.map +1 -1
  15. package/dist/migrations/v2.0/convert-paragraph-to-heading.js +5 -4
  16. package/dist/migrations/v2.0/create-events-index.d.ts.map +1 -1
  17. package/dist/migrations/v2.0/create-events-index.js +2 -1
  18. package/dist/migrations/v2.0/index.d.ts +4 -8
  19. package/dist/migrations/v2.0/index.d.ts.map +1 -1
  20. package/dist/migrations/v2.0/index.js +139 -1004
  21. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts.map +1 -1
  22. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.js +6 -5
  23. package/dist/migrations/v2.0/migrate-scopes.d.ts.map +1 -1
  24. package/dist/migrations/v2.0/migrate-scopes.js +7 -6
  25. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts.map +1 -1
  26. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.js +4 -3
  27. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts.map +1 -1
  28. package/dist/migrations/v2.0/migrate-workqueue-configs.js +4 -3
  29. package/dist/migrations/v2.0/remove-delete-actions.d.ts.map +1 -1
  30. package/dist/migrations/v2.0/remove-delete-actions.js +4 -3
  31. package/dist/migrations/v2.0/remove-demo-scope.d.ts.map +1 -1
  32. package/dist/migrations/v2.0/remove-demo-scope.js +3 -2
  33. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts.map +1 -1
  34. package/dist/migrations/v2.0/remove-deprecated-imports.js +4 -3
  35. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts.map +1 -1
  36. package/dist/migrations/v2.0/remove-hearth-migrations.js +2 -1
  37. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts.map +1 -1
  38. package/dist/migrations/v2.0/remove-pending-certification-flag.js +4 -3
  39. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts.map +1 -1
  40. package/dist/migrations/v2.0/remove-review-from-register-action.js +4 -3
  41. package/dist/migrations/v2.0/rename-api-paths.d.ts.map +1 -1
  42. package/dist/migrations/v2.0/rename-api-paths.js +4 -3
  43. package/dist/migrations/v2.0/rename-location-parent-id.d.ts.map +1 -1
  44. package/dist/migrations/v2.0/rename-location-parent-id.js +4 -3
  45. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts.map +1 -1
  46. package/dist/migrations/v2.0/simplify-analytics-precalculations.js +2 -1
  47. package/dist/notification/index.js +13 -20
  48. package/opencrvs-toolkit-1.9.12-rc.f5d99e1.tgz +0 -0
  49. package/package.json +1 -1
  50. package/tsconfig.tsbuildinfo +1 -1
  51. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts +0 -3
  52. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts.map +0 -1
  53. package/dist/migrations/v2.0/delete-infrastructure-directory.js +0 -77
  54. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts +0 -3
  55. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts.map +0 -1
  56. package/dist/migrations/v2.0/merge-infrastructure-directory.js +0 -221
  57. package/dist/migrations/v2.0/migrate-application-config-url.d.ts +0 -3
  58. package/dist/migrations/v2.0/migrate-application-config-url.d.ts.map +0 -1
  59. package/dist/migrations/v2.0/migrate-application-config-url.js +0 -342
  60. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts +0 -3
  61. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts.map +0 -1
  62. package/dist/migrations/v2.0/remove-fhir-url-helpers.js +0 -163
  63. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts +0 -3
  64. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts.map +0 -1
  65. package/dist/migrations/v2.0/remove-old-statistics-service.js +0 -356
  66. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts +0 -3
  67. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts.map +0 -1
  68. package/dist/migrations/v2.0/remove-unused-environment-variables.js +0 -186
  69. package/dist/migrations/v2.0/update-package-json.d.ts +0 -3
  70. package/dist/migrations/v2.0/update-package-json.d.ts.map +0 -1
  71. package/dist/migrations/v2.0/update-package-json.js +0 -105
  72. package/opencrvs-toolkit-1.9.12-rc.f522379.tgz +0 -0
@@ -42,6 +42,7 @@ exports.main = main;
42
42
  */
43
43
  const ts_morph_1 = require("ts-morph");
44
44
  const path_1 = __importDefault(require("path"));
45
+ const _1 = require(".");
45
46
  const FIELD_TYPE_ENUM_NAME = 'FieldType';
46
47
  const PARAGRAPH_MEMBER_NAME = 'PARAGRAPH';
47
48
  const HEADING_MEMBER_NAME = 'HEADING';
@@ -111,18 +112,18 @@ function processFile(filePath, project) {
111
112
  const result = transformParagraphField(obj);
112
113
  if (result === 'converted-to-heading') {
113
114
  changedCount++;
114
- console.log(` [${path_1.default.relative(process.cwd(), filePath)}] Converted PARAGRAPH with heading fontVariant to HEADING`);
115
+ console.log(` [${path_1.default.relative((0, _1.getCwd)(), filePath)}] Converted PARAGRAPH with heading fontVariant to HEADING`);
115
116
  }
116
117
  else if (result === 'removed-font-variant') {
117
118
  changedCount++;
118
- console.log(` [${path_1.default.relative(process.cwd(), filePath)}] Removed non-heading fontVariant from PARAGRAPH`);
119
+ console.log(` [${path_1.default.relative((0, _1.getCwd)(), filePath)}] Removed non-heading fontVariant from PARAGRAPH`);
119
120
  }
120
121
  }
121
122
  return changedCount;
122
123
  }
123
124
  function main() {
124
125
  return __awaiter(this, void 0, void 0, function* () {
125
- const srcDir = path_1.default.join(process.cwd(), 'src');
126
+ const srcDir = path_1.default.join((0, _1.getCwd)(), 'src');
126
127
  console.log(`Scanning for FieldType.PARAGRAPH fields in: ${srcDir}\n`);
127
128
  const project = new ts_morph_1.Project({
128
129
  tsConfigFilePath: path_1.default.resolve(srcDir, '../tsconfig.json'),
@@ -151,7 +152,7 @@ function main() {
151
152
  for (const filePath of modifiedFiles) {
152
153
  const sourceFile = project.getSourceFileOrThrow(filePath);
153
154
  yield sourceFile.save();
154
- console.log(` Saved: ${path_1.default.relative(process.cwd(), filePath)}`);
155
+ console.log(` Saved: ${path_1.default.relative((0, _1.getCwd)(), filePath)}`);
155
156
  }
156
157
  console.log(`\nDone. Processed ${totalChanged} FieldType.PARAGRAPH field(s).`);
157
158
  });
@@ -1 +1 @@
1
- {"version":3,"file":"create-events-index.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.0/create-events-index.ts"],"names":[],"mappings":"AAmTA,iBAAe,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAmEnC;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
1
+ {"version":3,"file":"create-events-index.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.0/create-events-index.ts"],"names":[],"mappings":"AAqTA,iBAAe,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAmEnC;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
@@ -63,6 +63,7 @@ exports.main = main;
63
63
  const ts_morph_1 = require("ts-morph");
64
64
  const fs_1 = __importDefault(require("fs"));
65
65
  const path_1 = __importDefault(require("path"));
66
+ const _1 = require(".");
66
67
  const DEFINE_CONFIG_NAME = 'defineConfig';
67
68
  const HANDLER_FUNCTION_NAMES = new Set([
68
69
  'getCustomEventsHandler',
@@ -273,7 +274,7 @@ function modifyHandler(sourceFile, exportNames) {
273
274
  // ─── Entry point ─────────────────────────────────────────────────────────────
274
275
  function main() {
275
276
  return __awaiter(this, void 0, void 0, function* () {
276
- const cwd = process.cwd();
277
+ const cwd = (0, _1.getCwd)();
277
278
  const srcDir = path_1.default.join(cwd, 'src');
278
279
  console.log(`Scanning for defineConfig event exports in: ${srcDir}\n`);
279
280
  const project = new ts_morph_1.Project({
@@ -1,11 +1,7 @@
1
+ export declare function getCwd(): string;
1
2
  /**
2
- * Run the upgrade process for the country config in the current working
3
- * directory.
4
- *
5
- * @param dockerSwarm - When true, the local `infrastructure/` directory is
6
- * merged with upstream changes (Docker Swarm deployments still need it).
7
- * When false (the default), `infrastructure/` is deleted entirely, since
8
- * non-Swarm deployments no longer ship it.
3
+ * Run the upgrade process for a given country config directory.
4
+ * @param ccwd - The country config working directory.
9
5
  */
10
- export declare function runUpgrade(dockerSwarm: boolean): Promise<void>;
6
+ export declare function runUpgrade(ccwd: string | undefined): Promise<void>;
11
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.0/index.ts"],"names":[],"mappings":"AAoCA;;;;;;;;GAQG;AACH,wBAAsB,UAAU,CAAC,WAAW,EAAE,OAAO,iBA8BpD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.0/index.ts"],"names":[],"mappings":"AA+BA,wBAAgB,MAAM,WAMrB;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,iBA8BxD"}