ddd-ts-kit 0.95.0 → 0.96.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 +26 -0
- package/README.fr.md +60 -9
- package/README.md +54 -8
- package/dist/cli-error.d.ts +3 -3
- package/dist/cli-error.d.ts.map +1 -1
- package/dist/cli-error.js +4 -3
- package/dist/cli-error.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +2 -0
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/generate.d.ts +4 -0
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +5 -3
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/plan-waves.d.ts +2 -1
- package/dist/commands/plan-waves.d.ts.map +1 -1
- package/dist/commands/plan-waves.js +28 -2
- package/dist/commands/plan-waves.js.map +1 -1
- package/dist/doctor/diagnose.d.ts +2 -1
- package/dist/doctor/diagnose.d.ts.map +1 -1
- package/dist/doctor/diagnose.js +4 -1
- package/dist/doctor/diagnose.js.map +1 -1
- package/dist/doctor/doctor-finding.d.ts +1 -1
- package/dist/doctor/doctor-finding.d.ts.map +1 -1
- package/dist/doctor/format-diagnosis.js +25 -2
- package/dist/doctor/format-diagnosis.js.map +1 -1
- package/dist/doctor/install-script-findings.d.ts +11 -0
- package/dist/doctor/install-script-findings.d.ts.map +1 -0
- package/dist/doctor/install-script-findings.js +86 -0
- package/dist/doctor/install-script-findings.js.map +1 -0
- package/dist/doctor/installed-from.d.ts +3 -0
- package/dist/doctor/installed-from.d.ts.map +1 -0
- package/dist/doctor/installed-from.js +15 -0
- package/dist/doctor/installed-from.js.map +1 -0
- package/dist/doctor/override-findings.d.ts.map +1 -1
- package/dist/doctor/override-findings.js +1 -11
- package/dist/doctor/override-findings.js.map +1 -1
- package/dist/generate/kind.d.ts +3 -0
- package/dist/generate/kind.d.ts.map +1 -1
- package/dist/generate/kinds/declare-storage.d.ts.map +1 -1
- package/dist/generate/kinds/declare-storage.js +5 -1
- package/dist/generate/kinds/declare-storage.js.map +1 -1
- package/dist/generate/kinds/generate-context.d.ts.map +1 -1
- package/dist/generate/kinds/generate-context.js +14 -0
- package/dist/generate/kinds/generate-context.js.map +1 -1
- package/dist/generate/language-probe.d.ts +16 -0
- package/dist/generate/language-probe.d.ts.map +1 -0
- package/dist/generate/language-probe.js +2 -0
- package/dist/generate/language-probe.js.map +1 -0
- package/dist/generate/spoken-in-language.d.ts +2 -1
- package/dist/generate/spoken-in-language.d.ts.map +1 -1
- package/dist/generate/spoken-in-language.js +6 -1
- package/dist/generate/spoken-in-language.js.map +1 -1
- package/dist/help/notes.d.ts +1 -1
- package/dist/help/notes.d.ts.map +1 -1
- package/dist/help/notes.js +11 -3
- package/dist/help/notes.js.map +1 -1
- package/dist/init/first-install-note.d.ts.map +1 -1
- package/dist/init/first-install-note.js +21 -0
- package/dist/init/first-install-note.js.map +1 -1
- package/dist/init/managed-settings-note.d.ts.map +1 -1
- package/dist/init/managed-settings-note.js +1 -0
- package/dist/init/managed-settings-note.js.map +1 -1
- package/dist/init/manifest/allow-builds-block.d.ts +3 -0
- package/dist/init/manifest/allow-builds-block.d.ts.map +1 -0
- package/dist/init/manifest/allow-builds-block.js +5 -0
- package/dist/init/manifest/allow-builds-block.js.map +1 -0
- package/dist/init/manifest/allow-builds-entries.d.ts +8 -0
- package/dist/init/manifest/allow-builds-entries.d.ts.map +1 -0
- package/dist/init/manifest/allow-builds-entries.js +8 -0
- package/dist/init/manifest/allow-builds-entries.js.map +1 -0
- package/dist/init/manifest/database-scripts.d.ts.map +1 -1
- package/dist/init/manifest/database-scripts.js +3 -1
- package/dist/init/manifest/database-scripts.js.map +1 -1
- package/dist/init/manifest/install-scripts-of.d.ts +18 -0
- package/dist/init/manifest/install-scripts-of.d.ts.map +1 -0
- package/dist/init/manifest/install-scripts-of.js +25 -0
- package/dist/init/manifest/install-scripts-of.js.map +1 -0
- package/dist/init/manifest/names-package.d.ts +3 -0
- package/dist/init/manifest/names-package.d.ts.map +1 -0
- package/dist/init/manifest/names-package.js +5 -0
- package/dist/init/manifest/names-package.js.map +1 -0
- package/dist/init/manifest/prisma-client-script.d.ts +3 -0
- package/dist/init/manifest/prisma-client-script.d.ts.map +1 -0
- package/dist/init/manifest/prisma-client-script.js +5 -0
- package/dist/init/manifest/prisma-client-script.js.map +1 -0
- package/dist/init/manifest/versions.js +24 -24
- package/dist/init/manifest/write-install-scripts.d.ts +10 -0
- package/dist/init/manifest/write-install-scripts.d.ts.map +1 -0
- package/dist/init/manifest/write-install-scripts.js +78 -0
- package/dist/init/manifest/write-install-scripts.js.map +1 -0
- package/dist/init/manifest/write-manifest.d.ts.map +1 -1
- package/dist/init/manifest/write-manifest.js +9 -1
- package/dist/init/manifest/write-manifest.js.map +1 -1
- package/dist/init/run-init.d.ts.map +1 -1
- package/dist/init/run-init.js +20 -3
- package/dist/init/run-init.js.map +1 -1
- package/dist/merge/ensure-mergeable.d.ts.map +1 -1
- package/dist/merge/ensure-mergeable.js +15 -0
- package/dist/merge/ensure-mergeable.js.map +1 -1
- package/dist/merge/ensure-writable.d.ts +9 -0
- package/dist/merge/ensure-writable.d.ts.map +1 -0
- package/dist/merge/ensure-writable.js +51 -0
- package/dist/merge/ensure-writable.js.map +1 -0
- package/dist/merge/is-sandbox-mask.d.ts +4 -0
- package/dist/merge/is-sandbox-mask.d.ts.map +1 -0
- package/dist/merge/is-sandbox-mask.js +5 -0
- package/dist/merge/is-sandbox-mask.js.map +1 -0
- package/dist/merge/merge-trunk.d.ts.map +1 -1
- package/dist/merge/merge-trunk.js +4 -0
- package/dist/merge/merge-trunk.js.map +1 -1
- package/dist/plan/format-plan.d.ts +2 -1
- package/dist/plan/format-plan.d.ts.map +1 -1
- package/dist/plan/format-plan.js +20 -2
- package/dist/plan/format-plan.js.map +1 -1
- package/dist/plan/plan-waves.d.ts.map +1 -1
- package/dist/plan/plan-waves.js +2 -1
- package/dist/plan/plan-waves.js.map +1 -1
- package/dist/plan/planned-commands.d.ts +10 -0
- package/dist/plan/planned-commands.d.ts.map +1 -0
- package/dist/plan/planned-commands.js +13 -0
- package/dist/plan/planned-commands.js.map +1 -0
- package/dist/plan/planned-words.d.ts +27 -0
- package/dist/plan/planned-words.d.ts.map +1 -0
- package/dist/plan/planned-words.js +170 -0
- package/dist/plan/planned-words.js.map +1 -0
- package/dist/plan/wave-plan.d.ts +11 -1
- package/dist/plan/wave-plan.d.ts.map +1 -1
- package/dist/prisma-schema/index.d.ts +4 -0
- package/dist/prisma-schema/index.d.ts.map +1 -1
- package/dist/prisma-schema/index.js +4 -0
- package/dist/prisma-schema/index.js.map +1 -1
- package/dist/prisma-schema/keeps-single-prisma-schema.d.ts +7 -0
- package/dist/prisma-schema/keeps-single-prisma-schema.d.ts.map +1 -0
- package/dist/prisma-schema/keeps-single-prisma-schema.js +11 -0
- package/dist/prisma-schema/keeps-single-prisma-schema.js.map +1 -0
- package/dist/prisma-schema/single-prisma-schema-found.d.ts +3 -0
- package/dist/prisma-schema/single-prisma-schema-found.d.ts.map +1 -0
- package/dist/prisma-schema/single-prisma-schema-found.js +7 -0
- package/dist/prisma-schema/single-prisma-schema-found.js.map +1 -0
- package/dist/prisma-schema/single-prisma-schema-steps.d.ts +6 -0
- package/dist/prisma-schema/single-prisma-schema-steps.d.ts.map +1 -0
- package/dist/prisma-schema/single-prisma-schema-steps.js +25 -0
- package/dist/prisma-schema/single-prisma-schema-steps.js.map +1 -0
- package/dist/prisma-schema/single-prisma-schema.d.ts +3 -0
- package/dist/prisma-schema/single-prisma-schema.d.ts.map +1 -0
- package/dist/prisma-schema/single-prisma-schema.js +3 -0
- package/dist/prisma-schema/single-prisma-schema.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/templates/aggregate/event-sourced.aggregate.spec.ts.tpl +8 -0
- package/templates/init/pnpm-workspace.yaml +2 -5
- package/templates/pipeline/package-scripts.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,32 @@ 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.96.0
|
|
8
|
+
|
|
9
|
+
**`plan-waves` replays the generator commands of the plan and refuses a name the glossary does not define, before a worker runs the row.** A plan whose rows use words the glossary of their context does not define, with no `--term`, was handed to workers as it was, and each of them was refused at the first command: on a plan of the incident-response example written by a small model, 71 of the 85 commands of one context. Once the rows can be ordered, `plan-waves` now replays their generator commands in a copy of the project, in the order of the waves, and reports, without waves and with exit 1, each name whose words the glossary of its context does not define (`undefined-word`) or that carries a technical word no term holds (`technical-word`), counting the `--term` of the row and of the rows it waits for, with the `--term` to add. The generator itself says which names a command introduces, so the check judges exactly what a worker would meet. The commands the generator refuses for another reason (a missing `--module`, an aggregate no row generates) are listed apart, without failing (`notReplayed` in `--json`). The `plan-slices` skill commits a plan only once `plan-waves` exits 0.
|
|
10
|
+
|
|
11
|
+
To move: run `npx ddd-ts-kit plan-waves` on a plan in progress, and add to its rows the `--term` it names.
|
|
12
|
+
|
|
13
|
+
**`merge-trunk` stops before it writes when the trunk changes a path the session cannot write, and no longer counts the sandbox's device nodes as uncommitted work.** In a Claude Code sandbox, a trunk that changed `.claude/settings.json` (mounted read-only) or a folder under an Edit deny rule left the worktree half merged, and the character devices the sandbox binds over denied paths made the cleanliness check refuse. Before the merge writes anything, `merge-trunk` now probes each path the trunk changes (the file, and its folder for the merge to create or remove it); when one is not writable it stops with nothing changed, names the paths and exits 3, the code `init` uses: the owner runs the same command from a terminal outside the sandbox. Untracked character devices are ignored by the cleanliness check; any other untracked or modified file still refuses. The `parallel-work` and `story` skills say that a merge of a trunk that changes the settings of the project is the owner's.
|
|
14
|
+
|
|
15
|
+
**`generate context` and `init --context` refuse a bounded context named `schema`, on every ORM.** On Prisma the models of a context live in `prisma/schema/<context>.prisma`, beside the main file `prisma/schema/schema.prisma` (the generator of the client, the datasource and the tables of the platform): a context named `schema` would have written its models into that shared file, which the guard already read as the file of no context. The name is refused before anything is written, with the reason and a name to use instead. It is refused on every ORM, not on Prisma alone: `init --force` moves a project to another ORM, and the word names the storage, not a capability of the business. `schema-registry` and other names that only hold the word are accepted.
|
|
16
|
+
|
|
17
|
+
**`init` run again on a Prisma project laid out before 0.95 keeps its one `prisma/schema.prisma`, says how to move it, and `generate repository` waits for the move.** On a project whose schema was the one `prisma/schema.prisma` of 0.94, `init` 0.95.0 wrote a fresh `prisma/schema/schema.prisma` beside it (a second generator and datasource), while `prisma.config.ts` still named the old file, and the `git mv` of the To move of 0.95.0 then failed on its target. While `prisma/schema.prisma` is there and `prisma/schema/schema.prisma` is not, `init` now writes neither `prisma/schema/schema.prisma` nor `prisma.config.ts`, keeps `db:client` on the one file (under `--force` too), and its notes give the steps of the move with each context of the project and the file its models go to. The move stays the team's: it parts the models by their `@@schema` and edits a config and a script the team may have changed. `generate repository` refuses to write the model of a context until the move, with the same steps: Prisma would not read `prisma/schema/<context>.prisma` while `prisma.config.ts` names the one file.
|
|
18
|
+
|
|
19
|
+
To move: the two To move lines of 0.95.0 now run in either order. A project that already ran `init` 0.95.0 deletes the `prisma/schema/` folder it wrote (it holds only that fresh `schema.prisma`) before `mkdir prisma/schema && git mv prisma/schema.prisma prisma/schema/schema.prisma`.
|
|
20
|
+
|
|
21
|
+
**`init` allows by name the install scripts the stack needs, the regulated profile pins them after the first install, and `doctor` reports one a bump left unreviewed.** `@prisma/engines` (under `--orm prisma`: it downloads the schema engine `prisma migrate` and `db:client` run) and `@confluentinc/kafka-javascript` (under `--broker kafka`: it downloads the prebuilt native client, or builds it, and the client does not load without it) go into `allowScripts` of `package.json` under npm and into `allowBuilds` of `pnpm-workspace.yaml` under pnpm. Under pnpm, the default package manager, nothing allowed them: pnpm 12 skipped both scripts at every install, so a project on Kafka had no native client (Prisma fetches its engine at first use). Under npm 11.19 the scripts ran, but every install listed them among the scripts not yet reviewed, which npm says a later release blocks. The entries are by name: npm accepts only a name or exact versions (it drops `^7.10.0` with a warning), and the versions are known once the install resolved the ranges. An entry the project has for one of these packages, a pin or a denial, is kept, even under `--force`, and a denial is said. The other install scripts an install lists (esbuild, `@swc/core`, `unrs-resolver`, `protobufjs`, `@parcel/watcher`, lefthook, the preinstall of `prisma`) are left to the team: the kit needs none of them. Under `--agent-profile regulated`, the notes of `init` ask the owner to pin both after the first install, `npm install-scripts approve @prisma/engines @confluentinc/kafka-javascript` turning each name into the installed version (under pnpm, `'<package>@<version>': true` in `allowBuilds`), and say that a bump of one of them then needs the same step once its new script was read. `doctor` reads the version installed against that list: `install-script <package>` is `missing` without an entry (`init` adds it), `other version` when only pins of other versions exist, with the `approve` and `rebuild` commands, both failing `--strict`, and `written otherwise` for a denial, which does not.
|
|
22
|
+
|
|
23
|
+
To move: run `npx ddd-ts-kit init` again on a project on Prisma or Kafka: it adds the two entries (a pnpm project with an `allowBuilds` block of its own is told what to add). Then, on pnpm, `pnpm rebuild @confluentinc/kafka-javascript @prisma/engines` runs the scripts the earlier installs skipped.
|
|
24
|
+
|
|
25
|
+
**`init --agent-profile regulated` and the sandbox guide now say that the `permissions.allow` rules of the project apply only in a workspace trusted on the machine.** A headless `claude -p` run in a workspace never trusted (a fresh clone in CI, a scripted agent run) ignores the `allow` entries of `.claude/settings.json` and prints `Ignoring N permissions.allow entries` on stderr, while `deny` and `ask` still apply; this was checked on Claude Code 2.1.311. The notes of `init` and `docs/guides/agent-sandbox.md` give the two ways to trust a workspace (open it once interactively, or `projects["<root>"].hasTrustDialogAccepted` in `~/.claude.json` of the account that runs it) and say that a git worktree uses the trust of its main checkout (Claude Code docs; not probed). `doctor` does not report the trust: it would have to open `~/.claude.json`, which also holds account data.
|
|
26
|
+
|
|
27
|
+
**A worker is no longer locked out because `verify-slice` regenerated the derived files.** `verify-slice` runs `regenerate` in the worktree of a worker, which rewrites the derived files outside its context (`clients/`, `docs/behaviour/`, `docs/context-map.md`, `openapi/`, `docs/integration/`). When the worker had run inline code in the same stretch (for example `verify-slice --json | node -e ...`), the guard read those files as its own writes outside the scope and refused every Bash and Edit call until the conductor restored them. The guard now leaves what `regenerate` rewrites out of the files it watches after inline code; any other file outside the scope still stops the worker. Workers still commit their derived files with the slice, as `parallel-work` says, and `merge-trunk` still takes the trunk's side and regenerates.
|
|
28
|
+
|
|
29
|
+
**The spec that `generate aggregate --event-sourced` writes uses the builder it is generated with, so the deadcode gate of the project stays green on the trunk.** The builder (`test/builders/<aggregate>.builder.ts`) was written with no importer: the generated spec built its aggregate through `create` and `givenEvents`, so `npm run deadcode` (knip) reported `Unused files` on the builder until a later row first used it. The spec now has a test that loads the aggregate through its builder (state of its birth, no event recorded), the way the state-stored spec already did. The state-stored aggregate needed no change: its spec built every case through its builder.
|
|
30
|
+
|
|
31
|
+
To move: nothing for a project already generated. Re-running the generator on a new aggregate writes the spec with the builder.
|
|
32
|
+
|
|
7
33
|
## 0.95.0
|
|
8
34
|
|
|
9
35
|
**The bare project of a wide stack passes its lint.** With `--audit on` and a tenancy, `src/platform/event-sourcing/create-event-sourcing.ts` imported `ExecutionScope` without using it, an error of `@typescript-eslint/no-unused-vars`; it is imported only where it is used, without the audit. On a composition by hand (manual or Nest DI), `composeApplication` grew a line with each option, and with audit, Sentry, presentation, Nest routes, files over HTTP, an external broker, rate limiting and Redis it reached 31 lines, over the limit of `clean/function-size`: the boundary of the HTTP server is now built by a function of its own, `boundaryOf`, placed under it. To move: a project whose lint reports either finding drops the import, or moves the `httpBoundary({...})` literal of `composeApplication` into a function `boundaryOf(platform, options, presentation)` placed under it.
|
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:84672fb8ed017c79 -->
|
|
3
3
|
|
|
4
4
|
# ddd-ts-kit
|
|
5
5
|
|
|
@@ -146,6 +146,22 @@ correctif, dans les `overrides` de `package.json` sous npm et de `pnpm-workspace
|
|
|
146
146
|
qui ne lit rien de `package.json` : qs `^6.16.0`, que Stryker demande en 6.15.1 par
|
|
147
147
|
`typed-rest-client`, et avec `--http nest` multer `^2.5.0`, que `@nestjs/platform-express`
|
|
148
148
|
demande en 2.4.0. Un override que le projet pose déjà pour l'un d'eux est gardé, et signalé.
|
|
149
|
+
Les scripts d'installation dont la pile a besoin sont autorisés par leur nom : `@prisma/engines`
|
|
150
|
+
avec `--orm prisma` (il télécharge le moteur de schéma que lancent `prisma migrate` et
|
|
151
|
+
`db:client`) et `@confluentinc/kafka-javascript` avec `--broker kafka` (il télécharge le client
|
|
152
|
+
natif précompilé, ou le construit), dans `allowScripts` de `package.json` sous npm et dans
|
|
153
|
+
`allowBuilds` de `pnpm-workspace.yaml` sous pnpm. pnpm n'exécute aucun script de build d'une
|
|
154
|
+
dépendance qu'on ne lui nomme pas ; npm 11 liste chaque script d'installation absent
|
|
155
|
+
d'`allowScripts` comme pas encore relu, l'exécute encore en 11.19 avec un avertissement, et
|
|
156
|
+
annonce qu'une version ultérieure le bloquera. Par leur nom, parce que la version n'est connue
|
|
157
|
+
qu'une fois la plage résolue par l'installation, et que npm écarte une entrée écrite avec une
|
|
158
|
+
plage ; une équipe qui relit chaque version les épingle après la première installation
|
|
159
|
+
(`npm install-scripts approve <package>` change un nom en la version installée), ce que demande
|
|
160
|
+
le profil réglementé. Une entrée que le projet a pour l'un d'eux, une épingle ou un refus, est
|
|
161
|
+
gardée ; un refus est signalé. Les autres scripts d'installation qu'une installation liste
|
|
162
|
+
(esbuild, `@swc/core`, `unrs-resolver`, `protobufjs`, `@parcel/watcher`, lefthook, le
|
|
163
|
+
*preinstall* de `prisma`) ne sont pas nécessaires au kit : celui de lefthook installe les *hooks*
|
|
164
|
+
git, ce que fait `hooks:install`.
|
|
149
165
|
|
|
150
166
|
**Pipelines.** Une *pull request* ou une *merge request* exécute les *specs* unitaires, les
|
|
151
167
|
*specs* d'intégration et le lint des contextes que son changement atteint par la carte des
|
|
@@ -581,7 +597,7 @@ choix sont enregistrés sous `stack` dans la configuration, `docsUi`, `ci` et `l
|
|
|
581
597
|
| `--storage local\|s3` | enregistré comme `stack.storage` : où vit le contenu des fichiers, jamais dans la base de données. `src/platform/config/read-files.ts` et `src/platform/files/open-files.ts`, un par choix : `local`, un répertoire en développement (`FILES_DIRECTORY`, `.data/files`) et les liens signés servis par l'application sous `/files` (`FILES_PUBLIC_URL` et `FILES_SIGNING_SECRET` requises en production) ; `s3`, un bucket de n'importe quel fournisseur du protocole S3 au moyen de `@ddd-ts-kit/s3` (les variables `S3_*`, MinIO dans la stack compose) ; la mémoire du processus dans les tests et les outils, dans les deux cas. Avec `--di tsyringe` : `files/bind-files.ts`, `files/files.module.ts` et `files/staging-uploads.ts` ; en câblage manuel, `files/create-files.ts` ; avec une *stack* HTTP, `files/file-routes.ts`. Ils lient `FileStorage`, `FileKeys`, `FileScanner` et `FileStaging`, enregistrent la purge horaire des fichiers en attente et mettent en attente le fichier que porte une commande avant sa transaction ; `generate file-upload` en a besoin. `--storage none` n'écrit rien de tout cela ([Stockage de fichiers](../../docs/concepts/file-storage.fr.md)) |
|
|
582
598
|
| `src/platform/events/` | `event-provider.ts` (`bus`, `forConsumer(name)`, `start()`, `close()`), `in-process-events.ts`, et pour `--broker` `create-event-provider.ts` : `RabbitMqEventBus` (`AMQP_URL`), `KafkaEventBus` (`KAFKA_BROKERS`, avec `aggregate-key-of.ts` pour l'ordre par agrégat), `NatsEventBus` (`NATS_URL`) ou `RedisStreamsEventBus` de `@ddd-ts-kit/redis/event-bus` (`REDIS_URL` : Redis, Dragonfly ou Valkey), chacun avec un abonné par contexte consommateur (`forConsumer`), `assertTopology` au démarrage, son adresse validée et un service compose avec un contrôle de santé ; ou `custom-event-bus.ts` avec sa *spec* `eventBusContract`. `start-outbox-relay.ts` avec l'outbox. `--broker redis` avec `--cache redis` fait un seul serveur et un seul service compose, `cache` ; seul, le service s'appelle `streams` |
|
|
583
599
|
| `src/platform/database/` | `persistence.ts` (`interface Persistence` : unité de travail, magasins de l'outbox et des événements traités du *package* de l'ORM, la poignée de stockage), `open-persistence.ts`, `persistence-over.ts`, `inert-persistence.ts`, la connexion (`connect-to-database.ts`, `create-client.ts` ou `create-data-source.ts`), `schema.ts` (`MESSAGING_SCHEMA`, le schéma de ce que le kit stocke pour l'application), `open-test-database.ts` (PostgreSQL dans le processus, ou le serveur nommé par une URL ; avec Vitest chaque *spec* ouvre une copie du cluster que `test/support/test-database-template.ts`, la mise en place globale de l'exécution, initialise une fois, et y crée ses tables ; avec drizzle depuis `table-statements.ts`, le SQL des tables de `schema.ts`, puisque drizzle-kit écrit des migrations, pas des tables, ses index uniques compris), `persistence.contract.spec.ts` (les stores de l'outbox, des événements traités, des *jobs* et des processus tels que la plateforme les branche, tenus aux contrats de `@ddd-ts-kit/testing` avec ce que la pile active : le *tenant* sous `--tenancy`, l'unité de travail). La classe de stockage qu'un adaptateur de *repository* nomme dans sa liste de dépendances : `database.ts` avec drizzle et prisma (`abstract class Database extends` le type de contexte du *package* de l'ORM), `KnexContext` de `@ddd-ts-kit/knex`, `TypeOrmContext` de `@ddd-ts-kit/typeorm` |
|
|
584
|
-
| outillage des migrations | `drizzle.config.ts`, `knexfile.js` et `migrations/00000000000000_initial.js`, `prisma/schema/schema.prisma` (le client, la datasource et les tables de la plateforme ; `generate repository` ajoute le fichier de chaque contexte, `prisma/schema/<context>.prisma`) et `prisma.config.ts`, ou `data-source.ts` |
|
|
600
|
+
| outillage des migrations | `drizzle.config.ts`, `knexfile.js` et `migrations/00000000000000_initial.js`, `prisma/schema/schema.prisma` (le client, la datasource et les tables de la plateforme ; `generate repository` ajoute le fichier de chaque contexte, `prisma/schema/<context>.prisma`) et `prisma.config.ts`, ou `data-source.ts`. Un projet qui garde le seul `prisma/schema.prisma` des versions antérieures à 0.95 le garde avec son `prisma.config.ts` et son `db:client`, même sous `--force` : `init` n'écrit rien sous `prisma/schema/`, ses notes donnent les étapes du déplacement en nommant les contextes du projet, et `generate repository` refuse jusqu'au déplacement |
|
|
585
601
|
| `scripts/openapi.ts`, `scripts/events.ts` | écrivent `openapi/openapi.yaml` (un fichier par document de `openapi.documents`), `docs/integration/asyncapi.yaml` et `docs/integration/event-catalog.md`, en JSON sous `openapi.format: json` ; `--check` échoue sur une différence |
|
|
586
602
|
| `scripts/privacy-erase.ts`, `scripts/privacy-export.ts` | avec `--privacy on`, les deux demandes d'une personne concernée, traitées en ligne de commande sur les sources avec les variables de `.env` (`npm run privacy:erase -- <subject-id> [--operator <qui-demande>]`, `npm run privacy:export -- <subject-id> > export.json`) : l'effacement détruit d'abord la clé de la personne quand le projet a un event store (`--event-sourcing on` : ses événements stockés se lisent effacés ; audité avec `--audit on`), puis efface chaque copie listée dans `src/platform/privacy/data-subject-copies.ts` ; `privacy:purge` lance à la main ce que le *job* `privacy.purge-expired` lance chaque nuit à 03:00 UTC, la purge de ce qui a dépassé sa durée de conservation (`JOB_PRIVACY_PURGE_EXPIRED_ENABLED=false` coupe le *job*) ; l'export rassemble chaque enregistrement listé dans `data-subject-exports.ts` en un document JSON daté (`format`, `subject`, `exportedAt`, `records`), l'export de chaque contexte audité avec `--audit on`, jamais les valeurs (chaque exécution laisse son entrée, un essai compris : essayez-le sur une personne de test). Avec `--tenancy shared-table`, `TENANTS` nomme les tenants, séparés par des virgules : une écriture de données de tenant n'est jamais élargie. Ni l'un ni l'autre n'atteint les sauvegardes, les journaux ou une copie qu'aucun contexte n'a déclarée |
|
|
587
603
|
| `docker-compose.yml`, `.env.example`, `Dockerfile`, `.dockerignore` | la base de données avec un contrôle de santé et un volume nommé, `jaegertracing/jaeger:2.22.0` derrière le profil `observability` (son interface et son port OTLP liés à 127.0.0.1), les ports depuis `.env` ; une image multi-étapes, sans root, avec les seules dépendances de production |
|
|
@@ -621,7 +637,9 @@ client Kafka) comme seuls hôtes, les fichiers d'identifiants
|
|
|
621
637
|
chaque commande en bac à sable ; une clé que le projet avait déjà posée est gardée, et une liste
|
|
622
638
|
qu'il porte gagne les entrées dont la pile a besoin. Elle affiche aussi, en note, que le
|
|
623
639
|
propriétaire lance la première installation hors de l'agent (un chemin absent au démarrage d'une
|
|
624
|
-
session y reste en lecture seule)
|
|
640
|
+
session y reste en lecture seule) puis épingle les scripts d'installation de la pile sur les
|
|
641
|
+
versions relues (`npm install-scripts approve <package>...`, ou `'<package>@<version>': true` dans
|
|
642
|
+
`allowBuilds` sous pnpm), une montée de version de l'un d'eux demandant la même chose, et le bloc de réglages gérés qu'un fichier de projet ne peut pas poser
|
|
625
643
|
(`allowManagedHooksOnly`, `allowManagedPermissionRulesOnly`,
|
|
626
644
|
`permissions.disableBypassPermissionsMode`, `strictKnownMarketplaces` avec la *marketplace* du
|
|
627
645
|
kit, `requiredMinimumVersion`), pour que l'équipe plateforme le colle, et écrit les deux *hooks*
|
|
@@ -654,7 +672,10 @@ appellent par son chemin (`node node_modules/@typescript/native/bin/tsc`). `npx
|
|
|
654
672
|
l'ancien.
|
|
655
673
|
|
|
656
674
|
`init` et `generate context` commencent par le langage : la première entrée de `next` est le
|
|
657
|
-
glossaire du contexte à remplir.
|
|
675
|
+
glossaire du contexte à remplir. Tous deux refusent un contexte nommé `schema`, quel que soit
|
|
676
|
+
l'ORM : sous Prisma les modèles d'un contexte vivent dans `prisma/schema/<context>.prisma`, et
|
|
677
|
+
`prisma/schema/schema.prisma` est le fichier principal que tous les contextes partagent (un projet
|
|
678
|
+
passe à Prisma par `init --force`).
|
|
658
679
|
|
|
659
680
|
### Presets
|
|
660
681
|
|
|
@@ -1331,8 +1352,26 @@ porte.
|
|
|
1331
1352
|
Un cycle dans `Depends on`, une dépendance vers un identifiant qu'aucune ligne ne porte, une ligne
|
|
1332
1353
|
sans responsable et un identifiant que portent deux lignes rendent les lignes impossibles à
|
|
1333
1354
|
ordonner : ils sont signalés seuls, sans vagues, et la commande sort avec 1. Un fichier sans table
|
|
1334
|
-
de tranches, ou un contexte qu'aucune ligne ne nomme, est refusé.
|
|
1335
|
-
|
|
1355
|
+
de tranches, ou un contexte qu'aucune ligne ne nomme, est refusé.
|
|
1356
|
+
|
|
1357
|
+
Une fois les lignes ordonnables, les commandes de génération de leurs cellules `Start with` (entre
|
|
1358
|
+
accents graves, `generate ...` ou `npx ddd-ts-kit generate ...`) sont rejouées dans une copie du
|
|
1359
|
+
projet (les fichiers que git voit ; le projet reste tel quel), dans l'ordre des vagues, pour
|
|
1360
|
+
qu'une commande trouve ce que génèrent les lignes d'avant. Le générateur dit lui-même quels noms
|
|
1361
|
+
introduit chaque commande (le cas d'usage, l'agrégat et le fait d'un événement, un `--name`, les
|
|
1362
|
+
mots d'une `--permission`, ...), et chacun est jugé comme le générateur le juge, contre le
|
|
1363
|
+
glossaire de son contexte tel qu'il est, plus les `--term` de la ligne et des lignes qu'elle
|
|
1364
|
+
attend, directement ou non : un terme qu'ajoute une ligne qu'elle n'attend pas ne compte pas, car
|
|
1365
|
+
cette ligne peut ne pas être fusionnée quand celle-ci se construit. Chaque mot que le glossaire ne
|
|
1366
|
+
définit pas (`undefined-word`) et chaque mot technique qu'aucun terme ne porte (`technical-word`)
|
|
1367
|
+
est signalé une fois par ligne, avec le `--term` à ajouter, sans vagues, et la commande sort avec
|
|
1368
|
+
1 : un worker qui suivrait cette ligne telle qu'écrite serait refusé. Les commandes que le
|
|
1369
|
+
générateur a refusées pour une autre raison (un `--module` manquant, un agrégat qu'aucune ligne ne
|
|
1370
|
+
génère, un amont non déclaré, un handler écrit à la main dont un spec de bout en bout a besoin)
|
|
1371
|
+
sont listées après les vagues sous `Refused for another reason than a word when the plan was
|
|
1372
|
+
replayed`, sans échec : les noms qu'elles introduiraient après ce refus ne sont pas jugés. Le rejeu
|
|
1373
|
+
coûte environ un dixième de seconde par commande. `--json` affiche
|
|
1374
|
+
`{ file, context, problems: [{ kind, rows, message }], waves: [{ wave, batches: [{ id, owner, context, rows: [{ id, kind, slice, status, story, waitingFor, waitingForRows: [{ id, context, story, status }] }], aggregates, brief, sameFiles, unknownOverlap }] }], mergeOrder, otherStories: [{ id, context, story, kind, slice, owner, status, batch, waitedForBy }], notReplayed: [{ row, command, refusal }] }`,
|
|
1336
1375
|
`story` valant `null` pour une ligne dont l'identifiant n'en nomme aucune, et `batch` `null` pour
|
|
1337
1376
|
une ligne que le contexte demandé ne montre pas.
|
|
1338
1377
|
|
|
@@ -1654,15 +1693,27 @@ manque au projet tant que le parent épingle encore le paquet sous le correctif
|
|
|
1654
1693
|
version corrigée est `no longer needed`, à retirer, car il retiendrait le paquet quand une majeure
|
|
1655
1694
|
suivante sera demandée. Une chaîne qui n'est pas installée n'est pas jugée.
|
|
1656
1695
|
|
|
1696
|
+
Et chaque script d'installation dont la pile a besoin, les moteurs de Prisma (`@prisma/engines`) et
|
|
1697
|
+
le client Kafka (`@confluentinc/kafka-javascript`), jugé sur la version installée face à
|
|
1698
|
+
`allowScripts` de `package.json` sous npm ou à `allowBuilds` de `pnpm-workspace.yaml` sous pnpm,
|
|
1699
|
+
lus comme npm les lit (le nom seul, `name@*`, ou des versions exactes jointes par `||` ; un refus
|
|
1700
|
+
l'emporte) : aucune entrée donne `missing`, et `init` ajoute le nom ; des entrées épinglées sur
|
|
1701
|
+
d'autres versions seulement, l'épingle qu'une montée de version a laissée, donnent `other
|
|
1702
|
+
version`, avec `npm install-scripts approve <package>` puis `npm rebuild <package>` (sous pnpm, la
|
|
1703
|
+
version écrite dans `allowBuilds`, puis `pnpm rebuild <package>`) une fois le nouveau script lu ; un
|
|
1704
|
+
refus donne `written otherwise`. Un paquet qui n'est pas installé n'est pas jugé.
|
|
1705
|
+
|
|
1657
1706
|
`--strict` sort avec 1 tant que quelque chose manque ou est à une autre plage, ou tant que le
|
|
1658
1707
|
*checkout* ne peut pas faire tourner le projet : un Node hors d'`engines.node`, pas de
|
|
1659
1708
|
`node_modules`, un paquet du kit non installé ou à une autre version, un sous-module non
|
|
1660
1709
|
initialisé, un *override* qui manque. Un script écrit autrement, un *hook* que ce clone n'a pas
|
|
1661
1710
|
installé, un Node que `.nvmrc` ne nomme pas quand `engines.node` l'accepte, un *lockfile* modifié
|
|
1662
|
-
depuis l'installation (un *checkout* peut le réécrire avec ce que `node_modules` contient déjà),
|
|
1663
|
-
|
|
1711
|
+
depuis l'installation (un *checkout* peut le réécrire avec ce que `node_modules` contient déjà), un
|
|
1712
|
+
*override* qui n'est plus nécessaire et un script d'installation refusé (l'équipe peut construire le
|
|
1713
|
+
paquet autrement) sont signalés sans le faire échouer ; un script d'installation qui manque ou
|
|
1714
|
+
épinglé sur une autre version le fait échouer. `--json` affiche `{ version, findings: [{ area, name, problem,
|
|
1664
1715
|
expected, found }] }`, `area` valant `script`, `package`, `permission`, `hook`, `guidance`,
|
|
1665
|
-
`node`, `install`, `submodule` ou `
|
|
1716
|
+
`node`, `install`, `submodule`, `override` ou `install-script`.
|
|
1666
1717
|
|
|
1667
1718
|
## worker-scope
|
|
1668
1719
|
|
package/README.md
CHANGED
|
@@ -137,6 +137,20 @@ The project forces the versions that close a vulnerability its stack still pins
|
|
|
137
137
|
nothing of `package.json`: qs `^6.16.0`, which Stryker asks for at 6.15.1 through
|
|
138
138
|
`typed-rest-client`, and under `--http nest` multer `^2.5.0`, which `@nestjs/platform-express`
|
|
139
139
|
asks for at 2.4.0. An override the project already sets for one of them is kept, and said.
|
|
140
|
+
The install scripts the stack needs are allowed by name: `@prisma/engines` under `--orm prisma`
|
|
141
|
+
(it downloads the schema engine that `prisma migrate` and `db:client` run) and
|
|
142
|
+
`@confluentinc/kafka-javascript` under `--broker kafka` (it downloads the prebuilt native client,
|
|
143
|
+
or builds it), in `allowScripts` of `package.json` under npm and in `allowBuilds` of
|
|
144
|
+
`pnpm-workspace.yaml` under pnpm. pnpm runs no build script of a dependency it is not told to;
|
|
145
|
+
npm 11 lists every install script not in `allowScripts` as not yet reviewed, still runs it in
|
|
146
|
+
11.19 with a warning, and says a later release blocks it. By name, because the version is known
|
|
147
|
+
once the install resolved the range, and npm drops an entry written with a range; a team that
|
|
148
|
+
reviews each version pins them after the first install (`npm install-scripts approve <package>`
|
|
149
|
+
turns a name into the installed version), which the regulated profile asks. An entry the project
|
|
150
|
+
has for one of them, a pin or a denial, is kept; a denial is said. The other install scripts an
|
|
151
|
+
install lists (esbuild, `@swc/core`, `unrs-resolver`, `protobufjs`, `@parcel/watcher`, lefthook,
|
|
152
|
+
the preinstall of `prisma`) are not needed by the kit: lefthook's installs the git hooks, which
|
|
153
|
+
`hooks:install` does.
|
|
140
154
|
|
|
141
155
|
**Pipelines.** A pull or merge request runs the unit specs, the integration specs and the lint of
|
|
142
156
|
the contexts its change reaches through the context map ([`ddd-ts-kit affected`](#affected)); types,
|
|
@@ -561,7 +575,7 @@ config, `docsUi`, `ci` and `logger` included.
|
|
|
561
575
|
| `--storage local\|s3` | recorded as `stack.storage`: where the content of files lives, never in the database. `src/platform/config/read-files.ts` and `src/platform/files/open-files.ts`, one per choice: `local`, a directory in development (`FILES_DIRECTORY`, `.data/files`) and the signed links answered by the application under `/files` (`FILES_PUBLIC_URL` and `FILES_SIGNING_SECRET` required in production); `s3`, a bucket of any provider of the S3 protocol through `@ddd-ts-kit/s3` (the `S3_*` variables, MinIO in the compose stack); the memory of the process in the tests and the tools, either way. With `--di tsyringe`: `files/bind-files.ts`, `files/files.module.ts` and `files/staging-uploads.ts`; with hand wiring `files/create-files.ts`; with an HTTP stack `files/file-routes.ts`. They bind `FileStorage`, `FileKeys`, `FileScanner` and `FileStaging`, register the hourly purge of staged files and stage the file a command carries before its transaction; `generate file-upload` needs them. `--storage none` writes none of this ([File storage](../../docs/concepts/file-storage.md)) |
|
|
562
576
|
| `src/platform/events/` | `event-provider.ts` (`bus`, `forConsumer(name)`, `start()`, `close()`), `in-process-events.ts`, and for `--broker` `create-event-provider.ts`: `RabbitMqEventBus` (`AMQP_URL`), `KafkaEventBus` (`KAFKA_BROKERS`, with `aggregate-key-of.ts` for per-aggregate order), `NatsEventBus` (`NATS_URL`) or `RedisStreamsEventBus` of `@ddd-ts-kit/redis/event-bus` (`REDIS_URL`: Redis, Dragonfly or Valkey), each with one subscriber per consuming context (`forConsumer`), `assertTopology` at start, its address validated and a compose service with a healthcheck; or `custom-event-bus.ts` with its `eventBusContract` spec. `start-outbox-relay.ts` with the outbox. `--broker redis` with `--cache redis` is one server and one compose service, `cache`; alone, the service is `streams` |
|
|
563
577
|
| `src/platform/database/` | `persistence.ts` (`interface Persistence`: unit of work, outbox and processed-event stores of the ORM package, the storage handle), `open-persistence.ts`, `persistence-over.ts`, `inert-persistence.ts`, the connection (`connect-to-database.ts`, `create-client.ts` or `create-data-source.ts`), `schema.ts` (`MESSAGING_SCHEMA`, the schema of what the kit stores for the application), `open-test-database.ts` (PostgreSQL in process, or the server named by a URL; with Vitest each spec opens a copy of the cluster `test/support/test-database-template.ts`, the global setup of the run, initialised once, and creates its tables there; with drizzle from `table-statements.ts`, the SQL of the tables of `schema.ts`, since drizzle-kit writes migrations, not tables, its unique indexes included), `persistence.contract.spec.ts` (the outbox, processed-event, job and process stores as the platform wires them, held to the contracts of `@ddd-ts-kit/testing` with what the stack turns on: the tenant under `--tenancy`, the unit of work). The storage class a repository adapter names in its dependency list: `database.ts` with drizzle and prisma (`abstract class Database extends` the context type of the ORM package), `KnexContext` of `@ddd-ts-kit/knex`, `TypeOrmContext` of `@ddd-ts-kit/typeorm` |
|
|
564
|
-
| migration tooling | `drizzle.config.ts`, `knexfile.js` and `migrations/00000000000000_initial.js`, `prisma/schema/schema.prisma` (the client, the datasource and the tables of the platform; `generate repository` adds the file of each context, `prisma/schema/<context>.prisma`) and `prisma.config.ts`, or `data-source.ts` |
|
|
578
|
+
| migration tooling | `drizzle.config.ts`, `knexfile.js` and `migrations/00000000000000_initial.js`, `prisma/schema/schema.prisma` (the client, the datasource and the tables of the platform; `generate repository` adds the file of each context, `prisma/schema/<context>.prisma`) and `prisma.config.ts`, or `data-source.ts`. A project that keeps the one `prisma/schema.prisma` of versions before 0.95 keeps it with its `prisma.config.ts` and its `db:client`, even under `--force`: `init` writes nothing under `prisma/schema/`, its notes give the steps of the move with the contexts of the project named, and `generate repository` refuses until the move |
|
|
565
579
|
| `scripts/openapi.ts`, `scripts/events.ts` | write `openapi/openapi.yaml` (one file per document of `openapi.documents`), `docs/integration/asyncapi.yaml` and `docs/integration/event-catalog.md`, in JSON under `openapi.format: json`; `--check` fails on a difference |
|
|
566
580
|
| `scripts/privacy-erase.ts`, `scripts/privacy-export.ts` | with `--privacy on`, the two requests of a data subject, answered from the command line on the sources with the variables of `.env` (`npm run privacy:erase -- <subject-id> [--operator <who-asks>]`, `npm run privacy:export -- <subject-id> > export.json`): the erasure destroys the key of the subject first when the project has an event store (`--event-sourcing on`: its stored events read as erased; audited with `--audit on`), then erases every copy listed in `src/platform/privacy/data-subject-copies.ts`; `privacy:purge` runs by hand what the job `privacy.purge-expired` runs every night at 03:00 UTC, the purge of what outlived its retention (`JOB_PRIVACY_PURGE_EXPIRED_ENABLED=false` switches the job off); the export gathers every record listed in `data-subject-exports.ts` into one dated JSON document (`format`, `subject`, `exportedAt`, `records`), the export of each context audited with `--audit on`, never the values (every run leaves its entry, a trial included: try it on a test subject). With `--tenancy shared-table`, `TENANTS` names the tenants, comma separated: a write of tenant data is never widened. Neither reaches backups, logs or a copy no context declared |
|
|
567
581
|
| `docker-compose.yml`, `.env.example`, `Dockerfile`, `.dockerignore` | the database with a healthcheck and a named volume, `jaegertracing/jaeger:2.22.0` behind the `observability` profile (its UI and its OTLP port bound to 127.0.0.1), ports from `.env`; a multi-stage, non-root image with production dependencies only |
|
|
@@ -599,7 +613,9 @@ Prisma, `github.com` and `release-assets.githubusercontent.com` with the Kafka c
|
|
|
599
613
|
hosts, the credential files (`~/.ssh`, `~/.aws`, `~/.config/gcloud`, `~/.azure`) and the usual secret variables denied to every sandboxed command; a key the project
|
|
600
614
|
already set is kept, and a list it holds gains the entries the stack needs. It also prints, as a
|
|
601
615
|
note, that the owner runs the first install outside the agent (a path missing when a session
|
|
602
|
-
starts stays read-only to it)
|
|
616
|
+
starts stays read-only to it) and then pins the install scripts of the stack to the versions read
|
|
617
|
+
(`npm install-scripts approve <package>...`, or `'<package>@<version>': true` in `allowBuilds`
|
|
618
|
+
under pnpm), a bump of one of them asking the same again, and the block of managed settings a project file
|
|
603
619
|
cannot set (`allowManagedHooksOnly`, `allowManagedPermissionRulesOnly`,
|
|
604
620
|
`permissions.disableBypassPermissionsMode`, `strictKnownMarketplaces` with the marketplace of
|
|
605
621
|
the kit, `requiredMinimumVersion`), for the platform team to paste, and writes the two hooks of
|
|
@@ -630,7 +646,9 @@ and `@typescript/native` (`npm:typescript@~7.0.2`), which `build` and `typecheck
|
|
|
630
646
|
(`node node_modules/@typescript/native/bin/tsc`). `npx tsc` would run the older one.
|
|
631
647
|
|
|
632
648
|
`init` and `generate context` start with the language: the first entry of `next` is the glossary
|
|
633
|
-
of the context to fill in.
|
|
649
|
+
of the context to fill in. Both refuse a context named `schema`, on every ORM: on Prisma the models
|
|
650
|
+
of a context live in `prisma/schema/<context>.prisma`, and `prisma/schema/schema.prisma` is the
|
|
651
|
+
main file every context shares (`init --force` moves a project to Prisma).
|
|
634
652
|
|
|
635
653
|
### Presets
|
|
636
654
|
|
|
@@ -1262,9 +1280,25 @@ anyone carries it.
|
|
|
1262
1280
|
|
|
1263
1281
|
A cycle in `Depends on`, a dependency on an id no row carries, a row without owner and an id two
|
|
1264
1282
|
rows carry make the rows impossible to order: they are reported alone, without waves, and the
|
|
1265
|
-
command exits 1. A file without a slices table, or a context no row names, is refused.
|
|
1266
|
-
|
|
1267
|
-
|
|
1283
|
+
command exits 1. A file without a slices table, or a context no row names, is refused.
|
|
1284
|
+
|
|
1285
|
+
Once the rows can be ordered, the generator commands of their `Start with` cells (between
|
|
1286
|
+
backquotes, `generate ...` or `npx ddd-ts-kit generate ...`) are replayed in a copy of the
|
|
1287
|
+
project (the files git sees; the project is left as it was), in the order of the waves, so that a
|
|
1288
|
+
command finds what the rows before it generate. The generator itself says which names each
|
|
1289
|
+
command introduces (the use case, the aggregate and the fact of an event, a `--name`, the words of
|
|
1290
|
+
a `--permission`, ...), and each is judged as the generator judges it, against the glossary of its
|
|
1291
|
+
context as it stands plus the `--term` of the row and of the rows it waits for, directly or not: a
|
|
1292
|
+
term a row it does not wait for adds is not counted, since that row may not be merged when this
|
|
1293
|
+
one is built. Each word it does not define (`undefined-word`) and each technical word no term
|
|
1294
|
+
holds (`technical-word`) is reported once per row, with the `--term` to add, without waves, and
|
|
1295
|
+
the command exits 1: a worker following that row as written would be refused. The commands the
|
|
1296
|
+
generator refused for another reason (a missing `--module`, an aggregate no row generates, an
|
|
1297
|
+
upstream not declared, a handler written by hand that an end-to-end spec needs) are listed after
|
|
1298
|
+
the waves under `Refused for another reason than a word when the plan was replayed`, without
|
|
1299
|
+
failing: the names they would introduce after that refusal are not judged. The replay costs about
|
|
1300
|
+
a tenth of a second per command. `--json` prints
|
|
1301
|
+
`{ file, context, problems: [{ kind, rows, message }], waves: [{ wave, batches: [{ id, owner, context, rows: [{ id, kind, slice, status, story, waitingFor, waitingForRows: [{ id, context, story, status }] }], aggregates, brief, sameFiles, unknownOverlap }] }], mergeOrder, otherStories: [{ id, context, story, kind, slice, owner, status, batch, waitedForBy }], notReplayed: [{ row, command, refusal }] }`,
|
|
1268
1302
|
`story` being `null` for a row whose id names none and `batch` `null` for a row the context asked
|
|
1269
1303
|
for does not show.
|
|
1270
1304
|
|
|
@@ -1563,14 +1597,26 @@ project keeps once the parent asks for the fixed version itself is `no longer ne
|
|
|
1563
1597
|
as it would hold the package back when a later major is asked for. A chain that is not installed
|
|
1564
1598
|
is not judged.
|
|
1565
1599
|
|
|
1600
|
+
And each install script the stack needs, the engines of Prisma (`@prisma/engines`) and the Kafka
|
|
1601
|
+
client (`@confluentinc/kafka-javascript`), judged on the version installed against `allowScripts`
|
|
1602
|
+
of `package.json` under npm or `allowBuilds` of `pnpm-workspace.yaml` under pnpm, read as npm
|
|
1603
|
+
reads them (the name alone, `name@*`, or exact versions joined by `||`; a denial wins): no entry is
|
|
1604
|
+
`missing`, and `init` adds the name; an entry pinned to other versions only, the pin a bump left
|
|
1605
|
+
behind, is `other version`, with `npm install-scripts approve <package>` then `npm rebuild
|
|
1606
|
+
<package>` (under pnpm, the version written in `allowBuilds`, then `pnpm rebuild <package>`) once
|
|
1607
|
+
the new script was read; a denial is `written otherwise`. A package that is not installed is not
|
|
1608
|
+
judged.
|
|
1609
|
+
|
|
1566
1610
|
`--strict` exits 1 while something is missing or at another range, or while the checkout cannot
|
|
1567
1611
|
run the project: a Node outside `engines.node`, no `node_modules`, a package of the kit not
|
|
1568
1612
|
installed or at another version, a submodule not initialised, an override missing. A script
|
|
1569
1613
|
written otherwise, a hook this clone has not installed, a Node `.nvmrc` does not name while
|
|
1570
1614
|
`engines.node` accepts it, a lockfile changed since the install (a checkout may rewrite it with
|
|
1571
|
-
what `node_modules` already holds),
|
|
1615
|
+
what `node_modules` already holds), an override no longer needed and a denied install script (the
|
|
1616
|
+
team may build the package another way) are said without failing it; an install script missing or
|
|
1617
|
+
pinned to another version fails it. `--json` prints `{ version, findings: [{ area, name, problem,
|
|
1572
1618
|
expected, found }] }`, `area` being `script`, `package`, `permission`, `hook`, `guidance`, `node`,
|
|
1573
|
-
`install`, `submodule` or `
|
|
1619
|
+
`install`, `submodule`, `override` or `install-script`.
|
|
1574
1620
|
|
|
1575
1621
|
## worker-scope
|
|
1576
1622
|
|
package/dist/cli-error.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/** A mistake of the caller: reported with what to do instead, exit code 2. */
|
|
1
|
+
/** A mistake of the caller: reported with what to do instead, exit code 2 unless the command says another. */
|
|
2
2
|
export declare class CliError extends Error {
|
|
3
3
|
readonly fix: string;
|
|
4
|
-
readonly exitCode
|
|
5
|
-
constructor(message: string, fix: string);
|
|
4
|
+
readonly exitCode: number;
|
|
5
|
+
constructor(message: string, fix: string, exitCode?: number);
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=cli-error.d.ts.map
|
package/dist/cli-error.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-error.d.ts","sourceRoot":"","sources":["../src/cli-error.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"cli-error.d.ts","sourceRoot":"","sources":["../src/cli-error.ts"],"names":[],"mappings":"AAAA,8GAA8G;AAC9G,qBAAa,QAAS,SAAQ,KAAK;IAG/B,QAAQ,CAAC,GAAG,EAAE,MAAM;IACpB,QAAQ,CAAC,QAAQ,EAAE,MAAM;IAH3B,YACE,OAAO,EAAE,MAAM,EACN,GAAG,EAAE,MAAM,EACX,QAAQ,GAAE,MAAU,EAI9B;CACF"}
|
package/dist/cli-error.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
/** A mistake of the caller: reported with what to do instead, exit code 2. */
|
|
1
|
+
/** A mistake of the caller: reported with what to do instead, exit code 2 unless the command says another. */
|
|
2
2
|
export class CliError extends Error {
|
|
3
3
|
fix;
|
|
4
|
-
exitCode
|
|
5
|
-
constructor(message, fix) {
|
|
4
|
+
exitCode;
|
|
5
|
+
constructor(message, fix, exitCode = 2) {
|
|
6
6
|
super(message);
|
|
7
7
|
this.fix = fix;
|
|
8
|
+
this.exitCode = exitCode;
|
|
8
9
|
this.name = 'CliError';
|
|
9
10
|
}
|
|
10
11
|
}
|
package/dist/cli-error.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-error.js","sourceRoot":"","sources":["../src/cli-error.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"cli-error.js","sourceRoot":"","sources":["../src/cli-error.ts"],"names":[],"mappings":"AAAA,8GAA8G;AAC9G,MAAM,OAAO,QAAS,SAAQ,KAAK;IAGtB,GAAG;IACH,QAAQ;IAHnB,YACE,OAAe,EACN,GAAW,EACX,QAAQ,GAAW,CAAC;QAE7B,KAAK,CAAC,OAAO,CAAC,CAAC;mBAHN,GAAG;wBACH,QAAQ;QAGjB,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;IACzB,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAyBzC;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,OAa3B,CAAC"}
|
package/dist/commands/doctor.js
CHANGED
|
@@ -22,6 +22,8 @@ const STRICT_PROBLEMS = {
|
|
|
22
22
|
install: new Set(['missing', 'not installed', 'other version']),
|
|
23
23
|
submodule: new Set(['not initialised']),
|
|
24
24
|
override: new Set(['missing']),
|
|
25
|
+
// A denial may be the team's on purpose; a script left unreviewed by the last bump is not.
|
|
26
|
+
'install-script': new Set(['missing', 'other version']),
|
|
25
27
|
};
|
|
26
28
|
/**
|
|
27
29
|
* What an upgrade left to do in the project: the scripts, packages, permissions and git hooks this
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC;;;;;;;GAOG;AACH,MAAM,eAAe,GAAmF;IACtG,MAAM,EAAE,IAAI,GAAG,CAAC,CA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AO,EAAE,EAAE,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACvH,CAAC,CAAC"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import type { LanguageProbe } from '../generate/language-probe.js';
|
|
2
|
+
import type { Io } from './io.js';
|
|
1
3
|
import type { Command } from './command.js';
|
|
2
4
|
export declare const generateCommand: Command;
|
|
5
|
+
/** `generate`, and with a probe of the language, the same command hearing its names instead of judging them. */
|
|
6
|
+
export declare function generate(argv: readonly string[], io: Io, language?: LanguageProbe): number;
|
|
3
7
|
//# sourceMappingURL=generate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/commands/generate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/commands/generate.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAUhE,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,eAAO,MAAM,eAAe,EAAE,OAA0C,CAAC;AAEzE,gHAAgH;AAChH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,QAAQ,CAAC,EAAE,aAAa,GAAG,MAAM,CAoC1F"}
|
|
@@ -12,7 +12,9 @@ import { Workspace } from '../workspace/index.js';
|
|
|
12
12
|
import { Arguments } from './arguments.js';
|
|
13
13
|
import { printReport } from './print-report.js';
|
|
14
14
|
import { keepFlatPlatform } from '../platform-folders/index.js';
|
|
15
|
-
export const generateCommand = (argv, io) =>
|
|
15
|
+
export const generateCommand = (argv, io) => generate(argv, io);
|
|
16
|
+
/** `generate`, and with a probe of the language, the same command hearing its names instead of judging them. */
|
|
17
|
+
export function generate(argv, io, language) {
|
|
16
18
|
const asked = findKind(argv.find((argument) => !argument.startsWith('-')) ?? '');
|
|
17
19
|
const args = Arguments.parse(argv, optionsOf(asked));
|
|
18
20
|
const [kindName, ...rest] = args.positionals;
|
|
@@ -21,7 +23,7 @@ export const generateCommand = (argv, io) => {
|
|
|
21
23
|
const ws = new Workspace(root, args.flag('force'));
|
|
22
24
|
const { config } = readConfig(root);
|
|
23
25
|
keepFlatPlatform(ws, config);
|
|
24
|
-
const flags = flagsOf(args);
|
|
26
|
+
const flags = { ...flagsOf(args), ...(language === undefined ? {} : { language }) };
|
|
25
27
|
refuseModuleOf(kind, flags);
|
|
26
28
|
const context = kind.positionals[0] === 'context' ? toName(rest[0] ?? '').kebab : undefined;
|
|
27
29
|
const stopPlacing = placeGeneratedFiles(ws, config, {
|
|
@@ -41,7 +43,7 @@ export const generateCommand = (argv, io) => {
|
|
|
41
43
|
stopIgnoringValidation(ws, config);
|
|
42
44
|
}
|
|
43
45
|
return printReport(io, args, ws.commit(args.flag('dry-run')));
|
|
44
|
-
}
|
|
46
|
+
}
|
|
45
47
|
const TEXT = { type: 'string' };
|
|
46
48
|
const SWITCH = { type: 'boolean', default: false };
|
|
47
49
|
const TEXTS = { type: 'string', multiple: true };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/commands/generate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/commands/generate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;A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AC;QACzB,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC;QACnC,GAAG,UAAU,CAAC,IAAI,CAAC;KACpB,CAAC;AACJ,CAAC;AAeD,SAAS,UAAU,CAAC,IAAe;IACjC,OAAO;QACL,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC;QAC7B,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;QACzB,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC;QAClC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC;QAC3B,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC;QACxC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC;QAC3B,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC;QACnC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC;QAC3B,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC;QAC3B,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC;QACnC,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC;KACzC,CAAC;AACJ,CAAC"}
|
|
@@ -3,7 +3,8 @@ import type { Command } from './command.js';
|
|
|
3
3
|
* Orders the rows of the slices file not done, of the project or of one context, in waves cut
|
|
4
4
|
* into batches of one or two rows, with the command that briefs each batch and the order of the
|
|
5
5
|
* merges. Exits 1, without waves, while a cycle, an unknown dependency or a row without owner
|
|
6
|
-
* keeps the rows from being ordered
|
|
6
|
+
* keeps the rows from being ordered, or while a planned command, replayed in a copy of the
|
|
7
|
+
* project, introduces a name the glossary of its context does not hold.
|
|
7
8
|
*/
|
|
8
9
|
export declare const planWavesCommand: Command;
|
|
9
10
|
//# sourceMappingURL=plan-waves.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan-waves.d.ts","sourceRoot":"","sources":["../../src/commands/plan-waves.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plan-waves.d.ts","sourceRoot":"","sources":["../../src/commands/plan-waves.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,EAAE,OAkB9B,CAAC"}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { CliError } from '../cli-error.js';
|
|
2
2
|
import { formatPlan } from '../plan/format-plan.js';
|
|
3
|
+
import { plannedWords } from '../plan/planned-words.js';
|
|
3
4
|
import { planWaves } from '../plan/plan-waves.js';
|
|
4
5
|
import { readSlices, SLICES_FILE } from '../progress/read-slices.js';
|
|
5
6
|
import { Workspace } from '../workspace/index.js';
|
|
6
7
|
import { Arguments } from './arguments.js';
|
|
8
|
+
import { generate } from './generate.js';
|
|
7
9
|
/**
|
|
8
10
|
* Orders the rows of the slices file not done, of the project or of one context, in waves cut
|
|
9
11
|
* into batches of one or two rows, with the command that briefs each batch and the order of the
|
|
10
12
|
* merges. Exits 1, without waves, while a cycle, an unknown dependency or a row without owner
|
|
11
|
-
* keeps the rows from being ordered
|
|
13
|
+
* keeps the rows from being ordered, or while a planned command, replayed in a copy of the
|
|
14
|
+
* project, introduces a name the glossary of its context does not hold.
|
|
12
15
|
*/
|
|
13
16
|
export const planWavesCommand = (argv, io) => {
|
|
14
17
|
const args = Arguments.parse(argv, {});
|
|
@@ -17,10 +20,33 @@ export const planWavesCommand = (argv, io) => {
|
|
|
17
20
|
if (rows === undefined) {
|
|
18
21
|
throw new CliError(`${SLICES_FILE} has no slices table.`, 'Plan the slices first (the skill ddd-ts-kit:plan-slices writes the table), then run plan-waves again.');
|
|
19
22
|
}
|
|
20
|
-
const
|
|
23
|
+
const context = contextOf(rows, args.positionals[0]);
|
|
24
|
+
const plan = withWords(root, rows, planWaves(rows, { context }));
|
|
21
25
|
io.out(args.json ? JSON.stringify(plan, null, 2) : formatPlan(plan));
|
|
22
26
|
return plan.problems.length === 0 ? 0 : 1;
|
|
23
27
|
};
|
|
28
|
+
/** The plan, once the rows can be ordered, with what the replay of its commands found: no waves while a name is refused. */
|
|
29
|
+
function withWords(root, rows, plan) {
|
|
30
|
+
if (plan.problems.length > 0) {
|
|
31
|
+
return plan;
|
|
32
|
+
}
|
|
33
|
+
const words = plannedWords(root, rows, {
|
|
34
|
+
context: plan.context,
|
|
35
|
+
generate: (argv, language) => void generate(argv, SILENT, language),
|
|
36
|
+
});
|
|
37
|
+
return words.problems.length === 0
|
|
38
|
+
? { ...plan, notReplayed: words.notReplayed }
|
|
39
|
+
: {
|
|
40
|
+
...plan,
|
|
41
|
+
problems: words.problems,
|
|
42
|
+
waves: [],
|
|
43
|
+
mergeOrder: [],
|
|
44
|
+
otherStories: [],
|
|
45
|
+
notReplayed: words.notReplayed,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/** The replayed commands print nothing: their report would describe a copy of the project. */
|
|
49
|
+
const SILENT = { out: () => undefined, err: () => undefined };
|
|
24
50
|
/** The context asked for, which a row of the file must name; null when none is. */
|
|
25
51
|
function contextOf(rows, asked) {
|
|
26
52
|
if (asked === undefined) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan-waves.js","sourceRoot":"","sources":["../../src/commands/plan-waves.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"plan-waves.js","sourceRoot":"","sources":["../../src/commands/plan-waves.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EA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C,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,QAAQ,CAAC,aAAa,WAAW,uBAAuB,KAAK,IAAI,EAAE,eAAe,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACtH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -7,7 +7,8 @@ import type { DoctorFinding } from './doctor-finding.js';
|
|
|
7
7
|
* Settings the project does not have are not judged: an agent may run elsewhere than Claude Code.
|
|
8
8
|
* Then what this checkout lacks to run it: the Node it asks, its dependencies installed, the
|
|
9
9
|
* packages of the kit at the version of this CLI, its submodules. Last, read on what is installed,
|
|
10
|
-
* the overrides of a version the stack pins below a security fix: one missing, one no longer needed
|
|
10
|
+
* the overrides of a version the stack pins below a security fix: one missing, one no longer needed;
|
|
11
|
+
* and each install script the stack needs that the allow list of the package manager does not allow.
|
|
11
12
|
*/
|
|
12
13
|
export declare function diagnose(root: string, config: Config): DoctorFinding[];
|
|
13
14
|
//# sourceMappingURL=diagnose.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnose.d.ts","sourceRoot":"","sources":["../../src/doctor/diagnose.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"diagnose.d.ts","sourceRoot":"","sources":["../../src/doctor/diagnose.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AActD;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,EAAE,CAwBtE"}
|
package/dist/doctor/diagnose.js
CHANGED
|
@@ -5,6 +5,7 @@ import { folderFindings } from './folder-findings.js';
|
|
|
5
5
|
import { guidanceFindings } from './guidance-findings.js';
|
|
6
6
|
import { hookFindings } from './hook-findings.js';
|
|
7
7
|
import { installFindings } from './install-findings.js';
|
|
8
|
+
import { installScriptFindings } from './install-script-findings.js';
|
|
8
9
|
import { nodeFindings } from './node-findings.js';
|
|
9
10
|
import { overrideFindings } from './override-findings.js';
|
|
10
11
|
import { packageFindings } from './package-findings.js';
|
|
@@ -19,7 +20,8 @@ import { platformFileIn } from '../platform-layout/index.js';
|
|
|
19
20
|
* Settings the project does not have are not judged: an agent may run elsewhere than Claude Code.
|
|
20
21
|
* Then what this checkout lacks to run it: the Node it asks, its dependencies installed, the
|
|
21
22
|
* packages of the kit at the version of this CLI, its submodules. Last, read on what is installed,
|
|
22
|
-
* the overrides of a version the stack pins below a security fix: one missing, one no longer needed
|
|
23
|
+
* the overrides of a version the stack pins below a security fix: one missing, one no longer needed;
|
|
24
|
+
* and each install script the stack needs that the allow list of the package manager does not allow.
|
|
23
25
|
*/
|
|
24
26
|
export function diagnose(root, config) {
|
|
25
27
|
const manifest = readJson(path.join(root, 'package.json'));
|
|
@@ -39,6 +41,7 @@ export function diagnose(root, config) {
|
|
|
39
41
|
...nodeFindings(process.versions.node, nodeEngine(manifest), readText(path.join(root, '.nvmrc'))),
|
|
40
42
|
...installFindings(root, config.stack.packageManager, declared),
|
|
41
43
|
...overrideFindings(root, config, manifest),
|
|
44
|
+
...installScriptFindings(root, config, manifest),
|
|
42
45
|
...submoduleFindings(root),
|
|
43
46
|
];
|
|
44
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnose.js","sourceRoot":"","sources":["../../src/doctor/diagnose.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;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