ddd-ts-kit 0.11.0 → 0.13.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.
- package/README.md +21 -8
- package/dist/check/catalogue/architecture-rules.d.ts.map +1 -1
- package/dist/check/catalogue/architecture-rules.js +4 -0
- package/dist/check/catalogue/architecture-rules.js.map +1 -1
- package/dist/check/catalogue/eslint-only-rules.d.ts.map +1 -1
- package/dist/check/catalogue/eslint-only-rules.js +4 -0
- package/dist/check/catalogue/eslint-only-rules.js.map +1 -1
- package/dist/check/domain-events/refused-before-commit.js +1 -1
- package/dist/check/domain-events/refused-before-commit.js.map +1 -1
- package/dist/check/errors/kit-error-codes.d.ts.map +1 -1
- package/dist/check/errors/kit-error-codes.js +2 -0
- package/dist/check/errors/kit-error-codes.js.map +1 -1
- package/dist/check/explain/errors-docs.js +1 -1
- package/dist/check/explain/errors-docs.js.map +1 -1
- package/dist/check/explain/events-docs.js +1 -1
- package/dist/check/explain/events-docs.js.map +1 -1
- package/dist/check/explain/rule-docs.d.ts.map +1 -1
- package/dist/check/explain/rule-docs.js +2 -0
- package/dist/check/explain/rule-docs.js.map +1 -1
- package/dist/check/explain/schema-docs.d.ts +3 -0
- package/dist/check/explain/schema-docs.d.ts.map +1 -0
- package/dist/check/explain/schema-docs.js +28 -0
- package/dist/check/explain/schema-docs.js.map +1 -0
- package/dist/check/fixtures/domain-events-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/domain-events-fixtures.js +18 -0
- package/dist/check/fixtures/domain-events-fixtures.js.map +1 -1
- package/dist/check/fixtures/fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/fixtures.js +2 -0
- package/dist/check/fixtures/fixtures.js.map +1 -1
- package/dist/check/fixtures/schema-fixtures.d.ts +3 -0
- package/dist/check/fixtures/schema-fixtures.d.ts.map +1 -0
- package/dist/check/fixtures/schema-fixtures.js +129 -0
- package/dist/check/fixtures/schema-fixtures.js.map +1 -0
- package/dist/check/fixtures/standard-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/standard-fixtures.js +8 -0
- package/dist/check/fixtures/standard-fixtures.js.map +1 -1
- package/dist/check/rules/domain-events-transactional-before-commit.js +1 -1
- package/dist/check/rules/domain-events-transactional-before-commit.js.map +1 -1
- package/dist/check/rules/schema-no-duplicate-shape.d.ts +3 -0
- package/dist/check/rules/schema-no-duplicate-shape.d.ts.map +1 -0
- package/dist/check/rules/schema-no-duplicate-shape.js +60 -0
- package/dist/check/rules/schema-no-duplicate-shape.js.map +1 -0
- package/dist/check/rules/schema-presentation-only.d.ts +3 -0
- package/dist/check/rules/schema-presentation-only.d.ts.map +1 -0
- package/dist/check/rules/schema-presentation-only.js +53 -0
- package/dist/check/rules/schema-presentation-only.js.map +1 -0
- package/dist/check/schemas/class-shapes.d.ts +9 -0
- package/dist/check/schemas/class-shapes.d.ts.map +1 -0
- package/dist/check/schemas/class-shapes.js +52 -0
- package/dist/check/schemas/class-shapes.js.map +1 -0
- package/dist/check/schemas/declared-shape.d.ts +9 -0
- package/dist/check/schemas/declared-shape.d.ts.map +1 -0
- package/dist/check/schemas/declared-shape.js +2 -0
- package/dist/check/schemas/declared-shape.js.map +1 -0
- package/dist/check/schemas/holds-schemas.d.ts +5 -0
- package/dist/check/schemas/holds-schemas.d.ts.map +1 -0
- package/dist/check/schemas/holds-schemas.js +12 -0
- package/dist/check/schemas/holds-schemas.js.map +1 -0
- package/dist/check/schemas/object-shapes.d.ts +8 -0
- package/dist/check/schemas/object-shapes.d.ts.map +1 -0
- package/dist/check/schemas/object-shapes.js +31 -0
- package/dist/check/schemas/object-shapes.js.map +1 -0
- package/dist/check/schemas/restored-code.d.ts +7 -0
- package/dist/check/schemas/restored-code.d.ts.map +1 -0
- package/dist/check/schemas/restored-code.js +17 -0
- package/dist/check/schemas/restored-code.js.map +1 -0
- package/dist/check/schemas/shared-presentation.d.ts +4 -0
- package/dist/check/schemas/shared-presentation.d.ts.map +1 -0
- package/dist/check/schemas/shared-presentation.js +5 -0
- package/dist/check/schemas/shared-presentation.js.map +1 -0
- package/dist/check/schemas/shares-schemas.d.ts +4 -0
- package/dist/check/schemas/shares-schemas.d.ts.map +1 -0
- package/dist/check/schemas/shares-schemas.js +5 -0
- package/dist/check/schemas/shares-schemas.js.map +1 -0
- package/dist/check/schemas/still-generated.d.ts +8 -0
- package/dist/check/schemas/still-generated.d.ts.map +1 -0
- package/dist/check/schemas/still-generated.js +11 -0
- package/dist/check/schemas/still-generated.js.map +1 -0
- package/dist/check/schemas/top-level-statements.d.ts +3 -0
- package/dist/check/schemas/top-level-statements.d.ts.map +1 -0
- package/dist/check/schemas/top-level-statements.js +21 -0
- package/dist/check/schemas/top-level-statements.js.map +1 -0
- package/dist/check/schemas/validation-packages.d.ts +3 -0
- package/dist/check/schemas/validation-packages.d.ts.map +1 -0
- package/dist/check/schemas/validation-packages.js +13 -0
- package/dist/check/schemas/validation-packages.js.map +1 -0
- package/dist/check/standard/parallel-names.d.ts.map +1 -1
- package/dist/check/standard/parallel-names.js +6 -0
- package/dist/check/standard/parallel-names.js.map +1 -1
- package/dist/commands/generate.js +23 -19
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +4 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/config/default-allowed-packages.d.ts.map +1 -1
- package/dist/config/default-allowed-packages.js +1 -0
- package/dist/config/default-allowed-packages.js.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +1 -1
- package/dist/config/index.js.map +1 -1
- package/dist/config/parse-stack.d.ts.map +1 -1
- package/dist/config/parse-stack.js +3 -1
- package/dist/config/parse-stack.js.map +1 -1
- package/dist/config/stack.d.ts +18 -2
- package/dist/config/stack.d.ts.map +1 -1
- package/dist/config/stack.js +4 -2
- package/dist/config/stack.js.map +1 -1
- package/dist/generate/kind.d.ts +2 -0
- package/dist/generate/kind.d.ts.map +1 -1
- package/dist/generate/kinds/route/cache-policy-text.d.ts +8 -0
- package/dist/generate/kinds/route/cache-policy-text.d.ts.map +1 -0
- package/dist/generate/kinds/route/cache-policy-text.js +41 -0
- package/dist/generate/kinds/route/cache-policy-text.js.map +1 -0
- package/dist/generate/kinds/route/controller-imports.d.ts.map +1 -1
- package/dist/generate/kinds/route/controller-imports.js +2 -1
- package/dist/generate/kinds/route/controller-imports.js.map +1 -1
- package/dist/generate/kinds/route/controller-plan.d.ts +2 -0
- package/dist/generate/kinds/route/controller-plan.d.ts.map +1 -1
- package/dist/generate/kinds/route/controller-types.d.ts.map +1 -1
- package/dist/generate/kinds/route/controller-types.js +4 -2
- package/dist/generate/kinds/route/controller-types.js.map +1 -1
- package/dist/generate/kinds/route/controller-vars.d.ts.map +1 -1
- package/dist/generate/kinds/route/controller-vars.js +23 -8
- package/dist/generate/kinds/route/controller-vars.js.map +1 -1
- package/dist/generate/kinds/route/dto-classes.d.ts +5 -2
- package/dist/generate/kinds/route/dto-classes.d.ts.map +1 -1
- package/dist/generate/kinds/route/dto-classes.js +6 -3
- package/dist/generate/kinds/route/dto-classes.js.map +1 -1
- package/dist/generate/kinds/route/plan-controller.d.ts.map +1 -1
- package/dist/generate/kinds/route/plan-controller.js +4 -1
- package/dist/generate/kinds/route/plan-controller.js.map +1 -1
- package/dist/generate/kinds/route/route-vars.d.ts.map +1 -1
- package/dist/generate/kinds/route/route-vars.js +17 -4
- package/dist/generate/kinds/route/route-vars.js.map +1 -1
- package/dist/generate/kinds/route/search-line-libraries.d.ts +3 -0
- package/dist/generate/kinds/route/search-line-libraries.d.ts.map +1 -0
- package/dist/generate/kinds/route/search-line-libraries.js +3 -0
- package/dist/generate/kinds/route/search-line-libraries.js.map +1 -0
- package/dist/generate/kinds/route/shares-schemas.d.ts +4 -0
- package/dist/generate/kinds/route/shares-schemas.d.ts.map +1 -0
- package/dist/generate/kinds/route/shares-schemas.js +5 -0
- package/dist/generate/kinds/route/shares-schemas.js.map +1 -0
- package/dist/generate/kinds/route/write-controller.d.ts.map +1 -1
- package/dist/generate/kinds/route/write-controller.js +4 -2
- package/dist/generate/kinds/route/write-controller.js.map +1 -1
- package/dist/generate/kinds/route-kind.d.ts.map +1 -1
- package/dist/generate/kinds/route-kind.js +12 -3
- package/dist/generate/kinds/route-kind.js.map +1 -1
- package/dist/generate/kinds/schema-kind.d.ts +3 -0
- package/dist/generate/kinds/schema-kind.d.ts.map +1 -0
- package/dist/generate/kinds/schema-kind.js +36 -0
- package/dist/generate/kinds/schema-kind.js.map +1 -0
- package/dist/generate/kinds.d.ts.map +1 -1
- package/dist/generate/kinds.js +2 -0
- package/dist/generate/kinds.js.map +1 -1
- package/dist/generate/shared-writes.d.ts.map +1 -1
- package/dist/generate/shared-writes.js +5 -0
- package/dist/generate/shared-writes.js.map +1 -1
- package/dist/help/usage.d.ts +1 -1
- package/dist/help/usage.d.ts.map +1 -1
- package/dist/help/usage.js +5 -2
- package/dist/help/usage.js.map +1 -1
- package/dist/init/files/project-files.d.ts.map +1 -1
- package/dist/init/files/project-files.js +3 -1
- package/dist/init/files/project-files.js.map +1 -1
- package/dist/init/manifest/dependencies-for.d.ts.map +1 -1
- package/dist/init/manifest/dependencies-for.js +2 -0
- package/dist/init/manifest/dependencies-for.js.map +1 -1
- package/dist/init/manifest/versions.d.ts.map +1 -1
- package/dist/init/manifest/versions.js +27 -24
- package/dist/init/manifest/versions.js.map +1 -1
- package/dist/init/stack/resolve-stack.d.ts.map +1 -1
- package/dist/init/stack/resolve-stack.js +13 -2
- package/dist/init/stack/resolve-stack.js.map +1 -1
- package/dist/init/stack/stack-options.d.ts +3 -0
- package/dist/init/stack/stack-options.d.ts.map +1 -1
- package/dist/init/template-vars.js +4 -3
- package/dist/init/template-vars.js.map +1 -1
- package/dist/init/validation-dependencies.d.ts.map +1 -1
- package/dist/init/validation-dependencies.js +1 -0
- package/dist/init/validation-dependencies.js.map +1 -1
- package/dist/stack/stack-vars.js +14 -6
- package/dist/stack/stack-vars.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/templates/controller/controller.class-validator.ts.tpl +5 -2
- package/templates/controller/controller.none.ts.tpl +5 -2
- package/templates/controller/controller.search.ts.tpl +17 -0
- package/templates/controller/controller.standard-schema.ts.tpl +5 -2
- package/templates/controller/controller.typebox.ts.tpl +98 -0
- package/templates/controller/controller.zod.ts.tpl +5 -2
- package/templates/docs/openapi.json.tpl +9 -0
- package/templates/init/docker/docker-compose.yml.tpl +20 -0
- package/templates/init/docker/env.example.tpl +10 -0
- package/templates/init/docker/varnish.vcl.tpl +74 -0
- package/templates/init/e2e/start-application.database.ts.tpl +28 -0
- package/templates/init/e2e/start-application.memory.ts.tpl +30 -0
- package/templates/init/e2e/test-environment.ts.tpl +5 -0
- package/templates/init/main.ts.tpl +13 -0
- package/templates/init/platform/auth/http-boundary.ts.tpl +29 -0
- package/templates/init/platform/compose-application.tsyringe.ts.tpl +13 -0
- package/templates/init/platform/config/app-config.ts.tpl +6 -0
- package/templates/init/platform/config/load-config.ts.tpl +12 -0
- package/templates/init/platform/create-platform.manual.ts.tpl +31 -0
- package/templates/init/platform/http/start-http-server.hono.ts.tpl +84 -0
- package/templates/init/platform/platform.manual.ts.tpl +7 -0
- package/templates/init/rules/presentation.md.tpl +5 -1
- package/templates/pipeline/package-scripts.json +1 -1
- package/templates/route/route.class-validator.ts.tpl +3 -3
- package/templates/route/route.none.ts.tpl +3 -3
- package/templates/route/route.search.ts.tpl +14 -0
- package/templates/route/route.standard-schema.ts.tpl +3 -3
- package/templates/route/route.typebox.ts.tpl +79 -0
- package/templates/route/route.zod.ts.tpl +3 -3
- package/templates/schema/schema.class-validator.ts.tpl +3 -0
- package/templates/schema/schema.custom.ts.tpl +14 -0
- package/templates/schema/schema.typebox.ts.tpl +8 -0
- package/templates/schema/schema.zod.ts.tpl +7 -0
- package/templates/service/main.ts.tpl +13 -0
package/README.md
CHANGED
|
@@ -38,20 +38,22 @@ its limits, `2` wrong usage (the message says what to do).
|
|
|
38
38
|
## init
|
|
39
39
|
|
|
40
40
|
```
|
|
41
|
-
ddd-ts-kit init [--http express|fastify|nest|none]
|
|
42
|
-
[--validation zod|class-validator|standard-schema|none]
|
|
41
|
+
ddd-ts-kit init [--http express|fastify|hono|nest|none]
|
|
42
|
+
[--validation zod|class-validator|typebox|standard-schema|none]
|
|
43
43
|
[--di tsyringe|nest|manual] [--tests vitest|jest]
|
|
44
44
|
[--orm drizzle|knex|prisma|typeorm|custom|none]
|
|
45
45
|
[--database postgres|mysql|sqlite|none]
|
|
46
46
|
[--events in-memory|outbox] [--docs-ui swagger|scalar|redoc|none]
|
|
47
47
|
[--ci github|gitlab|both|none] [--ci-extras <extra>,...|none]
|
|
48
48
|
[--authn jwt|keycloak|none] [--authz rbac|abac|rebac|custom]
|
|
49
|
-
[--broker none|rabbitmq|kafka|nats|redis|custom] [--cache none|redis]
|
|
49
|
+
[--broker none|rabbitmq|kafka|nats|redis|custom] [--cache none|redis]
|
|
50
|
+
[--http-cache none|varnish] [--storage local|s3|none] [--audit on|off]
|
|
50
51
|
[--errors none|sentry] [--logger stdout|pino|winston]
|
|
51
52
|
[--style declared|explicit] [--assembly barrel|discovery]
|
|
52
53
|
[--dependencies signature|listed] [--refusals factories|classes]
|
|
53
54
|
[--routes controllers|functions] [--value-objects throwing|result]
|
|
54
55
|
[--literals named|free] [--tenancy none|shared-table] [--queue database|redis|memory]
|
|
56
|
+
[--schemas shared|per-route]
|
|
55
57
|
[--package-manager npm|pnpm]
|
|
56
58
|
[--allow-no-outbox "<reason>"] [--import-alias '$<name>/']
|
|
57
59
|
[--import-extension none|js] [--sdk]
|
|
@@ -164,6 +166,13 @@ file. `--routes functions`, or a config without the key, keeps one `defineRoute`
|
|
|
164
166
|
route, listed in `<context>.routes.ts`, as 0.1 to 0.3 wrote them; `controllers` moves a
|
|
165
167
|
project from one to the other, a context at a time.
|
|
166
168
|
|
|
169
|
+
**A shape is declared once.** `init` writes `"stack.schemas": "shared"`: a command route answers
|
|
170
|
+
its identifier with `acceptedSchema` of `@ddd-ts-kit/http`, one `Accepted` component in the
|
|
171
|
+
contract, and `generate schema <context> <Name>` (or `schema shared-kernel <Name>`) writes a
|
|
172
|
+
shape several routes use, which the contract documents once and every route refers to. The
|
|
173
|
+
`schema/*` rules hold that form. `--schemas per-route`, or a config without the key, keeps one
|
|
174
|
+
schema per route, an identifier answer included, as 0.1 to 0.5 wrote them.
|
|
175
|
+
|
|
167
176
|
**A value object throws its refusals.** `init` writes `"stack.valueObjects": "throwing"`:
|
|
168
177
|
`generate value-object` writes a `create` that returns the value object or throws the refusal of
|
|
169
178
|
its concept, and a spec that asserts it with `expectRefusal(() => ..)`. `--value-objects result`,
|
|
@@ -197,6 +206,7 @@ config, `docsUi`, `ci` and `logger` included.
|
|
|
197
206
|
| `--tenancy shared-table` | recorded as `stack.tenancy`; Knex or Drizzle only. Every `generate repository` is tenant-scoped (as `--tenant-scoped`), through `tenantTable` and `ownTenantTable` or `tenantCondition` and `ownTenantCondition`; the outbox keeps the tenant of each event (`createOutboxTables(knex, { tenant: true })` and `KnexOutboxStore`'s `tenant: true`, or `tenantOutboxTable`), so consumers run in it; `tenancy/scoped-statement` judges the adapters. Row-level security, schema per tenant and database per tenant are refused, with what to wire by hand ([Multitenancy](../../docs/concepts/multitenancy.md)) |
|
|
198
207
|
| `--queue database\|redis\|memory` | recorded as `stack.queue`. `database` (the default on Knex or Drizzle with tsyringe): `createJobTable` and `createProcessTable`, or `jobsTable` and `processesTable`, in the `messaging` schema, `Persistence` gains `jobs` and `processes`, and the platform module rebinds `JobStore` and `ProcessStore` to them, so a job enqueued by a command is written in its transaction; `redis` (with `--cache redis`): `RedisJobStore` on the connection of the cache, the processes in the database; `memory` (the default otherwise): nothing is written, the kernel module keeps both in the process. Refused off tsyringe, `database` with another ORM, `redis` without the cache |
|
|
199
208
|
| `--cache redis` | `src/platform/redis/open-redis.ts` (`RedisServices`: the cache bound to the kernel `Cache`, the limiter to `RateLimiter`, the lock to `Lock`, which keeps a scheduled job to one instance, the relay signal as the `wakeOn` of the outbox relay with `relayWakeUpMiddleware` on the command bus), `http/refusal-for.ts` (one sliding window per caller address, 429 `application/problem+json` with `retry-after`; `RATE_LIMIT_MAX`, `RATE_LIMIT_WINDOW_MS`), `GET /health/ready` on the HTTP server, `REDIS_URL` validated, a compose service `cache` running Dragonfly with a healthcheck. Without a server (tools, tests without `REDIS_URL`) the same ports stay in the memory of the process |
|
|
209
|
+
| `--http-cache varnish` | a compose service `varnish` (Varnish 9.1.0, reaching the API on `host.docker.internal`) with its VCL in `docker/varnish/default.vcl` (only answers whose `Cache-Control` allows them by `max-age` or `s-maxage` are kept, filed under their `xkey` tags, purged by `PURGE` from the machine of Varnish or with `VARNISH_PURGE_KEY`, `x-cache: HIT\|MISS`), `VARNISH_URL` and `VARNISH_PURGE_KEY` validated, `cacheTags: { header: CacheTagHeader.xkey }` in the HTTP boundary, and the outbox relay of `main.ts` and of every `generate service` entry point publishing through `PurgingPublisher` with `VarnishCachePurger` (the end-to-end application records the purges in `purges`); on `--di manual` and `nest` the platform gains `cacheInvalidation`; with `--tenancy`, the tags of the answers and the purges are filed under the tenant (`perTenant`) and the tenant of a request is read from `x-tenant-id`. Needs an HTTP framework and `--events outbox`: a purge is a row of the outbox |
|
|
200
210
|
| `--errors sentry` | unexpected failures reported to Sentry or GlitchTip (one protocol, only the DSN differs) through the kernel `ErrorReporter`, bound to `@ddd-ts-kit/sentry`. `src/platform/errors.ts` (`initSentry` on the validated configuration, then `reportProcessFailures`), the second import of `main.ts`, of `apps/<context>/main.ts` and of `apps/worker/main.ts`, right after `tracing.ts`; `errors` handed to `composeApplication`, which gives it to the kernel module on tsyringe (`errorReporter`, flushed by `container.stop()` before the logger, `errorReportingMiddleware` first on both buses, the default scheduler observing with `reportFailedRuns`) or to `createPlatform` by hand (the same middleware, `onRun: reportFailedRuns(errors)`, `platform.errors`, flushed two seconds at most when the application stops); `reportHttpErrors` in `auth/http-boundary.ts` for every request answered 5xx; `DeadLetterReports` on the `onFailure` hook of a provided broker (`createEventProvider(config, errors)`, with `observing` around each consumer) and of the outbox relay. `SENTRY_DSN`, `SENTRY_ENVIRONMENT` (default: `NODE_ENV`), `SENTRY_RELEASE` and `SENTRY_SCRUB_MESSAGES` validated in `config/load-config.ts` as `errorReporting`: without a DSN the application starts and reports nothing; a DSN that is not a URL refuses the start. Dependencies `@ddd-ts-kit/sentry` and `@sentry/node`. A compose profile `errors` running GlitchTip 6.2.6 with its own PostgreSQL and Valkey (`GLITCHTIP_PORT`, loopback only, development bootstrap), and a section of the generated README saying how to read its DSN. The tools and the tests compose the application without a reporter. It goes with every other choice of the stack; with `--errors none` nothing of this is written |
|
|
201
211
|
| `--authn keycloak` | a compose service `keycloak` (Keycloak 26.8.0, `start-dev --import-realm`, profile `identity`) and `docker/keycloak/<project>-realm.json`: the API client, a public client `<project>-local` with the direct grant, its audience and `tenant_id` mappers, the realm role `admin`, and the demo users `demo-admin` and `demo-user`, for local development only |
|
|
202
212
|
| `src/platform/events/` | `event-provider.ts` (`bus`, `forConsumer(name)`, `start()`, `close()`), `in-process-events.ts`, and for `--broker` `create-event-provider.ts`: `RabbitMqEventBus` (`AMQP_URL`), `KafkaEventBus` (`KAFKA_BROKERS`, with `aggregate-key-of.ts` for per-aggregate order), `NatsEventBus` (`NATS_URL`) or `RedisStreamsEventBus` of `@ddd-ts-kit/redis/event-bus` (`REDIS_URL`: Redis, Dragonfly or Valkey), each with one subscriber per consuming context (`forConsumer`), `assertTopology` at start, its address validated and a compose service with a healthcheck; or `custom-event-bus.ts` with its `eventBusContract` spec. `start-outbox-relay.ts` with the outbox. `--broker redis` with `--cache redis` is one server and one compose service, `cache`; alone, the service is `streams` |
|
|
@@ -275,10 +285,11 @@ ddd-ts-kit generate --help --json
|
|
|
275
285
|
| `command` | `<context> <UseCaseName> (--permission <aggregate>.<action> \| --public) [--aggregate <Name>]` | `<use-case>.command.ts` on `AuthorizedCommand` (plain `Command` when public), `<use-case>.handler.ts` (it builds the aggregate, saves it and answers: the events leave with the save), spec through the bus with the refusal of an actor who lacks the permission, registration with `.requires(...)` or `.public()` (and the repository when missing). A generated command answers `void` or the identifier of its aggregate, so no `<use-case>.result.ts` is written |
|
|
276
286
|
| `query` | `<context> <UseCaseName> (--permission <aggregate>.<action> \| --public) [--search]` | `<use-case>.query.ts` on `AuthorizedQuery` (plain `Query` when public), `<use-case>.result.ts`, `<use-case>.handler.ts`, the read port `application/ports/<use-case>-reader.port.ts` (an abstract class), its in-memory adapter, fake, spec, registration on the query bus. With `--search` (needs `--permission`): a kernel `PageRequest` in the query, the item, the sort and `Page<Item>` in the result file, a handler that asks `Access.scope` and hands the scope to the read port, an in-memory reader paging by offset or cursor |
|
|
277
287
|
| `port` | `<context> <Name>` | `application/ports/<name>.port.ts`, one abstract class, and its fake |
|
|
278
|
-
| `route` | `<context> <UseCaseName> --method <GET\|POST\|PUT\|PATCH\|DELETE> --path <p> [--command\|--query] [--group <Name>] [--mapper] [--serializer]` | under `"stack.routes": "controllers"`: a controller class in `presentation/http/<resource>/<use-case>/` (the resource is the first segment of the path), depending on `CommandBus` or `QueryBus`, behind the route group of its resource, written with it when it is new (`<resource>.routes.ts`: prefix, tag, `Authenticated`); a public use case stands in no group and says `guards: [Public]`; with class-validator one class per file (`<use-case>.params.ts`, `.body.ts`, `.answer.ts`, `.accepted.ts`, `.line.ts`); `--mapper` and `--serializer` add a request mapper and a serializer the controller is given; a spec; no registration in a declared project, a controller built by hand in `<context>.routes.ts` (the module file with hand wiring) in an explicit one. Under `"functions"`: a `defineRoute` function, its spec, its registration in `<context>.routes.ts`, and `<use-case>-<role>.dto.ts` classes |
|
|
279
|
-
| `controller` | the same arguments as `route` | the controller class, whatever `stack.routes` says: for a project of function routes that writes its next route as a class |
|
|
288
|
+
| `route` | `<context> <UseCaseName> --method <GET\|POST\|PUT\|PATCH\|DELETE> --path <p> [--command\|--query] [--group <Name>] [--mapper] [--serializer] [--cache public\|private\|no-store]` | under `"stack.routes": "controllers"`: a controller class in `presentation/http/<resource>/<use-case>/` (the resource is the first segment of the path), depending on `CommandBus` or `QueryBus`, behind the route group of its resource, written with it when it is new (`<resource>.routes.ts`: prefix, tag, `Authenticated`); a public use case stands in no group and says `guards: [Public]`; with class-validator one class per file (`<use-case>.params.ts`, `.body.ts`, `.answer.ts`, `.accepted.ts`, `.line.ts`); `--mapper` and `--serializer` add a request mapper and a serializer the controller is given; a spec; no registration in a declared project, a controller built by hand in `<context>.routes.ts` (the module file with hand wiring) in an explicit one. Under `"functions"`: a `defineRoute` function, its spec, its registration in `<context>.routes.ts`, and `<use-case>-<role>.dto.ts` classes |
|
|
289
|
+
| `controller` | the same arguments as `route` | the controller class, whatever `stack.routes` says: for a project of function routes that writes its next route as a class. `--cache` writes its cache policy: `private` (a `GET` of a caller, `max-age=0`, `must-revalidate`, strong `ETag`), `public` (a `GET` of a public use case, `max-age` 1m, `s-maxage` 5m, tagged with the resources of its path), `no-store`; refused on a write, and `public` behind a route group |
|
|
280
290
|
| `route-group` (`group`) | `<context> <Name> [--prefix <path>] [--group <ParentName>] [--public \| --role <role>]` | `presentation/http/<name>.routes.ts`: an empty class carrying `@RouteGroup`, behind `Authenticated` unless `--public` or `--role` says otherwise (`HasRole(Role.Admin)`, the role read from the vocabulary of the platform, `<platformDir>/auth/role.ts`, which gets it when it does not hold it); with `--group` it refines that group and inherits from it |
|
|
281
291
|
| `guard` | `<context> <Name>` | `presentation/http/guards/<name>.guard.ts`: a declared guard class to fill, and its spec |
|
|
292
|
+
| `schema` | `<context\|shared-kernel> <Name>` | `presentation/http/shared/<name>.schema.ts` of the context, or `presentation/<name>.schema.ts` of the shared kernel: one shape of the contract declared once (a zod schema with `.meta({ id })`, a class-validator class, or a schema wrapped by `sharedSchema`), to fill; the routes use it whole, nested or in part |
|
|
282
293
|
| `integration-event` | `<context> <Aggregate> <Fact> [--version n]` | `defineIntegrationEvent` declaration in the published language (its payload in `<event>.v<n>.payload.ts` with class-validator or a schema of your own), index export, the publisher `application/integration/publishers/<event>.publisher.ts`, spec, registration, a line of `platform/audit/audited-events.ts` |
|
|
283
294
|
| `integration-handler` (`consumer`) | `<context> <upstreamContext> <eventType>` | `application/integration/handlers/<name>.integration-handler.ts`, a class `<Name>IntegrationHandler` depending on `CommandBus`, its spec, its idempotent subscription under the consumer name `<context>.<name>`; refused unless the upstream is declared |
|
|
284
295
|
| `event-handler` | `<context> <Aggregate> <Fact> [--phase after-commit]` | reaction to a domain event of the context, spec, subscription; before the commit of the unit of work by default, after it with `--phase after-commit` (an effect no transaction covers, at most once), and the spec runs the reaction in that phase |
|
|
@@ -775,11 +786,11 @@ saying what to do instead. Exit code 1 when there is at least one error.
|
|
|
775
786
|
| `aspects/outside-in` | an import of `@ddd-ts-kit/aspects/decorators` outside `infrastructure/` of a context and the platform directory: `presentation/`, the module file, `published-language/`, the shared kernel, `main.ts`, any other source (`domain/` and `application/` are reported by the two `layer/*` rules instead) |
|
|
776
787
|
| `tracing/platform-only` | an import of `@ddd-ts-kit/tracing` or of an `@opentelemetry/*` package outside the platform directory, `main.ts` and `apps/`, tests included |
|
|
777
788
|
| `tenancy/scoped-statement` | with `stack.tenancy` other than `none`, in `infrastructure/` of a context, tests aside: on Knex the executor used other than as an argument (`executor()(`, `executor().from(`, `executor().raw(`, `const db = ...executor();`) and any `.raw(`; on Drizzle, statement by statement, a read, update or delete on the executor whose where has no `tenantCondition(` nor `ownTenantCondition(` (inline or in the local it is given), an insert whose row has no `tenantScopeOf(`, a relational query (`executor().query`), a raw `execute(`, or the executor held in a variable; on both, a read model store built without its `tenant` option. A where built by another function is not followed |
|
|
778
|
-
| `standard/no-parallel-interface` | a class, interface or type alias declared as `ILogger`, `AppLogger`, `LoggerService`, `LoggerInterface`, `IMetrics`, `MetricsService`, `ICache`, `CacheService`, `UserContext`, `CurrentUser`, `AuthContext`, `RequestContext` (outside `presentation/` and the platform), `UserSession`, `AuthSession`, `SessionData`, `PaginatedResult`, `PageResult`, `PaginatedResponse`, `Paginated`, `PaginationParams`, `PageParams`, `AuditLog`, `AuditLogEntry`, `AuditRecord`, `IJobScheduler`, `JobSchedulerService`, `CronScheduler`, `TaskScheduler`, `IScheduledJob`, `CronJob`, `ScheduledTask`, `BackgroundJob`, `IErrorReporter`, `ErrorReporterService`, `ErrorTracker`, `ExceptionReporter`, `CrashReporter`, `I` followed by a standard name (`IClock`, `IIdGenerator`, `IUnitOfWork`, `ISession`, ...) or a name of `standardInterfaces`; a class that implements or extends the standard interface is an adapter and is not reported |
|
|
789
|
+
| `standard/no-parallel-interface` | a class, interface or type alias declared as `ILogger`, `AppLogger`, `LoggerService`, `LoggerInterface`, `IMetrics`, `MetricsService`, `ICache`, `CacheService`, `UserContext`, `CurrentUser`, `AuthContext`, `RequestContext` (outside `presentation/` and the platform), `UserSession`, `AuthSession`, `SessionData`, `PaginatedResult`, `PageResult`, `PaginatedResponse`, `Paginated`, `PaginationParams`, `PageParams`, `AuditLog`, `AuditLogEntry`, `AuditRecord`, `IJobScheduler`, `JobSchedulerService`, `CronScheduler`, `TaskScheduler`, `IScheduledJob`, `CronJob`, `ScheduledTask`, `BackgroundJob`, `IErrorReporter`, `ErrorReporterService`, `ErrorTracker`, `ExceptionReporter`, `CrashReporter`, `CacheInvalidator`, `CacheInvalidationService`, `CachePurgeService`, `CdnPurger`, `I` followed by a standard name (`IClock`, `IIdGenerator`, `IUnitOfWork`, `ISession`, ...) or a name of `standardInterfaces`; a class that implements or extends the standard interface is an adapter and is not reported |
|
|
779
790
|
| `events/outbox-required` | `stack.events` other than `outbox` with an ORM and no `stack.events` deviation; in `domain/` and `application/`, the import of a broker client or of a bus or relay implementation; a publisher depending on more than `IntegrationEventPublisher`; a platform module that hands out a publisher and never names `OutboxPublisher` |
|
|
780
791
|
| `events/consumer-idempotent` | an integration event handler class (`application/integration/handlers/*.integration-handler.ts`) that neither carries `@IntegrationEventHandler` nor is registered in its module file under a consumer name; an `@IntegrationEventHandler` whose `consumer` is not a non-empty string literal; a free `on(` or `consume(` without `processed`; a consumer name used twice, in declarations and registrations alike |
|
|
781
792
|
| `domain-events/dispatched-on-save` | a call of `pullEvents()` in `application/` or `infrastructure/` of a context; `DomainEventDispatcher` imported, listed as a dependency or received by a constructor in `application/commands/`, `application/queries/` or a repository adapter. The module file, the tests, the platform and `main.ts` are left alone |
|
|
782
|
-
| `domain-events/transactional-before-commit` | a domain event handler (a class of `application/event-handlers/*.event-handler.ts` or `application/integration/publishers/*.publisher.ts`, or any class carrying `@DomainEventHandler`) that runs before the commit and depends on `Cache`, `Lock`, `RateLimiter`, `JobScheduler` or `EventBus` of the kernel, on a port of `application/ports/` that is not a persistence port (no adapter under `infrastructure/persistence/`, or one anywhere else under `infrastructure/`), on anything imported from `infrastructure/`, another context, the platform or a package other than `@ddd-ts-kit/kernel` and `@ddd-ts-kit/auth`; an after-commit handler (`phase: 'after-commit'` in its decorator, or in the third argument of every `.on(` of the module file that mentions it) depending on `IntegrationEventPublisher`. `check-file` leaves the adapters of a port to the whole check |
|
|
793
|
+
| `domain-events/transactional-before-commit` | a domain event handler (a class of `application/event-handlers/*.event-handler.ts` or `application/integration/publishers/*.publisher.ts`, or any class carrying `@DomainEventHandler`) that runs before the commit and depends on `Cache`, `CachePurger`, `Lock`, `RateLimiter`, `JobScheduler` or `EventBus` of the kernel, on a port of `application/ports/` that is not a persistence port (no adapter under `infrastructure/persistence/`, or one anywhere else under `infrastructure/`), on anything imported from `infrastructure/`, another context, the platform or a package other than `@ddd-ts-kit/kernel` and `@ddd-ts-kit/auth`; an after-commit handler (`phase: 'after-commit'` in its decorator, or in the third argument of every `.on(` of the module file that mentions it) depending on `IntegrationEventPublisher`. `check-file` leaves the adapters of a port to the whole check |
|
|
783
794
|
| `event-sourcing/state-in-apply` | in a class of `domain/aggregates/` extending `EventSourcedAggregate`, a write to something of `this` (assignment, increment, mutating call) outside the constructor, static methods, `apply<Fact>` methods and `restore`; `this.record(..)` inside an apply method |
|
|
784
795
|
| `event-sourcing/past-tense` | in a file of `domain/aggregates/` holding an event-sourced aggregate, a name imported from `domain/events/` whose fact (the words after the name of the aggregate) holds no past participle, or only one spelled like its imperative at its head (`SetPrice`) |
|
|
785
796
|
| `event-sourcing/store-behind-repository` | `EventStore`, `SnapshotStore`, `CheckpointStore`, `EventSourcedRepository`, `EventSerializer`, `CatchUpSubscription` or `InMemoryEventStore` imported in `domain/` or `application/` |
|
|
@@ -798,6 +809,8 @@ saying what to do instead. Exit code 1 when there is at least one error.
|
|
|
798
809
|
| `scheduling/job-triggers-use-case` | in `application/scheduling/*.job.ts`: an exported class that does not implement `ScheduledJob`; a `run` that sends no command (no `.execute(` call); a repository in the dependency list or the constructor; an import from `domain/aggregates/`, `domain/entities/`, `domain/services/` or `infrastructure/`. A `builder.job(..)` registration of a class that lives elsewhere |
|
|
799
810
|
| `scheduling/job-name` | the first argument of `@Scheduled(..)` or `.job(..)` that is not a string literal `<context>.<job-name>` in lower-case kebab-case with the context of its file; a `systemActor(..)` of a job file passing another name; one job name used twice in the project |
|
|
800
811
|
| `errors/code-unique` | under `"stack.refusals": "factories"`, in the `domain/errors/` of a context: a code set a second time, by a factory (`refusal('CODE', ..)`) or by a class (`readonly code = 'CODE'`), with the file and line of the first. The same code in two contexts is not reported |
|
|
812
|
+
| `schema/presentation-only` | under `"stack.schemas": "shared"`: in the shared kernel outside `presentation/`, an import of a validation library; in `domain/`, `application/`, `infrastructure/`, `published-language/` and the shared kernel outside `presentation/`, an import of a file of `presentation/` of the shared kernel |
|
|
813
|
+
| `schema/no-duplicate-shape` | under `"stack.schemas": "shared"`, in the presentation layer of one context, or in it and `presentation/` of the shared kernel: a DTO class or an object schema (`z.object`, `v.object`, `Type.Object`) declaring the shape of another one, with the place of the original (the shared kernel, then `presentation/http/shared/`); two contexts are not compared, and request parameters and shapes still carrying a `TODO(domain)` of the generator are not judged |
|
|
801
814
|
| `errors/known-code` | under `"stack.refusals": "factories"`, in a `*.route.ts`: a code of the `errors` list that no refusal of the context of the route sets, that no class outside the contexts sets, and that is not a code of the kit |
|
|
802
815
|
|
|
803
816
|
More ids belong to `@ddd-ts-kit/eslint-plugin`, which reads the syntax tree where this
|
|
@@ -1004,7 +1017,7 @@ the process, without a container:
|
|
|
1004
1017
|
with Prisma, every kind generated, installed for real from the packed kit: the frozen install of
|
|
1005
1018
|
a pipeline, the build, `verify`, and `affected` from the installed CLI.
|
|
1006
1019
|
- `first-class.spec.ts`: the first-class stack, `--validation class-validator --orm knex --authn
|
|
1007
|
-
keycloak --authz rebac --cache redis --audit on --errors sentry --logger pino --style declared`
|
|
1020
|
+
keycloak --authz rebac --cache redis --http-cache varnish --audit on --errors sentry --logger pino --style declared`
|
|
1008
1021
|
(legacy decorator mode), three times, with `--broker redis` (one server for the cache and the
|
|
1009
1022
|
event bus), `--broker nats` and `--broker kafka`: the same analyzers before and after the
|
|
1010
1023
|
business decisions of `test/first-class-proof.ts`, a failed job and a dead-lettered event
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"architecture-rules.d.ts","sourceRoot":"","sources":["../../../src/check/catalogue/architecture-rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"architecture-rules.d.ts","sourceRoot":"","sources":["../../../src/check/catalogue/architecture-rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AA+E7C,gHAAgH;AAChH,eAAO,MAAM,kBAAkB,EAAE,SAAS,IAAI,EA8E7C,CAAC"}
|
|
@@ -64,6 +64,8 @@ import { purityNoEnvironment } from '../rules/purity-no-environment.js';
|
|
|
64
64
|
import { purityNoSystemClock } from '../rules/purity-no-system-clock.js';
|
|
65
65
|
import { schedulingJobName } from '../rules/scheduling-job-name.js';
|
|
66
66
|
import { schedulingJobTriggersUseCase } from '../rules/scheduling-job-triggers-use-case.js';
|
|
67
|
+
import { schemaNoDuplicateShape } from '../rules/schema-no-duplicate-shape.js';
|
|
68
|
+
import { schemaPresentationOnly } from '../rules/schema-presentation-only.js';
|
|
67
69
|
import { standardNoParallelInterface } from '../rules/standard-no-parallel-interface.js';
|
|
68
70
|
import { tenancyScopedStatement } from '../rules/tenancy-scoped-statement.js';
|
|
69
71
|
import { testBuilderRequired } from '../rules/test-builder-required.js';
|
|
@@ -88,6 +90,8 @@ export const ARCHITECTURE_RULES = [
|
|
|
88
90
|
namingSuffix,
|
|
89
91
|
namingOneConceptPerFile,
|
|
90
92
|
namingSearchNotList,
|
|
93
|
+
schemaPresentationOnly,
|
|
94
|
+
schemaNoDuplicateShape,
|
|
91
95
|
testSpecRequired,
|
|
92
96
|
eventsNameFormat,
|
|
93
97
|
eventsDefinedInPublishedLanguage,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"architecture-rules.js","sourceRoot":"","sources":["../../../src/check/catalogue/architecture-rules.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,E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BAAmB;IACnB,yBAAyB;IACzB,mBAAmB;IACnB,aAAa;IACb,iBAAiB;IACjB,uBAAuB;IACvB,mBAAmB;IACnB,kBAAkB;IAClB,mBAAmB;IACnB,kBAAkB;IAClB,eAAe;IACf,WAAW;IACX,qBAAqB;IACrB,aAAa;IACb,oBAAoB;IACpB,wBAAwB;IACxB,4BAA4B;IAC5B,qCAAqC;IACrC,yBAAyB;IACzB,sBAAsB;IACtB,kCAAkC;IAClC,mCAAmC;IACnC,6BAA6B;IAC7B,kBAAkB;IAClB,aAAa;IACb,kBAAkB;IAClB,kBAAkB;IAClB,gBAAgB;IAChB,mBAAmB;IACnB,sBAAsB;IACtB,2BAA2B;IAC3B,2BAA2B;IAC3B,uBAAuB;IACvB,wBAAwB;IACxB,yBAAyB;IACzB,gCAAgC;IAChC,kBAAkB;IAClB,2BAA2B;IAC3B,oBAAoB;IACpB,yBAAyB;IACzB,gBAAgB;IAChB,4BAA4B;IAC5B,6BAA6B;IAC7B,wBAAwB;IACxB,iBAAiB;IACjB,gBAAgB;IAChB,gBAAgB;IAChB,oBAAoB;IACpB,gBAAgB;IAChB,eAAe;IACf,2BAA2B;IAC3B,wBAAwB;IACxB,qBAAqB;CACtB,CAAC"}
|
|
1
|
+
{"version":3,"file":"architecture-rules.js","sourceRoot":"","sources":["../../../src/check/catalogue/architecture-rules.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,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ources":["../../../src/check/catalogue/eslint-only-rules.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"eslint-only-rules.d.ts","sourceRoot":"","sources":["../../../src/check/catalogue/eslint-only-rules.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAAE,EA2D7F,CAAC"}
|
|
@@ -44,6 +44,10 @@ export const ESLINT_ONLY_RULES = [
|
|
|
44
44
|
id: 'presentation/controller-delegates',
|
|
45
45
|
description: 'A controller takes the bus of its method (CommandBus for POST, PUT, PATCH, DELETE; QueryBus for GET, HEAD), a request mapper and a serializer, and nothing else.',
|
|
46
46
|
},
|
|
47
|
+
{
|
|
48
|
+
id: 'presentation/shared-cache-varies',
|
|
49
|
+
description: 'A route, a controller or a route group that knows its caller (a guard other than Public, security schemes) and declares a public cache policy names in vary the request headers its answer depends on.',
|
|
50
|
+
},
|
|
47
51
|
{
|
|
48
52
|
id: 'presentation/guard-at-the-edge',
|
|
49
53
|
description: 'A *.guard.ts file imports nothing from domain/ or infrastructure/, no repository, no unit of work and no command bus.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eslint-only-rules.js","sourceRoot":"","sources":["../../../src/check/catalogue/eslint-only-rules.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAqE;IACjG;QACE,EAAE,EAAE,gCAAgC;QACpC,WAAW,EACT,0GAA0G;KAC7G;IACD;QACE,EAAE,EAAE,kCAAkC;QACtC,WAAW,EAAE,kGAAkG;KAChH;IACD;QACE,EAAE,EAAE,yBAAyB;QAC7B,WAAW,EAAE,sGAAsG;KACpH;IACD;QACE,EAAE,EAAE,wBAAwB;QAC5B,WAAW,EACT,kKAAkK;KACrK;IACD;QACE,EAAE,EAAE,+BAA+B;QACnC,WAAW,EACT,gMAAgM;KACnM;IACD;QACE,EAAE,EAAE,qBAAqB;QACzB,WAAW,EACT,kOAAkO;KACrO;IACD;QACE,EAAE,EAAE,uBAAuB;QAC3B,WAAW,EACT,gLAAgL;KACnL;IACD;QACE,EAAE,EAAE,2BAA2B;QAC/B,WAAW,EAAE,6EAA6E;KAC3F;IACD,EAAE,EAAE,EAAE,sCAAsC,EAAE,WAAW,EAAE,oDAAoD,EAAE;IACjH;QACE,EAAE,EAAE,+BAA+B;QACnC,WAAW,EACT,sHAAsH;KACzH;IACD;QACE,EAAE,EAAE,mCAAmC;QACvC,WAAW,EACT,kKAAkK;KACrK;IACD;QACE,EAAE,EAAE,gCAAgC;QACpC,WAAW,EACT,uHAAuH;KAC1H;CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"eslint-only-rules.js","sourceRoot":"","sources":["../../../src/check/catalogue/eslint-only-rules.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAqE;IACjG;QACE,EAAE,EAAE,gCAAgC;QACpC,WAAW,EACT,0GAA0G;KAC7G;IACD;QACE,EAAE,EAAE,kCAAkC;QACtC,WAAW,EAAE,kGAAkG;KAChH;IACD;QACE,EAAE,EAAE,yBAAyB;QAC7B,WAAW,EAAE,sGAAsG;KACpH;IACD;QACE,EAAE,EAAE,wBAAwB;QAC5B,WAAW,EACT,kKAAkK;KACrK;IACD;QACE,EAAE,EAAE,+BAA+B;QACnC,WAAW,EACT,gMAAgM;KACnM;IACD;QACE,EAAE,EAAE,qBAAqB;QACzB,WAAW,EACT,kOAAkO;KACrO;IACD;QACE,EAAE,EAAE,uBAAuB;QAC3B,WAAW,EACT,gLAAgL;KACnL;IACD;QACE,EAAE,EAAE,2BAA2B;QAC/B,WAAW,EAAE,6EAA6E;KAC3F;IACD,EAAE,EAAE,EAAE,sCAAsC,EAAE,WAAW,EAAE,oDAAoD,EAAE;IACjH;QACE,EAAE,EAAE,+BAA+B;QACnC,WAAW,EACT,sHAAsH;KACzH;IACD;QACE,EAAE,EAAE,mCAAmC;QACvC,WAAW,EACT,kKAAkK;KACrK;IACD;QACE,EAAE,EAAE,kCAAkC;QACtC,WAAW,EACT,wMAAwM;KAC3M;IACD;QACE,EAAE,EAAE,gCAAgC;QACpC,WAAW,EACT,uHAAuH;KAC1H;CACF,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const KERNEL = '@ddd-ts-kit/kernel';
|
|
2
2
|
const TRUSTED_PACKAGES = [KERNEL, '@ddd-ts-kit/auth'];
|
|
3
3
|
/** The ports of the kernel whose effect no transaction covers. */
|
|
4
|
-
const OUTSIDE_THE_TRANSACTION = ['Cache', 'Lock', 'RateLimiter', 'JobScheduler', 'EventBus'];
|
|
4
|
+
const OUTSIDE_THE_TRANSACTION = ['Cache', 'CachePurger', 'Lock', 'RateLimiter', 'JobScheduler', 'EventBus'];
|
|
5
5
|
/**
|
|
6
6
|
* Why a handler of `context` that runs before the commit may not depend on this, in the words
|
|
7
7
|
* that follow the name of the dependency; undefined when it may. A port of `application/ports/`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refused-before-commit.js","sourceRoot":"","sources":["../../../src/check/domain-events/refused-before-commit.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAG,oBAAoB,CAAC;AACpC,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;AACtD,kEAAkE;AAClE,MAAM,uBAAuB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"refused-before-commit.js","sourceRoot":"","sources":["../../../src/check/domain-events/refused-before-commit.ts"],"names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K,MAAM,IAAI,uBAAuB,CAAC,QAAQ,CAAC,IAAI,CAAC;QACrE,CAAC,CAAC,4CAA4C;QAC9C,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kit-error-codes.d.ts","sourceRoot":"","sources":["../../../src/check/errors/kit-error-codes.ts"],"names":[],"mappings":"AAAA,yHAAyH;AACzH,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"kit-error-codes.d.ts","sourceRoot":"","sources":["../../../src/check/errors/kit-error-codes.ts"],"names":[],"mappings":"AAAA,yHAAyH;AACzH,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAqB5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kit-error-codes.js","sourceRoot":"","sources":["../../../src/check/errors/kit-error-codes.ts"],"names":[],"mappings":"AAAA,yHAAyH;AACzH,MAAM,CAAC,MAAM,eAAe,GAAsB;IAChD,mBAAmB;IACnB,WAAW;IACX,UAAU;IACV,qBAAqB;IACrB,cAAc;IACd,WAAW;IACX,sBAAsB;IACtB,kBAAkB;IAClB,sBAAsB;IACtB,SAAS;IACT,cAAc;IACd,eAAe;IACf,oBAAoB;IACpB,gBAAgB;IAChB,wBAAwB;IACxB,gBAAgB;IAChB,eAAe;IACf,kBAAkB;CACnB,CAAC"}
|
|
1
|
+
{"version":3,"file":"kit-error-codes.js","sourceRoot":"","sources":["../../../src/check/errors/kit-error-codes.ts"],"names":[],"mappings":"AAAA,yHAAyH;AACzH,MAAM,CAAC,MAAM,eAAe,GAAsB;IAChD,mBAAmB;IACnB,WAAW;IACX,UAAU;IACV,qBAAqB;IACrB,cAAc;IACd,WAAW;IACX,sBAAsB;IACtB,kBAAkB;IAClB,sBAAsB;IACtB,SAAS;IACT,cAAc;IACd,eAAe;IACf,oBAAoB;IACpB,qBAAqB;IACrB,uBAAuB;IACvB,gBAAgB;IAChB,wBAAwB;IACxB,gBAAgB;IAChB,eAAe;IACf,kBAAkB;CACnB,CAAC"}
|
|
@@ -21,7 +21,7 @@ export const ERRORS_DOCS = {
|
|
|
21
21
|
}`,
|
|
22
22
|
},
|
|
23
23
|
'errors/known-code': {
|
|
24
|
-
why: 'The `errors` list of a route is what the OpenAPI document promises: one problem response per status of the codes it names. A code written there that no refusal sets, misspelled or left behind by a renamed factory, is a response the contract documents and the API never gives, while the refusal really raised is missing from it. A code exists when a factory or an error class of the context of the route sets it, when a class outside the contexts (the platform, the shared kernel) does, or when it is a code of the kit: VALIDATION_FAILED, NOT_FOUND, CONFLICT, INVARIANT_VIOLATION, UNAUTHORIZED, FORBIDDEN, CONCURRENCY_CONFLICT, INVALID_CRITERIA, INVALID_PAGE_REQUEST, TIMEOUT, CIRCUIT_OPEN, BULKHEAD_FULL, ATTEMPTS_EXHAUSTED, and the refusals of a file: FILE_TOO_LARGE, UNSUPPORTED_MEDIA_TYPE, FILE_NOT_FOUND, FILE_REJECTED, INVALID_FILE_KEY. A code another context sets does not count: a context answers with its own language. Judged under "stack.refusals": "factories" only.',
|
|
24
|
+
why: 'The `errors` list of a route is what the OpenAPI document promises: one problem response per status of the codes it names. A code written there that no refusal sets, misspelled or left behind by a renamed factory, is a response the contract documents and the API never gives, while the refusal really raised is missing from it. A code exists when a factory or an error class of the context of the route sets it, when a class outside the contexts (the platform, the shared kernel) does, or when it is a code of the kit: VALIDATION_FAILED, NOT_FOUND, CONFLICT, INVARIANT_VIOLATION, UNAUTHORIZED, FORBIDDEN, CONCURRENCY_CONFLICT, INVALID_CRITERIA, INVALID_PAGE_REQUEST, TIMEOUT, CIRCUIT_OPEN, BULKHEAD_FULL, ATTEMPTS_EXHAUSTED, the conditions of a write: PRECONDITION_FAILED, PRECONDITION_REQUIRED, and the refusals of a file: FILE_TOO_LARGE, UNSUPPORTED_MEDIA_TYPE, FILE_NOT_FOUND, FILE_REJECTED, INVALID_FILE_KEY. A code another context sets does not count: a context answers with its own language. Judged under "stack.refusals": "factories" only.',
|
|
25
25
|
bad: `// domain/errors/appointment.error.ts sets 'SLOT_TAKEN'
|
|
26
26
|
defineRoute({ method: 'POST', path: '/appointments', errors: ['FORBIDDEN', 'SLOT_ALREADY_TAKEN'], security: ['bearer'] }, book);`,
|
|
27
27
|
good: `defineRoute({ method: 'POST', path: '/appointments', errors: ['FORBIDDEN', 'SLOT_TAKEN'], security: ['bearer'] }, book);`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors-docs.js","sourceRoot":"","sources":["../../../src/check/explain/errors-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAsC;IAC5D,oBAAoB,EAAE;QACpB,GAAG,EAAE,y1BAAy1B;QAC91B,GAAG,EAAE;;;;;;;;EAQP;QACE,IAAI,EAAE;;;;;;;;EAQR;KACC;IACD,mBAAmB,EAAE;QACnB,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"errors-docs.js","sourceRoot":"","sources":["../../../src/check/explain/errors-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAsC;IAC5D,oBAAoB,EAAE;QACpB,GAAG,EAAE,y1BAAy1B;QAC91B,GAAG,EAAE;;;;;;;;EAQP;QACE,IAAI,EAAE;;;;;;;;EAQR;KACC;IACD,mBAAmB,EAAE;QACnB,GAAG,EAAE,whCAAwhC;QAC7hC,GAAG,EAAE;iIACwH;QAC7H,IAAI,EAAE,0HAA0H;KACjI;CACF,CAAC"}
|
|
@@ -51,7 +51,7 @@ await this.invoices.save(invoice);
|
|
|
51
51
|
await this.invoices.remove(invoice);`,
|
|
52
52
|
},
|
|
53
53
|
'domain-events/transactional-before-commit': {
|
|
54
|
-
why: "An effect of a domain event exists only if the state change that recorded the event is committed. A handler that runs before the commit runs inside the transaction, and the commit can still fail after it ran (a deferred constraint, a serialization failure, a lost connection): that is safe only when the rollback undoes everything the handler did, so a before-commit handler has transactional effects only. Judged: every production class of application/event-handlers/*.event-handler.ts and application/integration/publishers/*.publisher.ts, and any class carrying @DomainEventHandler. Its phase is after-commit when its decorator says phase: 'after-commit', or, without a decorator, when every .on(..) of <context>.module.ts whose callback mentions it has a third argument holding phase: 'after-commit'; otherwise it is before-commit. Its dependencies are the names of its dependency list, of .toClass(Handler, [..]) and the types of its constructor parameters, resolved through the imports. Before the commit it may depend on the domain/ of its context, on the kernel ports except Cache, Lock, RateLimiter, JobScheduler and EventBus, on @ddd-ts-kit/auth, on application helpers of its context, and on a port of application/ports/ only when it is a persistence port: at least one production class implements it under infrastructure/persistence/ and none anywhere else under infrastructure/. Refused: those five kernel ports, any other port of application/ports/, anything of infrastructure/, of another context, of the platform or of another package. An after-commit handler is refused IntegrationEventPublisher alone: after the commit nothing makes the outbox row atomic with a state change, so it sends a command instead.",
|
|
54
|
+
why: "An effect of a domain event exists only if the state change that recorded the event is committed. A handler that runs before the commit runs inside the transaction, and the commit can still fail after it ran (a deferred constraint, a serialization failure, a lost connection): that is safe only when the rollback undoes everything the handler did, so a before-commit handler has transactional effects only. Judged: every production class of application/event-handlers/*.event-handler.ts and application/integration/publishers/*.publisher.ts, and any class carrying @DomainEventHandler. Its phase is after-commit when its decorator says phase: 'after-commit', or, without a decorator, when every .on(..) of <context>.module.ts whose callback mentions it has a third argument holding phase: 'after-commit'; otherwise it is before-commit. Its dependencies are the names of its dependency list, of .toClass(Handler, [..]) and the types of its constructor parameters, resolved through the imports. Before the commit it may depend on the domain/ of its context, on the kernel ports except Cache, CachePurger, Lock, RateLimiter, JobScheduler and EventBus (CacheInvalidation is allowed: the purge it asks for commits with the work), on @ddd-ts-kit/auth, on application helpers of its context, and on a port of application/ports/ only when it is a persistence port: at least one production class implements it under infrastructure/persistence/ and none anywhere else under infrastructure/. Refused: those five kernel ports, any other port of application/ports/, anything of infrastructure/, of another context, of the platform or of another package. An after-commit handler is refused IntegrationEventPublisher alone: after the commit nothing makes the outbox row atomic with a state change, so it sends a command instead.",
|
|
55
55
|
bad: `// application/event-handlers/invoice-issued.event-handler.ts
|
|
56
56
|
// Mailer is implemented under infrastructure/external/: the mail leaves even when the commit fails
|
|
57
57
|
@DomainEventHandler(InvoiceIssued, { name: 'billing.invoice.issued' }, [InvoiceRepository, Mailer, Cache])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events-docs.js","sourceRoot":"","sources":["../../../src/check/explain/events-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAsC;IAC5D,oBAAoB,EAAE;QACpB,GAAG,EAAE,2LAA2L;QAChM,GAAG,EAAE,kCAAkC;QACvC,IAAI,EAAE,2CAA2C;KAClD;IACD,sCAAsC,EAAE;QACtC,GAAG,EAAE,2UAA2U;QAChV,GAAG,EAAE;uEAC8D;QACnE,IAAI,EAAE;;;IAGN;KACD;IACD,wBAAwB,EAAE;QACxB,GAAG,EAAE,wVAAwV;QAC7V,GAAG,EAAE;;;qDAG4C;QACjD,IAAI,EAAE;;;yDAG+C;KACtD;IACD,4BAA4B,EAAE;QAC5B,GAAG,EAAE,mlBAAmlB;QACxlB,GAAG,EAAE;;;qFAG4E;QACjF,IAAI,EAAE;;;;;;qCAM2B;KAClC;IACD,kCAAkC,EAAE;QAClC,GAAG,EAAE,svBAAsvB;QAC3vB,GAAG,EAAE;;;sDAG6C;QAClD,IAAI,EAAE;;;;qCAI2B;KAClC;IACD,2CAA2C,EAAE;QAC3C,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"events-docs.js","sourceRoot":"","sources":["../../../src/check/explain/events-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAsC;IAC5D,oBAAoB,EAAE;QACpB,GAAG,EAAE,2LAA2L;QAChM,GAAG,EAAE,kCAAkC;QACvC,IAAI,EAAE,2CAA2C;KAClD;IACD,sCAAsC,EAAE;QACtC,GAAG,EAAE,2UAA2U;QAChV,GAAG,EAAE;uEAC8D;QACnE,IAAI,EAAE;;;IAGN;KACD;IACD,wBAAwB,EAAE;QACxB,GAAG,EAAE,wVAAwV;QAC7V,GAAG,EAAE;;;qDAG4C;QACjD,IAAI,EAAE;;;yDAG+C;KACtD;IACD,4BAA4B,EAAE;QAC5B,GAAG,EAAE,mlBAAmlB;QACxlB,GAAG,EAAE;;;qFAG4E;QACjF,IAAI,EAAE;;;;;;qCAM2B;KAClC;IACD,kCAAkC,EAAE;QAClC,GAAG,EAAE,svBAAsvB;QAC3vB,GAAG,EAAE;;;sDAG6C;QAClD,IAAI,EAAE;;;;qCAI2B;KAClC;IACD,2CAA2C,EAAE;QAC3C,GAAG,EAAE,uxDAAuxD;QAC5xD,GAAG,EAAE;;;;2HAIkH;QACvH,IAAI,EAAE;;;;;;;;;;;;uCAY6B;KACpC;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule-docs.d.ts","sourceRoot":"","sources":["../../../src/check/explain/rule-docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"rule-docs.d.ts","sourceRoot":"","sources":["../../../src/check/explain/rule-docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAqBpD,oGAAoG;AACpG,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAoBvD,CAAC"}
|
|
@@ -12,6 +12,7 @@ import { LIFECYCLE_DOCS } from './lifecycle-docs.js';
|
|
|
12
12
|
import { PERSISTENCE_DOCS } from './persistence-docs.js';
|
|
13
13
|
import { PORTS_DOCS } from './ports-docs.js';
|
|
14
14
|
import { SCHEDULING_DOCS } from './scheduling-docs.js';
|
|
15
|
+
import { SCHEMA_DOCS } from './schema-docs.js';
|
|
15
16
|
import { STANDARD_DOCS } from './standard-docs.js';
|
|
16
17
|
import { TENANCY_DOCS } from './tenancy-docs.js';
|
|
17
18
|
import { TREE_DOCS } from './tree-docs.js';
|
|
@@ -32,6 +33,7 @@ export const RULE_DOCS = {
|
|
|
32
33
|
...PERSISTENCE_DOCS,
|
|
33
34
|
...PORTS_DOCS,
|
|
34
35
|
...SCHEDULING_DOCS,
|
|
36
|
+
...SCHEMA_DOCS,
|
|
35
37
|
...STANDARD_DOCS,
|
|
36
38
|
...TENANCY_DOCS,
|
|
37
39
|
...TREE_DOCS,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule-docs.js","sourceRoot":"","sources":["../../../src/check/explain/rule-docs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,SAA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O,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,oGAAoG;AACpG,MAAM,CAAC,MAAM,SAAS,GAAsC;IAC1D,GAAG,UAAU;IACb,GAAG,UAAU;IACb,GAAG,YAAY;IACf,GAAG,WAAW;IACd,GAAG,mBAAmB;IACtB,GAAG,WAAW;IACd,GAAG,YAAY;IACf,GAAG,aAAa;IAChB,GAAG,UAAU;IACb,GAAG,WAAW;IACd,GAAG,cAAc;IACjB,GAAG,gBAAgB;IACnB,GAAG,UAAU;IACb,GAAG,eAAe;IAClB,GAAG,WAAW;IACd,GAAG,aAAa;IAChB,GAAG,YAAY;IACf,GAAG,SAAS;IACZ,GAAG,WAAW;CACf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-docs.d.ts","sourceRoot":"","sources":["../../../src/check/explain/schema-docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA0BzD,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export const SCHEMA_DOCS = {
|
|
2
|
+
'schema/presentation-only': {
|
|
3
|
+
why: 'A schema says what a client sends or receives: it is a presentation type, and it changes with the contract, not with the model. The shared kernel is imported by every layer of every context, so a schema written there reaches the domain and the use cases, which then depend on the shape of a request. A schema shared by several contexts therefore lives under presentation/ of the shared kernel, and only presentation layers import it; a schema of one context lives in its presentation layer (domain/ and application/ are already refused any validation library by the layer rules). Judged: in the shared kernel outside presentation/, an import of a validation library (zod, class-validator, class-transformer, class-validator-jsonschema, valibot, arktype, TypeBox, @ddd-ts-kit/validation); in domain/, application/, infrastructure/ and published-language/ of a context, and in the shared kernel outside presentation/, an import of a file of presentation/ of the shared kernel. Specs are not judged. Judged under "stack.schemas": "shared" only.',
|
|
4
|
+
bad: `// shared-kernel/money.ts
|
|
5
|
+
import { IsInt, IsString } from 'class-validator';
|
|
6
|
+
export class MoneyDto { @IsInt() cents = 0; @IsString() currency = ''; }
|
|
7
|
+
// contexts/billing/application/commands/issue-invoice/issue-invoice.command.ts
|
|
8
|
+
import { MoneyDto } from '@/shared-kernel/presentation/money.schema';`,
|
|
9
|
+
good: `// shared-kernel/presentation/money.schema.ts
|
|
10
|
+
export class Money { @IsInt() cents = 0; @IsString() currency = ''; }
|
|
11
|
+
// contexts/billing/presentation/http/invoices/issue-invoice/issue-invoice.mapper.ts
|
|
12
|
+
import type { Money } from '@/shared-kernel/presentation/money.schema';
|
|
13
|
+
// maps Money to the command, which carries plain values`,
|
|
14
|
+
},
|
|
15
|
+
'schema/no-duplicate-shape': {
|
|
16
|
+
why: 'Two routes that declare the same shape by hand document it twice, as two unrelated schemas: the contract grows a copy per route, a client SDK generates two types for one thing, and the day the shape changes one copy is forgotten. Declared once and shared, it lands once in components.schemas and every route points at it with $ref; a route that needs a part of it derives that part (pick, omit, partial, extend) from the one declaration. Judged within one context, and between a context and presentation/ of the shared kernel: two contexts may declare the same structure, because an equal shape with two meanings is two concepts and sharing it would couple contexts that stay extractable. Compared: a DTO class (a class of the module that extends nothing, has no method and decorates each property), compared by its property names, their decorators with their arguments and whether each is optional; and the object of a schema builder (`z.object({...})`, `v.object({...})`, `Type.Object({...})`), compared by its entries whatever their order and layout. Empty shapes, shapes that still carry a TODO(domain) of the generator (every search line starts as `{ id }`), *.params.ts, *.query.ts and *.headers.ts files and the objects assigned to params, query or headers are not judged: a request parameter is documented per operation, never as a component. The original is the declaration of the shared kernel, then the one under presentation/http/shared/ of the context, then the first in path order; each copy is reported with the place of the original. Judged under "stack.schemas": "shared" only.',
|
|
17
|
+
bad: `// appointments/cancel-appointment/cancel-appointment.accepted.ts
|
|
18
|
+
export class CancelAppointmentAccepted { @IsString() id = ''; }
|
|
19
|
+
// appointments/confirm-appointment/confirm-appointment.accepted.ts
|
|
20
|
+
export class ConfirmAppointmentAccepted { @IsString() id = ''; }`,
|
|
21
|
+
good: `// both controllers answer with the identifier schema of the platform
|
|
22
|
+
import { acceptedSchema, type Accepted } from '@ddd-ts-kit/http';
|
|
23
|
+
response: { status: 201, description: 'Done.', body: acceptedSchema },
|
|
24
|
+
// a shape of the context, declared once: presentation/http/shared/slot.schema.ts
|
|
25
|
+
export const slotSchema = z.object({ startsAt: z.iso.datetime(), endsAt: z.iso.datetime() }).meta({ id: 'Slot' });`,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=schema-docs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-docs.js","sourceRoot":"","sources":["../../../src/check/explain/schema-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAsC;IAC5D,0BAA0B,EAAE;QAC1B,GAAG,EAAE,mhCAAmhC;QACxhC,GAAG,EAAE;;;;sEAI6D;QAClE,IAAI,EAAE;;;;yDAI+C;KACtD;IACD,2BAA2B,EAAE;QAC3B,GAAG,EAAE,4jDAA4jD;QACjkD,GAAG,EAAE;;;iEAGwD;QAC7D,IAAI,EAAE;;;;mHAIyG;KAChH;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domain-events-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/domain-events-fixtures.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"domain-events-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/domain-events-fixtures.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA4N5C,eAAO,MAAM,sBAAsB,EAAE,SAAS,OAAO,EAA4D,CAAC"}
|
|
@@ -81,6 +81,24 @@ const TRANSACTIONAL_BEFORE_COMMIT = [
|
|
|
81
81
|
expect: { file: EVENT_HANDLER },
|
|
82
82
|
files: declaredProject({ ...DECLARED_CONTEXT, [EVENT_HANDLER]: reacting([FROM_KERNEL('Cache')], ['Cache']) }),
|
|
83
83
|
},
|
|
84
|
+
{
|
|
85
|
+
ruleId: TRANSACTIONAL,
|
|
86
|
+
name: 'a before-commit handler given the purger of the shared caches, which purges before the commit',
|
|
87
|
+
expect: { file: EVENT_HANDLER },
|
|
88
|
+
files: declaredProject({
|
|
89
|
+
...DECLARED_CONTEXT,
|
|
90
|
+
[EVENT_HANDLER]: reacting([FROM_KERNEL('CachePurger')], ['CachePurger']),
|
|
91
|
+
}),
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
ruleId: TRANSACTIONAL,
|
|
95
|
+
name: 'a before-commit handler asking for a purge after the commit',
|
|
96
|
+
expect: 'pass',
|
|
97
|
+
files: declaredProject({
|
|
98
|
+
...DECLARED_CONTEXT,
|
|
99
|
+
[EVENT_HANDLER]: reacting([FROM_KERNEL('CacheInvalidation')], ['CacheInvalidation']),
|
|
100
|
+
}),
|
|
101
|
+
},
|
|
84
102
|
{
|
|
85
103
|
ruleId: TRANSACTIONAL,
|
|
86
104
|
name: 'a before-commit handler given a port whose adapter is under infrastructure/external',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domain-events-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/domain-events-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;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ACN,GAAG,CACJ,CAAC;AACJ,CAAC;AAED,2GAA2G;AAC3G,SAAS,YAAY,CAAC,YAA+B,EAAE,UAA6B;IAClF,OAAO,MAAM,CACX,YAAY,CAAC,OAAO,EAAE,GAAG,YAAY,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,MAAM,GAAG,EACrE,kCAAkC,YAAY,GAAG,EACjD,mGAAmG,EACnG,uHAAuH,EACvH,EAAE,EACF,yCAAyC,CAAC,mBAAmB,EAAE,OAAO,EAAE,GAAG,YAAY,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EACvG,mFAAmF,EACnF,gEAAgE,EAChE,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,OAAO,SAAS,EAAE,CAAC,EACpD,KAAK,EACL,GAAG,CACJ,CAAC;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"domain-events-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/domain-events-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,GACpH,KAAK,CAAC;AAER,MAAM,IAAI,GAAG,kCAAkC,CAAC;AAChD,MAAM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,EACT,OAAO,GAAG,OAAO,GAAG,GAAG,EACvB,MAAM,EACN,GAAG,CACJ,CAAC;AACJ,CAAC;AAED,2GAA2G;AAC3G,SAAS,YAAY,CAAC,YAA+B,EAAE,UAA6B;IAClF,OAAO,MAAM,CACX,YAAY,CAAC,OAAO,EAAE,GAAG,YAAY,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,MAAM,GAAG,EACrE,kCAAkC,YAAY,GAAG,EACjD,mGAAmG,EACnG,uHAAuH,EACvH,EAAE,EACF,yCAAyC,CAAC,mBAAmB,EAAE,OAAO,EAAE,GAAG,YAAY,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EACvG,mFAAmF,EACnF,gEAAgE,EAChE,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,OAAO,SAAS,EAAE,CAAC,EACpD,KAAK,EACL,GAAG,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/fixtures.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/fixtures.ts"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,SAAS,OAAO,EAsCtC,CAAC"}
|
|
@@ -29,6 +29,7 @@ import { PERSISTENCE_FIXTURES } from './persistence-fixtures.js';
|
|
|
29
29
|
import { PORTS_FIXTURES } from './ports-fixtures.js';
|
|
30
30
|
import { PURITY_FIXTURES } from './purity-fixtures.js';
|
|
31
31
|
import { SCHEDULING_FIXTURES } from './scheduling-fixtures.js';
|
|
32
|
+
import { SCHEMA_FIXTURES } from './schema-fixtures.js';
|
|
32
33
|
import { STANDARD_FIXTURES } from './standard-fixtures.js';
|
|
33
34
|
import { TENANCY_FIXTURES } from './tenancy-fixtures.js';
|
|
34
35
|
import { TEST_FIXTURES } from './test-fixtures.js';
|
|
@@ -53,6 +54,7 @@ export const FIXTURES = [
|
|
|
53
54
|
...DECLARATIONS_FIXTURES,
|
|
54
55
|
...DOMAIN_EVENTS_FIXTURES,
|
|
55
56
|
...ERRORS_FIXTURES,
|
|
57
|
+
...SCHEMA_FIXTURES,
|
|
56
58
|
...EVENT_SOURCING_FIXTURES,
|
|
57
59
|
...EVENTS_FIXTURES,
|
|
58
60
|
...EXTENSION_FIXTURES,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,sB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,GAAG,cAAc;IACjB,GAAG,oBAAoB;IACvB,GAAG,eAAe;IAClB,GAAG,8BAA8B;IACjC,GAAG,iBAAiB;IACpB,GAAG,gBAAgB;IACnB,GAAG,iBAAiB;IACpB,GAAG,qBAAqB;IACxB,GAAG,sBAAsB;IACzB,GAAG,eAAe;IAClB,GAAG,uBAAuB;IAC1B,GAAG,eAAe;IAClB,GAAG,kBAAkB;IACrB,GAAG,oBAAoB;IACvB,GAAG,cAAc;IACjB,GAAG,mBAAmB;IACtB,GAAG,gBAAgB;IACnB,GAAG,iBAAiB;IACpB,GAAG,mBAAmB;IACtB,GAAG,cAAc;IACjB,GAAG,eAAe;IAClB,GAAG,kBAAkB;IACrB,GAAG,eAAe;IAClB,GAAG,eAAe;IAClB,GAAG,oBAAoB;IACvB,GAAG,cAAc;IACjB,GAAG,eAAe;IAClB,GAAG,mBAAmB;IACtB,GAAG,iBAAiB;IACpB,GAAG,gBAAgB;IACnB,GAAG,aAAa;IAChB,GAAG,gBAAgB;IACnB,GAAG,aAAa;CACjB,CAAC"}
|
|
1
|
+
{"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,iB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C;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAuB;IAC1C,GAAG,uBAAuB;IAC1B,GAAG,uBAAuB;IAC1B,GAAG,cAAc;IACjB,GAAG,cAAc;IACjB,GAAG,oBAAoB;IACvB,GAAG,eAAe;IAClB,GAAG,8BAA8B;IACjC,GAAG,iBAAiB;IACpB,GAAG,gBAAgB;IACnB,GAAG,iBAAiB;IACpB,GAAG,qBAAqB;IACxB,GAAG,sBAAsB;IACzB,GAAG,eAAe;IAClB,GAAG,eAAe;IAClB,GAAG,uBAAuB;IAC1B,GAAG,eAAe;IAClB,GAAG,kBAAkB;IACrB,GAAG,oBAAoB;IACvB,GAAG,cAAc;IACjB,GAAG,mBAAmB;IACtB,GAAG,gBAAgB;IACnB,GAAG,iBAAiB;IACpB,GAAG,mBAAmB;IACtB,GAAG,cAAc;IACjB,GAAG,eAAe;IAClB,GAAG,kBAAkB;IACrB,GAAG,eAAe;IAClB,GAAG,eAAe;IAClB,GAAG,oBAAoB;IACvB,GAAG,cAAc;IACjB,GAAG,eAAe;IAClB,GAAG,mBAAmB;IACtB,GAAG,iBAAiB;IACpB,GAAG,gBAAgB;IACnB,GAAG,aAAa;IAChB,GAAG,gBAAgB;IACnB,GAAG,aAAa;CACjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/schema-fixtures.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA+M5C,eAAO,MAAM,eAAe,EAAE,SAAS,OAAO,EAAkD,CAAC"}
|