ddd-ts-kit 0.84.1 → 0.85.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 (218) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.fr.md +60 -27
  3. package/README.md +57 -28
  4. package/dist/check/canonical/stray-entry.js +3 -2
  5. package/dist/check/canonical/stray-entry.js.map +1 -1
  6. package/dist/check/explain/layout-docs.js +1 -1
  7. package/dist/check/explain/layout-docs.js.map +1 -1
  8. package/dist/check/explain/tree-docs.d.ts.map +1 -1
  9. package/dist/check/explain/tree-docs.js +3 -2
  10. package/dist/check/explain/tree-docs.js.map +1 -1
  11. package/dist/check/explain/wiring-docs.d.ts.map +1 -1
  12. package/dist/check/explain/wiring-docs.js +17 -6
  13. package/dist/check/explain/wiring-docs.js.map +1 -1
  14. package/dist/check/fixtures/authz-policy-fixtures.d.ts.map +1 -1
  15. package/dist/check/fixtures/authz-policy-fixtures.js +4 -4
  16. package/dist/check/fixtures/authz-policy-fixtures.js.map +1 -1
  17. package/dist/check/fixtures/constructor-injection-fixtures.d.ts.map +1 -1
  18. package/dist/check/fixtures/constructor-injection-fixtures.js +10 -8
  19. package/dist/check/fixtures/constructor-injection-fixtures.js.map +1 -1
  20. package/dist/check/fixtures/declarations-fixtures.d.ts.map +1 -1
  21. package/dist/check/fixtures/declarations-fixtures.js +54 -9
  22. package/dist/check/fixtures/declarations-fixtures.js.map +1 -1
  23. package/dist/check/fixtures/declared-declarations.d.ts +7 -0
  24. package/dist/check/fixtures/declared-declarations.d.ts.map +1 -0
  25. package/dist/check/fixtures/declared-declarations.js +21 -0
  26. package/dist/check/fixtures/declared-declarations.js.map +1 -0
  27. package/dist/check/fixtures/declared-project.d.ts +4 -1
  28. package/dist/check/fixtures/declared-project.d.ts.map +1 -1
  29. package/dist/check/fixtures/declared-project.js +17 -9
  30. package/dist/check/fixtures/declared-project.js.map +1 -1
  31. package/dist/check/fixtures/paths.d.ts +1 -0
  32. package/dist/check/fixtures/paths.d.ts.map +1 -1
  33. package/dist/check/fixtures/paths.js +1 -0
  34. package/dist/check/fixtures/paths.js.map +1 -1
  35. package/dist/check/fixtures/signature-project.d.ts +3 -3
  36. package/dist/check/fixtures/signature-project.js +3 -3
  37. package/dist/check/fixtures/signature.d.ts +2 -1
  38. package/dist/check/fixtures/signature.d.ts.map +1 -1
  39. package/dist/check/fixtures/signature.js +2 -1
  40. package/dist/check/fixtures/signature.js.map +1 -1
  41. package/dist/check/fixtures/single-file-declarations.d.ts +7 -0
  42. package/dist/check/fixtures/single-file-declarations.d.ts.map +1 -0
  43. package/dist/check/fixtures/single-file-declarations.js +21 -0
  44. package/dist/check/fixtures/single-file-declarations.js.map +1 -0
  45. package/dist/check/rules/clean-file-size.d.ts.map +1 -1
  46. package/dist/check/rules/clean-file-size.js +9 -1
  47. package/dist/check/rules/clean-file-size.js.map +1 -1
  48. package/dist/check/rules/declarations-barrel-current.d.ts.map +1 -1
  49. package/dist/check/rules/declarations-barrel-current.js +56 -23
  50. package/dist/check/rules/declarations-barrel-current.js.map +1 -1
  51. package/dist/check/rules/naming-suffix.d.ts.map +1 -1
  52. package/dist/check/rules/naming-suffix.js +7 -3
  53. package/dist/check/rules/naming-suffix.js.map +1 -1
  54. package/dist/check/support/is-generated-context-file.d.ts +5 -1
  55. package/dist/check/support/is-generated-context-file.d.ts.map +1 -1
  56. package/dist/check/support/is-generated-context-file.js +11 -5
  57. package/dist/check/support/is-generated-context-file.js.map +1 -1
  58. package/dist/commands/docs.d.ts.map +1 -1
  59. package/dist/commands/docs.js +23 -11
  60. package/dist/commands/docs.js.map +1 -1
  61. package/dist/commands/generate.d.ts.map +1 -1
  62. package/dist/commands/generate.js +7 -4
  63. package/dist/commands/generate.js.map +1 -1
  64. package/dist/commands/print-report.js +1 -0
  65. package/dist/commands/print-report.js.map +1 -1
  66. package/dist/commit/is-derived.js +4 -4
  67. package/dist/commit/is-derived.js.map +1 -1
  68. package/dist/declared/barrel-file.d.ts +4 -1
  69. package/dist/declared/barrel-file.d.ts.map +1 -1
  70. package/dist/declared/barrel-file.js +4 -1
  71. package/dist/declared/barrel-file.js.map +1 -1
  72. package/dist/declared/context-declarations.d.ts +24 -0
  73. package/dist/declared/context-declarations.d.ts.map +1 -0
  74. package/dist/declared/context-declarations.js +22 -0
  75. package/dist/declared/context-declarations.js.map +1 -0
  76. package/dist/declared/declarations-folder-of.d.ts +10 -0
  77. package/dist/declared/declarations-folder-of.d.ts.map +1 -0
  78. package/dist/declared/declarations-folder-of.js +13 -0
  79. package/dist/declared/declarations-folder-of.js.map +1 -0
  80. package/dist/declared/folder-declarations-file.d.ts +7 -0
  81. package/dist/declared/folder-declarations-file.d.ts.map +1 -0
  82. package/dist/declared/folder-declarations-file.js +10 -0
  83. package/dist/declared/folder-declarations-file.js.map +1 -0
  84. package/dist/declared/index.d.ts +8 -1
  85. package/dist/declared/index.d.ts.map +1 -1
  86. package/dist/declared/index.js +8 -1
  87. package/dist/declared/index.js.map +1 -1
  88. package/dist/declared/is-declarations-file.d.ts +7 -0
  89. package/dist/declared/is-declarations-file.d.ts.map +1 -0
  90. package/dist/declared/is-declarations-file.js +20 -0
  91. package/dist/declared/is-declarations-file.js.map +1 -0
  92. package/dist/declared/keeps-single-file.d.ts +11 -0
  93. package/dist/declared/keeps-single-file.d.ts.map +1 -0
  94. package/dist/declared/keeps-single-file.js +23 -0
  95. package/dist/declared/keeps-single-file.js.map +1 -0
  96. package/dist/declared/render-declarations.d.ts +18 -0
  97. package/dist/declared/render-declarations.d.ts.map +1 -0
  98. package/dist/declared/render-declarations.js +37 -0
  99. package/dist/declared/render-declarations.js.map +1 -0
  100. package/dist/declared/render-folder-declarations.d.ts +11 -0
  101. package/dist/declared/render-folder-declarations.d.ts.map +1 -0
  102. package/dist/declared/render-folder-declarations.js +23 -0
  103. package/dist/declared/render-folder-declarations.js.map +1 -0
  104. package/dist/declared/single-file-declarations.d.ts +9 -0
  105. package/dist/declared/single-file-declarations.d.ts.map +1 -0
  106. package/dist/declared/single-file-declarations.js +14 -0
  107. package/dist/declared/single-file-declarations.js.map +1 -0
  108. package/dist/declared/single-file-notice.d.ts +8 -0
  109. package/dist/declared/single-file-notice.d.ts.map +1 -0
  110. package/dist/declared/single-file-notice.js +9 -0
  111. package/dist/declared/single-file-notice.js.map +1 -0
  112. package/dist/derived/is-derived.d.ts +4 -3
  113. package/dist/derived/is-derived.d.ts.map +1 -1
  114. package/dist/derived/is-derived.js +8 -8
  115. package/dist/derived/is-derived.js.map +1 -1
  116. package/dist/describe/read-consumed-events.js +7 -2
  117. package/dist/describe/read-consumed-events.js.map +1 -1
  118. package/dist/dev/refresh-declarations.d.ts.map +1 -1
  119. package/dist/dev/refresh-declarations.js +3 -2
  120. package/dist/dev/refresh-declarations.js.map +1 -1
  121. package/dist/docs/write-docs.d.ts +3 -1
  122. package/dist/docs/write-docs.d.ts.map +1 -1
  123. package/dist/docs/write-docs.js +4 -2
  124. package/dist/docs/write-docs.js.map +1 -1
  125. package/dist/generate/context-imports.d.ts.map +1 -1
  126. package/dist/generate/context-imports.js +2 -1
  127. package/dist/generate/context-imports.js.map +1 -1
  128. package/dist/generate/kind.d.ts +2 -0
  129. package/dist/generate/kind.d.ts.map +1 -1
  130. package/dist/generate/kinds/e2e/reaction-of.d.ts +14 -0
  131. package/dist/generate/kinds/e2e/reaction-of.d.ts.map +1 -0
  132. package/dist/generate/kinds/e2e/reaction-of.js +93 -0
  133. package/dist/generate/kinds/e2e/reaction-of.js.map +1 -0
  134. package/dist/generate/kinds/e2e-kind.d.ts.map +1 -1
  135. package/dist/generate/kinds/e2e-kind.js +30 -18
  136. package/dist/generate/kinds/e2e-kind.js.map +1 -1
  137. package/dist/generate/refresh-barrels.d.ts +11 -4
  138. package/dist/generate/refresh-barrels.d.ts.map +1 -1
  139. package/dist/generate/refresh-barrels.js +41 -15
  140. package/dist/generate/refresh-barrels.js.map +1 -1
  141. package/dist/generate/refuse-shared-writes.js +1 -1
  142. package/dist/generate/refuse-shared-writes.js.map +1 -1
  143. package/dist/help/notes.d.ts +1 -1
  144. package/dist/help/notes.d.ts.map +1 -1
  145. package/dist/help/notes.js +19 -16
  146. package/dist/help/notes.js.map +1 -1
  147. package/dist/init/manifest/versions.js +24 -24
  148. package/dist/merge/classify-conflict.d.ts +2 -1
  149. package/dist/merge/classify-conflict.d.ts.map +1 -1
  150. package/dist/merge/classify-conflict.js +9 -0
  151. package/dist/merge/classify-conflict.js.map +1 -1
  152. package/dist/merge/higher-version.d.ts +7 -0
  153. package/dist/merge/higher-version.d.ts.map +1 -0
  154. package/dist/merge/higher-version.js +59 -0
  155. package/dist/merge/higher-version.js.map +1 -0
  156. package/dist/merge/merge-client-manifest.d.ts +16 -0
  157. package/dist/merge/merge-client-manifest.d.ts.map +1 -0
  158. package/dist/merge/merge-client-manifest.js +39 -0
  159. package/dist/merge/merge-client-manifest.js.map +1 -0
  160. package/dist/merge/merge-exclusions.d.ts +4 -3
  161. package/dist/merge/merge-exclusions.d.ts.map +1 -1
  162. package/dist/merge/merge-exclusions.js +6 -3
  163. package/dist/merge/merge-exclusions.js.map +1 -1
  164. package/dist/merge/resolve-conflict.d.ts +3 -2
  165. package/dist/merge/resolve-conflict.d.ts.map +1 -1
  166. package/dist/merge/resolve-conflict.js +29 -7
  167. package/dist/merge/resolve-conflict.js.map +1 -1
  168. package/dist/plan/batched-waves.d.ts +2 -0
  169. package/dist/plan/batched-waves.d.ts.map +1 -1
  170. package/dist/plan/batched-waves.js +20 -7
  171. package/dist/plan/batched-waves.js.map +1 -1
  172. package/dist/plan/format-plan.d.ts +1 -1
  173. package/dist/plan/format-plan.d.ts.map +1 -1
  174. package/dist/plan/format-plan.js +33 -8
  175. package/dist/plan/format-plan.js.map +1 -1
  176. package/dist/plan/other-stories.d.ts +9 -0
  177. package/dist/plan/other-stories.d.ts.map +1 -0
  178. package/dist/plan/other-stories.js +31 -0
  179. package/dist/plan/other-stories.js.map +1 -0
  180. package/dist/plan/plan-waves.d.ts +2 -1
  181. package/dist/plan/plan-waves.d.ts.map +1 -1
  182. package/dist/plan/plan-waves.js +13 -4
  183. package/dist/plan/plan-waves.js.map +1 -1
  184. package/dist/plan/wave-plan.d.ts +28 -0
  185. package/dist/plan/wave-plan.d.ts.map +1 -1
  186. package/dist/version.d.ts +1 -1
  187. package/dist/version.js +1 -1
  188. package/dist/worker/briefing-of.js +4 -2
  189. package/dist/worker/briefing-of.js.map +1 -1
  190. package/dist/workspace/workspace-report.d.ts +2 -0
  191. package/dist/workspace/workspace-report.d.ts.map +1 -1
  192. package/dist/workspace/workspace.d.ts +8 -0
  193. package/dist/workspace/workspace.d.ts.map +1 -1
  194. package/dist/workspace/workspace.js +24 -3
  195. package/dist/workspace/workspace.js.map +1 -1
  196. package/package.json +2 -2
  197. package/templates/e2e/e2e-reaction.spec.ts.tpl +68 -0
  198. package/templates/init/AGENTS.md.tpl +1 -1
  199. package/templates/init/README.md.tpl +2 -1
  200. package/templates/init/e2e/start-application.database.ts.tpl +22 -2
  201. package/templates/init/e2e/start-application.memory.ts.tpl +22 -2
  202. package/templates/init/platform/events/custom-event-bus.ts.tpl +1 -1
  203. package/templates/init/platform/events/in-process-events.ts.tpl +1 -1
  204. package/templates/init/rules/tests.md.tpl +1 -1
  205. package/templates/pipeline/biome.json.tpl +1 -0
  206. package/templates/pipeline/github/actions/setup/action.yml.tpl +3 -0
  207. package/templates/pipeline/package-scripts.json +1 -1
  208. package/templates/presets/identity/context/test/worlds/__context__.world.ts.tpl +1 -0
  209. package/templates/test-world/world.buses.ts.tpl +1 -1
  210. package/templates/test-world/world.tsyringe.ts.tpl +1 -0
  211. package/dist/check/fixtures/declared-barrel.d.ts +0 -3
  212. package/dist/check/fixtures/declared-barrel.d.ts.map +0 -1
  213. package/dist/check/fixtures/declared-barrel.js +0 -4
  214. package/dist/check/fixtures/declared-barrel.js.map +0 -1
  215. package/dist/declared/render-barrel.d.ts +0 -11
  216. package/dist/declared/render-barrel.d.ts.map +0 -1
  217. package/dist/declared/render-barrel.js +0 -29
  218. package/dist/declared/render-barrel.js.map +0 -1
@@ -81,9 +81,11 @@ export const NOTES = ` affected what a pull request has to run: the con
81
81
  dependency done; wave n: the others in earlier waves), each wave cut into batches of one
82
82
  owner, one or two rows on one aggregate, with the worker-scope command that briefs each,
83
83
  the batches of a wave likely to touch the same files (same aggregate in Start with, or
84
- unknown when it names none), the merge order and what runs before each merge (merge-trunk
85
- --to-land); a cycle, a dependency on an unknown id or a row without owner is reported
86
- alone, and exits 1
84
+ unknown when it names none), each row a row waits for with its status (and its context
85
+ and story when it is of another story or outside the context shown), the rows of other
86
+ stories the planned rows wait for, not done, in a section of their own, the merge order
87
+ and what runs before each merge (merge-trunk --to-land); a cycle, a dependency on an
88
+ unknown id or a row without owner is reported alone, and exits 1
87
89
  story-check whether a story or a milestone can close, <code> being the start of the ids of its rows
88
90
  (M1 for M1.01, M1.02: the id without its last .<number>): every row of it done in
89
91
  slices.md (the others listed with their status), and no marker of its own left
@@ -203,19 +205,20 @@ export const NOTES = ` affected what a pull request has to run: the con
203
205
  migrations, slices.md, plan.md and lockfiles left out, is one commit of the trunk, on this
204
206
  branch or a branch it shares commits with; else the base recorded for the worker when its
205
207
  lines are on the trunk; else git merge-base). Settles derived files and drizzle-kit meta
206
- (trunk side), generated regions of CONTEXT.md and the context map (trunk side), conflicts
207
- inside generated registries (lines of both sides), slices.md row by row (the furthest
208
- status), the stored-events lock by key, the lockfile (trunk side, installed again when
209
- the branch changed package.json); the rest is left in a merge in progress git
210
- understands, with what each side did (exit 1). Then, or on --continue: the drizzle
211
- migrations of both sides replayed, on --to-land the working migrations renamed (knex,
212
- Prisma, TypeORM; stop when both sides change one table), decision records renumbered,
213
- regenerate, verify-merge on the uncommitted result (an error stops; --accept-lost records
214
- a Lost-Accepted: trailer), and the commit of the merge's paths only, with the trailers
215
- Merge-Base:, Trunk: and Landed:; any other changed path blocks it. --dry-run previews,
216
- --abort undoes; refused (exit 2) on a dirty tree, another operation in progress, no
217
- committer known to git, an unknown trunk, or a git older than 2.40 with a base git
218
- would not compute
208
+ (trunk side), the package.json of a client (trunk side, at the higher of both versions;
209
+ left to you when one is not a semantic version), generated regions of CONTEXT.md and the
210
+ context map (trunk side), conflicts inside generated registries (lines of both sides),
211
+ slices.md row by row (the furthest status), the stored-events lock by key, the lockfile
212
+ (trunk side, installed again when the branch changed package.json); the rest is left in a
213
+ merge in progress git understands, with what each side did (exit 1). Then, or on
214
+ --continue: the drizzle migrations of both sides replayed, on --to-land the working
215
+ migrations renamed (knex, Prisma, TypeORM; stop when both sides change one table), decision
216
+ records renumbered, regenerate, verify-merge on the uncommitted result (an error stops;
217
+ --accept-lost records a Lost-Accepted: trailer), and the commit of the merge's paths only,
218
+ with the trailers Merge-Base:, Trunk: and Landed:; any other changed path blocks it.
219
+ --dry-run previews, --abort undoes; refused (exit 2) on a dirty tree, another operation in
220
+ progress, no committer known to git, an unknown trunk, or a git older than 2.40 with a base
221
+ git would not compute
219
222
  --commit-size the files and lines about to be committed against "commit" in the config (20 files and
220
223
  600 lines by default, generated files not counted); --staged reads the index only;
221
224
  advisory, --strict exits 1 when over
@@ -1 +1 @@
1
- {"version":3,"file":"notes.js","sourceRoot":"","sources":["../../src/help/notes.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gEAqO2C,CAAC"}
1
+ {"version":3,"file":"notes.js","sourceRoot":"","sources":["../../src/help/notes.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gEAwO2C,CAAC"}
@@ -1,35 +1,35 @@
1
1
  /** Ranges written to the generated package.json; bumped together with the kit. */
2
2
  export const VERSIONS = {
3
- '@ddd-ts-kit/kernel': '^0.84.1',
4
- '@ddd-ts-kit/validation': '^0.84.1',
5
- '@ddd-ts-kit/http': '^0.84.1',
6
- '@ddd-ts-kit/tracing': '^0.84.1',
7
- '@ddd-ts-kit/di': '^0.84.1',
8
- '@ddd-ts-kit/events': '^0.84.1',
9
- '@ddd-ts-kit/testing': '^0.84.1',
10
- '@ddd-ts-kit/drizzle': '^0.84.1',
11
- '@ddd-ts-kit/knex': '^0.84.1',
12
- '@ddd-ts-kit/prisma': '^0.84.1',
13
- '@ddd-ts-kit/typeorm': '^0.84.1',
14
- '@ddd-ts-kit/auth': '^0.84.1',
15
- '@ddd-ts-kit/rabbitmq': '^0.84.1',
16
- '@ddd-ts-kit/aspects': '^0.84.1',
17
- '@ddd-ts-kit/audit': '^0.84.1',
18
- '@ddd-ts-kit/redis': '^0.84.1',
19
- '@ddd-ts-kit/kafka': '^0.84.1',
20
- '@ddd-ts-kit/nats': '^0.84.1',
21
- '@ddd-ts-kit/scheduling': '^0.84.1',
22
- '@ddd-ts-kit/sentry': '^0.84.1',
23
- '@ddd-ts-kit/s3': '^0.84.1',
3
+ '@ddd-ts-kit/kernel': '^0.85.0',
4
+ '@ddd-ts-kit/validation': '^0.85.0',
5
+ '@ddd-ts-kit/http': '^0.85.0',
6
+ '@ddd-ts-kit/tracing': '^0.85.0',
7
+ '@ddd-ts-kit/di': '^0.85.0',
8
+ '@ddd-ts-kit/events': '^0.85.0',
9
+ '@ddd-ts-kit/testing': '^0.85.0',
10
+ '@ddd-ts-kit/drizzle': '^0.85.0',
11
+ '@ddd-ts-kit/knex': '^0.85.0',
12
+ '@ddd-ts-kit/prisma': '^0.85.0',
13
+ '@ddd-ts-kit/typeorm': '^0.85.0',
14
+ '@ddd-ts-kit/auth': '^0.85.0',
15
+ '@ddd-ts-kit/rabbitmq': '^0.85.0',
16
+ '@ddd-ts-kit/aspects': '^0.85.0',
17
+ '@ddd-ts-kit/audit': '^0.85.0',
18
+ '@ddd-ts-kit/redis': '^0.85.0',
19
+ '@ddd-ts-kit/kafka': '^0.85.0',
20
+ '@ddd-ts-kit/nats': '^0.85.0',
21
+ '@ddd-ts-kit/scheduling': '^0.85.0',
22
+ '@ddd-ts-kit/sentry': '^0.85.0',
23
+ '@ddd-ts-kit/s3': '^0.85.0',
24
24
  '@aws-sdk/client-s3': '^3.1150.0',
25
25
  '@aws-sdk/lib-storage': '^3.1150.0',
26
26
  '@aws-sdk/s3-request-presigner': '^3.1150.0',
27
27
  busboy: '^1.6.0',
28
28
  '@sentry/node': '^11.6.0',
29
- '@ddd-ts-kit/pino': '^0.84.1',
29
+ '@ddd-ts-kit/pino': '^0.85.0',
30
30
  pino: '^10.4.0',
31
31
  'pino-pretty': '^13.2.0',
32
- '@ddd-ts-kit/winston': '^0.84.1',
32
+ '@ddd-ts-kit/winston': '^0.85.0',
33
33
  winston: '^3.19.0',
34
34
  '@confluentinc/kafka-javascript': '^1.11.0',
35
35
  '@nats-io/jetstream': '^3.4.0',
@@ -37,7 +37,7 @@ export const VERSIONS = {
37
37
  ioredis: '^6.0.0',
38
38
  jose: '^6.0.0',
39
39
  amqplib: '^2.2.0',
40
- 'ddd-ts-kit': '^0.84.1',
40
+ 'ddd-ts-kit': '^0.85.0',
41
41
  tsx: '^4.23.15',
42
42
  vitest: '^5.0.3',
43
43
  zod: '^4.6.5',
@@ -2,6 +2,7 @@ import type { MergeRepository } from './lost/merge-repository.js';
2
2
  /**
3
3
  * How a conflicted path is settled:
4
4
  * - `derived`: written again by `regenerate`, the trunk's side is taken;
5
+ * - `client-manifest`: the package.json of a generated client, the trunk's side at the higher version;
5
6
  * - `mixed`: a document whose generated regions take the trunk's side, the rest is a person's;
6
7
  * - `slices`: the slices file, merged row by row;
7
8
  * - `drizzle-meta`: the journal and snapshots of drizzle-kit, the trunk's side, then the replay;
@@ -9,7 +10,7 @@ import type { MergeRepository } from './lost/merge-repository.js';
9
10
  * - `stored-events`: the stored-events lock, the union of both sides;
10
11
  * - `source`: anything else, settled by a person except the conflicts inside generated registries.
11
12
  */
12
- export type ConflictClass = 'derived' | 'mixed' | 'slices' | 'drizzle-meta' | 'lockfile' | 'stored-events' | 'source';
13
+ export type ConflictClass = 'derived' | 'client-manifest' | 'mixed' | 'slices' | 'drizzle-meta' | 'lockfile' | 'stored-events' | 'source';
13
14
  /** The class of a conflicted path, from the top of the repository. */
14
15
  export declare function classifyConflict(file: string, { prefix, contextsDir }: MergeRepository): ConflictClass;
15
16
  //# sourceMappingURL=classify-conflict.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"classify-conflict.d.ts","sourceRoot":"","sources":["../../src/merge/classify-conflict.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE;;;;;;;;;GASG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,cAAc,GAAG,UAAU,GAAG,eAAe,GAAG,QAAQ,CAAC;AAKtH,sEAAsE;AACtE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,eAAe,GAAG,aAAa,CAqBtG"}
1
+ {"version":3,"file":"classify-conflict.d.ts","sourceRoot":"","sources":["../../src/merge/classify-conflict.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,aAAa,GACrB,SAAS,GACT,iBAAiB,GACjB,OAAO,GACP,QAAQ,GACR,cAAc,GACd,UAAU,GACV,eAAe,GACf,QAAQ,CAAC;AAKb,sEAAsE;AACtE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,eAAe,GAAG,aAAa,CAyBtG"}
@@ -1,6 +1,7 @@
1
1
  import { STORED_EVENTS_LOCK } from '../check/event-sourcing/stored-events-lock-file.js';
2
2
  import { isDerived } from '../derived/is-derived.js';
3
3
  import { SLICES_FILE } from '../progress/read-slices.js';
4
+ import { CLIENTS_DIRECTORY } from '../sdk/clients-directory.js';
4
5
  const LOCKFILES = new Set(['package-lock.json', 'npm-shrinkwrap.json', 'pnpm-lock.yaml', 'yarn.lock', 'bun.lock']);
5
6
  const DRIZZLE_META = /(?:^|\/)meta\/(?:_journal|\d+_snapshot)\.json$/;
6
7
  /** The class of a conflicted path, from the top of the repository. */
@@ -16,11 +17,19 @@ export function classifyConflict(file, { prefix, contextsDir }) {
16
17
  if (inProject === 'docs/context-map.md' || (inProject.startsWith(`${contextsDir}/`) && name === 'CONTEXT.md')) {
17
18
  return 'mixed';
18
19
  }
20
+ if (isClientManifest(inProject)) {
21
+ return 'client-manifest';
22
+ }
19
23
  if (isDerived(inProject, { contextsDir })) {
20
24
  return 'derived';
21
25
  }
22
26
  return otherClass(inProject, name);
23
27
  }
28
+ /** `clients/<document>/package.json`: derived but for its version, which the team raises. */
29
+ function isClientManifest(inProject) {
30
+ const [directory, , file, ...deeper] = inProject.split('/');
31
+ return directory === CLIENTS_DIRECTORY && file === 'package.json' && deeper.length === 0;
32
+ }
24
33
  function otherClass(inProject, name) {
25
34
  if (DRIZZLE_META.test(inProject)) {
26
35
  return 'drizzle-meta';
@@ -1 +1 @@
1
- {"version":3,"file":"classify-conflict.js","s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AAC;IAED,IAAI,SAAS,KAAK,WAAW,EAAE,CAAC;QAC9B,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,IAAI,SAAS,KAAK,qBAAqB,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,WAAW,GAAG,CAAC,IAAI,IAAI,KAAK,YAAY,CAAC,EAAE,CAAC;QAC9G,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,IAAI,gBAAgB,CAAC,SAAS,CAAC,EAAE,CAAC;QAChC,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAED,IAAI,SAAS,CAAC,SAAS,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC;QAC1C,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,UAAU,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AACrC,CAAC;AAED,6FAA6F;AAC7F,SAAS,gBAAgB,CAAC,SAAiB;IACzC,MAAM,CAAC,SAAS,EAAE,AAAD,EAAG,IAAI,EAAE,GAAG,MAAM,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAE5D,OAAO,SAAS,KAAK,iBAAiB,IAAI,IAAI,KAAK,cAAc,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC;AAC3F,CAAC;AAED,SAAS,UAAU,CAAC,SAAiB,EAAE,IAAY;IACjD,IAAI,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QACjC,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,IAAI,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QACxB,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,OAAO,SAAS,KAAK,kBAAkB,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,QAAQ,CAAC;AACvE,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The higher of two versions by the precedence of Semantic Versioning (a pre-release below its
3
+ * release, build metadata ignored), as written; the first when they rank the same. Undefined when
4
+ * either is not a semantic version: which one to keep is then a person's decision.
5
+ */
6
+ export declare function higherVersion(one: string, other: string): string | undefined;
7
+ //# sourceMappingURL=higher-version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"higher-version.d.ts","sourceRoot":"","sources":["../../src/merge/higher-version.ts"],"names":[],"mappings":"AASA;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAS5E"}
@@ -0,0 +1,59 @@
1
+ /** A version as Semantic Versioning 2.0.0 writes it: three numbers, a pre-release part, build metadata. */
2
+ const SEMVER = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*)?$/;
3
+ /**
4
+ * The higher of two versions by the precedence of Semantic Versioning (a pre-release below its
5
+ * release, build metadata ignored), as written; the first when they rank the same. Undefined when
6
+ * either is not a semantic version: which one to keep is then a person's decision.
7
+ */
8
+ export function higherVersion(one, other) {
9
+ const first = parsed(one);
10
+ const second = parsed(other);
11
+ if (first === undefined || second === undefined) {
12
+ return undefined;
13
+ }
14
+ return compare(first, second) >= 0 ? one : other;
15
+ }
16
+ function parsed(written) {
17
+ const match = SEMVER.exec(written);
18
+ if (match === null) {
19
+ return undefined;
20
+ }
21
+ return {
22
+ release: [Number(match[1]), Number(match[2]), Number(match[3])],
23
+ preRelease: match[4] === undefined ? [] : match[4].split('.'),
24
+ };
25
+ }
26
+ function compare(first, second) {
27
+ const release = first.release.map((part, index) => part - (second.release[index] ?? 0)).find((delta) => delta !== 0);
28
+ if (release !== undefined) {
29
+ return release;
30
+ }
31
+ if (first.preRelease.length === 0 || second.preRelease.length === 0) {
32
+ return second.preRelease.length - first.preRelease.length;
33
+ }
34
+ return comparePreRelease(first.preRelease, second.preRelease);
35
+ }
36
+ /** Identifier by identifier: numbers by value and below words, words in ASCII order, then the longer one higher. */
37
+ function comparePreRelease(first, second) {
38
+ for (let index = 0; index < Math.min(first.length, second.length); index += 1) {
39
+ const delta = compareIdentifier(first[index] ?? '', second[index] ?? '');
40
+ if (delta !== 0) {
41
+ return delta;
42
+ }
43
+ }
44
+ return first.length - second.length;
45
+ }
46
+ function compareIdentifier(first, second) {
47
+ const numeric = /^\d+$/;
48
+ if (numeric.test(first) && numeric.test(second)) {
49
+ return Number(first) - Number(second);
50
+ }
51
+ if (numeric.test(first) !== numeric.test(second)) {
52
+ return numeric.test(first) ? -1 : 1;
53
+ }
54
+ if (first === second) {
55
+ return 0;
56
+ }
57
+ return first < second ? -1 : 1;
58
+ }
59
+ //# sourceMappingURL=higher-version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"higher-version.js","sourceRoot":"","sources":["../../src/merge/higher-version.ts"],"names":[],"mappings":"AAAA,2GAA2G;AAC3G,MAAM,MAAM,GACV,mLAAmL,CAAC;AAOtL;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW,EAAE,KAAa;IACtD,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IAC1B,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAE7B,IAAI,KAAK,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QAChD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;AACnD,CAAC;AAED,SAAS,MAAM,CAAC,OAAe;IAC7B,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAEnC,IAAI,KAAK,KAAK,IAAI,EAAE,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AAM,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QAC9E,MAAM,KAAK,GAAG,iBAAiB,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QAEzE,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;YAChB,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACtC,CAAC;AAED,SAAS,iBAAiB,CAAC,KAAa,EAAE,MAAc;IACtD,MAAM,OAAO,GAAG,OAAO,CAAC;IAExB,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QAChD,OAAO,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IACxC,CAAC;IAED,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QACjD,OAAO,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACtC,CAAC;IAED,IAAI,KAAK,KAAK,MAAM,EAAE,CAAC;QACrB,OAAO,CAAC,CAAC;IACX,CAAC;IAED,OAAO,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACjC,CAAC"}
@@ -0,0 +1,16 @@
1
+ /** What a conflict on the package.json of a client settles to: the trunk's file at the kept version, or why a person decides. */
2
+ export type ClientManifestMerge = {
3
+ readonly content: string;
4
+ readonly how: string;
5
+ } | {
6
+ readonly content?: undefined;
7
+ readonly why: string;
8
+ };
9
+ /**
10
+ * The package.json of a generated client is written by `sdk` but for its version, which the team
11
+ * raises before it publishes, and which `regenerate` keeps as it finds it. Taking the trunk's file
12
+ * whole would drop a version this branch raised: the trunk's file is kept with the higher of the
13
+ * two versions. A side whose version is not a semantic version leaves the choice to a person.
14
+ */
15
+ export declare function mergeClientManifest(ours: string, theirs: string): ClientManifestMerge;
16
+ //# sourceMappingURL=merge-client-manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merge-client-manifest.d.ts","sourceRoot":"","sources":["../../src/merge/merge-client-manifest.ts"],"names":[],"mappings":"AAIA,iIAAiI;AACjI,MAAM,MAAM,mBAAmB,GAC3B;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAClD;IAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3D;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,mBAAmB,CAoBrF"}
@@ -0,0 +1,39 @@
1
+ import { isRecord } from '../config/values/is-record.js';
2
+ import { manifestJson } from '../sdk/manifest-json.js';
3
+ import { higherVersion } from './higher-version.js';
4
+ /**
5
+ * The package.json of a generated client is written by `sdk` but for its version, which the team
6
+ * raises before it publishes, and which `regenerate` keeps as it finds it. Taking the trunk's file
7
+ * whole would drop a version this branch raised: the trunk's file is kept with the higher of the
8
+ * two versions. A side whose version is not a semantic version leaves the choice to a person.
9
+ */
10
+ export function mergeClientManifest(ours, theirs) {
11
+ const trunk = manifestOf(theirs);
12
+ const branchVersion = versionOf(manifestOf(ours));
13
+ const trunkVersion = versionOf(trunk);
14
+ if (trunk === undefined || branchVersion === undefined || trunkVersion === undefined) {
15
+ return { why: 'a side is not a package.json with a version' };
16
+ }
17
+ const kept = higherVersion(trunkVersion, branchVersion);
18
+ if (kept === undefined) {
19
+ return {
20
+ why: `the version of a side is not a semantic version (${branchVersion} on this branch, ${trunkVersion} on the trunk)`,
21
+ };
22
+ }
23
+ const how = `client package.json: trunk side, version ${kept} kept, the higher of ${branchVersion} on this branch and ${trunkVersion} on the trunk`;
24
+ return { content: kept === trunkVersion ? theirs : manifestJson({ ...trunk, version: kept }), how };
25
+ }
26
+ function manifestOf(text) {
27
+ try {
28
+ const value = JSON.parse(text);
29
+ return isRecord(value) ? value : undefined;
30
+ }
31
+ catch {
32
+ return undefined;
33
+ }
34
+ }
35
+ function versionOf(manifest) {
36
+ const version = manifest?.['version'];
37
+ return typeof version === 'string' ? version : undefined;
38
+ }
39
+ //# sourceMappingURL=merge-client-manifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merge-client-manifest.js","sourceRoot":"","sources":["../../src/merge/merge-client-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAOpD;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAY,EAAE,MAAc;IAC9D,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IACjC,MAAM,aAAa,GAAG,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;IAClD,MAAM,YAAY,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;IAEtC,IAAI,KAAK,KAAK,SAAS,IAAI,aAAa,KAAK,SAAS,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;QACrF,OAAO,EAAE,GAAG,EAAE,6CAA6C,EAAE,CAAC;IAChE,CAAC;IAED,MAAM,IAAI,GAAG,aAAa,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;IAExD,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,OAAO;YACL,GAAG,EAAE,oDAAoD,aAAa,oBAAoB,YAAY,gBAAgB;SACvH,CAAC;IACJ,CAAC;IAED,MAAM,GAAG,GAAG,4CAA4C,IAAI,wBAAwB,aAAa,uBAAuB,YAAY,eAAe,CAAC;IAEpJ,OAAO,EAAE,OAAO,EAAE,IAAI,KAAK,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,GAAG,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC;AACtG,CAAC;AAED,SAAS,UAAU,CAAC,IAAY;IAC9B,IAAI,CAAC;QACH,MAAM,KAAK,GAAY,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAExC,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;IAC7C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,SAAS,SAAS,CAAC,QAA6C;IAC9D,MAAM,OAAO,GAAG,QAAQ,EAAE,CAAC,SAAS,CAAC,CAAC;IAEtC,OAAO,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;AAC3D,CAAC"}
@@ -1,8 +1,9 @@
1
1
  /**
2
2
  * The pathspecs a patch is compared without, to find the commit of the trunk that took a branch
3
- * in: what a tool writes again on the trunk (the derived files, the migrations, renamed from
4
- * working ones), the slices and plan files the conductor edits at the merge, the lockfiles.
5
- * Relative to the project, for a git run from its root.
3
+ * in: what a tool writes again on the trunk (the derived files, the declarations of a context
4
+ * among them, at its root and in its role folders, the migrations, renamed from working ones),
5
+ * the slices and plan files the conductor edits at the merge, the lockfiles. Relative to the
6
+ * project, for a git run from its root.
6
7
  */
7
8
  export declare function mergeExclusions(contextsDir: string): string[];
8
9
  //# sourceMappingURL=merge-exclusions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"merge-exclusions.d.ts","sourceRoot":"","sources":["../../src/merge/merge-exclusions.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAkB7D"}
1
+ {"version":3,"file":"merge-exclusions.d.ts","sourceRoot":"","sources":["../../src/merge/merge-exclusions.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAoB7D"}
@@ -2,9 +2,10 @@
2
2
  const LOCKFILES = ['package-lock.json', 'npm-shrinkwrap.json', 'pnpm-lock.yaml', 'yarn.lock', 'bun.lock', 'bun.lockb'];
3
3
  /**
4
4
  * The pathspecs a patch is compared without, to find the commit of the trunk that took a branch
5
- * in: what a tool writes again on the trunk (the derived files, the migrations, renamed from
6
- * working ones), the slices and plan files the conductor edits at the merge, the lockfiles.
7
- * Relative to the project, for a git run from its root.
5
+ * in: what a tool writes again on the trunk (the derived files, the declarations of a context
6
+ * among them, at its root and in its role folders, the migrations, renamed from working ones),
7
+ * the slices and plan files the conductor edits at the merge, the lockfiles. Relative to the
8
+ * project, for a git run from its root.
8
9
  */
9
10
  export function mergeExclusions(contextsDir) {
10
11
  const left = [
@@ -15,6 +16,8 @@ export function mergeExclusions(contextsDir) {
15
16
  '.dependency-cruiser.cjs',
16
17
  `${contextsDir}/*/CONTEXT.md`,
17
18
  `${contextsDir}/*/*.declarations.ts`,
19
+ `${contextsDir}/*/*/*.declarations.ts`,
20
+ `${contextsDir}/*/*/*/*.declarations.ts`,
18
21
  `${contextsDir}/*/*.dependencies.ts`,
19
22
  'docs/architecture/slices.md',
20
23
  'docs/architecture/plan.md',
@@ -1 +1 @@
1
- {"version":3,"file":"merge-exclusions.js","sourceRoot":"","sources":["../../src/merge/merge-exclusions.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,MAAM,SAAS,GAAG,CAAC,m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,IAAI,EAAE,CAAC;KACzC,CAAC;IAEF,OAAO,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,kBAAkB,IAAI,EAAE,CAAC,CAAC,CAAC;AAChE,CAAC"}
@@ -2,8 +2,9 @@ import type { ConflictedPath } from './conflicted-path.js';
2
2
  import type { MergeRepository } from './lost/merge-repository.js';
3
3
  import type { Resolution } from './resolution.js';
4
4
  /**
5
- * Settles a conflicted path by its class: the trunk's side of what a tool writes again, the slices
6
- * rows and the stored-events lock merged by their keys, and inside a source or a mixed document
5
+ * Settles a conflicted path by its class: the trunk's side of what a tool writes again, the
6
+ * package.json of a client at the higher version of both sides, the slices rows and the
7
+ * stored-events lock merged by their keys, and inside a source or a mixed document
7
8
  * each conflict lying in a generated region. What is left is a person's: a source conflict, a
8
9
  * cell or a key both sides changed, a file one side deleted, bytes that are not text.
9
10
  */
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-conflict.d.ts","sourceRoot":"","sources":["../../src/merge/resolve-conflict.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAIlE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAUlD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,eAAe,GAAG,UAAU,CAuBvF"}
1
+ {"version":3,"file":"resolve-conflict.d.ts","sourceRoot":"","sources":["../../src/merge/resolve-conflict.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAIlE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAYlD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,eAAe,GAAG,UAAU,CAwBvF"}
@@ -1,39 +1,54 @@
1
1
  import { classifyConflict } from './classify-conflict.js';
2
+ import { mergeClientManifest } from './merge-client-manifest.js';
2
3
  import { conflictBlocks } from './conflict-blocks.js';
3
4
  import { mergeSlicesRows } from './merge-slices-rows.js';
4
5
  import { mergeStoredEventsLock } from './merge-stored-events-lock.js';
5
6
  import { registryUnion } from './registry-union.js';
6
7
  import { settleRegions } from './settle-regions.js';
8
+ const DERIVED = 'derived: trunk side, regenerated at the end';
7
9
  /** The classes whose trunk side is taken whole: a tool writes them again after the merge. */
8
10
  const TRUNK_SIDE = {
9
- derived: 'derived: trunk side, regenerated at the end',
11
+ derived: DERIVED,
10
12
  'drizzle-meta': 'drizzle-kit journal and snapshots: trunk side, the migrations of the branch generated again on top',
11
13
  lockfile: 'lockfile: trunk side',
12
14
  };
13
15
  /**
14
- * Settles a conflicted path by its class: the trunk's side of what a tool writes again, the slices
15
- * rows and the stored-events lock merged by their keys, and inside a source or a mixed document
16
+ * Settles a conflicted path by its class: the trunk's side of what a tool writes again, the
17
+ * package.json of a client at the higher version of both sides, the slices rows and the
18
+ * stored-events lock merged by their keys, and inside a source or a mixed document
16
19
  * each conflict lying in a generated region. What is left is a person's: a source conflict, a
17
20
  * cell or a key both sides changed, a file one side deleted, bytes that are not text.
18
21
  */
19
22
  export function resolveConflict(path, repo) {
20
23
  const kind = classifyConflict(path.file, repo);
24
+ if (kind === 'client-manifest') {
25
+ return clientManifest(path);
26
+ }
21
27
  const trunkSide = TRUNK_SIDE[kind];
22
28
  if (trunkSide !== undefined) {
23
29
  return { file: path.file, kind, content: path.theirs ?? null, settled: true, how: trunkSide, blocks: [] };
24
30
  }
25
31
  const { ours, theirs } = path;
26
32
  if (path.binary || ours === undefined || theirs === undefined) {
27
- const why = path.binary
28
- ? 'a side is not text'
29
- : `${ours === undefined ? 'this branch' : 'the trunk'} deleted it, the other side changed it`;
30
- return leftOver(path, kind, why);
33
+ return leftOver(path, kind, oneSideMissing(path));
31
34
  }
32
35
  if (kind === 'slices' || kind === 'stored-events') {
33
36
  return byKeys({ ...path, ours, theirs }, kind);
34
37
  }
35
38
  return inRegions(path, kind);
36
39
  }
40
+ /** The trunk's package.json of a client at the higher version of both sides; the trunk's side when one has no text. */
41
+ function clientManifest(path) {
42
+ const { file, ours, theirs } = path;
43
+ const kind = 'client-manifest';
44
+ if (path.binary || ours === undefined || theirs === undefined) {
45
+ return { file, kind, content: theirs ?? null, settled: true, how: DERIVED, blocks: [] };
46
+ }
47
+ const merged = mergeClientManifest(ours, theirs);
48
+ return merged.content === undefined
49
+ ? leftOver(path, 'source', merged.why)
50
+ : { file, kind, content: merged.content, settled: true, how: merged.how, blocks: [] };
51
+ }
37
52
  function byKeys(path, kind) {
38
53
  const merged = kind === 'slices'
39
54
  ? mergeSlicesRows(path.base ?? '', path.ours, path.theirs)
@@ -66,6 +81,13 @@ function inRegions(path, kind) {
66
81
  blocks: left,
67
82
  };
68
83
  }
84
+ /** Why a path without text on both sides is left to a person. */
85
+ function oneSideMissing(path) {
86
+ if (path.binary) {
87
+ return 'a side is not text';
88
+ }
89
+ return `${path.ours === undefined ? 'this branch' : 'the trunk'} deleted it, the other side changed it`;
90
+ }
69
91
  function leftOver(path, kind, why) {
70
92
  return {
71
93
  file: path.file,
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-conflict.js","sourceRoot":"","sources":["../../src/merge/resolve-conflict.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAsB,cAAc,EAAgB,MAAM,sBAAsB,CAAC;AAGxF,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,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AAC;AAED,SAAS,QAAQ,CAAC,IAAoB,EAAE,IAAmB,EAAE,GAAW;IACtE,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,IAAI;QACJ,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE,KAAK;QACd,GAAG,EAAE,GAAG;QACR,MAAM,EAAE,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;KACpD,CAAC;AACJ,CAAC;AAED,SAAS,QAAQ,CAAC,QAA4B;IAC5C,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC;AACnE,CAAC"}
@@ -4,6 +4,8 @@ import type { Wave } from './wave-plan.js';
4
4
  export interface WaveRows {
5
5
  /** The rows to show, in the order of the file. */
6
6
  readonly rows: readonly Slice[];
7
+ /** Every planned row, shown or not: what the shown rows wait for. */
8
+ readonly planned: readonly Slice[];
7
9
  /** The wave of every planned row, by id: a dependency it does not hold is done. */
8
10
  readonly numbers: ReadonlyMap<string, number>;
9
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"batched-waves.d.ts","sourceRoot":"","sources":["../../src/plan/batched-waves.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,KAAK,EAAS,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAKlD,gCAAgC;AAChC,MAAM,WAAW,QAAQ;IACvB,kDAAkD;IAClD,QAAQ,CAAC,IAAI,EAAE,SAAS,KAAK,EAAE,CAAC;IAChC,mFAAmF;IACnF,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/C;AAUD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,EAAE,CAQpD"}
1
+ {"version":3,"file":"batched-waves.d.ts","sourceRoot":"","sources":["../../src/plan/batched-waves.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAGlD,OAAO,KAAK,EAAgC,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAKzE,gCAAgC;AAChC,MAAM,WAAW,QAAQ;IACvB,kDAAkD;IAClD,QAAQ,CAAC,IAAI,EAAE,SAAS,KAAK,EAAE,CAAC;IAChC,qEAAqE;IACrE,QAAQ,CAAC,OAAO,EAAE,SAAS,KAAK,EAAE,CAAC;IACnC,mFAAmF;IACnF,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/C;AAUD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,EAAE,CAQpD"}
@@ -1,3 +1,4 @@
1
+ import { storyOf } from '../story/story-of.js';
1
2
  import { aggregatesOf } from './aggregates-of.js';
2
3
  /** Past this many rows, an agent runs out of turns or context before its report. */
3
4
  const ROWS_PER_BATCH = 2;
@@ -41,13 +42,7 @@ function batchesOf(wave, drafts, input) {
41
42
  id: id(draft),
42
43
  owner: draft.owner,
43
44
  context: draft.context,
44
- rows: draft.rows.map((row) => ({
45
- id: row.id,
46
- kind: row.kind,
47
- slice: row.slice,
48
- status: row.status,
49
- waitingFor: row.dependsOn.filter((dependency) => input.numbers.has(dependency)),
50
- })),
45
+ rows: draft.rows.map((row) => plannedRow(row, input)),
51
46
  aggregates: draft.aggregates,
52
47
  brief: briefOf(draft, drafts, id(draft)),
53
48
  sameFiles: neighbours.filter((other) => draft.aggregates.some((name) => other.aggregates.includes(name))).map(id),
@@ -55,6 +50,24 @@ function batchesOf(wave, drafts, input) {
55
50
  };
56
51
  });
57
52
  }
53
+ function plannedRow(row, input) {
54
+ const waitingFor = row.dependsOn.filter((dependency) => input.numbers.has(dependency));
55
+ return {
56
+ id: row.id,
57
+ kind: row.kind,
58
+ slice: row.slice,
59
+ status: row.status,
60
+ story: storyOf(row.id) ?? null,
61
+ waitingFor,
62
+ waitingForRows: waitingFor.flatMap((id) => waitedRow(id, input.planned)),
63
+ };
64
+ }
65
+ function waitedRow(id, planned) {
66
+ const row = planned.find((candidate) => candidate.id === id);
67
+ return row === undefined
68
+ ? []
69
+ : [{ id: row.id, context: row.context, story: storyOf(row.id) ?? null, status: row.status }];
70
+ }
58
71
  /**
59
72
  * The `worker-scope` command of a batch owned by the worker of its context. Two batches of one
60
73
  * context in one wave run side by side: each gets a worktree and a branch named after its id.
@@ -1 +1 @@
1
- {"version":3,"file":"batched-waves.js","sourceRoot":"","sources":["../../src/plan/batched-waves.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD,oFAAoF;AACpF,MAAM,cAAc,GAAG,CAAC,CAAC;AAkBzB;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,KAAe;IAC1C,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAChC,MAAM,KAAK,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC;IAE5G,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC1B,IAAI;QACJ,OAAO,EAAE,SAAS,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC;KACzF,CAAC,CAAC,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else each wave and its
4
- * batches, then the merge order and what to run before each merge.
4
+ * batches, the rows another story waits for, then the merge order and what to run before each merge.
5
5
  */
6
6
  export declare function formatPlan(plan: WavePlan): string;
7
7
  //# sourceMappingURL=format-plan.d.ts.map