ddd-ts-kit 0.89.0 → 0.90.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 +33 -0
- package/README.fr.md +20 -6
- package/README.md +19 -5
- package/dist/check/catalogue/default-severities.d.ts.map +1 -1
- package/dist/check/catalogue/default-severities.js +0 -4
- package/dist/check/catalogue/default-severities.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +4 -2
- package/dist/commands/doctor.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 +3 -2
- package/dist/doctor/doctor-finding.d.ts.map +1 -1
- package/dist/doctor/format-diagnosis.js +4 -1
- package/dist/doctor/format-diagnosis.js.map +1 -1
- package/dist/doctor/override-findings.d.ts +10 -0
- package/dist/doctor/override-findings.d.ts.map +1 -0
- package/dist/doctor/override-findings.js +87 -0
- package/dist/doctor/override-findings.js.map +1 -0
- package/dist/help/notes.d.ts +1 -1
- package/dist/help/notes.d.ts.map +1 -1
- package/dist/help/notes.js +3 -1
- package/dist/help/notes.js.map +1 -1
- package/dist/init/manifest/overrides-for.d.ts +7 -0
- package/dist/init/manifest/overrides-for.d.ts.map +1 -0
- package/dist/init/manifest/overrides-for.js +9 -0
- package/dist/init/manifest/overrides-for.js.map +1 -0
- package/dist/init/manifest/pinned-below-a-fix.d.ts +14 -0
- package/dist/init/manifest/pinned-below-a-fix.d.ts.map +1 -0
- package/dist/init/manifest/pinned-below-a-fix.js +20 -0
- package/dist/init/manifest/pinned-below-a-fix.js.map +1 -0
- package/dist/init/manifest/versions.js +25 -25
- package/dist/init/manifest/write-overrides.d.ts +9 -0
- package/dist/init/manifest/write-overrides.d.ts.map +1 -0
- package/dist/init/manifest/write-overrides.js +56 -0
- package/dist/init/manifest/write-overrides.js.map +1 -0
- package/dist/init/run-init.d.ts.map +1 -1
- package/dist/init/run-init.js +5 -2
- package/dist/init/run-init.js.map +1 -1
- package/dist/init/stack/resolve-queue.js +2 -2
- package/dist/init/stack/resolve-queue.js.map +1 -1
- package/dist/stack/stack-vars.js +1 -1
- package/dist/stack/stack-vars.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/templates/init/platform/database/persistence-over.prisma.ts.tpl +24 -1
- package/templates/init/platform/database/schema.prisma.tpl +51 -0
- package/templates/init/platform/jobs/create-background-work.ts.tpl +1 -1
- package/templates/pipeline/package-scripts.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,39 @@ 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.90.0
|
|
8
|
+
|
|
9
|
+
**A generated project forces qs `^6.16.0`, and multer `^2.5.0` on Nest, where its stack still pins the vulnerable versions; one on Fastify asks for `fastify` `^5.12.7`.** Stryker 10.1 asks for `typed-rest-client` 2.3, which asks for qs 6.15.1 exactly (three denials of service, moderate), and `@nestjs/platform-express`, up to 12.2.0, asks for multer 2.4.0 exactly (a denial of service through a pending `fileFilter`, high). `init` forces the fixed versions in `overrides` of `package.json` under npm, and of `pnpm-workspace.yaml` under pnpm, which reads nothing of `package.json`. An override the project already sets for one of them is kept, and said, unless `--force`. Fastify 5.12.2 to 5.12.5 let a request header go around the validation of a schema whose `propertyNames` reads it by case (low).
|
|
10
|
+
|
|
11
|
+
To move: `npx ddd-ts-kit init` adds the overrides (or write them by hand: `"overrides": { "qs": "^6.16.0", "multer": "^2.5.0" }` in `package.json` under npm, the same entries under `overrides:` of `pnpm-workspace.yaml` under pnpm, multer on Nest alone), then `npm install` (`pnpm install`). Check that `npm ls qs multer` (`pnpm why qs multer`) shows no qs below 6.16 and no multer below 2.5; a copy left older moves with `npm update qs multer`. In a project on Fastify, install `fastify@^5.12.7`.
|
|
12
|
+
|
|
13
|
+
**The background jobs and the process instances live in the database on Prisma too:
|
|
14
|
+
`PrismaJobStore` and `PrismaProcessStore`, and `init --orm prisma --queue database`.** The two
|
|
15
|
+
stores of `@ddd-ts-kit/prisma` are held to `jobStoreContract` and `processStoreContract`, on PGlite
|
|
16
|
+
and on PostgreSQL. A job enqueued by a command is written by the transaction of that command, so it
|
|
17
|
+
exists if and only if the command committed; a claim selects the due rows `FOR UPDATE SKIP LOCKED`,
|
|
18
|
+
the one raw statement of the store, and leases them in a short transaction; an idempotency key is
|
|
19
|
+
unique per job name and tenant. A step of a process manager saves its instance in the transaction
|
|
20
|
+
of its unit of work, refused with `ConcurrencyError` at a stale version. Their models ship in
|
|
21
|
+
`prisma/jobs-and-processes.postgresql.prisma`; the checkpoint of a job and the state of an
|
|
22
|
+
instance are JSON in a text field, since Prisma Client writes a SQL `NULL` to a `Json` field only
|
|
23
|
+
through the sentinel of the generated client. `init` writes the `BackgroundJob` and
|
|
24
|
+
`ProcessInstance` models in the `messaging` schema of `prisma/schema.prisma` and binds the stores in
|
|
25
|
+
`persistence-over.ts`; on Prisma with tsyringe `--queue` now defaults to `database`, as on Knex and
|
|
26
|
+
Drizzle, and with `--queue redis` the process instances stay in the database.
|
|
27
|
+
|
|
28
|
+
To move: a project on Prisma that keeps its jobs in memory and wants them in the database runs
|
|
29
|
+
`init --force --queue database` on a clean tree, then `npm run db:generate <name>` for the two new
|
|
30
|
+
tables.
|
|
31
|
+
|
|
32
|
+
**The four rules that read what a test says are errors: `test/title-states-a-rule`, `test/no-logic`, `test/assertion-present` and `test/refusal-by-code`.** They were warnings in 0.89, listed by `ddd-ts-kit lint` after its report without failing it; `recommended` of the ESLint plugin and `ddd-ts-kit rules` now give them `error`, as `strict` did, and the lint fails on them.
|
|
33
|
+
|
|
34
|
+
To move: before upgrading, run `npm run lint` on 0.89 and take up what it lists under these four rules: rename a title that says `should` or names a method, move a loop to an `it.each` and a decision to a builder or a fake, replace a `toThrow('message')` by the code of the refusal, and write `it.todo` where a test has no body. A project that keeps one of them a warning sets `"rules": { "test/no-logic": "warn" }` in `ddd-ts-kit.config.json`, rule by rule.
|
|
35
|
+
|
|
36
|
+
**`ddd-ts-kit doctor` says when an override `init` writes is missing, or no longer needed.** `init` forces qs `^6.16.0`, and multer `^2.5.0` on Nest, under a dependency that pins them below a security fix; nothing removed such an override from a project once that dependency was fixed, and it would hold the package back when a later major is asked for. `doctor` now reads, on what is installed, the range the parent asks for (`typed-rest-client` under `@stryker-mutator/core`, `@nestjs/platform-express`), found from the real place of each package under npm and under pnpm, against the overrides of `package.json` or of `pnpm-workspace.yaml`: `override <name>: missing` while the parent still pins the package below the fix and the project does not force it, which fails `--strict`; `override <name>: no longer needed` once the parent asks for the fixed version itself, said without failing it.
|
|
37
|
+
|
|
38
|
+
To move: run `npx ddd-ts-kit doctor` after an install; remove an override it says is no longer needed from the file it names, then install again.
|
|
39
|
+
|
|
7
40
|
## 0.89.0
|
|
8
41
|
|
|
9
42
|
**`clean/one-export-per-file` runs under the JS plugin API of Oxlint.** The rule walked the
|
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:431355ccfd0abdd4 -->
|
|
3
3
|
|
|
4
4
|
# ddd-ts-kit
|
|
5
5
|
|
|
@@ -134,6 +134,11 @@ de celui qui est choisi, enregistré sous `stack.packageManager`. pnpm est épin
|
|
|
134
134
|
de script de build sans être autorisée par son nom. Les deux sont prouvés par une installation
|
|
135
135
|
réelle d'un projet généré, son build et son `verify`. Le kit est installé depuis le registre dans
|
|
136
136
|
les deux cas.
|
|
137
|
+
Le projet force les versions qui ferment une vulnérabilité que sa pile épingle encore sous le
|
|
138
|
+
correctif, dans les `overrides` de `package.json` sous npm et de `pnpm-workspace.yaml` sous pnpm,
|
|
139
|
+
qui ne lit rien de `package.json` : qs `^6.16.0`, que Stryker demande en 6.15.1 par
|
|
140
|
+
`typed-rest-client`, et avec `--http nest` multer `^2.5.0`, que `@nestjs/platform-express`
|
|
141
|
+
demande en 2.4.0. Un override que le projet pose déjà pour l'un d'eux est gardé, et signalé.
|
|
137
142
|
|
|
138
143
|
**Pipelines.** Une *pull request* ou une *merge request* exécute les *specs* unitaires, les
|
|
139
144
|
*specs* d'intégration et le lint des contextes que son changement atteint par la carte des
|
|
@@ -1617,15 +1622,24 @@ résolus comme le fait Node, du projet vers le haut ; et, quand le dépôt a un
|
|
|
1617
1622
|
Chacun vient avec son correctif : un Node qu'`engines.node` accepte (`nvm use`), `npm ci`, les
|
|
1618
1623
|
paquets du kit montés ensemble, `git submodule update --init --recursive`.
|
|
1619
1624
|
|
|
1625
|
+
Enfin, sur ce qui est installé, les *overrides* qu'`init` écrit sous une dépendance qui épingle un
|
|
1626
|
+
paquet sous un correctif de sécurité (qs sous Stryker, multer sous Nest) : la plage que demande le
|
|
1627
|
+
parent installé, trouvé depuis l'emplacement réel de chaque paquet comme Node le trouve, face aux
|
|
1628
|
+
*overrides* de `package.json` sous npm ou de `pnpm-workspace.yaml` sous pnpm. Un *override* qui
|
|
1629
|
+
manque au projet tant que le parent épingle encore le paquet sous le correctif est `missing`, et
|
|
1630
|
+
`init` l'ajoute ; un *override* que le projet garde une fois que le parent demande lui-même la
|
|
1631
|
+
version corrigée est `no longer needed`, à retirer, car il retiendrait le paquet quand une majeure
|
|
1632
|
+
suivante sera demandée. Une chaîne qui n'est pas installée n'est pas jugée.
|
|
1633
|
+
|
|
1620
1634
|
`--strict` sort avec 1 tant que quelque chose manque ou est à une autre plage, ou tant que le
|
|
1621
1635
|
*checkout* ne peut pas faire tourner le projet : un Node hors d'`engines.node`, pas de
|
|
1622
1636
|
`node_modules`, un paquet du kit non installé ou à une autre version, un sous-module non
|
|
1623
|
-
initialis
|
|
1624
|
-
`.nvmrc` ne nomme pas quand `engines.node` l'accepte,
|
|
1625
|
-
l'installation (un *checkout* peut le réécrire avec ce que `node_modules` contient déjà)
|
|
1626
|
-
signalés sans le faire échouer. `--json` affiche `{ version, findings: [{ area, name, problem,
|
|
1637
|
+
initialisé, un *override* qui manque. Un script écrit autrement, un *hook* que ce clone n'a pas
|
|
1638
|
+
installé, un Node que `.nvmrc` ne nomme pas quand `engines.node` l'accepte, un *lockfile* modifié
|
|
1639
|
+
depuis l'installation (un *checkout* peut le réécrire avec ce que `node_modules` contient déjà), et
|
|
1640
|
+
un *override* qui n'est plus nécessaire sont signalés sans le faire échouer. `--json` affiche `{ version, findings: [{ area, name, problem,
|
|
1627
1641
|
expected, found }] }`, `area` valant `script`, `package`, `permission`, `hook`, `guidance`,
|
|
1628
|
-
`node`, `install` ou `
|
|
1642
|
+
`node`, `install`, `submodule` ou `override`.
|
|
1629
1643
|
|
|
1630
1644
|
## worker-scope
|
|
1631
1645
|
|
package/README.md
CHANGED
|
@@ -125,6 +125,11 @@ recorded under `stack.packageManager`. pnpm is pinned in `package.json` and prov
|
|
|
125
125
|
`pnpm-workspace.yaml` says that no dependency runs a build script unless allowed by name. Both are
|
|
126
126
|
proven by a real install of a generated project, its build and its `verify`. The kit is installed
|
|
127
127
|
from the registry either way.
|
|
128
|
+
The project forces the versions that close a vulnerability its stack still pins below the fix, in
|
|
129
|
+
`overrides` of `package.json` under npm and of `pnpm-workspace.yaml` under pnpm, which reads
|
|
130
|
+
nothing of `package.json`: qs `^6.16.0`, which Stryker asks for at 6.15.1 through
|
|
131
|
+
`typed-rest-client`, and under `--http nest` multer `^2.5.0`, which `@nestjs/platform-express`
|
|
132
|
+
asks for at 2.4.0. An override the project already sets for one of them is kept, and said.
|
|
128
133
|
|
|
129
134
|
**Pipelines.** A pull or merge request runs the unit specs, the integration specs and the lint of
|
|
130
135
|
the contexts its change reaches through the context map ([`ddd-ts-kit affected`](#affected)); types,
|
|
@@ -1527,14 +1532,23 @@ the workspace installs, its packages resolved as Node does, from the project up;
|
|
|
1527
1532
|
`engines.node` accepts (`nvm use`), `npm ci`, the packages of the kit upgraded together,
|
|
1528
1533
|
`git submodule update --init --recursive`.
|
|
1529
1534
|
|
|
1535
|
+
Last, on what is installed, the overrides `init` writes under a dependency that pins a package
|
|
1536
|
+
below a security fix (qs under Stryker, multer under Nest): the range the installed parent asks
|
|
1537
|
+
for, found from the real place of each package as Node finds it, against the overrides of
|
|
1538
|
+
`package.json` under npm or of `pnpm-workspace.yaml` under pnpm. An override the project lacks
|
|
1539
|
+
while the parent still pins the package below the fix is `missing`, and `init` adds it; one the
|
|
1540
|
+
project keeps once the parent asks for the fixed version itself is `no longer needed`, to remove,
|
|
1541
|
+
as it would hold the package back when a later major is asked for. A chain that is not installed
|
|
1542
|
+
is not judged.
|
|
1543
|
+
|
|
1530
1544
|
`--strict` exits 1 while something is missing or at another range, or while the checkout cannot
|
|
1531
1545
|
run the project: a Node outside `engines.node`, no `node_modules`, a package of the kit not
|
|
1532
|
-
installed or at another version, a submodule not initialised. A script
|
|
1533
|
-
this clone has not installed, a Node `.nvmrc` does not name while
|
|
1534
|
-
lockfile changed since the install (a checkout may rewrite it with
|
|
1535
|
-
holds) are said without failing it. `--json` prints `{ version, findings: [{ area, name, problem,
|
|
1546
|
+
installed or at another version, a submodule not initialised, an override missing. A script
|
|
1547
|
+
written otherwise, a hook this clone has not installed, a Node `.nvmrc` does not name while
|
|
1548
|
+
`engines.node` accepts it, a lockfile changed since the install (a checkout may rewrite it with
|
|
1549
|
+
what `node_modules` already holds), and an override no longer needed are said without failing it. `--json` prints `{ version, findings: [{ area, name, problem,
|
|
1536
1550
|
expected, found }] }`, `area` being `script`, `package`, `permission`, `hook`, `guidance`, `node`,
|
|
1537
|
-
`install` or `
|
|
1551
|
+
`install`, `submodule` or `override`.
|
|
1538
1552
|
|
|
1539
1553
|
## worker-scope
|
|
1540
1554
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-severities.d.ts","sourceRoot":"","sources":["../../../src/check/catalogue/default-severities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,0GAA0G;AAC1G,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"default-severities.d.ts","sourceRoot":"","sources":["../../../src/check/catalogue/default-severities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,0GAA0G;AAC1G,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAuBjE,CAAC"}
|
|
@@ -13,10 +13,6 @@ export const DEFAULT_SEVERITIES = {
|
|
|
13
13
|
'clean/no-noise-comment': 'warn',
|
|
14
14
|
'clean/no-flag-argument': 'warn',
|
|
15
15
|
'application/command-query-separation': 'warn',
|
|
16
|
-
'test/title-states-a-rule': 'warn',
|
|
17
|
-
'test/no-logic': 'warn',
|
|
18
|
-
'test/assertion-present': 'warn',
|
|
19
|
-
'test/refusal-by-code': 'warn',
|
|
20
16
|
'standard/no-parallel-interface': 'warn',
|
|
21
17
|
'config/rule-off-everywhere': 'warn',
|
|
22
18
|
'tree/documented-paths': 'warn',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-severities.js","sourceRoot":"","sources":["../../../src/check/catalogue/default-severities.ts"],"names":[],"mappings":"AAEA,0GAA0G;AAC1G,MAAM,CAAC,MAAM,kBAAkB,GAAuC;IACpE,eAAe,EAAE,MAAM;IACvB,qBAAqB,EAAE,MAAM;IAC7B,wBAAwB,EAAE,MAAM;IAChC,gCAAgC,EAAE,MAAM;IACxC,gCAAgC,EAAE,MAAM;IACxC,2BAA2B,EAAE,MAAM;IACnC,kCAAkC,EAAE,MAAM;IAC1C,eAAe,EAAE,MAAM;IACvB,uBAAuB,EAAE,MAAM;IAC/B,qBAAqB,EAAE,MAAM;IAC7B,wBAAwB,EAAE,MAAM;IAChC,wBAAwB,EAAE,MAAM;IAChC,sCAAsC,EAAE,MAAM;IAC9C,
|
|
1
|
+
{"version":3,"file":"default-severities.js","sourceRoot":"","sources":["../../../src/check/catalogue/default-severities.ts"],"names":[],"mappings":"AAEA,0GAA0G;AAC1G,MAAM,CAAC,MAAM,kBAAkB,GAAuC;IACpE,eAAe,EAAE,MAAM;IACvB,qBAAqB,EAAE,MAAM;IAC7B,wBAAwB,EAAE,MAAM;IAChC,gCAAgC,EAAE,MAAM;IACxC,gCAAgC,EAAE,MAAM;IACxC,2BAA2B,EAAE,MAAM;IACnC,kCAAkC,EAAE,MAAM;IAC1C,eAAe,EAAE,MAAM;IACvB,uBAAuB,EAAE,MAAM;IAC/B,qBAAqB,EAAE,MAAM;IAC7B,wBAAwB,EAAE,MAAM;IAChC,wBAAwB,EAAE,MAAM;IAChC,sCAAsC,EAAE,MAAM;IAC9C,gCAAgC,EAAE,MAAM;IACxC,4BAA4B,EAAE,MAAM;IACpC,uBAAuB,EAAE,MAAM;IAC/B,oBAAoB,EAAE,MAAM;IAC5B,2BAA2B,EAAE,MAAM;IACnC,+BAA+B,EAAE,MAAM;IACvC,iCAAiC,EAAE,MAAM;IACzC,iBAAiB,EAAE,MAAM;IACzB,iBAAiB,EAAE,MAAM;CAC1B,CAAC"}
|
|
@@ -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;AAuBzC;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,OAa3B,CAAC"}
|
package/dist/commands/doctor.js
CHANGED
|
@@ -7,8 +7,9 @@ import { Arguments } from './arguments.js';
|
|
|
7
7
|
* What --strict fails on: what the project lacks, and what keeps this checkout from running it.
|
|
8
8
|
* A script written otherwise may be the project's on purpose, a git hook not installed is a state
|
|
9
9
|
* of one clone, the Node `.nvmrc` names is a choice of the team when `engines.node` accepts the
|
|
10
|
-
* running one, a lockfile changed after the install may hold what node_modules has,
|
|
11
|
-
* generators read the files of the platform flat as well as in their folders
|
|
10
|
+
* running one, a lockfile changed after the install may hold what node_modules has, the
|
|
11
|
+
* generators read the files of the platform flat as well as in their folders, and an override no
|
|
12
|
+
* longer needed forces a version the dependency asks for anyway.
|
|
12
13
|
*/
|
|
13
14
|
const STRICT_PROBLEMS = {
|
|
14
15
|
script: new Set(['missing']),
|
|
@@ -20,6 +21,7 @@ const STRICT_PROBLEMS = {
|
|
|
20
21
|
node: new Set(['unsupported']),
|
|
21
22
|
install: new Set(['missing', 'not installed', 'other version']),
|
|
22
23
|
submodule: new Set(['not initialised']),
|
|
24
|
+
override: new Set(['missing']),
|
|
23
25
|
};
|
|
24
26
|
/**
|
|
25
27
|
* 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
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EA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,CAAC,IAAI,CAAC,CAAC;IACpC,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAExC,EAAE,CAAC,GAAG,CACJ,IAAI,CAAC,IAAI;QACP,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;QACzD,CAAC,CAAC,eAAe,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CACpE,CAAC;IAEF,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,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"}
|
|
@@ -6,7 +6,8 @@ import type { DoctorFinding } from './doctor-finding.js';
|
|
|
6
6
|
* policy, then the files of the platform this version gives a folder.
|
|
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
|
-
* packages of the kit at the version of this CLI, its submodules.
|
|
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
11
|
*/
|
|
11
12
|
export declare function diagnose(root: string, config: Config): DoctorFinding[];
|
|
12
13
|
//# 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;AAatD;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,EAAE,CAuBtE"}
|
package/dist/doctor/diagnose.js
CHANGED
|
@@ -6,6 +6,7 @@ import { guidanceFindings } from './guidance-findings.js';
|
|
|
6
6
|
import { hookFindings } from './hook-findings.js';
|
|
7
7
|
import { installFindings } from './install-findings.js';
|
|
8
8
|
import { nodeFindings } from './node-findings.js';
|
|
9
|
+
import { overrideFindings } from './override-findings.js';
|
|
9
10
|
import { packageFindings } from './package-findings.js';
|
|
10
11
|
import { permissionFindings } from './permission-findings.js';
|
|
11
12
|
import { scriptFindings } from './script-findings.js';
|
|
@@ -17,7 +18,8 @@ import { platformFileIn } from '../platform-layout/index.js';
|
|
|
17
18
|
* policy, then the files of the platform this version gives a folder.
|
|
18
19
|
* Settings the project does not have are not judged: an agent may run elsewhere than Claude Code.
|
|
19
20
|
* Then what this checkout lacks to run it: the Node it asks, its dependencies installed, the
|
|
20
|
-
* packages of the kit at the version of this CLI, its submodules.
|
|
21
|
+
* 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.
|
|
21
23
|
*/
|
|
22
24
|
export function diagnose(root, config) {
|
|
23
25
|
const manifest = readJson(path.join(root, 'package.json'));
|
|
@@ -36,6 +38,7 @@ export function diagnose(root, config) {
|
|
|
36
38
|
...folderFindings(root, config),
|
|
37
39
|
...nodeFindings(process.versions.node, nodeEngine(manifest), readText(path.join(root, '.nvmrc'))),
|
|
38
40
|
...installFindings(root, config.stack.packageManager, declared),
|
|
41
|
+
...overrideFindings(root, config, manifest),
|
|
39
42
|
...submoduleFindings(root),
|
|
40
43
|
];
|
|
41
44
|
}
|
|
@@ -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;AAEtD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD
|
|
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;AAEtD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAi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AAS,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACvG,CAAC;AAED,SAAS,QAAQ,CAAC,IAAY;IAC5B,IAAI,CAAC;QACH,OAAO,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACvC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,SAAS,QAAQ,CAAC,IAAY;IAC5B,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IAC1C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
|
|
@@ -4,14 +4,15 @@
|
|
|
4
4
|
* of one checkout, not of the project. `guidance` is a file written once for the team to own.
|
|
5
5
|
*/
|
|
6
6
|
export interface DoctorFinding {
|
|
7
|
-
readonly area: 'script' | 'package' | 'permission' | 'hook' | 'guidance' | 'folder' | 'node' | 'install' | 'submodule';
|
|
7
|
+
readonly area: 'script' | 'package' | 'permission' | 'hook' | 'guidance' | 'folder' | 'node' | 'install' | 'submodule' | 'override';
|
|
8
8
|
readonly name: string;
|
|
9
9
|
/**
|
|
10
10
|
* `not installed`: a git hook this clone lacks, or a package of the kit node_modules lacks.
|
|
11
11
|
* `unsupported`: a running Node outside `engines.node`. `outdated`: node_modules installed
|
|
12
12
|
* before the lockfile last changed. `flat`: files of the platform generated before their folders.
|
|
13
|
+
* `no longer needed`: an override of a version its dependency now asks for itself.
|
|
13
14
|
*/
|
|
14
|
-
readonly problem: 'missing' | 'other version' | 'written otherwise' | 'not installed' | 'unsupported' | 'outdated' | 'not initialised' | 'flat';
|
|
15
|
+
readonly problem: 'missing' | 'other version' | 'written otherwise' | 'not installed' | 'unsupported' | 'outdated' | 'not initialised' | 'flat' | 'no longer needed';
|
|
15
16
|
/** What this version writes, or what the project asks of its environment. */
|
|
16
17
|
readonly expected: string;
|
|
17
18
|
/** What the project has, when it has something. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor-finding.d.ts","sourceRoot":"","sources":["../../src/doctor/doctor-finding.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EACT,QAAQ,GACR,SAAS,GACT,YAAY,GACZ,MAAM,GACN,UAAU,GACV,QAAQ,GACR,MAAM,GACN,SAAS,GACT,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"doctor-finding.d.ts","sourceRoot":"","sources":["../../src/doctor/doctor-finding.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EACT,QAAQ,GACR,SAAS,GACT,YAAY,GACZ,MAAM,GACN,UAAU,GACV,QAAQ,GACR,MAAM,GACN,SAAS,GACT,WAAW,GACX,UAAU,CAAC;IACf,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,EACZ,SAAS,GACT,eAAe,GACf,mBAAmB,GACnB,eAAe,GACf,aAAa,GACb,UAAU,GACV,iBAAiB,GACjB,MAAM,GACN,kBAAkB,CAAC;IACvB,6EAA6E;IAC7E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,mDAAmD;IACnD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -46,13 +46,16 @@ function version(area) {
|
|
|
46
46
|
return area === 'package' ? 'range ' : '';
|
|
47
47
|
}
|
|
48
48
|
function fixesOf(findings) {
|
|
49
|
-
const ofTheProject = findings.filter((finding) => finding.area !== 'hook' && finding.area !== 'folder');
|
|
49
|
+
const ofTheProject = findings.filter((finding) => finding.area !== 'hook' && finding.area !== 'folder' && finding.problem !== 'no longer needed');
|
|
50
50
|
const fixes = ofTheProject.length === 0
|
|
51
51
|
? []
|
|
52
52
|
: ['fix: `npx ddd-ts-kit init` adds what is missing and leaves what the project wrote; then install.'];
|
|
53
53
|
if (ofTheProject.some((finding) => finding.area === 'package' && finding.problem === 'other version')) {
|
|
54
54
|
fixes.push('fix: upgrade `ddd-ts-kit` and every `@ddd-ts-kit/*` package together, to the ranges above; the steps of each version are in node_modules/ddd-ts-kit/CHANGELOG.md.');
|
|
55
55
|
}
|
|
56
|
+
if (findings.some((finding) => finding.problem === 'no longer needed')) {
|
|
57
|
+
fixes.push('fix: remove the override from the file it names, then install again: its dependency asks for the fixed version itself, and the override would hold the package back when a later major is asked for.');
|
|
58
|
+
}
|
|
56
59
|
if (ofTheProject.some((finding) => finding.problem === 'written otherwise')) {
|
|
57
60
|
fixes.push("note: a script written otherwise may be yours on purpose; `npx ddd-ts-kit init --force` writes the kit's version over it.");
|
|
58
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-diagnosis.js","sourceRoot":"","sources":["../../src/doctor/format-diagnosis.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAG1D,wGAAwG;AACxG,MAAM,eAAe,GAAuC,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;AAEtG;;;GAGG;AACH,MAAM,UAAU,eAAe,CAC7B,QAAkC,EAClC,OAAe,EACf,OAAgC;IAEhC,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACtF,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IAEtF,OAAO,CAAC,GAAG,YAAY,CAAC,YAAY,EAAE,OAAO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,CAAC,OAAO,CAAC,CAAC,CAAC;IAE1F,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC;QACjC,KAAK,CAAC,IAAI,CACR,4LAA4L,CAC7L,CAAC;IACJ,CAAC;SAAM,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC;QAC1C,KAAK,CAAC,IAAI,CAAC,mDAAmD,CAAC,CAAC;IAClE,CAAC;IAED,IAAI,GAAG,CAAC,SAAS,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC;QAC7D,KAAK,CAAC,IAAI,CACR,wIAAwI,CACzI,CAAC;IACJ,CAAC;IAED,IAAI,GAAG,CAAC,SAAS,EAAE,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC;QACtC,KAAK,CAAC,IAAI,CACR,uTAAuT,CACxT,CAAC;IACJ,CAAC;IAED,IAAI,GAAG,CAAC,WAAW,EAAE,CAAC,iBAAiB,CAAC,CAAC,EAAE,CAAC;QAC1C,KAAK,CAAC,IAAI,CACR,6GAA6G,CAC9G,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Config } from '../config/index.js';
|
|
2
|
+
import type { DoctorFinding } from './doctor-finding.js';
|
|
3
|
+
/**
|
|
4
|
+
* The versions init forces under a dependency that pins one below a security fix, judged on what
|
|
5
|
+
* is installed: an override the project needs and lacks, and one it keeps once that dependency
|
|
6
|
+
* asks for the fixed version itself, which would hold the package back on its next major. A chain
|
|
7
|
+
* that is not installed, or a range that cannot be read, is not judged.
|
|
8
|
+
*/
|
|
9
|
+
export declare function overrideFindings(root: string, config: Config, manifest: unknown): DoctorFinding[];
|
|
10
|
+
//# sourceMappingURL=override-findings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"override-findings.d.ts","sourceRoot":"","sources":["../../src/doctor/override-findings.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,aAAa,EAAE,CAOjG"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { isRecord } from '../config/values/is-record.js';
|
|
4
|
+
import { PINNED_BELOW_A_FIX } from '../init/manifest/pinned-below-a-fix.js';
|
|
5
|
+
import { inRange } from './in-range.js';
|
|
6
|
+
/**
|
|
7
|
+
* The versions init forces under a dependency that pins one below a security fix, judged on what
|
|
8
|
+
* is installed: an override the project needs and lacks, and one it keeps once that dependency
|
|
9
|
+
* asks for the fixed version itself, which would hold the package back on its next major. A chain
|
|
10
|
+
* that is not installed, or a range that cannot be read, is not judged.
|
|
11
|
+
*/
|
|
12
|
+
export function overrideFindings(root, config, manifest) {
|
|
13
|
+
const file = config.stack.packageManager === 'pnpm' ? 'pnpm-workspace.yaml' : 'package.json';
|
|
14
|
+
const forced = forcedIn(root, file, manifest);
|
|
15
|
+
return PINNED_BELOW_A_FIX.filter((pin) => pin.applies(config)).flatMap((pin) => findingsOf(pin, { asked: askedOf(root, pin), forced: forced(pin.name), file }));
|
|
16
|
+
}
|
|
17
|
+
function findingsOf(pin, { asked, forced, file }) {
|
|
18
|
+
const fixedAllowed = asked === undefined ? undefined : inRange(pin.fixed, asked.range);
|
|
19
|
+
if (asked === undefined || fixedAllowed === undefined || fixedAllowed !== forced) {
|
|
20
|
+
return [];
|
|
21
|
+
}
|
|
22
|
+
const asks = `${asked.parent} asks for ${pin.name} ${asked.range}`;
|
|
23
|
+
return [
|
|
24
|
+
forced
|
|
25
|
+
? {
|
|
26
|
+
area: 'override',
|
|
27
|
+
name: pin.name,
|
|
28
|
+
problem: 'no longer needed',
|
|
29
|
+
expected: `no override: ${asks}`,
|
|
30
|
+
found: `${pin.name} forced in overrides of ${file}`,
|
|
31
|
+
}
|
|
32
|
+
: {
|
|
33
|
+
area: 'override',
|
|
34
|
+
name: pin.name,
|
|
35
|
+
problem: 'missing',
|
|
36
|
+
expected: `${pin.name} ${pin.range} in overrides of ${file}`,
|
|
37
|
+
found: asks,
|
|
38
|
+
},
|
|
39
|
+
];
|
|
40
|
+
}
|
|
41
|
+
/** The range the last package of the chain asks for, the chain resolved as Node does from the real place of each package. */
|
|
42
|
+
function askedOf(root, pin) {
|
|
43
|
+
let from = root;
|
|
44
|
+
let manifest;
|
|
45
|
+
for (const name of pin.through) {
|
|
46
|
+
const directory = installedFrom(from, name);
|
|
47
|
+
manifest = directory === undefined ? undefined : manifestIn(directory);
|
|
48
|
+
if (directory === undefined || manifest === undefined) {
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
from = directory;
|
|
52
|
+
}
|
|
53
|
+
const range = isRecord(manifest?.['dependencies']) ? manifest['dependencies'][pin.name] : undefined;
|
|
54
|
+
const parent = pin.through.at(-1);
|
|
55
|
+
return typeof range === 'string' && parent !== undefined ? { parent, range } : undefined;
|
|
56
|
+
}
|
|
57
|
+
function installedFrom(start, name) {
|
|
58
|
+
for (let directory = path.resolve(start);; directory = path.dirname(directory)) {
|
|
59
|
+
const candidate = path.join(directory, 'node_modules', name);
|
|
60
|
+
if (fs.existsSync(path.join(candidate, 'package.json'))) {
|
|
61
|
+
return fs.realpathSync(candidate);
|
|
62
|
+
}
|
|
63
|
+
if (path.dirname(directory) === directory) {
|
|
64
|
+
return undefined;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function manifestIn(directory) {
|
|
69
|
+
try {
|
|
70
|
+
const manifest = JSON.parse(fs.readFileSync(path.join(directory, 'package.json'), 'utf8'));
|
|
71
|
+
return isRecord(manifest) ? manifest : undefined;
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
return undefined;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/** Whether the project forces a package: in `overrides` of package.json, or in the `overrides:` block of pnpm-workspace.yaml. */
|
|
78
|
+
function forcedIn(root, file, manifest) {
|
|
79
|
+
if (file === 'package.json') {
|
|
80
|
+
const overrides = isRecord(manifest) && isRecord(manifest['overrides']) ? manifest['overrides'] : {};
|
|
81
|
+
return (name) => overrides[name] !== undefined;
|
|
82
|
+
}
|
|
83
|
+
const text = fs.existsSync(path.join(root, file)) ? fs.readFileSync(path.join(root, file), 'utf8') : '';
|
|
84
|
+
const block = /^overrides:\n((?:[ \t]+.*\n?|\n)*)/m.exec(text)?.[1] ?? '';
|
|
85
|
+
return (name) => new RegExp(`^\\s+['"]?${name}['"]?:`, 'm').test(block);
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=override-findings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"override-findings.js","sourceRoot":"","sources":["../../src/doctor/override-findings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAwB,MAAM,qCAAqC,CAAC;AAE/F,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,MAAc,EAAE,QAAiB;IAC9E,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,cAAc,KAAK,MAAM,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,cAAc,CAAC;IAC7F,MAAM,MAAM,GAAG,QAA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,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACxG,MAAM,KAAK,GAAG,qCAAqC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAE1E,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,aAAa,IAAI,QAAQ,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1E,CAAC"}
|
package/dist/help/notes.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** What a line of the usage cannot say about a command or a flag. */
|
|
2
|
-
export declare const NOTES = " affected what a pull request has to run: the contexts a change set reaches through the context\n map (a changed context and the contexts downstream of it), as filters for the test\n runner and the linter; everything when a shared path changed or without --base;\n --run <script> runs that script of the project on them (DDD_TS_KIT_AFFECTED set,\n --passWithNoTests on a partial run) and nothing when nothing that runs changed:\n the pre-push hook tests the contexts its branch reaches\n build-aliases after the compiler: rewrites the import aliases left in the emitted .js and .d.ts files\n into relative paths, so that plain node runs the output (tsconfig.build.json by default)\n drizzle-generate the db:generate of a Drizzle project: drizzle-kit generate --name, which without a terminal\n fails and names the fix when drizzle-kit would ask whether a column or table is renamed,\n where drizzle-kit alone writes nothing and exits 0; then formats the snapshot and the\n journal it wrote with the Biome or Prettier of the format script, and warns when the\n SQL changes a primary key in an order that fails on PostgreSQL (exit code unchanged);\n --replay, after merging the trunk into a branch when both added migrations: when the\n history forks from --base <ref> (origin/main by default), deletes the migrations of the\n branch the base does not have, with their snapshots and journal entries, then generates\n each again on top, in order, under its name (working- dropped outside a worker's\n worktree, a custom one keeping its SQL); when it does not fork, only renames them;\n refused while the journal holds conflict markers, when two of them change the schema,\n or when drizzle-kit now writes a generated one otherwise (edited by hand), the folder\n then put back as it was\n error-factories moves the refusals of a project to one class per refusal (--to named, the default), from\n one class per error or from the factories of one error class per concept: --plan writes\n error-factories.plan.json, where each refusal is given a class (the PascalCase of its\n code, which it keeps) and a factory (for<Concept>), both editable; --apply follows it\n (codes.ts per context, one class file per refusal, specs, every usage, the concept\n classes left empty, \"stack.refusals\" in the config) and lists what it cannot rewrite\n (a bare <Concept>Error.is(error), CodeOf<typeof <Concept>Error>); --to factories moves\n one class per error to static factories on one error class per concept instead\n value-objects moves the value objects of a project from a Result to factories that return the value or\n throw: every create returning Result<T, E> returns T, err(..) is thrown, unwrap(..) of\n them goes, specs assert expectRefusal(() => ..), \"stack.valueObjects\" becomes throwing\n platform-folders takes the files of the platform a project generated flat to their folders:\n composition/, observability/ (tracing.ts first), jobs/, auth/authentication/ (who is\n calling), auth/authorization/ (what they may do, whatever the model), the folder of\n the model (auth/roles/, attributes/, relationships/, custom/) and\n audit/search-audit-entries/; every import of them under the source root, test/ and\n scripts/ follows, and the scripts of package.json; a file the kit did not write at\n the root of the platform or of auth/ stays where it is, named, unless --place\n <file>=<folder> (both from the platform) gives it its folder; the generators and\n init --force keep either layout until then\n move-to-module takes files of a context into a module of its model, declared first with generate module,\n each to <module>/<layer>/ and each spec to test/<unit|integration>/<module>/: each <path>\n is a file or a folder of a role or a spec, relative to the context\n (domain/aggregates/waitlist.aggregate.ts, application/commands/join-waitlist,\n infrastructure/persistence/knex-waitlist.repository.ts); the specs named after a moved\n file follow it, every import of them under the source root, test/ and scripts/ follows,\n and the generated declarations are rewritten; what the modules share stays at the level\n of the context: the code list and the permission set at its root, the schema of its\n database, its route groups, guards and shared shapes, its fakes, builders and worlds\n context-layout takes the files of the contexts, or of the ones named, that 0.86 or 0.87 wrote elsewhere to\n their place of today: domain/errors/codes.ts to <context>.codes.ts and\n application/authorization/<context>.permissions.ts to <context>.permissions.ts, at the\n root of the context, and each module of the model from domain/<module>/ and\n application/<module>/ to <module>/domain/ and <module>/application/, with the adapters,\n routes and specs it tells by their imports (a spec by the file it is named after); what\n names no module, or two, is listed and stays; every import of them under the source\n root, test/ and scripts/ follows, what derives from the tree is written again\n (.dependency-cruiser.cjs, the declarations) and knip is told of the code lists where they\n are; the generators keep the code lists and permission sets where they are until then\n controllers moves the function routes of a project, or of one context, to controller classes: each\n <name>.route.ts becomes <resource>/<name>/<name>.controller.ts behind the route group of\n its resource, its schema files and its spec follow; a context is turned whole or not at all\n doctor what an upgrade left to do: the scripts, the packages of the kit (at the ranges of this\n version) and the agent permissions this version writes that the project lacks or writes\n otherwise, and the git hooks (the lefthook: line of lefthook.yml, the pre-commit hook of\n lefthook in this clone); init adds what is missing, hooks:install the hook; then what\n this checkout lacks to run the project, read without network: the running Node against\n engines.node and .nvmrc, node_modules installed since the lockfile last changed, each\n package of the kit installed at the version of this CLI, the submodules initialised;\n each with its fix; --strict exits 1 while something is missing or the checkout cannot\n run the project, never for a hook this clone has not installed, a Node .nvmrc does not\n name or a lockfile changed since the install\n lint the ESLint of the project (lint and ci:lint run it): fails on an error, and on a warning\n as on an error, but on one of a rule of the kit in transition, a new rule that becomes an\n error in the version it names, whose warnings are listed apart; --format and --fix as ESLint\n describe one context as facts: use cases, routes, events, ports, policies, gateways, dependencies\n status the next step of docs/architecture/plan.md, the slices of docs/architecture/slices.md by\n status and by owner, each row not done ready on the trunk (its dependencies done), ready\n on a branch (the others briefed to a worker with commits ahead of its base) or waiting\n (with the ids it waits for), a row that landed with a worker's branch but is not marked done,\n and the TODO(domain), TODO(platform), it.todo and TODO(review) left in each context, and\n each story or milestone whose rows are all done while markers of its own keep it open (see\n story-check, whose git blame it runs on those markers only); --workers shows instead each\n worktree holding .ddd-ts-kit/worker.json (branch, context, rows, base, commits ahead and\n files changed counted from where its branch landed on the base when it was squash-merged\n there (else from the merge base), commits behind, the commit it landed as, what merge-trunk\n would leave conflicted now, dependencies not installed, its report), a state line (rows\n committed, the row under way, files uncommitted, markers, last verify-slice, and the\n worker-scope --resume command of a stopped one), then the contexts and the files more than\n one worker holds\n sdk the typed client of each document of the contract, a workspace package under\n clients/<document> without runtime dependency: typed errors keyed by the error codes,\n credentials per security scheme; records \"sdk\" in the config the first time, wires the\n scripts (docs:generate regenerates it, docs:check compares it, ci:build builds it);\n --check writes nothing and exits 1 while a client differs from its contract\n todo those markers as file:line, in the project or in one context\n mutation the mutation score of the domain and application layers of each context, read from the\n json report the last stryker run wrote (reports/mutation/mutation.json, or --report\n <file>), each held to its \"mutation\" floor of the config (80 and 75 by default): detected over detected and\n undetected, the errors left out, as Stryker counts, the ignored mutants (the texts of\n refusals, the code that runs once when the module loads) shown beside, since the\n score says nothing about them; exits 1 while a layer is under its floor, 2 without\n a report. --survivors lists the mutants no test noticed (file:line, mutator, what the\n code became), each a decision: a test named after the rule, or left alive and said so;\n --changed <ref>, or DDD_TS_KIT_MUTATION_SINCE in the environment as the job of a pull\n request sets it, lists those of the files changed since the git ref alone and exits 0\n whatever the scores, a reading for a change in progress. Runs no test: npm run\n test:mutation runs Stryker, then this; the pipeline runs it every night and, with\n the variable set to the merge base of the change, on a pull request\n plan-waves the rows of slices.md not done, of the project or of one context, in waves (wave 1: every\n dependency done; wave n: the others in earlier waves), each wave cut into batches of one\n owner, one or two rows on one aggregate, with the worker-scope command that briefs each,\n the batches of a wave likely to touch the same files (same aggregate in Start with, or\n unknown when it names none), each row a row waits for with its status (and its context\n and story when it is of another story or outside the context shown), the rows of other\n stories the planned rows wait for, not done, in a section of their own, the merge order\n and what runs before each merge (merge-trunk --to-land); a cycle, a dependency on an\n unknown id or a row without owner is reported alone, and exits 1\n story-check whether a story or a milestone can close, <code> being the start of the ids of its rows\n (M1 for M1.01, M1.02: the id without its last .<number>): every row of it done in\n slices.md (the others listed with their status), and no marker of its own left\n (TODO(domain), TODO(platform), it.todo, TODO(review)). A marker is attributed to\n rows: those its text names (#M1.03 or M1.03, word-bounded), else those of the commit\n that wrote its line (git blame, once per file; its Slice: trailer, else the row ids\n its message names), else, not committed, those of .ddd-ts-kit/worker.json in a\n worker's worktree. It is the story's own when it belongs to one of its rows,\n wherever it is; a marker of a context of its rows that belongs to no row is its own\n when no other open story has a row in that context, and is listed without blocking\n otherwise (settle it or name its row in it); a marker of other stories' rows does not\n block. --strict: every marker of its contexts blocks. Each blocker comes with why it\n is its own, its file:line and its fix: handle it, or dismiss it by a decision record\n (generate adr), then delete the marker. A done row also holds to its design: every\n name the ## #<id> section of docs/architecture/reviews/<code>.md cites (a path, a\n PascalCase name, a Class.member, as cited reads them) exists in the tree, or is\n listed under ### Compromises of ## Report in the story file; a name that is neither\n blocks, with its file:line in the review. A commit of the story on the current branch\n (its Slice: trailer, else its message naming a row or the story) that changes a\n migration or a container file (the paths the change-reference hook of the regulated\n profile watches) without a Change: <id> trailer is listed, with its files, and blocks\n under agents.profile regulated or with --strict. Reads only: exits 0 when it can\n close, 1 listing what keeps it open, 2 on a code no row carries or without slices.md\n acceptance the acceptance scenarios of each story (test/acceptance/<story>.acceptance.spec.ts) against\n its rows in slices.md and the criteria of docs/architecture/stories/<story>.md: the rows and\n criteria each scenario names (#US5.02 AC1 in its title), the scenarios left to write\n (it.todo), those wrapped in pending(...) of @ddd-ts-kit/testing/e2e until their code is\n built, and what is inconsistent (no row, an unknown row or criterion, a scenario skipped,\n a pending one whose rows are done, a locked one changed while its criteria were not);\n --gate written: every slice row and criterion has a written scenario, none is left to\n write, the acceptance is locked (before the code of the story); --gate passing: none is\n pending either (before the story closes); exits 1 while a gate is not met, or, without\n one, on an inconsistency. Never runs a test. --lock writes\n test/acceptance/<story>.acceptance.lock.json, the fingerprint of each criterion and of\n each scenario (pending(...), layout and comments aside), refused while a scenario is\n left to write, or while a criterion changed, or a locked scenario changed while its\n criteria did not, without a verdict \"amend\" of the acceptance-judge agent on that very\n version (test/acceptance/verdicts/*.md, lines Story:, Subject:, Fingerprint:,\n Verdict:, Reason:); a refusal wins; the verdicts become amendments of the lock,\n listed for the owner to validate. A fix is a story file with a ## Regression section\n listing the spec files that prove it (- test/unit/<name>.spec.ts): held to the tests of\n those files instead of rows and scenarios, locked and judged the same way, the statement\n of the fix being the criterion\n worker-scope a git worktree on the branch build/<context> (by default .worktrees/<context>, see worktree),\n cut from --base <ref> (by default the current branch, refused from a worker's worktree), its\n .ddd-ts-kit/worker.json, and the briefing of the worker of that context; --rows <id,...>\n briefs those rows of slices.md only, with their rules, the documents of their design and\n the names that design cites the base does not have (see cited), and by default the first\n batch plan-waves cuts for the context (one or two rows on one aggregate), a note naming the\n next; a worktree it creates gets the clean install of the package manager (npm ci), its\n time in the notes, unless --no-install; an existing worktree or branch that does not\n contain the base is refused, with the merge-trunk that brings it in\n --here worker-scope in the worktree of a story (.ddd-ts-kit/story.json): writes the scope of the\n next agent in place, its base the base of the story, and prints its briefing; no\n worktree, branch or install of its own; the agents of a story run one after the other\n story-scope the worktree of one story, .worktrees/<story> on story/<story> cut from --base (by default\n origin/main from the trunk, else the current branch, refused from the worktree of a\n story), its .ddd-ts-kit/story.json ({ story, base, baseCommit, branch, kind, from }) and\n its clean install; an existing one is kept and the story resumes there; refused when the\n story is open in another worktree; names the other open stories and the contexts their\n rows change; --kind story (the default) or fix (a story built behind locked regression\n specs, listed under ## Regression of its file); --from <file> records where the story\n comes from, an intent of docs/architecture/intents/ (refused unless its header says\n Status: accepted) or an incident record of docs/architecture/incidents/, and the Next:\n line says that the story skill seeds the statement from it while the story file does\n not exist\n worktree the worktree of any other piece of work, .worktrees/<name> on work/<name> cut from --base\n (by default origin/main from the trunk, else the current branch), and its clean install\n unless --no-install; an existing one is kept; .worktrees/ lies in the main checkout,\n whichever worktree it runs from, ignored by git and by the tools of the project; while\n the .gitignore of a project started before does not hold it (init adds it), a worktree\n opens next to the project, ../<project>-<name>; in a project whose config says\n \"worktrees\": \"required\" (what init writes), the guard of the plugin refuses the code of\n a context in the main checkout of the trunk, and in a worktree of .worktrees/ without\n its own node_modules\n story where a story stands, phase by phase: its specification and criteria\n (docs/architecture/stories/<story>.md), its rows in slices.md, a design review section\n per row not done (docs/architecture/reviews/<story>.md, ## #<id>), its acceptance written\n and locked, its rows done, its acceptance passing, its trunk merged in, its ## Origin\n (From: and Built with:), its ## Report with ### Verification naming npm run verify; and\n the next step; in the worktree of a story, the story is its own; --gate build exits 1\n until the first four are met (the code may start: the guard of the plugin opens the\n contexts), --gate close until all are\n stories the stories open in the worktrees of the repository and where two of them meet: the\n contexts the rows of both name, the files both worktrees change (committed or not), what\n merging the branch of one into the other leaves to a person and what merge-trunk settles\n (git merge-tree, nothing written); how far each is behind its base; from the worktree of a\n story, the stories it meets; the guard of the plugin says it at session start and on a\n write to a file another story changes\n --resume worker-scope reads where the stopped worker of the context stands (its rows by their\n Slice: trailer, the files of the row under way, the markers, its last verify-slice, its\n report, its agent as the guard recorded it) and prints the message that resumes its agent\n (SendMessage) or the briefing of a new one; creates and rewrites nothing; --fresh asks for\n a new agent whatever the last one did; several worktrees of the context need --worktree\n verify-slice closes a slice before its commit, in one run: the regenerate script, check on the files\n changed since --since (new ones included), the test script for the context; then the\n changed files past 300 of the 350 lines, the paths of the slice to stage (its context, an\n end-to-end spec, a working migration, the derived files git tracks) and every other\n changed path, left out and never to stage with it; the merges since --since, as\n verify-merge checks them, reported without failing the slice in this version (a later\n minor version fails it); exits 1 while a step fails; then the names the slice removes\n that the design of a row not done still cites (never a failure); in the worktree of a\n worker, the commit command with the trailer Slice: <row>, and\n .ddd-ts-kit/verification.json for the conductor\n cited the names the design of rows not done cites as code (paths, classes, Class.member) that\n the code does not have: those the history of --base removed (with the commit and the\n successor), the places the canonical tree refuses, and a name never there whose close\n name of the same part arrived after the line was written; planned names stay silent.\n The design of a row: its cells and rule lines in slices.md, a section of a document of\n docs/architecture whose heading names it, a document that names it or that its rule\n line links to. Default: every row not done, of the context when given, at the current\n branch. --removed-since <ref>: the names a change removes, from the merge base to the\n working tree, that such a design cites. Reads only, exits 0\n verify-merge what the merges of a branch lost, read from git only: every merge commit since --since\n (by default the base of .ddd-ts-kit/worker.json, then origin/HEAD, then origin/main) and\n the merge in progress (its result: the index and the working tree), or one <commit>; a\n squash commit takes --theirs <head of the branch it took in>. Errors: a line one side\n added or both kept missing from the result (whitespace, a line laid out again, a move\n to another file and imports merged into one statement aside), a file neither side\n deleted gone from the result, a row of slices.md done on one side and no longer done or\n gone, a test title or a spec file of one side gone, a migration of one side whose\n description (name without number and working-) the result lacks, a conflict marker;\n warnings: a line one side removed brought back, a line one side wrote where the other\n changed the same lines or deleted the file (the merge chose), a line the merge replaced\n by lines of its own. Derived files, files a tool says it wrote, migrations, lockfiles\n and slices.md are left out of the lines. The base is --base, else the Merge-Base:\n trailer of the merge, else git merge-base; entries of a Lost-Accepted: <file:line>,...\n trailer are listed and never fail, nor what a later commit restored; silent and exit 0\n without a merge, exit 1 on an error; --warn prints the same and exits 0, as the\n pre-push hook of init runs it in this version (a later minor version blocks the push)\n merge-trunk brings the trunk (--trunk, by default origin/HEAD then origin/main, never fetched) into the\n branch as one merge commit computed from the branch's own diff: from the newest commit of\n the branch the trunk holds (--since; else the commit whose patch, derived files,\n migrations, slices.md, plan.md and lockfiles left out, is one commit of the trunk, on this\n branch or a branch it shares commits with; else the base recorded for the worker when its\n lines are on the trunk; else git merge-base). Settles derived files and drizzle-kit meta\n (trunk side), the package.json of a client (trunk side, at the higher of both versions;\n left to you when one is not a semantic version), generated regions of CONTEXT.md and the\n context map (trunk side), conflicts inside generated registries (lines of both sides),\n slices.md row by row (the furthest status), the stored-events lock by key, the lockfile\n (trunk side, installed again when the branch changed package.json); the rest is left in a\n merge in progress git understands, with what each side did (exit 1). Then, or on\n --continue: the drizzle migrations of both sides replayed, on --to-land the working\n migrations renamed (knex, Prisma, TypeORM; stop when both sides change one table), decision\n records renumbered, regenerate, verify-merge on the uncommitted result (an error stops;\n --accept-lost records a Lost-Accepted: trailer), and the commit of the merge's paths only,\n with the trailers Merge-Base:, Trunk: and Landed:; any other changed path blocks it.\n --dry-run previews, --abort undoes; refused (exit 2) on a dirty tree, another operation in\n progress, no committer known to git, an unknown trunk, or a git older than 2.40 with a base\n git would not compute\n --commit-size the files and lines about to be committed against \"commit\" in the config (20 files and\n 600 lines by default, generated files not counted); --staged reads the index only;\n advisory, --strict exits 1 when over\n --explain check follows the violations with the reason of each rule they report, once per rule, as\n explain gives it without its examples (\"explanations\" in JSON); with github and gitlab, each\n annotation carries the reason of its rule, a pull request showing an annotation on its own\n --behaviour docs writes the pages of what the tests state (docs/behaviour/) alone, every other generated\n document left as it is: what the pre-commit hook runs when a spec is staged; with --check,\n those pages alone are compared\n --stored-events docs records the shape of each version of the stored events in stored-events.lock.json,\n never rewriting a recorded one but one recorded by 0.82.0 or earlier, recorded again as\n the kit reads it now: run it once the shape of a version is the one to store; docs --check\n fails while a declared version is not recorded, or recorded by 0.82.0 or earlier\n --sdk init records \"sdk\" in the config and generates the clients with the project\n --local-only generate refuses, and writes nothing, when the kind would write outside its context;\n \"generate --help --json\" says which kinds do\n --module generate writes the files of the layers into that module of the model of the context\n (declared first with generate module), <module>/domain/ to <module>/presentation/, and\n their specs into test/unit/<module>/, finds the files it reads in the module that holds\n them and writes the imports to where they are; required in a context that declares\n modules, what the modules share staying at the level of the context";
|
|
2
|
+
export declare const NOTES = " affected what a pull request has to run: the contexts a change set reaches through the context\n map (a changed context and the contexts downstream of it), as filters for the test\n runner and the linter; everything when a shared path changed or without --base;\n --run <script> runs that script of the project on them (DDD_TS_KIT_AFFECTED set,\n --passWithNoTests on a partial run) and nothing when nothing that runs changed:\n the pre-push hook tests the contexts its branch reaches\n build-aliases after the compiler: rewrites the import aliases left in the emitted .js and .d.ts files\n into relative paths, so that plain node runs the output (tsconfig.build.json by default)\n drizzle-generate the db:generate of a Drizzle project: drizzle-kit generate --name, which without a terminal\n fails and names the fix when drizzle-kit would ask whether a column or table is renamed,\n where drizzle-kit alone writes nothing and exits 0; then formats the snapshot and the\n journal it wrote with the Biome or Prettier of the format script, and warns when the\n SQL changes a primary key in an order that fails on PostgreSQL (exit code unchanged);\n --replay, after merging the trunk into a branch when both added migrations: when the\n history forks from --base <ref> (origin/main by default), deletes the migrations of the\n branch the base does not have, with their snapshots and journal entries, then generates\n each again on top, in order, under its name (working- dropped outside a worker's\n worktree, a custom one keeping its SQL); when it does not fork, only renames them;\n refused while the journal holds conflict markers, when two of them change the schema,\n or when drizzle-kit now writes a generated one otherwise (edited by hand), the folder\n then put back as it was\n error-factories moves the refusals of a project to one class per refusal (--to named, the default), from\n one class per error or from the factories of one error class per concept: --plan writes\n error-factories.plan.json, where each refusal is given a class (the PascalCase of its\n code, which it keeps) and a factory (for<Concept>), both editable; --apply follows it\n (codes.ts per context, one class file per refusal, specs, every usage, the concept\n classes left empty, \"stack.refusals\" in the config) and lists what it cannot rewrite\n (a bare <Concept>Error.is(error), CodeOf<typeof <Concept>Error>); --to factories moves\n one class per error to static factories on one error class per concept instead\n value-objects moves the value objects of a project from a Result to factories that return the value or\n throw: every create returning Result<T, E> returns T, err(..) is thrown, unwrap(..) of\n them goes, specs assert expectRefusal(() => ..), \"stack.valueObjects\" becomes throwing\n platform-folders takes the files of the platform a project generated flat to their folders:\n composition/, observability/ (tracing.ts first), jobs/, auth/authentication/ (who is\n calling), auth/authorization/ (what they may do, whatever the model), the folder of\n the model (auth/roles/, attributes/, relationships/, custom/) and\n audit/search-audit-entries/; every import of them under the source root, test/ and\n scripts/ follows, and the scripts of package.json; a file the kit did not write at\n the root of the platform or of auth/ stays where it is, named, unless --place\n <file>=<folder> (both from the platform) gives it its folder; the generators and\n init --force keep either layout until then\n move-to-module takes files of a context into a module of its model, declared first with generate module,\n each to <module>/<layer>/ and each spec to test/<unit|integration>/<module>/: each <path>\n is a file or a folder of a role or a spec, relative to the context\n (domain/aggregates/waitlist.aggregate.ts, application/commands/join-waitlist,\n infrastructure/persistence/knex-waitlist.repository.ts); the specs named after a moved\n file follow it, every import of them under the source root, test/ and scripts/ follows,\n and the generated declarations are rewritten; what the modules share stays at the level\n of the context: the code list and the permission set at its root, the schema of its\n database, its route groups, guards and shared shapes, its fakes, builders and worlds\n context-layout takes the files of the contexts, or of the ones named, that 0.86 or 0.87 wrote elsewhere to\n their place of today: domain/errors/codes.ts to <context>.codes.ts and\n application/authorization/<context>.permissions.ts to <context>.permissions.ts, at the\n root of the context, and each module of the model from domain/<module>/ and\n application/<module>/ to <module>/domain/ and <module>/application/, with the adapters,\n routes and specs it tells by their imports (a spec by the file it is named after); what\n names no module, or two, is listed and stays; every import of them under the source\n root, test/ and scripts/ follows, what derives from the tree is written again\n (.dependency-cruiser.cjs, the declarations) and knip is told of the code lists where they\n are; the generators keep the code lists and permission sets where they are until then\n controllers moves the function routes of a project, or of one context, to controller classes: each\n <name>.route.ts becomes <resource>/<name>/<name>.controller.ts behind the route group of\n its resource, its schema files and its spec follow; a context is turned whole or not at all\n doctor what an upgrade left to do: the scripts, the packages of the kit (at the ranges of this\n version) and the agent permissions this version writes that the project lacks or writes\n otherwise, and the git hooks (the lefthook: line of lefthook.yml, the pre-commit hook of\n lefthook in this clone); init adds what is missing, hooks:install the hook; then what\n this checkout lacks to run the project, read without network: the running Node against\n engines.node and .nvmrc, node_modules installed since the lockfile last changed, each\n package of the kit installed at the version of this CLI, the submodules initialised;\n last, the overrides init writes under a dependency that pins a package below a\n security fix, missing or no longer needed once it asks for the fix itself;\n each with its fix; --strict exits 1 while something is missing or the checkout cannot\n run the project, never for a hook this clone has not installed, a Node .nvmrc does not\n name, a lockfile changed since the install or an override no longer needed\n lint the ESLint of the project (lint and ci:lint run it): fails on an error, and on a warning\n as on an error, but on one of a rule of the kit in transition, a new rule that becomes an\n error in the version it names, whose warnings are listed apart; --format and --fix as ESLint\n describe one context as facts: use cases, routes, events, ports, policies, gateways, dependencies\n status the next step of docs/architecture/plan.md, the slices of docs/architecture/slices.md by\n status and by owner, each row not done ready on the trunk (its dependencies done), ready\n on a branch (the others briefed to a worker with commits ahead of its base) or waiting\n (with the ids it waits for), a row that landed with a worker's branch but is not marked done,\n and the TODO(domain), TODO(platform), it.todo and TODO(review) left in each context, and\n each story or milestone whose rows are all done while markers of its own keep it open (see\n story-check, whose git blame it runs on those markers only); --workers shows instead each\n worktree holding .ddd-ts-kit/worker.json (branch, context, rows, base, commits ahead and\n files changed counted from where its branch landed on the base when it was squash-merged\n there (else from the merge base), commits behind, the commit it landed as, what merge-trunk\n would leave conflicted now, dependencies not installed, its report), a state line (rows\n committed, the row under way, files uncommitted, markers, last verify-slice, and the\n worker-scope --resume command of a stopped one), then the contexts and the files more than\n one worker holds\n sdk the typed client of each document of the contract, a workspace package under\n clients/<document> without runtime dependency: typed errors keyed by the error codes,\n credentials per security scheme; records \"sdk\" in the config the first time, wires the\n scripts (docs:generate regenerates it, docs:check compares it, ci:build builds it);\n --check writes nothing and exits 1 while a client differs from its contract\n todo those markers as file:line, in the project or in one context\n mutation the mutation score of the domain and application layers of each context, read from the\n json report the last stryker run wrote (reports/mutation/mutation.json, or --report\n <file>), each held to its \"mutation\" floor of the config (80 and 75 by default): detected over detected and\n undetected, the errors left out, as Stryker counts, the ignored mutants (the texts of\n refusals, the code that runs once when the module loads) shown beside, since the\n score says nothing about them; exits 1 while a layer is under its floor, 2 without\n a report. --survivors lists the mutants no test noticed (file:line, mutator, what the\n code became), each a decision: a test named after the rule, or left alive and said so;\n --changed <ref>, or DDD_TS_KIT_MUTATION_SINCE in the environment as the job of a pull\n request sets it, lists those of the files changed since the git ref alone and exits 0\n whatever the scores, a reading for a change in progress. Runs no test: npm run\n test:mutation runs Stryker, then this; the pipeline runs it every night and, with\n the variable set to the merge base of the change, on a pull request\n plan-waves the rows of slices.md not done, of the project or of one context, in waves (wave 1: every\n dependency done; wave n: the others in earlier waves), each wave cut into batches of one\n owner, one or two rows on one aggregate, with the worker-scope command that briefs each,\n the batches of a wave likely to touch the same files (same aggregate in Start with, or\n unknown when it names none), each row a row waits for with its status (and its context\n and story when it is of another story or outside the context shown), the rows of other\n stories the planned rows wait for, not done, in a section of their own, the merge order\n and what runs before each merge (merge-trunk --to-land); a cycle, a dependency on an\n unknown id or a row without owner is reported alone, and exits 1\n story-check whether a story or a milestone can close, <code> being the start of the ids of its rows\n (M1 for M1.01, M1.02: the id without its last .<number>): every row of it done in\n slices.md (the others listed with their status), and no marker of its own left\n (TODO(domain), TODO(platform), it.todo, TODO(review)). A marker is attributed to\n rows: those its text names (#M1.03 or M1.03, word-bounded), else those of the commit\n that wrote its line (git blame, once per file; its Slice: trailer, else the row ids\n its message names), else, not committed, those of .ddd-ts-kit/worker.json in a\n worker's worktree. It is the story's own when it belongs to one of its rows,\n wherever it is; a marker of a context of its rows that belongs to no row is its own\n when no other open story has a row in that context, and is listed without blocking\n otherwise (settle it or name its row in it); a marker of other stories' rows does not\n block. --strict: every marker of its contexts blocks. Each blocker comes with why it\n is its own, its file:line and its fix: handle it, or dismiss it by a decision record\n (generate adr), then delete the marker. A done row also holds to its design: every\n name the ## #<id> section of docs/architecture/reviews/<code>.md cites (a path, a\n PascalCase name, a Class.member, as cited reads them) exists in the tree, or is\n listed under ### Compromises of ## Report in the story file; a name that is neither\n blocks, with its file:line in the review. A commit of the story on the current branch\n (its Slice: trailer, else its message naming a row or the story) that changes a\n migration or a container file (the paths the change-reference hook of the regulated\n profile watches) without a Change: <id> trailer is listed, with its files, and blocks\n under agents.profile regulated or with --strict. Reads only: exits 0 when it can\n close, 1 listing what keeps it open, 2 on a code no row carries or without slices.md\n acceptance the acceptance scenarios of each story (test/acceptance/<story>.acceptance.spec.ts) against\n its rows in slices.md and the criteria of docs/architecture/stories/<story>.md: the rows and\n criteria each scenario names (#US5.02 AC1 in its title), the scenarios left to write\n (it.todo), those wrapped in pending(...) of @ddd-ts-kit/testing/e2e until their code is\n built, and what is inconsistent (no row, an unknown row or criterion, a scenario skipped,\n a pending one whose rows are done, a locked one changed while its criteria were not);\n --gate written: every slice row and criterion has a written scenario, none is left to\n write, the acceptance is locked (before the code of the story); --gate passing: none is\n pending either (before the story closes); exits 1 while a gate is not met, or, without\n one, on an inconsistency. Never runs a test. --lock writes\n test/acceptance/<story>.acceptance.lock.json, the fingerprint of each criterion and of\n each scenario (pending(...), layout and comments aside), refused while a scenario is\n left to write, or while a criterion changed, or a locked scenario changed while its\n criteria did not, without a verdict \"amend\" of the acceptance-judge agent on that very\n version (test/acceptance/verdicts/*.md, lines Story:, Subject:, Fingerprint:,\n Verdict:, Reason:); a refusal wins; the verdicts become amendments of the lock,\n listed for the owner to validate. A fix is a story file with a ## Regression section\n listing the spec files that prove it (- test/unit/<name>.spec.ts): held to the tests of\n those files instead of rows and scenarios, locked and judged the same way, the statement\n of the fix being the criterion\n worker-scope a git worktree on the branch build/<context> (by default .worktrees/<context>, see worktree),\n cut from --base <ref> (by default the current branch, refused from a worker's worktree), its\n .ddd-ts-kit/worker.json, and the briefing of the worker of that context; --rows <id,...>\n briefs those rows of slices.md only, with their rules, the documents of their design and\n the names that design cites the base does not have (see cited), and by default the first\n batch plan-waves cuts for the context (one or two rows on one aggregate), a note naming the\n next; a worktree it creates gets the clean install of the package manager (npm ci), its\n time in the notes, unless --no-install; an existing worktree or branch that does not\n contain the base is refused, with the merge-trunk that brings it in\n --here worker-scope in the worktree of a story (.ddd-ts-kit/story.json): writes the scope of the\n next agent in place, its base the base of the story, and prints its briefing; no\n worktree, branch or install of its own; the agents of a story run one after the other\n story-scope the worktree of one story, .worktrees/<story> on story/<story> cut from --base (by default\n origin/main from the trunk, else the current branch, refused from the worktree of a\n story), its .ddd-ts-kit/story.json ({ story, base, baseCommit, branch, kind, from }) and\n its clean install; an existing one is kept and the story resumes there; refused when the\n story is open in another worktree; names the other open stories and the contexts their\n rows change; --kind story (the default) or fix (a story built behind locked regression\n specs, listed under ## Regression of its file); --from <file> records where the story\n comes from, an intent of docs/architecture/intents/ (refused unless its header says\n Status: accepted) or an incident record of docs/architecture/incidents/, and the Next:\n line says that the story skill seeds the statement from it while the story file does\n not exist\n worktree the worktree of any other piece of work, .worktrees/<name> on work/<name> cut from --base\n (by default origin/main from the trunk, else the current branch), and its clean install\n unless --no-install; an existing one is kept; .worktrees/ lies in the main checkout,\n whichever worktree it runs from, ignored by git and by the tools of the project; while\n the .gitignore of a project started before does not hold it (init adds it), a worktree\n opens next to the project, ../<project>-<name>; in a project whose config says\n \"worktrees\": \"required\" (what init writes), the guard of the plugin refuses the code of\n a context in the main checkout of the trunk, and in a worktree of .worktrees/ without\n its own node_modules\n story where a story stands, phase by phase: its specification and criteria\n (docs/architecture/stories/<story>.md), its rows in slices.md, a design review section\n per row not done (docs/architecture/reviews/<story>.md, ## #<id>), its acceptance written\n and locked, its rows done, its acceptance passing, its trunk merged in, its ## Origin\n (From: and Built with:), its ## Report with ### Verification naming npm run verify; and\n the next step; in the worktree of a story, the story is its own; --gate build exits 1\n until the first four are met (the code may start: the guard of the plugin opens the\n contexts), --gate close until all are\n stories the stories open in the worktrees of the repository and where two of them meet: the\n contexts the rows of both name, the files both worktrees change (committed or not), what\n merging the branch of one into the other leaves to a person and what merge-trunk settles\n (git merge-tree, nothing written); how far each is behind its base; from the worktree of a\n story, the stories it meets; the guard of the plugin says it at session start and on a\n write to a file another story changes\n --resume worker-scope reads where the stopped worker of the context stands (its rows by their\n Slice: trailer, the files of the row under way, the markers, its last verify-slice, its\n report, its agent as the guard recorded it) and prints the message that resumes its agent\n (SendMessage) or the briefing of a new one; creates and rewrites nothing; --fresh asks for\n a new agent whatever the last one did; several worktrees of the context need --worktree\n verify-slice closes a slice before its commit, in one run: the regenerate script, check on the files\n changed since --since (new ones included), the test script for the context; then the\n changed files past 300 of the 350 lines, the paths of the slice to stage (its context, an\n end-to-end spec, a working migration, the derived files git tracks) and every other\n changed path, left out and never to stage with it; the merges since --since, as\n verify-merge checks them, reported without failing the slice in this version (a later\n minor version fails it); exits 1 while a step fails; then the names the slice removes\n that the design of a row not done still cites (never a failure); in the worktree of a\n worker, the commit command with the trailer Slice: <row>, and\n .ddd-ts-kit/verification.json for the conductor\n cited the names the design of rows not done cites as code (paths, classes, Class.member) that\n the code does not have: those the history of --base removed (with the commit and the\n successor), the places the canonical tree refuses, and a name never there whose close\n name of the same part arrived after the line was written; planned names stay silent.\n The design of a row: its cells and rule lines in slices.md, a section of a document of\n docs/architecture whose heading names it, a document that names it or that its rule\n line links to. Default: every row not done, of the context when given, at the current\n branch. --removed-since <ref>: the names a change removes, from the merge base to the\n working tree, that such a design cites. Reads only, exits 0\n verify-merge what the merges of a branch lost, read from git only: every merge commit since --since\n (by default the base of .ddd-ts-kit/worker.json, then origin/HEAD, then origin/main) and\n the merge in progress (its result: the index and the working tree), or one <commit>; a\n squash commit takes --theirs <head of the branch it took in>. Errors: a line one side\n added or both kept missing from the result (whitespace, a line laid out again, a move\n to another file and imports merged into one statement aside), a file neither side\n deleted gone from the result, a row of slices.md done on one side and no longer done or\n gone, a test title or a spec file of one side gone, a migration of one side whose\n description (name without number and working-) the result lacks, a conflict marker;\n warnings: a line one side removed brought back, a line one side wrote where the other\n changed the same lines or deleted the file (the merge chose), a line the merge replaced\n by lines of its own. Derived files, files a tool says it wrote, migrations, lockfiles\n and slices.md are left out of the lines. The base is --base, else the Merge-Base:\n trailer of the merge, else git merge-base; entries of a Lost-Accepted: <file:line>,...\n trailer are listed and never fail, nor what a later commit restored; silent and exit 0\n without a merge, exit 1 on an error; --warn prints the same and exits 0, as the\n pre-push hook of init runs it in this version (a later minor version blocks the push)\n merge-trunk brings the trunk (--trunk, by default origin/HEAD then origin/main, never fetched) into the\n branch as one merge commit computed from the branch's own diff: from the newest commit of\n the branch the trunk holds (--since; else the commit whose patch, derived files,\n migrations, slices.md, plan.md and lockfiles left out, is one commit of the trunk, on this\n branch or a branch it shares commits with; else the base recorded for the worker when its\n lines are on the trunk; else git merge-base). Settles derived files and drizzle-kit meta\n (trunk side), the package.json of a client (trunk side, at the higher of both versions;\n left to you when one is not a semantic version), generated regions of CONTEXT.md and the\n context map (trunk side), conflicts inside generated registries (lines of both sides),\n slices.md row by row (the furthest status), the stored-events lock by key, the lockfile\n (trunk side, installed again when the branch changed package.json); the rest is left in a\n merge in progress git understands, with what each side did (exit 1). Then, or on\n --continue: the drizzle migrations of both sides replayed, on --to-land the working\n migrations renamed (knex, Prisma, TypeORM; stop when both sides change one table), decision\n records renumbered, regenerate, verify-merge on the uncommitted result (an error stops;\n --accept-lost records a Lost-Accepted: trailer), and the commit of the merge's paths only,\n with the trailers Merge-Base:, Trunk: and Landed:; any other changed path blocks it.\n --dry-run previews, --abort undoes; refused (exit 2) on a dirty tree, another operation in\n progress, no committer known to git, an unknown trunk, or a git older than 2.40 with a base\n git would not compute\n --commit-size the files and lines about to be committed against \"commit\" in the config (20 files and\n 600 lines by default, generated files not counted); --staged reads the index only;\n advisory, --strict exits 1 when over\n --explain check follows the violations with the reason of each rule they report, once per rule, as\n explain gives it without its examples (\"explanations\" in JSON); with github and gitlab, each\n annotation carries the reason of its rule, a pull request showing an annotation on its own\n --behaviour docs writes the pages of what the tests state (docs/behaviour/) alone, every other generated\n document left as it is: what the pre-commit hook runs when a spec is staged; with --check,\n those pages alone are compared\n --stored-events docs records the shape of each version of the stored events in stored-events.lock.json,\n never rewriting a recorded one but one recorded by 0.82.0 or earlier, recorded again as\n the kit reads it now: run it once the shape of a version is the one to store; docs --check\n fails while a declared version is not recorded, or recorded by 0.82.0 or earlier\n --sdk init records \"sdk\" in the config and generates the clients with the project\n --local-only generate refuses, and writes nothing, when the kind would write outside its context;\n \"generate --help --json\" says which kinds do\n --module generate writes the files of the layers into that module of the model of the context\n (declared first with generate module), <module>/domain/ to <module>/presentation/, and\n their specs into test/unit/<module>/, finds the files it reads in the module that holds\n them and writes the imports to where they are; required in a context that declares\n modules, what the modules share staying at the level of the context";
|
|
3
3
|
//# sourceMappingURL=notes.d.ts.map
|
package/dist/help/notes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notes.d.ts","sourceRoot":"","sources":["../../src/help/notes.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"notes.d.ts","sourceRoot":"","sources":["../../src/help/notes.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,eAAO,MAAM,KAAK,416BAmSqE,CAAC"}
|