ddd-ts-kit 0.98.0 → 0.99.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 (82) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.fr.md +14 -5
  3. package/README.md +13 -5
  4. package/dist/check/commands/changed-files.d.ts +1 -1
  5. package/dist/check/commands/changed-files.d.ts.map +1 -1
  6. package/dist/check/commands/changed-files.js +3 -2
  7. package/dist/check/commands/changed-files.js.map +1 -1
  8. package/dist/check/commands/check-command.d.ts.map +1 -1
  9. package/dist/check/commands/check-command.js +2 -1
  10. package/dist/check/commands/check-command.js.map +1 -1
  11. package/dist/check/commands/is-reported-since.d.ts +8 -0
  12. package/dist/check/commands/is-reported-since.d.ts.map +1 -0
  13. package/dist/check/commands/is-reported-since.js +9 -0
  14. package/dist/check/commands/is-reported-since.js.map +1 -0
  15. package/dist/check/model/finding.d.ts +6 -0
  16. package/dist/check/model/finding.d.ts.map +1 -1
  17. package/dist/check/model/report.d.ts +2 -0
  18. package/dist/check/model/report.d.ts.map +1 -1
  19. package/dist/check/model/violation.d.ts +2 -0
  20. package/dist/check/model/violation.d.ts.map +1 -1
  21. package/dist/check/rules/authz-declared.js +17 -7
  22. package/dist/check/rules/authz-declared.js.map +1 -1
  23. package/dist/check/rules/authz-policy-asked.d.ts.map +1 -1
  24. package/dist/check/rules/authz-policy-asked.js +5 -4
  25. package/dist/check/rules/authz-policy-asked.js.map +1 -1
  26. package/dist/check/rules/declarations-port-adapter-wired.d.ts.map +1 -1
  27. package/dist/check/rules/declarations-port-adapter-wired.js +11 -2
  28. package/dist/check/rules/declarations-port-adapter-wired.js.map +1 -1
  29. package/dist/check/rules/events-consumer-idempotent.js +13 -3
  30. package/dist/check/rules/events-consumer-idempotent.js.map +1 -1
  31. package/dist/check/support/reporter.d.ts.map +1 -1
  32. package/dist/check/support/reporter.js +9 -1
  33. package/dist/check/support/reporter.js.map +1 -1
  34. package/dist/check/support/to-violations.js +1 -1
  35. package/dist/check/support/to-violations.js.map +1 -1
  36. package/dist/init/manifest/versions.js +24 -24
  37. package/dist/merge/classify-conflict.js +2 -2
  38. package/dist/merge/classify-conflict.js.map +1 -1
  39. package/dist/merge/continue-merge.d.ts.map +1 -1
  40. package/dist/merge/continue-merge.js +26 -1
  41. package/dist/merge/continue-merge.js.map +1 -1
  42. package/dist/merge/format-merge-report.js +19 -0
  43. package/dist/merge/format-merge-report.js.map +1 -1
  44. package/dist/merge/is-derived-in-merge.d.ts +4 -0
  45. package/dist/merge/is-derived-in-merge.d.ts.map +1 -0
  46. package/dist/merge/is-derived-in-merge.js +8 -0
  47. package/dist/merge/is-derived-in-merge.js.map +1 -0
  48. package/dist/merge/is-merge-path.js +2 -2
  49. package/dist/merge/is-merge-path.js.map +1 -1
  50. package/dist/merge/merge-report.d.ts +7 -0
  51. package/dist/merge/merge-report.d.ts.map +1 -1
  52. package/dist/merge/next-steps.d.ts +1 -0
  53. package/dist/merge/next-steps.d.ts.map +1 -1
  54. package/dist/merge/next-steps.js +1 -0
  55. package/dist/merge/next-steps.js.map +1 -1
  56. package/dist/merge/resume-merge.d.ts.map +1 -1
  57. package/dist/merge/resume-merge.js +10 -1
  58. package/dist/merge/resume-merge.js.map +1 -1
  59. package/dist/version.d.ts +1 -1
  60. package/dist/version.js +1 -1
  61. package/dist/worker/asked-worktree.d.ts +7 -0
  62. package/dist/worker/asked-worktree.d.ts.map +1 -0
  63. package/dist/worker/asked-worktree.js +15 -0
  64. package/dist/worker/asked-worktree.js.map +1 -0
  65. package/dist/worker/find-worker.d.ts.map +1 -1
  66. package/dist/worker/find-worker.js +2 -1
  67. package/dist/worker/find-worker.js.map +1 -1
  68. package/dist/worker/main-project.d.ts +3 -0
  69. package/dist/worker/main-project.d.ts.map +1 -0
  70. package/dist/worker/main-project.js +11 -0
  71. package/dist/worker/main-project.js.map +1 -0
  72. package/dist/worker/worktree-home.d.ts.map +1 -1
  73. package/dist/worker/worktree-home.js +2 -6
  74. package/dist/worker/worktree-home.js.map +1 -1
  75. package/dist/worker/worktree-of.d.ts +2 -1
  76. package/dist/worker/worktree-of.d.ts.map +1 -1
  77. package/dist/worker/worktree-of.js +7 -3
  78. package/dist/worker/worktree-of.js.map +1 -1
  79. package/package.json +4 -4
  80. package/templates/init/e2e/start-application.database.ts.tpl +6 -2
  81. package/templates/init/e2e/start-application.memory.ts.tpl +6 -2
  82. package/templates/pipeline/package-scripts.json +1 -1
@@ -0,0 +1,3 @@
1
+ /** The project of the main checkout, whichever worktree of the repository `root` is in. */
2
+ export declare function mainProject(root: string): string;
3
+ //# sourceMappingURL=main-project.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main-project.d.ts","sourceRoot":"","sources":["../../src/worker/main-project.ts"],"names":[],"mappings":"AAGA,2FAA2F;AAC3F,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOhD"}
@@ -0,0 +1,11 @@
1
+ import path from 'node:path';
2
+ import { runGit } from '../commit/run-git.js';
3
+ /** The project of the main checkout, whichever worktree of the repository `root` is in. */
4
+ export function mainProject(root) {
5
+ const common = runGit(root, ['rev-parse', '--path-format=absolute', '--git-common-dir'])?.trim();
6
+ const top = runGit(root, ['rev-parse', '--show-toplevel'])?.trim() ?? root;
7
+ const prefix = runGit(root, ['rev-parse', '--show-prefix'])?.trim() ?? '';
8
+ const main = common !== undefined && path.basename(common) === '.git' ? path.dirname(common) : top;
9
+ return path.join(main, prefix);
10
+ }
11
+ //# sourceMappingURL=main-project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main-project.js","sourceRoot":"","sources":["../../src/worker/main-project.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,2FAA2F;AAC3F,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,wBAAwB,EAAE,kBAAkB,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC;IACjG,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,IAAI,CAAC;IAC3E,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC1E,MAAM,IAAI,GAAG,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IAEnG,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACjC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"worktree-home.d.ts","sourceRoot":"","sources":["../../src/worker/worktree-home.ts"],"names":[],"mappings":"AAGA,6HAA6H;AAC7H,eAAO,MAAM,aAAa,eAAe,CAAC;AAE1C;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAO/D"}
1
+ {"version":3,"file":"worktree-home.d.ts","sourceRoot":"","sources":["../../src/worker/worktree-home.ts"],"names":[],"mappings":"AAGA,6HAA6H;AAC7H,eAAO,MAAM,aAAa,eAAe,CAAC;AAE1C;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/D"}
@@ -1,5 +1,5 @@
1
1
  import path from 'node:path';
2
- import { runGit } from '../commit/run-git.js';
2
+ import { mainProject } from './main-project.js';
3
3
  /** Where the worktrees of a project live: a folder of the project in its main checkout, ignored by git and by every tool. */
4
4
  export const WORKTREES_DIR = '.worktrees';
5
5
  /**
@@ -8,10 +8,6 @@ export const WORKTREES_DIR = '.worktrees';
8
8
  * opened from another one is not nested in it.
9
9
  */
10
10
  export function worktreeHome(root, name) {
11
- const common = runGit(root, ['rev-parse', '--path-format=absolute', '--git-common-dir'])?.trim();
12
- const top = runGit(root, ['rev-parse', '--show-toplevel'])?.trim() ?? root;
13
- const prefix = runGit(root, ['rev-parse', '--show-prefix'])?.trim() ?? '';
14
- const main = common !== undefined && path.basename(common) === '.git' ? path.dirname(common) : top;
15
- return path.join(main, prefix, WORKTREES_DIR, name);
11
+ return path.join(mainProject(root), WORKTREES_DIR, name);
16
12
  }
17
13
  //# sourceMappingURL=worktree-home.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"worktree-home.js","sourceRoot":"","sources":["../../src/worker/worktree-home.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,6HAA6H;AAC7H,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAC;AAE1C;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY,EAAE,IAAY;IACrD,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,wBAAwB,EAAE,kBAAkB,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC;IACjG,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,IAAI,CAAC;IAC3E,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC1E,MAAM,IAAI,GAAG,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IAEnG,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC;AACtD,CAAC"}
1
+ {"version":3,"file":"worktree-home.js","sourceRoot":"","sources":["../../src/worker/worktree-home.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,6HAA6H;AAC7H,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAC;AAE1C;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY,EAAE,IAAY;IACrD,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC;AAC3D,CAAC"}
@@ -4,7 +4,8 @@ export interface WorktreePlace {
4
4
  readonly note?: string;
5
5
  }
6
6
  /**
7
- * The worktree a command opens or finds again: the path asked, relative to the project root, or
7
+ * The worktree a command opens or finds again: the path asked (relative to the project root, but one under `.worktrees/` is
8
+ * relative to the main checkout, so that it lands in the same place from any worktree), or
8
9
  * else `.worktrees/<name>`. A project whose .gitignore does not hold `.worktrees/` yet (one
9
10
  * started before) gets its new worktree next to it, `../<project>-<name>`, with a note; a path
10
11
  * asked under `.worktrees/` that git does not ignore is refused.
@@ -1 +1 @@
1
- {"version":3,"file":"worktree-of.d.ts","sourceRoot":"","sources":["../../src/worker/worktree-of.ts"],"names":[],"mappings":"AAMA,oGAAoG;AACpG,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,aAAa,CAsB/F"}
1
+ {"version":3,"file":"worktree-of.d.ts","sourceRoot":"","sources":["../../src/worker/worktree-of.ts"],"names":[],"mappings":"AAOA,oGAAoG;AACpG,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,aAAa,CAwB/F"}
@@ -2,20 +2,24 @@ import fs from 'node:fs';
2
2
  import path from 'node:path';
3
3
  import { runGit } from '../commit/run-git.js';
4
4
  import { ensureIgnored } from './ensure-ignored.js';
5
+ import { askedWorktree } from './asked-worktree.js';
5
6
  import { WORKTREES_DIR, worktreeHome } from './worktree-home.js';
6
7
  /**
7
- * The worktree a command opens or finds again: the path asked, relative to the project root, or
8
+ * The worktree a command opens or finds again: the path asked (relative to the project root, but one under `.worktrees/` is
9
+ * relative to the main checkout, so that it lands in the same place from any worktree), or
8
10
  * else `.worktrees/<name>`. A project whose .gitignore does not hold `.worktrees/` yet (one
9
11
  * started before) gets its new worktree next to it, `../<project>-<name>`, with a note; a path
10
12
  * asked under `.worktrees/` that git does not ignore is refused.
11
13
  */
12
14
  export function worktreeOf(root, asked, name) {
13
15
  if (asked !== undefined) {
14
- const worktree = path.resolve(root, asked);
16
+ const worktree = askedWorktree(root, asked);
15
17
  if (path.basename(path.dirname(worktree)) === WORKTREES_DIR && !fs.existsSync(worktree)) {
16
18
  ensureIgnored(worktree);
17
19
  }
18
- return { worktree };
20
+ return path.resolve(root, asked) === worktree
21
+ ? { worktree }
22
+ : { worktree, note: `${asked} is under ${WORKTREES_DIR}/, so it is the one of the main checkout: ${worktree}.` };
19
23
  }
20
24
  const home = worktreeHome(root, name);
21
25
  const project = path.d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ED,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACtC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IAEjD,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC,cAAc,EAAE,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC;QACpH,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5B,CAAC;IAED,OAAO;QACL,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC;QAC/E,IAAI,EAAE,GAAG,aAAa,iHAAiH,aAAa,2DAA2D,aAAa,IAAI;KACjO,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ddd-ts-kit",
3
- "version": "0.98.0",
3
+ "version": "0.99.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.98.0",
56
- "@ddd-ts-kit/events": "^0.98.0",
57
- "@ddd-ts-kit/kernel": "^0.98.0",
55
+ "@ddd-ts-kit/audit": "^0.99.0",
56
+ "@ddd-ts-kit/events": "^0.99.0",
57
+ "@ddd-ts-kit/kernel": "^0.99.0",
58
58
  "@types/pg": "^8.23.1",
59
59
  "pg": "^8.23.1"
60
60
  }
@@ -294,11 +294,15 @@ function contextsOfTheRun(): typeof everyContext {
294
294
  }
295
295
  {{/unless}}
296
296
 
297
- /** Runs the job now; a run that failed or did not happen fails the spec with its outcome, never the message of an error. */
297
+ /** Runs the job now; a run that failed, did not happen or reached no tenant fails the spec, never with the message of an error. */
298
298
  async function runJob(jobs: JobScheduler, name: string): Promise<void> {
299
- const { outcome, errorCode } = await jobs.runNow(name);
299
+ const { outcome, errorCode, tenants } = await jobs.runNow(name);
300
300
 
301
301
  if (outcome !== 'succeeded') {
302
302
  throw new Error(`The job ${name} ended ${outcome}${errorCode === undefined ? '' : ` (${errorCode})`}.`);
303
303
  }
304
+
305
+ if (tenants === 0) {
306
+ throw new Error(`The job ${name} is per-tenant and ran for no tenant: open a tenant first (an organisation).`);
307
+ }
304
308
  }
@@ -282,11 +282,15 @@ function contextsOfTheRun(): typeof everyContext {
282
282
  }
283
283
  {{/unless}}
284
284
 
285
- /** Runs the job now; a run that failed or did not happen fails the spec with its outcome, never the message of an error. */
285
+ /** Runs the job now; a run that failed, did not happen or reached no tenant fails the spec, never with the message of an error. */
286
286
  async function runJob(jobs: JobScheduler, name: string): Promise<void> {
287
- const { outcome, errorCode } = await jobs.runNow(name);
287
+ const { outcome, errorCode, tenants } = await jobs.runNow(name);
288
288
 
289
289
  if (outcome !== 'succeeded') {
290
290
  throw new Error(`The job ${name} ended ${outcome}${errorCode === undefined ? '' : ` (${errorCode})`}.`);
291
291
  }
292
+
293
+ if (tenants === 0) {
294
+ throw new Error(`The job ${name} is per-tenant and ran for no tenant: open a tenant first (an organisation).`);
295
+ }
292
296
  }
@@ -23,7 +23,7 @@
23
23
  "@biomejs/biome": "2.6.2",
24
24
  "@commitlint/cli": "^21.2.3",
25
25
  "@commitlint/config-conventional": "^21.2.3",
26
- "@ddd-ts-kit/eslint-plugin": "^0.98.0",
26
+ "@ddd-ts-kit/eslint-plugin": "^0.99.0",
27
27
  "@eslint/js": "^10.0.1",
28
28
  "@typescript/native": "npm:typescript@~7.0.2",
29
29
  "@vitest/coverage-v8": "5.0.3",