ddd-ts-kit 0.83.3 → 0.83.4

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.
Files changed (72) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.fr.md +2 -1
  3. package/README.md +1 -0
  4. package/dist/affected/format-selection.d.ts +2 -0
  5. package/dist/affected/format-selection.d.ts.map +1 -1
  6. package/dist/affected/format-selection.js +1 -1
  7. package/dist/affected/format-selection.js.map +1 -1
  8. package/dist/affected/run-affected.d.ts +18 -0
  9. package/dist/affected/run-affected.d.ts.map +1 -0
  10. package/dist/affected/run-affected.js +35 -0
  11. package/dist/affected/run-affected.js.map +1 -0
  12. package/dist/check/authz/scoped-permission.d.ts +15 -0
  13. package/dist/check/authz/scoped-permission.d.ts.map +1 -0
  14. package/dist/check/authz/scoped-permission.js +39 -0
  15. package/dist/check/authz/scoped-permission.js.map +1 -0
  16. package/dist/check/authz/signed-in-grant-sources.d.ts +22 -0
  17. package/dist/check/authz/signed-in-grant-sources.d.ts.map +1 -0
  18. package/dist/check/authz/signed-in-grant-sources.js +63 -0
  19. package/dist/check/authz/signed-in-grant-sources.js.map +1 -0
  20. package/dist/check/authz/signed-in-grants.d.ts +5 -0
  21. package/dist/check/authz/signed-in-grants.d.ts.map +1 -0
  22. package/dist/check/authz/signed-in-grants.js +6 -0
  23. package/dist/check/authz/signed-in-grants.js.map +1 -0
  24. package/dist/check/catalogue/architecture-rules.d.ts.map +1 -1
  25. package/dist/check/catalogue/architecture-rules.js +2 -0
  26. package/dist/check/catalogue/architecture-rules.js.map +1 -1
  27. package/dist/check/catalogue/default-severities.d.ts.map +1 -1
  28. package/dist/check/catalogue/default-severities.js +1 -0
  29. package/dist/check/catalogue/default-severities.js.map +1 -1
  30. package/dist/check/explain/authz-docs.d.ts.map +1 -1
  31. package/dist/check/explain/authz-docs.js +13 -0
  32. package/dist/check/explain/authz-docs.js.map +1 -1
  33. package/dist/check/fixtures/authz-scope-narrows-fixtures.d.ts +3 -0
  34. package/dist/check/fixtures/authz-scope-narrows-fixtures.d.ts.map +1 -0
  35. package/dist/check/fixtures/authz-scope-narrows-fixtures.js +111 -0
  36. package/dist/check/fixtures/authz-scope-narrows-fixtures.js.map +1 -0
  37. package/dist/check/fixtures/fixtures.d.ts.map +1 -1
  38. package/dist/check/fixtures/fixtures.js +2 -0
  39. package/dist/check/fixtures/fixtures.js.map +1 -1
  40. package/dist/check/rules/authz-granted.d.ts.map +1 -1
  41. package/dist/check/rules/authz-granted.js +4 -4
  42. package/dist/check/rules/authz-granted.js.map +1 -1
  43. package/dist/check/rules/authz-scope-narrows.d.ts +12 -0
  44. package/dist/check/rules/authz-scope-narrows.d.ts.map +1 -0
  45. package/dist/check/rules/authz-scope-narrows.js +73 -0
  46. package/dist/check/rules/authz-scope-narrows.js.map +1 -0
  47. package/dist/commands/affected.d.ts +3 -1
  48. package/dist/commands/affected.d.ts.map +1 -1
  49. package/dist/commands/affected.js +12 -2
  50. package/dist/commands/affected.js.map +1 -1
  51. package/dist/generate/errors/refusal-code.d.ts +1 -1
  52. package/dist/generate/errors/refusal-code.d.ts.map +1 -1
  53. package/dist/generate/errors/refusal-code.js +8 -1
  54. package/dist/generate/errors/refusal-code.js.map +1 -1
  55. package/dist/help/notes.d.ts +1 -1
  56. package/dist/help/notes.d.ts.map +1 -1
  57. package/dist/help/notes.js +4 -1
  58. package/dist/help/notes.js.map +1 -1
  59. package/dist/help/usage.d.ts +1 -1
  60. package/dist/help/usage.d.ts.map +1 -1
  61. package/dist/help/usage.js +1 -0
  62. package/dist/help/usage.js.map +1 -1
  63. package/dist/init/manifest/versions.js +24 -24
  64. package/dist/slice/format-slice-verification.js +6 -2
  65. package/dist/slice/format-slice-verification.js.map +1 -1
  66. package/dist/version.d.ts +1 -1
  67. package/dist/version.js +1 -1
  68. package/package.json +2 -2
  69. package/templates/init/jest.config.js.tpl +2 -0
  70. package/templates/pipeline/lefthook.yml +3 -1
  71. package/templates/pipeline/package-scripts.json +1 -1
  72. package/templates/pipeline/vitest.config.ts.tpl +3 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ddd-ts-kit",
3
- "version": "0.83.3",
3
+ "version": "0.83.4",
4
4
  "description": "Bootstrap, scaffold and verify Domain-Driven Design (DDD), Clean Architecture and hexagonal TypeScript backends on Node.js: project and code generators, architecture checks, OpenAPI and AsyncAPI documents, for developers and AI coding agents (Claude Code, Codex, GitHub Copilot).",
5
5
  "keywords": [
6
6
  "ddd",
@@ -52,6 +52,6 @@
52
52
  "clean:packages": "node dist/bin.js check --clean-only ../kernel/src ../validation/src ../http/src ../tracing/src ../di/src ../events/src ../testing/src ../s3/src ../drizzle/src ../knex/src ../prisma/src ../typeorm/src ../aspects/src ../rabbitmq/src ../auth/src ../audit/src ../redis/src ../scheduling/src ../pino/src ../winston/src ../sentry/src ../kafka/src ../nats/src ../eslint-plugin/src"
53
53
  },
54
54
  "devDependencies": {
55
- "@ddd-ts-kit/kernel": "^0.83.3"
55
+ "@ddd-ts-kit/kernel": "^0.83.4"
56
56
  }
57
57
  }
@@ -29,6 +29,8 @@ export default {
29
29
  },
30
30
  ],
31
31
  },
32
+ // A developer machine shares its cores with the editor, the coding agents and their worktrees: the specs take half of them. A pipeline runner has its own.
33
+ ...(process.env.CI ? {} : { maxWorkers: '50%' }),
32
34
  coverageProvider: 'v8',
33
35
  coverageReporters: ['text', 'cobertura', 'lcov'],
34
36
  coverageDirectory: 'coverage',
@@ -23,7 +23,9 @@ pre-push:
23
23
  - name: typecheck
24
24
  run: npm run ci:typecheck
25
25
  - name: unit tests
26
- run: npm run ci:test:unit
26
+ # The contexts the branch reaches and the ones downstream of them, as on a pull request; everything when git
27
+ # cannot tell (no origin/HEAD: `git remote set-head origin --auto`). The pipeline runs everything on the trunk.
28
+ run: npx --no -- ddd-ts-kit affected --base origin/HEAD --run ci:test:unit
27
29
  - name: merges
28
30
  run: npx --no -- ddd-ts-kit verify-merge --warn
29
31
 
@@ -23,7 +23,7 @@
23
23
  "@biomejs/biome": "2.5.15",
24
24
  "@commitlint/cli": "^21.2.3",
25
25
  "@commitlint/config-conventional": "^21.2.3",
26
- "@ddd-ts-kit/eslint-plugin": "^0.83.3",
26
+ "@ddd-ts-kit/eslint-plugin": "^0.83.4",
27
27
  "@eslint/js": "^10.0.1",
28
28
  "@typescript/native": "npm:typescript@~7.0.2",
29
29
  "@vitest/coverage-v8": "5.0.3",
@@ -11,6 +11,8 @@ const INTEGRATION_SPECS = '{{config.contextsDir}}/*/test/integration/**/*.spec.t
11
11
  const INTEGRATION_MODE = 'integration';
12
12
  // A pull request names the contexts its change reaches (DDD_TS_KIT_AFFECTED, from `ddd-ts-kit affected`): the specs of the others are left to the default branch.
13
13
  const NOT_AFFECTED = unaffectedContexts().map((directory) => `${directory}**`);
14
+ // A developer machine shares its cores with the editor, the coding agents and their worktrees: the specs take half of them. A pipeline runner has its own.
15
+ const WORKERS = process.env.CI ? {} : { maxWorkers: '50%' };
14
16
 
15
17
  const UNIT_PROJECT: TestProjectInlineConfiguration = {
16
18
  extends: true,
@@ -52,6 +54,7 @@ export default defineConfig(({ mode }) => ({
52
54
  test: {
53
55
  // The integration project has no spec before the first repository or adapter of the project: its run passes until then.
54
56
  passWithNoTests: mode === INTEGRATION_MODE,
57
+ ...WORKERS,
55
58
  {{#if assembly.discovery}}
56
59
  // Discovery imports the role files of a context itself: inlined, the package loads them through the runner, which compiles them.
57
60
  server: { deps: { inline: ['@ddd-ts-kit/di'] } },