@opencrvs/toolkit 1.9.12-rc.fdec004 → 1.9.12-rc.ff04697

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 (53) hide show
  1. package/dist/cli.js +246 -80
  2. package/dist/commons/api/router.d.ts +72 -67
  3. package/dist/events/index.js +1 -10
  4. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts.map +1 -1
  5. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.js +3 -4
  6. package/dist/migrations/v2.0/checkout-upstream-files.d.ts +19 -0
  7. package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -1
  8. package/dist/migrations/v2.0/checkout-upstream-files.js +17 -13
  9. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts.map +1 -1
  10. package/dist/migrations/v2.0/convert-config-files-to-ts.js +4 -5
  11. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts.map +1 -1
  12. package/dist/migrations/v2.0/convert-paragraph-to-heading.js +4 -5
  13. package/dist/migrations/v2.0/create-events-index.d.ts.map +1 -1
  14. package/dist/migrations/v2.0/create-events-index.js +1 -2
  15. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts +3 -0
  16. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts.map +1 -0
  17. package/dist/migrations/v2.0/delete-infrastructure-directory.js +77 -0
  18. package/dist/migrations/v2.0/index.d.ts +8 -4
  19. package/dist/migrations/v2.0/index.d.ts.map +1 -1
  20. package/dist/migrations/v2.0/index.js +214 -77
  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 +5 -6
  23. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts +3 -0
  24. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts.map +1 -0
  25. package/dist/migrations/v2.0/merge-infrastructure-directory.js +221 -0
  26. package/dist/migrations/v2.0/migrate-scopes.d.ts.map +1 -1
  27. package/dist/migrations/v2.0/migrate-scopes.js +6 -7
  28. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts.map +1 -1
  29. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.js +3 -4
  30. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts.map +1 -1
  31. package/dist/migrations/v2.0/migrate-workqueue-configs.js +3 -4
  32. package/dist/migrations/v2.0/remove-delete-actions.d.ts.map +1 -1
  33. package/dist/migrations/v2.0/remove-delete-actions.js +3 -4
  34. package/dist/migrations/v2.0/remove-demo-scope.d.ts.map +1 -1
  35. package/dist/migrations/v2.0/remove-demo-scope.js +2 -3
  36. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts.map +1 -1
  37. package/dist/migrations/v2.0/remove-deprecated-imports.js +3 -4
  38. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts.map +1 -1
  39. package/dist/migrations/v2.0/remove-hearth-migrations.js +1 -2
  40. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts.map +1 -1
  41. package/dist/migrations/v2.0/remove-pending-certification-flag.js +3 -4
  42. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts.map +1 -1
  43. package/dist/migrations/v2.0/remove-review-from-register-action.js +3 -4
  44. package/dist/migrations/v2.0/rename-api-paths.d.ts.map +1 -1
  45. package/dist/migrations/v2.0/rename-api-paths.js +3 -4
  46. package/dist/migrations/v2.0/rename-location-parent-id.d.ts.map +1 -1
  47. package/dist/migrations/v2.0/rename-location-parent-id.js +3 -4
  48. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts.map +1 -1
  49. package/dist/migrations/v2.0/simplify-analytics-precalculations.js +1 -2
  50. package/opencrvs-toolkit-1.9.12-rc.ff04697.tgz +0 -0
  51. package/package.json +1 -1
  52. package/tsconfig.tsbuildinfo +1 -1
  53. package/opencrvs-toolkit-1.9.12-rc.fdec004.tgz +0 -0
@@ -43,7 +43,6 @@ exports.main = main;
43
43
  */
44
44
  const ts_morph_1 = require("ts-morph");
45
45
  const path_1 = __importDefault(require("path"));
46
- const _1 = require(".");
47
46
  // ─── Path rename table ────────────────────────────────────────────────────────
48
47
  // Add new renames here as further API paths are changed between versions.
49
48
  const PATH_RENAMES = {
@@ -130,7 +129,7 @@ function processFile(filePath, project) {
130
129
  if (!sourceFile)
131
130
  return 0;
132
131
  let renamedCount = 0;
133
- const relPath = path_1.default.relative((0, _1.getCwd)(), filePath);
132
+ const relPath = path_1.default.relative(process.cwd(), filePath);
134
133
  // Collect candidates first to avoid iterating a mutating tree
135
134
  const candidates = sourceFile.getDescendantsOfKind(ts_morph_1.SyntaxKind.ObjectLiteralExpression);
136
135
  for (const obj of candidates) {
@@ -147,7 +146,7 @@ function processFile(filePath, project) {
147
146
  // ─── Entry point ─────────────────────────────────────────────────────────────
148
147
  function main() {
149
148
  return __awaiter(this, void 0, void 0, function* () {
150
- const srcDir = path_1.default.join((0, _1.getCwd)(), 'src');
149
+ const srcDir = path_1.default.join(process.cwd(), 'src');
151
150
  console.log(`Scanning for Hapi route configs in: ${srcDir}\n`);
152
151
  console.log('Active path renames:');
153
152
  for (const [from, to] of Object.entries(PATH_RENAMES)) {
@@ -181,7 +180,7 @@ function main() {
181
180
  for (const filePath of modifiedFiles) {
182
181
  const sourceFile = project.getSourceFileOrThrow(filePath);
183
182
  yield sourceFile.save();
184
- console.log(` Saved: ${path_1.default.relative((0, _1.getCwd)(), filePath)}`);
183
+ console.log(` Saved: ${path_1.default.relative(process.cwd(), filePath)}`);
185
184
  }
186
185
  console.log(`\nDone. Renamed ${totalRenamed} route path(s).`);
187
186
  });
@@ -1 +1 @@
1
- {"version":3,"file":"rename-location-parent-id.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.0/rename-location-parent-id.ts"],"names":[],"mappings":"AAqJA,iBAAe,IAAI,kBAiDlB;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
1
+ {"version":3,"file":"rename-location-parent-id.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.0/rename-location-parent-id.ts"],"names":[],"mappings":"AAmJA,iBAAe,IAAI,kBAiDlB;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
@@ -45,7 +45,6 @@ exports.main = main;
45
45
  */
46
46
  const ts_morph_1 = require("ts-morph");
47
47
  const path_1 = __importDefault(require("path"));
48
- const _1 = require(".");
49
48
  const OLD_PROPERTY_NAME = 'parentId';
50
49
  const NEW_PROPERTY_NAME = 'administrativeAreaId';
51
50
  const LOCATION_TYPE_NAME = 'Location';
@@ -138,14 +137,14 @@ function processFile(filePath, project) {
138
137
  // surrounding whitespace and optional-chain tokens (?.)
139
138
  propAccess.getNameNode().replaceWithText(NEW_PROPERTY_NAME);
140
139
  renamedCount++;
141
- console.log(` [${path_1.default.relative((0, _1.getCwd)(), filePath)}] Renamed Location.${OLD_PROPERTY_NAME} → Location.${NEW_PROPERTY_NAME}`);
140
+ console.log(` [${path_1.default.relative(process.cwd(), filePath)}] Renamed Location.${OLD_PROPERTY_NAME} → Location.${NEW_PROPERTY_NAME}`);
142
141
  }
143
142
  return renamedCount;
144
143
  }
145
144
  // ─── Entry point ─────────────────────────────────────────────────────────────
146
145
  function main() {
147
146
  return __awaiter(this, void 0, void 0, function* () {
148
- const srcDir = path_1.default.join((0, _1.getCwd)(), 'src');
147
+ const srcDir = path_1.default.join(process.cwd(), 'src');
149
148
  console.log(`Scanning for Location.${OLD_PROPERTY_NAME} references in: ${srcDir}\n`);
150
149
  const project = new ts_morph_1.Project({
151
150
  tsConfigFilePath: path_1.default.resolve(srcDir, '../tsconfig.json'),
@@ -174,7 +173,7 @@ function main() {
174
173
  for (const filePath of modifiedFiles) {
175
174
  const sourceFile = project.getSourceFileOrThrow(filePath);
176
175
  yield sourceFile.save();
177
- console.log(` Saved: ${path_1.default.relative((0, _1.getCwd)(), filePath)}`);
176
+ console.log(` Saved: ${path_1.default.relative(process.cwd(), filePath)}`);
178
177
  }
179
178
  console.log(`\nDone. Renamed ${totalRenamed} Location.${OLD_PROPERTY_NAME} reference(s) to Location.${NEW_PROPERTY_NAME}.`);
180
179
  });
@@ -1 +1 @@
1
- {"version":3,"file":"simplify-analytics-precalculations.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.0/simplify-analytics-precalculations.ts"],"names":[],"mappings":"AAuLA,iBAAe,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAyCnC;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
1
+ {"version":3,"file":"simplify-analytics-precalculations.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.0/simplify-analytics-precalculations.ts"],"names":[],"mappings":"AAqLA,iBAAe,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAyCnC;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
@@ -51,7 +51,6 @@ exports.main = main;
51
51
  const ts_morph_1 = require("ts-morph");
52
52
  const fs_1 = __importDefault(require("fs"));
53
53
  const path_1 = __importDefault(require("path"));
54
- const _1 = require(".");
55
54
  const ANALYTICS_FILE_REL = 'src/analytics/analytics.ts';
56
55
  const FUNCTION_NAME = 'precalculateAdditionalAnalytics';
57
56
  const IMPORT_NAMES_TO_REMOVE = new Set(['Event', 'precalculateBirthEvent']);
@@ -164,7 +163,7 @@ function simplifyPrecalculateFunction(sourceFile) {
164
163
  // ─── Entry point ─────────────────────────────────────────────────────────────
165
164
  function main() {
166
165
  return __awaiter(this, void 0, void 0, function* () {
167
- const cwd = (0, _1.getCwd)();
166
+ const cwd = process.cwd();
168
167
  const absPath = path_1.default.join(cwd, ANALYTICS_FILE_REL);
169
168
  if (!fs_1.default.existsSync(absPath)) {
170
169
  console.log(`[${ANALYTICS_FILE_REL}] does not exist — nothing to clean up.`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencrvs/toolkit",
3
- "version": "1.9.12-rc.fdec004",
3
+ "version": "1.9.12-rc.ff04697",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "bin": {
@@ -1 +1 @@
1
- {"root":["./src/cli.ts","./src/api/index.ts","./src/application-config/index.ts","./src/conditionals/index.ts","./src/events/deduplication.ts","./src/events/index.ts","./src/migrations/v2.0/add-birth-certificate-issuance-flag.ts","./src/migrations/v2.0/checkout-upstream-files.ts","./src/migrations/v2.0/convert-config-files-to-ts.ts","./src/migrations/v2.0/convert-paragraph-to-heading.ts","./src/migrations/v2.0/create-events-index.ts","./src/migrations/v2.0/index.ts","./src/migrations/v2.0/make-built-in-validate-actions-custom.ts","./src/migrations/v2.0/migrate-scopes.ts","./src/migrations/v2.0/migrate-validated-workqueue-status-to-flag.ts","./src/migrations/v2.0/migrate-workqueue-configs.ts","./src/migrations/v2.0/remove-delete-actions.ts","./src/migrations/v2.0/remove-demo-scope.ts","./src/migrations/v2.0/remove-deprecated-imports.ts","./src/migrations/v2.0/remove-hearth-migrations.ts","./src/migrations/v2.0/remove-pending-certification-flag.ts","./src/migrations/v2.0/remove-review-from-register-action.ts","./src/migrations/v2.0/rename-api-paths.ts","./src/migrations/v2.0/rename-location-parent-id.ts","./src/migrations/v2.0/simplify-analytics-precalculations.ts","./src/notification/index.ts","./src/scopes/index.ts"],"version":"5.6.3"}
1
+ {"root":["./src/cli.ts","./src/api/index.ts","./src/application-config/index.ts","./src/conditionals/index.ts","./src/events/deduplication.ts","./src/events/index.ts","./src/migrations/v2.0/add-birth-certificate-issuance-flag.ts","./src/migrations/v2.0/checkout-upstream-files.ts","./src/migrations/v2.0/convert-config-files-to-ts.ts","./src/migrations/v2.0/convert-paragraph-to-heading.ts","./src/migrations/v2.0/create-events-index.ts","./src/migrations/v2.0/delete-infrastructure-directory.ts","./src/migrations/v2.0/index.ts","./src/migrations/v2.0/make-built-in-validate-actions-custom.ts","./src/migrations/v2.0/merge-infrastructure-directory.ts","./src/migrations/v2.0/migrate-scopes.ts","./src/migrations/v2.0/migrate-validated-workqueue-status-to-flag.ts","./src/migrations/v2.0/migrate-workqueue-configs.ts","./src/migrations/v2.0/remove-delete-actions.ts","./src/migrations/v2.0/remove-demo-scope.ts","./src/migrations/v2.0/remove-deprecated-imports.ts","./src/migrations/v2.0/remove-hearth-migrations.ts","./src/migrations/v2.0/remove-pending-certification-flag.ts","./src/migrations/v2.0/remove-review-from-register-action.ts","./src/migrations/v2.0/rename-api-paths.ts","./src/migrations/v2.0/rename-location-parent-id.ts","./src/migrations/v2.0/simplify-analytics-precalculations.ts","./src/notification/index.ts","./src/scopes/index.ts"],"version":"5.6.3"}