ddd-ts-kit 0.22.0 → 0.23.1

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 (251) hide show
  1. package/CHANGELOG.md +85 -1
  2. package/README.fr.md +15 -3
  3. package/README.md +13 -2
  4. package/dist/check/commands/changed-files.d.ts +6 -1
  5. package/dist/check/commands/changed-files.d.ts.map +1 -1
  6. package/dist/check/commands/changed-files.js +15 -11
  7. package/dist/check/commands/changed-files.js.map +1 -1
  8. package/dist/check/events/domain-event-names.d.ts +1 -1
  9. package/dist/check/events/domain-event-names.d.ts.map +1 -1
  10. package/dist/check/events/domain-event-names.js +2 -2
  11. package/dist/check/events/domain-event-names.js.map +1 -1
  12. package/dist/check/explain/authz-docs.js +1 -1
  13. package/dist/check/explain/authz-docs.js.map +1 -1
  14. package/dist/check/explain/clean-docs.js +1 -1
  15. package/dist/check/explain/clean-docs.js.map +1 -1
  16. package/dist/check/explain/events-docs.d.ts.map +1 -1
  17. package/dist/check/explain/events-docs.js +2 -5
  18. package/dist/check/explain/events-docs.js.map +1 -1
  19. package/dist/check/explain/language-docs.js +1 -1
  20. package/dist/check/explain/language-docs.js.map +1 -1
  21. package/dist/check/explain/layout-docs.js +1 -1
  22. package/dist/check/explain/layout-docs.js.map +1 -1
  23. package/dist/check/explain/schema-docs.js +1 -1
  24. package/dist/check/explain/schema-docs.js.map +1 -1
  25. package/dist/check/fixtures/authz-policy-fixtures.d.ts.map +1 -1
  26. package/dist/check/fixtures/authz-policy-fixtures.js +12 -0
  27. package/dist/check/fixtures/authz-policy-fixtures.js.map +1 -1
  28. package/dist/check/fixtures/clean-fixtures.d.ts.map +1 -1
  29. package/dist/check/fixtures/clean-fixtures.js +18 -1
  30. package/dist/check/fixtures/clean-fixtures.js.map +1 -1
  31. package/dist/check/fixtures/layout-fixtures.d.ts.map +1 -1
  32. package/dist/check/fixtures/layout-fixtures.js +15 -0
  33. package/dist/check/fixtures/layout-fixtures.js.map +1 -1
  34. package/dist/check/fixtures/schema-fixtures.d.ts.map +1 -1
  35. package/dist/check/fixtures/schema-fixtures.js +10 -0
  36. package/dist/check/fixtures/schema-fixtures.js.map +1 -1
  37. package/dist/check/fixtures/vocabulary-fixtures.d.ts.map +1 -1
  38. package/dist/check/fixtures/vocabulary-fixtures.js +23 -0
  39. package/dist/check/fixtures/vocabulary-fixtures.js.map +1 -1
  40. package/dist/check/rules/authz-policy-asked.js +5 -4
  41. package/dist/check/rules/authz-policy-asked.js.map +1 -1
  42. package/dist/check/rules/clean-file-size.d.ts.map +1 -1
  43. package/dist/check/rules/clean-file-size.js +28 -14
  44. package/dist/check/rules/clean-file-size.js.map +1 -1
  45. package/dist/check/rules/clean-function-size.js +11 -3
  46. package/dist/check/rules/clean-function-size.js.map +1 -1
  47. package/dist/check/rules/events-name-declared-once.d.ts.map +1 -1
  48. package/dist/check/rules/events-name-declared-once.js +6 -6
  49. package/dist/check/rules/events-name-declared-once.js.map +1 -1
  50. package/dist/check/rules/language-declared-vocabulary.d.ts.map +1 -1
  51. package/dist/check/rules/language-declared-vocabulary.js +23 -3
  52. package/dist/check/rules/language-declared-vocabulary.js.map +1 -1
  53. package/dist/check/schemas/still-generated.js +1 -1
  54. package/dist/check/schemas/still-generated.js.map +1 -1
  55. package/dist/commands/doctor.d.ts +4 -0
  56. package/dist/commands/doctor.d.ts.map +1 -0
  57. package/dist/commands/doctor.js +15 -0
  58. package/dist/commands/doctor.js.map +1 -0
  59. package/dist/commands/status.d.ts +4 -1
  60. package/dist/commands/status.d.ts.map +1 -1
  61. package/dist/commands/status.js +12 -2
  62. package/dist/commands/status.js.map +1 -1
  63. package/dist/commands/todo.d.ts +1 -1
  64. package/dist/commands/todo.d.ts.map +1 -1
  65. package/dist/commands/todo.js +2 -1
  66. package/dist/commands/todo.js.map +1 -1
  67. package/dist/commands/verify-slice.d.ts +4 -0
  68. package/dist/commands/verify-slice.d.ts.map +1 -0
  69. package/dist/commands/verify-slice.js +21 -0
  70. package/dist/commands/verify-slice.js.map +1 -0
  71. package/dist/doctor/diagnose.d.ts +9 -0
  72. package/dist/doctor/diagnose.d.ts.map +1 -0
  73. package/dist/doctor/diagnose.js +34 -0
  74. package/dist/doctor/diagnose.js.map +1 -0
  75. package/dist/doctor/doctor-finding.d.ts +11 -0
  76. package/dist/doctor/doctor-finding.d.ts.map +1 -0
  77. package/dist/doctor/doctor-finding.js +2 -0
  78. package/dist/doctor/doctor-finding.js.map +1 -0
  79. package/dist/doctor/format-diagnosis.d.ts +4 -0
  80. package/dist/doctor/format-diagnosis.d.ts.map +1 -0
  81. package/dist/doctor/format-diagnosis.js +25 -0
  82. package/dist/doctor/format-diagnosis.js.map +1 -0
  83. package/dist/doctor/package-findings.d.ts +8 -0
  84. package/dist/doctor/package-findings.d.ts.map +1 -0
  85. package/dist/doctor/package-findings.js +21 -0
  86. package/dist/doctor/package-findings.js.map +1 -0
  87. package/dist/doctor/permission-findings.d.ts +5 -0
  88. package/dist/doctor/permission-findings.d.ts.map +1 -0
  89. package/dist/doctor/permission-findings.js +16 -0
  90. package/dist/doctor/permission-findings.js.map +1 -0
  91. package/dist/doctor/script-findings.d.ts +5 -0
  92. package/dist/doctor/script-findings.d.ts.map +1 -0
  93. package/dist/doctor/script-findings.js +12 -0
  94. package/dist/doctor/script-findings.js.map +1 -0
  95. package/dist/generate/kinds/assert-declares-its-name.js +1 -1
  96. package/dist/generate/kinds/assert-declares-its-name.js.map +1 -1
  97. package/dist/generate/kinds/declares-its-name.d.ts +1 -1
  98. package/dist/generate/kinds/declares-its-name.d.ts.map +1 -1
  99. package/dist/generate/kinds/declares-its-name.js +2 -2
  100. package/dist/generate/kinds/declares-its-name.js.map +1 -1
  101. package/dist/generate/shared-writes.d.ts.map +1 -1
  102. package/dist/generate/shared-writes.js +4 -1
  103. package/dist/generate/shared-writes.js.map +1 -1
  104. package/dist/help/notes.d.ts +1 -1
  105. package/dist/help/notes.d.ts.map +1 -1
  106. package/dist/help/notes.js +12 -1
  107. package/dist/help/notes.js.map +1 -1
  108. package/dist/help/usage.d.ts +1 -1
  109. package/dist/help/usage.d.ts.map +1 -1
  110. package/dist/help/usage.js +3 -1
  111. package/dist/help/usage.js.map +1 -1
  112. package/dist/init/agent-permissions.d.ts +8 -0
  113. package/dist/init/agent-permissions.d.ts.map +1 -0
  114. package/dist/init/agent-permissions.js +55 -0
  115. package/dist/init/agent-permissions.js.map +1 -0
  116. package/dist/init/manifest/versions.js +24 -24
  117. package/dist/init/write-agent-settings.d.ts.map +1 -1
  118. package/dist/init/write-agent-settings.js +1 -53
  119. package/dist/init/write-agent-settings.js.map +1 -1
  120. package/dist/progress/format-progress.js +7 -1
  121. package/dist/progress/format-progress.js.map +1 -1
  122. package/dist/progress/progress.d.ts +4 -0
  123. package/dist/progress/progress.d.ts.map +1 -1
  124. package/dist/progress/read-progress.js +4 -1
  125. package/dist/progress/read-progress.js.map +1 -1
  126. package/dist/progress/read-slice-rules.d.ts.map +1 -1
  127. package/dist/progress/read-slice-rules.js +6 -2
  128. package/dist/progress/read-slice-rules.js.map +1 -1
  129. package/dist/progress/remaining-in.d.ts.map +1 -1
  130. package/dist/progress/remaining-in.js +10 -8
  131. package/dist/progress/remaining-in.js.map +1 -1
  132. package/dist/progress/remaining.d.ts +3 -3
  133. package/dist/progress/remaining.d.ts.map +1 -1
  134. package/dist/run.d.ts.map +1 -1
  135. package/dist/run.js +4 -0
  136. package/dist/run.js.map +1 -1
  137. package/dist/slice/changed-entries.d.ts +7 -0
  138. package/dist/slice/changed-entries.d.ts.map +1 -0
  139. package/dist/slice/changed-entries.js +20 -0
  140. package/dist/slice/changed-entries.js.map +1 -0
  141. package/dist/slice/changed-entry.d.ts +6 -0
  142. package/dist/slice/changed-entry.d.ts.map +1 -0
  143. package/dist/slice/changed-entry.js +2 -0
  144. package/dist/slice/changed-entry.js.map +1 -0
  145. package/dist/slice/format-slice-verification.d.ts +4 -0
  146. package/dist/slice/format-slice-verification.d.ts.map +1 -0
  147. package/dist/slice/format-slice-verification.js +50 -0
  148. package/dist/slice/format-slice-verification.js.map +1 -0
  149. package/dist/slice/near-the-limit.d.ts +7 -0
  150. package/dist/slice/near-the-limit.d.ts.map +1 -0
  151. package/dist/slice/near-the-limit.js +24 -0
  152. package/dist/slice/near-the-limit.js.map +1 -0
  153. package/dist/slice/plan-staging.d.ts +13 -0
  154. package/dist/slice/plan-staging.d.ts.map +1 -0
  155. package/dist/slice/plan-staging.js +52 -0
  156. package/dist/slice/plan-staging.js.map +1 -0
  157. package/dist/slice/run-script.d.ts +9 -0
  158. package/dist/slice/run-script.d.ts.map +1 -0
  159. package/dist/slice/run-script.js +26 -0
  160. package/dist/slice/run-script.js.map +1 -0
  161. package/dist/slice/script-call.d.ts +9 -0
  162. package/dist/slice/script-call.d.ts.map +1 -0
  163. package/dist/slice/script-call.js +2 -0
  164. package/dist/slice/script-call.js.map +1 -0
  165. package/dist/slice/script-run.d.ts +6 -0
  166. package/dist/slice/script-run.d.ts.map +1 -0
  167. package/dist/slice/script-run.js +2 -0
  168. package/dist/slice/script-run.js.map +1 -0
  169. package/dist/slice/sized-file.d.ts +6 -0
  170. package/dist/slice/sized-file.d.ts.map +1 -0
  171. package/dist/slice/sized-file.js +2 -0
  172. package/dist/slice/sized-file.js.map +1 -0
  173. package/dist/slice/slice-to-verify.d.ts +9 -0
  174. package/dist/slice/slice-to-verify.d.ts.map +1 -0
  175. package/dist/slice/slice-to-verify.js +2 -0
  176. package/dist/slice/slice-to-verify.js.map +1 -0
  177. package/dist/slice/slice-verification.d.ts +18 -0
  178. package/dist/slice/slice-verification.d.ts.map +1 -0
  179. package/dist/slice/slice-verification.js +2 -0
  180. package/dist/slice/slice-verification.js.map +1 -0
  181. package/dist/slice/staging-plan.d.ts +6 -0
  182. package/dist/slice/staging-plan.d.ts.map +1 -0
  183. package/dist/slice/staging-plan.js +2 -0
  184. package/dist/slice/staging-plan.js.map +1 -0
  185. package/dist/slice/verify-slice.d.ts +10 -0
  186. package/dist/slice/verify-slice.d.ts.map +1 -0
  187. package/dist/slice/verify-slice.js +48 -0
  188. package/dist/slice/verify-slice.js.map +1 -0
  189. package/dist/version.d.ts +1 -1
  190. package/dist/version.js +1 -1
  191. package/dist/worker/briefing-of.d.ts.map +1 -1
  192. package/dist/worker/briefing-of.js +30 -13
  193. package/dist/worker/briefing-of.js.map +1 -1
  194. package/dist/worker/changed-files.d.ts +7 -0
  195. package/dist/worker/changed-files.d.ts.map +1 -0
  196. package/dist/worker/changed-files.js +20 -0
  197. package/dist/worker/changed-files.js.map +1 -0
  198. package/dist/worker/format-workers.d.ts +4 -0
  199. package/dist/worker/format-workers.d.ts.map +1 -0
  200. package/dist/worker/format-workers.js +47 -0
  201. package/dist/worker/format-workers.js.map +1 -0
  202. package/dist/worker/list-worktrees.d.ts +10 -0
  203. package/dist/worker/list-worktrees.d.ts.map +1 -0
  204. package/dist/worker/list-worktrees.js +18 -0
  205. package/dist/worker/list-worktrees.js.map +1 -0
  206. package/dist/worker/open-worker-scope.d.ts.map +1 -1
  207. package/dist/worker/open-worker-scope.js +6 -7
  208. package/dist/worker/open-worker-scope.js.map +1 -1
  209. package/dist/worker/overlaps-of.d.ts +4 -0
  210. package/dist/worker/overlaps-of.d.ts.map +1 -0
  211. package/dist/worker/overlaps-of.js +17 -0
  212. package/dist/worker/overlaps-of.js.map +1 -0
  213. package/dist/worker/read-worker-file.d.ts +4 -0
  214. package/dist/worker/read-worker-file.d.ts.map +1 -0
  215. package/dist/worker/read-worker-file.js +18 -0
  216. package/dist/worker/read-worker-file.js.map +1 -0
  217. package/dist/worker/read-workers.d.ts +8 -0
  218. package/dist/worker/read-workers.d.ts.map +1 -0
  219. package/dist/worker/read-workers.js +56 -0
  220. package/dist/worker/read-workers.js.map +1 -0
  221. package/dist/worker/report-file.d.ts +3 -0
  222. package/dist/worker/report-file.d.ts.map +1 -0
  223. package/dist/worker/report-file.js +3 -0
  224. package/dist/worker/report-file.js.map +1 -0
  225. package/dist/worker/worker-file.d.ts +14 -0
  226. package/dist/worker/worker-file.d.ts.map +1 -0
  227. package/dist/worker/worker-file.js +2 -0
  228. package/dist/worker/worker-file.js.map +1 -0
  229. package/dist/worker/worker-generators.d.ts +4 -1
  230. package/dist/worker/worker-generators.d.ts.map +1 -1
  231. package/dist/worker/worker-generators.js +5 -2
  232. package/dist/worker/worker-generators.js.map +1 -1
  233. package/dist/worker/workers-status.d.ts +48 -0
  234. package/dist/worker/workers-status.d.ts.map +1 -0
  235. package/dist/worker/workers-status.js +2 -0
  236. package/dist/worker/workers-status.js.map +1 -0
  237. package/package.json +2 -2
  238. package/templates/domain-event/domain-event.ts.tpl +5 -7
  239. package/templates/pipeline/package-scripts.json +1 -1
  240. package/templates/presets/identity/context/domain/events/account-deactivated.event.ts.tpl +5 -7
  241. package/templates/presets/identity/context/domain/events/account-provisioned.event.ts.tpl +5 -7
  242. package/templates/presets/identity/context/domain/events/delegation-granted.event.ts.tpl +5 -7
  243. package/templates/presets/identity/context/domain/events/delegation-revoked.event.ts.tpl +5 -7
  244. package/templates/presets/identity/context/domain/events/invitation-accepted.event.ts.tpl +5 -7
  245. package/templates/presets/identity/context/domain/events/invitation-declined.event.ts.tpl +5 -7
  246. package/templates/presets/identity/context/domain/events/invitation-issued.event.ts.tpl +5 -7
  247. package/templates/presets/identity/context/domain/events/invitation-revoked.event.ts.tpl +5 -7
  248. package/templates/presets/identity/context/domain/events/member-joined.event.ts.tpl +5 -7
  249. package/templates/presets/identity/context/domain/events/member-removed.event.ts.tpl +5 -7
  250. package/templates/presets/identity/context/domain/events/member-role-changed.event.ts.tpl +5 -7
  251. package/templates/presets/identity/context/domain/events/organisation-opened.event.ts.tpl +5 -7
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify-slice.d.ts","sourceRoot":"","sources":["../../src/commands/verify-slice.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAG5C,8GAA8G;AAC9G,eAAO,MAAM,kBAAkB,EAAE,OAmBhC,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { CliError } from '../cli-error.js';
2
+ import { readConfig } from '../config/index.js';
3
+ import { formatSliceVerification } from '../slice/format-slice-verification.js';
4
+ import { verifySlice } from '../slice/verify-slice.js';
5
+ import { Arguments } from './arguments.js';
6
+ import { knownContext } from './known-context.js';
7
+ /** Closes a slice before its commit in one command: regenerate, check the changed files, test the context. */
8
+ export const verifySliceCommand = (argv, io) => {
9
+ const args = Arguments.parse(argv, { since: { type: 'string' } });
10
+ const root = args.projectRoot;
11
+ const { config } = readConfig(root);
12
+ const context = knownContext(config, args.positionals[0]);
13
+ const since = args.text('since');
14
+ if (since === undefined) {
15
+ throw new CliError('verify-slice checks the files changed since the trunk of the slice.', `Name it: \`ddd-ts-kit verify-slice ${context} --since origin/main\` (the trunk of your briefing).`);
16
+ }
17
+ const verification = verifySlice({ root, config, context, since });
18
+ io.out(args.json ? JSON.stringify(verification, null, 2) : formatSliceVerification(verification));
19
+ return verification.ok ? 0 : 1;
20
+ };
21
+ //# sourceMappingURL=verify-slice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify-slice.js","sourceRoot":"","sources":["../../src/commands/verify-slice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,8GAA8G;AAC9G,MAAM,CAAC,MAAM,kBAAkB,GAAY,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE;IACtD,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;IAClE,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC;IAC9B,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IACpC,MAAM,OAAO,GAAG,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1D,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAEjC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,IAAI,QAAQ,CAChB,qEAAqE,EACrE,sCAAsC,OAAO,sDAAsD,CACpG,CAAC;IACJ,CAAC;IAED,MAAM,YAAY,GAAG,WAAW,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;IAEnE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC,YAAY,CAAC,CAAC,CAAC;IAElG,OAAO,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACjC,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { Config } from '../config/index.js';
2
+ import type { DoctorFinding } from './doctor-finding.js';
3
+ /**
4
+ * What the project lacks of what this version of the kit writes, the steps an upgrade leaves to do:
5
+ * scripts, packages of the kit, permissions of the agents. Settings the project does not have
6
+ * are not judged: an agent may run elsewhere than Claude Code.
7
+ */
8
+ export declare function diagnose(root: string, config: Config): DoctorFinding[];
9
+ //# sourceMappingURL=diagnose.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnose.d.ts","sourceRoot":"","sources":["../../src/doctor/diagnose.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAKzD;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,EAAE,CAgBtE"}
@@ -0,0 +1,34 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import { isRecord } from '../config/values/is-record.js';
4
+ import { packageFindings } from './package-findings.js';
5
+ import { permissionFindings } from './permission-findings.js';
6
+ import { scriptFindings } from './script-findings.js';
7
+ /**
8
+ * What the project lacks of what this version of the kit writes, the steps an upgrade leaves to do:
9
+ * scripts, packages of the kit, permissions of the agents. Settings the project does not have
10
+ * are not judged: an agent may run elsewhere than Claude Code.
11
+ */
12
+ export function diagnose(root, config) {
13
+ const manifest = readJson(path.join(root, 'package.json'));
14
+ const scripts = isRecord(manifest) && isRecord(manifest['scripts']) ? manifest['scripts'] : {};
15
+ const installed = {
16
+ ...(isRecord(manifest) && isRecord(manifest['dependencies']) ? manifest['dependencies'] : {}),
17
+ ...(isRecord(manifest) && isRecord(manifest['devDependencies']) ? manifest['devDependencies'] : {}),
18
+ };
19
+ const settingsFile = path.join(root, '.claude', 'settings.json');
20
+ return [
21
+ ...scriptFindings(config, scripts),
22
+ ...packageFindings(config, installed),
23
+ ...(fs.existsSync(settingsFile) ? permissionFindings(config, readJson(settingsFile)) : []),
24
+ ];
25
+ }
26
+ function readJson(file) {
27
+ try {
28
+ return JSON.parse(fs.readFileSync(file, 'utf8'));
29
+ }
30
+ catch {
31
+ return undefined;
32
+ }
33
+ }
34
+ //# sourceMappingURL=diagnose.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnose.js","sourceRoot":"","sources":["../../src/doctor/diagnose.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WA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AE,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KAC3F,CAAC;AACJ,CAAC;AAED,SAAS,QAAQ,CAAC,IAAY;IAC5B,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;IACnD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
@@ -0,0 +1,11 @@
1
+ /** One thing a project lacks, or writes otherwise, compared with what this version of the kit writes. */
2
+ export interface DoctorFinding {
3
+ readonly area: 'script' | 'package' | 'permission';
4
+ readonly name: string;
5
+ readonly problem: 'missing' | 'other version' | 'written otherwise';
6
+ /** What this version writes. */
7
+ readonly expected: string;
8
+ /** What the project has, when it has something. */
9
+ readonly found?: string;
10
+ }
11
+ //# sourceMappingURL=doctor-finding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor-finding.d.ts","sourceRoot":"","sources":["../../src/doctor/doctor-finding.ts"],"names":[],"mappings":"AAAA,yGAAyG;AACzG,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,YAAY,CAAC;IACnD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,SAAS,GAAG,eAAe,GAAG,mBAAmB,CAAC;IACpE,gCAAgC;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,mDAAmD;IACnD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=doctor-finding.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor-finding.js","sourceRoot":"","sources":["../../src/doctor/doctor-finding.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { DoctorFinding } from './doctor-finding.js';
2
+ /** The findings by area, each with what this version writes, then how to take what is missing. */
3
+ export declare function formatDiagnosis(findings: readonly DoctorFinding[], version: string): string;
4
+ //# sourceMappingURL=format-diagnosis.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format-diagnosis.d.ts","sourceRoot":"","sources":["../../src/doctor/format-diagnosis.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,kGAAkG;AAClG,wBAAgB,eAAe,CAAC,QAAQ,EAAE,SAAS,aAAa,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAQ3F"}
@@ -0,0 +1,25 @@
1
+ /** The findings by area, each with what this version writes, then how to take what is missing. */
2
+ export function formatDiagnosis(findings, version) {
3
+ if (findings.length === 0) {
4
+ return `The project has what ddd-ts-kit ${version} writes: scripts, packages of the kit and permissions.`;
5
+ }
6
+ return [`Compared with what ddd-ts-kit ${version} writes:`, ...findings.map(lineOf), '', ...fixesOf(findings)].join('\n');
7
+ }
8
+ function lineOf({ area, name, problem, expected, found }) {
9
+ const yours = found === undefined ? '' : `; yours: ${found}`;
10
+ return ` ${area} ${name}: ${problem} (${version(area)}${expected}${yours})`;
11
+ }
12
+ function version(area) {
13
+ return area === 'package' ? 'range ' : '';
14
+ }
15
+ function fixesOf(findings) {
16
+ const fixes = ['fix: `npx ddd-ts-kit init` adds what is missing and leaves what the project wrote; then install.'];
17
+ if (findings.some((finding) => finding.area === 'package' && finding.problem === 'other version')) {
18
+ fixes.push('fix: upgrade `ddd-ts-kit` and every `@ddd-ts-kit/*` package together, to the ranges above; the steps of each version are in node_modules/ddd-ts-kit/CHANGELOG.md.');
19
+ }
20
+ if (findings.some((finding) => finding.problem === 'written otherwise')) {
21
+ fixes.push("note: a script written otherwise may be yours on purpose; `npx ddd-ts-kit init --force` writes the kit's version over it.");
22
+ }
23
+ return fixes;
24
+ }
25
+ //# sourceMappingURL=format-diag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AAI,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,KAAK,mBAAmB,CAAC,EAAE,CAAC;QACxE,KAAK,CAAC,IAAI,CACR,2HAA2H,CAC5H,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { Config } from '../config/index.js';
2
+ import type { DoctorFinding } from './doctor-finding.js';
3
+ /**
4
+ * The packages of the kit the project needs for its stack, missing or at another range than this
5
+ * version writes: they are upgraded together, never one alone.
6
+ */
7
+ export declare function packageFindings(config: Config, installed: Readonly<Record<string, unknown>>): DoctorFinding[];
8
+ //# sourceMappingURL=package-findings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-findings.d.ts","sourceRoot":"","sources":["../../src/doctor/package-findings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAKzD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,aAAa,EAAE,CAe7G"}
@@ -0,0 +1,21 @@
1
+ import { dependenciesFor } from '../init/manifest/dependencies-for.js';
2
+ /** The packages of the kit are released together: each one at the range this version writes. */
3
+ const OF_THE_KIT = /^(?:ddd-ts-kit|@ddd-ts-kit\/.+)$/;
4
+ /**
5
+ * The packages of the kit the project needs for its stack, missing or at another range than this
6
+ * version writes: they are upgraded together, never one alone.
7
+ */
8
+ export function packageFindings(config, installed) {
9
+ const wanted = dependenciesFor(config);
10
+ const expected = { ...wanted.dependencies, ...wanted.devDependencies };
11
+ return Object.entries(expected)
12
+ .filter(([name]) => OF_THE_KIT.test(name))
13
+ .flatMap(([name, range]) => {
14
+ const found = installed[name];
15
+ if (typeof found !== 'string') {
16
+ return [{ area: 'package', name, problem: 'missing', expected: range }];
17
+ }
18
+ return found === range ? [] : [{ area: 'package', name, problem: 'other version', expected: range, found }];
19
+ });
20
+ }
21
+ //# sourceMappingURL=package-findings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-findings.js","sourceRoot":"","sources":["../../src/doctor/package-findings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAGvE,gGAAgG;AAChG,MAAM,UAAU,GAAG,kCAAkC,CAAC;AAEtD;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,MAAc,EAAE,SAA4C;IAC1F,MAAM,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;IACvC,MAAM,QAAQ,GAAG,EAAE,GAAG,MAAM,CAAC,YAAY,EAAE,GAAG,MAAM,CAAC,eAAe,EAAE,CAAC;IAEvE,OAAO,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC;SAC5B,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACzC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAmB,EAAE;QAC1C,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;QAE9B,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,OAAO,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;QAC1E,CAAC;QAED,OAAO,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IAC9G,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Config } from '../config/index.js';
2
+ import type { DoctorFinding } from './doctor-finding.js';
3
+ /** The permissions of `.claude/settings.json` this version writes that the project's settings lack. */
4
+ export declare function permissionFindings(config: Config, settings: unknown): DoctorFinding[];
5
+ //# sourceMappingURL=permission-findings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permission-findings.d.ts","sourceRoot":"","sources":["../../src/doctor/permission-findings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAIjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,uGAAuG;AACvG,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,aAAa,EAAE,CAcrF"}
@@ -0,0 +1,16 @@
1
+ import { AGENT_PERMISSIONS } from '../init/agent-permissions.js';
2
+ import { isRecord } from '../config/values/is-record.js';
3
+ import { inDialect } from '../package-manager/in-dialect.js';
4
+ /** The permissions of `.claude/settings.json` this version writes that the project's settings lack. */
5
+ export function permissionFindings(config, settings) {
6
+ const permissions = isRecord(settings) && isRecord(settings['permissions']) ? settings['permissions'] : {};
7
+ return Object.entries(AGENT_PERMISSIONS).flatMap(([kind, rules]) => {
8
+ const present = permissions[kind];
9
+ const held = Array.isArray(present) ? present : [];
10
+ return rules
11
+ .map((rule) => inDialect(rule, config.stack.packageManager))
12
+ .filter((rule) => !held.includes(rule))
13
+ .map((rule) => ({ area: 'permission', name: `${kind} ${rule}`, problem: 'missing', expected: rule }));
14
+ });
15
+ }
16
+ //# sourceMappingURL=permission-findings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permission-findings.js","sourceRoot":"","sources":["../../src/doctor/permission-findings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAG7D,uGAAuG;AACvG,MAAM,UAAU,kBAAkB,CAAC,MAAc,EAAE,QAAiB;IAClE,MAAM,WAAW,GAAG,QAAQ,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAE3G,OAAO,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE;QACjE,MAAM,OAAO,GAAY,WAAW,CAAC,IAAI,CAAC,CAAC;QAC3C,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QAEnD,OAAO,KAAK;aACT,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;aAC3D,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;aACtC,GAAG,CACF,CAAC,IAAI,EAAiB,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,IAAI,IAAI,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAC/G,CAAC;IACN,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Config } from '../config/index.js';
2
+ import type { DoctorFinding } from './doctor-finding.js';
3
+ /** The scripts this version writes that package.json lacks, then the ones it writes otherwise. */
4
+ export declare function scriptFindings(config: Config, scripts: Readonly<Record<string, unknown>>): DoctorFinding[];
5
+ //# sourceMappingURL=script-findings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"script-findings.d.ts","sourceRoot":"","sources":["../../src/doctor/script-findings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,kGAAkG;AAClG,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,aAAa,EAAE,CAU1G"}
@@ -0,0 +1,12 @@
1
+ import { scriptsFor } from '../init/manifest/scripts-for.js';
2
+ /** The scripts this version writes that package.json lacks, then the ones it writes otherwise. */
3
+ export function scriptFindings(config, scripts) {
4
+ return Object.entries(scriptsFor(config)).flatMap(([name, expected]) => {
5
+ const found = scripts[name];
6
+ if (typeof found !== 'string') {
7
+ return [{ area: 'script', name, problem: 'missing', expected }];
8
+ }
9
+ return found === expected ? [] : [{ area: 'script', name, problem: 'written otherwise', expected, found }];
10
+ });
11
+ }
12
+ //# sourceMappingURL=script-findings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"script-findings.js","sourceRoot":"","sources":["../../src/doctor/script-findings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAG7D,kGAAkG;AAClG,MAAM,UAAU,cAAc,CAAC,MAAc,EAAE,OAA0C;IACvF,OAAO,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAmB,EAAE;QACtF,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QAE5B,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,OAAO,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC;QAClE,CAAC;QAED,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;IAC7G,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -11,6 +11,6 @@ export function assertDeclaresItsName(scope, names) {
11
11
  if (!isDeclared(scope.config) || declaresItsName(scope, names)) {
12
12
  return;
13
13
  }
14
- throw new CliError(`${names.event.pascal} does not declare the name its events carry, and a declared reaction is attached under it.`, `In ${eventFileOf(scope, names)}, write \`static readonly eventName = '${names.eventName}';\` and \`readonly name = ${names.event.pascal}.eventName;\`, then run the command again.`);
14
+ throw new CliError(`${names.event.pascal} does not declare the name its events carry, and a declared reaction is attached under it.`, `In ${eventFileOf(scope, names)}, extend \`NamedDomainEvent('${names.eventName}')\` (or write \`static readonly eventName = '${names.eventName}';\` and \`readonly name = ${names.event.pascal}.eventName;\`), then run the command again.`);
15
15
  }
16
16
  //# sourceMappingURL=assert-declares-its-name.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"assert-declares-its-name.js","sourceRoot":"","sources":["../../../src/generate/kinds/assert-declares-its-name.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAY,EAAE,KAAiB;IACnE,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC;QAC/D,OAAO;IACT,CAAC;IAED,MAAM,IAAI,QAAQ,CAChB,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,4FAA4F,EACjH,MAAM,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,0CAA0C,KAAK,CAAC,SAAS,8BAA8B,KAAK,CAAC,KAAK,CAAC,MAAM,4CAA4C,CACrL,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"assert-declares-its-name.js","sourceRoot":"","sources":["../../../src/generate/kinds/assert-declares-its-name.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAY,EAAE,KAAiB;IACnE,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC;QAC/D,OAAO;IACT,CAAC;IAED,MAAM,IAAI,QAAQ,CAChB,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,4FAA4F,EACjH,MAAM,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,gCAAgC,KAAK,CAAC,SAAS,iDAAiD,KAAK,CAAC,SAAS,8BAA8B,KAAK,CAAC,KAAK,CAAC,MAAM,6CAA6C,CAC5O,CAAC;AACJ,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { EventNames } from '../event-names.js';
2
2
  import type { Scope } from '../scope.js';
3
- /** True when the event class declares once the name its events carry, `static readonly eventName = '..'`. */
3
+ /** True when the event class declares once the name its events carry, `extends NamedDomainEvent('..')` or `static readonly eventName = '..'`. */
4
4
  export declare function declaresItsName(scope: Scope, names: EventNames): boolean;
5
5
  //# sourceMappingURL=declares-its-name.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"declares-its-name.d.ts","sourceRoot":"","sources":["../../../src/generate/kinds/declares-its-name.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAKzC,6GAA6G;AAC7G,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAExE"}
1
+ {"version":3,"file":"declares-its-name.d.ts","sourceRoot":"","sources":["../../../src/generate/kinds/declares-its-name.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAKzC,iJAAiJ;AACjJ,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAExE"}
@@ -1,6 +1,6 @@
1
1
  import { eventFileOf } from './event-file-of.js';
2
- const DECLARES_ITS_NAME = /\bstatic\s+readonly\s+eventName\s*=/;
3
- /** True when the event class declares once the name its events carry, `static readonly eventName = '..'`. */
2
+ const DECLARES_ITS_NAME = /\bstatic\s+readonly\s+eventName\s*=|\bextends\s+NamedDomainEvent\s*\(/;
3
+ /** True when the event class declares once the name its events carry, `extends NamedDomainEvent('..')` or `static readonly eventName = '..'`. */
4
4
  export function declaresItsName(scope, names) {
5
5
  return DECLARES_ITS_NAME.test(scope.ws.read(eventFileOf(scope, names)) ?? '');
6
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"declares-its-name.js","sourceRoot":"","sources":["../../../src/generate/kinds/declares-its-name.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,MAAM,iBAAiB,GAAG,qCAAqC,CAAC;AAEhE,6GAA6G;AAC7G,MAAM,UAAU,eAAe,CAAC,KAAY,EAAE,KAAiB;IAC7D,OAAO,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AAChF,CAAC"}
1
+ {"version":3,"file":"declares-its-name.js","sourceRoot":"","sources":["../../../src/generate/kinds/declares-its-name.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,MAAM,iBAAiB,GAAG,uEAAuE,CAAC;AAElG,iJAAiJ;AACjJ,MAAM,UAAU,eAAe,CAAC,KAAY,EAAE,KAAiB;IAC7D,OAAO,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AAChF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"shared-writes.d.ts","sourceRoot":"","sources":["../../src/generate/shared-writes.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,MAAM,WAAW,WAAW;IAC1B,6CAA6C;IAC7C,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,2EAA2E;IAC3E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,wFAAwF;IACxF,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAcD,uJAAuJ;AACvJ,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAuE/D,CAAC"}
1
+ {"version":3,"file":"shared-writes.d.ts","sourceRoot":"","sources":["../../src/generate/shared-writes.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,MAAM,WAAW,WAAW;IAC1B,6CAA6C;IAC7C,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,2EAA2E;IAC3E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,wFAAwF;IACxF,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAcD,uJAAuJ;AACvJ,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CA0E/D,CAAC"}
@@ -71,7 +71,10 @@ export const SHARED_WRITES = {
71
71
  '<platformDir>/config/load-config.ts',
72
72
  ],
73
73
  },
74
- adr: { files: ['docs/adr/', 'ddd-ts-kit.config.json (with --deviation)'] },
74
+ adr: {
75
+ files: ['docs/adr/', 'ddd-ts-kit.config.json (with --deviation)'],
76
+ worker: 'without --deviation: a decision of its slices',
77
+ },
75
78
  schema: {
76
79
  files: ['<sharedKernelDir>/presentation/<name>.schema.ts'],
77
80
  when: 'the first argument is shared-kernel: a schema several contexts answer with',
@@ -1 +1 @@
1
- {"version":3,"file":"shared-writes.js","sourceRoot":"","sources":["../../src/generate/shared-writes.ts"],"names":[],"mappings":"AAUA,MAAM,OAAO,GAAG,CAAC,qEAAqE,EAAE,sBAAsB,CAAC,CAAC;AAEhH,MAAM,MAAM,GAAG;IACb,yDAAyD;IACzD,kEAAkE;CACnE,CAAC;AAEF,MAAM,OAAO,GAAG,4EAA4E,CAAC;AAE7F,MAAM,MAAM,GACV,6LAA6L,CAAC;AAEhM,uJAAuJ;AACvJ,MAAM,CAAC,MAAM,aAAa,GAA0C;IAClE,OAAO,EAAE;QACP,KAAK,EAAE;YACL,wBAAwB;YACxB,6DAA6D;YAC7D,uCAAuC;YACvC,8DAA8D;YAC9D,iCAAiC;YACjC,qBAAqB;YACrB,yBAAyB;YACzB,+BAA+B;SAChC;KACF;IACD,UAAU,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,E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E,CAAC,wCAAwC,CAAC;QACjD,IAAI,EAAE,iHAAiH;QACvH,MAAM,EAAE,wCAAwC;KACjD;IACD,aAAa,EAAE;QACb,KAAK,EAAE,CAAC,kEAAkE,CAAC;QAC3E,IAAI,EAAE,sDAAsD;QAC5D,MAAM,EAAE,6DAA6D;KACtE;IACD,GAAG,EAAE,EAAE,KAAK,EAAE,CAAC,+BAA+B,EAAE,qDAAqD,CAAC,EAAE;IACxG,MAAM,EAAE;QACN,KAAK,EAAE,CAAC,sEAAsE,CAAC;QAC/E,IAAI,EAAE,yBAAyB;KAChC;IACD,OAAO,EAAE;QACP,KAAK,EAAE;YACL,2EAA2E;YAC3E,+EAA+E;SAChF;KACF;IACD,OAAO,EAAE;QACP,KAAK,EAAE;YACL,qCAAqC;YACrC,cAAc;YACd,WAAW;YACX,wBAAwB;YACxB,oBAAoB;YACpB,qBAAqB;SACtB;KACF;IACD,MAAM,EAAE;QACN,KAAK,EAAE;YACL,kCAAkC;YAClC,cAAc;YACd,wBAAwB;YACxB,oBAAoB;YACpB,qCAAqC;SACtC;KACF;IACD,GAAG,EAAE;QACH,KAAK,EAAE,CAAC,WAAW,EAAE,2CAA2C,CAAC;QACjE,MAAM,EAAE,+CAA+C;KACxD;IACD,MAAM,EAAE;QACN,KAAK,EAAE,CAAC,iDAAiD,CAAC;QAC1D,IAAI,EAAE,4EAA4E;QAClF,MAAM,EAAE,sDAAsD;KAC/D;CACF,CAAC"}
@@ -1,3 +1,3 @@
1
1
  /** What a line of the usage cannot say about a command or a flag. */
2
- export declare const NOTES = " affected what a pull request has to run: the contexts a change set reaches through the context\n map (a changed context and the contexts downstream of it), as filters for the test\n runner and the linter; everything when a shared path changed or without --base\n build-aliases after the compiler: rewrites the import aliases left in the emitted .js and .d.ts files\n into relative paths, so that plain node runs the output (tsconfig.build.json by default)\n drizzle-generate the db:generate of a Drizzle project: drizzle-kit generate --name, which without a terminal\n fails and names the fix when drizzle-kit would ask whether a column or table is renamed,\n where drizzle-kit alone writes nothing and exits 0\n error-factories moves a project from one class per error to static factories on one error class per\n concept: --plan writes error-factories.plan.json, where each class is given its concept;\n --apply follows it (classes, specs, every usage, \"stack.refusals\" in the config)\n value-objects moves the value objects of a project from a Result to factories that return the value or\n throw: every create returning Result<T, E> returns T, err(..) is thrown, unwrap(..) of\n them goes, specs assert expectRefusal(() => ..), \"stack.valueObjects\" becomes throwing\n controllers moves the function routes of a project, or of one context, to controller classes: each\n <name>.route.ts becomes <resource>/<name>/<name>.controller.ts behind the route group of\n its resource, its schema files and its spec follow; a context is turned whole or not at all\n describe one context as facts: use cases, routes, events, ports, policies, gateways, dependencies\n status the next step of docs/architecture/plan.md, the slices of docs/architecture/slices.md by\n status and by owner, and the TODO(domain), TODO(platform) and it.todo left in each context\n sdk the typed client of each document of the contract, a workspace package under\n clients/<document> without runtime dependency: typed errors keyed by the error codes,\n credentials per security scheme; records \"sdk\" in the config the first time, wires the\n scripts (docs:generate regenerates it, docs:check compares it, ci:build builds it);\n --check writes nothing and exits 1 while a client differs from its contract\n todo those markers as file:line, in the project or in one context\n worker-scope a git worktree on the branch build/<context> (by default ../<project>-<context>), cut from\n --base <ref> (by default the current branch, refused from a worker's worktree), its\n .ddd-ts-kit/worker.json, and the briefing of the worker of that context; --rows <id,...>\n briefs those rows of slices.md only, with their rules; an existing worktree or branch\n that does not contain the base is refused\n --commit-size the files and lines about to be committed against \"commit\" in the config (20 files and\n 600 lines by default, generated files not counted); --staged reads the index only;\n advisory, --strict exits 1 when over\n --stored-events docs records the shape of each version of the stored events in stored-events.lock.json,\n never rewriting a recorded one: run it once the shape of a version is the one to store;\n docs --check fails while a declared version is not recorded\n --sdk init records \"sdk\" in the config and generates the clients with the project\n --local-only generate refuses, and writes nothing, when the kind would write outside its context;\n \"generate --help --json\" says which kinds do";
2
+ export declare const NOTES = " affected what a pull request has to run: the contexts a change set reaches through the context\n map (a changed context and the contexts downstream of it), as filters for the test\n runner and the linter; everything when a shared path changed or without --base\n build-aliases after the compiler: rewrites the import aliases left in the emitted .js and .d.ts files\n into relative paths, so that plain node runs the output (tsconfig.build.json by default)\n drizzle-generate the db:generate of a Drizzle project: drizzle-kit generate --name, which without a terminal\n fails and names the fix when drizzle-kit would ask whether a column or table is renamed,\n where drizzle-kit alone writes nothing and exits 0\n error-factories moves a project from one class per error to static factories on one error class per\n concept: --plan writes error-factories.plan.json, where each class is given its concept;\n --apply follows it (classes, specs, every usage, \"stack.refusals\" in the config)\n value-objects moves the value objects of a project from a Result to factories that return the value or\n throw: every create returning Result<T, E> returns T, err(..) is thrown, unwrap(..) of\n them goes, specs assert expectRefusal(() => ..), \"stack.valueObjects\" becomes throwing\n controllers moves the function routes of a project, or of one context, to controller classes: each\n <name>.route.ts becomes <resource>/<name>/<name>.controller.ts behind the route group of\n its resource, its schema files and its spec follow; a context is turned whole or not at all\n doctor what an upgrade left to do: the scripts, the packages of the kit (at the ranges of this\n version) and the agent permissions this version writes that the project lacks or writes\n otherwise; init adds what is missing; --strict exits 1 while something is missing\n describe one context as facts: use cases, routes, events, ports, policies, gateways, dependencies\n status the next step of docs/architecture/plan.md, the slices of docs/architecture/slices.md by\n status and by owner, and the TODO(domain), TODO(platform), it.todo and TODO(review) left in\n each context; --workers shows instead each worktree holding .ddd-ts-kit/worker.json (branch,\n context, rows, base, commits ahead, files changed since the base, its report), then the\n contexts and the files more than one worker holds\n sdk the typed client of each document of the contract, a workspace package under\n clients/<document> without runtime dependency: typed errors keyed by the error codes,\n credentials per security scheme; records \"sdk\" in the config the first time, wires the\n scripts (docs:generate regenerates it, docs:check compares it, ci:build builds it);\n --check writes nothing and exits 1 while a client differs from its contract\n todo those markers as file:line, in the project or in one context\n worker-scope a git worktree on the branch build/<context> (by default ../<project>-<context>), cut from\n --base <ref> (by default the current branch, refused from a worker's worktree), its\n .ddd-ts-kit/worker.json, and the briefing of the worker of that context; --rows <id,...>\n briefs those rows of slices.md only, with their rules; an existing worktree or branch\n that does not contain the base is refused\n verify-slice closes a slice before its commit, in one run: the regenerate script, check on the files\n changed since --since (new ones included), the test script for the context; then the\n changed files past 300 of the 350 lines, the paths of the slice to stage (its context, an\n end-to-end spec, a working migration, the derived files git tracks) and every other\n changed path, left out and never to stage with it; exits 1 while a step fails\n --commit-size the files and lines about to be committed against \"commit\" in the config (20 files and\n 600 lines by default, generated files not counted); --staged reads the index only;\n advisory, --strict exits 1 when over\n --stored-events docs records the shape of each version of the stored events in stored-events.lock.json,\n never rewriting a recorded one: run it once the shape of a version is the one to store;\n docs --check fails while a declared version is not recorded\n --sdk init records \"sdk\" in the config and generates the clients with the project\n --local-only generate refuses, and writes nothing, when the kind would write outside its context;\n \"generate --help --json\" says which kinds do";
3
3
  //# sourceMappingURL=notes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"notes.d.ts","sourceRoot":"","sources":["../../src/help/notes.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,eAAO,MAAM,KAAK,s8HAuC8C,CAAC"}
1
+ {"version":3,"file":"notes.d.ts","sourceRoot":"","sources":["../../src/help/notes.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,eAAO,MAAM,KAAK,qjKAkD8C,CAAC"}
@@ -16,9 +16,15 @@ export const NOTES = ` affected what a pull request has to run: the con
16
16
  controllers moves the function routes of a project, or of one context, to controller classes: each
17
17
  <name>.route.ts becomes <resource>/<name>/<name>.controller.ts behind the route group of
18
18
  its resource, its schema files and its spec follow; a context is turned whole or not at all
19
+ doctor what an upgrade left to do: the scripts, the packages of the kit (at the ranges of this
20
+ version) and the agent permissions this version writes that the project lacks or writes
21
+ otherwise; init adds what is missing; --strict exits 1 while something is missing
19
22
  describe one context as facts: use cases, routes, events, ports, policies, gateways, dependencies
20
23
  status the next step of docs/architecture/plan.md, the slices of docs/architecture/slices.md by
21
- status and by owner, and the TODO(domain), TODO(platform) and it.todo left in each context
24
+ status and by owner, and the TODO(domain), TODO(platform), it.todo and TODO(review) left in
25
+ each context; --workers shows instead each worktree holding .ddd-ts-kit/worker.json (branch,
26
+ context, rows, base, commits ahead, files changed since the base, its report), then the
27
+ contexts and the files more than one worker holds
22
28
  sdk the typed client of each document of the contract, a workspace package under
23
29
  clients/<document> without runtime dependency: typed errors keyed by the error codes,
24
30
  credentials per security scheme; records "sdk" in the config the first time, wires the
@@ -30,6 +36,11 @@ export const NOTES = ` affected what a pull request has to run: the con
30
36
  .ddd-ts-kit/worker.json, and the briefing of the worker of that context; --rows <id,...>
31
37
  briefs those rows of slices.md only, with their rules; an existing worktree or branch
32
38
  that does not contain the base is refused
39
+ verify-slice closes a slice before its commit, in one run: the regenerate script, check on the files
40
+ changed since --since (new ones included), the test script for the context; then the
41
+ changed files past 300 of the 350 lines, the paths of the slice to stage (its context, an
42
+ end-to-end spec, a working migration, the derived files git tracks) and every other
43
+ changed path, left out and never to stage with it; exits 1 while a step fails
33
44
  --commit-size the files and lines about to be committed against "commit" in the config (20 files and
34
45
  600 lines by default, generated files not counted); --staged reads the index only;
35
46
  advisory, --strict exits 1 when over
@@ -1 +1 @@
1
- {"version":3,"file":"notes.js","sourceRoot":"","sources":["../../src/help/notes.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gEAuC2C,CAAC"}
1
+ {"version":3,"file":"notes.js","sourceRoot":"","sources":["../../src/help/notes.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gEAkD2C,CAAC"}
@@ -1,3 +1,3 @@
1
1
  /** Every command of the CLI and its flags, as `--help` prints them and docs/guides/commands.md shows them. */
2
- export declare const USAGE = "Usage\n ddd-ts-kit init [--http express|fastify|hono|nest|none]\n [--validation zod|class-validator|typebox|standard-schema|none]\n [--di tsyringe|nest|manual] [--tests vitest|jest]\n [--orm drizzle|knex|prisma|typeorm|custom|none] [--database postgres|mysql|sqlite|none]\n [--events in-memory|outbox] [--docs-ui swagger|scalar|redoc|none]\n [--ci github|gitlab|both|none] [--ci-extras <extra>,...|none]\n [--authn jwt|keycloak|none] [--authz rbac|abac|rebac|custom]\n [--broker none|rabbitmq|kafka|nats|redis|custom] [--cache none|redis] [--http-cache none|varnish]\n [--storage local|s3|none]\n [--audit on|off]\n [--errors none|sentry] [--logger stdout|pino|winston] [--style declared|explicit] [--assembly barrel|discovery]\n [--dependencies signature|listed] [--refusals factories|classes]\n [--routes controllers|functions] [--representations negotiated|json] [--forms on|off]\n [--value-objects throwing|result] [--literals named|free] [--values classes|free] [--tenancy none|shared-table] [--queue database|redis|memory]\n [--schemas shared|per-route]\n [--package-manager npm|pnpm] [--allow-no-outbox \"<reason>\"] [--import-alias '$<name>/']\n [--import-extension none|js] [--sdk]\n [--context <name>:<core|supporting|generic>]... [--preset identity]... [--dry-run] [--force]\n ddd-ts-kit generate <kind> ... [--term \"<Term>=<meaning>\"]... [--allow-name] [--local-only] [--dry-run] [--force] (alias: g)\n ddd-ts-kit generate --help --json\n ddd-ts-kit list [--context <name>]\n ddd-ts-kit describe <context>\n ddd-ts-kit status\n ddd-ts-kit todo [<context>]\n ddd-ts-kit worker-scope <context> [--base <ref>] [--rows <id,...>] [--worktree <path>] [--branch <name>] [--dry-run]\n ddd-ts-kit docs [--check] [--stored-events]\n ddd-ts-kit sdk [--check] [--dry-run]\n ddd-ts-kit depcruise-config [--check|--write]\n ddd-ts-kit build-aliases [--project <tsconfig>]\n ddd-ts-kit drizzle-generate --name <what-it-does> [--custom]\n ddd-ts-kit error-factories --plan | --apply [--dry-run]\n ddd-ts-kit controllers [<context>] [--dry-run]\n ddd-ts-kit value-objects [--dry-run]\n ddd-ts-kit affected [--base <git-ref>] [--head <git-ref>] [--format text|json|github|env]\n ddd-ts-kit check [paths...] [--rule <id>]... [--format text|json|github|gitlab] [--changed-since <git-ref>] [--self]\n ddd-ts-kit check --clean-only <dir>... [--rule <id>]... [--format text|json|github]\n ddd-ts-kit check --commit-size [--staged] [--strict]\n ddd-ts-kit check-file <path>\n ddd-ts-kit rules\n ddd-ts-kit explain <rule-id>\n\nEvery command accepts --json (machine-readable output) and --cwd <dir> (project root).";
2
+ export declare const USAGE = "Usage\n ddd-ts-kit init [--http express|fastify|hono|nest|none]\n [--validation zod|class-validator|typebox|standard-schema|none]\n [--di tsyringe|nest|manual] [--tests vitest|jest]\n [--orm drizzle|knex|prisma|typeorm|custom|none] [--database postgres|mysql|sqlite|none]\n [--events in-memory|outbox] [--docs-ui swagger|scalar|redoc|none]\n [--ci github|gitlab|both|none] [--ci-extras <extra>,...|none]\n [--authn jwt|keycloak|none] [--authz rbac|abac|rebac|custom]\n [--broker none|rabbitmq|kafka|nats|redis|custom] [--cache none|redis] [--http-cache none|varnish]\n [--storage local|s3|none]\n [--audit on|off]\n [--errors none|sentry] [--logger stdout|pino|winston] [--style declared|explicit] [--assembly barrel|discovery]\n [--dependencies signature|listed] [--refusals factories|classes]\n [--routes controllers|functions] [--representations negotiated|json] [--forms on|off]\n [--value-objects throwing|result] [--literals named|free] [--values classes|free] [--tenancy none|shared-table] [--queue database|redis|memory]\n [--schemas shared|per-route]\n [--package-manager npm|pnpm] [--allow-no-outbox \"<reason>\"] [--import-alias '$<name>/']\n [--import-extension none|js] [--sdk]\n [--context <name>:<core|supporting|generic>]... [--preset identity]... [--dry-run] [--force]\n ddd-ts-kit generate <kind> ... [--term \"<Term>=<meaning>\"]... [--allow-name] [--local-only] [--dry-run] [--force] (alias: g)\n ddd-ts-kit generate --help --json\n ddd-ts-kit list [--context <name>]\n ddd-ts-kit describe <context>\n ddd-ts-kit status [--workers]\n ddd-ts-kit doctor [--strict]\n ddd-ts-kit todo [<context>]\n ddd-ts-kit worker-scope <context> [--base <ref>] [--rows <id,...>] [--worktree <path>] [--branch <name>] [--dry-run]\n ddd-ts-kit verify-slice <context> --since <git-ref>\n ddd-ts-kit docs [--check] [--stored-events]\n ddd-ts-kit sdk [--check] [--dry-run]\n ddd-ts-kit depcruise-config [--check|--write]\n ddd-ts-kit build-aliases [--project <tsconfig>]\n ddd-ts-kit drizzle-generate --name <what-it-does> [--custom]\n ddd-ts-kit error-factories --plan | --apply [--dry-run]\n ddd-ts-kit controllers [<context>] [--dry-run]\n ddd-ts-kit value-objects [--dry-run]\n ddd-ts-kit affected [--base <git-ref>] [--head <git-ref>] [--format text|json|github|env]\n ddd-ts-kit check [paths...] [--rule <id>]... [--format text|json|github|gitlab] [--changed-since <git-ref>] [--self]\n ddd-ts-kit check --clean-only <dir>... [--rule <id>]... [--format text|json|github]\n ddd-ts-kit check --commit-size [--staged] [--strict]\n ddd-ts-kit check-file <path>\n ddd-ts-kit rules\n ddd-ts-kit explain <rule-id>\n\nEvery command accepts --json (machine-readable output) and --cwd <dir> (project root).";
3
3
  //# sourceMappingURL=usage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../src/help/usage.ts"],"names":[],"mappings":"AAAA,8GAA8G;AAC9G,eAAO,MAAM,KAAK,42FA0CqE,CAAC"}
1
+ {"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../src/help/usage.ts"],"names":[],"mappings":"AAAA,8GAA8G;AAC9G,eAAO,MAAM,KAAK,+8FA4CqE,CAAC"}
@@ -22,9 +22,11 @@ export const USAGE = `Usage
22
22
  ddd-ts-kit generate --help --json
23
23
  ddd-ts-kit list [--context <name>]
24
24
  ddd-ts-kit describe <context>
25
- ddd-ts-kit status
25
+ ddd-ts-kit status [--workers]
26
+ ddd-ts-kit doctor [--strict]
26
27
  ddd-ts-kit todo [<context>]
27
28
  ddd-ts-kit worker-scope <context> [--base <ref>] [--rows <id,...>] [--worktree <path>] [--branch <name>] [--dry-run]
29
+ ddd-ts-kit verify-slice <context> --since <git-ref>
28
30
  ddd-ts-kit docs [--check] [--stored-events]
29
31
  ddd-ts-kit sdk [--check] [--dry-run]
30
32
  ddd-ts-kit depcruise-config [--check|--write]
@@ -1 +1 @@
1
- {"version":3,"file":"usage.js","sourceRoot":"","sources":["../../src/help/usage.ts"],"names":[],"mappings":"AAAA,8GAA8G;AAC9G,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uFA0CkE,CAAC"}
1
+ {"version":3,"file":"usage.js","sourceRoot":"","sources":["../../src/help/usage.ts"],"names":[],"mappings":"AAAA,8GAA8G;AAC9G,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uFA4CkE,CAAC"}
@@ -0,0 +1,8 @@
1
+ type AgentPermissions = Readonly<Record<'allow' | 'deny' | 'ask', readonly string[]>>;
2
+ /**
3
+ * What an agent may do in the project without asking, what it never does, and what it asks
4
+ * for. Permissions only: nothing here changes how the agent behaves otherwise.
5
+ */
6
+ export declare const AGENT_PERMISSIONS: AgentPermissions;
7
+ export {};
8
+ //# sourceMappingURL=agent-permissions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-permissions.d.ts","sourceRoot":"","sources":["../../src/init/agent-permissions.ts"],"names":[],"mappings":"AAAA,KAAK,gBAAgB,GAAG,QAAQ,CAAC,MAAM,CAAC,OAAO,GAAG,MAAM,GAAG,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CAAC;AAEtF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,gBAiD/B,CAAC"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * What an agent may do in the project without asking, what it never does, and what it asks
3
+ * for. Permissions only: nothing here changes how the agent behaves otherwise.
4
+ */
5
+ export const AGENT_PERMISSIONS = {
6
+ allow: [
7
+ 'Bash(npx ddd-ts-kit check *)',
8
+ 'Bash(npx ddd-ts-kit verify-slice *)',
9
+ 'Bash(npx ddd-ts-kit list *)',
10
+ 'Bash(npx ddd-ts-kit generate *)',
11
+ 'Bash(npx ddd-ts-kit docs *)',
12
+ 'Bash(npx ddd-ts-kit explain *)',
13
+ 'Bash(npx ddd-ts-kit rules)',
14
+ 'Bash(npm run verify)',
15
+ 'Bash(npm run typecheck)',
16
+ 'Bash(npm run lint *)',
17
+ 'Bash(npm test *)',
18
+ 'Bash(npm run test:e2e *)',
19
+ 'Bash(npm run regenerate)',
20
+ 'Bash(npm run docs:generate)',
21
+ 'Bash(npm run docs:check)',
22
+ 'Bash(npm run openapi:generate)',
23
+ 'Bash(npm run openapi:check)',
24
+ 'Bash(npm run events:generate)',
25
+ 'Bash(npm run events:check)',
26
+ ],
27
+ // Secrets, then the generated contracts: those are regenerated, never edited. In a deny
28
+ // list, a pattern starting with `!` carves its matches out of the rules before it
29
+ // (gitignore negation), which keeps `.env.example`, documentation, readable.
30
+ deny: [
31
+ 'Read(./.env)',
32
+ 'Read(./.env.*)',
33
+ 'Read(!./.env.example)',
34
+ 'Edit(./openapi/**)',
35
+ 'Edit(./docs/integration/asyncapi.*)',
36
+ 'Edit(./docs/integration/event-catalog.md)',
37
+ ],
38
+ // Then the files that hold the rules and the pipeline: changing one is a decision of the
39
+ // project owner, the same list as the editor hook of the plugin asks about.
40
+ ask: [
41
+ 'Bash(git push *)',
42
+ 'Bash(npm publish *)',
43
+ 'Edit(./ddd-ts-kit.config.json)',
44
+ 'Edit(./eslint.config.mjs)',
45
+ 'Edit(./biome.json)',
46
+ 'Edit(./.dependency-cruiser.cjs)',
47
+ 'Edit(./knip.json)',
48
+ 'Edit(./lefthook.yml)',
49
+ 'Edit(./.gitlab-ci.yml)',
50
+ 'Edit(./.github/workflows/**)',
51
+ 'Edit(./.claude/settings.json)',
52
+ 'Edit(./.github/copilot/settings.json)',
53
+ ],
54
+ };
55
+ //# sourceMappingURL=agent-permissions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-permissions.js","sourceRoot":"","sources":["../../src/init/agent-permissions.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAqB;IACjD,KAAK,EAAE;QACL,8BAA8B;QAC9B,qCAAqC;QACrC,6BAA6B;QAC7B,iCAAiC;QACjC,6BAA6B;QAC7B,gCAAgC;QAChC,4BAA4B;QAC5B,sBAAsB;QACtB,yBAAyB;QACzB,sBAAsB;QACtB,kBAAkB;QAClB,0BAA0B;QAC1B,0BAA0B;QAC1B,6BAA6B;QAC7B,0BAA0B;QAC1B,gCAAgC;QAChC,6BAA6B;QAC7B,+BAA+B;QAC/B,4BAA4B;KAC7B;IACD,wFAAwF;IACxF,kFAAkF;IAClF,6EAA6E;IAC7E,IAAI,EAAE;QACJ,cAAc;QACd,gBAAgB;QAChB,uBAAuB;QACvB,oBAAoB;QACpB,qCAAqC;QACrC,2CAA2C;KAC5C;IACD,yFAAyF;IACzF,4EAA4E;IAC5E,GAAG,EAAE;QACH,kBAAkB;QAClB,qBAAqB;QACrB,gCAAgC;QAChC,2BAA2B;QAC3B,oBAAoB;QACpB,iCAAiC;QACjC,mBAAmB;QACnB,sBAAsB;QACtB,wBAAwB;QACxB,8BAA8B;QAC9B,+BAA+B;QAC/B,uCAAuC;KACxC;CACF,CAAC"}
@@ -1,35 +1,35 @@
1
1
  /** Ranges written to the generated package.json; bumped together with the kit. */
2
2
  export const VERSIONS = {
3
- '@ddd-ts-kit/kernel': '^0.22.0',
4
- '@ddd-ts-kit/validation': '^0.22.0',
5
- '@ddd-ts-kit/http': '^0.22.0',
6
- '@ddd-ts-kit/tracing': '^0.22.0',
7
- '@ddd-ts-kit/di': '^0.22.0',
8
- '@ddd-ts-kit/events': '^0.22.0',
9
- '@ddd-ts-kit/testing': '^0.22.0',
10
- '@ddd-ts-kit/drizzle': '^0.22.0',
11
- '@ddd-ts-kit/knex': '^0.22.0',
12
- '@ddd-ts-kit/prisma': '^0.22.0',
13
- '@ddd-ts-kit/typeorm': '^0.22.0',
14
- '@ddd-ts-kit/auth': '^0.22.0',
15
- '@ddd-ts-kit/rabbitmq': '^0.22.0',
16
- '@ddd-ts-kit/aspects': '^0.22.0',
17
- '@ddd-ts-kit/audit': '^0.22.0',
18
- '@ddd-ts-kit/redis': '^0.22.0',
19
- '@ddd-ts-kit/kafka': '^0.22.0',
20
- '@ddd-ts-kit/nats': '^0.22.0',
21
- '@ddd-ts-kit/scheduling': '^0.22.0',
22
- '@ddd-ts-kit/sentry': '^0.22.0',
23
- '@ddd-ts-kit/s3': '^0.22.0',
3
+ '@ddd-ts-kit/kernel': '^0.23.1',
4
+ '@ddd-ts-kit/validation': '^0.23.1',
5
+ '@ddd-ts-kit/http': '^0.23.1',
6
+ '@ddd-ts-kit/tracing': '^0.23.1',
7
+ '@ddd-ts-kit/di': '^0.23.1',
8
+ '@ddd-ts-kit/events': '^0.23.1',
9
+ '@ddd-ts-kit/testing': '^0.23.1',
10
+ '@ddd-ts-kit/drizzle': '^0.23.1',
11
+ '@ddd-ts-kit/knex': '^0.23.1',
12
+ '@ddd-ts-kit/prisma': '^0.23.1',
13
+ '@ddd-ts-kit/typeorm': '^0.23.1',
14
+ '@ddd-ts-kit/auth': '^0.23.1',
15
+ '@ddd-ts-kit/rabbitmq': '^0.23.1',
16
+ '@ddd-ts-kit/aspects': '^0.23.1',
17
+ '@ddd-ts-kit/audit': '^0.23.1',
18
+ '@ddd-ts-kit/redis': '^0.23.1',
19
+ '@ddd-ts-kit/kafka': '^0.23.1',
20
+ '@ddd-ts-kit/nats': '^0.23.1',
21
+ '@ddd-ts-kit/scheduling': '^0.23.1',
22
+ '@ddd-ts-kit/sentry': '^0.23.1',
23
+ '@ddd-ts-kit/s3': '^0.23.1',
24
24
  '@aws-sdk/client-s3': '^3.1150.0',
25
25
  '@aws-sdk/lib-storage': '^3.1150.0',
26
26
  '@aws-sdk/s3-request-presigner': '^3.1150.0',
27
27
  busboy: '^1.6.0',
28
28
  '@sentry/node': '^11.6.0',
29
- '@ddd-ts-kit/pino': '^0.22.0',
29
+ '@ddd-ts-kit/pino': '^0.23.1',
30
30
  pino: '^10.4.0',
31
31
  'pino-pretty': '^13.2.0',
32
- '@ddd-ts-kit/winston': '^0.22.0',
32
+ '@ddd-ts-kit/winston': '^0.23.1',
33
33
  winston: '^3.19.0',
34
34
  '@confluentinc/kafka-javascript': '^1.11.0',
35
35
  '@nats-io/jetstream': '^3.4.0',
@@ -37,7 +37,7 @@ export const VERSIONS = {
37
37
  ioredis: '^6.0.0',
38
38
  jose: '^6.0.0',
39
39
  amqplib: '^2.2.0',
40
- 'ddd-ts-kit': '^0.22.0',
40
+ 'ddd-ts-kit': '^0.23.1',
41
41
  tsx: '^4.23.15',
42
42
  vitest: '^5.0.3',
43
43
  zod: '^4.6.5',