ddd-ts-kit 0.105.0 → 0.106.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 +60 -0
- package/README.fr.md +22 -13
- package/README.md +20 -12
- package/dist/check/baseline/renamed-files.d.ts.map +1 -1
- package/dist/check/baseline/renamed-files.js +2 -1
- package/dist/check/baseline/renamed-files.js.map +1 -1
- package/dist/check/commands/changed-files.d.ts.map +1 -1
- package/dist/check/commands/changed-files.js +2 -1
- package/dist/check/commands/changed-files.js.map +1 -1
- package/dist/check/project/git-ignored.d.ts.map +1 -1
- package/dist/check/project/git-ignored.js +2 -1
- package/dist/check/project/git-ignored.js.map +1 -1
- package/dist/check/rules/authz-declared.d.ts.map +1 -1
- package/dist/check/rules/authz-declared.js +2 -1
- package/dist/check/rules/authz-declared.js.map +1 -1
- package/dist/commit/git-arguments.d.ts +9 -0
- package/dist/commit/git-arguments.d.ts.map +1 -0
- package/dist/commit/git-arguments.js +46 -0
- package/dist/commit/git-arguments.js.map +1 -0
- package/dist/commit/run-git.d.ts.map +1 -1
- package/dist/commit/run-git.js +2 -1
- package/dist/commit/run-git.js.map +1 -1
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +1 -0
- package/dist/config/index.js.map +1 -1
- package/dist/config/kit-container.d.ts +6 -0
- package/dist/config/kit-container.d.ts.map +1 -0
- package/dist/config/kit-container.js +10 -0
- package/dist/config/kit-container.js.map +1 -0
- package/dist/config/stack.d.ts +1 -1
- package/dist/config/stack.d.ts.map +1 -1
- package/dist/config/stack.js +1 -1
- package/dist/config/stack.js.map +1 -1
- package/dist/doctor/format-diagnosis.js +3 -0
- package/dist/doctor/format-diagnosis.js.map +1 -1
- package/dist/doctor/hook-findings.d.ts +2 -1
- package/dist/doctor/hook-findings.d.ts.map +1 -1
- package/dist/doctor/hook-findings.js +10 -2
- package/dist/doctor/hook-findings.js.map +1 -1
- package/dist/doctor/permission-findings.js +1 -0
- package/dist/doctor/permission-findings.js.map +1 -1
- package/dist/generate/di-entry.d.ts +4 -0
- package/dist/generate/di-entry.d.ts.map +1 -0
- package/dist/generate/di-entry.js +5 -0
- package/dist/generate/di-entry.js.map +1 -0
- package/dist/generate/di-imports.d.ts +4 -0
- package/dist/generate/di-imports.d.ts.map +1 -0
- package/dist/generate/di-imports.js +12 -0
- package/dist/generate/di-imports.js.map +1 -0
- package/dist/generate/kinds/adapter-kind.d.ts.map +1 -1
- package/dist/generate/kinds/adapter-kind.js +3 -2
- package/dist/generate/kinds/adapter-kind.js.map +1 -1
- package/dist/generate/kinds/background/spec-family.d.ts +1 -1
- package/dist/generate/kinds/background/spec-family.d.ts.map +1 -1
- package/dist/generate/kinds/background/spec-family.js +2 -1
- package/dist/generate/kinds/background/spec-family.js.map +1 -1
- package/dist/generate/kinds/command-outputs.d.ts.map +1 -1
- package/dist/generate/kinds/command-outputs.js +2 -1
- package/dist/generate/kinds/command-outputs.js.map +1 -1
- package/dist/generate/kinds/extraction/service-selection.d.ts.map +1 -1
- package/dist/generate/kinds/extraction/service-selection.js +2 -1
- package/dist/generate/kinds/extraction/service-selection.js.map +1 -1
- package/dist/generate/kinds/gateway-kind.js +1 -1
- package/dist/generate/kinds/gateway-kind.js.map +1 -1
- package/dist/generate/kinds/import-assembler.d.ts.map +1 -1
- package/dist/generate/kinds/import-assembler.js +11 -2
- package/dist/generate/kinds/import-assembler.js.map +1 -1
- package/dist/generate/kinds/job/grant-system-actor.d.ts.map +1 -1
- package/dist/generate/kinds/job/grant-system-actor.js +8 -4
- package/dist/generate/kinds/job/grant-system-actor.js.map +1 -1
- package/dist/generate/kinds/job-kind.d.ts.map +1 -1
- package/dist/generate/kinds/job-kind.js +2 -1
- package/dist/generate/kinds/job-kind.js.map +1 -1
- package/dist/generate/kinds/personal-data/declare-personal-data.js +1 -1
- package/dist/generate/kinds/personal-data/declare-personal-data.js.map +1 -1
- package/dist/generate/kinds/query-outputs.d.ts.map +1 -1
- package/dist/generate/kinds/query-outputs.js +2 -1
- package/dist/generate/kinds/query-outputs.js.map +1 -1
- package/dist/generate/kinds/test-world-kind.d.ts.map +1 -1
- package/dist/generate/kinds/test-world-kind.js +3 -2
- package/dist/generate/kinds/test-world-kind.js.map +1 -1
- package/dist/generate/kinds/world/context-fakes.d.ts.map +1 -1
- package/dist/generate/kinds/world/context-fakes.js +2 -1
- package/dist/generate/kinds/world/context-fakes.js.map +1 -1
- package/dist/generate/kinds/world/world-arrangement.d.ts.map +1 -1
- package/dist/generate/kinds/world/world-arrangement.js +2 -1
- package/dist/generate/kinds/world/world-arrangement.js.map +1 -1
- package/dist/generate/kinds/world/world-vars.d.ts.map +1 -1
- package/dist/generate/kinds/world/world-vars.js +2 -1
- package/dist/generate/kinds/world/world-vars.js.map +1 -1
- package/dist/generate/spec-vars.d.ts.map +1 -1
- package/dist/generate/spec-vars.js +2 -1
- package/dist/generate/spec-vars.js.map +1 -1
- package/dist/generate/wiring-family.d.ts +1 -1
- package/dist/generate/wiring-family.d.ts.map +1 -1
- package/dist/generate/wiring-family.js +2 -1
- package/dist/generate/wiring-family.js.map +1 -1
- package/dist/generate/wirings.js +2 -2
- package/dist/generate/wirings.js.map +1 -1
- package/dist/help/usage.js +1 -1
- package/dist/init/add-presets.d.ts +8 -0
- package/dist/init/add-presets.d.ts.map +1 -0
- package/dist/init/add-presets.js +17 -0
- package/dist/init/add-presets.js.map +1 -0
- package/dist/init/agent-permissions.js +2 -0
- package/dist/init/agent-permissions.js.map +1 -1
- package/dist/init/files/audit-files.js +1 -1
- package/dist/init/files/audit-files.js.map +1 -1
- package/dist/init/files/auth-files.js +2 -2
- package/dist/init/files/auth-files.js.map +1 -1
- package/dist/init/files/event-sourcing-files.js +1 -1
- package/dist/init/files/event-sourcing-files.js.map +1 -1
- package/dist/init/files/family-of.d.ts +1 -1
- package/dist/init/files/family-of.d.ts.map +1 -1
- package/dist/init/files/family-of.js +2 -1
- package/dist/init/files/family-of.js.map +1 -1
- package/dist/init/files/persistence-files.d.ts.map +1 -1
- package/dist/init/files/persistence-files.js +2 -1
- package/dist/init/files/persistence-files.js.map +1 -1
- package/dist/init/files/platform-files.js +2 -2
- package/dist/init/files/platform-files.js.map +1 -1
- package/dist/init/files/privacy-files.js +1 -1
- package/dist/init/files/privacy-files.js.map +1 -1
- package/dist/init/manifest/dependencies-against-stack.d.ts.map +1 -1
- package/dist/init/manifest/dependencies-against-stack.js +5 -1
- package/dist/init/manifest/dependencies-against-stack.js.map +1 -1
- package/dist/init/manifest/dependencies-for.d.ts.map +1 -1
- package/dist/init/manifest/dependencies-for.js +4 -0
- package/dist/init/manifest/dependencies-for.js.map +1 -1
- package/dist/init/manifest/versions.d.ts.map +1 -1
- package/dist/init/manifest/versions.js +28 -24
- package/dist/init/manifest/versions.js.map +1 -1
- package/dist/init/manifest/write-manifest.js +1 -1
- package/dist/init/manifest/write-manifest.js.map +1 -1
- package/dist/init/regulated-sandbox.d.ts +5 -3
- package/dist/init/regulated-sandbox.d.ts.map +1 -1
- package/dist/init/regulated-sandbox.js +6 -3
- package/dist/init/regulated-sandbox.js.map +1 -1
- package/dist/init/rewire-personal-data.js +1 -1
- package/dist/init/rewire-personal-data.js.map +1 -1
- package/dist/init/rewire-preset.d.ts +1 -1
- package/dist/init/rewire-preset.d.ts.map +1 -1
- package/dist/init/rewire-preset.js +5 -2
- package/dist/init/rewire-preset.js.map +1 -1
- package/dist/init/run-init.js +1 -5
- package/dist/init/run-init.js.map +1 -1
- package/dist/init/stack/resolve-stack.js +1 -1
- package/dist/init/stack/resolve-stack.js.map +1 -1
- package/dist/init/stack/resolve-style.d.ts +1 -1
- package/dist/init/stack/resolve-style.js +4 -4
- package/dist/init/stack/resolve-style.js.map +1 -1
- package/dist/init/validation-dependencies.d.ts.map +1 -1
- package/dist/init/validation-dependencies.js +3 -1
- package/dist/init/validation-dependencies.js.map +1 -1
- package/dist/layout/fit-statement.js +16 -2
- package/dist/layout/fit-statement.js.map +1 -1
- package/dist/merge/git-process.d.ts.map +1 -1
- package/dist/merge/git-process.js +2 -1
- package/dist/merge/git-process.js.map +1 -1
- package/dist/merge/lost/revision-files.d.ts.map +1 -1
- package/dist/merge/lost/revision-files.js +6 -1
- package/dist/merge/lost/revision-files.js.map +1 -1
- package/dist/merge/lost/side-hunks.d.ts.map +1 -1
- package/dist/merge/lost/side-hunks.js +2 -1
- package/dist/merge/lost/side-hunks.js.map +1 -1
- package/dist/merge/object-bytes.d.ts.map +1 -1
- package/dist/merge/object-bytes.js +2 -1
- package/dist/merge/object-bytes.js.map +1 -1
- package/dist/package-manager/package-manager-vars.d.ts +1 -1
- package/dist/package-manager/package-manager-vars.js +2 -2
- package/dist/package-manager/package-manager-vars.js.map +1 -1
- package/dist/package-manager/pinned-package-managers.d.ts +2 -2
- package/dist/package-manager/pinned-package-managers.js +2 -2
- package/dist/plan/copy-of-project.d.ts.map +1 -1
- package/dist/plan/copy-of-project.js +2 -1
- package/dist/plan/copy-of-project.js.map +1 -1
- package/dist/presets/apply-preset.d.ts.map +1 -1
- package/dist/presets/apply-preset.js +2 -0
- package/dist/presets/apply-preset.js.map +1 -1
- package/dist/presets/identity-refusal.d.ts.map +1 -1
- package/dist/presets/identity-refusal.js +4 -3
- package/dist/presets/identity-refusal.js.map +1 -1
- package/dist/presets/organisations-as-audit-chains.d.ts +10 -0
- package/dist/presets/organisations-as-audit-chains.d.ts.map +1 -0
- package/dist/presets/organisations-as-audit-chains.js +30 -0
- package/dist/presets/organisations-as-audit-chains.js.map +1 -0
- package/dist/stack/stack-vars.d.ts.map +1 -1
- package/dist/stack/stack-vars.js +7 -2
- package/dist/stack/stack-vars.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +8 -5
- package/templates/architecture/{extractable.tsyringe.spec.ts.tpl → extractable.container.spec.ts.tpl} +2 -1
- package/templates/architecture/extractable.declared.spec.ts.tpl +2 -1
- package/templates/controller/guard.spec.ts.tpl +20 -15
- package/templates/controller/guard.ts.tpl +3 -5
- package/templates/init/README.md.tpl +8 -6
- package/templates/init/docker/Dockerfile.tpl +7 -7
- package/templates/init/docker/env.example.tpl +2 -0
- package/templates/init/e2e/start-application.database.ts.tpl +5 -5
- package/templates/init/e2e/start-application.memory.ts.tpl +5 -5
- package/templates/init/main.ts.tpl +1 -0
- package/templates/init/platform/composition/{compose-application.tsyringe.ts.tpl → compose-application.container.ts.tpl} +4 -7
- package/templates/init/platform/composition/compose-application.manual.ts.tpl +2 -0
- package/templates/init/platform/events/start-outbox-relay.ts.tpl +5 -1
- package/templates/init/platform/observability/create-logger.stdout.ts.tpl +2 -2
- package/templates/init/platform/observability/create-metrics.ts.tpl +6 -3
- package/templates/init/platform/resilience/adapters-with-own-policy.ts.tpl +1 -1
- package/templates/init/platform/resilience/default-policy.ts.tpl +1 -1
- package/templates/init/rules/platform.md.tpl +3 -3
- package/templates/init/rules/tests.md.tpl +2 -2
- package/templates/pipeline/biome.json.tpl +1 -1
- package/templates/pipeline/github/actions/setup/action.yml.tpl +3 -2
- package/templates/pipeline/gitlab/gitlab-ci.yml.tpl +2 -2
- package/templates/pipeline/package-scripts.json +2 -2
- package/templates/presets/identity/context/application/commands/deactivate-account/deactivate-account.handler.ts.tpl +6 -4
- package/templates/presets/identity/context/test/integration/organisation-tenant-directory.spec.ts.tpl +7 -6
- package/templates/presets/identity/context/test/worlds/__context__.world.declared.ts.tpl +2 -1
- package/templates/presets/identity/design.md.tpl +4 -2
- package/templates/presets/identity/e2e/support.wiring.tpl +4 -4
- package/templates/presets/identity/platform/organisation-of-command.ts.tpl +36 -0
- package/templates/repository/knex/mapper.ts.tpl +1 -1
- package/templates/service/main.ts.tpl +1 -0
- /package/templates/adapter/{simulated.wiring.tsyringe.tpl → simulated.wiring.container.tpl} +0 -0
- /package/templates/adapter/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/architecture/{hosting.tsyringe.spec.ts.tpl → hosting.container.spec.ts.tpl} +0 -0
- /package/templates/architecture/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/background-job/{background-job.spec.tsyringe.ts.tpl → background-job.spec.container.ts.tpl} +0 -0
- /package/templates/background-job/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/command/{handler.spec.tsyringe.ts.tpl → handler.spec.container.ts.tpl} +0 -0
- /package/templates/command/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/context/{module.tsyringe.ts.tpl → module.container.ts.tpl} +0 -0
- /package/templates/context/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/controller/{routes.tsyringe.tpl → routes.container.tpl} +0 -0
- /package/templates/erasure-handler/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/event-handler/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/file-upload/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/gateway/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/init/platform/audit/{audit.module.tsyringe.ts.tpl → audit.module.container.ts.tpl} +0 -0
- /package/templates/init/platform/auth/authorization/{authorization.tsyringe.ts.tpl → authorization.container.ts.tpl} +0 -0
- /package/templates/init/platform/buses/{create-command-bus.tsyringe.ts.tpl → create-command-bus.container.ts.tpl} +0 -0
- /package/templates/init/platform/buses/{create-query-bus.tsyringe.ts.tpl → create-query-bus.container.ts.tpl} +0 -0
- /package/templates/init/platform/composition/{context-selection.tsyringe.ts.tpl → context-selection.container.ts.tpl} +0 -0
- /package/templates/init/platform/composition/{lay-foundations.tsyringe.ts.tpl → lay-foundations.container.ts.tpl} +0 -0
- /package/templates/init/platform/composition/{platform-test.module.tsyringe.ts.tpl → platform-test.module.container.ts.tpl} +0 -0
- /package/templates/init/platform/composition/{platform.module.tsyringe.ts.tpl → platform.module.container.ts.tpl} +0 -0
- /package/templates/init/platform/composition/{routes-of.tsyringe.ts.tpl → routes-of.container.ts.tpl} +0 -0
- /package/templates/init/platform/files/{bind-files.tsyringe.ts.tpl → bind-files.container.ts.tpl} +0 -0
- /package/templates/init/platform/files/{files.module.tsyringe.ts.tpl → files.module.container.ts.tpl} +0 -0
- /package/templates/init/platform/files/{staging-uploads.tsyringe.ts.tpl → staging-uploads.container.ts.tpl} +0 -0
- /package/templates/init/platform/jobs/{housekeeping.module.tsyringe.ts.tpl → housekeeping.module.container.ts.tpl} +0 -0
- /package/templates/init/platform/privacy/{data-subject-copies.tsyringe.ts.tpl → data-subject-copies.container.ts.tpl} +0 -0
- /package/templates/init/platform/privacy/{data-subject-exports.tsyringe.ts.tpl → data-subject-exports.container.ts.tpl} +0 -0
- /package/templates/init/platform/privacy/{privacy.module.tsyringe.ts.tpl → privacy.module.container.ts.tpl} +0 -0
- /package/templates/init/platform/privacy/{run-erasure.tsyringe.ts.tpl → run-erasure.container.ts.tpl} +0 -0
- /package/templates/init/platform/privacy/{run-export.tsyringe.ts.tpl → run-export.container.ts.tpl} +0 -0
- /package/templates/init/platform/privacy/{run-purge.tsyringe.ts.tpl → run-purge.container.ts.tpl} +0 -0
- /package/templates/init/scripts/{privacy-erase.tsyringe.ts.tpl → privacy-erase.container.ts.tpl} +0 -0
- /package/templates/init/scripts/{privacy-export.tsyringe.ts.tpl → privacy-export.container.ts.tpl} +0 -0
- /package/templates/init/scripts/{privacy-purge.tsyringe.ts.tpl → privacy-purge.container.ts.tpl} +0 -0
- /package/templates/integration-event/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/integration-handler/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/job/{job.spec.tsyringe.ts.tpl → job.spec.container.ts.tpl} +0 -0
- /package/templates/job/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/module/{module-file.tsyringe.ts.tpl → module-file.container.ts.tpl} +0 -0
- /package/templates/module/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/personal-data/{copies.tsyringe.tpl → copies.container.tpl} +0 -0
- /package/templates/personal-data/{exports.tsyringe.tpl → exports.container.tpl} +0 -0
- /package/templates/personal-data/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/process/{timeout-job.spec.tsyringe.ts.tpl → timeout-job.spec.container.ts.tpl} +0 -0
- /package/templates/process/{timeout-job.wiring.tsyringe.tpl → timeout-job.wiring.container.tpl} +0 -0
- /package/templates/projection/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/query/{handler.spec.tsyringe.ts.tpl → handler.spec.container.ts.tpl} +0 -0
- /package/templates/query/{search.handler.spec.tsyringe.ts.tpl → search.handler.spec.container.ts.tpl} +0 -0
- /package/templates/query/{search.wiring.tsyringe.tpl → search.wiring.container.tpl} +0 -0
- /package/templates/query/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/repository/{event-sourced.wiring.tsyringe.tpl → event-sourced.wiring.container.tpl} +0 -0
- /package/templates/repository/{wiring.tsyringe.tpl → wiring.container.tpl} +0 -0
- /package/templates/route/{routes.on-tsyringe.tpl → routes.on-container.tpl} +0 -0
- /package/templates/service/{extracted.tsyringe.tpl → extracted.container.tpl} +0 -0
- /package/templates/test-world/{world.tsyringe.ts.tpl → world.container.ts.tpl} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,66 @@ 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.106.0
|
|
8
|
+
|
|
9
|
+
**Every published package says the Node it needs: `engines.node` is `>=22.12.0` in each manifest.** `ddd-ts-kit` and the runtime packages carried no `engines` field; only `@ddd-ts-kit/eslint-plugin` did. `npm install` under an older Node now warns (`EBADENGINE`) instead of failing later on a syntax the runtime lacks, and the Node badge of the README reads the range from the published `ddd-ts-kit` instead of `unknown`.
|
|
10
|
+
|
|
11
|
+
**A guard the kit generates refuses everybody until it is written, and a project is green right after `generate guard`.** The stub of `generate guard` read `if (actor.id !== '')` before its refusal: a branch no caller takes, since the anonymous actor has the id `anonymous`, and one the generated spec did not run, so `test:coverage` failed on the 70 percent branch floor of the presentation layer with every test green. The stub now holds one line, `throw new ForbiddenError(...)`, closed by default as the fail-safe default asks, and its spec holds the one test that is true of it, a caller refused with 403, with the `it.todo` for the caller the guard is written for. The TODO of the stub says what to read from the request (`actor`, `params`) and the TODO of the spec says to hold one test per decision of the guard.
|
|
12
|
+
|
|
13
|
+
A guard already generated keeps its stub and its spec.
|
|
14
|
+
|
|
15
|
+
**A generated project and the CI of the kit install pnpm by npm, at the release `package.json` pins; nothing asks corepack any more, since Node 25 ships none.** The `Dockerfile` (both stages), the setup action of GitHub and the `before_script` of GitLab run `npm install --global "$(node -p "require('./package.json').packageManager")"`, one source for the release. The template variable `pm.corepack` is now `pm.pinned`. pnpm 12 reads the `packageManager` field and, when the running release differs, downloads and runs the pinned one (`pmOnFail: download`), so a pnpm installed once follows what each project pins. The workflows and the GitLab pipeline of the kit install `pnpm@12.11.2`, the release `init` writes, and a spec holds the three equal to it.
|
|
16
|
+
|
|
17
|
+
To move: in a project already generated (`init --force` leaves the files it wrote once), replace `corepack enable` by `npm install --global "$(node -p "require('./package.json').packageManager")"` in the `Dockerfile` (two stages), `.github/actions/setup/action.yml` and `.gitlab-ci.yml`. On a developer machine, run `npm install --global pnpm` once.
|
|
18
|
+
|
|
19
|
+
**The dependency injection page compares InversifyJS and Awilix with the three ways the kit wires, measured.** [Dependency injection](docs/tools/dependency-injection.md) now says why these two, sets them against tsyringe with `@ddd-ts-kit/di`, NestJS and manual wiring on one grid, gives when each of six wiring mistakes is found per container and what each costs in start time, memory, bundle and resolve, and recommends by need of the project and by affinity of the team. The kit generates nothing for either: a project that insists on one runs on `--di manual`, and the page gives the wiring, tried on a generated project, with its trap: `generate` keeps writing `new` beside the container, and nothing reports it. The `wiring` skill says so too.
|
|
20
|
+
|
|
21
|
+
**`@ddd-ts-kit/di` runs on tsyringe, InversifyJS or Awilix: `createApplication` and `createTestApplication` move to an entry point per container.** `@ddd-ts-kit/di/tsyringe`, `@ddd-ts-kit/di/inversify` and `@ddd-ts-kit/di/awilix` each export both functions, and `application.container` is typed as the container underneath. Every check of the graph, the buses and the lifecycle stay the kit's own, the same on the three: the whole suite of the package runs on each. tsyringe, `reflect-metadata`, `inversify` and `awilix` are optional peers, so a project installs the one it uses; the main entry point imports none of them. `createApplicationOn(container, options)` and `createTestApplicationOn(container, options)`, with the `Container` interface, wire the kit on another container. A promise bound to a port is refused by InversifyJS at its first resolution, since its `get` is synchronous; tsyringe and Awilix hand it over.
|
|
22
|
+
|
|
23
|
+
To move: import `createApplication` and `createTestApplication` from `@ddd-ts-kit/di/tsyringe` instead of `@ddd-ts-kit/di`.
|
|
24
|
+
|
|
25
|
+
**`ddd-ts-kit doctor` outside a git repository no longer claims the git hooks are in place.** It reports `hook git repository` as missing ("no git repository here: the hooks could not be read; `git init` comes first"), with the fix `git init` then `hooks:install`, and `--strict` exits 1; the summary line that names the hooks is printed only when they could be read.
|
|
26
|
+
|
|
27
|
+
To move: run `git init` before `hooks:install` in a project that has no repository yet.
|
|
28
|
+
|
|
29
|
+
**`@ddd-ts-kit/knex` exports `jsonColumn(value)`, so a list or a string in a `jsonb` column round-trips on Knex as on Drizzle, Prisma and TypeORM.** `pg` wrote a JavaScript array as a PostgreSQL array literal and a string as it is, so the mapper line that worked with an object failed with `22P02` at the first list. `jsonColumn` answers the JSON text of any value (`null` for an absent one). The generated Knex mapper names it in its TODO, and the repository contract of `@ddd-ts-kit/testing` gains an optional `createAggregateKeepingJson` that runs a case writing an object, a list and a string in a JSON column; the four ORM packages run it.
|
|
30
|
+
|
|
31
|
+
To move: a Knex mapper that writes `JSON.stringify(value)` by hand keeps working; use `jsonColumn(value)` instead. A project that runs the repository contract may give it `createAggregateKeepingJson`.
|
|
32
|
+
|
|
33
|
+
**`--di inversify` and `--di awilix`: a project runs on InversifyJS or Awilix with everything the kit gives on tsyringe.** The declared and explicit styles, the generators, the presets and the checks of `createApplication` are the same on the three, and the code of the project too: only the import of `createApplication` and `createTestApplication` and the dependencies change, so `bind()` and `register()` appear nowhere. A team that wants to write their API runs on `--di manual`: [Dependency injection](docs/tools/dependency-injection.md) gives both paths, what each costs and which to take.
|
|
34
|
+
|
|
35
|
+
**`init --force` with the flags of the first init leaves a preset's context as the team has it.** Running `init` again with `--force` and the same `--preset identity` wrote the preset a second time over its own files: the publishers of the identity context came back as the bare stubs of `generate` (the mapping of their payload and the tenant of the fact gone), and `CONTEXT.md` and `docs/behaviour/*` followed. A preset is now applied once: when its context is already written, `--preset` writes nothing of it and a note says "the identity preset is already applied: its context is yours, `--force` rewrote the platform only", so the command line of the first init plus `--force` leaves the same project as `--force` alone.
|
|
36
|
+
|
|
37
|
+
**A generated project measures on OpenTelemetry: `use_case_*`, `dependency_call_*` and the depth of the outbox and of the job queues leave by OTLP with the spans.** `@ddd-ts-kit/tracing` adds `openTelemetryMetrics({ meterName?, meterVersion? })`, the kernel `Metrics` port on the OpenTelemetry metrics API (a counter, a histogram and a synchronous gauge per name, the labels as attributes, an undefined label left out). `initTracing` registers a periodic OTLP/HTTP metric reader when `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT` or `OTEL_EXPORTER_OTLP_ENDPOINT` is set, every `metricsExportIntervalMillis` (else `OTEL_METRIC_EXPORT_INTERVAL`, else 60 seconds), and none without them, where the SDK used to export metrics to `localhost:4318` by default; `OTEL_METRICS_EXPORTER=none` keeps the metrics in the process while the spans still leave, and a value other than `otlp` is read as `none`; `@opentelemetry/sdk-metrics` and `@opentelemetry/exporter-metrics-otlp-http` join its optional peers. `OutboxRelay` of `@ddd-ts-kit/events` takes `metrics` and sets `outbox_pending`, `outbox_failed` and `outbox_dead` from `store.stats()` after each tick; `QueueWorker` of `@ddd-ts-kit/scheduling`, given `metrics`, sets `jobs_waiting`, `jobs_running` and `jobs_dead` per `queue` from `store.stats(queue)`, at most once per poll interval. A generated `create-metrics.ts` answers `openTelemetryMetrics()` under the name of the project instead of `NoopMetrics` and its `TODO(platform)`, the composed application exposes `metrics`, and `main.ts` and a context run alone hand them to `startOutboxRelay`. See `packages/tracing/README.md` and `docs/guides/deploy-and-rollback.md`.
|
|
38
|
+
|
|
39
|
+
To move: in `src/platform/observability/create-metrics.ts`, return `openTelemetryMetrics({ meterName: '<project>' })` imported from `@ddd-ts-kit/tracing`; add `readonly metrics: Metrics` to `Application` in `src/platform/composition/compose-application.ts` (`metrics,` from the platform when wired by hand, `metrics: container.resolve(Metrics),` on tsyringe); give `src/platform/events/start-outbox-relay.ts` a `metrics?: Metrics` option passed to `new OutboxRelay({ ..., metrics })`, and pass `metrics: application.metrics` where `main.ts` (and each `src/apps/<context>/main.ts`) starts the relay; add `@opentelemetry/sdk-metrics` `^3.0.0` and `@opentelemetry/exporter-metrics-otlp-http` `^0.300.0` to the dependencies. A project whose `OTEL_EXPORTER_OTLP_ENDPOINT` is Jaeger alone sends the metrics where nothing keeps them: `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT` points them at a store that takes OTLP metrics.
|
|
40
|
+
|
|
41
|
+
**The hooks of the plugin hold their branch floor whatever the load of the runner.** A defensive branch of the guard was reached only when a command without a word (a redirection alone) was judged after a worker left changes outside its scope, and only when `git status` had answered within the time the guard gives it: on a loaded runner the floor read 99.91 percent of the branches of `guard.mjs` with every test green (#723, three times). `isProgramPath` now reads the first word of a command as text, an absent word being no path: the same decision, one branch fewer, and the floor no longer depends on the clock. The job names the branches a run did not take since #729.
|
|
42
|
+
|
|
43
|
+
**The ABAC rule `generate job` writes permits the system actor of the job, not any actor whose id reads like it.** Under `--authz abac` the rule of the `system-grants` region was `({ actor }) => actor.id === 'system:<job>'`, so a user whose token carried the subject `system:<job>` held the permission of the command of the job through any route on that command. The rule is now `({ actor }) => isSystem(actor) && actor.id === 'system:<job>'`, and `generate job` adds `import { isSystem } from '@ddd-ts-kit/kernel';` to `platform/auth/attributes/attribute-policies.ts` once, however many jobs it grants. The grants under `--authz rbac` and `--authz rebac` already read a system actor.
|
|
44
|
+
|
|
45
|
+
To move: in `src/platform/auth/attributes/attribute-policies.ts` of a project on `--authz abac`, write `isSystem(actor) && ` before `actor.id === 'system:` in each rule of the `system-grants` region, and import `isSystem` from `@ddd-ts-kit/kernel`.
|
|
46
|
+
|
|
47
|
+
**Every git that `ddd-ts-kit` runs ignores a `core.fsmonitor` planted in the repository, and a read runs no hook of the project.** One helper of the CLI builds the arguments of each git it starts: always `-c core.fsmonitor=false --no-optional-locks`, so that a command written in `.git/config` never runs and a read does not refresh the index (which starts the `post-index-change` hook); and, for a run that changes nothing (`status`, `diff`, `ls-files`, `cat-file`, `rev-parse`, `log`, `show`, `merge-base` and the other reads), `-c core.hooksPath=/dev/null`. `commit`, `merge` and the other writes keep the hooks of the project, which are its gates. A spec of the CLI holds that no git is started any other way. The guard of the plugin already ran its own git this way.
|
|
48
|
+
|
|
49
|
+
**`@ddd-ts-kit/sentry` never sends the values a failed statement quotes: the statement reaches the tracker, its values read `[redacted]`.** Drizzle, the default ORM, writes the parameters of a failed statement after `params:` in its message, so an email or a password hash reached the tracker on any database failure. Whatever `scrubMessages` says, `scrubEvent` now redacts, in every exception of the event, its message and what an integration copied of the error (`extra`, contexts): the parameters of a `DrizzleQueryError` (`\nparams: [redacted]`), the key of a violated unique or foreign key constraint (`Key (email)=([redacted]) already exists.`, in a message or the `detail` of pg and TypeORM), the row a not-null or a check constraint refused (`Failing row contains ([redacted]).`), a value PostgreSQL could not read (`invalid input syntax for type integer: "[redacted]"`), the arguments Prisma renders of a call it refused, and a field named `parameters`, `params` or `bindings`. The statement stays, placeholders included. `scrubMessages` keeps its default `false`; `SENTRY_SCRUB_MESSAGES=true` still drops the whole message of an error that is not a `DomainError`, for a tracker hosted by a third party.
|
|
50
|
+
|
|
51
|
+
**The guard of the plugin asks before an edit that changes the `scripts` of `package.json`, and only then.** The scripts are what the gates and the pipeline run (`ci:lint`, `ci:audit`, `ci:arch:check`), and nothing stopped an edit of one. Before a write of the `package.json` of the project, the guard now rebuilds the text the call leaves in the file (the content of a Write or of a Copilot create; an Edit, a `replace_all`, the `edits` of a MultiEdit or the `old_str`/`new_str` of Copilot applied to the current file), compares its `scripts` block with the current one, and asks, naming each script added, removed or changed. A change of the dependencies, the version or any other field passes as before. A text that is not a JSON object, or a patch of Codex, whose result the guard does not rebuild, is asked too. The permissions `init` writes keep no rule on `package.json`, which a rule could not scope to its scripts.
|
|
52
|
+
|
|
53
|
+
**With the identity preset, tenants and an audit trail, a command that succeeded on an organisation is audited in the chain of that organisation.** `auditMiddleware` of `@ddd-ts-kit/audit` takes `tenantOf(message)`: the entry of a message that succeeded is written with the tenant it names, in its chain, its `actor.tenantId` still the one of the token; a failure, and the decision of `auditDecisions`, stay in the tenant of the work, so a caller who names a tenant it cannot act in never writes to its chain nor opens one. The preset writes `platform/audit/organisation-of-command.ts`, which names the organisation of `OpenOrganisationCommand` (its slug) and of the six commands that carry `organisationId`, and gives it to the audit middleware of the commands in `platform/audit/create-audit.ts`, which `init --force` wires again after rewriting that file, keeping `organisation-of-command.ts` as the team left it: the owner of an organisation reads who opened it, invited, removed, changed a role or lent a right in it, whatever organisation the token of that person named. Accepting or declining an invitation names its token only and stays in the tenant of the token; the organisation joined reads `identity.member.joined` in its own chain, as before.
|
|
54
|
+
|
|
55
|
+
To move: in a project generated with the identity preset and tenants, write `src/platform/audit/organisation-of-command.ts` as `init --preset identity` now writes it, import it in `src/platform/audit/create-audit.ts` and add `tenantOf: organisationOfCommand` to the options of `auditMiddleware` of `commands`.
|
|
56
|
+
|
|
57
|
+
**The identity preset says what a deactivated account can still do, and for how long.** The comment of `DeactivateAccountHandler`, the design of the identity context (its `CONTEXT.md`) and the guide [Bootstrap with well-designed contexts](docs/guides/bootstrap-with-well-designed-contexts.md) said that a deactivated account holds no right anywhere. The identity context refuses it at once; the other contexts read the token, so they refuse it at its next token, and a token already issued lives until it expires (300 s in the Keycloak realm the kit writes). They now say so, and that a project that wants no window checks the account at the edge.
|
|
58
|
+
|
|
59
|
+
A project already generated keeps the old comment and design text.
|
|
60
|
+
|
|
61
|
+
**The three loggers of the kit redact the same credential keys, whatever their case: `StdoutLogger`, the default of a generated project, now redacts too.** `CREDENTIAL_KEYS` of `@ddd-ts-kit/kernel` gains `clientSecret`, `client-secret`, `x-api-key`, `id_token`, `idToken`, `private_key`, `privateKey` and `passwd`, and the kernel exports `isCredentialKey(name)`, which compares a name with them without case. `StdoutLogger` of `@ddd-ts-kit/aspects`, `@ddd-ts-kit/pino` and `@ddd-ts-kit/winston` write `[redacted]` for the value of such a key at the top of an entry and one level below, so `Authorization`, `headers.X-Api-Key` or `ID_TOKEN` no longer reach the lines. A key a project adds through `redact` is compared without case by winston and one level below by pino; at the top of a pino line it is matched as written, since pino names a key there by its path. Nothing deeper than one level, nor inside a list, is looked at, as before.
|
|
62
|
+
|
|
63
|
+
**The regulated profile writes `sandbox.autoAllowBashIfSandboxed: false`, and `doctor` reports a sandbox without it.** Claude Code defaults the key to `true`, under which a bare `Bash` ask rule is skipped for every command the sandbox runs: under the profile every command that fits the sandbox ran without a prompt, and the allow-list it reviews was not a gate. Deny rules and ask rules scoped to a content held either way. The line and its reason are in the table of [the agent sandbox guide](docs/guides/agent-sandbox.md).
|
|
64
|
+
|
|
65
|
+
To move: in a project on the regulated profile, run `npx ddd-ts-kit init` again: it adds the key to the `sandbox` block of `.claude/settings.json` when the block lacks it, and keeps the keys the project set. A project that set the key to `true` keeps it, and `ddd-ts-kit doctor` reports it until it reads `false`.
|
|
66
|
+
|
|
7
67
|
## 0.105.0
|
|
8
68
|
|
|
9
69
|
**The `quality-gate` and `testing` skills load lighter: what only one situation of the work needs is read from a file beside them.** Bringing the trunk in, review remarks, coverage, the end-to-end specs and the acceptance of a story move to `quality-gate/merge-trunk.md`, `review-remarks.md`, `coverage.md` and `testing/end-to-end.md`, `acceptance.md`; the body names each in one line. "A fix" points to the `fix` skill, which holds it. The bodies shrink by about a quarter (4,800 words to 3,600), and a test holds them under a ceiling.
|
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:c3ab1cc13ce27ad9 -->
|
|
3
3
|
|
|
4
4
|
# ddd-ts-kit
|
|
5
5
|
|
|
@@ -69,7 +69,7 @@ commande et la pile d'appels.
|
|
|
69
69
|
```
|
|
70
70
|
ddd-ts-kit init [--http express|fastify|hono|nest|none]
|
|
71
71
|
[--validation zod|class-validator|typebox|standard-schema|none]
|
|
72
|
-
[--di tsyringe|nest|manual] [--tests vitest|jest]
|
|
72
|
+
[--di tsyringe|inversify|awilix|nest|manual] [--tests vitest|jest]
|
|
73
73
|
[--orm drizzle|knex|prisma|typeorm|custom|none]
|
|
74
74
|
[--database postgres|mysql|sqlite|none]
|
|
75
75
|
[--events in-memory|outbox] [--docs-ui swagger|scalar|redoc|none]
|
|
@@ -135,7 +135,10 @@ une minute après avoir été pris.
|
|
|
135
135
|
garde la configuration : les contextes et leurs amonts, les règles, les limites, les dérogations
|
|
136
136
|
et toute autre clé restent tels qu'ils sont écrits, et la *stack* ne change que là où une option
|
|
137
137
|
nomme un choix (`init --force --logger pino` change le *logger* ; une combinaison que la *stack*
|
|
138
|
-
enregistrée ne peut pas accepter est refusée comme pour un nouveau projet).
|
|
138
|
+
enregistrée ne peut pas accepter est refusée comme pour un nouveau projet). Les options du
|
|
139
|
+
premier `init` peuvent être passées de nouveau avec `--force` : un *preset* s'applique une seule fois,
|
|
140
|
+
donc `--preset identity` trouve son contexte déjà écrit, le laisse tel que l'équipe l'a, et le dit dans
|
|
141
|
+
une note. La racine de
|
|
139
142
|
composition, la preuve que chaque contexte se câble seul et le registre des permissions sont
|
|
140
143
|
réécrits depuis leurs *templates*, puis les contextes déclarés y sont câblés de nouveau, et l'effacement de chaque contexte est listé de
|
|
141
144
|
nouveau dans les copies du dossier *privacy* ; ce qu'un autre générateur avait ajouté à un fichier de la plateforme (la valeur d'une *gateway*, les
|
|
@@ -176,12 +179,14 @@ kit (des contrôleurs Nest avec `--http nest` sur class-validator, `--routes nes
|
|
|
176
179
|
`jwt`, `rbac`, aucun *broker*, le cache dans le processus, les fichiers dans un répertoire local
|
|
177
180
|
(`--storage local`), le journal d'audit `on` quand il y a un ORM, les demandes d'une personne concernée traitées (`--privacy on`) quand il y a un ORM, pas d'event store (`--event-sourcing off`), les échecs inattendus remontés
|
|
178
181
|
nulle part (`--errors none`), des lignes JSON sur la sortie standard (`--logger stdout`), et le
|
|
179
|
-
style `declared` avec un `barrel` partout où les déclarations sont lues : avec `--di tsyringe
|
|
182
|
+
style `declared` avec un `barrel` partout où les déclarations sont lues : avec `--di tsyringe`,
|
|
183
|
+
`inversify` ou `awilix`, qui génèrent le même code sur un autre conteneur.
|
|
180
184
|
|
|
181
185
|
**Gestionnaire de paquets.** `pnpm` sauf `--package-manager npm` : chaque script, *pipeline*,
|
|
182
186
|
*hook*, le Dockerfile, les consignes et les permissions des agents sont écrits dans le dialecte
|
|
183
187
|
de celui qui est choisi, enregistré sous `stack.packageManager`. pnpm est épinglé dans
|
|
184
|
-
`package.json` et
|
|
188
|
+
`package.json` et installé par npm à cette version (`npm install --global pnpm`, puis pnpm exécute la
|
|
189
|
+
version qu'épingle le projet ; Node 25 et suivants ne livrent plus corepack) ; `pnpm-workspace.yaml` dit qu'aucune dépendance n'exécute
|
|
185
190
|
de script de build sans être autorisée par son nom. Les deux sont prouvés par une installation
|
|
186
191
|
réelle d'un projet généré, son build et son `verify`. Le kit est installé depuis le registre dans
|
|
187
192
|
les deux cas.
|
|
@@ -221,7 +226,7 @@ la racine de composition l'assemble en une ligne. Dans le style `explicit`, chaq
|
|
|
221
226
|
écrite dans le fichier de module du contexte : `builder.bind(Port).toClass(Adapter, [Ports])`,
|
|
222
227
|
`builder.command(Message).requires(...).handledBy(Handler, [Ports])`, `builder.job(name, schedule)`.
|
|
223
228
|
`--style declared` est refusé avec `--di manual` et `--di nest` : les déclarations sont de simples
|
|
224
|
-
métadonnées, et seul `@ddd-ts-kit/di`
|
|
229
|
+
métadonnées, et seul `@ddd-ts-kit/di` les transforme en liaisons.
|
|
225
230
|
`--assembly` dit comment un contexte déclaré rejoint la racine de composition : `barrel` (par
|
|
226
231
|
défaut) est fait de fichiers générés, `<context>.declarations.ts` à la racine du contexte qui
|
|
227
232
|
réexporte les déclarations de chaque couche, statiques, que suivent un bundler, knip et
|
|
@@ -621,9 +626,9 @@ choix sont enregistrés sous `stack` dans la configuration, `docsUi`, `ci` et `l
|
|
|
621
626
|
| `package.json` | scripts et dépendances de la *stack* (ci-dessous) ; `build` est le compilateur, puis `ddd-ts-kit build-aliases` |
|
|
622
627
|
| `tsconfig.json`, `tsconfig.build.json` | strict, NodeNext, `rootDir` `.` et `outDir` `dist`, et `paths` : l'unique déclaration de l'alias d'import (`@/*` vers `./src/*`, `$test/*`, `$scripts/*`, et `$generated/*` avec Prisma), dérivée de `importAlias` (`--import-alias '$<name>/'`, `@/` par défaut ; `#<name>/` et `@<name>/` sont refusés avec la raison) ; la configuration de build étend l'autre et ne déclare pas de `paths` ; `experimentalDecorators` (et `emitDecoratorMetadata`) seulement pour nest ou class-validator, dont les décorateurs sont de l'ancienne forme (legacy) : les déclarations et les aspects servent les deux modes |
|
|
623
628
|
| `src/main.ts` | racine de composition : le traçage d'abord (la remontée des erreurs en second avec `--errors sentry`), la configuration, la persistance, l'application (`log`, `traceConsumers: config.tracing.consumers`, `resilience`, `jobs: { start: config.runJobs, settings: jobSettings(process.env) }`), le relais de l'outbox, le serveur HTTP ; sur `SIGTERM` ou `SIGINT`, il ferme le serveur, arrête le relais, arrête l'application, ferme la persistance et éteint le traçage |
|
|
624
|
-
| `src/platform/` | un export par fichier, chacun portant son nom, dans un dossier par préoccupation, aucun fichier à sa racine (un projet généré avant les dossiers les garde à plat jusqu'à `npx ddd-ts-kit platform-folders`). `composition/` (`compose-application.ts` et `lay-foundations.ts` dans les deux familles, puis `platform.module.ts` et `platform-test.module.ts` avec tsyringe, `platform.ts`, `platform-options.ts` et `create-platform.ts` câblés à la main) ; `jobs/` (`job-settings.ts`, `jobSettings(environment, context?)` : une ligne par *job*, `JOB_<CONTEXT>_<JOB>_ENABLED=false` en désactive un). `config/` (`app-config.ts` ; `environment.ts`, le lecteur des variables du processus, `env.url('DATABASE_URL')`, `env.integer('PORT', { fallback, min, max })`, `env.flag`, `env.oneOf`, qui garde chaque problème par nom de variable et les signale d'un coup ; `load-config.ts`, `config-error.ts`, `read-tracing.ts` : échec immédiat sur `DATABASE_URL`, `LOG_LEVEL`, `LOG_FORMAT`, `LOG_SCRUB_MESSAGES`, la politique `OUTBOUND_*`, `RUN_JOBS` et les variables de traçage ci-dessous) ; `observability/` (`tracing.ts`, premier import de chaque point d'entrée ; `errors.ts` avec `--errors sentry` ; `create-logger.ts`, voir `--logger` ; `create-metrics.ts` :
|
|
629
|
+
| `src/platform/` | un export par fichier, chacun portant son nom, dans un dossier par préoccupation, aucun fichier à sa racine (un projet généré avant les dossiers les garde à plat jusqu'à `npx ddd-ts-kit platform-folders`). `composition/` (`compose-application.ts` et `lay-foundations.ts` dans les deux familles, puis `platform.module.ts` et `platform-test.module.ts` avec tsyringe, `platform.ts`, `platform-options.ts` et `create-platform.ts` câblés à la main) ; `jobs/` (`job-settings.ts`, `jobSettings(environment, context?)` : une ligne par *job*, `JOB_<CONTEXT>_<JOB>_ENABLED=false` en désactive un). `config/` (`app-config.ts` ; `environment.ts`, le lecteur des variables du processus, `env.url('DATABASE_URL')`, `env.integer('PORT', { fallback, min, max })`, `env.flag`, `env.oneOf`, qui garde chaque problème par nom de variable et les signale d'un coup ; `load-config.ts`, `config-error.ts`, `read-tracing.ts` : échec immédiat sur `DATABASE_URL`, `LOG_LEVEL`, `LOG_FORMAT`, `LOG_SCRUB_MESSAGES`, la politique `OUTBOUND_*`, `RUN_JOBS` et les variables de traçage ci-dessous) ; `observability/` (`tracing.ts`, premier import de chaque point d'entrée ; `errors.ts` avec `--errors sentry` ; `create-logger.ts`, voir `--logger` ; `create-metrics.ts` : `openTelemetryMetrics()` de `@ddd-ts-kit/tracing`, exporté par OTLP avec les traces) ; `resilience/` (`resilience-settings.ts`, `default-resilience-settings.ts`, `default-policy.ts` : nouvelle tentative avec temporisation croissante et délai d'expiration pour `external` et `gateway`, `own-policy.ts` pour un adaptateur qui énonce la sienne, `adapters-with-own-policy.ts`, l'ensemble que la politique par défaut laisse tranquille) ; `events/`, `database/`, `auth/`, `audit/`, `redis/` (ci-dessous) ; `event-sourcing/` et `privacy/` (ci-dessous) ; `http/` (`start-http-server.ts`, `with-documentation.ts` : `/docs` et `/openapi.json`, ou `/openapi/<name>.json` par document d'un contrat découpé, désactivés en production sauf `API_DOCS=true` ; `openapi-documents.ts`, le découpage qu'écrit `ddd-ts-kit docs` depuis `openapi.documents`). Avec `--di tsyringe` : `compose-application.ts` (`composeApplication(persistence, options, contexts?)` : `kernelModule({...})`, le module de la plateforme, le module d'autorisation, les contextes ; installe le moteur des aspects), `lay-foundations.ts` (une portée d'exécution, l'horloge, le générateur d'identifiants, le *logger*, les métriques, l'instrumentation et l'audit, construits avant tout module), `platform.module.ts` (ce qui remplace les valeurs par défaut du kernel dans le processus : unité de travail, magasin des événements traités, la classe de stockage, `OutboxStore`, `EventSubscribers` derrière un *broker*, `ErrorMapper`, et `builder.around(['external', 'gateway'], ...)`, la résilience de chaque adaptateur qui sort du processus), `platform-test.module.ts` (ce qu'une *spec* de gestionnaire liste à côté de son contexte : la classe de stockage liée à une fabrique qui lève une erreur), `buses/create-command-bus.ts` et `create-query-bus.ts` (du plus extérieur au plus intérieur : `errorReportingMiddleware`, `loggingMiddleware`, `metricsMiddleware`, la permission, le *span* du cas d'usage, l'entrée d'audit, puis l'unité de travail d'une commande). Avec `--di manual` ou `nest` : `compose-application.ts`, `platform.ts` (`interface Platform`, avec `jobs: JobScheduler` et `adapter`, qui enveloppe ce qu'un fichier de module instancie), `platform-options.ts`, `lay-foundations.ts` (les mêmes fondations qu'avec tsyringe, le journal des décisions ou les sources d'audit compris), `create-platform.ts` (l'assemblage : les événements du domaine, la garde, les deux bus, les ports d'événements, les fichiers et ce qui enveloppe chaque adaptateur), `buses/create-command-bus.ts` et `create-query-bus.ts` (les mêmes chaînes qu'avec tsyringe, étant donnés la garde et le stockage), `events/platform-events.ts` (le publieur, les abonnés et, derrière Varnish, les purges), `jobs/configured-job-scheduler.ts` (applique `job-settings.ts` à ce qu'un module enregistre) |
|
|
625
630
|
| traçage | câblé une fois, par la plateforme (`tracing/platform-only`) : pas de *hook* `decorate`, pas de `decorate-bindings.ts`. `tracing.ts` démarre `initTracing` de `@ddd-ts-kit/tracing/node` avant tout autre module, sur ce que valide `config/read-tracing.ts` : `OTEL_EXPORTER_OTLP_ENDPOINT` (une URL ; absente, aucun *span* ne sort du processus), `TRACE_SAMPLE_RATIO` (de 0 à 1) et `TRACE_CONSUMERS` (`continue`, par défaut : un événement consommé reste dans la trace de sa publication ; `link` : chaque livraison démarre une trace liée à elle). Avec `--di tsyringe` : `lay-foundations.ts` construit `traceApplication({ consumers })`, `compose-application.ts` la remet à `kernelModule({ instrumentation })` (un *span* par cas d'usage, appel de *repository*, événement du domaine, publication, consommateur et *job*) et donne au relais de l'outbox `tracedPublisher(bus)`. En câblage manuel : `create-platform.ts` applique lui-même les membres de `traceApplication()` (`useCase` sur les deux bus, `domainEvents`, `publisher`, `binding` autour de chaque adaptateur, `job`, `executionScope`, `errorReporter`), avec `tracedSubscriber` et `tracedPublisher` autour du fournisseur. Avec une *stack* HTTP, dans les deux familles, `auth/authentication/http-boundary.ts` pose `around: tracedRoutes()` : un *span* `SERVER` par requête HTTP, nommé d'après sa route |
|
|
626
|
-
| `--logger` | `src/platform/observability/create-logger.ts`, un par choix : `stdout` (par défaut) est le `StdoutLogger` de `@ddd-ts-kit/aspects`, des lignes JSON
|
|
631
|
+
| `--logger` | `src/platform/observability/create-logger.ts`, un par choix : `stdout` (par défaut) est le `StdoutLogger` de `@ddd-ts-kit/aspects`, des lignes JSON ; `pino` est `createPinoLogger` de `@ddd-ts-kit/pino` (dépendances `pino` et `pino-pretty`) ; `winston` est `createWinstonLogger` de `@ddd-ts-kit/winston` ; les trois masquent les clés d'identifiants de connexion du kernel, quelle que soit leur casse. Chaque entrée porte `traceLogFields(scope)` : l'identifiant de corrélation, l'origine, l'acteur et le *tenant* du travail en cours, et les identifiants de la trace active. `LOG_LEVEL`, `LOG_FORMAT` (`json`, par défaut, ou `pretty` ; avec `stdout`, qui n'a pas de format lisible, `pretty` est refusé au chargement de la configuration) et `LOG_SCRUB_MESSAGES` (`[message removed]` à la place du message d'une erreur journalisée qui n'est pas une `DomainError`) sont validés dans `config/load-config.ts`. L'arrêt de l'application vide le tampon du *reporter* d'erreurs, puis celui du *logger*, en dernier : `container.stop()` le fait sur tsyringe, `compose-application.ts` le fait explicitement en câblage manuel. Les outils et les tests composent l'application sans `log` et n'écrivent rien |
|
|
627
632
|
| `src/platform/auth/` | un dossier par question : `authentication/` (qui appelle), `authorization/` (ce qu'il peut faire, quel que soit le modèle) et le dossier du modèle que nomme `stack.authz` (`roles/`, `attributes/`, `relationships/` ou `custom/`). Un projet généré avant les dossiers garde ses fichiers à plat : les générateurs les y lisent, `npx ddd-ts-kit doctor` le signale et `npx ddd-ts-kit platform-folders` les déplace avec chaque import |
|
|
628
633
|
| `src/platform/auth/authentication/` | `create-authenticator.ts` (`--authn jwt` : `JwtAuthenticator` sur `AUTH_ISSUER`, `AUTH_AUDIENCE`, `AUTH_JWKS_URI` ; `--authn keycloak` : `keycloakAuthenticator` sur `KEYCLOAK_URL`, `KEYCLOAK_REALM`, `KEYCLOAK_AUDIENCE` et l'optionnel `KEYCLOAK_CLIENT_ID` ; `--authn passport` : `passportAuthenticator` de `@ddd-ts-kit/auth/passport` sur `bearer-strategy.ts`, la stratégie de `passport-jwt` sur le jeu de clés que publie `AUTH_JWKS_URI` (`jwks-rsa`), `AUTH_ISSUER` et `AUTH_AUDIENCE`, qui refuse un jeton sans `exp` sauf si on lui donne `requireExpiry: false` et accepte RS256, PS256 et ES256, les `DEFAULT_JWT_ALGORITHMS` de `JwtAuthenticator` sauf EdDSA, que `jsonwebtoken` ne sait pas vérifier (un émetteur qui signe en EdDSA a besoin de `--authn jwt`), et `actor-of-token.ts`, qui lit sa charge utile avec `actorOfClaims` ; `--authn none` : `development-header-authenticator.ts` et `development-actor-header.ts`, qui lisent `x-development-actor` et lèvent une erreur en production), `principal-of.ts`, `security-schemes.ts`, `offline-authenticator.ts`, `http-boundary.ts` (`resolvePrincipal` qui répond une `Session`, `executionScope`, `errorMapper` et `onError`, étalés dans les options de montage : chaque requête HTTP s'exécute dans la portée d'exécution, avec son identifiant de corrélation). Sans *stack* HTTP, il n'y a ni authentificateur ni frontière, ni dossier |
|
|
629
634
|
| `src/platform/auth/authorization/` | `create-authorizer.ts`, `authorization.ts` (`authorizationModule` avec tsyringe) ou `use-case-protection.ts` (la garde des bus câblés à la main), `access-policies.ts`, `role.ts` (les rôles que porte un identifiant, avec des rôles ou des attributs, ou dès qu'une garde en nomme un), `permissions.ts` (le registre de toutes les permissions, avec des relations ou un authorizer à vous), `signed-in-grants.ts` dès qu'un *preset* de contexte accorde à toute personne connectée, et avec `--audit off` `log-decisions.ts` (une entrée de journal par décision, identifiants et codes seulement) |
|
|
@@ -660,7 +665,7 @@ choix sont enregistrés sous `stack` dans la configuration, `docsUi`, `ci` et `l
|
|
|
660
665
|
| `REVIEW.md` | la politique de revue du projet : les passes d'une revue (bugs, sécurité, conformité face à la revue de conception de la ligne, l'acceptation de la *story*, les enregistrements de `docs/adr/` et les règles), ce qu'Important veut dire, au plus cinq *nits* (un *nit* récurrent devient une ligne de `AGENTS.md` sous `## Mistakes seen here` ou une règle de la configuration), ce qui n'est pas signalé (les fichiers générés, ce que `npm run verify` refuse). Lu par l'agent `architecture-reviewer` par-dessus sa méthode, par un relecteur humain et par tout robot de revue. Écrit une fois, pour que l'équipe le modifie : `--force` le laisse tel quel, `doctor` dit quand il manque |
|
|
661
666
|
| `.github/copilot/settings.json` | le *plugin* du kit, déclaré pour GitHub Copilot (`extraKnownMarketplaces`, `enabledPlugins`) : son agent cloud l'installe, la CLI Copilot et VS Code le recommandent ; un fichier existant garde ce qu'il contient et reçoit les deux entrées |
|
|
662
667
|
| `.claude/hooks/production-gate.mjs`, `.claude/hooks/change-reference.mjs` | avec `--agent-profile regulated` : les deux *hooks* du profil, enregistrés sous `hooks.PreToolUse` de `.claude/settings.json`, écrits une fois pour que l'équipe les modifie (`--force` les réécrit). La porte bloque une commande qui nomme l'environnement de production avec une action de mise en production sauf si `RELEASE_APPROVAL` nomme un approbateur et un changement ; la référence demande avant une modification d'une migration ou des conteneurs, pour le *trailer* `Change: <id>` du *commit* ([Mettre les agents de code en bac à sable](../../docs/guides/agent-sandbox.fr.md#le-profil-réglementé)) |
|
|
663
|
-
| `.claude/settings.json` | des permissions (et, avec `--agent-profile regulated`, le bloc de bac à sable ci-dessous) : les vérifications et les générateurs s'exécutent sans demander, les fichiers `.env` sont illisibles (`.env.example` reste lisible), `generate` et `init` avec `--force`, `git push`, `npm publish` et toute modification des fichiers qui portent les règles et le *pipeline* (`ddd-ts-kit.config.json`, `REVIEW.md`, `eslint.config.mjs`, `biome.json`, `.dependency-cruiser.cjs`, `knip.json`, `lefthook.yml`, `.gitlab-ci.yml`, `.github/workflows/**`, `.claude/settings.json`, `.github/copilot/settings.json`) demandent d'abord, comme une modification des contrats générés et du verrou d'une acceptation (`openapi/**`, `docs/integration/asyncapi.*`, `docs/integration/event-catalog.md`, `test/acceptance/*.acceptance.lock.json` : une règle `ask`, puisque le bac à sable de Claude Code mettrait un chemin refusé en lecture seule pour `docs:generate` et `acceptance --lock` aussi ; la garde du plugin en refuse la modification à la main) et de ce qui atteint la production autrement que par le code : les migrations de l'ORM (`migrations/**` avec drizzle, knex et typeorm, `prisma/migrations/**` avec prisma, rien avec une persistance *custom* ou sans ORM), `Dockerfile`, `docker-compose.yml` et `docker/**`. Le fichier compose lit `.env` à la racine, que la liste de refus couvre déjà ; rien sous `docker/` ne porte de secret |
|
|
668
|
+
| `.claude/settings.json` | des permissions (et, avec `--agent-profile regulated`, le bloc de bac à sable ci-dessous) : les vérifications et les générateurs s'exécutent sans demander, les fichiers `.env` sont illisibles (`.env.example` reste lisible), `generate` et `init` avec `--force`, `git push`, `npm publish` et toute modification des fichiers qui portent les règles et le *pipeline* (`ddd-ts-kit.config.json`, `REVIEW.md`, `eslint.config.mjs`, `biome.json`, `.dependency-cruiser.cjs`, `knip.json`, `lefthook.yml`, `.gitlab-ci.yml`, `.github/workflows/**`, `.claude/settings.json`, `.github/copilot/settings.json`) demandent d'abord, comme une modification des contrats générés et du verrou d'une acceptation (`openapi/**`, `docs/integration/asyncapi.*`, `docs/integration/event-catalog.md`, `test/acceptance/*.acceptance.lock.json` : une règle `ask`, puisque le bac à sable de Claude Code mettrait un chemin refusé en lecture seule pour `docs:generate` et `acceptance --lock` aussi ; la garde du plugin en refuse la modification à la main) et de ce qui atteint la production autrement que par le code : les migrations de l'ORM (`migrations/**` avec drizzle, knex et typeorm, `prisma/migrations/**` avec prisma, rien avec une persistance *custom* ou sans ORM), `Dockerfile`, `docker-compose.yml` et `docker/**`. Le fichier compose lit `.env` à la racine, que la liste de refus couvre déjà ; rien sous `docker/` ne porte de secret. `package.json` n'a pas de règle, car on le modifie pour ses dépendances à longueur de journée : le garde du *plugin* demande quand une modification change ses `scripts`, que les barrières exécutent |
|
|
664
669
|
| `.gitignore` | `node_modules`, `dist`, `coverage`, `.env` et chaque `.env.*` sauf `.env.example` (de même dans `.dockerignore`), `*.tsbuildinfo`, `.ddd-ts-kit/`, où écrit `worker-scope`, et `.worktrees/`, où vivent les *worktrees* |
|
|
665
670
|
|
|
666
671
|
`--ci both` écrit les deux *pipelines*, `--ci none` aucun (et pas de `renovate.json`). Les
|
|
@@ -903,7 +908,9 @@ Next, in this order: the language of the context first, then the business decisi
|
|
|
903
908
|
permission sous le rôle `system` de `platform/auth/roles/roles.ts`, le rôle que `createAuthorizer`
|
|
904
909
|
donne à chaque acteur système (`systemRole`) et à nul autre : un jeton d'utilisateur qui nomme
|
|
905
910
|
`system` parmi ses rôles ne le détient pas ; `--authz abac`, une règle
|
|
906
|
-
`permit('system-<job>', [permission], ({ actor }) => actor.id === 'system:<job>')
|
|
911
|
+
`permit('system-<job>', [permission], ({ actor }) => isSystem(actor) && actor.id === 'system:<job>')`,
|
|
912
|
+
`isSystem` du noyau importé, pour qu'un jeton dont le sujet se lit `system:<job>` ne passe pas
|
|
913
|
+
pour le *job*, dans
|
|
907
914
|
`platform/auth/attributes/attribute-policies.ts` ; `--authz rebac`, le tuple
|
|
908
915
|
`context:<context>#operator@system:<job>` dans `platform/auth/relationships/relate-system-actors.ts`,
|
|
909
916
|
écrit dans le magasin de tuples au démarrage de l'application, tant que le schéma laisse encore
|
|
@@ -1364,7 +1371,8 @@ ddd-ts-kit todo [<context>] [--brief]
|
|
|
1364
1371
|
`status` affiche la ligne `Next:` de `docs/architecture/plan.md`, les lignes de
|
|
1365
1372
|
`docs/architecture/slices.md` par statut et par responsable, et par contexte les `TODO(domain)`,
|
|
1366
1373
|
`TODO(platform)` et `it.todo` restants, puis ceux hors des contextes. Un fichier manquant n'est
|
|
1367
|
-
pas une erreur
|
|
1374
|
+
pas une erreur ; un `ddd-ts-kit.config.json` manquant en est une : avant `init`, `status` refuse avec le
|
|
1375
|
+
code 2, nomme `init` et n'imprime aucune demi-réponse. Quand le plan est à l'étape 7 (la construction), la ligne `Next:` est déduite des lignes (la prochaine ligne prête sur le tronc, ou `7 build done` quand toutes sont faites) et la ligne du plan est affichée à côté, `planNext` dans `--json`. Chaque ligne qui n'est pas faite dit si elle peut commencer : prête sur le tronc
|
|
1368
1376
|
quand toutes ses dépendances sont faites, prête sur une branche quand chaque dépendance non faite
|
|
1369
1377
|
est une ligne confiée à un *worker* dont le *worktree* a des *commits* d'avance sur sa base (les
|
|
1370
1378
|
`rows` de son `.ddd-ts-kit/worker.json`, tels que `status --workers` les lit), et en attente
|
|
@@ -1814,7 +1822,8 @@ comme `permission hooks.<name>`), puis les *hooks* git. `lefthook.yml` doit port
|
|
|
1814
1822
|
*worktree* son propre lefthook, et fait échouer un *commit*, bruyamment, quand ses dépendances
|
|
1815
1823
|
manquent ; le correctif est cette ligne, ou `init --force` pour le fichier entier. Le *hook*
|
|
1816
1824
|
pre-commit sous `git rev-parse --git-path hooks` doit exister et venir de lefthook ; le correctif
|
|
1817
|
-
est `npm run hooks:install`, une fois par clone.
|
|
1825
|
+
est `npm run hooks:install`, une fois par clone. Hors d'un dépôt git les *hooks* ne peuvent pas être lus : `doctor`
|
|
1826
|
+
signale alors `hook git repository` comme manquant, ce qui fait échouer `--strict`, et `git init` passe d'abord. Puis la consigne écrite une fois pour que
|
|
1818
1827
|
l'équipe la possède : `REVIEW.md`, la politique de revue, et sous le profil réglementé les deux
|
|
1819
1828
|
*hooks* de `.claude/hooks/`, sont signalés manquants (`guidance`) et `init` les écrit de nouveau
|
|
1820
1829
|
sans toucher à rien d'autre.
|
|
@@ -2756,7 +2765,7 @@ conteneur :
|
|
|
2756
2765
|
- `typecheck.spec.ts` : les 36 d'entre elles que le *workspace* sait compiler (jest, prisma et
|
|
2757
2766
|
typeorm à part) passent la vérification de types contre les sources des *packages* du
|
|
2758
2767
|
*workspace*.
|
|
2759
|
-
- `proven-stacks.spec.ts` : les
|
|
2768
|
+
- `proven-stacks.spec.ts` : les projets de `PROVEN` sont installés comme le serait un kit
|
|
2760
2769
|
publié et tenus à tout ce qu'exécute leur propre *pipeline* : `check` avec zéro violation et
|
|
2761
2770
|
zéro avertissement, ESLint avec le preset (le test lit d'abord dans `eslint --print-config` que
|
|
2762
2771
|
les règles des ports, de la planification, de la forme des fichiers et de la disposition sont
|
package/README.md
CHANGED
|
@@ -63,7 +63,7 @@ and the stack trace.
|
|
|
63
63
|
```
|
|
64
64
|
ddd-ts-kit init [--http express|fastify|hono|nest|none]
|
|
65
65
|
[--validation zod|class-validator|typebox|standard-schema|none]
|
|
66
|
-
[--di tsyringe|nest|manual] [--tests vitest|jest]
|
|
66
|
+
[--di tsyringe|inversify|awilix|nest|manual] [--tests vitest|jest]
|
|
67
67
|
[--orm drizzle|knex|prisma|typeorm|custom|none]
|
|
68
68
|
[--database postgres|mysql|sqlite|none]
|
|
69
69
|
[--events in-memory|outbox] [--docs-ui swagger|scalar|redoc|none]
|
|
@@ -125,7 +125,9 @@ taken on another machine, or whose holder cannot be read, is taken over a minute
|
|
|
125
125
|
the config: the contexts and their upstreams, the rules, the limits, the deviations and every
|
|
126
126
|
other key stay as written, and the stack changes only where a flag names a choice
|
|
127
127
|
(`init --force --logger pino` changes the logger; a combination the recorded stack cannot take
|
|
128
|
-
is refused as for a new project). The
|
|
128
|
+
is refused as for a new project). The flags of the first `init` may be passed again with `--force`:
|
|
129
|
+
a preset is applied once, so `--preset identity` finds its context written, leaves it as the team
|
|
130
|
+
has it, and says so in a note. The composition root, the proof that each context wires alone
|
|
129
131
|
and the registry of permissions are rewritten from their templates, then the declared contexts
|
|
130
132
|
are wired into them again, and the erasure of each context is listed again in the copies of the
|
|
131
133
|
privacy folder; what another generator had added to a file of the platform (the value of a
|
|
@@ -161,11 +163,13 @@ on class-validator, `--routes nest`), `vitest`,
|
|
|
161
163
|
`drizzle` on `postgres`, `outbox` when there is an ORM, `swagger`, `github`, `jwt`, `rbac`, no broker,
|
|
162
164
|
the cache in the process, files in a local directory (`--storage local`), the audit trail `on` when there is an ORM, the requests of a data subject answered (`--privacy on`) when there is an ORM, no event store (`--event-sourcing off`), unexpected failures reported
|
|
163
165
|
nowhere (`--errors none`), JSON lines on the standard output (`--logger stdout`), and the
|
|
164
|
-
`declared` style with a `barrel` wherever the declarations are read: with `--di tsyringe
|
|
166
|
+
`declared` style with a `barrel` wherever the declarations are read: with `--di tsyringe`,
|
|
167
|
+
`inversify` or `awilix`, which generate the same code on another container underneath.
|
|
165
168
|
|
|
166
169
|
**Package manager.** `pnpm` unless `--package-manager npm`: every script, pipeline, hook, the
|
|
167
170
|
Dockerfile, the guidance and the agent permissions are written in the dialect of the one chosen,
|
|
168
|
-
recorded under `stack.packageManager`. pnpm is pinned in `package.json` and
|
|
171
|
+
recorded under `stack.packageManager`. pnpm is pinned in `package.json` and installed by npm at that release (`npm install --global pnpm`,
|
|
172
|
+
then pnpm runs the release the project pins; Node 25 and later ship no corepack);
|
|
169
173
|
`pnpm-workspace.yaml` says that no dependency runs a build script unless allowed by name. Both are
|
|
170
174
|
proven by a real install of a generated project, its build and its `verify`. The kit is installed
|
|
171
175
|
from the registry either way.
|
|
@@ -202,7 +206,7 @@ composition root assembles it in one line. In the `explicit` style every binding
|
|
|
202
206
|
module file of the context: `builder.bind(Port).toClass(Adapter, [Ports])`,
|
|
203
207
|
`builder.command(Message).requires(...).handledBy(Handler, [Ports])`, `builder.job(name, schedule)`.
|
|
204
208
|
`--style declared` is refused with `--di manual` and `--di nest`: the declarations are plain
|
|
205
|
-
metadata, and only `@ddd-ts-kit/di`
|
|
209
|
+
metadata, and only `@ddd-ts-kit/di` turns them into bindings.
|
|
206
210
|
`--assembly` says how a declared context reaches the composition root: `barrel` (the default) is
|
|
207
211
|
generated files, `<context>.declarations.ts` at the root of the context re-exporting the
|
|
208
212
|
declarations of each layer, static, followed by a bundler, by knip and by dependency-cruiser; `discovery` writes `await discoverContext(...)` instead, with the knip entry
|
|
@@ -592,9 +596,9 @@ config, `docsUi`, `ci` and `logger` included.
|
|
|
592
596
|
| `package.json` | scripts and dependencies of the stack (below); `build` is the compiler, then `ddd-ts-kit build-aliases` |
|
|
593
597
|
| `tsconfig.json`, `tsconfig.build.json` | strict, NodeNext, `rootDir` `.` and `outDir` `dist`, and `paths`: the one declaration of the import alias (`@/*` to `./src/*`, `$test/*`, `$scripts/*`, and `$generated/*` with Prisma), derived from `importAlias` (`--import-alias '$<name>/'`, `@/` by default; `#<name>/` and `@<name>/` are refused with the reason); the build config extends the other and declares no `paths`; `experimentalDecorators` (and `emitDecoratorMetadata`) only for nest or class-validator, whose decorators are legacy ones: the declarations and the aspects serve both modes |
|
|
594
598
|
| `src/main.ts` | composition root: tracing first (error reporting second with `--errors sentry`), config, persistence, application (`log`, `traceConsumers: config.tracing.consumers`, `resilience`, `jobs: { start: config.runJobs, settings: jobSettings(process.env) }`), outbox relay, HTTP server; on `SIGTERM` or `SIGINT` it closes the server, stops the relay, stops the application, closes the persistence and shuts the tracing down |
|
|
595
|
-
| `src/platform/` | one export per file, each named after it, in one folder per concern, no file at its root (a project generated before the folders keeps them flat until `npx ddd-ts-kit platform-folders`). `composition/` (`compose-application.ts` and `lay-foundations.ts` in both families, then `platform.module.ts` and `platform-test.module.ts` on tsyringe, `platform.ts`, `platform-options.ts` and `create-platform.ts` wired by hand); `jobs/` (`job-settings.ts`, `jobSettings(environment, context?)`: one line per job, `JOB_<CONTEXT>_<JOB>_ENABLED=false` switches one off). `config/` (`app-config.ts`; `environment.ts`, the reader of the variables of the process, `env.url('DATABASE_URL')`, `env.integer('PORT', { fallback, min, max })`, `env.flag`, `env.oneOf`, which keeps every problem by variable name and reports them at once; `load-config.ts`, `config-error.ts`, `read-tracing.ts`: fail-fast on `DATABASE_URL`, `LOG_LEVEL`, `LOG_FORMAT`, `LOG_SCRUB_MESSAGES`, the `OUTBOUND_*` policy, `RUN_JOBS` and the tracing variables below); `observability/` (`tracing.ts`, the first import of every entry point; `errors.ts` with `--errors sentry`; `create-logger.ts`, see `--logger`; `create-metrics.ts`:
|
|
599
|
+
| `src/platform/` | one export per file, each named after it, in one folder per concern, no file at its root (a project generated before the folders keeps them flat until `npx ddd-ts-kit platform-folders`). `composition/` (`compose-application.ts` and `lay-foundations.ts` in both families, then `platform.module.ts` and `platform-test.module.ts` on tsyringe, `platform.ts`, `platform-options.ts` and `create-platform.ts` wired by hand); `jobs/` (`job-settings.ts`, `jobSettings(environment, context?)`: one line per job, `JOB_<CONTEXT>_<JOB>_ENABLED=false` switches one off). `config/` (`app-config.ts`; `environment.ts`, the reader of the variables of the process, `env.url('DATABASE_URL')`, `env.integer('PORT', { fallback, min, max })`, `env.flag`, `env.oneOf`, which keeps every problem by variable name and reports them at once; `load-config.ts`, `config-error.ts`, `read-tracing.ts`: fail-fast on `DATABASE_URL`, `LOG_LEVEL`, `LOG_FORMAT`, `LOG_SCRUB_MESSAGES`, the `OUTBOUND_*` policy, `RUN_JOBS` and the tracing variables below); `observability/` (`tracing.ts`, the first import of every entry point; `errors.ts` with `--errors sentry`; `create-logger.ts`, see `--logger`; `create-metrics.ts`: `openTelemetryMetrics()` of `@ddd-ts-kit/tracing`, exported by OTLP with the spans); `resilience/` (`resilience-settings.ts`, `default-resilience-settings.ts`, `default-policy.ts`: retry with backoff and a timeout for `external` and `gateway`, `own-policy.ts` for an adapter that states its own, `adapters-with-own-policy.ts`, the set the default policy leaves alone); `events/`, `database/`, `auth/`, `audit/`, `redis/` (below); `event-sourcing/` and `privacy/` (below); `http/` (`start-http-server.ts`, `with-documentation.ts`: `/docs` and `/openapi.json`, or `/openapi/<name>.json` per document of a split contract, off in production unless `API_DOCS=true`; `openapi-documents.ts`, the split written by `ddd-ts-kit docs` from `openapi.documents`). With `--di tsyringe`: `compose-application.ts` (`composeApplication(persistence, options, contexts?)`: `kernelModule({...})`, the platform module, the authorization module, the contexts; installs the aspect runtime), `lay-foundations.ts` (one execution scope, clock, id generator, logger, metrics, instrumentation and audit, built before any module), `platform.module.ts` (what replaces the in-process defaults of the kernel: unit of work, processed-event store, the storage class, `OutboxStore`, `EventSubscribers` behind a broker, `ErrorMapper`, and `builder.around(['external', 'gateway'], ...)`, the resilience of every adapter that leaves the process), `platform-test.module.ts` (what a handler spec lists next to its context: the storage class bound to a factory that throws), `buses/create-command-bus.ts` and `create-query-bus.ts` (outermost first: `errorReportingMiddleware`, `loggingMiddleware`, `metricsMiddleware`, the permission, the span of the use case, the audit entry, then the unit of work of a command). With `--di manual` or `nest`: `compose-application.ts`, `platform.ts` (`interface Platform`, with `jobs: JobScheduler` and `adapter`, which wraps what a module file instantiates), `platform-options.ts`, `lay-foundations.ts` (the same foundations as on tsyringe, the log of the decisions or the audit sources included), `create-platform.ts` (the assembly: the domain events, the guard, the two buses, the event ports, the files and what wraps every adapter), `buses/create-command-bus.ts` and `create-query-bus.ts` (the same chains as on tsyringe, given the guard and the storage), `events/platform-events.ts` (the publisher, the subscribers and, behind Varnish, the purges), `jobs/configured-job-scheduler.ts` (applies `job-settings.ts` to what a module registers) |
|
|
596
600
|
| tracing | wired once, by the platform (`tracing/platform-only`): no `decorate` hook, no `decorate-bindings.ts`. `tracing.ts` starts `initTracing` of `@ddd-ts-kit/tracing/node` before any other module, on what `config/read-tracing.ts` validates: `OTEL_EXPORTER_OTLP_ENDPOINT` (a URL; left out, no span leaves the process), `TRACE_SAMPLE_RATIO` (0 to 1) and `TRACE_CONSUMERS` (`continue`, the default: a consumed event stays in the trace of its publication; `link`: each delivery starts a trace linked to it). With `--di tsyringe`: `lay-foundations.ts` builds `traceApplication({ consumers })`, `compose-application.ts` hands it to `kernelModule({ instrumentation })` (one span per use case, repository call, domain event, publication, consumer and job) and gives the outbox relay `tracedPublisher(bus)`. With hand wiring: `create-platform.ts` applies the members of `traceApplication()` itself (`useCase` on both buses, `domainEvents`, `publisher`, `binding` around every adapter, `job`, `executionScope`, `errorReporter`), with `tracedSubscriber` and `tracedPublisher` around the provider. With an HTTP stack, in both families, `auth/authentication/http-boundary.ts` sets `around: tracedRoutes()`: one `SERVER` span per request, named by its route |
|
|
597
|
-
| `--logger` | `src/platform/observability/create-logger.ts`, one per choice: `stdout` (the default) is the `StdoutLogger` of `@ddd-ts-kit/aspects`, JSON lines
|
|
601
|
+
| `--logger` | `src/platform/observability/create-logger.ts`, one per choice: `stdout` (the default) is the `StdoutLogger` of `@ddd-ts-kit/aspects`, JSON lines; `pino` is `createPinoLogger` of `@ddd-ts-kit/pino` (dependencies `pino` and `pino-pretty`); `winston` is `createWinstonLogger` of `@ddd-ts-kit/winston`; the three redact the credential keys of the kernel, whatever their case. Every entry carries `traceLogFields(scope)`: the correlation id, origin, actor and tenant of the work in progress and the ids of the active trace. `LOG_LEVEL`, `LOG_FORMAT` (`json`, the default, or `pretty`; with `stdout`, which has no pretty format, `pretty` is refused when the configuration is loaded) and `LOG_SCRUB_MESSAGES` (`[message removed]` in place of the message of a logged error that is not a `DomainError`) are validated in `config/load-config.ts`. Stopping the application flushes the error reporter, then the logger, last: `container.stop()` does it on tsyringe, `compose-application.ts` flushes explicitly with hand wiring. The tools and the tests compose the application without `log` and write nothing |
|
|
598
602
|
| `src/platform/auth/` | one folder per question: `authentication/` (who is calling), `authorization/` (what they may do, whatever the model) and the folder of the model `stack.authz` names (`roles/`, `attributes/`, `relationships/` or `custom/`). A project generated before the folders keeps its files flat: the generators read them there, `npx ddd-ts-kit doctor` says so and `npx ddd-ts-kit platform-folders` moves them with every import |
|
|
599
603
|
| `src/platform/auth/authentication/` | `create-authenticator.ts` (`--authn jwt`: `JwtAuthenticator` on `AUTH_ISSUER`, `AUTH_AUDIENCE`, `AUTH_JWKS_URI`; `--authn keycloak`: `keycloakAuthenticator` on `KEYCLOAK_URL`, `KEYCLOAK_REALM`, `KEYCLOAK_AUDIENCE` and the optional `KEYCLOAK_CLIENT_ID`; `--authn passport`: `passportAuthenticator` of `@ddd-ts-kit/auth/passport` over `bearer-strategy.ts`, the strategy of `passport-jwt` on the key set `AUTH_JWKS_URI` publishes (`jwks-rsa`), `AUTH_ISSUER` and `AUTH_AUDIENCE`, which refuses a token without `exp` unless given `requireExpiry: false` and allows RS256, PS256 and ES256, the `DEFAULT_JWT_ALGORITHMS` of `JwtAuthenticator` but EdDSA, which `jsonwebtoken` cannot verify (an issuer that signs with EdDSA needs `--authn jwt`), and `actor-of-token.ts`, which reads its payload with `actorOfClaims`; `--authn none`: `development-header-authenticator.ts` and `development-actor-header.ts`, which read `x-development-actor` and throw in production), `principal-of.ts`, `security-schemes.ts`, `offline-authenticator.ts`, `http-boundary.ts` (`resolvePrincipal` answering a `Session`, `executionScope`, `errorMapper` and `onError`, spread into the mount options: every request runs inside the execution scope, with its correlation id). Without an HTTP stack there is no authenticator and no boundary, and no folder |
|
|
600
604
|
| `src/platform/auth/authorization/` | `create-authorizer.ts`, `authorization.ts` (`authorizationModule` with tsyringe) or `use-case-protection.ts` (the guard of the hand-wired buses), `access-policies.ts`, `role.ts` (the roles a credential carries, with roles or attributes, or once a guard names one), `permissions.ts` (the registry of every permission, with relationships or an authorizer of your own), `signed-in-grants.ts` once a context preset grants every signed-in person, and with `--audit off` `log-decisions.ts` (one log entry per decision, ids and codes only) |
|
|
@@ -631,7 +635,7 @@ config, `docsUi`, `ci` and `logger` included.
|
|
|
631
635
|
| `REVIEW.md` | the review policy of the project: the passes of a review (bugs, security, compliance against the design review of the row, the acceptance of the story, the records of `docs/adr/` and the rules), what Important means, at most five nits (a recurring one becomes a line of `AGENTS.md` under `## Mistakes seen here` or a rule of the config), what is not reported (generated files, what `npm run verify` refuses). Read by the `architecture-reviewer` agent on top of its method, by a human reviewer and by any review bot. Written once, for the team to edit: `--force` leaves it alone, `doctor` says when it is missing |
|
|
632
636
|
| `.github/copilot/settings.json` | the plugin of the kit, declared for GitHub Copilot (`extraKnownMarketplaces`, `enabledPlugins`): its cloud agent installs it, the Copilot CLI and VS Code recommend it; an existing file keeps what it holds and gains the two entries |
|
|
633
637
|
| `.claude/hooks/production-gate.mjs`, `.claude/hooks/change-reference.mjs` | with `--agent-profile regulated`: the two hooks of the profile, registered under `hooks.PreToolUse` of `.claude/settings.json`, written once for the team to edit (`--force` writes them again). The gate blocks a command that names the production environment with a release action unless `RELEASE_APPROVAL` names an approver and a change; the reference asks before an edit of a migration or of the containers, for the `Change: <id>` trailer of the commit ([Sandboxing coding agents](../../docs/guides/agent-sandbox.md#the-regulated-profile)) |
|
|
634
|
-
| `.claude/settings.json` | permissions (and, with `--agent-profile regulated`, the sandbox block below): the checks and generators run without asking, `.env` files are unreadable (`.env.example` stays readable), `generate` and `init` with `--force`, `git push`, `npm publish` and any edit of the files that hold the rules and the pipeline (`ddd-ts-kit.config.json`, `REVIEW.md`, `eslint.config.mjs`, `biome.json`, `.dependency-cruiser.cjs`, `knip.json`, `lefthook.yml`, `.gitlab-ci.yml`, `.github/workflows/**`, `.claude/settings.json`, `.github/copilot/settings.json`) ask first, and so does an edit of the generated contracts and of the lock of an acceptance (`openapi/**`, `docs/integration/asyncapi.*`, `docs/integration/event-catalog.md`, `test/acceptance/*.acceptance.lock.json`: an ask rule, since the sandbox of Claude Code would make a denied path read-only to `docs:generate` and `acceptance --lock` too; the guard of the plugin refuses a hand edit of them) and of what reaches production otherwise than through the code: the migrations of the ORM (`migrations/**` with drizzle, knex and typeorm, `prisma/migrations/**` with prisma, nothing with a custom persistence or none), `Dockerfile`, `docker-compose.yml` and `docker/**`. The compose file reads `.env` at the root, which the deny list already covers; nothing under `docker/` holds a secret |
|
|
638
|
+
| `.claude/settings.json` | permissions (and, with `--agent-profile regulated`, the sandbox block below): the checks and generators run without asking, `.env` files are unreadable (`.env.example` stays readable), `generate` and `init` with `--force`, `git push`, `npm publish` and any edit of the files that hold the rules and the pipeline (`ddd-ts-kit.config.json`, `REVIEW.md`, `eslint.config.mjs`, `biome.json`, `.dependency-cruiser.cjs`, `knip.json`, `lefthook.yml`, `.gitlab-ci.yml`, `.github/workflows/**`, `.claude/settings.json`, `.github/copilot/settings.json`) ask first, and so does an edit of the generated contracts and of the lock of an acceptance (`openapi/**`, `docs/integration/asyncapi.*`, `docs/integration/event-catalog.md`, `test/acceptance/*.acceptance.lock.json`: an ask rule, since the sandbox of Claude Code would make a denied path read-only to `docs:generate` and `acceptance --lock` too; the guard of the plugin refuses a hand edit of them) and of what reaches production otherwise than through the code: the migrations of the ORM (`migrations/**` with drizzle, knex and typeorm, `prisma/migrations/**` with prisma, nothing with a custom persistence or none), `Dockerfile`, `docker-compose.yml` and `docker/**`. The compose file reads `.env` at the root, which the deny list already covers; nothing under `docker/` holds a secret. `package.json` has no rule, since it is edited for its dependencies all day: the guard of the plugin asks when an edit changes its `scripts`, which the gates run |
|
|
635
639
|
| `.gitignore` | `node_modules`, `dist`, `coverage`, `.env` and every `.env.*` but `.env.example` (the same in `.dockerignore`), `*.tsbuildinfo`, `.ddd-ts-kit/`, where `worker-scope` writes, and `.worktrees/`, where the worktrees live |
|
|
636
640
|
|
|
637
641
|
`--ci both` writes the two pipelines, `--ci none` neither (and no `renovate.json`). The pipeline
|
|
@@ -863,7 +867,9 @@ Next, in this order: the language of the context first, then the business decisi
|
|
|
863
867
|
`--authz rbac`, the id of the permission under the role `system` of `platform/auth/roles/roles.ts`,
|
|
864
868
|
the role `createAuthorizer` gives every system actor (`systemRole`) and no other: a user token
|
|
865
869
|
that names `system` among its roles does not hold it; `--authz abac`, a
|
|
866
|
-
`permit('system-<job>', [permission], ({ actor }) => actor.id === 'system:<job>')`
|
|
870
|
+
`permit('system-<job>', [permission], ({ actor }) => isSystem(actor) && actor.id === 'system:<job>')`
|
|
871
|
+
rule, `isSystem` of the kernel imported, so that a token whose subject reads `system:<job>` does
|
|
872
|
+
not stand for the job, in
|
|
867
873
|
`platform/auth/attributes/attribute-policies.ts`; `--authz rebac`, the tuple
|
|
868
874
|
`context:<context>#operator@system:<job>` in `platform/auth/relationships/relate-system-actors.ts`,
|
|
869
875
|
written to the tuple store when the application starts, as long as the schema still lets a
|
|
@@ -1288,7 +1294,8 @@ ddd-ts-kit todo [<context>] [--brief]
|
|
|
1288
1294
|
`status` prints the `Next:` line of `docs/architecture/plan.md`, the rows of
|
|
1289
1295
|
`docs/architecture/slices.md` by status and by owner, and per context the `TODO(domain)`,
|
|
1290
1296
|
`TODO(platform)` and `it.todo` left, then those outside the contexts. A missing file is not an
|
|
1291
|
-
error
|
|
1297
|
+
error; a missing `ddd-ts-kit.config.json` is one: before `init`, `status` refuses with exit 2 and
|
|
1298
|
+
names `init`, and prints no half answer. When the plan sits at step 7 (the build) the `Next:` line is derived from the rows (the next row ready on the trunk, or `7 build done` once every row is done) and the line of the plan is printed beside it, `planNext` in `--json`. Each row not done says whether it can start: ready on the trunk when every dependency is
|
|
1292
1299
|
done, ready on a branch when each dependency not done is a row briefed to a worker whose worktree
|
|
1293
1300
|
has commits ahead of its base (the `rows` of its `.ddd-ts-kit/worker.json`, as `status --workers`
|
|
1294
1301
|
reads them), and waiting otherwise, with the ids it waits for. A story or a milestone whose rows
|
|
@@ -1702,7 +1709,8 @@ otherwise (under `agents.profile: "regulated"`, each line of the sandbox block t
|
|
|
1702
1709
|
which makes each checkout and each worktree run its own lefthook and fail a commit, loudly,
|
|
1703
1710
|
when its dependencies are missing; the fix is that line, or `init --force` for the whole file.
|
|
1704
1711
|
The pre-commit hook under `git rev-parse --git-path hooks` must exist and come from lefthook;
|
|
1705
|
-
the fix is `npm run hooks:install`, once per clone.
|
|
1712
|
+
the fix is `npm run hooks:install`, once per clone. Outside a git repository the hooks cannot be read: `doctor` then
|
|
1713
|
+
reports `hook git repository` as missing, which fails `--strict`, and `git init` comes first. Then the guidance written once for the team
|
|
1706
1714
|
to own: `REVIEW.md`, the review policy, and under the regulated profile the two hooks of
|
|
1707
1715
|
`.claude/hooks/`, are reported missing (`guidance`) and `init` writes them again without touching
|
|
1708
1716
|
anything else.
|
|
@@ -2574,7 +2582,7 @@ the process, without a container:
|
|
|
2574
2582
|
them, pass `check` and `docs --check` as generated.
|
|
2575
2583
|
- `typecheck.spec.ts`: the 36 of them the workspace can compile (jest, prisma and typeorm
|
|
2576
2584
|
apart) type-check against the sources of the workspace packages.
|
|
2577
|
-
- `proven-stacks.spec.ts`: the
|
|
2585
|
+
- `proven-stacks.spec.ts`: the projects of `PROVEN` are installed as a published kit would be and held to
|
|
2578
2586
|
everything their own pipeline runs: `check` with zero violation and zero warning, ESLint with the
|
|
2579
2587
|
preset (the test first reads from `eslint --print-config` that the rules of ports, scheduling,
|
|
2580
2588
|
file shape and layout are on), dependency-cruiser with the generated configuration, knip, their
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renamed-files.d.ts","sourceRoot":"","sources":["../../../src/check/baseline/renamed-files.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"renamed-files.d.ts","sourceRoot":"","sources":["../../../src/check/baseline/renamed-files.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAIpD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,EAAE,CAWzD"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { execFileSync } from 'node:child_process';
|
|
2
2
|
import { BASELINE_FILE } from './read-baseline.js';
|
|
3
|
+
import { gitArguments } from '../../commit/git-arguments.js';
|
|
3
4
|
/**
|
|
4
5
|
* The files git sees renamed since the baseline was last committed, staged and committed renames
|
|
5
6
|
* alike (a `git mv`, or a move git recognises from the content), relative to the project root.
|
|
@@ -18,6 +19,6 @@ export function renamedFiles(root) {
|
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
function git(root, args) {
|
|
21
|
-
return execFileSync('git',
|
|
22
|
+
return execFileSync('git', gitArguments(args), { cwd: root, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] });
|
|
22
23
|
}
|
|
23
24
|
//# sourceMappingURL=renamed-files.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renamed-files.js","sourceRoot":"","sources":["../../../src/check/baseline/renamed-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"renamed-files.js","sourceRoot":"","sources":["../../../src/check/baseline/renamed-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oB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ources":["../../../src/check/commands/changed-files.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"changed-files.d.ts","sourceRoot":"","sources":["../../../src/check/commands/changed-files.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAatE"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { execFileSync } from 'node:child_process';
|
|
2
2
|
import { CliError } from '../../cli-error.js';
|
|
3
|
+
import { gitArguments } from '../../commit/git-arguments.js';
|
|
3
4
|
/**
|
|
4
5
|
* The files changed since `commit`, the commit a ref the caller checked names, relative to the
|
|
5
6
|
* project root: committed since the merge base, tracked files modified in the index or the
|
|
@@ -18,7 +19,7 @@ export function changedFiles(root, commit) {
|
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
function gitLines(root, args) {
|
|
21
|
-
return execFileSync('git',
|
|
22
|
+
return execFileSync('git', gitArguments(args), { cwd: root, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] })
|
|
22
23
|
.split('\n')
|
|
23
24
|
.map((line) => line.trim())
|
|
24
25
|
.filter((line) => line !== '');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changed-files.js","sourceRoot":"","sources":["../../../src/check/commands/changed-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"changed-files.js","sourceRoot":"","sources":["../../../src/check/commands/changed-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D;;;;;G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
|
+
{"version":3,"file":"git-ignored.d.ts","sourceRoot":"","sources":["../../../src/check/project/git-ignored.ts"],"names":[],"mappings":"AAIA,qGAAqG;AACrG,MAAM,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,KAAK,OAAO,CAAC;AAEvE;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAqBnE"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { spawnSync } from 'node:child_process';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
+
import { gitArguments } from '../../commit/git-arguments.js';
|
|
3
4
|
/**
|
|
4
5
|
* What git ignores below `directory`: an entry a `.gitignore`, `.git/info/exclude` or the global
|
|
5
6
|
* excludes file of the machine names, which no one tracks. One `git ls-files` call lists them, a
|
|
@@ -8,7 +9,7 @@ import path from 'node:path';
|
|
|
8
9
|
* enclosing repository ignores, nothing is ignored and the walk reads every entry.
|
|
9
10
|
*/
|
|
10
11
|
export function gitIgnored(root, directory) {
|
|
11
|
-
const run = spawnSync('git', ['ls-files', '-z', '--others', '--ignored', '--exclude-standard', '--directory', '--', directory], { cwd: root, encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'], maxBuffer: 1 << 28 });
|
|
12
|
+
const run = spawnSync('git', gitArguments(['ls-files', '-z', '--others', '--ignored', '--exclude-standard', '--directory', '--', directory]), { cwd: root, encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'], maxBuffer: 1 << 28 });
|
|
12
13
|
if (run.status !== 0 || typeof run.stdout !== 'string') {
|
|
13
14
|
return nothingIgnored;
|
|
14
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-ignored.js","sourceRoot":"","sources":["../../../src/check/project/git-ignored.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,I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AAC,KAAK,EAAE,WAAW,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;AACtG,CAAC;AAED,SAAS,cAAc;IACrB,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authz-declared.d.ts","sourceRoot":"","sources":["../../../src/check/rules/authz-declared.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"authz-declared.d.ts","sourceRoot":"","sources":["../../../src/check/rules/authz-declared.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AA2B1C,eAAO,MAAM,aAAa,EAAE,IAsB3B,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { onKitContainer } from '../../config/index.js';
|
|
1
2
|
import { declaredRoleOf } from '../../declared/index.js';
|
|
2
3
|
import { classesOf } from '../declarations/classes-of.js';
|
|
3
4
|
import { inContext } from '../support/in-context.js';
|
|
@@ -33,7 +34,7 @@ export const authzDeclared = {
|
|
|
33
34
|
},
|
|
34
35
|
/** Modules wired by hand list their use cases in an authorization map: every command and query has to be in it. */
|
|
35
36
|
acrossProject(project) {
|
|
36
|
-
if (project.config
|
|
37
|
+
if (onKitContainer(project.config) || isDeclaredStyle(project)) {
|
|
37
38
|
return [];
|
|
38
39
|
}
|
|
39
40
|
const declared = declaredUseCases(project);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authz-declared.js","sourceRoot":"","sources":["../../../src/check/rules/authz-declared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAKvD,OAAO,EAAE,SAAS,EAAE,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0D;YACpN,QAAQ,EAAE,qBAAqB,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC;SAC/E;KACF,CAAC;AACJ,CAAC;AAED,2FAA2F;AAC3F,SAAS,eAAe,CAAC,MAAyB,EAAE,IAAY;IAC9D,OAAO,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;AAC5F,CAAC;AAED,0IAA0I;AAC1I,SAAS,sBAAsB,CAAC,IAAgB;IAC9C,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IAE1B,OAAO,CACL,SAAS,CAAC,QAAQ,CAAC;QACnB,CAAC,IAAI,CAAC,MAAM;QACZ,CAAC,QAAQ,CAAC,KAAK,KAAK,QAAQ,IAAI,CAAC,QAAQ,CAAC,KAAK,KAAK,aAAa,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,eAAe,CAAC,CAAC,CAC9G,CAAC;AACJ,CAAC;AAED,SAAS,qBAAqB,CAAC,OAAgB,EAAE,OAAe;IAC9D,OAAO,OAAO,CAAC,KAAK,CAAC,MAAM,CACzB,CAAC,IAAI,EAAE,EAAE,CAAC,sBAAsB,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,KAAK,OAAO,CACxG,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The arguments of every git the CLI runs. A `core.fsmonitor` planted in the configuration of the
|
|
3
|
+
* repository never runs, and no optional lock is taken, so that a read does not refresh the index
|
|
4
|
+
* and start the `post-index-change` hook. A run that changes nothing also runs no hook of the
|
|
5
|
+
* project (`core.hooksPath=/dev/null`); `commit`, `merge` and the other writes keep them, since
|
|
6
|
+
* they are the gates of the project.
|
|
7
|
+
*/
|
|
8
|
+
export declare function gitArguments(args: readonly string[]): string[];
|
|
9
|
+
//# sourceMappingURL=git-arguments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-arguments.d.ts","sourceRoot":"","sources":["../../src/commit/git-arguments.ts"],"names":[],"mappings":"AA4BA;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAI9D"}
|