ddd-ts-kit 0.13.0 → 0.14.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 +6 -2
- package/dist/check/catalogue/architecture-rules.d.ts.map +1 -1
- package/dist/check/catalogue/architecture-rules.js +2 -0
- package/dist/check/catalogue/architecture-rules.js.map +1 -1
- package/dist/check/errors/kit-error-codes.d.ts.map +1 -1
- package/dist/check/errors/kit-error-codes.js +1 -0
- package/dist/check/errors/kit-error-codes.js.map +1 -1
- package/dist/check/explain/authz-docs.d.ts.map +1 -1
- package/dist/check/explain/authz-docs.js +12 -0
- package/dist/check/explain/authz-docs.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/fixtures/authz-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/authz-fixtures.js +38 -1
- package/dist/check/fixtures/authz-fixtures.js.map +1 -1
- package/dist/check/rules/authz-fields-by-schema.d.ts +3 -0
- package/dist/check/rules/authz-fields-by-schema.d.ts.map +1 -0
- package/dist/check/rules/authz-fields-by-schema.js +33 -0
- package/dist/check/rules/authz-fields-by-schema.js.map +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +2 -0
- package/dist/commands/init.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 +14 -0
- package/dist/config/stack.d.ts.map +1 -1
- package/dist/config/stack.js +2 -0
- package/dist/config/stack.js.map +1 -1
- package/dist/describe/context-description.d.ts +6 -0
- package/dist/describe/context-description.d.ts.map +1 -1
- package/dist/describe/format-description.js +9 -1
- package/dist/describe/format-description.js.map +1 -1
- package/dist/describe/presentation-of-route.d.ts +4 -0
- package/dist/describe/presentation-of-route.d.ts.map +1 -0
- package/dist/describe/presentation-of-route.js +15 -0
- package/dist/describe/presentation-of-route.js.map +1 -0
- package/dist/describe/read-controllers.d.ts.map +1 -1
- package/dist/describe/read-controllers.js +4 -1
- package/dist/describe/read-controllers.js.map +1 -1
- package/dist/describe/read-routes.d.ts.map +1 -1
- package/dist/describe/read-routes.js +2 -0
- package/dist/describe/read-routes.js.map +1 -1
- package/dist/generate/kinds/form-kind.d.ts +3 -0
- package/dist/generate/kinds/form-kind.d.ts.map +1 -0
- package/dist/generate/kinds/form-kind.js +38 -0
- package/dist/generate/kinds/form-kind.js.map +1 -0
- package/dist/generate/kinds/presentation/controller-of.d.ts +10 -0
- package/dist/generate/kinds/presentation/controller-of.d.ts.map +1 -0
- package/dist/generate/kinds/presentation/controller-of.js +13 -0
- package/dist/generate/kinds/presentation/controller-of.js.map +1 -0
- package/dist/generate/kinds/presentation/controller-source.d.ts +13 -0
- package/dist/generate/kinds/presentation/controller-source.d.ts.map +1 -0
- package/dist/generate/kinds/presentation/controller-source.js +44 -0
- package/dist/generate/kinds/presentation/controller-source.js.map +1 -0
- package/dist/generate/kinds/representation-kind.d.ts +3 -0
- package/dist/generate/kinds/representation-kind.d.ts.map +1 -0
- package/dist/generate/kinds/representation-kind.js +54 -0
- package/dist/generate/kinds/representation-kind.js.map +1 -0
- package/dist/generate/kinds.d.ts.map +1 -1
- package/dist/generate/kinds.js +4 -0
- package/dist/generate/kinds.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 +2 -1
- package/dist/help/usage.js.map +1 -1
- package/dist/init/files/platform-files.js +3 -1
- package/dist/init/files/platform-files.js.map +1 -1
- package/dist/init/manifest/versions.js +24 -24
- package/dist/init/stack/resolve-stack.d.ts.map +1 -1
- package/dist/init/stack/resolve-stack.js +15 -1
- package/dist/init/stack/resolve-stack.js.map +1 -1
- package/dist/init/stack/stack-options.d.ts +2 -0
- package/dist/init/stack/stack-options.d.ts.map +1 -1
- package/dist/stack/stack-vars.js +19 -2
- 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/docs/openapi.json.tpl +15 -0
- package/templates/init/CLAUDE.md.tpl +2 -2
- package/templates/init/platform/auth/http-boundary.ts.tpl +20 -3
- package/templates/init/platform/compose-application.manual.ts.tpl +18 -0
- package/templates/init/platform/compose-application.tsyringe.ts.tpl +23 -0
- package/templates/init/platform/http/presentation-of.ts.tpl +27 -0
- package/templates/init/platform/http/start-http-server.express.ts.tpl +1 -1
- package/templates/init/platform/http/start-http-server.fastify.ts.tpl +1 -1
- package/templates/init/platform/http/start-http-server.hono.ts.tpl +1 -1
- package/templates/init/platform/http/start-http-server.nest.ts.tpl +2 -2
- package/templates/init/platform/http/with-documentation.ts.tpl +13 -3
- package/templates/init/platform/http/with-forms.ts.tpl +7 -0
- package/templates/init/rules/application.md.tpl +1 -1
- package/templates/init/rules/presentation.md.tpl +1 -1
- package/templates/init/scripts/openapi.ts.tpl +27 -6
- package/templates/pipeline/biome.json.tpl +1 -0
- package/templates/pipeline/package-scripts.json +1 -1
package/README.md
CHANGED
|
@@ -202,6 +202,7 @@ config, `docsUi`, `ci` and `logger` included.
|
|
|
202
202
|
| tracing | wired once, by the platform (`tracing/platform-only`): no `decorate` hook, no `decorate-bindings.ts`. `tracing.ts` starts `initTracing` of `@ddd-ts-kit/tracing/node` before any other module, on what `config/read-tracing.ts` validates: `OTEL_EXPORTER_OTLP_ENDPOINT` (a URL; left out, no span leaves the process), `TRACE_SAMPLE_RATIO` (0 to 1) and `TRACE_CONSUMERS` (`continue`, the default: a consumed event stays in the trace of its publication; `link`: each delivery starts a trace linked to it). With `--di tsyringe`: `lay-foundations.ts` builds `traceApplication({ consumers })`, `compose-application.ts` hands it to `kernelModule({ instrumentation })` (one span per use case, repository call, domain event, publication, consumer and job) and gives the outbox relay `tracedPublisher(bus)`. With hand wiring: `create-platform.ts` applies the members of `traceApplication()` itself (`useCase` on both buses, `domainEvents`, `publisher`, `binding` around every adapter, `job`, `executionScope`, `errorReporter`), with `tracedSubscriber` and `tracedPublisher` around the provider. With an HTTP stack, in both families, `auth/http-boundary.ts` sets `around: tracedRoutes()`: one `SERVER` span per request, named by its route |
|
|
203
203
|
| `--logger` | `src/platform/observability/create-logger.ts`, one per choice: `stdout` (the default) is the `StdoutLogger` of `@ddd-ts-kit/aspects`, JSON lines, credentials not redacted; `pino` is `createPinoLogger` of `@ddd-ts-kit/pino` (dependencies `pino` and `pino-pretty`); `winston` is `createWinstonLogger` of `@ddd-ts-kit/winston`; these two redact the credential keys of the kernel. Every entry carries `traceLogFields(scope)`: the correlation id, origin, actor and tenant of the work in progress and the ids of the active trace. `LOG_LEVEL`, `LOG_FORMAT` (`json`, the default, or `pretty`; with `stdout`, which has no pretty format, `pretty` is refused when the configuration is loaded) and `LOG_SCRUB_MESSAGES` (`[message removed]` in place of the message of a logged error that is not a `DomainError`) are validated in `config/load-config.ts`. Stopping the application flushes the error reporter, then the logger, last: `container.stop()` does it on tsyringe, `compose-application.ts` flushes explicitly with hand wiring. The tools and the tests compose the application without `log` and write nothing |
|
|
204
204
|
| `src/platform/auth/` | `create-authenticator.ts` (`--authn jwt`: `JwtAuthenticator` on `AUTH_ISSUER`, `AUTH_AUDIENCE`, `AUTH_JWKS_URI`; `--authn keycloak`: `keycloakAuthenticator` on `KEYCLOAK_URL`, `KEYCLOAK_REALM`, `KEYCLOAK_AUDIENCE` and the optional `KEYCLOAK_CLIENT_ID`; `--authn none`: `development-header-authenticator.ts`, which reads `x-development-actor` and throws in production), `principal-of.ts`, `security-schemes.ts`, `offline-authenticator.ts`, `http-boundary.ts` (`resolvePrincipal` answering a `Session`, `executionScope`, `errorMapper` and `onError`, spread into the mount options: every request runs inside the execution scope, with its correlation id), `create-authorizer.ts` and the files of the model (`roles.ts`, with the role `system` every system actor holds; `attribute-policies.ts`; `relationship-schema.ts`, `create-tuple-store.ts` and its contract spec, `relation-tuples.ts`, `relate-system-actors.ts`, `permission-mapping.ts` and `permissions.ts`; `custom-authorizer.ts`, its `authorizerContract` spec and `permissions.ts`), `authorization.ts` (`authorizationModule` with tsyringe) or `use-case-protection.ts` (the guard of the hand-wired buses), `access-policies.ts`, and with `--audit off` `log-decisions.ts` (one log entry per decision, ids and codes only). Without an HTTP stack there is no authenticator and no boundary |
|
|
205
|
+
| `--representations negotiated`, `--forms on` | `src/platform/http/presentation-of.ts` (`Representations.standard()` with `negotiated`, and `fieldDeciderOf` over the `Access` of the application), spread into the HTTP boundary and given to the contract script; with `--forms on`, `src/platform/http/with-forms.ts` adds `formRoutes` to the routes and `scripts/openapi.ts` writes `openapi/forms/<operationId>.json`. Both are the default with an HTTP stack; `json` and `off` leave them out ([docs/CONFIG.md](../../docs/CONFIG.md)) |
|
|
205
206
|
| `--audit on` | `src/platform/audit/`: `create-audit.ts` (the trail, the `onDecision` of the authorization, the refusals of the guards at the edge given to the HTTP boundary as `onGuardRefusal`, the middleware before the unit of work, the integration events subscribed under the consumer name `audit`), `audited-events.ts` (the registry `generate integration-event` adds to), `audit.module.ts`, and with an HTTP stack the read side: `audit.permissions.ts` (`audit:trail.read`), `search-audit-entries.query.ts`, its handler, `search-audit-entries.route.ts` (`GET /audit/entries`: cursor pages, filters `actorId`, `action`, `outcome`, `correlationId`). It is a capability of the platform, not a bounded context: no model, one protected query over the `AuditReader` port, bounded by the tenant of the actor (with `--tenancy shared-table`, by the tenant of the work through `TenantAuditReader`: platform staff read across tenants only inside `acrossTenants`). The refusals of a caller without a credential are not recorded. A scheduled job is audited like a request: origin `schedule`, actor `system:<context>.<job>`. With knex the two tables and their append-only triggers are created by the first migration; with drizzle the tables are in `schema.ts` and `npm run db:audit-guard` prints the trigger statements for a custom migration; with prisma, typeorm, `custom` or no ORM the trail is an `InMemoryAuditTrail` behind a `TODO(platform)`. The test databases leave the audit schema out of `reset()` |
|
|
206
207
|
| `--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)) |
|
|
207
208
|
| `--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 |
|
|
@@ -289,6 +290,8 @@ ddd-ts-kit generate --help --json
|
|
|
289
290
|
| `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 |
|
|
290
291
|
| `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 |
|
|
291
292
|
| `guard` | `<context> <Name>` | `presentation/http/guards/<name>.guard.ts`: a declared guard class to fill, and its spec |
|
|
293
|
+
| `representation` | `<context> <UseCase> <xml\|csv\|media/type>[,...]` | adds `produces` to the `@Controller` of the use case, and `consumes: ['application/xml']` to one that receives a body when XML is asked; says when CSV needs a page or a streamed list, and when `stack.representations` is not `negotiated` |
|
|
294
|
+
| `form` | `<context> <UseCase>` | adds `const form = defineForm<Infer<typeof body>>({ ... })` before the `@Controller` of a use case that receives a body, and `form` to its options: the hints of its form at `GET /forms/<operationId>` |
|
|
292
295
|
| `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 |
|
|
293
296
|
| `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` |
|
|
294
297
|
| `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 |
|
|
@@ -637,7 +640,7 @@ ddd-ts-kit describe <context>
|
|
|
637
640
|
|
|
638
641
|
One context as facts read from the config and the source text, in both styles: use cases with
|
|
639
642
|
their permission (or `public`), routes (method, path, operation id, use case, schema names, error
|
|
640
|
-
codes), consumed and published events, ports with their adapters, policies, gateways with their
|
|
643
|
+
codes, the media types they answer and read in besides JSON, their form), consumed and published events, ports with their adapters, policies, gateways with their
|
|
641
644
|
upstream, scheduled jobs, upstreams and downstreams. Field lists are not guessed: they are in
|
|
642
645
|
`openapi/openapi.yaml` and `docs/integration/event-catalog.md`. `docs` writes the same facts in
|
|
643
646
|
each `CONTEXT.md`.
|
|
@@ -650,7 +653,7 @@ each `CONTEXT.md`.
|
|
|
650
653
|
| `glossary`, `aggregates`, `domainEvents`, `permissions` | names |
|
|
651
654
|
| `upstreams`, `downstreams` | `{ context, relationship }` |
|
|
652
655
|
| `useCases` | `{ kind, name, permission, file }`, `kind` being `command` or `query` |
|
|
653
|
-
| `routes` | `{ method, path, operationId, useCase, permission, request: [{ part, schema }], responses: [{ status, schema }], errors, file }` |
|
|
656
|
+
| `routes` | `{ method, path, operationId, useCase, permission, request: [{ part, schema }], responses: [{ status, schema }], errors, file }`, and `produces`, `consumes` (media types besides JSON) and `form` (`GET /forms/<operationId>`) when the route declares them |
|
|
654
657
|
| `consumedEvents` | `{ type, version, from, handler, consumer, file }` |
|
|
655
658
|
| `publishedEvents` | `{ type, versions, publishers }` |
|
|
656
659
|
| `ports` | `{ name, kind, adapters, file }`, `kind` being that of its binding (`repository`, `external`, `gateway`) |
|
|
@@ -783,6 +786,7 @@ saying what to do instead. Exit code 1 when there is at least one error.
|
|
|
783
786
|
| `authz/declared` | in a module file, `builder.command(X)` or `builder.query(X)` without `.requires(` or `.public(` in its chain, unless the message class carries `@Requires` or `@Public` of `@ddd-ts-kit/kernel/declarations`; with manual or nest wiring, a command or query class absent from every `requires(X, ...)` and `publicUseCase(X)` of the module file and of `application/authorization/`; a `defineRoute` without `security` (the route type refuses it already, and an empty list too: this is the text-level net for a definition built loosely); in the declared style, the exported class of a `*.command.ts` or `*.query.ts` file carrying neither `@Requires` nor `@Public` |
|
|
784
787
|
| `authz/in-application` | `presentation/`: a test on roles, `isAdmin`, the import of an authorizer or of `Access`; `infrastructure/`: `authorize(` or `check(` on an authorizer or access, `ForbiddenError`; `domain/`: any import of `@ddd-ts-kit/auth`, of the actor types of the kernel (`Actor`, `ActorContext`, `Session`, `ExecutionContext`, the authorized messages), a read of `.roles` or `.permissions` on an actor. The request glue of `@ddd-ts-kit/auth` (`actorOf`, `sessionOf`, `resolveSession`, `SessionAuthenticator`) is free in `presentation/`. `presentation/` and `infrastructure/`: the import of `Requires`, `Public` or `Policy` from `@ddd-ts-kit/kernel/declarations`, or of the ports `Access` and `PolicyAccess` from `@ddd-ts-kit/auth`; they are free in `application/` |
|
|
785
788
|
| `authz/actor-explicit` | in `domain/` and `application/`: `ActorContext`, `ExecutionScope` (as a type or as a value: the class is the token of a dependency list), `AsyncLocalStorageExecutionScope`, `ScopedActorContext`, `AsyncLocalStorage`; `.current()` or `.require()` on an actor context or on something named `scope`, `scopes` or `...executionScope`; an import of `stampCreation`, `stampUpdate` or `tenantScopeOf` |
|
|
789
|
+
| `authz/fields-by-schema` | under `application/queries/`: `roles.includes(`, `.some(`, `.every(`, `.find(`, `.indexOf(`, a comparison with a `role`, `isAdmin` |
|
|
786
790
|
| `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) |
|
|
787
791
|
| `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 |
|
|
788
792
|
| `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 |
|
|
@@ -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;AAgF7C,gHAAgH;AAChH,eAAO,MAAM,kBAAkB,EAAE,SAAS,IAAI,EA+E7C,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { aspectsOutsideIn } from '../rules/aspects-outside-in.js';
|
|
2
2
|
import { authzActorExplicit } from '../rules/authz-actor-explicit.js';
|
|
3
|
+
import { authzFieldsBySchema } from '../rules/authz-fields-by-schema.js';
|
|
3
4
|
import { authzDeclared } from '../rules/authz-declared.js';
|
|
4
5
|
import { authzInApplication } from '../rules/authz-in-application.js';
|
|
5
6
|
import { cleanBlankLines } from '../rules/clean-blank-lines.js';
|
|
@@ -128,6 +129,7 @@ export const ARCHITECTURE_RULES = [
|
|
|
128
129
|
authzDeclared,
|
|
129
130
|
authzInApplication,
|
|
130
131
|
authzActorExplicit,
|
|
132
|
+
authzFieldsBySchema,
|
|
131
133
|
aspectsOutsideIn,
|
|
132
134
|
tracingPlatformOnly,
|
|
133
135
|
tenancyScopedStatement,
|
|
@@ -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,uBAAu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jD,iBAAiB;IACjB,sBAAsB;IACtB,iCAAiC;IACjC,iCAAiC;IACjC,4BAA4B;IAC5B,2BAA2B;IAC3B,mCAAmC;IACnC,cAAc;IACd,UAAU;IACV,cAAc;IACd,YAAY;IACZ,uBAAuB;IACvB,mBAAmB;IACnB,sBAAsB;IACtB,sBAAsB;IACtB,gBAAgB;IAChB,gBAAgB;IAChB,gCAAgC;IAChC,WAAW;IACX,mBAAmB;IACnB,oBAAoB;IACpB,oBAAoB;IACpB,uBAAuB;IACvB,0BAA0B;IAC1B,mBAAmB;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,gCAA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B,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 +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,EAsB5C,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,qBAAqB;IACrB,uBAAuB;IACvB,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,gBAAgB;IAChB,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authz-docs.d.ts","sourceRoot":"","sources":["../../../src/check/explain/authz-docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"authz-docs.d.ts","sourceRoot":"","sources":["../../../src/check/explain/authz-docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAwDxD,CAAC"}
|
|
@@ -42,5 +42,17 @@ const { actor } = command;
|
|
|
42
42
|
// infrastructure/persistence/drizzle-invoice.repository.ts
|
|
43
43
|
const row = { ...toRow(invoice), ...stampCreation(this.scope, this.clock), ...tenantScopeOf(this.scope) };`,
|
|
44
44
|
},
|
|
45
|
+
'authz/fields-by-schema': {
|
|
46
|
+
why: 'A query that removes a field for the callers without a role answers one way in JSON and is forgotten in the CSV export, the XML of a partner and the form of the front end, and nobody reading the contract knows the field may be missing. Marked on the response schema with withFieldAccess of @ddd-ts-kit/http, the field is reserved to a permission or a policy once: the pipeline leaves it out of every representation for an actor who may not read it, refuses it in a request body from one who may not set it, the contract says so with x-field-access, and a form described by the server shows it read-only or not at all. Which rows the actor may read stays the access scope of the query. Judged: a test on the roles (roles.includes, some, every, find, indexOf), a comparison with a role, or isAdmin, in a file under application/queries/ of a context.',
|
|
47
|
+
bad: `// application/queries/get-appointment/get-appointment.handler.ts
|
|
48
|
+
const row = await this.appointments.findById(query.appointmentId);
|
|
49
|
+
return query.actor.roles.includes('practitioner') ? row : { ...row, internalNote: undefined };`,
|
|
50
|
+
good: `// application/queries/get-appointment/get-appointment.handler.ts
|
|
51
|
+
return this.appointments.findById(query.appointmentId);
|
|
52
|
+
// presentation/http/appointments/get-appointment/get-appointment.controller.ts
|
|
53
|
+
const answer = withFieldAccess(classSchema(GetAppointmentAnswer), {
|
|
54
|
+
internalNote: { read: { permission: schedulingPermissions['appointment.note.read'] } },
|
|
55
|
+
});`,
|
|
56
|
+
},
|
|
45
57
|
};
|
|
46
58
|
//# sourceMappingURL=authz-docs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authz-docs.js","sourceRoot":"","sources":["../../../src/check/explain/authz-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAsC;IAC3D,gBAAgB,EAAE;QAChB,GAAG,EAAE,mvBAAmvB;QACxvB,GAAG,EAAE;;;mEAG0D;QAC/D,IAAI,EAAE;;;;;mEAKyD;KAChE;IACD,sBAAsB,EAAE;QACtB,GAAG,EAAE,q0BAAq0B;QAC10B,GAAG,EAAE;;;;;4DAKmD;QACxD,IAAI,EAAE;;;;;;sCAM4B;KACnC;IACD,sBAAsB,EAAE;QACtB,GAAG,EAAE,ykBAAykB;QAC9kB,GAAG,EAAE;;;;qDAI4C;QACjD,IAAI,EAAE;;;;;2GAKiG;KACxG;CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"authz-docs.js","sourceRoot":"","sources":["../../../src/check/explain/authz-docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAsC;IAC3D,gBAAgB,EAAE;QAChB,GAAG,EAAE,mvBAAmvB;QACxvB,GAAG,EAAE;;;mEAG0D;QAC/D,IAAI,EAAE;;;;;mEAKyD;KAChE;IACD,sBAAsB,EAAE;QACtB,GAAG,EAAE,q0BAAq0B;QAC10B,GAAG,EAAE;;;;;4DAKmD;QACxD,IAAI,EAAE;;;;;;sCAM4B;KACnC;IACD,sBAAsB,EAAE;QACtB,GAAG,EAAE,ykBAAykB;QAC9kB,GAAG,EAAE;;;;qDAI4C;QACjD,IAAI,EAAE;;;;;2GAKiG;KACxG;IACD,wBAAwB,EAAE;QACxB,GAAG,EAAE,i1BAAi1B;QACt1B,GAAG,EAAE;;+FAEsF;QAC3F,IAAI,EAAE;;;;;IAKN;KACD;CACF,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, 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.',
|
|
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, NOT_ACCEPTABLE, 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,wiCAAwiC;QAC7iC,GAAG,EAAE;iIACwH;QAC7H,IAAI,EAAE,0HAA0H;KACjI;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authz-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/authz-fixtures.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"authz-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/authz-fixtures.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAQ5C,eAAO,MAAM,cAAc,EAAE,SAAS,OAAO,EA8O5C,CAAC"}
|
|
@@ -4,7 +4,8 @@ import { declaredProject } from './declared-project.js';
|
|
|
4
4
|
import { handler } from './handler.js';
|
|
5
5
|
import { PATHS } from './paths.js';
|
|
6
6
|
import { project } from './project.js';
|
|
7
|
-
|
|
7
|
+
import { SAMPLES } from './samples.js';
|
|
8
|
+
const { ADAPTER, AGGREGATE, COMMAND, HANDLER, POLICY, QUERY_HANDLER, QUERY_HANDLER_SPEC, ROUTE } = PATHS;
|
|
8
9
|
export const AUTHZ_FIXTURES = [
|
|
9
10
|
{
|
|
10
11
|
ruleId: 'authz/in-application',
|
|
@@ -151,5 +152,41 @@ export const AUTHZ_FIXTURES = [
|
|
|
151
152
|
...handler("import { ExecutionScope } from '@ddd-ts-kit/kernel';\nimport { CommandHandler } from '@ddd-ts-kit/kernel/declarations';\nimport { IssueInvoiceCommand } from '@/contexts/billing/application/commands/issue-invoice/issue-invoice.command.js';\n\n@CommandHandler(IssueInvoiceCommand, [ExecutionScope])\nexport class IssueInvoiceHandler {}\n"),
|
|
152
153
|
}),
|
|
153
154
|
},
|
|
155
|
+
{
|
|
156
|
+
ruleId: 'authz/fields-by-schema',
|
|
157
|
+
name: 'a query that answers what its read model holds, the scope narrowing the rows',
|
|
158
|
+
expect: 'pass',
|
|
159
|
+
files: project({
|
|
160
|
+
[QUERY_HANDLER]: "export class InvoicesIssuedHandler {\n async execute(query: InvoicesIssuedQuery): Promise<readonly InvoiceLine[]> {\n const scope = await this.access.scope(query.actor, permission, 'invoice');\n\n return this.invoices.search(scope);\n }\n}\n",
|
|
161
|
+
[QUERY_HANDLER_SPEC]: SAMPLES.SPEC,
|
|
162
|
+
}),
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
ruleId: 'authz/fields-by-schema',
|
|
166
|
+
name: 'a query that tests the roles it took out of the actor first',
|
|
167
|
+
expect: { file: QUERY_HANDLER },
|
|
168
|
+
files: project({
|
|
169
|
+
[QUERY_HANDLER]: "export class InvoicesIssuedHandler {\n async execute(query: InvoicesIssuedQuery): Promise<readonly InvoiceLine[]> {\n const { roles } = query.actor;\n const lines = await this.invoices.search(query.scope);\n\n return roles.includes('accountant') ? lines : lines.map(({ margin: _margin, ...line }) => line);\n }\n}\n",
|
|
170
|
+
[QUERY_HANDLER_SPEC]: SAMPLES.SPEC,
|
|
171
|
+
}),
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
ruleId: 'authz/fields-by-schema',
|
|
175
|
+
name: 'a query that compares a role held in a variable of its own',
|
|
176
|
+
expect: { file: QUERY_HANDLER },
|
|
177
|
+
files: project({
|
|
178
|
+
[QUERY_HANDLER]: "export class InvoicesIssuedHandler {\n async execute(query: InvoicesIssuedQuery): Promise<readonly InvoiceLine[]> {\n const role = query.actor.attributes['role'];\n const lines = await this.invoices.search(query.scope);\n\n return role === 'accountant' ? lines : lines.map(({ margin: _margin, ...line }) => line);\n }\n}\n",
|
|
179
|
+
[QUERY_HANDLER_SPEC]: SAMPLES.SPEC,
|
|
180
|
+
}),
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
ruleId: 'authz/fields-by-schema',
|
|
184
|
+
name: 'a query that removes a field for the callers without a role',
|
|
185
|
+
expect: { file: QUERY_HANDLER },
|
|
186
|
+
files: project({
|
|
187
|
+
[QUERY_HANDLER]: "export class InvoicesIssuedHandler {\n async execute(query: InvoicesIssuedQuery): Promise<readonly InvoiceLine[]> {\n const lines = await this.invoices.search(query.scope);\n\n return query.actor.roles.includes('accountant') ? lines : lines.map(({ margin: _margin, ...line }) => line);\n }\n}\n",
|
|
188
|
+
[QUERY_HANDLER_SPEC]: SAMPLES.SPEC,
|
|
189
|
+
}),
|
|
190
|
+
},
|
|
154
191
|
];
|
|
155
192
|
//# sourceMappingURL=authz-fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authz-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/authz-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"authz-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/authz-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,KAAK,E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AAI;SACnC,CAAC;KACH;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authz-fields-by-schema.d.ts","sourceRoot":"","sources":["../../../src/check/rules/authz-fields-by-schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAkB7C,eAAO,MAAM,mBAAmB,EAAE,IAQjC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { inLayer } from '../support/in-layer.js';
|
|
2
|
+
import { perFile } from '../support/per-file.js';
|
|
3
|
+
/** What tells one caller from another by hand: a test on the roles, a comparison with a role, an `isAdmin`. */
|
|
4
|
+
const ROLE_TESTS = [
|
|
5
|
+
{
|
|
6
|
+
pattern: /(?<![\w$])roles\s*\.\s*(?:includes|some|every|find|indexOf)\s*\(/,
|
|
7
|
+
what: 'A test on the roles of the actor',
|
|
8
|
+
},
|
|
9
|
+
{ pattern: /(?<![\w$])role\s*[!=]==?|[!=]==?\s*(?:[\w$]+\s*\.\s*)*role(?![\w$(])/, what: 'A comparison on a role' },
|
|
10
|
+
{ pattern: /(?<![\w$])isAdmin(?![\w$])/, what: 'isAdmin' },
|
|
11
|
+
];
|
|
12
|
+
const FIX = 'Answer every field the read model holds and mark the one reserved to some callers on the response schema: withFieldAccess(schema, { internalNote: { read: { permission } } }) of @ddd-ts-kit/http. The pipeline leaves it out for an actor who may not read it, in JSON, XML and CSV alike, the contract says so, and a form described by the server shows it read-only or not at all. Which rows the actor may read at all stays the access scope of the query.';
|
|
13
|
+
export const authzFieldsBySchema = {
|
|
14
|
+
id: 'authz/fields-by-schema',
|
|
15
|
+
description: 'A query never shapes its answer by the roles of the actor: a field reserved to some callers is marked on the response schema (withFieldAccess of @ddd-ts-kit/http), not removed by hand under application/queries/.',
|
|
16
|
+
scope: 'file',
|
|
17
|
+
run(project) {
|
|
18
|
+
return perFile(project, this.id, roleShapedAnswer);
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
function roleShapedAnswer(file) {
|
|
22
|
+
const location = inLayer(file, 'application');
|
|
23
|
+
if (location?.inside[0] !== 'queries') {
|
|
24
|
+
return [];
|
|
25
|
+
}
|
|
26
|
+
return ROLE_TESTS.flatMap(({ pattern, what }) => {
|
|
27
|
+
const match = pattern.exec(file.scan.code);
|
|
28
|
+
return match === null
|
|
29
|
+
? []
|
|
30
|
+
: [{ line: file.scan.lineAt(match.index), message: `${what} shapes the answer of a query.`, fix: FIX }];
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=authz-fields-by-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authz-fields-by-schema.js","sourceRoot":"","sources":["../../../src/check/rules/authz-fields-by-schema.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,+GAA+G;AAC/G,MAAM,UAAU,GAAmE;IACjF;QACE,OAAO,EAAE,kEAAkE;QAC3E,IAAI,EAAE,kCAAkC;KACzC;IACD,EAAE,OAAO,EAAE,sEAAsE,EAAE,IAAI,EAAE,wBAAwB,EAAE;IACnH,EAAE,OAAO,EAAE,4BAA4B,EAAE,IAAI,EAAE,SAAS,EAAE;CAC3D,CAAC;AAEF,MAAM,GAAG,GACP,kcAAkc,CAAC;AAErc,MAAM,CAAC,MAAM,mBAAmB,GAAS;IACvC,EAAE,EAAE,wBAAwB;IAC5B,WAAW,EACT,qNAAqN;IACvN,KAAK,EAAE,MAAM;IACb,GAAG,CAAC,OAAO;QACT,OAAO,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,EAAE,gBAAgB,CAAC,CAAC;IACrD,CAAC;CACF,CAAC;AAEF,SAAS,gBAAgB,CAAC,IAAgB;IACxC,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;IAE9C,IAAI,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC;QACtC,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;QAC9C,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE3C,OAAO,KAAK,KAAK,IAAI;YACnB,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,GAAG,IAAI,gCAAgC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;IAC5G,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,cAAc,CAAC;AA4C5C,eAAO,MAAM,WAAW,EAAE,OA8BzB,CAAC"}
|
package/dist/commands/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAgB,MAA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27,5 @@ export { RELATIONSHIPS } from './relationships.js';
|
|
|
27
27
|
export { restackConfigText } from './restack-config-text.js';
|
|
28
28
|
export { serializeConfig } from './serialize-config.js';
|
|
29
29
|
export { SEVERITIES, type Severity } from './severities.js';
|
|
30
|
-
export { ASSEMBLIES, AUDIT_MODES, AUTHN_STACKS, AUTHZ_STACKS, BROKER_STACKS, CACHE_STACKS, HTTP_CACHE_STACKS, STORAGE_STACKS, CI_PLATFORMS, DATABASE_STACKS, DEPENDENCY_STATEMENTS, REFUSAL_FORMS, ROUTE_FORMS, SCHEMA_FORMS, DI_STACKS, DOCS_UIS, ERROR_REPORTERS, HTTP_STACKS, LOGGERS, ORM_STACKS, PACKAGE_MANAGERS, TENANCY_STRATEGIES, QUEUE_STORES, STYLES, TEST_STACKS, VALIDATION_STACKS, VALUE_OBJECT_FORMS, LITERAL_FORMS, type OrmStack, type Stack, } from './stack.js';
|
|
30
|
+
export { ASSEMBLIES, AUDIT_MODES, AUTHN_STACKS, AUTHZ_STACKS, BROKER_STACKS, CACHE_STACKS, HTTP_CACHE_STACKS, STORAGE_STACKS, CI_PLATFORMS, DATABASE_STACKS, DEPENDENCY_STATEMENTS, REFUSAL_FORMS, ROUTE_FORMS, REPRESENTATION_MODES, FORM_MODES, SCHEMA_FORMS, DI_STACKS, DOCS_UIS, ERROR_REPORTERS, HTTP_STACKS, LOGGERS, ORM_STACKS, PACKAGE_MANAGERS, TENANCY_STRATEGIES, QUEUE_STORES, STYLES, TEST_STACKS, VALIDATION_STACKS, VALUE_OBJECT_FORMS, LITERAL_FORMS, type OrmStack, type Stack, } from './stack.js';
|
|
31
31
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CA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,WAAW,EACX,oBAAoB,EACpB,UAAU,EACV,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,eAAe,EACf,WAAW,EACX,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACZ,MAAM,EACN,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,KAAK,QAAQ,EACb,KAAK,KAAK,GACX,MAAM,YAAY,CAAC"}
|
package/dist/config/index.js
CHANGED
|
@@ -25,5 +25,5 @@ export { RELATIONSHIPS } from './relationships.js';
|
|
|
25
25
|
export { restackConfigText } from './restack-config-text.js';
|
|
26
26
|
export { serializeConfig } from './serialize-config.js';
|
|
27
27
|
export { SEVERITIES } from './severities.js';
|
|
28
|
-
export { ASSEMBLIES, AUDIT_MODES, AUTHN_STACKS, AUTHZ_STACKS, BROKER_STACKS, CACHE_STACKS, HTTP_CACHE_STACKS, STORAGE_STACKS, CI_PLATFORMS, DATABASE_STACKS, DEPENDENCY_STATEMENTS, REFUSAL_FORMS, ROUTE_FORMS, SCHEMA_FORMS, DI_STACKS, DOCS_UIS, ERROR_REPORTERS, HTTP_STACKS, LOGGERS, ORM_STACKS, PACKAGE_MANAGERS, TENANCY_STRATEGIES, QUEUE_STORES, STYLES, TEST_STACKS, VALIDATION_STACKS, VALUE_OBJECT_FORMS, LITERAL_FORMS, } from './stack.js';
|
|
28
|
+
export { ASSEMBLIES, AUDIT_MODES, AUTHN_STACKS, AUTHZ_STACKS, BROKER_STACKS, CACHE_STACKS, HTTP_CACHE_STACKS, STORAGE_STACKS, CI_PLATFORMS, DATABASE_STACKS, DEPENDENCY_STATEMENTS, REFUSAL_FORMS, ROUTE_FORMS, REPRESENTATION_MODES, FORM_MODES, SCHEMA_FORMS, DI_STACKS, DOCS_UIS, ERROR_REPORTERS, HTTP_STACKS, LOGGERS, ORM_STACKS, PACKAGE_MANAGERS, TENANCY_STRATEGIES, QUEUE_STORES, STYLES, TEST_STACKS, VALIDATION_STACKS, VALUE_OBJECT_FORMS, LITERAL_FORMS, } from './stack.js';
|
|
29
29
|
//# sourceMappingURL=index.js.map
|
package/dist/config/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAS1D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;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X,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACZ,MAAM,EACN,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,GAGd,MAAM,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-stack.d.ts","sourceRoot":"","sources":["../../src/config/parse-stack.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"parse-stack.d.ts","sourceRoot":"","sources":["../../src/config/parse-stack.ts"],"names":[],"mappings":"AAGA,OAAO,EAgCL,KAAK,KAAK,EACX,MAAM,YAAY,CAAC;AAIpB,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,KAAK,CA4BhE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CliError } from '../cli-error.js';
|
|
2
2
|
import { CONFIG_FILE } from './config-file.js';
|
|
3
3
|
import { isOneOf } from './is-one-of.js';
|
|
4
|
-
import { ASSEMBLIES, AUDIT_MODES, AUTHN_STACKS, AUTHZ_STACKS, BROKER_STACKS, CACHE_STACKS, CI_PLATFORMS, DATABASE_STACKS, DEPENDENCY_STATEMENTS, DI_STACKS, DOCS_UIS, ERROR_REPORTERS, EVENT_STACKS, HTTP_CACHE_STACKS, HTTP_STACKS, LOGGERS, ORM_STACKS, PACKAGE_MANAGERS, REFUSAL_FORMS, ROUTE_FORMS, SCHEMA_FORMS, STORAGE_STACKS, STYLES, TENANCY_STRATEGIES, QUEUE_STORES, TEST_STACKS, VALIDATION_STACKS, VALUE_OBJECT_FORMS, LITERAL_FORMS, } from './stack.js';
|
|
4
|
+
import { ASSEMBLIES, AUDIT_MODES, AUTHN_STACKS, AUTHZ_STACKS, BROKER_STACKS, CACHE_STACKS, CI_PLATFORMS, DATABASE_STACKS, DEPENDENCY_STATEMENTS, DI_STACKS, DOCS_UIS, ERROR_REPORTERS, EVENT_STACKS, HTTP_CACHE_STACKS, HTTP_STACKS, LOGGERS, ORM_STACKS, PACKAGE_MANAGERS, REFUSAL_FORMS, ROUTE_FORMS, FORM_MODES, REPRESENTATION_MODES, SCHEMA_FORMS, STORAGE_STACKS, STYLES, TENANCY_STRATEGIES, QUEUE_STORES, TEST_STACKS, VALIDATION_STACKS, VALUE_OBJECT_FORMS, LITERAL_FORMS, } from './stack.js';
|
|
5
5
|
export function parseStack(stack) {
|
|
6
6
|
const choose = (key, values, fallback) => pick(values, stack[key], { fallback, key: `stack.${key}` });
|
|
7
7
|
const http = choose('http', HTTP_STACKS, 'express');
|
|
@@ -20,6 +20,8 @@ export function parseStack(stack) {
|
|
|
20
20
|
...parseChoices(choose, orm),
|
|
21
21
|
refusals: choose('refusals', REFUSAL_FORMS, 'classes'),
|
|
22
22
|
routes: choose('routes', ROUTE_FORMS, 'functions'),
|
|
23
|
+
representations: choose('representations', REPRESENTATION_MODES, 'json'),
|
|
24
|
+
forms: choose('forms', FORM_MODES, 'off'),
|
|
23
25
|
schemas: choose('schemas', SCHEMA_FORMS, 'per-route'),
|
|
24
26
|
valueObjects: choose('valueObjects', VALUE_OBJECT_FORMS, 'result'),
|
|
25
27
|
literals: choose('literals', LITERAL_FORMS, 'free'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-stack.js","sourceRoot":"","sources":["../../src/config/parse-stack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EACL,UAAU,EACV,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,SAAS,EACT,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,WAAW,EACX,OAAO,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CY_STATEMENTS: readonly ['signature', 'listed'];
|
|
16
16
|
export declare const REFUSAL_FORMS: readonly ['factories', 'classes'];
|
|
17
17
|
export declare const ROUTE_FORMS: readonly ['controllers', 'functions'];
|
|
18
|
+
export declare const REPRESENTATION_MODES: readonly ['negotiated', 'json'];
|
|
19
|
+
export declare const FORM_MODES: readonly ['on', 'off'];
|
|
18
20
|
export declare const SCHEMA_FORMS: readonly ['shared', 'per-route'];
|
|
19
21
|
export declare const VALUE_OBJECT_FORMS: readonly ['throwing', 'result'];
|
|
20
22
|
export declare const LITERAL_FORMS: readonly ['named', 'free'];
|
|
@@ -100,6 +102,18 @@ export interface Stack {
|
|
|
100
102
|
* forms run in either.
|
|
101
103
|
*/
|
|
102
104
|
readonly routes: (typeof ROUTE_FORMS)[number];
|
|
105
|
+
/**
|
|
106
|
+
* What a route answers in: `negotiated`, the media type the `Accept` header prefers among JSON
|
|
107
|
+
* and what the route declares in `produces` (XML, CSV), with the restricted fields of a schema
|
|
108
|
+
* decided for each caller; `json`, JSON whatever the request accepts. A config that says
|
|
109
|
+
* nothing was written before the choice existed: it is `json`.
|
|
110
|
+
*/
|
|
111
|
+
readonly representations: (typeof REPRESENTATION_MODES)[number];
|
|
112
|
+
/**
|
|
113
|
+
* Whether a route that declares `form` is served as a form at `GET /forms/<operationId>`. A
|
|
114
|
+
* config that says nothing was written before forms existed: it is `off`.
|
|
115
|
+
*/
|
|
116
|
+
readonly forms: (typeof FORM_MODES)[number];
|
|
103
117
|
/**
|
|
104
118
|
* How the schemas of the HTTP contract are written: `shared`, a shape several routes use is
|
|
105
119
|
* declared once (`generate schema`), documented once in the contract and referenced, a command
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../src/config/stack.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,YAAI,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAU,CAAC;AACnF,eAAO,MA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AC,MAAM,CAAC,CAAC;IAC3D;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,EAAE,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;IAClD;;;;OAIG;IACH,QAAQ,CAAC,cAAc,EAAE,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;IAC3D;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAO,EAAE,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;IACtD;;;;;;;OAOG;IACH,QAAQ,CAAC,KAAK,EAAE,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;CAC/C"}
|
package/dist/config/stack.js
CHANGED
|
@@ -15,6 +15,8 @@ export const ASSEMBLIES = ['barrel', 'discovery'];
|
|
|
15
15
|
export const DEPENDENCY_STATEMENTS = ['signature', 'listed'];
|
|
16
16
|
export const REFUSAL_FORMS = ['factories', 'classes'];
|
|
17
17
|
export const ROUTE_FORMS = ['controllers', 'functions'];
|
|
18
|
+
export const REPRESENTATION_MODES = ['negotiated', 'json'];
|
|
19
|
+
export const FORM_MODES = ['on', 'off'];
|
|
18
20
|
export const SCHEMA_FORMS = ['shared', 'per-route'];
|
|
19
21
|
export const VALUE_OBJECT_FORMS = ['throwing', 'result'];
|
|
20
22
|
export const LITERAL_FORMS = ['named', 'free'];
|
package/dist/config/stack.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stack.js","sourceRoot":"","sources":["../../src/config/stack.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAU,CAAC;AACnF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,CAAU,CAAC;AAC3G,MAAM,CAAC,MAAM,SAAS,GAA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C;AACrE,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,MAAM;IACN,cAAc;IACd,oBAAoB;IACpB,mBAAmB;IACnB,qBAAqB;CACb,CAAC"}
|
|
@@ -61,6 +61,12 @@ export interface RouteFact {
|
|
|
61
61
|
readonly request: readonly RequestPart[];
|
|
62
62
|
readonly responses: readonly RouteResponse[];
|
|
63
63
|
readonly errors: readonly string[];
|
|
64
|
+
/** The media types it answers in besides JSON (`produces`), when it declares some. */
|
|
65
|
+
readonly produces?: readonly string[];
|
|
66
|
+
/** The media types it reads a body in besides JSON (`consumes`), when it declares some. */
|
|
67
|
+
readonly consumes?: readonly string[];
|
|
68
|
+
/** Where its form is served, when it declares one: `GET /forms/<operationId>`. */
|
|
69
|
+
readonly form?: string;
|
|
64
70
|
readonly file: string;
|
|
65
71
|
}
|
|
66
72
|
export interface RequestPart {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-description.d.ts","sourceRoot":"","sources":["../../src/describe/context-description.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAExE;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,SAAS,MA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AAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,uFAAuF;IACvF,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,yGAAyG;IACzG,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B"}
|
|
@@ -63,7 +63,15 @@ function routeLine(route) {
|
|
|
63
63
|
const behind = route.guards.length === 0
|
|
64
64
|
? ''
|
|
65
65
|
: ` behind ${[route.group, route.guards.join(', ')].filter((part) => part !== '').join(': ')}`;
|
|
66
|
-
return `${route.method} ${route.path} ${route.operationId}${behind} -> ${known(route.useCase)} (${known(route.permission)}); request: ${request === '' ? 'none' : request}; responses: ${responses}; errors: ${route.errors.join(', ')}`;
|
|
66
|
+
return `${route.method} ${route.path} ${route.operationId}${behind} -> ${known(route.useCase)} (${known(route.permission)}); request: ${request === '' ? 'none' : request}; responses: ${responses}; errors: ${route.errors.join(', ')}${presentation(route)}`;
|
|
67
|
+
}
|
|
68
|
+
/** What a route answers and reads in besides JSON, and its form: said only when it declares them. */
|
|
69
|
+
function presentation({ produces, consumes, form }) {
|
|
70
|
+
return [
|
|
71
|
+
produces === undefined ? '' : `; answers also ${produces.join(', ')}`,
|
|
72
|
+
consumes === undefined ? '' : `; reads also ${consumes.join(', ')}`,
|
|
73
|
+
form === undefined ? '' : `; form: ${form}`,
|
|
74
|
+
].join('');
|
|
67
75
|
}
|
|
68
76
|
function consumedEventLine(event) {
|
|
69
77
|
return `${known(event.type)}${event.version === null ? '' : ` v${event.version}`} from ${known(event.from)}, handled by ${event.handler} (consumer ${known(event.consumer)})`;
|