ddd-ts-kit 0.100.0 → 0.101.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/CHANGELOG.md +14 -0
- package/README.fr.md +14 -7
- package/README.md +13 -6
- package/dist/check/fixtures/privacy-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/privacy-fixtures.js +22 -0
- package/dist/check/fixtures/privacy-fixtures.js.map +1 -1
- package/dist/check/privacy/published-events-of.d.ts.map +1 -1
- package/dist/check/privacy/published-events-of.js +4 -2
- package/dist/check/privacy/published-events-of.js.map +1 -1
- package/dist/check/schemas/class-shapes.d.ts.map +1 -1
- package/dist/check/schemas/class-shapes.js +5 -26
- package/dist/check/schemas/class-shapes.js.map +1 -1
- package/dist/check/structure/class-statements.d.ts +13 -0
- package/dist/check/structure/class-statements.d.ts.map +1 -0
- package/dist/check/structure/class-statements.js +34 -0
- package/dist/check/structure/class-statements.js.map +1 -0
- package/dist/check/structure/property-of.d.ts +13 -0
- package/dist/check/structure/property-of.d.ts.map +1 -0
- package/dist/check/structure/property-of.js +23 -0
- package/dist/check/structure/property-of.js.map +1 -0
- package/dist/describe/read-event-definitions.d.ts +2 -0
- package/dist/describe/read-event-definitions.d.ts.map +1 -1
- package/dist/describe/read-event-definitions.js +1 -0
- package/dist/describe/read-event-definitions.js.map +1 -1
- package/dist/generate/flags-of.d.ts +4 -0
- package/dist/generate/flags-of.d.ts.map +1 -0
- package/dist/generate/flags-of.js +6 -0
- package/dist/generate/flags-of.js.map +1 -0
- package/dist/generate/held-to-glossary.d.ts +9 -0
- package/dist/generate/held-to-glossary.d.ts.map +1 -0
- package/dist/generate/held-to-glossary.js +11 -0
- package/dist/generate/held-to-glossary.js.map +1 -0
- package/dist/generate/kind-help.d.ts +2 -0
- package/dist/generate/kind-help.d.ts.map +1 -1
- package/dist/generate/kind-help.js +2 -0
- package/dist/generate/kind-help.js.map +1 -1
- package/dist/generate/kinds/adapter-kind.js +1 -1
- package/dist/generate/kinds/adapter-kind.js.map +1 -1
- package/dist/generate/kinds/background/class-payload-schema.js +3 -3
- package/dist/generate/kinds/background/class-payload-schema.js.map +1 -1
- package/dist/generate/kinds/background-job-kind.js +1 -1
- package/dist/generate/kinds/background-job-kind.js.map +1 -1
- package/dist/generate/kinds/builder-kind.js +1 -1
- package/dist/generate/kinds/builder-kind.js.map +1 -1
- package/dist/generate/kinds/command-kind.js +1 -1
- package/dist/generate/kinds/command-kind.js.map +1 -1
- package/dist/generate/kinds/declarations-of.d.ts +11 -0
- package/dist/generate/kinds/declarations-of.d.ts.map +1 -0
- package/dist/generate/kinds/declarations-of.js +17 -0
- package/dist/generate/kinds/declarations-of.js.map +1 -0
- package/dist/generate/kinds/e2e-kind.js +1 -1
- package/dist/generate/kinds/e2e-kind.js.map +1 -1
- package/dist/generate/kinds/erasure-handler-kind.js +1 -1
- package/dist/generate/kinds/erasure-handler-kind.js.map +1 -1
- package/dist/generate/kinds/event-type-as-published.d.ts +11 -0
- package/dist/generate/kinds/event-type-as-published.d.ts.map +1 -0
- package/dist/generate/kinds/event-type-as-published.js +17 -0
- package/dist/generate/kinds/event-type-as-published.js.map +1 -0
- package/dist/generate/kinds/form-kind.js +1 -1
- package/dist/generate/kinds/form-kind.js.map +1 -1
- package/dist/generate/kinds/integration-event-kind.d.ts.map +1 -1
- package/dist/generate/kinds/integration-event-kind.js +2 -9
- package/dist/generate/kinds/integration-event-kind.js.map +1 -1
- package/dist/generate/kinds/integration-handler-kind.d.ts.map +1 -1
- package/dist/generate/kinds/integration-handler-kind.js +30 -14
- package/dist/generate/kinds/integration-handler-kind.js.map +1 -1
- package/dist/generate/kinds/job-kind.js +1 -1
- package/dist/generate/kinds/job-kind.js.map +1 -1
- package/dist/generate/kinds/module-kind.js +1 -1
- package/dist/generate/kinds/module-kind.js.map +1 -1
- package/dist/generate/kinds/parse-version.d.ts +3 -0
- package/dist/generate/kinds/parse-version.d.ts.map +1 -0
- package/dist/generate/kinds/parse-version.js +9 -0
- package/dist/generate/kinds/parse-version.js.map +1 -0
- package/dist/generate/kinds/pick-declaration.d.ts +9 -0
- package/dist/generate/kinds/pick-declaration.d.ts.map +1 -0
- package/dist/generate/kinds/pick-declaration.js +14 -0
- package/dist/generate/kinds/pick-declaration.js.map +1 -0
- package/dist/generate/kinds/presentation/controller-of.d.ts.map +1 -1
- package/dist/generate/kinds/presentation/controller-of.js +15 -5
- package/dist/generate/kinds/presentation/controller-of.js.map +1 -1
- package/dist/generate/kinds/projection-kind.d.ts.map +1 -1
- package/dist/generate/kinds/projection-kind.js +21 -12
- package/dist/generate/kinds/projection-kind.js.map +1 -1
- package/dist/generate/kinds/property-kind.js +1 -1
- package/dist/generate/kinds/property-kind.js.map +1 -1
- package/dist/generate/kinds/refuse-unpublished-version.d.ts +7 -0
- package/dist/generate/kinds/refuse-unpublished-version.d.ts.map +1 -0
- package/dist/generate/kinds/refuse-unpublished-version.js +15 -0
- package/dist/generate/kinds/refuse-unpublished-version.js.map +1 -0
- package/dist/generate/kinds/repository-kind.js +1 -1
- package/dist/generate/kinds/repository-kind.js.map +1 -1
- package/dist/generate/kinds/representation-kind.js +1 -1
- package/dist/generate/kinds/representation-kind.js.map +1 -1
- package/dist/generate/kinds/route/message-vars.d.ts.map +1 -1
- package/dist/generate/kinds/route/message-vars.js +5 -2
- package/dist/generate/kinds/route/message-vars.js.map +1 -1
- package/dist/generate/kinds/route/route-vars.js +1 -1
- package/dist/generate/kinds/route/route-vars.js.map +1 -1
- package/dist/generate/kinds/route/spec-vars.d.ts +2 -1
- package/dist/generate/kinds/route/spec-vars.d.ts.map +1 -1
- package/dist/generate/kinds/route/spec-vars.js +26 -7
- package/dist/generate/kinds/route/spec-vars.js.map +1 -1
- package/dist/generate/kinds/route-group-kind.js +1 -1
- package/dist/generate/kinds/route-group-kind.js.map +1 -1
- package/dist/generate/kinds/route-kind.js +2 -2
- package/dist/generate/kinds/route-kind.js.map +1 -1
- package/dist/generate/kinds/state-machine-kind.js +1 -1
- package/dist/generate/kinds/state-machine-kind.js.map +1 -1
- package/dist/generate/kinds/wanted-event.d.ts +6 -0
- package/dist/generate/kinds/wanted-event.d.ts.map +1 -0
- package/dist/generate/kinds/wanted-event.js +2 -0
- package/dist/generate/kinds/wanted-event.js.map +1 -0
- package/dist/generate/refuse-undeclared-flags.d.ts.map +1 -1
- package/dist/generate/refuse-undeclared-flags.js +9 -2
- package/dist/generate/refuse-undeclared-flags.js.map +1 -1
- package/dist/help/kind-help-text.d.ts.map +1 -1
- package/dist/help/kind-help-text.js +24 -13
- package/dist/help/kind-help-text.js.map +1 -1
- package/dist/init/manifest/versions.js +24 -24
- package/dist/init/stack/http-cache-misfit.d.ts +4 -0
- package/dist/init/stack/http-cache-misfit.d.ts.map +1 -0
- package/dist/init/stack/http-cache-misfit.js +21 -0
- package/dist/init/stack/http-cache-misfit.js.map +1 -0
- package/dist/init/stack/resolve-stack.d.ts.map +1 -1
- package/dist/init/stack/resolve-stack.js +2 -1
- package/dist/init/stack/resolve-stack.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -5
- package/templates/controller/controller.spec.ts.tpl +19 -0
- package/templates/integration-event/payload.class-validator.ts.tpl +2 -2
- package/templates/nest-controller/controller.spec.ts.tpl +25 -0
- package/templates/pipeline/package-scripts.json +1 -1
- package/templates/presets/identity/context/presentation/http/accounts/deactivate-account/deactivate-account.accepted.class-validator.per-route.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/accounts/provision-account/provision-account.accepted.class-validator.per-route.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/accounts/provision-account/provision-account.body.class-validator.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/invitations/accept-invitation/accept-invitation.accepted.class-validator.per-route.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/invitations/accept-invitation/accept-invitation.body.class-validator.per-route.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/invitations/decline-invitation/decline-invitation.accepted.class-validator.per-route.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/invitations/decline-invitation/decline-invitation.body.class-validator.per-route.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/organisations/change-member-role/change-member-role.accepted.class-validator.per-route.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/organisations/change-member-role/change-member-role.body.class-validator.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/organisations/change-member-role/change-member-role.params.class-validator.ts.tpl +2 -2
- package/templates/presets/identity/context/presentation/http/organisations/grant-delegation/grant-delegation.accepted.class-validator.per-route.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/organisations/grant-delegation/grant-delegation.body.class-validator.ts.tpl +4 -4
- package/templates/presets/identity/context/presentation/http/organisations/grant-delegation/grant-delegation.params.class-validator.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/organisations/invite-member/invite-member.accepted.class-validator.ts.tpl +2 -2
- package/templates/presets/identity/context/presentation/http/organisations/invite-member/invite-member.body.class-validator.ts.tpl +2 -2
- package/templates/presets/identity/context/presentation/http/organisations/invite-member/invite-member.params.class-validator.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/organisations/open-organisation/open-organisation.accepted.class-validator.per-route.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/organisations/open-organisation/open-organisation.body.class-validator.ts.tpl +2 -2
- package/templates/presets/identity/context/presentation/http/organisations/remove-member/remove-member.accepted.class-validator.per-route.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/organisations/remove-member/remove-member.params.class-validator.ts.tpl +2 -2
- package/templates/presets/identity/context/presentation/http/organisations/revoke-delegation/revoke-delegation.accepted.class-validator.per-route.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/organisations/revoke-delegation/revoke-delegation.params.class-validator.ts.tpl +2 -2
- package/templates/presets/identity/context/presentation/http/organisations/revoke-invitation/revoke-invitation.accepted.class-validator.per-route.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/organisations/revoke-invitation/revoke-invitation.params.class-validator.ts.tpl +2 -2
- package/templates/presets/identity/context/presentation/http/organisations/search-members/search-members.line.class-validator.ts.tpl +6 -6
- package/templates/presets/identity/context/presentation/http/organisations/search-members/search-members.params.class-validator.ts.tpl +1 -1
- package/templates/presets/identity/context/presentation/http/shared/invitation-token.schema.class-validator.shared.ts.tpl +1 -1
- package/templates/presets/identity/context/published-language/account-deactivated.v1.payload.class-validator.ts.tpl +1 -1
- package/templates/presets/identity/context/published-language/delegation-granted.v1.payload.class-validator.ts.tpl +7 -7
- package/templates/presets/identity/context/published-language/delegation-revoked.v1.payload.class-validator.ts.tpl +4 -4
- package/templates/presets/identity/context/published-language/member-joined.v1.payload.class-validator.ts.tpl +4 -4
- package/templates/presets/identity/context/published-language/member-removed.v1.payload.class-validator.ts.tpl +4 -4
- package/templates/presets/identity/context/published-language/member-role-changed.v1.payload.class-validator.ts.tpl +6 -6
- package/templates/presets/identity/context/published-language/organisation-opened.v1.payload.class-validator.ts.tpl +3 -3
- package/templates/route/dto.accepted.ts.tpl +1 -1
- package/templates/route/dto.answer.ts.tpl +1 -1
- package/templates/route/dto.body.ts.tpl +1 -1
- package/templates/route/dto.line.ts.tpl +2 -2
- package/templates/route/route.spec.ts.tpl +19 -0
- package/templates/schema/schema.class-validator.ts.tpl +1 -1
- package/dist/generate/kinds/find-event-declaration.d.ts +0 -8
- package/dist/generate/kinds/find-event-declaration.d.ts.map +0 -1
- package/dist/generate/kinds/find-event-declaration.js +0 -27
- package/dist/generate/kinds/find-event-declaration.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,20 @@ What each version changes for someone who uses the kit. The packages of `package
|
|
|
4
4
|
together, under one version; the notes of each [GitHub release](https://github.com/gbourgeat/ddd-ts-kit/releases)
|
|
5
5
|
list the pull requests behind it.
|
|
6
6
|
|
|
7
|
+
## 0.101.0
|
|
8
|
+
|
|
9
|
+
**A class the kit writes for class-validator refuses an input that lacks one of its fields, and `classSchema` refuses a class that gives a field an initial value.** A field was written with an initial value (`calendarId = ''`, `refundAmount = 0`, `notifyCustomer = false`), which class-transformer keeps for a field the input lacks: a request without `calendarId` passed `@IsString()` as if it carried an empty one, and a consumer read an integration event without it the same way. Each field is now `declare`d with no initial value (`declare calendarId: string;`), and an optional one is `@IsOptional()` with `declare note?: string;`. This covers the body, path parameter, `Accepted` and `Line` classes `generate route` writes (functions, controllers and Nest routes), the body fields it reads from the constructor of the command, the payload of `generate integration-event`, the optional fields of the payload of `generate background-job` (its required ones already were), and the DTOs and payloads of `init --preset identity`. The spec `generate route` writes for a route that reads its body from the command now sends that body without its first field and expects 422 `VALIDATION_FAILED` with an issue at `body.<field>` among the others (a constraint added to the field keeps it green), whatever the validation library. The `TODO(domain)` of an empty class-validator class says to `declare` its fields, and a nested one is marked `@IsDefined()` when it is required, since `@ValidateNested()` lets a missing object through. `privacy/event-payload-declared` reads a `declare`d member of a payload class and a member written with `public`, `private` or `protected`, which it skipped. `classSchema` of `@ddd-ts-kit/validation/class-validator` throws a `DeclarationError` when a fresh instance of the class holds a value (`reason = ''`, `amount = 0`), naming the class, the fields and the fix; a field written `note?: string` holds none and is let through.
|
|
10
|
+
|
|
11
|
+
To move: rewrite each decorated field of your class-validator DTOs and payloads without an initial value, `@IsString() calendarId = '';` becoming `@IsString() declare calendarId: string;` (and `@IsOptional() declare note?: string;` for an optional one); a field whose absence means a default is made `@IsOptional()` and the route reads it with `?? <default>`. A class left as it is now fails at the first `classSchema(...)`, in the first test or at the first start, with the fields to rewrite named.
|
|
12
|
+
|
|
13
|
+
**The refusal of `--http-cache varnish` names what was passed, or the flag whose default it is, never a flag that was not given.** `init --http-cache varnish --http none` said "cannot be combined with --http none --events outbox" although `--events` was not passed; it now says "needs an HTTP framework to put the cache in front of: this project has --http none". Without the outbox it says "needs --events outbox for its purge requests: this project has --events in-memory", and adds ", the default of --orm none" when `--events` was not passed. The fix line is unchanged.
|
|
14
|
+
|
|
15
|
+
**`generate --help` says which kinds are held to the glossary and what each kind comes after, and `plan-slices` states both rules as the generator applies them.** `generate --help --json` gives every kind `heldToGlossary`, true for the kinds whose usage shows `--term` (`context`, `module`, `aggregate`, `entity`, `value-object`, `state-machine`, `domain-event`, `error`, `domain-error`, `domain-service`, `command`, `query`, `file-upload`, `integration-event`, `integration-handler`, `event-handler`, `projection`, `job`, `background-job`, `process`, `policy`), and `generate <kind> --help` says it in one line beside `--module`: `Held to the glossary: ...` or `Refuses --term: ...`. The refusal of `--term` on a kind that takes none (`generate port does not take --term: it would be ignored.`) now names the kinds that take it in its fix. The summary of each kind that builds on what an earlier command writes ends with that command: `After generate route <context> <UseCase> under "stack.routes": "controllers" or "nest", or generate controller <context> <UseCase>.` for `representation` and `form`, `After generate command ... or generate query ...` for `route` and `controller` (with `--group`, after `generate route-group`), `After generate aggregate ...` for `repository`, `builder` and `state-machine` (and `command --aggregate`), `After generate port ...` for `adapter`, `After generate value-object ...` for `property`, `After generate command ...` for `job` and `background-job`, `After generate integration-event ...` for `projection` and `integration-handler`, the route, handler or job of the use case for `e2e`, `After generate repository ... --personal ...` for `erasure-handler`, `after generate route-group ...` of the parent for `route-group --group`, `After generate context <name>.` for `module`. When a use case has no route, the refusal of `representation` and `form` names `generate route <context> <UseCase> --method <M> --path <path>` first (or `generate controller` with the same flags), where it named `generate controller` alone and without the flags a route requires; when its route is a function, the refusal says so and names `generate controller <context> <UseCase> --method <M> --path <path>`, or `produces` and `form` declared in its `defineRoute` by hand. The `plan-slices` skill says that a row of a kind held to the glossary adds the term for a word the glossary does not define and that the kinds whose `heldToGlossary` is false (all of them listed, `port`, `adapter`, `repository`, `route`, `representation` among them) take no `--term`, where it asked a `--term` of every name; it gives the order of the commands of one row (aggregate before its repository, builder and state machine; command or query before its route; route before its representation and its form; port before its adapter; integration event before its handler; command before its job), the order inside a row being the row's own business while `plan-waves` names the rows to add to `Depends on`; its example table gains a query row run in that order.
|
|
16
|
+
|
|
17
|
+
**`generate integration-handler` takes the event type as `ddd-ts-kit list` prints it, `identity.member.joined@v1`.** `list` shows the published events of a context with their version, and the generator refused that spelling (`"identity.member.joined@v1" is not an event type of "identity"`). The suffix `@v<n>` now names the version the handler reads, the one `--version <n>` would say (the flag is accepted on this kind); the bare type keeps reading the newest version. A suffix and a `--version` that differ are refused, naming both, and so is a version the upstream does not publish, naming the ones it does (`identity.member.joined is published at v1 only.`).
|
|
18
|
+
|
|
19
|
+
`generate projection` takes the same spelling (`billing.invoice.issued@v1` pins the version the projector applies). A version that no declaration of the upstream matches is always refused, never replaced by another: when the upstream publishes nothing at that version the refusal says so and the fix carries `--version <n>`. The versions named by the refusal are read the way `list` reads them, so a file that declares two versions is no longer reported as publishing one. `--version` of `generate integration-event` and the suffix share one parser: only digits are accepted (`1.0` is refused).
|
|
20
|
+
|
|
7
21
|
## 0.100.0
|
|
8
22
|
|
|
9
23
|
**`privacy/declared-field` no longer reports a key of an event mapper that `personalData(subject, value)` seals in the same file.** Sealing a value is how an event declares it: the rule read `data.text('<key>')` on the read side as a column and asked for a `personalFields` declaration an event stream cannot have. A key named like personal data and stored in clear in an event mapper is still reported.
|
package/README.fr.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[English](README.md) · **Français**
|
|
2
|
-
<!-- translation-of: README.md sha256:
|
|
2
|
+
<!-- translation-of: README.md sha256:30c337f1260e6a9d -->
|
|
3
3
|
|
|
4
4
|
# ddd-ts-kit
|
|
5
5
|
|
|
@@ -833,14 +833,14 @@ Next, in this order: the language of the context first, then the business decisi
|
|
|
833
833
|
| `file-upload` | `<context> <UseCaseName> --path <p> (--permission <aggregate>.<action> [--grant <role>] \| --public) [--method POST\|PUT] [--group <Name>]` | un téléversement : un contrôleur qui déclare le fichier qu'il reçoit (sa taille et ses types de média dans le contrat, vérifiés au fil du flux), la commande qui le porte comme un `FileUpload`, mis en attente par le bus de commandes avant la transaction, le gestionnaire qui l'enregistre et le promeut avec la validation (commit), et leurs *specs*. Refusé sans `stack.storage` ou sans *stack* HTTP, avec le `init --force --storage local` à lancer |
|
|
834
834
|
| `route-group` (`group`) | `<context> <Name> [--prefix <path>] [--group <ParentName>] [--public \| --role <role>]` | `presentation/http/<name>.routes.ts` : une classe vide qui porte `@RouteGroup`, derrière `Authenticated` sauf si `--public` ou `--role` dit autre chose (`HasRole(Role.Admin)`, le rôle lu dans le vocabulaire de la plateforme, `<platformDir>/auth/authorization/role.ts`, qui le reçoit s'il ne le contient pas) ; avec `--group`, il affine ce groupe et en hérite |
|
|
835
835
|
| `guard` | `<context> <Name>` | `presentation/http/guards/<name>.guard.ts` : une classe de garde déclarée à remplir, et sa *spec* |
|
|
836
|
-
| `representation` | `<context> <UseCase> <xml\|csv\|media/type>[,...]` | ajoute `produces` au `@Controller` du cas d'usage, et `consumes: ['application/xml']` à celui qui reçoit un corps quand XML est demandé ; dit quand CSV a besoin d'une page ou d'une liste en flux, et quand `stack.representations` n'est pas `negotiated` |
|
|
836
|
+
| `representation` | `<context> <UseCase> <xml\|csv\|media/type>[,...]` | après `generate route` du cas d'usage (un contrôleur sous `"stack.routes": "controllers"` ou `"nest"`) ou `generate controller` : ajoute `produces` au `@Controller` du cas d'usage, et `consumes: ['application/xml']` à celui qui reçoit un corps quand XML est demandé ; dit quand CSV a besoin d'une page ou d'une liste en flux, et quand `stack.representations` n'est pas `negotiated` |
|
|
837
837
|
| `form` | `<context> <UseCase>` | ajoute `const form = defineForm<Infer<typeof body>>({ ... })` avant le `@Controller` d'un cas d'usage qui reçoit un corps, et `form` à ses options : les indications de son formulaire à `GET /forms/<operationId>` |
|
|
838
838
|
| `schema` | `<context\|shared-kernel> <Name>` | `presentation/http/shared/<name>.schema.ts` du contexte, ou `presentation/<name>.schema.ts` du noyau partagé : une forme du contrat déclarée une fois (un schéma zod avec `.meta({ id })`, une classe class-validator, ou un schéma enveloppé par `sharedSchema`), à remplir ; les routes l'utilisent en entier, imbriquée ou en partie |
|
|
839
839
|
| `integration-event` | `<context> <Aggregate> <Fact> [--version n]` | la déclaration `defineIntegrationEvent` dans le langage publié (sa charge utile dans `<event>.v<n>.payload.ts` avec class-validator ou un schéma à vous), l'export de l'index, le *publisher* `application/integration/publishers/<event>.publisher.ts`, une *spec*, l'enregistrement, une ligne de `platform/audit/audited-events.ts` |
|
|
840
|
-
| `integration-handler` (`consumer`) | `<context> <upstreamContext> <eventType
|
|
840
|
+
| `integration-handler` (`consumer`) | `<context> <upstreamContext> <eventType>[@v<n>]` | `application/integration/handlers/<name>.integration-handler.ts`, une classe `<Name>IntegrationHandler` qui dépend de `CommandBus`, sa *spec*, son abonnement idempotent sous le nom de consommateur `<context>.<name>` ; le type est pris comme `list` l'affiche, avec ou sans `@v<n>` (la version la plus récente sans, `--version <n>` disant la même chose que le suffixe) ; refusé sauf si l'amont est déclaré et publie cette version (une version introuvable est refusée, jamais remplacée par une autre) |
|
|
841
841
|
| `erasure-handler` | `<context>` | `application/integration/handlers/data-subject-erased.integration-handler.ts`, une classe `DataSubjectErasedIntegrationHandler` qui efface ce que le contexte garde d'une personne par son `<Context>PersonalDataErasure` quand la plateforme annonce `privacy.data-subject.erased` (`dataSubjectErasedV1` du kernel), sa *spec* sur le *fake*, son abonnement idempotent sous le nom de consommateur `<context>.data-subject-erased` (dans une transaction derrière un *broker*) ; pour un contexte qui tourne comme un service à part ou copie des données personnelles depuis des événements. Refusé tant que le contexte n'a pas son effacement (`generate repository --personal`), et refusé sur un contexte en *event sourcing*, dont les valeurs personnelles s'effacent en détruisant la clé du sujet (`eraseDataSubject`) |
|
|
842
842
|
| `event-handler` | `<context> <Aggregate> <Fact> [--phase before-commit\|after-commit]` | réaction à un événement du domaine du contexte, *spec*, abonnement ; avant la validation (commit) de l'unité de travail par défaut, après elle avec `--phase after-commit` (un effet qu'aucune transaction ne couvre, au plus une fois), et la *spec* exécute la réaction dans cette phase |
|
|
843
|
-
| `projection` (`projector`) | `<context> <Name> <event-type
|
|
843
|
+
| `projection` (`projector`) | `<context> <Name> <event-type>[@v<n>]` | un projecteur dans `application/projections/<name>.projection.ts`, déclaré avec `@Projection('<context>.<name>')` et une méthode `@On(definition)` pour l'événement d'intégration, que publie le contexte lui-même ou un amont déclaré, et sa *spec* ; le type est pris comme `list` l'affiche, `@v<n>` fixant la version (la plus récente sans). Dans le style explicite sur tsyringe, le fichier de module du contexte l'inclut par `builder.include(<Name>Projection)` ; sur une plateforme câblée à la main, la classe est simple et le module la souscrit sous son nom de consommateur. Il tient un seul modèle de lecture : son port est reçu par le constructeur |
|
|
844
844
|
| `job` | `<context> <Name> (--every <duration> \| --cron "<expression>" [--time-zone <zone>]) --command <UseCaseName>` | `application/scheduling/<name>.job.ts`, une classe `<Name>Job implements ScheduledJob` qui envoie la commande, en tant que `systemActor('<context>.<name>')` quand elle est protégée, avec `execution.scheduledAt` quand la commande le prend ; `test/unit/<name>.job.spec.ts`, qui exécute le *job* (par son nom sur tsyringe, `application.jobs.runNow` ; `job.run(occurrence)` en câblage manuel) et vérifie la commande qu'il a envoyée ; son enregistrement ; son interrupteur dans `platform/jobs/job-settings.ts` ; l'autorisation de son acteur système (ci-dessous) |
|
|
845
845
|
| `background-job` | `<context> <Name> --command <UseCaseName>` | `application/background/<name>.background-job.ts`, une classe `<Name>BackgroundJob implements BackgroundJob<<Name>Payload>` nommée par son `jobName` statique `<context>.<name>`, qui envoie la commande en tant que `execution.actor` quand elle est protégée, suivi d'un champ de `<Name>Payload` par autre paramètre du constructeur de la commande (chaînes, nombres, booléens, littéraux et listes de ceux-ci tels qu'écrits, une `Date` sous forme de son texte ISO ; tout le reste est refusé), et son `payload` statique, le schéma de cette charge utile dans la bibliothèque de validation de la pile (un `z.object` sous zod, une classe de champs décorés sans valeur initiale sous class-validator, un `Type.Object` sous TypeBox, un refus par champ écrit à la main sous Standard Schema et, avec `--validation none`, dans le `BackgroundJobPayloadSchema` du noyau ; un type qu'il ne sait pas vérifier est typé `unknown` avec un `TODO(domain)`), avec lequel le *worker* lit la charge utile stockée avant chaque exécution ; `test/unit/<name>.background-job.spec.ts`, qui le met en file avec une charge utile de chaque champ en tant qu'utilisateur et exécute ce qui est dû, puis le met en file tel qu'une version antérieure le déclarait (`earlierVersionOf` de `@ddd-ts-kit/testing`) et montre le *job* mort avec `INVALID_JOB_PAYLOAD` (à travers l'application de test sur tsyringe, à travers une file et un *worker* en mémoire sur les bus de test sinon) ; son enregistrement (`@Background()`, `builder.backgroundJob(..)` dans le fichier de module sur tsyringe, `platform.backgroundJobs.register(..)` dans le fichier de module d'une plateforme câblée à la main) |
|
|
846
846
|
| `process` (`process-manager`) | `<context> <Name>` | `application/processes/<name>.process.ts` (son état, `processName`, `timeoutJob`, `isState`, une première étape qui arme une échéance, une étape qui y met fin à temps, l'étape de l'échéance), `application/background/<name>-timeout.background-job.ts`, qui livre ses expirations au moyen de `ProcessRunner`, et les *specs* des deux (`givenProcess`, la file de l'application de test sur tsyringe, une file et un *runner* en mémoire sur les bus de test sinon) |
|
|
@@ -980,7 +980,11 @@ Next, in this order: the language of the context first, then the business decisi
|
|
|
980
980
|
aussi ; un mot technique passe quand un terme du glossaire le tient
|
|
981
981
|
(`--term "Scoring model=<meaning>"` laisse passer `ScoringModel`), parce que le langage du
|
|
982
982
|
métier l'emporte. `--allow-name` passe outre les trois vérifications ; `check` signalera tout de même ce
|
|
983
|
-
que le glossaire ne définit pas.
|
|
983
|
+
que le glossaire ne définit pas. Seuls les genres dont l'usage montre `--term` le prennent
|
|
984
|
+
(`heldToGlossary` dans `generate --help --json`, une ligne de `generate <kind> --help`) ; les
|
|
985
|
+
autres (`port`, `adapter`, `repository`, `route`, `representation`...) nomment ce qu'une
|
|
986
|
+
commande antérieure a nommé ou le nom du concept qu'ils servent, et refusent `--term`, en
|
|
987
|
+
nommant les genres qui le prennent.
|
|
984
988
|
- Le code généré compile tel quel et passe `check`, le preset ESLint, dependency-cruiser et knip
|
|
985
989
|
aux sévérités par défaut : un export par fichier, des fichiers bien en dessous de 350 lignes,
|
|
986
990
|
des membres `private`, la disposition des lignes vides. Chaque endroit qui demande une
|
|
@@ -1008,7 +1012,9 @@ Next, in this order: the language of the context first, then the business decisi
|
|
|
1008
1012
|
sur une ligne, `file:line gist` (le `text` entier d'une étape).
|
|
1009
1013
|
- Un genre qui a besoin d'autre chose pour compiler soit le crée (un *repository* ou un événement
|
|
1010
1014
|
du domaine manquant), soit s'arrête avec la commande qui le crée (un agrégat, un cas d'usage ou
|
|
1011
|
-
une route manquant).
|
|
1015
|
+
une route manquant). Son `summary` nomme cette commande, `After generate ...`
|
|
1016
|
+
(`After generate route <context> <UseCase>` pour une `representation`) : les commandes d'une
|
|
1017
|
+
ligne des tranches s'exécutent dans cet ordre.
|
|
1012
1018
|
- L'enregistrement se fait entre des commentaires marqueurs (`// ddd-ts-kit:<region>` ...
|
|
1013
1019
|
`// /ddd-ts-kit:<region>`, des commentaires HTML en Markdown). Retirez un marqueur, et le
|
|
1014
1020
|
générateur affiche ce qu'il faut ajouter à la main.
|
|
@@ -1017,7 +1023,8 @@ Next, in this order: the language of the context first, then the business decisi
|
|
|
1017
1023
|
- `--local-only` refuse, en nommant les fichiers et sans rien écrire, quand le passage écrirait
|
|
1018
1024
|
hors de `<contextsDir>/<context>/` et de `test/e2e/*.e2e.spec.ts`. `generate --help --json`
|
|
1019
1025
|
affiche chaque genre avec son `usage`, ses `aliases`, son `summary` et son `writesShared`, plus
|
|
1020
|
-
`shared` et `sharedWhen` : ce qu'il écrit hors de son contexte, et quand ; `
|
|
1026
|
+
`shared` et `sharedWhen` : ce qu'il écrit hors de son contexte, et quand ; `writesInModules`,
|
|
1027
|
+
vrai quand il prend `--module` ; et `heldToGlossary`, vrai quand il prend `--term`. `generate <kind>
|
|
1021
1028
|
--help --json` affiche ce seul genre, en un objet, et `generate <kind> --help` la même chose en
|
|
1022
1029
|
texte. Les deux servent un
|
|
1023
1030
|
build réparti entre des *workers* (voir `worker-scope`).
|
package/README.md
CHANGED
|
@@ -797,14 +797,14 @@ Next, in this order: the language of the context first, then the business decisi
|
|
|
797
797
|
| `file-upload` | `<context> <UseCaseName> --path <p> (--permission <aggregate>.<action> [--grant <role>] \| --public) [--method POST\|PUT] [--group <Name>]` | an upload: a controller that declares the file it receives (its size and media types in the contract, checked as it streams), the command that carries it as a `FileUpload`, staged by the command bus before the transaction, the handler that records it and promotes it with the commit, and their specs. Refused without `stack.storage` or without an HTTP stack, with the `init --force --storage local` to run |
|
|
798
798
|
| `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/authorization/role.ts`, which gets it when it does not hold it); with `--group` it refines that group and inherits from it |
|
|
799
799
|
| `guard` | `<context> <Name>` | `presentation/http/guards/<name>.guard.ts`: a declared guard class to fill, and its spec |
|
|
800
|
-
| `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` |
|
|
800
|
+
| `representation` | `<context> <UseCase> <xml\|csv\|media/type>[,...]` | after `generate route` of the use case (a controller under `"stack.routes": "controllers"` or `"nest"`) or `generate controller`: 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` |
|
|
801
801
|
| `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>` |
|
|
802
802
|
| `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 |
|
|
803
803
|
| `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` |
|
|
804
|
-
| `integration-handler` (`consumer`) | `<context> <upstreamContext> <eventType
|
|
804
|
+
| `integration-handler` (`consumer`) | `<context> <upstreamContext> <eventType>[@v<n>]` | `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>`; the type is taken as `list` prints it, with or without `@v<n>` (the newest version without, `--version <n>` saying the same as the suffix); refused unless the upstream is declared and publishes that version (a version that is not found is refused, never replaced by another) |
|
|
805
805
|
| `erasure-handler` | `<context>` | `application/integration/handlers/data-subject-erased.integration-handler.ts`, a class `DataSubjectErasedIntegrationHandler` that erases what the context keeps of a person through its `<Context>PersonalDataErasure` when the platform announces `privacy.data-subject.erased` (`dataSubjectErasedV1` of the kernel), its spec on the fake, its idempotent subscription under the consumer name `<context>.data-subject-erased` (in a transaction behind a broker); for a context that runs as a service of its own or copies personal data from events. Refused until the context has its erasure (`generate repository --personal`), and refused on an event-sourced context, whose personal values are erased by destroying the key of the subject (`eraseDataSubject`) |
|
|
806
806
|
| `event-handler` | `<context> <Aggregate> <Fact> [--phase before-commit\|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 |
|
|
807
|
-
| `projection` (`projector`) | `<context> <Name> <event-type
|
|
807
|
+
| `projection` (`projector`) | `<context> <Name> <event-type>[@v<n>]` | a projector in `application/projections/<name>.projection.ts`, declared with `@Projection('<context>.<name>')` and one `@On(definition)` method for the integration event, which the context itself or a declared upstream publishes, and its spec; the type is taken as `list` prints it, `@v<n>` pinning the version (the newest without). In the explicit style on tsyringe the module file of the context includes it with `builder.include(<Name>Projection)`; on a hand-wired platform the class is plain and the module subscribes it under its consumer name. It keeps one read model: its port is received in the constructor |
|
|
808
808
|
| `job` | `<context> <Name> (--every <duration> \| --cron "<expression>" [--time-zone <zone>]) --command <UseCaseName>` | `application/scheduling/<name>.job.ts`, a class `<Name>Job implements ScheduledJob` that sends the command, as `systemActor('<context>.<name>')` when it is protected, with `execution.scheduledAt` when the command takes it; `test/unit/<name>.job.spec.ts`, which runs the job (by name on tsyringe, `application.jobs.runNow`; `job.run(occurrence)` with hand wiring) and asserts the command it sent; its registration; its switch in `platform/jobs/job-settings.ts`; the grant of its system actor (below) |
|
|
809
809
|
| `background-job` | `<context> <Name> --command <UseCaseName>` | `application/background/<name>.background-job.ts`, a class `<Name>BackgroundJob implements BackgroundJob<<Name>Payload>` named by its static `jobName` `<context>.<name>`, that sends the command as `execution.actor` when it is protected, followed by one field of `<Name>Payload` per other parameter of the constructor of the command (strings, numbers, booleans, literals and lists of them as written, a `Date` as its ISO text; anything else is refused), and its static `payload`, the schema of that payload in the validation library of the stack (a `z.object` under zod, a class of decorated fields without initial value under class-validator, a `Type.Object` under TypeBox, one refusal per field written by hand under Standard Schema and, with `--validation none`, in the `BackgroundJobPayloadSchema` of the kernel; a type it writes no check for is typed `unknown` with a `TODO(domain)`), which the worker reads the stored payload with before each run; `test/unit/<name>.background-job.spec.ts`, which enqueues it with a payload of every field as a user and runs what is due, then enqueues it as an earlier version declared it (`earlierVersionOf` of `@ddd-ts-kit/testing`) and shows the job dead with `INVALID_JOB_PAYLOAD` (through the test application on tsyringe, through a queue and a worker in memory on the test buses otherwise); its registration (`@Background()`, `builder.backgroundJob(..)` in the module file on tsyringe, `platform.backgroundJobs.register(..)` in the module file of a platform wired by hand) |
|
|
810
810
|
| `process` (`process-manager`) | `<context> <Name>` | `application/processes/<name>.process.ts` (its state, `processName`, `timeoutJob`, `isState`, a first step that arms a deadline, a step that ends it in time, the step of the deadline), `application/background/<name>-timeout.background-job.ts`, which delivers its timeouts through `ProcessRunner`, and the specs of both (`givenProcess`, the queue of the test application on tsyringe, a queue and a runner in memory on the test buses otherwise) |
|
|
@@ -932,7 +932,11 @@ Next, in this order: the language of the context first, then the business decisi
|
|
|
932
932
|
not read as past tense are refused too; a technical word passes when a term of the glossary
|
|
933
933
|
holds it (`--term "Scoring model=<meaning>"` lets `ScoringModel` through), because the language
|
|
934
934
|
of the business wins. `--allow-name` overrides the three checks; `check`
|
|
935
|
-
will still report what the glossary does not define.
|
|
935
|
+
will still report what the glossary does not define. Only the kinds whose usage shows `--term`
|
|
936
|
+
take it (`heldToGlossary` in `generate --help --json`, a line of `generate <kind> --help`); the
|
|
937
|
+
others (`port`, `adapter`, `repository`, `route`, `representation`...) name what an earlier
|
|
938
|
+
command named or what the concept they serve is called, and refuse `--term`, naming the kinds
|
|
939
|
+
that take it.
|
|
936
940
|
- Generated code compiles as is and passes `check`, the ESLint preset, dependency-cruiser and knip
|
|
937
941
|
at the default severities: one export per file, files far under 350 lines, `private` members,
|
|
938
942
|
the blank-line layout. Every place that needs business knowledge carries a
|
|
@@ -956,7 +960,9 @@ Next, in this order: the language of the context first, then the business decisi
|
|
|
956
960
|
output prints each place on one line, `file:line gist` (the whole `text` of a step).
|
|
957
961
|
- A kind that needs something else to compile either creates it (a missing repository or
|
|
958
962
|
domain event) or stops with the command that creates it (a missing aggregate, use case or
|
|
959
|
-
route).
|
|
963
|
+
route). Its `summary` names that command, `After generate ...`
|
|
964
|
+
(`After generate route <context> <UseCase>` for a `representation`): the commands of one row
|
|
965
|
+
of the slices run in that order.
|
|
960
966
|
- Registration goes between marker comments (`// ddd-ts-kit:<region>` ... `// /ddd-ts-kit:<region>`,
|
|
961
967
|
HTML comments in Markdown). Remove a marker and the generator prints what to add by hand.
|
|
962
968
|
- Every `generate` refreshes the generated documentation and `.dependency-cruiser.cjs` when
|
|
@@ -964,7 +970,8 @@ Next, in this order: the language of the context first, then the business decisi
|
|
|
964
970
|
- `--local-only` refuses, naming the files and writing nothing, when the run would write outside
|
|
965
971
|
`<contextsDir>/<context>/` and `test/e2e/*.e2e.spec.ts`. `generate --help --json` prints every
|
|
966
972
|
kind with its `usage`, `aliases`, `summary` and `writesShared`, plus `shared` and `sharedWhen`:
|
|
967
|
-
what it writes outside its context, and when; `
|
|
973
|
+
what it writes outside its context, and when; `writesInModules`, true when it takes `--module`;
|
|
974
|
+
and `heldToGlossary`, true when it takes `--term`. `generate <kind> --help --json` prints that kind
|
|
968
975
|
alone, as one object, and `generate <kind> --help` the same as text. Both serve a build split between workers (see
|
|
969
976
|
`worker-scope`).
|
|
970
977
|
- A fake is an entry point for knip and may have no importer for dependency-cruiser: a port
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"privacy-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/privacy-fixtures.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwBzC,eAAO,MAAM,gBAAgB,EAAE,SAAS,OAAO,
|
|
1
|
+
{"version":3,"file":"privacy-fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/privacy-fixtures.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwBzC,eAAO,MAAM,gBAAgB,EAAE,SAAS,OAAO,EA6Q9C,CAAC"}
|
|
@@ -123,6 +123,16 @@ export const PRIVACY_FIXTURES = [
|
|
|
123
123
|
[PAYLOAD]: source('export class ProductListedV1Payload {', " productId = '';", '', " sellerEmail = '';", '', ' readonly sellerPhone?: string;', '}'),
|
|
124
124
|
}),
|
|
125
125
|
},
|
|
126
|
+
memberFixture('a declared member of the payload class named like personal data, another field listed', [
|
|
127
|
+
' declare productId: string;',
|
|
128
|
+
' declare sellerEmail: string;',
|
|
129
|
+
' declare readonly sellerPhone?: string;',
|
|
130
|
+
]),
|
|
131
|
+
memberFixture('a public readonly payload member named like personal data, another field listed', [
|
|
132
|
+
' public readonly productId: string;',
|
|
133
|
+
' public readonly sellerEmail: string;',
|
|
134
|
+
' public readonly sellerPhone: string;',
|
|
135
|
+
]),
|
|
126
136
|
{
|
|
127
137
|
ruleId: 'privacy/erasure-reaches-copies',
|
|
128
138
|
name: 'a consumer of an event that carries personal data, which declares its erasure',
|
|
@@ -199,6 +209,18 @@ export const PRIVACY_FIXTURES = [
|
|
|
199
209
|
}),
|
|
200
210
|
},
|
|
201
211
|
];
|
|
212
|
+
/** A payload class whose members, written with the modifiers given, carry a phone number the personal option does not list. */
|
|
213
|
+
function memberFixture(name, members) {
|
|
214
|
+
return {
|
|
215
|
+
ruleId: 'privacy/event-payload-declared',
|
|
216
|
+
name,
|
|
217
|
+
expect: { file: PAYLOAD },
|
|
218
|
+
files: privacyOn({
|
|
219
|
+
[EVENT]: event([DECLARED_SELLER, ' payload: classSchema(ProductListedV1Payload),']),
|
|
220
|
+
[PAYLOAD]: source('export class ProductListedV1Payload {', ...members, '}'),
|
|
221
|
+
}),
|
|
222
|
+
};
|
|
223
|
+
}
|
|
202
224
|
/** A project whose platform answers the requests of a data subject, with what a fixture adds to its config. */
|
|
203
225
|
function privacyOn(files, written = {}) {
|
|
204
226
|
return project(files, { [CONFIG_FILE]: config({ stack: { privacy: 'on', orm: 'knex' }, ...written }) });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"privacy-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/privacy-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,mBAAmB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ACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"published-events-of.d.ts","sourceRoot":"","sources":["../../../src/check/privacy/published-events-of.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"published-events-of.d.ts","sourceRoot":"","sources":["../../../src/check/privacy/published-events-of.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAYhD,2EAA2E;AAC3E,UAAU,YAAY;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,+GAA+G;AAC/G,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;KAAE,CAAC;IACrF,QAAQ,CAAC,OAAO,EAAE,SAAS,YAAY,EAAE,CAAC;CAC3C;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,gBAAgB,EAAE,CAiBtE"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { propertyOf } from '../structure/property-of.js';
|
|
1
2
|
import { matchingBracket } from '../text/matching-bracket.js';
|
|
2
3
|
const DEFINE = /\bexport\s+const\s+([\w$]+)\s*=\s*defineIntegrationEvent\s*\(/g;
|
|
3
4
|
const ZOD_OBJECT = /\bz\.object\s*\(\s*\{/g;
|
|
4
|
-
const MEMBER = /^ {2}(?:readonly\s+)?([A-Za-z_$][\w$]*)[!?]?\s*[:=]/;
|
|
5
5
|
const SUFFIX = '.integration-event.ts';
|
|
6
|
+
/** A member of the class or the interface itself, not a line nested in one of its values. */
|
|
7
|
+
const FIRST_INDENTATION = /^ {2}\S/;
|
|
6
8
|
const KEY = /(?:^|[{,]\s*|\n\s*)([A-Za-z_$][\w$]*)\s*:/g;
|
|
7
9
|
/**
|
|
8
10
|
* The integration events of `published-language/*.integration-event.ts`: the constant
|
|
@@ -73,7 +75,7 @@ function zodFields(file, range) {
|
|
|
73
75
|
/** The members of the class or the interface of a payload file, one per line at the first indentation. */
|
|
74
76
|
function membersOf(file) {
|
|
75
77
|
return file.text.split('\n').flatMap((line, index) => {
|
|
76
|
-
const name =
|
|
78
|
+
const name = FIRST_INDENTATION.test(line) ? propertyOf(line)?.name : undefined;
|
|
77
79
|
return name === undefined ? [] : [{ name, file: file.path, line: index + 1 }];
|
|
78
80
|
});
|
|
79
81
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"published-events-of.js","sourceRoot":"","sources":["../../../src/check/privacy/published-events-of.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,MAAM,MAAM,GAAG,gEAAgE,CAAC;AAChF,MAAM,UAAU,GAAG,wBAAwB,CAAC;AAC5C,MAAM,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"published-events-of.js","sourceRoot":"","sources":["../../../src/check/privacy/published-events-of.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,MAAM,MAAM,GAAG,gEAAgE,CAAC;AAChF,MAAM,UAAU,GAAG,wBAAwB,CAAC;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a,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"class-shapes.d.ts","sourceRoot":"","sources":["../../../src/check/schemas/class-shapes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,aAAa,EAAE,CAQ3E"}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { classStatements } from '../structure/class-statements.js';
|
|
2
2
|
import { stillGenerated } from './still-generated.js';
|
|
3
|
-
import { topLevelStatements } from './top-level-statements.js';
|
|
4
|
-
const DECORATOR_NAME = /@[A-Za-z_$][\w$]*\s*/y;
|
|
5
|
-
const PROPERTY = /^(?:(?:readonly|public|declare)\s+)*([A-Za-z_$][\w$]*)\s*([?!])?/;
|
|
6
3
|
/**
|
|
7
4
|
* The DTO classes of a source: a class of the module that extends nothing, has no method and
|
|
8
5
|
* gives a decorator to each of its properties. Its shape is its properties, by name, each with
|
|
@@ -20,33 +17,15 @@ function dtoMembers(shape, code) {
|
|
|
20
17
|
if (shape.depth !== 0 || shape.superclass !== undefined || shape.methods.length > 0) {
|
|
21
18
|
return undefined;
|
|
22
19
|
}
|
|
23
|
-
const members =
|
|
20
|
+
const members = classStatements(shape, code).map(member);
|
|
24
21
|
const decorated = members.flatMap((one) => (one === undefined ? [] : [one]));
|
|
25
22
|
return decorated.length === 0 || decorated.length < members.length ? undefined : decorated.sort();
|
|
26
23
|
}
|
|
27
24
|
/** `name?:@IsString()@MaxLength(500)` for a decorated property; nothing for anything else. */
|
|
28
|
-
function member(
|
|
29
|
-
|
|
30
|
-
const property = PROPERTY.exec(rest);
|
|
31
|
-
if (decorators.length === 0 || property === null) {
|
|
25
|
+
function member(property) {
|
|
26
|
+
if (property === undefined || property.decorators.length === 0) {
|
|
32
27
|
return undefined;
|
|
33
28
|
}
|
|
34
|
-
return `${property
|
|
35
|
-
}
|
|
36
|
-
/** The decorators that open a statement, their arguments included, and what follows them. */
|
|
37
|
-
function decoratorsOf(statement) {
|
|
38
|
-
const decorators = [];
|
|
39
|
-
let at = 0;
|
|
40
|
-
for (;;) {
|
|
41
|
-
DECORATOR_NAME.lastIndex = at;
|
|
42
|
-
const name = DECORATOR_NAME.exec(statement);
|
|
43
|
-
if (name === null) {
|
|
44
|
-
return { decorators, rest: statement.slice(at).trim() };
|
|
45
|
-
}
|
|
46
|
-
const open = at + name[0].length;
|
|
47
|
-
const end = statement.charAt(open) === '(' ? matchingBracket(statement, open) + 1 : open;
|
|
48
|
-
decorators.push(statement.slice(at, end).replace(/\s+/g, ''));
|
|
49
|
-
at = end + (statement.slice(end).length - statement.slice(end).trimStart().length);
|
|
50
|
-
}
|
|
29
|
+
return `${property.name}${property.optional ? '?' : ''}:${property.decorators.join('')}`;
|
|
51
30
|
}
|
|
52
31
|
//# sourceMappingURL=class-shapes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"class-shapes.js","sourceRoot":"","sources":["../../../src/check/schemas/class-shapes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"class-shapes.js","sourceRoot":"","sources":["../../../src/check/schemas/class-shapes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAsB,MAAM,+BAA+B,CAAC;AAEpF,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,IAAgB,EAAE,IAAY;IACxD,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QAC9C,MAAM,OAAO,GAAG,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAExC,OAA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AAG,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;AAC3F,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ClassShape } from './class-shape.js';
|
|
2
|
+
import { type Property } from './property-of.js';
|
|
3
|
+
/** A property of a class body with the decorators written above it, each without its spaces. */
|
|
4
|
+
export interface ClassProperty extends Property {
|
|
5
|
+
readonly decorators: readonly string[];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Each statement of the body of a class, in its order: the property it declares with its
|
|
9
|
+
* decorators, or nothing for a statement that declares none. Read on the blanked code of the
|
|
10
|
+
* scanner, so a comment or a string never counts.
|
|
11
|
+
*/
|
|
12
|
+
export declare function classStatements(shape: ClassShape, code: string): (ClassProperty | undefined)[];
|
|
13
|
+
//# sourceMappingURL=class-statements.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"class-statements.d.ts","sourceRoot":"","sources":["../../../src/check/structure/class-statements.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE1D,gGAAgG;AAChG,MAAM,WAAW,aAAc,SAAQ,QAAQ;IAC7C,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC;AAID;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,aAAa,GAAG,SAAS,CAAC,EAAE,CAE9F"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { topLevelStatements } from '../schemas/top-level-statements.js';
|
|
2
|
+
import { matchingBracket } from '../text/matching-bracket.js';
|
|
3
|
+
import { propertyOf } from './property-of.js';
|
|
4
|
+
const DECORATOR_NAME = /@[A-Za-z_$][\w$]*\s*/y;
|
|
5
|
+
/**
|
|
6
|
+
* Each statement of the body of a class, in its order: the property it declares with its
|
|
7
|
+
* decorators, or nothing for a statement that declares none. Read on the blanked code of the
|
|
8
|
+
* scanner, so a comment or a string never counts.
|
|
9
|
+
*/
|
|
10
|
+
export function classStatements(shape, code) {
|
|
11
|
+
return topLevelStatements(code.slice(shape.bodyStart + 1, shape.end), ';').map(classPropertyOf);
|
|
12
|
+
}
|
|
13
|
+
function classPropertyOf(statement) {
|
|
14
|
+
const { decorators, rest } = decoratorsOf(statement.trim());
|
|
15
|
+
const property = propertyOf(rest);
|
|
16
|
+
return property === undefined ? undefined : { ...property, decorators };
|
|
17
|
+
}
|
|
18
|
+
/** The decorators that open a statement, their arguments included, and what follows them. */
|
|
19
|
+
function decoratorsOf(statement) {
|
|
20
|
+
const decorators = [];
|
|
21
|
+
let at = 0;
|
|
22
|
+
for (;;) {
|
|
23
|
+
DECORATOR_NAME.lastIndex = at;
|
|
24
|
+
const name = DECORATOR_NAME.exec(statement);
|
|
25
|
+
if (name === null) {
|
|
26
|
+
return { decorators, rest: statement.slice(at).trim() };
|
|
27
|
+
}
|
|
28
|
+
const open = at + name[0].length;
|
|
29
|
+
const end = statement.charAt(open) === '(' ? matchingBracket(statement, open) + 1 : open;
|
|
30
|
+
decorators.push(statement.slice(at, end).replace(/\s+/g, ''));
|
|
31
|
+
at = end + (statement.slice(end).length - statement.slice(end).trimStart().length);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=class-statements.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"class-statements.js","sourceRoot":"","sources":["../../../src/check/structure/class-statements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,EAAE,UAAU,E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GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAEzF,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC;QAC9D,EAAE,GAAG,GAAG,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,CAAC,MAAM,CAAC,CAAC;IACrF,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** A property of a class as its declaration reads: its name, whether it is optional, whether it is given a value. */
|
|
2
|
+
export interface Property {
|
|
3
|
+
readonly name: string;
|
|
4
|
+
readonly optional: boolean;
|
|
5
|
+
readonly initialized: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The property a declaration of a class body declares, its decorators already read: `name`,
|
|
9
|
+
* `declare name: string`, `public readonly name?: string`, `name = ''`. Nothing for a method, an
|
|
10
|
+
* accessor, a static member or anything else.
|
|
11
|
+
*/
|
|
12
|
+
export declare function propertyOf(declaration: string): Property | undefined;
|
|
13
|
+
//# sourceMappingURL=property-of.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"property-of.d.ts","sourceRoot":"","sources":["../../../src/check/structure/property-of.ts"],"names":[],"mappings":"AAAA,qHAAqH;AACrH,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC/B;AASD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAcpE"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** The modifiers a property may carry before its name, in any order, then its name, its mark and what follows. */
|
|
2
|
+
const PROPERTY = /^(?:(?:public|protected|private|readonly|declare|override)\s+)*([A-Za-z_$][\w$]*)\s*([?!])?\s*([:=;]|$)/;
|
|
3
|
+
/** An `=` that gives a value: neither part of `=>`, `==`, `<=`, `>=` nor `!=`. */
|
|
4
|
+
const ASSIGNMENT = /(?<![=!<>])=(?![=>])/;
|
|
5
|
+
/**
|
|
6
|
+
* The property a declaration of a class body declares, its decorators already read: `name`,
|
|
7
|
+
* `declare name: string`, `public readonly name?: string`, `name = ''`. Nothing for a method, an
|
|
8
|
+
* accessor, a static member or anything else.
|
|
9
|
+
*/
|
|
10
|
+
export function propertyOf(declaration) {
|
|
11
|
+
const trimmed = declaration.trim();
|
|
12
|
+
const match = PROPERTY.exec(trimmed);
|
|
13
|
+
const name = match?.[1];
|
|
14
|
+
if (match === null || name === undefined) {
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
return {
|
|
18
|
+
name,
|
|
19
|
+
optional: match[2] === '?',
|
|
20
|
+
initialized: match[3] === '=' || (match[3] === ':' && ASSIGNMENT.test(trimmed.slice(match[0].length))),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=property-of.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"property-of.js","sourceRoot":"","sources":["../../../src/check/structure/property-of.ts"],"names":[],"mappings":"AAOA,kHAAkH;AAClH,MAAM,QAAQ,GACZ,yGAAyG,CAAC;AAE5G,kFAAkF;AAClF,MAAM,UAAU,GAAG,sBAAsB,CAAC;AAE1C;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,WAAmB;IAC5C,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,EAAE,CAAC;IACnC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrC,MAAM,IAAI,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;IAExB,IAAI,KAAK,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACzC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO;QACL,IAAI;QACJ,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG;QAC1B,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;KACvG,CAAC;AACJ,CAAC"}
|
|
@@ -5,6 +5,8 @@ export interface EventDefinition {
|
|
|
5
5
|
readonly name: string;
|
|
6
6
|
readonly type: string;
|
|
7
7
|
readonly version: number;
|
|
8
|
+
/** The file of the published language that declares it, relative to the root of the project. */
|
|
9
|
+
readonly file: string;
|
|
8
10
|
}
|
|
9
11
|
/** The integration events the published language of a context declares. */
|
|
10
12
|
export declare function readEventDefinitions(ws: Workspace, directory: string): EventDefinition[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-event-definitions.d.ts","sourceRoot":"","sources":["../../src/describe/read-event-definitions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,4DAA4D;AAC5D,MAAM,WAAW,eAAe;IAC9B,gDAAgD;IAChD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"read-event-definitions.d.ts","sourceRoot":"","sources":["../../src/describe/read-event-definitions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,4DAA4D;AAC5D,MAAM,WAAW,eAAe;IAC9B,gDAAgD;IAChD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,gGAAgG;IAChG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAID,2EAA2E;AAC3E,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,GAAG,eAAe,EAAE,CAWxF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-event-definitions.js","sourceRoot":"","sources":["../../src/describe/read-event-definitions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"read-event-definitions.js","sourceRoot":"","sources":["../../src/describe/read-event-definitions.ts"],"names":[],"mappings":"AAYA,MAAM,UAAU,GAAG,4FAA4F,CAAC;AAEhH,2EAA2E;AAC3E,MAAM,UAAU,oBAAoB,CAAC,EAAa,EAAE,SAAiB;IACnE,MAAM,MAAM,GAAG,GAAG,SAAS,qBAAqB,CAAC;IAEjD,OAAO,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CACtC,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,MAAM,IAAI,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC7E,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE;QACpB,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE;QACpB,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACzB,IAAI,EAAE,GAAG,MAAM,IAAI,IAAI,EAAE;KAC1B,CAAC,CAAC,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flags-of.d.ts","sourceRoot":"","sources":["../../src/generate/flags-of.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAGnC,kHAAkH;AAClH,wBAAgB,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,CAE/C"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { usageOf } from './usage-of.js';
|
|
2
|
+
/** The flags the usage of a kind shows, by their names without the dashes: `module` on the kinds that take it. */
|
|
3
|
+
export function flagsOf(kind) {
|
|
4
|
+
return new Set([...usageOf(kind).matchAll(/--([a-z-]+)/g)].flatMap((match) => match[1] ?? []));
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=flags-of.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flags-of.js","sourceRoot":"","sources":["../../src/generate/flags-of.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,kHAAkH;AAClH,MAAM,UAAU,OAAO,CAAC,IAAU;IAChC,OAAO,IAAI,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;AACjG,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Kind } from './kind.js';
|
|
2
|
+
/**
|
|
3
|
+
* True when a kind takes `--term`, its usage showing it: the names it writes are judged against
|
|
4
|
+
* the glossary of the context, and a word the glossary does not define joins it in the same
|
|
5
|
+
* command (`context` writes the first terms). Every other kind refuses `--term`: what it names
|
|
6
|
+
* an earlier command named, or it is read from the concept it serves (a port, an adapter, a route).
|
|
7
|
+
*/
|
|
8
|
+
export declare function heldToGlossary(kind: Kind): boolean;
|
|
9
|
+
//# sourceMappingURL=held-to-glossary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"held-to-glossary.d.ts","sourceRoot":"","sources":["../../src/generate/held-to-glossary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAGnC;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAElD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { flagsOf } from './flags-of.js';
|
|
2
|
+
/**
|
|
3
|
+
* True when a kind takes `--term`, its usage showing it: the names it writes are judged against
|
|
4
|
+
* the glossary of the context, and a word the glossary does not define joins it in the same
|
|
5
|
+
* command (`context` writes the first terms). Every other kind refuses `--term`: what it names
|
|
6
|
+
* an earlier command named, or it is read from the concept it serves (a port, an adapter, a route).
|
|
7
|
+
*/
|
|
8
|
+
export function heldToGlossary(kind) {
|
|
9
|
+
return flagsOf(kind).has('term');
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=held-to-glossary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"held-to-glossary.js","sourceRoot":"","sources":["../../src/generate/held-to-glossary.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,IAAU;IACvC,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -13,6 +13,8 @@ export interface KindHelp {
|
|
|
13
13
|
readonly sharedWhen: string | null;
|
|
14
14
|
/** True when it takes `--module`: it writes files the modules of the model of a context divide. */
|
|
15
15
|
readonly writesInModules: boolean;
|
|
16
|
+
/** True when it takes `--term`: its names are judged against the glossary of the context. */
|
|
17
|
+
readonly heldToGlossary: boolean;
|
|
16
18
|
}
|
|
17
19
|
/** One kind, as `generate <kind> --help --json` answers it. */
|
|
18
20
|
export declare function kindHelp(kind: Kind): KindHelp;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kind-help.d.ts","sourceRoot":"","sources":["../../src/generate/kind-help.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"kind-help.d.ts","sourceRoot":"","sources":["../../src/generate/kind-help.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAInC,qGAAqG;AACrG,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,0CAA0C;IAC1C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,6DAA6D;IAC7D,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,+DAA+D;IAC/D,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,mGAAmG;IACnG,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,6FAA6F;IAC7F,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;CAClC;AAED,+DAA+D;AAC/D,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,QAAQ,CAe7C"}
|