ddd-ts-kit 0.25.0 → 0.25.1

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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,23 @@ What each version changes for someone who uses the kit. The packages of `package
4
4
  together, under one version; the notes of each [GitHub release](https://github.com/gbourgeat/ddd-ts-kit/releases)
5
5
  list the pull requests behind it.
6
6
 
7
+ ## 0.25.1
8
+
9
+ **The places that teach how a spec builds its test application point to worlds.** The command
10
+ handler specs `generate` writes say, in their `TODO(domain)`, that `generate test-world <context>`
11
+ writes the arrangement once in `test/worlds/` when several specs of the context share it; the
12
+ `wiring` and `use-case` skills, `docs/tools/dependency-injection.md` and the README of
13
+ `@ddd-ts-kit/di` say the same where a reader writes that arrangement.
14
+
15
+ **The example application arranges through worlds.** `identity` and `notification` get their
16
+ world, and 42 handler, projection and integration handler specs take their test application from
17
+ the world of their context, their starting data in `given`. A spec keeps its own setup when it
18
+ builds what a world does not: a database wired by hand, a handler built by hand, a fake with
19
+ constructor arguments, a platform port.
20
+
21
+ Nothing to move: specs already written keep working; a project takes a world when its specs
22
+ repeat the same arrangement.
23
+
7
24
  ## 0.25.0
8
25
 
9
26
  **`generate test-world` gives the shared arrangement of a context its place, `test/worlds/`.**
@@ -1,35 +1,35 @@
1
1
  /** Ranges written to the generated package.json; bumped together with the kit. */
2
2
  export const VERSIONS = {
3
- '@ddd-ts-kit/kernel': '^0.25.0',
4
- '@ddd-ts-kit/validation': '^0.25.0',
5
- '@ddd-ts-kit/http': '^0.25.0',
6
- '@ddd-ts-kit/tracing': '^0.25.0',
7
- '@ddd-ts-kit/di': '^0.25.0',
8
- '@ddd-ts-kit/events': '^0.25.0',
9
- '@ddd-ts-kit/testing': '^0.25.0',
10
- '@ddd-ts-kit/drizzle': '^0.25.0',
11
- '@ddd-ts-kit/knex': '^0.25.0',
12
- '@ddd-ts-kit/prisma': '^0.25.0',
13
- '@ddd-ts-kit/typeorm': '^0.25.0',
14
- '@ddd-ts-kit/auth': '^0.25.0',
15
- '@ddd-ts-kit/rabbitmq': '^0.25.0',
16
- '@ddd-ts-kit/aspects': '^0.25.0',
17
- '@ddd-ts-kit/audit': '^0.25.0',
18
- '@ddd-ts-kit/redis': '^0.25.0',
19
- '@ddd-ts-kit/kafka': '^0.25.0',
20
- '@ddd-ts-kit/nats': '^0.25.0',
21
- '@ddd-ts-kit/scheduling': '^0.25.0',
22
- '@ddd-ts-kit/sentry': '^0.25.0',
23
- '@ddd-ts-kit/s3': '^0.25.0',
3
+ '@ddd-ts-kit/kernel': '^0.25.1',
4
+ '@ddd-ts-kit/validation': '^0.25.1',
5
+ '@ddd-ts-kit/http': '^0.25.1',
6
+ '@ddd-ts-kit/tracing': '^0.25.1',
7
+ '@ddd-ts-kit/di': '^0.25.1',
8
+ '@ddd-ts-kit/events': '^0.25.1',
9
+ '@ddd-ts-kit/testing': '^0.25.1',
10
+ '@ddd-ts-kit/drizzle': '^0.25.1',
11
+ '@ddd-ts-kit/knex': '^0.25.1',
12
+ '@ddd-ts-kit/prisma': '^0.25.1',
13
+ '@ddd-ts-kit/typeorm': '^0.25.1',
14
+ '@ddd-ts-kit/auth': '^0.25.1',
15
+ '@ddd-ts-kit/rabbitmq': '^0.25.1',
16
+ '@ddd-ts-kit/aspects': '^0.25.1',
17
+ '@ddd-ts-kit/audit': '^0.25.1',
18
+ '@ddd-ts-kit/redis': '^0.25.1',
19
+ '@ddd-ts-kit/kafka': '^0.25.1',
20
+ '@ddd-ts-kit/nats': '^0.25.1',
21
+ '@ddd-ts-kit/scheduling': '^0.25.1',
22
+ '@ddd-ts-kit/sentry': '^0.25.1',
23
+ '@ddd-ts-kit/s3': '^0.25.1',
24
24
  '@aws-sdk/client-s3': '^3.1150.0',
25
25
  '@aws-sdk/lib-storage': '^3.1150.0',
26
26
  '@aws-sdk/s3-request-presigner': '^3.1150.0',
27
27
  busboy: '^1.6.0',
28
28
  '@sentry/node': '^11.6.0',
29
- '@ddd-ts-kit/pino': '^0.25.0',
29
+ '@ddd-ts-kit/pino': '^0.25.1',
30
30
  pino: '^10.4.0',
31
31
  'pino-pretty': '^13.2.0',
32
- '@ddd-ts-kit/winston': '^0.25.0',
32
+ '@ddd-ts-kit/winston': '^0.25.1',
33
33
  winston: '^3.19.0',
34
34
  '@confluentinc/kafka-javascript': '^1.11.0',
35
35
  '@nats-io/jetstream': '^3.4.0',
@@ -37,7 +37,7 @@ export const VERSIONS = {
37
37
  ioredis: '^6.0.0',
38
38
  jose: '^6.0.0',
39
39
  amqplib: '^2.2.0',
40
- 'ddd-ts-kit': '^0.25.0',
40
+ 'ddd-ts-kit': '^0.25.1',
41
41
  tsx: '^4.23.15',
42
42
  vitest: '^5.0.3',
43
43
  zod: '^4.6.5',
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.25.0";
1
+ export declare const VERSION = "0.25.1";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.25.0';
1
+ export const VERSION = '0.25.1';
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.25.0",
3
+ "version": "0.25.1",
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,6 +52,6 @@
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/kernel": "^0.25.0"
55
+ "@ddd-ts-kit/kernel": "^0.25.1"
56
56
  }
57
57
  }
@@ -69,11 +69,11 @@ describe('{{name.title}}', () => {
69
69
  {{/if}}
70
70
 
71
71
  {{#if command.hasAggregate}}
72
- // TODO(domain): replace each entry below by a test named after the business behaviour of "{{name.words}}": arrange with the builders of test/builders and the fakes, execute through the bus, assert the stored {{aggregate.words}}, the facts announced with the save (`domainEvents.on('<name>', ...)` registered in `arrange`) and the answer.
72
+ // TODO(domain): replace each entry below by a test named after the business behaviour of "{{name.words}}": arrange with the builders of test/builders and the fakes, execute through the bus, assert the stored {{aggregate.words}}, the facts announced with the save (`domainEvents.on('<name>', ...)` registered in `arrange`) and the answer; when several specs of {{context.kebab}} share this arrangement, `npx ddd-ts-kit generate test-world {{context.kebab}}` writes it once in test/worlds/.
73
73
  it.todo('applies the business decision to the {{aggregate.words}}');
74
74
  {{/if}}
75
75
  {{#unless command.hasAggregate}}
76
- // TODO(domain): replace each entry below by a test named after the business behaviour of "{{name.words}}": arrange with builders and fakes of its ports, execute through the bus, assert the outcome.
76
+ // TODO(domain): replace each entry below by a test named after the business behaviour of "{{name.words}}": arrange with builders and fakes of its ports, execute through the bus, assert the outcome; when several specs of {{context.kebab}} share this arrangement, `npx ddd-ts-kit generate test-world {{context.kebab}}` writes it once in test/worlds/.
77
77
  it.todo('applies the business decision to the aggregate');
78
78
  {{/unless}}
79
79
  it.todo('refuses the command when a business rule is violated, with the expected error code');
@@ -65,11 +65,11 @@ describe('{{name.title}}', () => {
65
65
  {{/if}}
66
66
 
67
67
  {{#if command.hasAggregate}}
68
- // TODO(domain): replace each entry below by a test named after the business behaviour of "{{name.words}}": arrange with the builders of test/builders and the fakes, execute through the bus, assert the stored {{aggregate.words}}, the facts announced with the save (`application.domainEvents.on('<name>', ...)` before executing), `application.eventBus.published` and the answer.
68
+ // TODO(domain): replace each entry below by a test named after the business behaviour of "{{name.words}}": arrange with the builders of test/builders and the fakes, execute through the bus, assert the stored {{aggregate.words}}, the facts announced with the save (`application.domainEvents.on('<name>', ...)` before executing), `application.eventBus.published` and the answer; when several specs of {{context.kebab}} share this arrangement, `npx ddd-ts-kit generate test-world {{context.kebab}}` writes it once in test/worlds/.
69
69
  it.todo('applies the business decision to the {{aggregate.words}}');
70
70
  {{/if}}
71
71
  {{#unless command.hasAggregate}}
72
- // TODO(domain): replace each entry below by a test named after the business behaviour of "{{name.words}}": arrange with builders and fakes of its ports (`fakes: [fake(Port, aFake)]`), execute through the bus, assert the outcome.
72
+ // TODO(domain): replace each entry below by a test named after the business behaviour of "{{name.words}}": arrange with builders and fakes of its ports (`fakes: [fake(Port, aFake)]`), execute through the bus, assert the outcome; when several specs of {{context.kebab}} share this arrangement, `npx ddd-ts-kit generate test-world {{context.kebab}}` writes it once in test/worlds/.
73
73
  it.todo('applies the business decision to the aggregate');
74
74
  {{/unless}}
75
75
  it.todo('refuses the command when a business rule is violated, with the expected error code');
@@ -23,7 +23,7 @@
23
23
  "@biomejs/biome": "2.5.15",
24
24
  "@commitlint/cli": "^21.2.3",
25
25
  "@commitlint/config-conventional": "^21.2.3",
26
- "@ddd-ts-kit/eslint-plugin": "^0.25.0",
26
+ "@ddd-ts-kit/eslint-plugin": "^0.25.1",
27
27
  "@eslint/js": "^10.0.1",
28
28
  "@typescript/native": "npm:typescript@~7.0.2",
29
29
  "@vitest/coverage-v8": "5.0.3",