ddd-ts-kit 0.95.0 → 0.97.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.
Files changed (243) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/README.fr.md +64 -11
  3. package/README.md +58 -10
  4. package/dist/check/authz/operator-tuples.d.ts +16 -0
  5. package/dist/check/authz/operator-tuples.d.ts.map +1 -0
  6. package/dist/check/authz/operator-tuples.js +29 -0
  7. package/dist/check/authz/operator-tuples.js.map +1 -0
  8. package/dist/check/authz/own-authorizer.d.ts +9 -0
  9. package/dist/check/authz/own-authorizer.d.ts.map +1 -0
  10. package/dist/check/authz/own-authorizer.js +15 -0
  11. package/dist/check/authz/own-authorizer.js.map +1 -0
  12. package/dist/check/catalogue/architecture-rules.d.ts.map +1 -1
  13. package/dist/check/catalogue/architecture-rules.js +4 -0
  14. package/dist/check/catalogue/architecture-rules.js.map +1 -1
  15. package/dist/check/explain/authz-docs.d.ts.map +1 -1
  16. package/dist/check/explain/authz-docs.js +12 -1
  17. package/dist/check/explain/authz-docs.js.map +1 -1
  18. package/dist/check/explain/scheduling-docs.d.ts.map +1 -1
  19. package/dist/check/explain/scheduling-docs.js +22 -0
  20. package/dist/check/explain/scheduling-docs.js.map +1 -1
  21. package/dist/check/fixtures/authz-granted-fixtures.d.ts.map +1 -1
  22. package/dist/check/fixtures/authz-granted-fixtures.js +69 -0
  23. package/dist/check/fixtures/authz-granted-fixtures.js.map +1 -1
  24. package/dist/check/fixtures/authz-resource-modelled-fixtures.d.ts.map +1 -1
  25. package/dist/check/fixtures/authz-resource-modelled-fixtures.js +5 -0
  26. package/dist/check/fixtures/authz-resource-modelled-fixtures.js.map +1 -1
  27. package/dist/check/fixtures/authz-system-actor-granted-fixtures.d.ts +3 -0
  28. package/dist/check/fixtures/authz-system-actor-granted-fixtures.d.ts.map +1 -0
  29. package/dist/check/fixtures/authz-system-actor-granted-fixtures.js +89 -0
  30. package/dist/check/fixtures/authz-system-actor-granted-fixtures.js.map +1 -0
  31. package/dist/check/fixtures/fixtures.d.ts.map +1 -1
  32. package/dist/check/fixtures/fixtures.js +2 -0
  33. package/dist/check/fixtures/fixtures.js.map +1 -1
  34. package/dist/check/fixtures/scheduling-fixtures.d.ts.map +1 -1
  35. package/dist/check/fixtures/scheduling-fixtures.js +47 -1
  36. package/dist/check/fixtures/scheduling-fixtures.js.map +1 -1
  37. package/dist/check/rules/authz-granted.d.ts +19 -6
  38. package/dist/check/rules/authz-granted.d.ts.map +1 -1
  39. package/dist/check/rules/authz-granted.js +59 -7
  40. package/dist/check/rules/authz-granted.js.map +1 -1
  41. package/dist/check/rules/authz-system-actor-granted.d.ts +15 -0
  42. package/dist/check/rules/authz-system-actor-granted.d.ts.map +1 -0
  43. package/dist/check/rules/authz-system-actor-granted.js +91 -0
  44. package/dist/check/rules/authz-system-actor-granted.js.map +1 -0
  45. package/dist/check/rules/scheduling-job-registered.d.ts +12 -0
  46. package/dist/check/rules/scheduling-job-registered.d.ts.map +1 -0
  47. package/dist/check/rules/scheduling-job-registered.js +40 -0
  48. package/dist/check/rules/scheduling-job-registered.js.map +1 -0
  49. package/dist/check/scheduling/job-classes.d.ts +13 -0
  50. package/dist/check/scheduling/job-classes.d.ts.map +1 -0
  51. package/dist/check/scheduling/job-classes.js +32 -0
  52. package/dist/check/scheduling/job-classes.js.map +1 -0
  53. package/dist/cli-error.d.ts +3 -3
  54. package/dist/cli-error.d.ts.map +1 -1
  55. package/dist/cli-error.js +4 -3
  56. package/dist/cli-error.js.map +1 -1
  57. package/dist/commands/doctor.d.ts.map +1 -1
  58. package/dist/commands/doctor.js +2 -0
  59. package/dist/commands/doctor.js.map +1 -1
  60. package/dist/commands/generate.d.ts +4 -0
  61. package/dist/commands/generate.d.ts.map +1 -1
  62. package/dist/commands/generate.js +6 -4
  63. package/dist/commands/generate.js.map +1 -1
  64. package/dist/commands/plan-waves.d.ts +2 -1
  65. package/dist/commands/plan-waves.d.ts.map +1 -1
  66. package/dist/commands/plan-waves.js +28 -2
  67. package/dist/commands/plan-waves.js.map +1 -1
  68. package/dist/commands/prisma-generate.d.ts.map +1 -1
  69. package/dist/commands/prisma-generate.js +2 -1
  70. package/dist/commands/prisma-generate.js.map +1 -1
  71. package/dist/commands/typeorm-generate.d.ts.map +1 -1
  72. package/dist/commands/typeorm-generate.js +2 -1
  73. package/dist/commands/typeorm-generate.js.map +1 -1
  74. package/dist/doctor/diagnose.d.ts +2 -1
  75. package/dist/doctor/diagnose.d.ts.map +1 -1
  76. package/dist/doctor/diagnose.js +4 -1
  77. package/dist/doctor/diagnose.js.map +1 -1
  78. package/dist/doctor/doctor-finding.d.ts +1 -1
  79. package/dist/doctor/doctor-finding.d.ts.map +1 -1
  80. package/dist/doctor/format-diagnosis.js +25 -2
  81. package/dist/doctor/format-diagnosis.js.map +1 -1
  82. package/dist/doctor/install-script-findings.d.ts +11 -0
  83. package/dist/doctor/install-script-findings.d.ts.map +1 -0
  84. package/dist/doctor/install-script-findings.js +86 -0
  85. package/dist/doctor/install-script-findings.js.map +1 -0
  86. package/dist/doctor/installed-from.d.ts +3 -0
  87. package/dist/doctor/installed-from.d.ts.map +1 -0
  88. package/dist/doctor/installed-from.js +15 -0
  89. package/dist/doctor/installed-from.js.map +1 -0
  90. package/dist/doctor/override-findings.d.ts.map +1 -1
  91. package/dist/doctor/override-findings.js +1 -11
  92. package/dist/doctor/override-findings.js.map +1 -1
  93. package/dist/generate/kind.d.ts +3 -0
  94. package/dist/generate/kind.d.ts.map +1 -1
  95. package/dist/generate/kinds/declare-storage.d.ts.map +1 -1
  96. package/dist/generate/kinds/declare-storage.js +5 -1
  97. package/dist/generate/kinds/declare-storage.js.map +1 -1
  98. package/dist/generate/kinds/extend-event-sourced-aggregate.js +2 -2
  99. package/dist/generate/kinds/extend-event-sourced-aggregate.js.map +1 -1
  100. package/dist/generate/kinds/generate-context.d.ts.map +1 -1
  101. package/dist/generate/kinds/generate-context.js +14 -0
  102. package/dist/generate/kinds/generate-context.js.map +1 -1
  103. package/dist/generate/kinds/integration-handler-kind.d.ts.map +1 -1
  104. package/dist/generate/kinds/integration-handler-kind.js +1 -13
  105. package/dist/generate/kinds/integration-handler-kind.js.map +1 -1
  106. package/dist/generate/kinds/job/grant-system-actor.js +4 -2
  107. package/dist/generate/kinds/job/grant-system-actor.js.map +1 -1
  108. package/dist/generate/kinds/projection-kind.d.ts.map +1 -1
  109. package/dist/generate/kinds/projection-kind.js +15 -10
  110. package/dist/generate/kinds/projection-kind.js.map +1 -1
  111. package/dist/generate/kinds/subscription-vars.d.ts +8 -0
  112. package/dist/generate/kinds/subscription-vars.d.ts.map +1 -0
  113. package/dist/generate/kinds/subscription-vars.js +14 -0
  114. package/dist/generate/kinds/subscription-vars.js.map +1 -0
  115. package/dist/generate/language-probe.d.ts +16 -0
  116. package/dist/generate/language-probe.d.ts.map +1 -0
  117. package/dist/generate/language-probe.js +2 -0
  118. package/dist/generate/language-probe.js.map +1 -0
  119. package/dist/generate/refuse-shared-writes.d.ts +1 -1
  120. package/dist/generate/refuse-shared-writes.d.ts.map +1 -1
  121. package/dist/generate/refuse-shared-writes.js +25 -2
  122. package/dist/generate/refuse-shared-writes.js.map +1 -1
  123. package/dist/generate/spoken-in-language.d.ts +2 -1
  124. package/dist/generate/spoken-in-language.d.ts.map +1 -1
  125. package/dist/generate/spoken-in-language.js +6 -1
  126. package/dist/generate/spoken-in-language.js.map +1 -1
  127. package/dist/help/notes.d.ts +1 -1
  128. package/dist/help/notes.d.ts.map +1 -1
  129. package/dist/help/notes.js +11 -3
  130. package/dist/help/notes.js.map +1 -1
  131. package/dist/init/first-install-note.d.ts.map +1 -1
  132. package/dist/init/first-install-note.js +22 -0
  133. package/dist/init/first-install-note.js.map +1 -1
  134. package/dist/init/managed-settings-note.d.ts.map +1 -1
  135. package/dist/init/managed-settings-note.js +1 -0
  136. package/dist/init/managed-settings-note.js.map +1 -1
  137. package/dist/init/manifest/allow-builds-block.d.ts +3 -0
  138. package/dist/init/manifest/allow-builds-block.d.ts.map +1 -0
  139. package/dist/init/manifest/allow-builds-block.js +5 -0
  140. package/dist/init/manifest/allow-builds-block.js.map +1 -0
  141. package/dist/init/manifest/allow-builds-entries.d.ts +8 -0
  142. package/dist/init/manifest/allow-builds-entries.d.ts.map +1 -0
  143. package/dist/init/manifest/allow-builds-entries.js +8 -0
  144. package/dist/init/manifest/allow-builds-entries.js.map +1 -0
  145. package/dist/init/manifest/database-scripts.d.ts.map +1 -1
  146. package/dist/init/manifest/database-scripts.js +3 -1
  147. package/dist/init/manifest/database-scripts.js.map +1 -1
  148. package/dist/init/manifest/install-scripts-of.d.ts +18 -0
  149. package/dist/init/manifest/install-scripts-of.d.ts.map +1 -0
  150. package/dist/init/manifest/install-scripts-of.js +25 -0
  151. package/dist/init/manifest/install-scripts-of.js.map +1 -0
  152. package/dist/init/manifest/names-package.d.ts +3 -0
  153. package/dist/init/manifest/names-package.d.ts.map +1 -0
  154. package/dist/init/manifest/names-package.js +5 -0
  155. package/dist/init/manifest/names-package.js.map +1 -0
  156. package/dist/init/manifest/prisma-client-script.d.ts +3 -0
  157. package/dist/init/manifest/prisma-client-script.d.ts.map +1 -0
  158. package/dist/init/manifest/prisma-client-script.js +5 -0
  159. package/dist/init/manifest/prisma-client-script.js.map +1 -0
  160. package/dist/init/manifest/versions.js +24 -24
  161. package/dist/init/manifest/write-install-scripts.d.ts +10 -0
  162. package/dist/init/manifest/write-install-scripts.d.ts.map +1 -0
  163. package/dist/init/manifest/write-install-scripts.js +78 -0
  164. package/dist/init/manifest/write-install-scripts.js.map +1 -0
  165. package/dist/init/manifest/write-manifest.d.ts.map +1 -1
  166. package/dist/init/manifest/write-manifest.js +9 -1
  167. package/dist/init/manifest/write-manifest.js.map +1 -1
  168. package/dist/init/run-init.d.ts.map +1 -1
  169. package/dist/init/run-init.js +20 -3
  170. package/dist/init/run-init.js.map +1 -1
  171. package/dist/merge/ensure-mergeable.d.ts.map +1 -1
  172. package/dist/merge/ensure-mergeable.js +15 -0
  173. package/dist/merge/ensure-mergeable.js.map +1 -1
  174. package/dist/merge/ensure-writable.d.ts +9 -0
  175. package/dist/merge/ensure-writable.d.ts.map +1 -0
  176. package/dist/merge/ensure-writable.js +51 -0
  177. package/dist/merge/ensure-writable.js.map +1 -0
  178. package/dist/merge/is-sandbox-mask.d.ts +4 -0
  179. package/dist/merge/is-sandbox-mask.d.ts.map +1 -0
  180. package/dist/merge/is-sandbox-mask.js +5 -0
  181. package/dist/merge/is-sandbox-mask.js.map +1 -0
  182. package/dist/merge/merge-trunk.d.ts.map +1 -1
  183. package/dist/merge/merge-trunk.js +4 -0
  184. package/dist/merge/merge-trunk.js.map +1 -1
  185. package/dist/migration/ensure-database-reachable.d.ts +13 -0
  186. package/dist/migration/ensure-database-reachable.d.ts.map +1 -0
  187. package/dist/migration/ensure-database-reachable.js +51 -0
  188. package/dist/migration/ensure-database-reachable.js.map +1 -0
  189. package/dist/migration/index.d.ts +1 -0
  190. package/dist/migration/index.d.ts.map +1 -1
  191. package/dist/migration/index.js +1 -0
  192. package/dist/migration/index.js.map +1 -1
  193. package/dist/plan/format-plan.d.ts +2 -1
  194. package/dist/plan/format-plan.d.ts.map +1 -1
  195. package/dist/plan/format-plan.js +20 -2
  196. package/dist/plan/format-plan.js.map +1 -1
  197. package/dist/plan/plan-waves.d.ts.map +1 -1
  198. package/dist/plan/plan-waves.js +2 -1
  199. package/dist/plan/plan-waves.js.map +1 -1
  200. package/dist/plan/planned-commands.d.ts +10 -0
  201. package/dist/plan/planned-commands.d.ts.map +1 -0
  202. package/dist/plan/planned-commands.js +13 -0
  203. package/dist/plan/planned-commands.js.map +1 -0
  204. package/dist/plan/planned-words.d.ts +27 -0
  205. package/dist/plan/planned-words.d.ts.map +1 -0
  206. package/dist/plan/planned-words.js +170 -0
  207. package/dist/plan/planned-words.js.map +1 -0
  208. package/dist/plan/wave-plan.d.ts +11 -1
  209. package/dist/plan/wave-plan.d.ts.map +1 -1
  210. package/dist/prisma-schema/index.d.ts +4 -0
  211. package/dist/prisma-schema/index.d.ts.map +1 -1
  212. package/dist/prisma-schema/index.js +4 -0
  213. package/dist/prisma-schema/index.js.map +1 -1
  214. package/dist/prisma-schema/keeps-single-prisma-schema.d.ts +7 -0
  215. package/dist/prisma-schema/keeps-single-prisma-schema.d.ts.map +1 -0
  216. package/dist/prisma-schema/keeps-single-prisma-schema.js +11 -0
  217. package/dist/prisma-schema/keeps-single-prisma-schema.js.map +1 -0
  218. package/dist/prisma-schema/single-prisma-schema-found.d.ts +3 -0
  219. package/dist/prisma-schema/single-prisma-schema-found.d.ts.map +1 -0
  220. package/dist/prisma-schema/single-prisma-schema-found.js +7 -0
  221. package/dist/prisma-schema/single-prisma-schema-found.js.map +1 -0
  222. package/dist/prisma-schema/single-prisma-schema-steps.d.ts +6 -0
  223. package/dist/prisma-schema/single-prisma-schema-steps.d.ts.map +1 -0
  224. package/dist/prisma-schema/single-prisma-schema-steps.js +25 -0
  225. package/dist/prisma-schema/single-prisma-schema-steps.js.map +1 -0
  226. package/dist/prisma-schema/single-prisma-schema.d.ts +3 -0
  227. package/dist/prisma-schema/single-prisma-schema.d.ts.map +1 -0
  228. package/dist/prisma-schema/single-prisma-schema.js +3 -0
  229. package/dist/prisma-schema/single-prisma-schema.js.map +1 -0
  230. package/dist/version.d.ts +1 -1
  231. package/dist/version.js +1 -1
  232. package/dist/worker/add-worktree.d.ts +5 -1
  233. package/dist/worker/add-worktree.d.ts.map +1 -1
  234. package/dist/worker/add-worktree.js +6 -2
  235. package/dist/worker/add-worktree.js.map +1 -1
  236. package/package.json +4 -4
  237. package/templates/aggregate/event-sourced.aggregate.spec.ts.tpl +8 -0
  238. package/templates/aggregate/event-sourced.events.mapper.ts.tpl +2 -2
  239. package/templates/init/pnpm-workspace.yaml +2 -5
  240. package/templates/pipeline/package-scripts.json +1 -1
  241. package/templates/projection/projection.manual.ts.tpl +8 -0
  242. package/templates/projection/wiring.manual.tpl +22 -0
  243. package/templates/projection/wiring.tsyringe.tpl +4 -0
@@ -8,6 +8,7 @@ import { openScope } from '../open-scope.js';
8
8
  import { vars } from '../vars.js';
9
9
  import { wire } from '../wire.js';
10
10
  import { findEventDeclaration } from './find-event-declaration.js';
11
+ import { subscriptionVars } from './subscription-vars.js';
11
12
  import { givenName } from '../given-name.js';
12
13
  import { learnTerms } from '../learn-terms.js';
13
14
  export const integrationHandlerKind = {
@@ -54,19 +55,6 @@ function undeclaredEvent(upstream, eventType) {
54
55
  const [, aggregate = '', fact = ''] = eventType.split('.');
55
56
  return new CliError(`${upstream.kebab} declares no ${eventType} in its published language.`, `An integration event handler declares itself with @IntegrationEventHandler(<definition>, ...), which needs the declaration of the event: create it first with \`ddd-ts-kit generate integration-event ${upstream.kebab} ${toName(aggregate).pascal} ${toName(fact).pascal}\`, then run the command again.`);
56
57
  }
57
- /**
58
- * How a hand-wired handler subscribes. In the process, the subscription deduplicates; behind a
59
- * broker, each context listens under its own name and the mark commits with the work of the handler.
60
- */
61
- function subscriptionVars(scope, isTyped) {
62
- const external = scope.config.stack.broker !== 'none';
63
- return {
64
- declarative: isTyped && !external,
65
- transactional: isTyped && external,
66
- untyped: !isTyped,
67
- subscriber: external ? `platform.subscriberFor('${scope.context.kebab}')` : 'platform.subscriber',
68
- };
69
- }
70
58
  function declaredUpstream(scope, input) {
71
59
  const upstream = parseContextName(input);
72
60
  const declared = scope.config.contexts[scope.context.kebab]?.upstreams.some((candidate) => candidate.context === upstream.kebab) ===
@@ -1 +1 @@
1
- {"version":3,"file":"integration-handler-kind.js","sourceRoot":"","sources":["../../../src/generate/kinds/integration-handler-kind.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAa,MAAM,cAAc,CAAC;AAEnE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,O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CAAC,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;IAExG,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,UAAU,OAAO,CAAC,CAAC,CAAC,IAAI,SAAS,GAAG,EAAE,CAAC;AAClG,CAAC;AAED,SAAS,YAAY,CAAC,QAAc,EAAE,SAAiB,EAAE,WAAyC;IAChG,MAAM,CAAC,EAAE,SAAS,GAAG,EAAE,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAEhD,OAAO;QACL,GAAG,KAAK,CAAC,QAAQ,CAAC;QAClB,SAAS,EAAE,SAAS;QACpB,+FAA+F;QAC/F,UAAU,EAAE,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,KAAK,IAAI;QAC1C,aAAa,EAAE,GAAG,SAAS,IAAI;QAC/B,KAAK,EAAE,WAAW,KAAK,SAAS;QAChC,SAAS,EAAE,WAAW,EAAE,QAAQ,IAAI,EAAE;QACtC,UAAU,EAAE,WAAW,EAAE,UAAU,IAAI,EAAE;QACzC,OAAO,EAAE,WAAW,EAAE,OAAO,IAAI,CAAC;KACnC,CAAC;AACJ,CAAC"}
@@ -51,13 +51,15 @@ function placementOf(scope, job, permission) {
51
51
  /** The starting schema derives every permission of the project from `operator` of its context; once the team has remodelled it, the relationship is theirs to write. */
52
52
  function operatorOfContext(scope, actor, permission) {
53
53
  const context = scope.context.kebab;
54
+ // The authorizer names a subject `<actor type>:<actor id>`, and the id of a system actor is `system:<name>`.
55
+ const subject = `system:${actor}`;
54
56
  if (!SYSTEM_OPERATES.test(scope.ws.read(platformPath(scope, 'auth/relationships/relationship-schema.ts')) ?? '')) {
55
57
  return undefined;
56
58
  }
57
59
  return {
58
60
  file: platformPath(scope, 'auth/relationships/relate-system-actors.ts'),
59
- line: `{ object: 'context:${context}', relation: 'operator', subject: '${actor}' },`,
60
- anchor: `subject: '${actor}'`,
61
+ line: `{ object: 'context:${context}', relation: 'operator', subject: '${subject}' },`,
62
+ anchor: `subject: '${subject}'`,
61
63
  check: `check this relationship: \`${actor}\` now operates the context \`${context}\`, which gives it \`${permission}\` and every permission the schema derives from \`operator\` there.`,
62
64
  };
63
65
  }
@@ -1 +1 @@
1
- {"version":3,"file":"grant-system-actor.js","sourceRoot":"","sources":["../../../../src/generate/kinds/job/grant-system-actor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAA4B,MAAM,iBAAiB,CAAC;AAGzE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,MAAM,GAAG,eAAe,CAAC;AAC/B,MAAM,eAAe,GAAG,8BAA8B,CAAC;AAsBvD;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAY,EAAE,GAAW,EAAE,OAAoB;IAC9E,MAAM,QAAQ,GACZ,OAAO,CAAC,UAAU,KAAK,SAAS;QAC9B,CAAC,CAAC,kBAAkB,OAAO,CAAC,IAAI,CAAC,MAAM,kBAAkB;QACzD,CAAC,CAAC,oBAAoB,OAAO,CAAC,UAAU,IAAI,CAAC;IAEjD,MAAM,IAAI,GAAG,mCAAmC,GAAG,MAAM,QAAQ,qGAAqG,CAAC;IACvK,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IAE7G,OAAO,EAAE,SAAS,EAAE,SAAS,KAAK,SAAS,IAAI,OAAO,CAAC,KAAK,EAAE,SAAS,CAAC,EAAE,IAAI,EAAE,CAAC;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ACd,CAAC;AAED,SAAS,SAAS,CAAC,OAA2B,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,aAAa,EAAa;IACvF,IAAI,OAAO,KAAK,SAAS,IAAI,aAAa,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;QACnE,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,QAAQ,GAAG,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAE3F,OAAO,QAAQ,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;AAChG,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"projection-kind.d.ts","sourceRoot":"","sources":["../../../src/generate/kinds/projection-kind.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AASpC,eAAO,MAAM,cAAc,EAAE,IAqC5B,CAAC"}
1
+ {"version":3,"file":"projection-kind.d.ts","sourceRoot":"","sources":["../../../src/generate/kinds/projection-kind.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAYpC,eAAO,MAAM,cAAc,EAAE,IA0C5B,CAAC"}
@@ -2,26 +2,25 @@ import { CONFIG_FILE } from '../../config/index.js';
2
2
  import { CliError } from '../../cli-error.js';
3
3
  import { parseContextName, toName } from '../../naming/index.js';
4
4
  import { emit } from '../emit.js';
5
- import { isDeclared } from '../is-declared.js';
6
5
  import { label } from '../label.js';
7
6
  import { learnTerms } from '../learn-terms.js';
8
7
  import { named } from '../named.js';
9
8
  import { openScope } from '../open-scope.js';
10
9
  import { vars } from '../vars.js';
10
+ import { wire } from '../wire.js';
11
+ import { wiringFamily } from '../wiring-family.js';
12
+ import { subscriptionVars } from './subscription-vars.js';
11
13
  import { findEventDeclaration } from './find-event-declaration.js';
12
14
  export const projectionKind = {
13
15
  name: 'projection',
14
16
  aliases: ['projector'],
15
17
  usage: 'projection <context> <Name> <eventType> [--term "<Term>=<meaning>"]...',
16
- summary: 'A projector, the class that keeps one read model up to date from integration events of its own context or of a declared upstream, and its spec: declared style only.',
18
+ summary: 'A projector, the class that keeps one read model up to date from integration events of its own context or of a declared upstream, and its spec; registered in the module file of its context in the explicit style.',
17
19
  positionals: ['context', 'Name', 'eventType'],
18
20
  writesShared: false,
19
21
  writesInModules: true,
20
22
  run: (request) => {
21
23
  const scope = openScope(request);
22
- if (!isDeclared(scope.config)) {
23
- throw explicitStyle();
24
- }
25
24
  learnTerms(scope);
26
25
  const name = label(scope, request.args[1] ?? '', { what: 'projection', strip: ['projection', 'projector'] });
27
26
  const eventType = request.args[2] ?? '';
@@ -30,15 +29,21 @@ export const projectionKind = {
30
29
  if (declaration === undefined) {
31
30
  throw undeclaredEvent(publisher, eventType);
32
31
  }
33
- emit(scope, vars(scope, { name: named(name), publisher: named(publisher), event: eventVars(eventType, declaration) }), [
34
- ['projection/projection.ts.tpl', `application/projections/${name.kebab}.projection.ts`],
32
+ const context = vars(scope, {
33
+ name: named(name),
34
+ publisher: named(publisher),
35
+ event: eventVars(eventType, declaration),
36
+ consumer: subscriptionVars(scope, true),
37
+ });
38
+ // Without a container to include a declared class in (a hand-wired platform), the class is plain and subscribed by hand.
39
+ const source = wiringFamily(scope.config) === 'manual' ? 'projection/projection.manual.ts.tpl' : 'projection/projection.ts.tpl';
40
+ emit(scope, context, [
41
+ [source, `application/projections/${name.kebab}.projection.ts`],
35
42
  ['projection/projection.spec.ts.tpl', `test/unit/${name.kebab}.projection.spec.ts`],
36
43
  ]);
44
+ wire(scope, 'projection', context);
37
45
  },
38
46
  };
39
- function explicitStyle() {
40
- return new CliError('A projection declares itself with @Projection, which only the declared style assembles.', `Set "stack.style" to "declared" in ${CONFIG_FILE}, or write the class by hand in application/projections/ and add it to the module file of its context with \`builder.include(<Name>Projection)\`.`);
41
- }
42
47
  /** The context that publishes the event: this one, or one of its declared upstreams. */
43
48
  function publisherOf(scope, eventType) {
44
49
  const parts = eventType.split('.');
@@ -1 +1 @@
1
- {"version":3,"file":"projection-kind.js","sourceRoot":"","sources":["../../../src/generate/kinds/projection-kind.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAa,MAAM,cAAc,CAAC;AAEnE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,MAAM,CAAC,MAAM,cAAc,GAAS;IAClC,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,CAAC,WAAW,CAAC;IACtB,KAAK,EAAE,wEAAwE;IAC/E,OAAO,EACL,sKAAsK;IACxK,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC;IAC7C,YAAY,EAAE,KAAK;IACnB,eAAe,EAAE,IAAI;IACrB,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE;QACf,MAAM,KAAK,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;QAEjC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE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GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,KAAK,IAAI;QAC1C,aAAa,EAAE,GAAG,SAAS,IAAI;KAChC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { RenderContext } from '../../templating/index.js';
2
+ import type { Scope } from '../scope.js';
3
+ /**
4
+ * How a hand-wired handler subscribes. In the process, the subscription deduplicates; behind a
5
+ * broker, each context listens under its own name and the mark commits with the work of the handler.
6
+ */
7
+ export declare function subscriptionVars(scope: Scope, isTyped: boolean): RenderContext;
8
+ //# sourceMappingURL=subscription-vars.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscription-vars.d.ts","sourceRoot":"","sources":["../../../src/generate/kinds/subscription-vars.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,GAAG,aAAa,CAS9E"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * How a hand-wired handler subscribes. In the process, the subscription deduplicates; behind a
3
+ * broker, each context listens under its own name and the mark commits with the work of the handler.
4
+ */
5
+ export function subscriptionVars(scope, isTyped) {
6
+ const external = scope.config.stack.broker !== 'none';
7
+ return {
8
+ declarative: isTyped && !external,
9
+ transactional: isTyped && external,
10
+ untyped: !isTyped,
11
+ subscriber: external ? `platform.subscriberFor('${scope.context.kebab}')` : 'platform.subscriber',
12
+ };
13
+ }
14
+ //# sourceMappingURL=subscription-vars.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscription-vars.js","sourceRoot":"","sources":["../../../src/generate/kinds/subscription-vars.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAY,EAAE,OAAgB;IAC7D,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC;IAEtD,OAAO;QACL,WAAW,EAAE,OAAO,IAAI,CAAC,QAAQ;QACjC,aAAa,EAAE,OAAO,IAAI,QAAQ;QAClC,OAAO,EAAE,CAAC,OAAO;QACjB,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,2BAA2B,KAAK,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,qBAAqB;KAClG,CAAC;AACJ,CAAC"}
@@ -0,0 +1,16 @@
1
+ /** A name a generator checks against the glossary of a context, as it reaches the check. */
2
+ export interface HeardName {
3
+ readonly context: string;
4
+ /** Directory of the context, relative to the project root: its CONTEXT.md holds the glossary. */
5
+ readonly dir: string;
6
+ readonly name: string;
7
+ /** The words a name of this role may carry besides the glossary: the qualifiers of a refusal. */
8
+ readonly qualifiers: readonly string[];
9
+ }
10
+ /**
11
+ * Hears each name a generator would judge against the glossary, in place of the judgement: the
12
+ * generator then writes on whatever the words. `plan-waves` replays the planned commands with one,
13
+ * so that the generator itself says which names a command introduces.
14
+ */
15
+ export type LanguageProbe = (heard: HeardName) => void;
16
+ //# sourceMappingURL=language-probe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"language-probe.d.ts","sourceRoot":"","sources":["../../src/generate/language-probe.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,iGAAiG;IACjG,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,iGAAiG;IACjG,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC;AAED;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=language-probe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"language-probe.js","sourceRoot":"","sources":["../../src/generate/language-probe.ts"],"names":[],"mappings":""}
@@ -4,5 +4,5 @@ import type { Workspace } from '../workspace/index.js';
4
4
  * `--local-only`: a plan that reaches outside the given context (its directory, its Prisma models
5
5
  * and the end-to-end specs) is refused whole, before anything is written, naming the shared files.
6
6
  */
7
- export declare function refuseSharedWrites(ws: Workspace, config: Config, context: string | undefined): void;
7
+ export declare function refuseSharedWrites(ws: Workspace, config: Config, context: string | undefined, argv?: readonly string[]): void;
8
8
  //# sourceMappingURL=refuse-shared-writes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"refuse-shared-writes.d.ts","sourceRoot":"","sources":["../../src/generate/refuse-shared-writes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAO9C;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAkBnG"}
1
+ {"version":3,"file":"refuse-shared-writes.d.ts","sourceRoot":"","sources":["../../src/generate/refuse-shared-writes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAO9C;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,EAAE,EAAE,SAAS,EACb,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,IAAI,GAAE,SAAS,MAAM,EAAO,GAC3B,IAAI,CAkBN"}
@@ -6,7 +6,7 @@ const E2E_SPEC = /^test\/e2e\/[^/]+\.e2e\.spec\.ts$/;
6
6
  * `--local-only`: a plan that reaches outside the given context (its directory, its Prisma models
7
7
  * and the end-to-end specs) is refused whole, before anything is written, naming the shared files.
8
8
  */
9
- export function refuseSharedWrites(ws, config, context) {
9
+ export function refuseSharedWrites(ws, config, context, argv = []) {
10
10
  const plan = ws.commit(true);
11
11
  const local = (file) => E2E_SPEC.test(file) ||
12
12
  (context !== undefined &&
@@ -15,7 +15,7 @@ export function refuseSharedWrites(ws, config, context) {
15
15
  if (shared.length === 0) {
16
16
  return;
17
17
  }
18
- throw new CliError(`--local-only: this command would write ${shared.length} shared file${shared.length === 1 ? '' : 's'}: ${shared.join(', ')}.`, `Nothing was written. ${repositoryAdvice(config, plan.created)}Have it run on the trunk without --local-only (the conductor of a parallel build does it), merge the trunk, then go on; a generated document listed alone means the trunk is stale: run \`ddd-ts-kit docs\` there first.`);
18
+ throw new CliError(`--local-only: this command would write ${shared.length} shared file${shared.length === 1 ? '' : 's'}: ${shared.join(', ')}.`, `Nothing was written. ${repositoryAdvice(config, plan.created)}${trunkAdvice(argv)}Have it run on the trunk without --local-only (the conductor of a parallel build does it), merge the trunk, then go on; a generated document listed alone means the trunk is stale: run \`ddd-ts-kit docs\` there first.`);
19
19
  }
20
20
  /** A command on an aggregate without a repository creates it: the trunk generates the repository first, as the row of the aggregate says. */
21
21
  function repositoryAdvice(config, created) {
@@ -34,4 +34,27 @@ function repositoryAdvice(config, created) {
34
34
  }
35
35
  return `The aggregate has no repository yet: on the trunk, run ${commands.join(' and ')} first (it reads the aggregate, event-sourced or not), then run this command again. `;
36
36
  }
37
+ /** Kinds whose shared files belong to the trunk (the contracts first): the refusal gives the conductor the command to run there. */
38
+ const CONDUCTOR_KINDS = new Set(['job', 'integration-event']);
39
+ /** A job or an integration event of a row is a step of the conductor on the trunk: the same command without `--local-only`, then the worker merges the trunk and fills the TODOs. */
40
+ function trunkAdvice(argv) {
41
+ const [kind] = argv;
42
+ if (kind === undefined || !CONDUCTOR_KINDS.has(kind)) {
43
+ return '';
44
+ }
45
+ const command = withoutWorkerFlags(argv).map(quoted).join(' ');
46
+ return `${kind === 'job' ? 'A' : 'An'} ${kind} of a row is a step of the conductor, before the row of the worker: on the trunk, run \`ddd-ts-kit generate ${command}\`, commit it there, merge the trunk into the worker's branch (\`ddd-ts-kit merge-trunk\`), then fill its TODOs. `;
47
+ }
48
+ /** The worker's own flags stay behind: `--local-only`, and `--cwd`, the directory of the worker's worktree, not of the trunk. */
49
+ function withoutWorkerFlags(argv) {
50
+ return argv.flatMap((word, index) => {
51
+ if (word === '--local-only' || word.startsWith('--cwd=') || word === '--cwd' || argv[index - 1] === '--cwd') {
52
+ return [];
53
+ }
54
+ return [word];
55
+ });
56
+ }
57
+ function quoted(word) {
58
+ return /^[\w@%+=:,./-]+$/.test(word) ? word : `"${word.replace(/(["\\$`])/g, '\\$1')}"`;
59
+ }
37
60
  //# sourceMappingURL=refuse-shared-writes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"refuse-shared-writes.js","sourceRoot":"","sources":["../../src/generate/refuse-shared-writes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGxC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,eAAe,GAAG,8DAA8D,CAAC;AAEvF,MAAM,QAAQ,GAAG,mCAAmC,CAAC;AAErD;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,EAAa,EAAE,MAAc,EAAE,OAA2B;IAC3F,MAAM,IAAI,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAE7B,MAAM,KAAK,GAAG,CAAC,IAAY,EAAW,EAAE,CACtC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;QACnB,CAAC,OAAO,KAAK,SAAS;YACpB,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,WAAW,IAAI,OAAO,GAAG,CAAC,IAAI,IAAI,KAAK,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAEhG,MAAM,MAAM,G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,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,GAAG,CAAC;AAC1F,CAAC"}
@@ -3,7 +3,8 @@ import type { Scope } from './scope.js';
3
3
  /**
4
4
  * Refuses a name that carries a technical word no term of the glossary holds, or a word the
5
5
  * glossary of the context does not define, the `qualifiers` aside (those of a refusal:
6
- * `InvalidAppointment`, `BookingTooLate`). `--allow-name` lets any name through.
6
+ * `InvalidAppointment`, `BookingTooLate`). `--allow-name` lets any name through. A probe of the
7
+ * language hears the name instead, and the generator goes on.
7
8
  */
8
9
  export declare function spokenInLanguage(scope: Scope, name: Name, qualifiers?: readonly string[]): void;
9
10
  //# sourceMappingURL=spoken-in-language.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spoken-in-language.d.ts","sourceRoot":"","sources":["../../src/generate/spoken-in-language.ts"],"names":[],"mappings":"AAIA,OAAO,EAAU,KAAK,IAAI,EAAE,MAAM,WAAW,CAAC;AAE9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,GAAE,SAAS,MAAM,EAAO,GAAG,IAAI,CAUnG"}
1
+ {"version":3,"file":"spoken-in-language.d.ts","sourceRoot":"","sources":["../../src/generate/spoken-in-language.ts"],"names":[],"mappings":"AAIA,OAAO,EAAU,KAAK,IAAI,EAAE,MAAM,WAAW,CAAC;AAE9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,GAAE,SAAS,MAAM,EAAO,GAAG,IAAI,CAgBnG"}
@@ -6,12 +6,17 @@ import { glossaryOf } from './glossary-of.js';
6
6
  /**
7
7
  * Refuses a name that carries a technical word no term of the glossary holds, or a word the
8
8
  * glossary of the context does not define, the `qualifiers` aside (those of a refusal:
9
- * `InvalidAppointment`, `BookingTooLate`). `--allow-name` lets any name through.
9
+ * `InvalidAppointment`, `BookingTooLate`). `--allow-name` lets any name through. A probe of the
10
+ * language hears the name instead, and the generator goes on.
10
11
  */
11
12
  export function spokenInLanguage(scope, name, qualifiers = []) {
12
13
  if (scope.flags.allowName) {
13
14
  return;
14
15
  }
16
+ if (scope.flags.language !== undefined) {
17
+ scope.flags.language({ context: scope.context.kebab, dir: scope.dir, name: name.pascal, qualifiers });
18
+ return;
19
+ }
15
20
  const glossary = glossaryOf(scope);
16
21
  const file = `${scope.dir}/CONTEXT.md`;
17
22
  refuseTechnicalWords(name, glossary, file);
@@ -1 +1 @@
1
- {"version":3,"file":"spoken-in-language.js","sourceRoot":"","sources":["../../src/generate/spoken-in-language.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,MAAM,EAAa,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAY,EAAE,IAAU,EAAE,UAAU,GAAsB,EAAE;IAC3F,IAAI,KAAK,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;QAC1B,OAAO;IACT,CAAC;IAED,MAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;IACnC,MAAM,IAAI,GAAG,GAAG,KAAK,CAAC,GAAG,aAAa,CAAC;IAEvC,oBAAoB,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC3C,kBAAkB,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;AAC3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CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAElH,MAAM,IAAI,QAAQ,CAChB,IAAI,IAAI,CAAC,MAAM,UAAU,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,2BAA2B,IAAI,mBAAmB,EACxH,UAAU,KAAK,0CAA0C,KAAK,0EAA0E,CACzI,CAAC;AACJ,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 --run <script> runs that script of the project on them (DDD_TS_KIT_AFFECTED set,\n --passWithNoTests on a partial run) and nothing when nothing that runs changed:\n the pre-push hook tests the contexts its branch reaches\n build-aliases after the compiler: rewrites the import aliases left in the emitted .js and .d.ts files\n into relative paths, so that plain node runs the output (tsconfig.build.json by default)\n drizzle-generate the db:generate of a Drizzle project: drizzle-kit generate --name, which without a terminal\n fails and names the fix when drizzle-kit would ask whether a column or table is renamed,\n where drizzle-kit alone writes nothing and exits 0; then formats the snapshot and the\n journal it wrote with the Biome or Prettier of the format script, and warns when the\n SQL changes a primary key in an order that fails on PostgreSQL (exit code unchanged);\n --replay, after merging the trunk into a branch when both added migrations: when the\n history forks from --base <ref> (origin/main by default), deletes the migrations of the\n branch the base does not have, with their snapshots and journal entries, then generates\n each again on top, in order, under its name (working- dropped outside a worker's\n worktree, a custom one keeping its SQL); when it does not fork, only renames them;\n refused while the journal holds conflict markers, when two of them change the schema,\n or when drizzle-kit now writes a generated one otherwise (edited by hand), the folder\n then put back as it was\n error-factories moves the refusals of a project to one class per refusal (--to named, the default), from\n one class per error or from the factories of one error class per concept: --plan writes\n error-factories.plan.json, where each refusal is given a class (the PascalCase of its\n code, which it keeps) and a factory (for<Concept>), both editable; --apply follows it\n (codes.ts per context, one class file per refusal, specs, every usage, the concept\n classes left empty, \"stack.refusals\" in the config) and lists what it cannot rewrite\n (a bare <Concept>Error.is(error), CodeOf<typeof <Concept>Error>); --to factories moves\n one class per error to static factories on one error class per concept instead\n value-objects moves the value objects of a project from a Result to factories that return the value or\n throw: every create returning Result<T, E> returns T, err(..) is thrown, unwrap(..) of\n them goes, specs assert expectRefusal(() => ..), \"stack.valueObjects\" becomes throwing\n platform-folders takes the files of the platform a project generated flat to their folders:\n composition/, observability/ (tracing.ts first), jobs/, auth/authentication/ (who is\n calling), auth/authorization/ (what they may do, whatever the model), the folder of\n the model (auth/roles/, attributes/, relationships/, custom/) and\n audit/search-audit-entries/; every import of them under the source root, test/ and\n scripts/ follows, and the scripts of package.json; a file the kit did not write at\n the root of the platform or of auth/ stays where it is, named, unless --place\n <file>=<folder> (both from the platform) gives it its folder; the generators and\n init --force keep either layout until then\n move-to-module takes files of a context into a module of its model, declared first with generate module,\n each to <module>/<layer>/ and each spec to test/<unit|integration>/<module>/: each <path>\n is a file or a folder of a role or a spec, relative to the context\n (domain/aggregates/waitlist.aggregate.ts, application/commands/join-waitlist,\n infrastructure/persistence/knex-waitlist.repository.ts); the specs named after a moved\n file follow it, every import of them under the source root, test/ and scripts/ follows,\n and the generated declarations are rewritten; what the modules share stays at the level\n of the context: the code list and the permission set at its root, the schema of its\n database, its route groups, guards and shared shapes, its fakes, builders and worlds\n context-layout takes the files of the contexts, or of the ones named, that 0.86 or 0.87 wrote elsewhere to\n their place of today: domain/errors/codes.ts to <context>.codes.ts and\n application/authorization/<context>.permissions.ts to <context>.permissions.ts, at the\n root of the context, and each module of the model from domain/<module>/ and\n application/<module>/ to <module>/domain/ and <module>/application/, with the adapters,\n routes and specs it tells by their imports (a spec by the file it is named after); what\n names no module, or two, is listed and stays; every import of them under the source\n root, test/ and scripts/ follows, what derives from the tree is written again\n (.dependency-cruiser.cjs, the declarations) and knip is told of the code lists where they\n are; the generators keep the code lists and permission sets where they are until then\n controllers moves the function routes of a project, or of one context, to controller classes: each\n <name>.route.ts becomes <resource>/<name>/<name>.controller.ts behind the route group of\n its resource, its schema files and its spec follow; a context is turned whole or not at all\n doctor what an upgrade left to do: the scripts, the packages of the kit (at the ranges of this\n version) and the agent permissions this version writes that the project lacks or writes\n otherwise, and the git hooks (the lefthook: line of lefthook.yml, the pre-commit hook of\n lefthook in this clone); init adds what is missing, hooks:install the hook; then what\n this checkout lacks to run the project, read without network: the running Node against\n engines.node and .nvmrc, node_modules installed since the lockfile last changed, each\n package of the kit installed at the version of this CLI, the submodules initialised;\n last, the overrides init writes under a dependency that pins a package below a\n security fix, missing or no longer needed once it asks for the fix itself;\n each with its fix; --strict exits 1 while something is missing or the checkout cannot\n run the project, never for a hook this clone has not installed, a Node .nvmrc does not\n name, a lockfile changed since the install or an override no longer needed\n lint the ESLint of the project (lint and ci:lint run it): fails on an error, and on a warning\n as on an error, but on one of a rule of the kit in transition, a new rule that becomes an\n error in the version it names, whose warnings are listed apart; --format and --fix as ESLint\n describe one context as facts: use cases, routes, events, ports, policies, gateways, dependencies\n status the next step of docs/architecture/plan.md, the slices of docs/architecture/slices.md by\n status and by owner, each row not done ready on the trunk (its dependencies done), ready\n on a branch (the others briefed to a worker with commits ahead of its base) or waiting\n (with the ids it waits for), a row that landed with a worker's branch but is not marked done,\n and the TODO(domain), TODO(platform), it.todo and TODO(review) left in each context, and\n each story or milestone whose rows are all done while markers of its own keep it open (see\n story-check, whose git blame it runs on those markers only); --workers shows instead each\n worktree holding .ddd-ts-kit/worker.json (branch, context, rows, base, commits ahead and\n files changed counted from where its branch landed on the base when it was squash-merged\n there (else from the merge base), commits behind, the commit it landed as, what merge-trunk\n would leave conflicted now, dependencies not installed, its report), a state line (rows\n committed, the row under way, files uncommitted, markers, last verify-slice, and the\n worker-scope --resume command of a stopped one), then the contexts and the files more than\n one worker holds\n sdk the typed client of each document of the contract, a workspace package under\n clients/<document> without runtime dependency: typed errors keyed by the error codes,\n credentials per security scheme; records \"sdk\" in the config the first time, wires the\n scripts (docs:generate regenerates it, docs:check compares it, ci:build builds it);\n --check writes nothing and exits 1 while a client differs from its contract\n todo those markers as file:line, in the project or in one context, read in every kind of file\n they are written into: the code, the pages, the files of prisma/schema/ (a marker of\n prisma/schema/<context>.prisma is of that context, another of the context whose\n database schema holds its model), the migrations, the configuration at the root\n mutation the mutation score of the domain and application layers of each context, read from the\n json report the last stryker run wrote (reports/mutation/mutation.json, or --report\n <file>), each held to its \"mutation\" floor of the config (80 and 75 by default): detected over detected and\n undetected, the errors left out, as Stryker counts, the ignored mutants (the texts of\n refusals, the code that runs once when the module loads) shown beside, since the\n score says nothing about them; exits 1 while a layer is under its floor, 2 without\n a report. --survivors lists the mutants no test noticed (file:line, mutator, what the\n code became), each a decision: a test named after the rule, or left alive and said so;\n --changed <ref>, or DDD_TS_KIT_MUTATION_SINCE in the environment as the job of a pull\n request sets it, lists those of the files changed since the git ref alone and exits 0\n whatever the scores, a reading for a change in progress. Runs no test: npm run\n test:mutation runs Stryker, then this; the pipeline runs it every night and, with\n the variable set to the merge base of the change, on a pull request\n plan-waves the rows of slices.md not done, of the project or of one context, in waves (wave 1: every\n dependency done; wave n: the others in earlier waves), each wave cut into batches of one\n owner, one or two rows on one aggregate, with the worker-scope command that briefs each,\n the batches of a wave likely to touch the same files (same aggregate in Start with, or\n unknown when it names none), each row a row waits for with its status (and its context\n and story when it is of another story or outside the context shown), the rows of other\n stories the planned rows wait for, not done, in a section of their own, the merge order\n and what runs before each merge (merge-trunk --to-land); a cycle, a dependency on an\n unknown id or a row without owner is reported alone, and exits 1\n story-check whether a story or a milestone can close, <code> being the start of the ids of its rows\n (M1 for M1.01, M1.02: the id without its last .<number>): every row of it done in\n slices.md (the others listed with their status), and no marker of its own left\n (TODO(domain), TODO(platform), it.todo, TODO(review)). A marker is attributed to\n rows: those its text names (#M1.03 or M1.03, word-bounded), else those of the commit\n that wrote its line (git blame, once per file; its Slice: trailer, else the row ids\n its message names), else, not committed, those of .ddd-ts-kit/worker.json in a\n worker's worktree. It is the story's own when it belongs to one of its rows,\n wherever it is; a marker of a context of its rows that belongs to no row is its own\n when no other open story has a row in that context, and is listed without blocking\n otherwise (settle it or name its row in it); a marker of other stories' rows does not\n block. --strict: every marker of its contexts blocks. Each blocker comes with why it\n is its own, its file:line and its fix: handle it, or dismiss it by a decision record\n (generate adr), then delete the marker. A done row also holds to its design: every\n name the ## #<id> section of docs/architecture/reviews/<code>.md cites (a path, a\n PascalCase name, a Class.member, as cited reads them) exists in the tree, or is\n listed under ### Compromises of ## Report in the story file; a name that is neither\n blocks, with its file:line in the review. A commit of the story on the current branch\n (its Slice: trailer, else its message naming a row or the story) that changes a\n migration or a container file (the paths the change-reference hook of the regulated\n profile watches) without a Change: <id> trailer is listed, with its files, and blocks\n under agents.profile regulated or with --strict. Reads only: exits 0 when it can\n close, 1 listing what keeps it open, 2 on a code no row carries or without slices.md\n acceptance the acceptance scenarios of each story (test/acceptance/<story>.acceptance.spec.ts) against\n its rows in slices.md and the criteria of docs/architecture/stories/<story>.md: the rows and\n criteria each scenario names (#US5.02 AC1 in its title), the scenarios left to write\n (it.todo), those wrapped in pending(...) of @ddd-ts-kit/testing/e2e until their code is\n built, and what is inconsistent (no row, an unknown row or criterion, a scenario skipped,\n a pending one whose rows are done, a locked one changed while its criteria were not);\n --gate written: every slice row and criterion has a written scenario, none is left to\n write, the acceptance is locked (before the code of the story); --gate passing: none is\n pending either (before the story closes); exits 1 while a gate is not met, or, without\n one, on an inconsistency. Never runs a test. --lock writes\n test/acceptance/<story>.acceptance.lock.json, the fingerprint of each criterion and of\n each scenario (pending(...), layout and comments aside), refused while a scenario is\n left to write, or while a criterion changed, or a locked scenario changed while its\n criteria did not, without a verdict \"amend\" of the acceptance-judge agent on that very\n version (test/acceptance/verdicts/*.md, lines Story:, Subject:, Fingerprint:,\n Verdict:, Reason:); a refusal wins; the verdicts become amendments of the lock,\n listed for the owner to validate. A fix is a story file with a ## Regression section\n listing the spec files that prove it (- test/unit/<name>.spec.ts): held to the tests of\n those files instead of rows and scenarios, locked and judged the same way, the statement\n of the fix being the criterion\n worker-scope a git worktree on the branch build/<context> (by default .worktrees/<context>, see worktree),\n cut from --base <ref> (by default the current branch, refused from a worker's worktree), its\n .ddd-ts-kit/worker.json, and the briefing of the worker of that context; --rows <id,...>\n briefs those rows of slices.md only, with their rules, the documents of their design and\n the names that design cites the base does not have (see cited), and by default the first\n batch plan-waves cuts for the context (one or two rows on one aggregate), a note naming the\n next; a worktree it creates gets the clean install of the package manager (npm ci), its\n time in the notes, unless --no-install; an existing worktree or branch that does not\n contain the base is refused, with the merge-trunk that brings it in\n --here worker-scope in the worktree of a story (.ddd-ts-kit/story.json): writes the scope of the\n next agent in place, its base the base of the story, and prints its briefing; no\n worktree, branch or install of its own; the agents of a story run one after the other\n story-scope the worktree of one story, .worktrees/<story> on story/<story> cut from --base (by default\n origin/main from the trunk, else the current branch, refused from the worktree of a\n story), its .ddd-ts-kit/story.json ({ story, base, baseCommit, branch, kind, from }) and\n its clean install; an existing one is kept and the story resumes there; refused when the\n story is open in another worktree; names the other open stories and the contexts their\n rows change; --kind story (the default) or fix (a story built behind locked regression\n specs, listed under ## Regression of its file); --from <file> records where the story\n comes from, an intent of docs/architecture/intents/ (refused unless its header says\n Status: accepted) or an incident record of docs/architecture/incidents/, and the Next:\n line says that the story skill seeds the statement from it while the story file does\n not exist\n worktree the worktree of any other piece of work, .worktrees/<name> on work/<name> cut from --base\n (by default origin/main from the trunk, else the current branch), and its clean install\n unless --no-install; an existing one is kept; .worktrees/ lies in the main checkout,\n whichever worktree it runs from, ignored by git and by the tools of the project; while\n the .gitignore of a project started before does not hold it (init adds it), a worktree\n opens next to the project, ../<project>-<name>; in a project whose config says\n \"worktrees\": \"required\" (what init writes), the guard of the plugin refuses the code of\n a context in the main checkout of the trunk, and in a worktree of .worktrees/ without\n its own node_modules\n story where a story stands, phase by phase: its specification and criteria\n (docs/architecture/stories/<story>.md), its rows in slices.md, a design review section\n per row not done (docs/architecture/reviews/<story>.md, ## #<id>), its acceptance written\n and locked, its rows done, its acceptance passing, its trunk merged in, its ## Origin\n (From: and Built with:), its ## Report with ### Verification naming npm run verify; and\n the next step; in the worktree of a story, the story is its own; --gate build exits 1\n until the first four are met (the code may start: the guard of the plugin opens the\n contexts), --gate close until all are\n stories the stories open in the worktrees of the repository and where two of them meet: the\n contexts the rows of both name, the files both worktrees change (committed or not), what\n merging the branch of one into the other leaves to a person and what merge-trunk settles\n (git merge-tree, nothing written); how far each is behind its base; from the worktree of a\n story, the stories it meets; the guard of the plugin says it at session start and on a\n write to a file another story changes\n --resume worker-scope reads where the stopped worker of the context stands (its rows by their\n Slice: trailer, the files of the row under way, the markers, its last verify-slice, its\n report, its agent as the guard recorded it) and prints the message that resumes its agent\n (SendMessage) or the briefing of a new one; creates and rewrites nothing; --fresh asks for\n a new agent whatever the last one did; several worktrees of the context need --worktree\n verify-slice closes a slice before its commit, in one run: the regenerate script, check on the files\n changed since --since (new ones included), the test script for the context; then the\n changed files past 300 of the 350 lines, the paths of the slice to stage (its context, its\n Prisma models, an end-to-end spec, a working migration, the pages of docs/behaviour/ but\n those of other contexts, prisma/schema/schema.prisma when its one change is the context\n joining the schemas of the datasource, the schema index of the platform when every line\n changed there is of the context, the derived files git tracks) and every other\n changed path, left out and never to stage with it; the merges since --since, as\n verify-merge checks them, reported without failing the slice in this version (a later\n minor version fails it); exits 1 while a step fails; then the names the slice removes\n that the design of a row not done still cites (never a failure); in the worktree of a\n worker, the commit command with the trailer Slice: <row>, and\n .ddd-ts-kit/verification.json for the conductor\n cited the names the design of rows not done cites as code (paths, classes, Class.member) that\n the code does not have: those the history of --base removed (with the commit and the\n successor), the places the canonical tree refuses, and a name never there whose close\n name of the same part arrived after the line was written; planned names stay silent.\n The design of a row: its cells and rule lines in slices.md, a section of a document of\n docs/architecture whose heading names it, a document that names it or that its rule\n line links to. Default: every row not done, of the context when given, at the current\n branch. --removed-since <ref>: the names a change removes, from the merge base to the\n working tree, that such a design cites. Reads only, exits 0\n verify-merge what the merges of a branch lost, read from git only: every merge commit since --since\n (by default the base of .ddd-ts-kit/worker.json, then origin/HEAD, then origin/main) and\n the merge in progress (its result: the index and the working tree), or one <commit>; a\n squash commit takes --theirs <head of the branch it took in>. Errors: a line one side\n added or both kept missing from the result (whitespace, a line laid out again, a move\n to another file and imports merged into one statement aside), a file neither side\n deleted gone from the result, a row of slices.md done on one side and no longer done or\n gone, a test title or a spec file of one side gone, a migration of one side whose\n description (name without number and working-) the result lacks, a conflict marker;\n warnings: a line one side removed brought back, a line one side wrote where the other\n changed the same lines or deleted the file (the merge chose), a line the merge replaced\n by lines of its own. Derived files, files a tool says it wrote, migrations, lockfiles\n and slices.md are left out of the lines. The base is --base, else the Merge-Base:\n trailer of the merge, else git merge-base; entries of a Lost-Accepted: <file:line>,...\n trailer are listed and never fail, nor what a later commit restored; silent and exit 0\n without a merge, exit 1 on an error; --warn prints the same and exits 0, as the\n pre-push hook of init runs it in this version (a later minor version blocks the push)\n merge-trunk brings the trunk (--trunk, by default origin/HEAD then origin/main, never fetched) into the\n branch as one merge commit computed from the branch's own diff: from the newest commit of\n the branch the trunk holds (--since; else the commit whose patch, derived files,\n migrations, slices.md, plan.md and lockfiles left out, is one commit of the trunk, on this\n branch or a branch it shares commits with; else the base recorded for the worker when its\n lines are on the trunk; else git merge-base). Settles derived files and drizzle-kit meta\n (trunk side), the package.json of a client (trunk side, at the higher of both versions;\n left to you when one is not a semantic version), generated regions of CONTEXT.md and the\n context map (trunk side), conflicts inside generated registries (lines of both sides),\n slices.md row by row (the furthest status), the stored-events lock by key, the lockfile\n (trunk side, installed again when the branch changed package.json); the rest is left in a\n merge in progress git understands, with what each side did (exit 1). Then, or on\n --continue: the drizzle migrations of both sides replayed, on --to-land the working\n migrations renamed (knex, Prisma, TypeORM; stop when both sides change one table), decision\n records renumbered, regenerate, verify-merge on the uncommitted result (an error stops;\n --accept-lost records a Lost-Accepted: trailer), and the commit of the merge's paths only,\n with the trailers Merge-Base:, Trunk: and Landed:; any other changed path blocks it.\n --dry-run previews, --abort undoes; refused (exit 2) on a dirty tree, another operation in\n progress, no committer known to git, an unknown trunk, or a git older than 2.40 with a base\n git would not compute\n --commit-size the files and lines about to be committed against \"commit\" in the config (20 files and\n 600 lines by default, generated files not counted); --staged reads the index only;\n advisory, --strict exits 1 when over\n --explain check follows the violations with the reason of each rule they report, once per rule, as\n explain gives it without its examples (\"explanations\" in JSON); with github and gitlab, each\n annotation carries the reason of its rule, a pull request showing an annotation on its own\n --behaviour docs writes the pages of what the tests state (docs/behaviour/) alone, every other generated\n document left as it is: what the pre-commit hook runs when a spec is staged; with --check,\n those pages alone are compared\n --stored-events docs records the shape of each version of the stored events in stored-events.lock.json,\n never rewriting a recorded one but one recorded by 0.82.0 or earlier, recorded again as\n the kit reads it now: run it once the shape of a version is the one to store; docs --check\n fails while a declared version is not recorded, or recorded by 0.82.0 or earlier, or\n recorded as the hash of nothing; the codecs of each module of a context are read too, and a\n codec whose data type is not found or declares no member is refused, nothing recorded\n --sdk init records \"sdk\" in the config and generates the clients with the project\n --term generate adds the row \"<Term>=<meaning>\" to the glossary of the CONTEXT.md before it judges\n a name; \"<Term>=<meaning>|<not to be confused with>\" fills the third cell too, a pipe being\n the one character a cell of the table cannot hold\n --reason generate context writes it under ## Classification, the sentence of why the context is\n of its classification; generate adr --deviation records it as the reason of the deviation\n --local-only generate refuses, and writes nothing, when the kind would write outside its context;\n \"generate --help --json\" says which kinds do\n --module generate writes the files of the layers into that module of the model of the context\n (declared first with generate module), <module>/domain/ to <module>/presentation/, and\n their specs into test/unit/<module>/, finds the files it reads in the module that holds\n them and writes the imports to where they are; taken by the kinds whose usage below\n shows [--module <module>], and required by them in a context that declares modules\n (a file of a use case already in a module goes with it, and another module is\n refused); every other kind refuses it, what it writes staying at the level of the\n context (code list, permission set, database schema, route groups, guards, shared\n shapes, fakes, builders, worlds) or outside the contexts";
2
+ export declare const NOTES = " affected what a pull request has to run: the contexts a change set reaches through the context\n map (a changed context and the contexts downstream of it), as filters for the test\n runner and the linter; everything when a shared path changed or without --base;\n --run <script> runs that script of the project on them (DDD_TS_KIT_AFFECTED set,\n --passWithNoTests on a partial run) and nothing when nothing that runs changed:\n the pre-push hook tests the contexts its branch reaches\n build-aliases after the compiler: rewrites the import aliases left in the emitted .js and .d.ts files\n into relative paths, so that plain node runs the output (tsconfig.build.json by default)\n drizzle-generate the db:generate of a Drizzle project: drizzle-kit generate --name, which without a terminal\n fails and names the fix when drizzle-kit would ask whether a column or table is renamed,\n where drizzle-kit alone writes nothing and exits 0; then formats the snapshot and the\n journal it wrote with the Biome or Prettier of the format script, and warns when the\n SQL changes a primary key in an order that fails on PostgreSQL (exit code unchanged);\n --replay, after merging the trunk into a branch when both added migrations: when the\n history forks from --base <ref> (origin/main by default), deletes the migrations of the\n branch the base does not have, with their snapshots and journal entries, then generates\n each again on top, in order, under its name (working- dropped outside a worker's\n worktree, a custom one keeping its SQL); when it does not fork, only renames them;\n refused while the journal holds conflict markers, when two of them change the schema,\n or when drizzle-kit now writes a generated one otherwise (edited by hand), the folder\n then put back as it was\n error-factories moves the refusals of a project to one class per refusal (--to named, the default), from\n one class per error or from the factories of one error class per concept: --plan writes\n error-factories.plan.json, where each refusal is given a class (the PascalCase of its\n code, which it keeps) and a factory (for<Concept>), both editable; --apply follows it\n (codes.ts per context, one class file per refusal, specs, every usage, the concept\n classes left empty, \"stack.refusals\" in the config) and lists what it cannot rewrite\n (a bare <Concept>Error.is(error), CodeOf<typeof <Concept>Error>); --to factories moves\n one class per error to static factories on one error class per concept instead\n value-objects moves the value objects of a project from a Result to factories that return the value or\n throw: every create returning Result<T, E> returns T, err(..) is thrown, unwrap(..) of\n them goes, specs assert expectRefusal(() => ..), \"stack.valueObjects\" becomes throwing\n platform-folders takes the files of the platform a project generated flat to their folders:\n composition/, observability/ (tracing.ts first), jobs/, auth/authentication/ (who is\n calling), auth/authorization/ (what they may do, whatever the model), the folder of\n the model (auth/roles/, attributes/, relationships/, custom/) and\n audit/search-audit-entries/; every import of them under the source root, test/ and\n scripts/ follows, and the scripts of package.json; a file the kit did not write at\n the root of the platform or of auth/ stays where it is, named, unless --place\n <file>=<folder> (both from the platform) gives it its folder; the generators and\n init --force keep either layout until then\n move-to-module takes files of a context into a module of its model, declared first with generate module,\n each to <module>/<layer>/ and each spec to test/<unit|integration>/<module>/: each <path>\n is a file or a folder of a role or a spec, relative to the context\n (domain/aggregates/waitlist.aggregate.ts, application/commands/join-waitlist,\n infrastructure/persistence/knex-waitlist.repository.ts); the specs named after a moved\n file follow it, every import of them under the source root, test/ and scripts/ follows,\n and the generated declarations are rewritten; what the modules share stays at the level\n of the context: the code list and the permission set at its root, the schema of its\n database, its route groups, guards and shared shapes, its fakes, builders and worlds\n context-layout takes the files of the contexts, or of the ones named, that 0.86 or 0.87 wrote elsewhere to\n their place of today: domain/errors/codes.ts to <context>.codes.ts and\n application/authorization/<context>.permissions.ts to <context>.permissions.ts, at the\n root of the context, and each module of the model from domain/<module>/ and\n application/<module>/ to <module>/domain/ and <module>/application/, with the adapters,\n routes and specs it tells by their imports (a spec by the file it is named after); what\n names no module, or two, is listed and stays; every import of them under the source\n root, test/ and scripts/ follows, what derives from the tree is written again\n (.dependency-cruiser.cjs, the declarations) and knip is told of the code lists where they\n are; the generators keep the code lists and permission sets where they are until then\n controllers moves the function routes of a project, or of one context, to controller classes: each\n <name>.route.ts becomes <resource>/<name>/<name>.controller.ts behind the route group of\n its resource, its schema files and its spec follow; a context is turned whole or not at all\n doctor what an upgrade left to do: the scripts, the packages of the kit (at the ranges of this\n version) and the agent permissions this version writes that the project lacks or writes\n otherwise, and the git hooks (the lefthook: line of lefthook.yml, the pre-commit hook of\n lefthook in this clone); init adds what is missing, hooks:install the hook; then what\n this checkout lacks to run the project, read without network: the running Node against\n engines.node and .nvmrc, node_modules installed since the lockfile last changed, each\n package of the kit installed at the version of this CLI, the submodules initialised;\n last, the overrides init writes under a dependency that pins a package below a\n security fix, missing or no longer needed once it asks for the fix itself; and each\n install script the stack needs (the engines of Prisma, the Kafka client) that\n allowScripts of package.json or allowBuilds of pnpm-workspace.yaml does not allow for\n the version installed: missing, pinned to another version, or denied;\n each with its fix; --strict exits 1 while something is missing or the checkout cannot\n run the project, never for a hook this clone has not installed, a Node .nvmrc does not\n name, a lockfile changed since the install, an override no longer needed or a denied\n install script\n lint the ESLint of the project (lint and ci:lint run it): fails on an error, and on a warning\n as on an error, but on one of a rule of the kit in transition, a new rule that becomes an\n error in the version it names, whose warnings are listed apart; --format and --fix as ESLint\n describe one context as facts: use cases, routes, events, ports, policies, gateways, dependencies\n status the next step of docs/architecture/plan.md, the slices of docs/architecture/slices.md by\n status and by owner, each row not done ready on the trunk (its dependencies done), ready\n on a branch (the others briefed to a worker with commits ahead of its base) or waiting\n (with the ids it waits for), a row that landed with a worker's branch but is not marked done,\n and the TODO(domain), TODO(platform), it.todo and TODO(review) left in each context, and\n each story or milestone whose rows are all done while markers of its own keep it open (see\n story-check, whose git blame it runs on those markers only); --workers shows instead each\n worktree holding .ddd-ts-kit/worker.json (branch, context, rows, base, commits ahead and\n files changed counted from where its branch landed on the base when it was squash-merged\n there (else from the merge base), commits behind, the commit it landed as, what merge-trunk\n would leave conflicted now, dependencies not installed, its report), a state line (rows\n committed, the row under way, files uncommitted, markers, last verify-slice, and the\n worker-scope --resume command of a stopped one), then the contexts and the files more than\n one worker holds\n sdk the typed client of each document of the contract, a workspace package under\n clients/<document> without runtime dependency: typed errors keyed by the error codes,\n credentials per security scheme; records \"sdk\" in the config the first time, wires the\n scripts (docs:generate regenerates it, docs:check compares it, ci:build builds it);\n --check writes nothing and exits 1 while a client differs from its contract\n todo those markers as file:line, in the project or in one context, read in every kind of file\n they are written into: the code, the pages, the files of prisma/schema/ (a marker of\n prisma/schema/<context>.prisma is of that context, another of the context whose\n database schema holds its model), the migrations, the configuration at the root\n mutation the mutation score of the domain and application layers of each context, read from the\n json report the last stryker run wrote (reports/mutation/mutation.json, or --report\n <file>), each held to its \"mutation\" floor of the config (80 and 75 by default): detected over detected and\n undetected, the errors left out, as Stryker counts, the ignored mutants (the texts of\n refusals, the code that runs once when the module loads) shown beside, since the\n score says nothing about them; exits 1 while a layer is under its floor, 2 without\n a report. --survivors lists the mutants no test noticed (file:line, mutator, what the\n code became), each a decision: a test named after the rule, or left alive and said so;\n --changed <ref>, or DDD_TS_KIT_MUTATION_SINCE in the environment as the job of a pull\n request sets it, lists those of the files changed since the git ref alone and exits 0\n whatever the scores, a reading for a change in progress. Runs no test: npm run\n test:mutation runs Stryker, then this; the pipeline runs it every night and, with\n the variable set to the merge base of the change, on a pull request\n plan-waves the rows of slices.md not done, of the project or of one context, in waves (wave 1: every\n dependency done; wave n: the others in earlier waves), each wave cut into batches of one\n owner, one or two rows on one aggregate, with the worker-scope command that briefs each,\n the batches of a wave likely to touch the same files (same aggregate in Start with, or\n unknown when it names none), each row a row waits for with its status (and its context\n and story when it is of another story or outside the context shown), the rows of other\n stories the planned rows wait for, not done, in a section of their own, the merge order\n and what runs before each merge (merge-trunk --to-land); a cycle, a dependency on an\n unknown id or a row without owner is reported alone, and exits 1. Then replays the\n generator commands of the rows in a copy of the project, in the order of the waves,\n and reports without waves, exiting 1, each name whose words the glossary of its\n context does not define with the --term of its row and of the rows it waits for;\n the commands refused for another reason are listed, without failing\n story-check whether a story or a milestone can close, <code> being the start of the ids of its rows\n (M1 for M1.01, M1.02: the id without its last .<number>): every row of it done in\n slices.md (the others listed with their status), and no marker of its own left\n (TODO(domain), TODO(platform), it.todo, TODO(review)). A marker is attributed to\n rows: those its text names (#M1.03 or M1.03, word-bounded), else those of the commit\n that wrote its line (git blame, once per file; its Slice: trailer, else the row ids\n its message names), else, not committed, those of .ddd-ts-kit/worker.json in a\n worker's worktree. It is the story's own when it belongs to one of its rows,\n wherever it is; a marker of a context of its rows that belongs to no row is its own\n when no other open story has a row in that context, and is listed without blocking\n otherwise (settle it or name its row in it); a marker of other stories' rows does not\n block. --strict: every marker of its contexts blocks. Each blocker comes with why it\n is its own, its file:line and its fix: handle it, or dismiss it by a decision record\n (generate adr), then delete the marker. A done row also holds to its design: every\n name the ## #<id> section of docs/architecture/reviews/<code>.md cites (a path, a\n PascalCase name, a Class.member, as cited reads them) exists in the tree, or is\n listed under ### Compromises of ## Report in the story file; a name that is neither\n blocks, with its file:line in the review. A commit of the story on the current branch\n (its Slice: trailer, else its message naming a row or the story) that changes a\n migration or a container file (the paths the change-reference hook of the regulated\n profile watches) without a Change: <id> trailer is listed, with its files, and blocks\n under agents.profile regulated or with --strict. Reads only: exits 0 when it can\n close, 1 listing what keeps it open, 2 on a code no row carries or without slices.md\n acceptance the acceptance scenarios of each story (test/acceptance/<story>.acceptance.spec.ts) against\n its rows in slices.md and the criteria of docs/architecture/stories/<story>.md: the rows and\n criteria each scenario names (#US5.02 AC1 in its title), the scenarios left to write\n (it.todo), those wrapped in pending(...) of @ddd-ts-kit/testing/e2e until their code is\n built, and what is inconsistent (no row, an unknown row or criterion, a scenario skipped,\n a pending one whose rows are done, a locked one changed while its criteria were not);\n --gate written: every slice row and criterion has a written scenario, none is left to\n write, the acceptance is locked (before the code of the story); --gate passing: none is\n pending either (before the story closes); exits 1 while a gate is not met, or, without\n one, on an inconsistency. Never runs a test. --lock writes\n test/acceptance/<story>.acceptance.lock.json, the fingerprint of each criterion and of\n each scenario (pending(...), layout and comments aside), refused while a scenario is\n left to write, or while a criterion changed, or a locked scenario changed while its\n criteria did not, without a verdict \"amend\" of the acceptance-judge agent on that very\n version (test/acceptance/verdicts/*.md, lines Story:, Subject:, Fingerprint:,\n Verdict:, Reason:); a refusal wins; the verdicts become amendments of the lock,\n listed for the owner to validate. A fix is a story file with a ## Regression section\n listing the spec files that prove it (- test/unit/<name>.spec.ts): held to the tests of\n those files instead of rows and scenarios, locked and judged the same way, the statement\n of the fix being the criterion\n worker-scope a git worktree on the branch build/<context> (by default .worktrees/<context>, see worktree),\n cut from --base <ref> (by default the current branch, refused from a worker's worktree), its\n .ddd-ts-kit/worker.json, and the briefing of the worker of that context; --rows <id,...>\n briefs those rows of slices.md only, with their rules, the documents of their design and\n the names that design cites the base does not have (see cited), and by default the first\n batch plan-waves cuts for the context (one or two rows on one aggregate), a note naming the\n next; a worktree it creates gets the clean install of the package manager (npm ci), its\n time in the notes, unless --no-install; an existing worktree or branch that does not\n contain the base is refused, with the merge-trunk that brings it in\n --here worker-scope in the worktree of a story (.ddd-ts-kit/story.json): writes the scope of the\n next agent in place, its base the base of the story, and prints its briefing; no\n worktree, branch or install of its own; the agents of a story run one after the other\n story-scope the worktree of one story, .worktrees/<story> on story/<story> cut from --base (by default\n origin/main from the trunk, else the current branch, refused from the worktree of a\n story), its .ddd-ts-kit/story.json ({ story, base, baseCommit, branch, kind, from }) and\n its clean install; an existing one is kept and the story resumes there; refused when the\n story is open in another worktree; names the other open stories and the contexts their\n rows change; --kind story (the default) or fix (a story built behind locked regression\n specs, listed under ## Regression of its file); --from <file> records where the story\n comes from, an intent of docs/architecture/intents/ (refused unless its header says\n Status: accepted) or an incident record of docs/architecture/incidents/, and the Next:\n line says that the story skill seeds the statement from it while the story file does\n not exist\n worktree the worktree of any other piece of work, .worktrees/<name> on work/<name> cut from --base\n (by default origin/main from the trunk, else the current branch), and its clean install\n unless --no-install; an existing one is kept; .worktrees/ lies in the main checkout,\n whichever worktree it runs from, ignored by git and by the tools of the project; while\n the .gitignore of a project started before does not hold it (init adds it), a worktree\n opens next to the project, ../<project>-<name>; in a project whose config says\n \"worktrees\": \"required\" (what init writes), the guard of the plugin refuses the code of\n a context in the main checkout of the trunk, and in a worktree of .worktrees/ without\n its own node_modules\n story where a story stands, phase by phase: its specification and criteria\n (docs/architecture/stories/<story>.md), its rows in slices.md, a design review section\n per row not done (docs/architecture/reviews/<story>.md, ## #<id>), its acceptance written\n and locked, its rows done, its acceptance passing, its trunk merged in, its ## Origin\n (From: and Built with:), its ## Report with ### Verification naming npm run verify; and\n the next step; in the worktree of a story, the story is its own; --gate build exits 1\n until the first four are met (the code may start: the guard of the plugin opens the\n contexts), --gate close until all are\n stories the stories open in the worktrees of the repository and where two of them meet: the\n contexts the rows of both name, the files both worktrees change (committed or not), what\n merging the branch of one into the other leaves to a person and what merge-trunk settles\n (git merge-tree, nothing written); how far each is behind its base; from the worktree of a\n story, the stories it meets; the guard of the plugin says it at session start and on a\n write to a file another story changes\n --resume worker-scope reads where the stopped worker of the context stands (its rows by their\n Slice: trailer, the files of the row under way, the markers, its last verify-slice, its\n report, its agent as the guard recorded it) and prints the message that resumes its agent\n (SendMessage) or the briefing of a new one; creates and rewrites nothing; --fresh asks for\n a new agent whatever the last one did; several worktrees of the context need --worktree\n verify-slice closes a slice before its commit, in one run: the regenerate script, check on the files\n changed since --since (new ones included), the test script for the context; then the\n changed files past 300 of the 350 lines, the paths of the slice to stage (its context, its\n Prisma models, an end-to-end spec, a working migration, the pages of docs/behaviour/ but\n those of other contexts, prisma/schema/schema.prisma when its one change is the context\n joining the schemas of the datasource, the schema index of the platform when every line\n changed there is of the context, the derived files git tracks) and every other\n changed path, left out and never to stage with it; the merges since --since, as\n verify-merge checks them, reported without failing the slice in this version (a later\n minor version fails it); exits 1 while a step fails; then the names the slice removes\n that the design of a row not done still cites (never a failure); in the worktree of a\n worker, the commit command with the trailer Slice: <row>, and\n .ddd-ts-kit/verification.json for the conductor\n cited the names the design of rows not done cites as code (paths, classes, Class.member) that\n the code does not have: those the history of --base removed (with the commit and the\n successor), the places the canonical tree refuses, and a name never there whose close\n name of the same part arrived after the line was written; planned names stay silent.\n The design of a row: its cells and rule lines in slices.md, a section of a document of\n docs/architecture whose heading names it, a document that names it or that its rule\n line links to. Default: every row not done, of the context when given, at the current\n branch. --removed-since <ref>: the names a change removes, from the merge base to the\n working tree, that such a design cites. Reads only, exits 0\n verify-merge what the merges of a branch lost, read from git only: every merge commit since --since\n (by default the base of .ddd-ts-kit/worker.json, then origin/HEAD, then origin/main) and\n the merge in progress (its result: the index and the working tree), or one <commit>; a\n squash commit takes --theirs <head of the branch it took in>. Errors: a line one side\n added or both kept missing from the result (whitespace, a line laid out again, a move\n to another file and imports merged into one statement aside), a file neither side\n deleted gone from the result, a row of slices.md done on one side and no longer done or\n gone, a test title or a spec file of one side gone, a migration of one side whose\n description (name without number and working-) the result lacks, a conflict marker;\n warnings: a line one side removed brought back, a line one side wrote where the other\n changed the same lines or deleted the file (the merge chose), a line the merge replaced\n by lines of its own. Derived files, files a tool says it wrote, migrations, lockfiles\n and slices.md are left out of the lines. The base is --base, else the Merge-Base:\n trailer of the merge, else git merge-base; entries of a Lost-Accepted: <file:line>,...\n trailer are listed and never fail, nor what a later commit restored; silent and exit 0\n without a merge, exit 1 on an error; --warn prints the same and exits 0, as the\n pre-push hook of init runs it in this version (a later minor version blocks the push)\n merge-trunk brings the trunk (--trunk, by default origin/HEAD then origin/main, never fetched) into the\n branch as one merge commit computed from the branch's own diff: from the newest commit of\n the branch the trunk holds (--since; else the commit whose patch, derived files,\n migrations, slices.md, plan.md and lockfiles left out, is one commit of the trunk, on this\n branch or a branch it shares commits with; else the base recorded for the worker when its\n lines are on the trunk; else git merge-base). Settles derived files and drizzle-kit meta\n (trunk side), the package.json of a client (trunk side, at the higher of both versions;\n left to you when one is not a semantic version), generated regions of CONTEXT.md and the\n context map (trunk side), conflicts inside generated registries (lines of both sides),\n slices.md row by row (the furthest status), the stored-events lock by key, the lockfile\n (trunk side, installed again when the branch changed package.json); the rest is left in a\n merge in progress git understands, with what each side did (exit 1). Then, or on\n --continue: the drizzle migrations of both sides replayed, on --to-land the working\n migrations renamed (knex, Prisma, TypeORM; stop when both sides change one table), decision\n records renumbered, regenerate, verify-merge on the uncommitted result (an error stops;\n --accept-lost records a Lost-Accepted: trailer), and the commit of the merge's paths only,\n with the trailers Merge-Base:, Trunk: and Landed:; any other changed path blocks it.\n --dry-run previews, --abort undoes; refused (exit 2) on a dirty tree, another operation in\n progress, no committer known to git, an unknown trunk, or a git older than 2.40 with a base\n git would not compute\n --commit-size the files and lines about to be committed against \"commit\" in the config (20 files and\n 600 lines by default, generated files not counted); --staged reads the index only;\n advisory, --strict exits 1 when over\n --explain check follows the violations with the reason of each rule they report, once per rule, as\n explain gives it without its examples (\"explanations\" in JSON); with github and gitlab, each\n annotation carries the reason of its rule, a pull request showing an annotation on its own\n --behaviour docs writes the pages of what the tests state (docs/behaviour/) alone, every other generated\n document left as it is: what the pre-commit hook runs when a spec is staged; with --check,\n those pages alone are compared\n --stored-events docs records the shape of each version of the stored events in stored-events.lock.json,\n never rewriting a recorded one but one recorded by 0.82.0 or earlier, recorded again as\n the kit reads it now: run it once the shape of a version is the one to store; docs --check\n fails while a declared version is not recorded, or recorded by 0.82.0 or earlier, or\n recorded as the hash of nothing; the codecs of each module of a context are read too, and a\n codec whose data type is not found or declares no member is refused, nothing recorded\n --sdk init records \"sdk\" in the config and generates the clients with the project\n --term generate adds the row \"<Term>=<meaning>\" to the glossary of the CONTEXT.md before it judges\n a name; \"<Term>=<meaning>|<not to be confused with>\" fills the third cell too, a pipe being\n the one character a cell of the table cannot hold\n --reason generate context writes it under ## Classification, the sentence of why the context is\n of its classification; generate adr --deviation records it as the reason of the deviation\n --local-only generate refuses, and writes nothing, when the kind would write outside its context;\n \"generate --help --json\" says which kinds do\n --module generate writes the files of the layers into that module of the model of the context\n (declared first with generate module), <module>/domain/ to <module>/presentation/, and\n their specs into test/unit/<module>/, finds the files it reads in the module that holds\n them and writes the imports to where they are; taken by the kinds whose usage below\n shows [--module <module>], and required by them in a context that declares modules\n (a file of a use case already in a module goes with it, and another module is\n refused); every other kind refuses it, what it writes staying at the level of the\n context (code list, permission set, database schema, route groups, guards, shared\n shapes, fakes, builders, worlds) or outside the contexts";
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,sl+BAoT0D,CAAC"}
1
+ {"version":3,"file":"notes.d.ts","sourceRoot":"","sources":["../../src/help/notes.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,eAAO,MAAM,KAAK,60/BA4T0D,CAAC"}
@@ -70,10 +70,14 @@ export const NOTES = ` affected what a pull request has to run: the con
70
70
  engines.node and .nvmrc, node_modules installed since the lockfile last changed, each
71
71
  package of the kit installed at the version of this CLI, the submodules initialised;
72
72
  last, the overrides init writes under a dependency that pins a package below a
73
- security fix, missing or no longer needed once it asks for the fix itself;
73
+ security fix, missing or no longer needed once it asks for the fix itself; and each
74
+ install script the stack needs (the engines of Prisma, the Kafka client) that
75
+ allowScripts of package.json or allowBuilds of pnpm-workspace.yaml does not allow for
76
+ the version installed: missing, pinned to another version, or denied;
74
77
  each with its fix; --strict exits 1 while something is missing or the checkout cannot
75
78
  run the project, never for a hook this clone has not installed, a Node .nvmrc does not
76
- name, a lockfile changed since the install or an override no longer needed
79
+ name, a lockfile changed since the install, an override no longer needed or a denied
80
+ install script
77
81
  lint the ESLint of the project (lint and ci:lint run it): fails on an error, and on a warning
78
82
  as on an error, but on one of a rule of the kit in transition, a new rule that becomes an
79
83
  error in the version it names, whose warnings are listed apart; --format and --fix as ESLint
@@ -122,7 +126,11 @@ export const NOTES = ` affected what a pull request has to run: the con
122
126
  and story when it is of another story or outside the context shown), the rows of other
123
127
  stories the planned rows wait for, not done, in a section of their own, the merge order
124
128
  and what runs before each merge (merge-trunk --to-land); a cycle, a dependency on an
125
- unknown id or a row without owner is reported alone, and exits 1
129
+ unknown id or a row without owner is reported alone, and exits 1. Then replays the
130
+ generator commands of the rows in a copy of the project, in the order of the waves,
131
+ and reports without waves, exiting 1, each name whose words the glossary of its
132
+ context does not define with the --term of its row and of the rows it waits for;
133
+ the commands refused for another reason are listed, without failing
126
134
  story-check whether a story or a milestone can close, <code> being the start of the ids of its rows
127
135
  (M1 for M1.01, M1.02: the id without its last .<number>): every row of it done in
128
136
  slices.md (the others listed with their status), and no marker of its own left
@@ -1 +1 @@
1
- {"version":3,"file":"notes.js","sourceRoot":"","sources":["../../src/help/notes.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAoTuD,CAAC"}
1
+ {"version":3,"file":"notes.js","sourceRoot":"","sources":["../../src/help/notes.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EA4TuD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"first-install-note.d.ts","sourceRoot":"","sources":["../../src/init/first-install-note.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAGvC;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAwBrD"}
1
+ {"version":3,"file":"first-install-note.d.ts","sourceRoot":"","sources":["../../src/init/first-install-note.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAIvC;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CA0BrD"}