ddd-ts-kit 0.92.0 → 0.93.0

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 (110) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.fr.md +12 -7
  3. package/README.md +9 -5
  4. package/dist/acceptance/check-locked-files.d.ts +25 -0
  5. package/dist/acceptance/check-locked-files.d.ts.map +1 -0
  6. package/dist/acceptance/check-locked-files.js +84 -0
  7. package/dist/acceptance/check-locked-files.js.map +1 -0
  8. package/dist/acceptance/scenarios-in.d.ts +4 -0
  9. package/dist/acceptance/scenarios-in.d.ts.map +1 -1
  10. package/dist/acceptance/scenarios-in.js +2 -2
  11. package/dist/acceptance/scenarios-in.js.map +1 -1
  12. package/dist/commands/acceptance.d.ts.map +1 -1
  13. package/dist/commands/acceptance.js +14 -0
  14. package/dist/commands/acceptance.js.map +1 -1
  15. package/dist/commands/generate.js +2 -0
  16. package/dist/commands/generate.js.map +1 -1
  17. package/dist/commit/run-git.d.ts +5 -1
  18. package/dist/commit/run-git.d.ts.map +1 -1
  19. package/dist/commit/run-git.js +19 -2
  20. package/dist/commit/run-git.js.map +1 -1
  21. package/dist/controllers/finish-migration.js +4 -2
  22. package/dist/controllers/finish-migration.js.map +1 -1
  23. package/dist/docs/behaviour-page.d.ts.map +1 -1
  24. package/dist/docs/behaviour-page.js +9 -1
  25. package/dist/docs/behaviour-page.js.map +1 -1
  26. package/dist/generate/kind.d.ts +2 -0
  27. package/dist/generate/kind.d.ts.map +1 -1
  28. package/dist/generate/kinds/job/job-vars.d.ts +4 -1
  29. package/dist/generate/kinds/job/job-vars.d.ts.map +1 -1
  30. package/dist/generate/kinds/job/job-vars.js +11 -1
  31. package/dist/generate/kinds/job/job-vars.js.map +1 -1
  32. package/dist/generate/kinds/job-kind.js +20 -3
  33. package/dist/generate/kinds/job-kind.js.map +1 -1
  34. package/dist/generate/kinds/service-kind.d.ts.map +1 -1
  35. package/dist/generate/kinds/service-kind.js +30 -3
  36. package/dist/generate/kinds/service-kind.js.map +1 -1
  37. package/dist/init/files/inert-persistence-file.d.ts +5 -0
  38. package/dist/init/files/inert-persistence-file.d.ts.map +1 -0
  39. package/dist/init/files/inert-persistence-file.js +16 -0
  40. package/dist/init/files/inert-persistence-file.js.map +1 -0
  41. package/dist/init/files/platform-files.js +6 -1
  42. package/dist/init/files/platform-files.js.map +1 -1
  43. package/dist/init/manifest/versions.js +24 -24
  44. package/dist/measures/branch-commits.d.ts +4 -2
  45. package/dist/measures/branch-commits.d.ts.map +1 -1
  46. package/dist/measures/branch-commits.js +32 -8
  47. package/dist/measures/branch-commits.js.map +1 -1
  48. package/dist/measures/timeline-of.d.ts +3 -2
  49. package/dist/measures/timeline-of.d.ts.map +1 -1
  50. package/dist/measures/timeline-of.js +37 -8
  51. package/dist/measures/timeline-of.js.map +1 -1
  52. package/dist/platform-layout/platform-layout.d.ts +2 -0
  53. package/dist/platform-layout/platform-layout.d.ts.map +1 -1
  54. package/dist/platform-layout/platform-layout.js +2 -0
  55. package/dist/platform-layout/platform-layout.js.map +1 -1
  56. package/dist/presets/no-flags.d.ts.map +1 -1
  57. package/dist/presets/no-flags.js +1 -0
  58. package/dist/presets/no-flags.js.map +1 -1
  59. package/dist/progress/build-next-of.d.ts +9 -0
  60. package/dist/progress/build-next-of.d.ts.map +1 -0
  61. package/dist/progress/build-next-of.js +22 -0
  62. package/dist/progress/build-next-of.js.map +1 -0
  63. package/dist/progress/format-progress.d.ts.map +1 -1
  64. package/dist/progress/format-progress.js +3 -0
  65. package/dist/progress/format-progress.js.map +1 -1
  66. package/dist/progress/progress.d.ts +3 -1
  67. package/dist/progress/progress.d.ts.map +1 -1
  68. package/dist/progress/read-progress.d.ts.map +1 -1
  69. package/dist/progress/read-progress.js +7 -2
  70. package/dist/progress/read-progress.js.map +1 -1
  71. package/dist/version.d.ts +1 -1
  72. package/dist/version.js +1 -1
  73. package/package.json +4 -4
  74. package/templates/architecture/extractable.declared.spec.ts.tpl +2 -2
  75. package/templates/architecture/extractable.manual.spec.ts.tpl +2 -2
  76. package/templates/architecture/extractable.tsyringe.spec.ts.tpl +2 -2
  77. package/templates/architecture/hosting.declared.spec.ts.tpl +69 -0
  78. package/templates/architecture/hosting.manual.spec.ts.tpl +57 -0
  79. package/templates/architecture/hosting.tsyringe.spec.ts.tpl +69 -0
  80. package/templates/init/docker/env.example.tpl +8 -0
  81. package/templates/init/gitignore.tpl +3 -0
  82. package/templates/init/main.ts.tpl +27 -20
  83. package/templates/init/platform/audit/audit.module.tsyringe.ts.tpl +11 -3
  84. package/templates/init/platform/composition/compose-application.manual.ts.tpl +25 -4
  85. package/templates/init/platform/composition/compose-application.tsyringe.ts.tpl +47 -65
  86. package/templates/init/platform/composition/context-selection.tsyringe.ts.tpl +17 -0
  87. package/templates/init/platform/composition/lay-foundations.manual.ts.tpl +15 -0
  88. package/templates/init/platform/composition/platform-options.manual.ts.tpl +9 -0
  89. package/templates/init/platform/composition/routes-of.tsyringe.ts.tpl +51 -0
  90. package/templates/init/platform/config/app-config.ts.tpl +7 -0
  91. package/templates/init/platform/config/load-config.ts.tpl +25 -0
  92. package/templates/init/platform/files/files.module.tsyringe.ts.tpl +6 -2
  93. package/templates/init/platform/jobs/job-settings.ts.tpl +13 -3
  94. package/templates/init/platform/privacy/privacy.module.tsyringe.ts.tpl +9 -6
  95. package/templates/init/platform/redis/open-redis.ts.tpl +13 -8
  96. package/templates/job/job.declared.ts.tpl +1 -1
  97. package/templates/job/job.spec.buses.ts.tpl +3 -0
  98. package/templates/job/job.spec.tsyringe.ts.tpl +29 -1
  99. package/templates/job/wiring.manual.tpl +3 -0
  100. package/templates/job/wiring.tsyringe.tpl +1 -1
  101. package/templates/pipeline/biome.json.tpl +7 -0
  102. package/templates/pipeline/knip.json.tpl +1 -0
  103. package/templates/pipeline/package-scripts.json +1 -1
  104. package/templates/service/compose.tpl +1 -1
  105. package/templates/service/extracted-name.tpl +2 -0
  106. package/templates/service/extracted.declared.tpl +6 -0
  107. package/templates/service/extracted.manual.tpl +2 -0
  108. package/templates/service/extracted.tsyringe.tpl +6 -0
  109. package/templates/service/main.ts.tpl +5 -1
  110. package/templates/worker/main.ts.tpl +20 -13
@@ -39,6 +39,8 @@ export const PLATFORM_LAYOUT = [
39
39
  anchor: 'compose-application.ts',
40
40
  files: {
41
41
  'compose-application.ts': 'composition/compose-application.ts',
42
+ 'context-selection.ts': 'composition/context-selection.ts',
43
+ 'routes-of.ts': 'composition/routes-of.ts',
42
44
  'platform.module.ts': 'composition/platform.module.ts',
43
45
  'platform-test.module.ts': 'composition/platform-test.module.ts',
44
46
  'platform-error-mapper.ts': 'composition/platform-error-mapper.ts',
@@ -1 +1 @@
1
- {"version":3,"file":"platform-layout.js","sourceRoot":"","sources":["../../src/platform-layout/platform-layout.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B;QACE,MAAM,EAAE,2BAA2B;QACnC,KAAK,EAAE;YACL,8BAA8B,EAAE,6CAA6C;YAC7E,sBAAsB,EAAE,qCAAqC;YAC7D,0BAA0B,EAAE,yCAAyC;YACrE,uBAAuB,EAAE,sCAAsC;YAC/D,+BAA+B,EAAE,8CAA8C;YAC/E,yBAAyB,EAAE,wCAAwC;YACnE,wBAAwB,EAAE,uCAAuC;YACjE,kCAAkC,EAAE,iDAAiD;YACrF,0CAA0C,EAAE,yDAAyD;YACrG,uBAAuB,EAAE,qCAAqC;YAC9D,6BAA6B,EAAE,2CAA2C;YAC1E,2BAA2B,EAAE,yCAAyC;YACtE,yBAAyB,EAAE,uCAAuC;YAClE,qBAAqB,EAAE,mCAAmC;YAC1D,0BAA0B,EAAE,wCAAwC;YACpE,uBAAuB,EAAE,qCAAqC;YAC9D,cAAc,EAAE,4BAA4B;YAC5C,eAAe,EAAE,qBAAqB;YACtC,4BAA4B,EAAE,uCAAuC;YACrE,6BAA6B,EAAE,2CAA2C;YAC1E,yBAAyB,EAAE,uCAAuC;YAClE,4BAA4B,EAAE,0CAA0C;YACxE,0CAA0C,EAAE,wDAAwD;YACpG,8BAA8B,EAAE,4CAA4C;YAC5E,2BAA2B,EAAE,kCAAkC;YAC/D,yCAAyC,EAAE,gDAAgD;SAC5F;KACF;IACD;QACE,MAAM,EAAE,wBAAwB;QAChC,KAAK,EAAE;YACL,wBAAwB,EAAE,oCAAoC;YAC9D,oBAAoB,EAAE,gCAAgC;YACtD,yBAAyB,EAAE,qCAAqC;YAChE,0BAA0B,EAAE,sCAAsC;YAClE,oBAAoB,EAAE,gCAAgC;YACtD,aAAa,EAAE,yBAAyB;YACxC,oBAAoB,EAAE,gCAAgC;YACtD,YAAY,EAAE,0BAA0B;YACxC,WAAW,EAAE,yBAAyB;YACtC,iBAAiB,EAAE,sBAAsB;YACzC,oBAAoB,EAAE,yBAAyB;YAC/C,2BAA2B,EAAE,gCAAgC;SAC9D;KACF;IACD;QACE,MAAM,EAAE,uCAAuC;QAC/C,KAAK,EAAE;YACL,qCAAqC,EAAE,0DAA0D;YACjG,uCAAuC,EAAE,4DAA4D;YACrG,0CAA0C,EAAE,+DAA+D;YAC3G,qCAAqC,EAAE,0DAA0D;YACjG,yBAAyB,EAAE,8CAA8C;YACzE,mCAAmC,EAAE,wDAAwD;YAC7F,kCAAkC,EAAE,uDAAuD;YAC3F,2BAA2B,EAAE,gDAAgD;YAC7E,8BAA8B,EAAE,mDAAmD;SACpF;KACF;CACO,CAAC"}
1
+ {"version":3,"file":"platform-layout.js","sourceRoot":"","sources":["../../src/platform-layout/platform-layout.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B;QACE,MAAM,EAAE,2BAA2B;QACnC,KAAK,EAAE;YACL,8BAA8B,EAAE,6CAA6C;YAC7E,sBAAsB,EAAE,qCAAqC;YAC7D,0BAA0B,EAAE,yCAAyC;YACrE,uBAAuB,EAAE,sCAAsC;YAC/D,+BAA+B,EAAE,8CAA8C;YAC/E,y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DAA0D;YACjG,yBAAyB,EAAE,8CAA8C;YACzE,mCAAmC,EAAE,wDAAwD;YAC7F,kCAAkC,EAAE,uDAAuD;YAC3F,2BAA2B,EAAE,gDAAgD;YAC7E,8BAA8B,EAAE,mDAAmD;SACpF;KACF;CACO,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"no-flags.d.ts","sourceRoot":"","sources":["../../src/presets/no-flags.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,2FAA2F;AAC3F,eAAO,MAAM,QAAQ,EAAE,SAetB,CAAC"}
1
+ {"version":3,"file":"no-flags.d.ts","sourceRoot":"","sources":["../../src/presets/no-flags.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,2FAA2F;AAC3F,eAAO,MAAM,QAAQ,EAAE,SAgBtB,CAAC"}
@@ -11,6 +11,7 @@ export const NO_FLAGS = {
11
11
  tenantScoped: false,
12
12
  search: false,
13
13
  decorators: false,
14
+ global: false,
14
15
  mapper: false,
15
16
  serializer: false,
16
17
  eventSourced: false,
@@ -1 +1 @@
1
- {"version":3,"file":"no-flags.js","sourceRoot":"","sources":["../../src/presets/no-flags.ts"],"names":[],"mappings":"AAEA,2FAA2F;AAC3F,MAAM,CAAC,MAAM,QAAQ,GAAc;IACjC,QAAQ,EAAE,EAAE;IACZ,IAAI,EAAE,EAAE;IACR,KAAK,EAAE,EAAE;IACT,UAAU,EAAE,EAAE;IACd,OAAO,EAAE,KAAK;IACd,KAAK,EAAE,KAAK;IACZ,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,KAAK;IACnB,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,KAAK;IACjB,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,KAAK;IACjB,YAAY,EAAE,KAAK;CACpB,CAAC"}
1
+ {"version":3,"file":"no-flags.js","sourceRoot":"","sources":["../../src/presets/no-flags.ts"],"names":[],"mappings":"AAEA,2FAA2F;AAC3F,MAAM,CAAC,MAAM,QAAQ,GAAc;IACjC,QAAQ,EAAE,EAAE;IACZ,IAAI,EAAE,EAAE;IACR,KAAK,EAAE,EAAE;IACT,UAAU,EAAE,EAAE;IACd,OAAO,EAAE,KAAK;IACd,KAAK,EAAE,KAAK;IACZ,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,KAAK;IACnB,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,KAAK;IACjB,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,KAAK;IACjB,YAAY,EAAE,KAAK;CACpB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { StatusRow } from './progress.js';
2
+ /**
3
+ * The next step, derived from the rows of the slices table while the plan sits at step 7, the
4
+ * build: no skill of the build rewrites the `Next:` line of the plan after each row, so it says
5
+ * what was next on the day the plan was made. Undefined at any other step, without rows, or when
6
+ * the line of the plan is not at step 7: the line of the plan is then the answer.
7
+ */
8
+ export declare function buildNextOf(plan: string | null, rows: readonly StatusRow[]): string | undefined;
9
+ //# sourceMappingURL=build-next-of.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-next-of.d.ts","sourceRoot":"","sources":["../../src/progress/build-next-of.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAO5C;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,SAAS,SAAS,EAAE,GAAG,MAAM,GAAG,SAAS,CAc/F"}
@@ -0,0 +1,22 @@
1
+ const BUILD_STEP = /^7(\s|$)/;
2
+ /** What the build step says when the rows are all done. */
3
+ const BUILD_DONE = '7 build done: close step 7 in docs/architecture/plan.md (Next: done)';
4
+ /**
5
+ * The next step, derived from the rows of the slices table while the plan sits at step 7, the
6
+ * build: no skill of the build rewrites the `Next:` line of the plan after each row, so it says
7
+ * what was next on the day the plan was made. Undefined at any other step, without rows, or when
8
+ * the line of the plan is not at step 7: the line of the plan is then the answer.
9
+ */
10
+ export function buildNextOf(plan, rows) {
11
+ if (plan === null || !BUILD_STEP.test(plan) || rows.length === 0) {
12
+ return undefined;
13
+ }
14
+ if (rows.every((row) => row.status === 'done')) {
15
+ return BUILD_DONE;
16
+ }
17
+ const ready = rows.find((row) => row.status === 'todo' && row.ready === 'trunk');
18
+ return ready === undefined
19
+ ? '7 build - no row is ready on the trunk: the rows left are in progress or wait for a dependency'
20
+ : `7 use-case - build the next row ready on the trunk, #${ready.id} ${ready.slice} (${ready.context}) (skill \`ddd-ts-kit:use-case\`)`;
21
+ }
22
+ //# sourceMappingURL=build-next-of.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-next-of.js","sourceRoot":"","sources":["../../src/progress/build-next-of.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,GAAG,UAAU,CAAC;AAE9B,2DAA2D;AAC3D,MAAM,UAAU,GAAG,sEAAsE,CAAC;AAE1F;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,IAAmB,EAAE,IAA0B;IACzE,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACjE,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,KAAK,MAAM,CAAC,EAAE,CAAC;QAC/C,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,KAAK,MAAM,IAAI,GAAG,CAAC,KAAK,KAAK,OAAO,CAAC,CAAC;IAEjF,OAAO,KAAK,KAAK,SAAS;QACxB,CAAC,CAAC,gGAAgG;QAClG,CAAC,CAAC,wDAAwD,KAAK,CAAC,EAAE,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,OAAO,mCAAmC,CAAC;AAC3I,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"format-progress.d.ts","sourceRoot":"","sources":["../../src/progress/format-progress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAA4D,MAAM,YAAY,CAAC;AAQrG,8HAA8H;AAC9H,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAWzD"}
1
+ {"version":3,"file":"format-progress.d.ts","sourceRoot":"","sources":["../../src/progress/format-progress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAA4D,MAAM,YAAY,CAAC;AAQrG,8HAA8H;AAC9H,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAczD"}
@@ -5,6 +5,9 @@ const NO_PLAN = 'no docs/architecture/plan.md with a `Next:` line. The recommend
5
5
  export function formatProgress(progress) {
6
6
  return [
7
7
  `Next: ${progress.next ?? NO_PLAN}`,
8
+ ...(progress.planNext === null
9
+ ? []
10
+ : [` (the plan says: ${progress.planNext}; at step 7 the next step is read from the slices)`]),
8
11
  '',
9
12
  ...(progress.slices === null
10
13
  ? ['Slices: no docs/architecture/slices.md with a slices table (the skill ddd-ts-kit:plan-slices writes it)']
@@ -1 +1 @@
1
- {"version":3,"file":"format-progress.js","sourceRoot":"","sources":["../../src/progress/format-progress.ts"],"names":[],"mappings":"AAEA,MAAM,YAAY,GAAG,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAErD,8EAA8E;AAC9E,MAAM,OAAO,GACX,wOAAwO,CAAC;AAE3O,8HAA8H;AAC9H,MAAM,UAAU,cAAc,CAAC,QAAkB;IAC/C,OAAO;QACL,SAAS,QAAQ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AAED,2GAA2G;AAC3G,SAAS,SAAS,CAAC,GAAc;IAC/B,MAAM,OAAO,GAAG,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC;IACrC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAErD,QAAQ,GAAG,CAAC,KAAK,EAAE,CAAC;QAClB,KAAK,OAAO;YACV,OAAO,sBAAsB,CAAC;QAChC,KAAK,QAAQ;YACX,OAAO,6BAA6B,GAAG,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;QACzF,KAAK,SAAS;YACZ,OAAO,eAAe,GAAG,EAAE,CAAC;QAC9B;YACE,OAAO,EAAE,CAAC;IACd,CAAC;AACH,CAAC;AAED,SAAS,aAAa,CAAC,KAAqB;IAC1C,OAAO,KAAK,KAAK,CAAC,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,KAAK,CAAC,MAAM,kBAAkB,KAAK,CAAC,QAAQ,oBAAoB,KAAK,CAAC,IAAI,aAAa,KAAK,CAAC,MAAM,eAAe,CAAC;AACnM,CAAC;AAED,iGAAiG;AACjG,SAAS,WAAW,CAAC,EAAE,aAAa,EAAE,IAAI,EAAkB;IAC1D,OAAO,aAAa,CAAC,GAAG,CACtB,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CACjB,MAAM,EAAE,yBAAyB,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,6CAA6C,IAAI,EAAE,CACzG,CAAC;AACJ,CAAC"}
@@ -1,8 +1,10 @@
1
1
  import type { Slice } from './slice.js';
2
2
  /** Where the work stands: the next step of the plan, the slices, and what the generators left to fill. */
3
3
  export interface Progress {
4
- /** What follows `Next: ` in `docs/architecture/plan.md`; null when the project has no plan or the plan has no such line. */
4
+ /** What follows `Next: ` in `docs/architecture/plan.md`, or at step 7 (the build) what the rows of the slices say; null when the project has no plan or the plan has no such line. */
5
5
  readonly next: string | null;
6
+ /** The `Next:` line of the plan when `next` was derived from the slices and differs from it; else null. */
7
+ readonly planNext: string | null;
6
8
  /** Null when the project has no `docs/architecture/slices.md`, or the file has no slices table. */
7
9
  readonly slices: SlicesProgress | null;
8
10
  /** One entry per context, then one with an empty context for the rest of the project when something is left there. */
@@ -1 +1 @@
1
- {"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/progress/progress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,0GAA0G;AAC1G,MAAM,WAAW,QAAQ;IACvB,4HAA4H;IAC5H,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,mGAAmG;IACnG,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;IACvC,sHAAsH;IACtH,QAAQ,CAAC,SAAS,EAAE,SAAS,cAAc,EAAE,CAAC;CAC/C;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,SAAS,SAAS,EAAE,CAAC;IACpC,sCAAsC;IACtC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CAAC;IAC/D,oDAAoD;IACpD,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACxF,uGAAuG;IACvG,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,yGAAyG;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AAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,gGAAgG;AAChG,MAAM,WAAW,SAAU,SAAQ,KAAK;IACtC;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;IAChD,kFAAkF;IAClF,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,8BAA8B;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,gCAAgC;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,yBAAyB;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,mEAAmE;IACnE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"read-progress.d.ts","sourceRoot":"","sources":["../../src/progress/read-progress.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAIxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAkC,MAAM,YAAY,CAAC;AAS3E,oGAAoG;AACpG,MAAM,WAAW,aAAa;IAC5B,kHAAkH;IAClH,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACzC,8GAA8G;IAC9G,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9C;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,QAAQ,CAU5F"}
1
+ {"version":3,"file":"read-progress.d.ts","sourceRoot":"","sources":["../../src/progress/read-progress.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAIxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAkC,MAAM,YAAY,CAAC;AAU3E,oGAAoG;AACpG,MAAM,WAAW,aAAa;IAC5B,kHAAkH;IAClH,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACzC,8GAA8G;IAC9G,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9C;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,QAAQ,CAe5F"}
@@ -2,6 +2,7 @@ import { runGit } from '../commit/run-git.js';
2
2
  import { attributeMarkers } from '../story/attribute-markers.js';
3
3
  import { projectContexts } from '../story/project-contexts.js';
4
4
  import { unclosedStories } from '../story/unclosed-stories.js';
5
+ import { buildNextOf } from './build-next-of.js';
5
6
  import { readRemaining } from './read-remaining.js';
6
7
  import { readSlices, SLICES_FILE } from './read-slices.js';
7
8
  import { statusRowOf } from './status-row-of.js';
@@ -14,9 +15,13 @@ export function readProgress(ws, config, workers) {
14
15
  const slices = readSlices(ws);
15
16
  const remaining = readRemaining(ws, config);
16
17
  const around = { root: ws.root, ...workers, remaining, contexts: projectContexts(ws, config) };
18
+ const planned = /^Next:[ \t]*(\S.*?)\s*$/m.exec(ws.read(PLAN_FILE) ?? '')?.[1] ?? null;
19
+ const progress = slices === undefined ? null : slicesProgress(slices, around);
20
+ const derived = buildNextOf(planned, progress?.rows ?? []);
17
21
  return {
18
- next: /^Next:[ \t]*(\S.*?)\s*$/m.exec(ws.read(PLAN_FILE) ?? '')?.[1] ?? null,
19
- slices: slices === undefined ? null : slicesProgress(slices, around),
22
+ next: derived ?? planned,
23
+ planNext: derived === undefined || derived === planned ? null : planned,
24
+ slices: progress,
20
25
  remaining: countsOf(remaining, Object.keys(config.contexts)),
21
26
  };
22
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"read-progress.js","sourceRoot":"","sources":["../../src/progress/read-progress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAG5D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGxD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,SAAS,GAAG,2BAA2B,CAAC;AAU9C;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,EAAa,EAAE,MAAc,EAAE,OAAsB;IAChF,MAAM,MAAM,GAAG,UAAU,CAAC,EAAE,CAAC,CAAC;IAC9B,MAAM,SAAS,GAAG,aAAa,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IAC5C,MAAM,MAAM,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,eAAe,CAAC,EAAE,EAAE,MAAM,CAAC,EAAE,CAAC;IAE/F,OAAO;QACL,IAAI,EAAE,0BAA0B,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI;QAC5E,MAAM,EAAE,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC;QACpE,SAAS,EAAE,QAA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C,OAAO,EAAE,UAAU,CAAC;QACpC,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC;QAC5B,MAAM,EAAE,KAAK,CAAC,OAAO,EAAE,QAAQ,CAAC;KACjC,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;IAE9B,MAAM,OAAO,GAAG,CAAC,MAAsB,EAAW,EAAE,CAClD,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC;IAEtE,OAAO,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAC7E,CAAC"}
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.92.0";
1
+ export declare const VERSION = "0.93.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.92.0';
1
+ export const VERSION = '0.93.0';
2
2
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ddd-ts-kit",
3
- "version": "0.92.0",
3
+ "version": "0.93.0",
4
4
  "description": "Bootstrap, scaffold and verify Domain-Driven Design (DDD), Clean Architecture and hexagonal TypeScript backends on Node.js: project and code generators, architecture checks, OpenAPI and AsyncAPI documents, for developers and AI coding agents (Claude Code, Codex, GitHub Copilot).",
5
5
  "keywords": [
6
6
  "ddd",
@@ -52,9 +52,9 @@
52
52
  "clean:packages": "node dist/bin.js check --clean-only ../kernel/src ../validation/src ../http/src ../tracing/src ../di/src ../events/src ../testing/src ../s3/src ../drizzle/src ../knex/src ../prisma/src ../typeorm/src ../aspects/src ../rabbitmq/src ../auth/src ../audit/src ../redis/src ../scheduling/src ../pino/src ../winston/src ../sentry/src ../kafka/src ../nats/src ../eslint-plugin/src"
53
53
  },
54
54
  "devDependencies": {
55
- "@ddd-ts-kit/audit": "^0.92.0",
56
- "@ddd-ts-kit/events": "^0.92.0",
57
- "@ddd-ts-kit/kernel": "^0.92.0",
55
+ "@ddd-ts-kit/audit": "^0.93.0",
56
+ "@ddd-ts-kit/events": "^0.93.0",
57
+ "@ddd-ts-kit/kernel": "^0.93.0",
58
58
  "@types/pg": "^8.23.1",
59
59
  "pg": "^8.23.1"
60
60
  }
@@ -21,9 +21,9 @@ describe('A bounded context is a deployable unit in waiting', () => {
21
21
  ).not.toThrow();
22
22
  });
23
23
 
24
- // Jest refuses a table without rows: until the first context joins the project, its cases wait.
24
+ // Jest refuses a table without rows: until the first context joins the project, its cases wait, as a passing case that says so (a pending entry would stay in the list of what is left for ever).
25
25
  if (contexts.length === 0) {
26
- it.todo('wires each context alone, with its scheduled jobs, once the project has one');
26
+ it('has no context to wire alone yet', () => expect(contexts).toHaveLength(0));
27
27
  } else {
28
28
  it.each(contexts)(
29
29
  '%s wires alone from its declarations, on the kernel and the platform, with no other context',
@@ -16,9 +16,9 @@ describe('A bounded context is a deployable unit in waiting', () => {
16
16
  expect(() => createPlatform(inertPersistence(), { events: inProcessEvents() })).not.toThrow();
17
17
  });
18
18
 
19
- // Jest refuses a table without rows: until the first context joins the project, its cases wait.
19
+ // Jest refuses a table without rows: until the first context joins the project, its cases wait, as a passing case that says so (a pending entry would stay in the list of what is left for ever).
20
20
  if (contexts.length === 0) {
21
- it.todo('wires each context alone, with its scheduled jobs, once the project has one');
21
+ it('has no context to wire alone yet', () => expect(contexts).toHaveLength(0));
22
22
  } else {
23
23
  it.each(contexts)('%s wires alone, on the platform, with no other context', (name, module) => {
24
24
  const platform = createPlatform(inertPersistence(), { events: inProcessEvents() });
@@ -21,9 +21,9 @@ describe('A bounded context is a deployable unit in waiting', () => {
21
21
  ).not.toThrow();
22
22
  });
23
23
 
24
- // Jest refuses a table without rows: until the first context joins the project, its cases wait.
24
+ // Jest refuses a table without rows: until the first context joins the project, its cases wait, as a passing case that says so (a pending entry would stay in the list of what is left for ever).
25
25
  if (contexts.length === 0) {
26
- it.todo('wires each context alone, with its scheduled jobs, once the project has one');
26
+ it('has no context to wire alone yet', () => expect(contexts).toHaveLength(0));
27
27
  } else {
28
28
  it.each(contexts)('%s wires alone, on the kernel and the platform, with no other context', (_name, module) => {
29
29
  expect(() =>
@@ -0,0 +1,69 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import { describe, expect, it } from '{{tests.module}}';
3
+ import type { WiringDescription } from '@ddd-ts-kit/di';
4
+ {{#if http.any}}
5
+ import { offlineAuthenticator } from '{{alias.platform}}/auth/authentication/offline-authenticator{{alias.ext}}';
6
+ {{/if}}
7
+ import { composeApplication, everyContext, hostedContexts } from '{{alias.platform}}/composition/compose-application{{alias.ext}}';
8
+ import { inertPersistence } from '{{alias.platform}}/database/inert-persistence{{alias.ext}}';
9
+ import { inProcessEvents } from '{{alias.platform}}/events/in-process-events{{alias.ext}}';
10
+
11
+ /** The contexts run as services of their own: `ddd-ts-kit generate service` adds one. */
12
+ const extracted: readonly string[] = [
13
+ // ddd-ts-kit:extracted
14
+ // /ddd-ts-kit:extracted
15
+ ];
16
+
17
+ const options = {
18
+ events: inProcessEvents(),
19
+ {{#if http.any}}
20
+ authenticator: offlineAuthenticator,
21
+ {{/if}}
22
+ };
23
+
24
+ describe('A context run as a service leaves the whole application', () => {
25
+ // Jest refuses a table without rows: until a context becomes a service, its cases wait.
26
+ if (extracted.length === 0) {
27
+ it.todo('hosts no consumer, process nor job of a context run as a service, once the project has one');
28
+ } else {
29
+ it.each(extracted)('%s: the whole application hosts none of its modules, consumers, processes nor jobs', (name) => {
30
+ const whole = composeApplication(inertPersistence(), options, hostedContexts).container.describe();
31
+
32
+ expect(whole.modules).not.toContain(name);
33
+ expect(registrationsOf(whole, name)).toEqual([]);
34
+ });
35
+
36
+ it.each(extracted)('%s: its service hosts it, each consumer once, and no job of the platform', (name) => {
37
+ const service = composeApplication(
38
+ inertPersistence(),
39
+ { ...options, platformJobs: false },
40
+ { modules: everyContext.modules.filter((module) => module.name === name) },
41
+ ).container.describe();
42
+
43
+ const consumers = service.integrationEventHandlers.map((handler) => `${handler.consumer}:${handler.event}`);
44
+
45
+ expect(service.modules).toContain(name);
46
+ expect(new Set(consumers).size).toBe(consumers.length);
47
+ expect(service.jobs.filter((job) => !job.name.startsWith(name + '.'))).toEqual([]);
48
+ });
49
+
50
+ it.each(extracted)('%s: its entry point leaves the jobs of the platform to the whole application', (name) => {
51
+ expect(readFileSync('{{config.sourceRoot}}/apps/' + name + '/main.ts', 'utf8')).toContain('platformJobs: false');
52
+ });
53
+ }
54
+ });
55
+
56
+ /** What a module registers to be driven by something other than a request: the reactions, the jobs, the projections. */
57
+ function registrationsOf(description: WiringDescription, name: string): readonly string[] {
58
+ return [
59
+ ...description.integrationEventHandlers,
60
+ ...description.domainEventHandlers,
61
+ ...description.projections,
62
+ ...description.jobs,
63
+ ...description.backgroundJobs,
64
+ ...description.commands,
65
+ ...description.queries,
66
+ ]
67
+ .filter(({ module }) => module === name)
68
+ .map((registration) => JSON.stringify(registration));
69
+ }
@@ -0,0 +1,57 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import { describe, expect, it } from '{{tests.module}}';
3
+ {{#if http.any}}
4
+ import { offlineAuthenticator } from '{{alias.platform}}/auth/authentication/offline-authenticator{{alias.ext}}';
5
+ {{/if}}
6
+ import { composeApplication, everyContext, hostedContexts } from '{{alias.platform}}/composition/compose-application{{alias.ext}}';
7
+ import { inertPersistence } from '{{alias.platform}}/database/inert-persistence{{alias.ext}}';
8
+ import { inProcessEvents } from '{{alias.platform}}/events/in-process-events{{alias.ext}}';
9
+
10
+ /** The contexts run as services of their own: `ddd-ts-kit generate service` adds one. */
11
+ const extracted: readonly string[] = [
12
+ // ddd-ts-kit:extracted
13
+ // /ddd-ts-kit:extracted
14
+ ];
15
+
16
+ type ContextModule = (typeof everyContext)[number];
17
+
18
+ /** The modules `hostedContexts` leaves out. */
19
+ const services = everyContext.filter((module) => !hostedContexts.includes(module));
20
+
21
+ /** The jobs of the platform are named after its capabilities, and run in the whole application only. */
22
+ const PLATFORM = ['audit', 'privacy', 'files'];
23
+
24
+ const options = {
25
+ events: inProcessEvents(),
26
+ {{#if http.any}}
27
+ authenticator: offlineAuthenticator,
28
+ {{/if}}
29
+ };
30
+
31
+ describe('A context run as a service leaves the whole application', () => {
32
+ // Jest refuses a table without rows: until a context becomes a service, its cases wait.
33
+ if (extracted.length === 0) {
34
+ it.todo('hosts no job of a context run as a service, once the project has one');
35
+ } else {
36
+ it.each(extracted)('%s: the whole application schedules none of its jobs', (name) => {
37
+ const whole = composeApplication(inertPersistence(), options, hostedContexts).platform.jobs.describe();
38
+
39
+ expect(whole.filter((job) => job.name.startsWith(name + '.'))).toEqual([]);
40
+ });
41
+
42
+ it.each(services.map((module, index): [number, ContextModule] => [index + 1, module]))(
43
+ 'extracted context %s: its service schedules the jobs of one context, and none of the platform',
44
+ (_position, module) => {
45
+ const application = composeApplication(inertPersistence(), { ...options, platformJobs: false }, [module]);
46
+ const owners = application.platform.jobs.describe().map((job) => job.name.split('.')[0]);
47
+
48
+ expect(new Set(owners).size).toBeLessThanOrEqual(1);
49
+ expect(owners.filter((owner) => PLATFORM.includes(owner ?? ''))).toEqual([]);
50
+ },
51
+ );
52
+
53
+ it.each(extracted)('%s: its entry point leaves the jobs of the platform to the whole application', (name) => {
54
+ expect(readFileSync('{{config.sourceRoot}}/apps/' + name + '/main.ts', 'utf8')).toContain('platformJobs: false');
55
+ });
56
+ }
57
+ });
@@ -0,0 +1,69 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import { describe, expect, it } from '{{tests.module}}';
3
+ import type { WiringDescription } from '@ddd-ts-kit/di';
4
+ {{#if http.any}}
5
+ import { offlineAuthenticator } from '{{alias.platform}}/auth/authentication/offline-authenticator{{alias.ext}}';
6
+ {{/if}}
7
+ import { composeApplication, everyContext, hostedContexts } from '{{alias.platform}}/composition/compose-application{{alias.ext}}';
8
+ import { inertPersistence } from '{{alias.platform}}/database/inert-persistence{{alias.ext}}';
9
+ import { inProcessEvents } from '{{alias.platform}}/events/in-process-events{{alias.ext}}';
10
+
11
+ /** The contexts run as services of their own: `ddd-ts-kit generate service` adds one. */
12
+ const extracted: readonly string[] = [
13
+ // ddd-ts-kit:extracted
14
+ // /ddd-ts-kit:extracted
15
+ ];
16
+
17
+ const options = {
18
+ events: inProcessEvents(),
19
+ {{#if http.any}}
20
+ authenticator: offlineAuthenticator,
21
+ {{/if}}
22
+ };
23
+
24
+ describe('A context run as a service leaves the whole application', () => {
25
+ // Jest refuses a table without rows: until a context becomes a service, its cases wait.
26
+ if (extracted.length === 0) {
27
+ it.todo('hosts no consumer, process nor job of a context run as a service, once the project has one');
28
+ } else {
29
+ it.each(extracted)('%s: the whole application hosts none of its modules, consumers, processes nor jobs', (name) => {
30
+ const whole = composeApplication(inertPersistence(), options, hostedContexts).container.describe();
31
+
32
+ expect(whole.modules).not.toContain(name);
33
+ expect(registrationsOf(whole, name)).toEqual([]);
34
+ });
35
+
36
+ it.each(extracted)('%s: its service hosts it, each consumer once, and no job of the platform', (name) => {
37
+ const service = composeApplication(
38
+ inertPersistence(),
39
+ { ...options, platformJobs: false },
40
+ { modules: everyContext.modules.filter((module) => module.name === name) },
41
+ ).container.describe();
42
+
43
+ const consumers = service.integrationEventHandlers.map((handler) => `${handler.consumer}:${handler.event}`);
44
+
45
+ expect(service.modules).toContain(name);
46
+ expect(new Set(consumers).size).toBe(consumers.length);
47
+ expect(service.jobs.filter((job) => !job.name.startsWith(name + '.'))).toEqual([]);
48
+ });
49
+
50
+ it.each(extracted)('%s: its entry point leaves the jobs of the platform to the whole application', (name) => {
51
+ expect(readFileSync('{{config.sourceRoot}}/apps/' + name + '/main.ts', 'utf8')).toContain('platformJobs: false');
52
+ });
53
+ }
54
+ });
55
+
56
+ /** What a module registers to be driven by something other than a request: the reactions, the jobs, the projections. */
57
+ function registrationsOf(description: WiringDescription, name: string): readonly string[] {
58
+ return [
59
+ ...description.integrationEventHandlers,
60
+ ...description.domainEventHandlers,
61
+ ...description.projections,
62
+ ...description.jobs,
63
+ ...description.backgroundJobs,
64
+ ...description.commands,
65
+ ...description.queries,
66
+ ]
67
+ .filter(({ module }) => module === name)
68
+ .map((registration) => JSON.stringify(registration));
69
+ }
@@ -165,6 +165,14 @@ MINIO_PORT=9000
165
165
  # TRACE_SAMPLE_RATIO=1
166
166
  # continue: a consumed event stays in the trace of the request that published it. link: each delivery starts its own trace, linked to it.
167
167
  # TRACE_CONSUMERS=continue
168
+ # What this process is called in traces and logs: one name per container (the worker, a service) tells the processes apart.
168
169
  OTEL_SERVICE_NAME={{project.name}}
170
+ # What every process of one deployment shares: the namespace of the keys they exchange through the server (the lock of a job, the cache,
171
+ # the rate limiter, the job store). The same for the API, the worker and the services; never the name of a container.
172
+ DEPLOYMENT_NAME={{project.name}}
173
+ {{#if tenancy.any}}
174
+ # The tenants that exist, comma separated: a scheduled job declared per-tenant runs once for each, and the privacy scripts reach each.
175
+ TENANTS=
176
+ {{/if}}
169
177
  JAEGER_UI_PORT=16686
170
178
  OTLP_HTTP_PORT=4318
@@ -6,6 +6,9 @@ dist
6
6
  .ddd-ts-kit/
7
7
  .eslintcache/
8
8
  .worktrees/
9
+ {{#if pm.pnpm}}
10
+ .pnpm-store/
11
+ {{/if}}
9
12
  .stryker-tmp/
10
13
  /reports/mutation/
11
14
  {{#if orm.prisma}}
@@ -11,7 +11,7 @@ import { PurgingPublisher } from '@ddd-ts-kit/kernel';
11
11
  {{#if http.any}}
12
12
  import { createAuthenticator } from '{{alias.platform}}/auth/authentication/create-authenticator{{alias.ext}}';
13
13
  {{/if}}
14
- import { composeApplication } from '{{alias.platform}}/composition/compose-application{{alias.ext}}';
14
+ import { composeApplication, hostedContexts } from '{{alias.platform}}/composition/compose-application{{alias.ext}}';
15
15
  import { loadConfig } from '{{alias.platform}}/config/load-config{{alias.ext}}';
16
16
  import { openPersistence } from '{{alias.platform}}/database/open-persistence{{alias.ext}}';
17
17
  import { {{events.providerName}} } from '{{alias.platform}}/events/{{events.providerFile}}{{alias.ext}}';
@@ -40,25 +40,32 @@ const persistence = openPersistence();
40
40
  const redis = openRedis(config);
41
41
  {{/if}}
42
42
 
43
- const application = composeApplication(persistence, {
44
- events: {{events.provider}},
45
- {{#if errors.sentry}}
46
- errors,
47
- {{/if}}
48
- {{#if http.any}}
49
- authenticator: createAuthenticator(config),
50
- {{/if}}
51
- log: { ...config.log, service: config.serviceName, environment: config.environment },
52
- traceConsumers: config.tracing.consumers,
53
- resilience: config.resilience,
54
- jobs: { start: config.runJobs, settings: jobSettings(process.env) },
55
- {{#if cache.redis}}
56
- redis,
57
- {{/if}}
58
- {{#if files.any}}
59
- files: openFiles(config.files),
60
- {{/if}}
61
- });
43
+ const application = composeApplication(
44
+ persistence,
45
+ {
46
+ events: {{events.provider}},
47
+ {{#if errors.sentry}}
48
+ errors,
49
+ {{/if}}
50
+ {{#if http.any}}
51
+ authenticator: createAuthenticator(config),
52
+ {{/if}}
53
+ log: { ...config.log, service: config.serviceName, environment: config.environment },
54
+ traceConsumers: config.tracing.consumers,
55
+ resilience: config.resilience,
56
+ jobs: { start: config.runJobs, settings: jobSettings(process.env) },
57
+ {{#if tenancy.any}}
58
+ tenants: config.tenants,
59
+ {{/if}}
60
+ {{#if cache.redis}}
61
+ redis,
62
+ {{/if}}
63
+ {{#if files.any}}
64
+ files: openFiles(config.files),
65
+ {{/if}}
66
+ },
67
+ hostedContexts,
68
+ );
62
69
 
63
70
  await application.start();
64
71
 
@@ -29,7 +29,12 @@ import { SearchAuditEntriesQuery } from '{{alias.platform}}/audit/search-audit-e
29
29
  * the entries older than the twelve whole months kept online moved to the storage of files,
30
30
  * verified and anchored (`audit.archive`){{/if}}.
31
31
  */
32
+ {{#if audit.archive}}
33
+ export function auditModule(audit: Audit, { jobs = true }: { readonly jobs?: boolean } = {}): ContextModule {
34
+ {{/if}}
35
+ {{#unless audit.archive}}
32
36
  export function auditModule(audit: Audit): ContextModule {
37
+ {{/unless}}
33
38
  return defineContextModule({
34
39
  name: 'audit',
35
40
  register(builder) {
@@ -58,9 +63,12 @@ export function auditModule(audit: Audit): ContextModule {
58
63
  {{/if}}
59
64
  {{#if audit.archive}}
60
65
 
61
- builder
62
- .job('audit.archive', { cron: '0 4 1 * *' })
63
- .handledByFactory((resolve) => new ArchiveAuditEntries(audit.trail, resolve(FileStorage), resolve(Clock)));
66
+ // Registered by the process that runs the jobs of the platform; a service of the deployment passes `jobs: false`.
67
+ if (jobs) {
68
+ builder
69
+ .job('audit.archive', { cron: '0 4 1 * *' })
70
+ .handledByFactory((resolve) => new ArchiveAuditEntries(audit.trail, resolve(FileStorage), resolve(Clock)));
71
+ }
64
72
  {{/if}}
65
73
  },
66
74
  onStart({ resolve }) {