@endora-commerce/cli 0.100.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 (356) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +37 -0
  3. package/dist/bin/endora.d.ts +28 -0
  4. package/dist/bin/endora.d.ts.map +1 -0
  5. package/dist/bin/endora.js +926 -0
  6. package/dist/bin/endora.js.map +1 -0
  7. package/dist/check/estate.d.ts +189 -0
  8. package/dist/check/estate.d.ts.map +1 -0
  9. package/dist/check/estate.js +1037 -0
  10. package/dist/check/estate.js.map +1 -0
  11. package/dist/check/hosts.d.ts +25 -0
  12. package/dist/check/hosts.d.ts.map +1 -0
  13. package/dist/check/hosts.js +1347 -0
  14. package/dist/check/hosts.js.map +1 -0
  15. package/dist/check/index.d.ts +60 -0
  16. package/dist/check/index.d.ts.map +1 -0
  17. package/dist/check/index.js +111 -0
  18. package/dist/check/index.js.map +1 -0
  19. package/dist/check/layout.d.ts +136 -0
  20. package/dist/check/layout.d.ts.map +1 -0
  21. package/dist/check/layout.js +262 -0
  22. package/dist/check/layout.js.map +1 -0
  23. package/dist/check/ledger.d.ts +98 -0
  24. package/dist/check/ledger.d.ts.map +1 -0
  25. package/dist/check/ledger.js +173 -0
  26. package/dist/check/ledger.js.map +1 -0
  27. package/dist/check/peer-owners.d.ts +116 -0
  28. package/dist/check/peer-owners.d.ts.map +1 -0
  29. package/dist/check/peer-owners.js +225 -0
  30. package/dist/check/peer-owners.js.map +1 -0
  31. package/dist/check/report.d.ts +33 -0
  32. package/dist/check/report.d.ts.map +1 -0
  33. package/dist/check/report.js +107 -0
  34. package/dist/check/report.js.map +1 -0
  35. package/dist/check/run.d.ts +147 -0
  36. package/dist/check/run.d.ts.map +1 -0
  37. package/dist/check/run.js +111 -0
  38. package/dist/check/run.js.map +1 -0
  39. package/dist/checks.d.ts +17 -0
  40. package/dist/checks.d.ts.map +1 -0
  41. package/dist/checks.js +17 -0
  42. package/dist/checks.js.map +1 -0
  43. package/dist/dev/index.d.ts +83 -0
  44. package/dist/dev/index.d.ts.map +1 -0
  45. package/dist/dev/index.js +298 -0
  46. package/dist/dev/index.js.map +1 -0
  47. package/dist/generate/divergence.d.ts +38 -0
  48. package/dist/generate/divergence.d.ts.map +1 -0
  49. package/dist/generate/divergence.js +237 -0
  50. package/dist/generate/divergence.js.map +1 -0
  51. package/dist/generate/index.d.ts +90 -0
  52. package/dist/generate/index.d.ts.map +1 -0
  53. package/dist/generate/index.js +369 -0
  54. package/dist/generate/index.js.map +1 -0
  55. package/dist/index.d.ts +23 -0
  56. package/dist/index.d.ts.map +1 -0
  57. package/dist/index.js +35 -0
  58. package/dist/index.js.map +1 -0
  59. package/dist/inputs/declaration.d.ts +18 -0
  60. package/dist/inputs/declaration.d.ts.map +1 -0
  61. package/dist/inputs/declaration.js +64 -0
  62. package/dist/inputs/declaration.js.map +1 -0
  63. package/dist/inputs/env-file.d.ts +73 -0
  64. package/dist/inputs/env-file.d.ts.map +1 -0
  65. package/dist/inputs/env-file.js +134 -0
  66. package/dist/inputs/env-file.js.map +1 -0
  67. package/dist/inputs/prompt.d.ts +21 -0
  68. package/dist/inputs/prompt.d.ts.map +1 -0
  69. package/dist/inputs/prompt.js +59 -0
  70. package/dist/inputs/prompt.js.map +1 -0
  71. package/dist/inputs/resolve.d.ts +163 -0
  72. package/dist/inputs/resolve.d.ts.map +1 -0
  73. package/dist/inputs/resolve.js +290 -0
  74. package/dist/inputs/resolve.js.map +1 -0
  75. package/dist/install/host.d.ts +27 -0
  76. package/dist/install/host.d.ts.map +1 -0
  77. package/dist/install/host.js +90 -0
  78. package/dist/install/host.js.map +1 -0
  79. package/dist/install/index.d.ts +173 -0
  80. package/dist/install/index.d.ts.map +1 -0
  81. package/dist/install/index.js +793 -0
  82. package/dist/install/index.js.map +1 -0
  83. package/dist/install/wizard.d.ts +144 -0
  84. package/dist/install/wizard.d.ts.map +1 -0
  85. package/dist/install/wizard.js +362 -0
  86. package/dist/install/wizard.js.map +1 -0
  87. package/dist/lib/admin-artefacts.d.ts +70 -0
  88. package/dist/lib/admin-artefacts.d.ts.map +1 -0
  89. package/dist/lib/admin-artefacts.js +354 -0
  90. package/dist/lib/admin-artefacts.js.map +1 -0
  91. package/dist/lib/admin-surfaces.d.ts +298 -0
  92. package/dist/lib/admin-surfaces.d.ts.map +1 -0
  93. package/dist/lib/admin-surfaces.js +669 -0
  94. package/dist/lib/admin-surfaces.js.map +1 -0
  95. package/dist/lib/delegated-composer.d.ts +85 -0
  96. package/dist/lib/delegated-composer.d.ts.map +1 -0
  97. package/dist/lib/delegated-composer.js +241 -0
  98. package/dist/lib/delegated-composer.js.map +1 -0
  99. package/dist/lib/divergence-artefacts.d.ts +305 -0
  100. package/dist/lib/divergence-artefacts.d.ts.map +1 -0
  101. package/dist/lib/divergence-artefacts.js +828 -0
  102. package/dist/lib/divergence-artefacts.js.map +1 -0
  103. package/dist/lib/divergence.d.ts +337 -0
  104. package/dist/lib/divergence.d.ts.map +1 -0
  105. package/dist/lib/divergence.js +1005 -0
  106. package/dist/lib/divergence.js.map +1 -0
  107. package/dist/lib/docs-artefacts.d.ts +395 -0
  108. package/dist/lib/docs-artefacts.d.ts.map +1 -0
  109. package/dist/lib/docs-artefacts.js +781 -0
  110. package/dist/lib/docs-artefacts.js.map +1 -0
  111. package/dist/lib/emitted-exports.d.ts +21 -0
  112. package/dist/lib/emitted-exports.d.ts.map +1 -0
  113. package/dist/lib/emitted-exports.js +96 -0
  114. package/dist/lib/emitted-exports.js.map +1 -0
  115. package/dist/lib/emitted-freshness.d.ts +112 -0
  116. package/dist/lib/emitted-freshness.d.ts.map +1 -0
  117. package/dist/lib/emitted-freshness.js +288 -0
  118. package/dist/lib/emitted-freshness.js.map +1 -0
  119. package/dist/lib/entity-index-artefact.d.ts +95 -0
  120. package/dist/lib/entity-index-artefact.d.ts.map +1 -0
  121. package/dist/lib/entity-index-artefact.js +210 -0
  122. package/dist/lib/entity-index-artefact.js.map +1 -0
  123. package/dist/lib/instance-build-inputs.d.ts +108 -0
  124. package/dist/lib/instance-build-inputs.d.ts.map +1 -0
  125. package/dist/lib/instance-build-inputs.js +165 -0
  126. package/dist/lib/instance-build-inputs.js.map +1 -0
  127. package/dist/lib/module-docs.d.ts +473 -0
  128. package/dist/lib/module-docs.d.ts.map +1 -0
  129. package/dist/lib/module-docs.js +711 -0
  130. package/dist/lib/module-docs.js.map +1 -0
  131. package/dist/lib/module-package-subpaths.d.ts +56 -0
  132. package/dist/lib/module-package-subpaths.d.ts.map +1 -0
  133. package/dist/lib/module-package-subpaths.js +223 -0
  134. package/dist/lib/module-package-subpaths.js.map +1 -0
  135. package/dist/lib/module-packages.d.ts +200 -0
  136. package/dist/lib/module-packages.d.ts.map +1 -0
  137. package/dist/lib/module-packages.js +580 -0
  138. package/dist/lib/module-packages.js.map +1 -0
  139. package/dist/lib/module-population.d.ts +129 -0
  140. package/dist/lib/module-population.d.ts.map +1 -0
  141. package/dist/lib/module-population.js +172 -0
  142. package/dist/lib/module-population.js.map +1 -0
  143. package/dist/lib/module-roots.d.ts +337 -0
  144. package/dist/lib/module-roots.d.ts.map +1 -0
  145. package/dist/lib/module-roots.js +586 -0
  146. package/dist/lib/module-roots.js.map +1 -0
  147. package/dist/lib/nested-checkouts.d.ts +33 -0
  148. package/dist/lib/nested-checkouts.d.ts.map +1 -0
  149. package/dist/lib/nested-checkouts.js +160 -0
  150. package/dist/lib/nested-checkouts.js.map +1 -0
  151. package/dist/lib/platform-root.d.ts +43 -0
  152. package/dist/lib/platform-root.d.ts.map +1 -0
  153. package/dist/lib/platform-root.js +134 -0
  154. package/dist/lib/platform-root.js.map +1 -0
  155. package/dist/lib/platform-surface.d.ts +235 -0
  156. package/dist/lib/platform-surface.d.ts.map +1 -0
  157. package/dist/lib/platform-surface.js +393 -0
  158. package/dist/lib/platform-surface.js.map +1 -0
  159. package/dist/lib/port-registrations.d.ts +223 -0
  160. package/dist/lib/port-registrations.d.ts.map +1 -0
  161. package/dist/lib/port-registrations.js +532 -0
  162. package/dist/lib/port-registrations.js.map +1 -0
  163. package/dist/lib/read-size.d.ts +154 -0
  164. package/dist/lib/read-size.d.ts.map +1 -0
  165. package/dist/lib/read-size.js +182 -0
  166. package/dist/lib/read-size.js.map +1 -0
  167. package/dist/lib/registration-owners.d.ts +79 -0
  168. package/dist/lib/registration-owners.d.ts.map +1 -0
  169. package/dist/lib/registration-owners.js +77 -0
  170. package/dist/lib/registration-owners.js.map +1 -0
  171. package/dist/lib/release-index.d.ts +53 -0
  172. package/dist/lib/release-index.d.ts.map +1 -0
  173. package/dist/lib/release-index.js +162 -0
  174. package/dist/lib/release-index.js.map +1 -0
  175. package/dist/lib/repeating-timers.d.ts +79 -0
  176. package/dist/lib/repeating-timers.d.ts.map +1 -0
  177. package/dist/lib/repeating-timers.js +189 -0
  178. package/dist/lib/repeating-timers.js.map +1 -0
  179. package/dist/lib/source-text.d.ts +34 -0
  180. package/dist/lib/source-text.d.ts.map +1 -0
  181. package/dist/lib/source-text.js +80 -0
  182. package/dist/lib/source-text.js.map +1 -0
  183. package/dist/lib/specifiers.d.ts +20 -0
  184. package/dist/lib/specifiers.d.ts.map +1 -0
  185. package/dist/lib/specifiers.js +130 -0
  186. package/dist/lib/specifiers.js.map +1 -0
  187. package/dist/lib/sql-tables.d.ts +166 -0
  188. package/dist/lib/sql-tables.d.ts.map +1 -0
  189. package/dist/lib/sql-tables.js +464 -0
  190. package/dist/lib/sql-tables.js.map +1 -0
  191. package/dist/lib/switchable-modules.d.ts +54 -0
  192. package/dist/lib/switchable-modules.d.ts.map +1 -0
  193. package/dist/lib/switchable-modules.js +104 -0
  194. package/dist/lib/switchable-modules.js.map +1 -0
  195. package/dist/lib/tailwind-sources.d.ts +136 -0
  196. package/dist/lib/tailwind-sources.d.ts.map +1 -0
  197. package/dist/lib/tailwind-sources.js +307 -0
  198. package/dist/lib/tailwind-sources.js.map +1 -0
  199. package/dist/lib/ui-layer.d.ts +54 -0
  200. package/dist/lib/ui-layer.d.ts.map +1 -0
  201. package/dist/lib/ui-layer.js +57 -0
  202. package/dist/lib/ui-layer.js.map +1 -0
  203. package/dist/lib/workspace-packages.d.ts +186 -0
  204. package/dist/lib/workspace-packages.d.ts.map +1 -0
  205. package/dist/lib/workspace-packages.js +351 -0
  206. package/dist/lib/workspace-packages.js.map +1 -0
  207. package/dist/new-instance/deploy.d.ts +211 -0
  208. package/dist/new-instance/deploy.d.ts.map +1 -0
  209. package/dist/new-instance/deploy.js +1381 -0
  210. package/dist/new-instance/deploy.js.map +1 -0
  211. package/dist/new-instance/docs-toolchain.d.ts +66 -0
  212. package/dist/new-instance/docs-toolchain.d.ts.map +1 -0
  213. package/dist/new-instance/docs-toolchain.js +69 -0
  214. package/dist/new-instance/docs-toolchain.js.map +1 -0
  215. package/dist/new-instance/host.d.ts +124 -0
  216. package/dist/new-instance/host.d.ts.map +1 -0
  217. package/dist/new-instance/host.js +276 -0
  218. package/dist/new-instance/host.js.map +1 -0
  219. package/dist/new-instance/index.d.ts +118 -0
  220. package/dist/new-instance/index.d.ts.map +1 -0
  221. package/dist/new-instance/index.js +567 -0
  222. package/dist/new-instance/index.js.map +1 -0
  223. package/dist/new-instance/modules.d.ts +188 -0
  224. package/dist/new-instance/modules.d.ts.map +1 -0
  225. package/dist/new-instance/modules.js +392 -0
  226. package/dist/new-instance/modules.js.map +1 -0
  227. package/dist/new-instance/template.d.ts +505 -0
  228. package/dist/new-instance/template.d.ts.map +1 -0
  229. package/dist/new-instance/template.js +1886 -0
  230. package/dist/new-instance/template.js.map +1 -0
  231. package/dist/new-module/emit.d.ts +67 -0
  232. package/dist/new-module/emit.d.ts.map +1 -0
  233. package/dist/new-module/emit.js +1393 -0
  234. package/dist/new-module/emit.js.map +1 -0
  235. package/dist/new-module/host.d.ts +67 -0
  236. package/dist/new-module/host.d.ts.map +1 -0
  237. package/dist/new-module/host.js +224 -0
  238. package/dist/new-module/host.js.map +1 -0
  239. package/dist/new-module/index.d.ts +32 -0
  240. package/dist/new-module/index.d.ts.map +1 -0
  241. package/dist/new-module/index.js +193 -0
  242. package/dist/new-module/index.js.map +1 -0
  243. package/dist/new-module/spec.d.ts +188 -0
  244. package/dist/new-module/spec.d.ts.map +1 -0
  245. package/dist/new-module/spec.js +404 -0
  246. package/dist/new-module/spec.js.map +1 -0
  247. package/dist/new-module/text.d.ts +15 -0
  248. package/dist/new-module/text.d.ts.map +1 -0
  249. package/dist/new-module/text.js +22 -0
  250. package/dist/new-module/text.js.map +1 -0
  251. package/dist/new-storefront/dockerfile.d.ts +20 -0
  252. package/dist/new-storefront/dockerfile.d.ts.map +1 -0
  253. package/dist/new-storefront/dockerfile.js +131 -0
  254. package/dist/new-storefront/dockerfile.js.map +1 -0
  255. package/dist/new-storefront/gitignore.d.ts +23 -0
  256. package/dist/new-storefront/gitignore.d.ts.map +1 -0
  257. package/dist/new-storefront/gitignore.js +39 -0
  258. package/dist/new-storefront/gitignore.js.map +1 -0
  259. package/dist/new-storefront/index.d.ts +93 -0
  260. package/dist/new-storefront/index.d.ts.map +1 -0
  261. package/dist/new-storefront/index.js +329 -0
  262. package/dist/new-storefront/index.js.map +1 -0
  263. package/dist/new-storefront/npmrc.d.ts +98 -0
  264. package/dist/new-storefront/npmrc.d.ts.map +1 -0
  265. package/dist/new-storefront/npmrc.js +217 -0
  266. package/dist/new-storefront/npmrc.js.map +1 -0
  267. package/dist/new-storefront/reference.d.ts +189 -0
  268. package/dist/new-storefront/reference.d.ts.map +1 -0
  269. package/dist/new-storefront/reference.js +430 -0
  270. package/dist/new-storefront/reference.js.map +1 -0
  271. package/dist/new-storefront/rewrite.d.ts +171 -0
  272. package/dist/new-storefront/rewrite.d.ts.map +1 -0
  273. package/dist/new-storefront/rewrite.js +701 -0
  274. package/dist/new-storefront/rewrite.js.map +1 -0
  275. package/dist/release-index.json +284 -0
  276. package/dist/rules/action-route-permissions.d.ts +141 -0
  277. package/dist/rules/action-route-permissions.d.ts.map +1 -0
  278. package/dist/rules/action-route-permissions.js +556 -0
  279. package/dist/rules/action-route-permissions.js.map +1 -0
  280. package/dist/rules/bundle-pairing.d.ts +74 -0
  281. package/dist/rules/bundle-pairing.d.ts.map +1 -0
  282. package/dist/rules/bundle-pairing.js +281 -0
  283. package/dist/rules/bundle-pairing.js.map +1 -0
  284. package/dist/rules/channel-resolution.d.ts +17 -0
  285. package/dist/rules/channel-resolution.d.ts.map +1 -0
  286. package/dist/rules/channel-resolution.js +382 -0
  287. package/dist/rules/channel-resolution.js.map +1 -0
  288. package/dist/rules/command-coverage.d.ts +210 -0
  289. package/dist/rules/command-coverage.d.ts.map +1 -0
  290. package/dist/rules/command-coverage.js +714 -0
  291. package/dist/rules/command-coverage.js.map +1 -0
  292. package/dist/rules/container-imports.d.ts +60 -0
  293. package/dist/rules/container-imports.d.ts.map +1 -0
  294. package/dist/rules/container-imports.js +158 -0
  295. package/dist/rules/container-imports.js.map +1 -0
  296. package/dist/rules/default-language-prose.d.ts +212 -0
  297. package/dist/rules/default-language-prose.d.ts.map +1 -0
  298. package/dist/rules/default-language-prose.js +710 -0
  299. package/dist/rules/default-language-prose.js.map +1 -0
  300. package/dist/rules/diacritic-folds.d.ts +238 -0
  301. package/dist/rules/diacritic-folds.d.ts.map +1 -0
  302. package/dist/rules/diacritic-folds.js +681 -0
  303. package/dist/rules/diacritic-folds.js.map +1 -0
  304. package/dist/rules/entity-tenant-classification.d.ts +171 -0
  305. package/dist/rules/entity-tenant-classification.d.ts.map +1 -0
  306. package/dist/rules/entity-tenant-classification.js +323 -0
  307. package/dist/rules/entity-tenant-classification.js.map +1 -0
  308. package/dist/rules/entry-presence.d.ts +142 -0
  309. package/dist/rules/entry-presence.d.ts.map +1 -0
  310. package/dist/rules/entry-presence.js +339 -0
  311. package/dist/rules/entry-presence.js.map +1 -0
  312. package/dist/rules/entry-scope.d.ts +91 -0
  313. package/dist/rules/entry-scope.d.ts.map +1 -0
  314. package/dist/rules/entry-scope.js +404 -0
  315. package/dist/rules/entry-scope.js.map +1 -0
  316. package/dist/rules/env-inputs.d.ts +222 -0
  317. package/dist/rules/env-inputs.d.ts.map +1 -0
  318. package/dist/rules/env-inputs.js +951 -0
  319. package/dist/rules/env-inputs.js.map +1 -0
  320. package/dist/rules/kernel-boundary.d.ts +37 -0
  321. package/dist/rules/kernel-boundary.d.ts.map +1 -0
  322. package/dist/rules/kernel-boundary.js +195 -0
  323. package/dist/rules/kernel-boundary.js.map +1 -0
  324. package/dist/rules/nul-bytes.d.ts +233 -0
  325. package/dist/rules/nul-bytes.d.ts.map +1 -0
  326. package/dist/rules/nul-bytes.js +332 -0
  327. package/dist/rules/nul-bytes.js.map +1 -0
  328. package/dist/rules/platform-surface.d.ts +479 -0
  329. package/dist/rules/platform-surface.d.ts.map +1 -0
  330. package/dist/rules/platform-surface.js +749 -0
  331. package/dist/rules/platform-surface.js.map +1 -0
  332. package/dist/rules/port-catches.d.ts +225 -0
  333. package/dist/rules/port-catches.d.ts.map +1 -0
  334. package/dist/rules/port-catches.js +1374 -0
  335. package/dist/rules/port-catches.js.map +1 -0
  336. package/dist/rules/port-shape.d.ts +213 -0
  337. package/dist/rules/port-shape.d.ts.map +1 -0
  338. package/dist/rules/port-shape.js +670 -0
  339. package/dist/rules/port-shape.js.map +1 -0
  340. package/dist/rules/queue-names.d.ts +108 -0
  341. package/dist/rules/queue-names.d.ts.map +1 -0
  342. package/dist/rules/queue-names.js +395 -0
  343. package/dist/rules/queue-names.js.map +1 -0
  344. package/dist/rules/singleton-identity.d.ts +205 -0
  345. package/dist/rules/singleton-identity.d.ts.map +1 -0
  346. package/dist/rules/singleton-identity.js +830 -0
  347. package/dist/rules/singleton-identity.js.map +1 -0
  348. package/dist/rules/subscribe-seam.d.ts +121 -0
  349. package/dist/rules/subscribe-seam.d.ts.map +1 -0
  350. package/dist/rules/subscribe-seam.js +594 -0
  351. package/dist/rules/subscribe-seam.js.map +1 -0
  352. package/dist/rules/transaction-context.d.ts +40 -0
  353. package/dist/rules/transaction-context.d.ts.map +1 -0
  354. package/dist/rules/transaction-context.js +294 -0
  355. package/dist/rules/transaction-context.js.map +1 -0
  356. package/package.json +59 -0
@@ -0,0 +1,305 @@
1
+ import type { DivergenceReport } from '@endora-commerce/contracts';
2
+ import { type DivergenceInput, type DivergenceResult, type OverlaySource } from './divergence.js';
3
+ import type { ModulePackage } from './module-packages.js';
4
+ /**
5
+ * What each rung costs, in the words a reader who has never seen this repository
6
+ * needs (SC-001).
7
+ *
8
+ * The human rendering spells the **cost** rather than the number, because a
9
+ * number is only meaningful to somebody who has the ladder open beside them —
10
+ * and the reader this artefact exists for is a client's developer who has not.
11
+ * The full ladder is `docs/docs/architecture/customisation-ladder.md`; these are
12
+ * its one-line summaries and they are kept in step by
13
+ * `test/unit/overlay/divergence-render.test.ts`.
14
+ */
15
+ export declare const RUNG_COSTS: Readonly<Record<number, string>>;
16
+ /**
17
+ * The "do not edit" headers this repository's own generator writes.
18
+ *
19
+ * Parameters rather than literals, on `admin-artefacts.ts`' and
20
+ * `docs-artefacts.ts`' precedent: the two hosts tell a reader different things
21
+ * to run, and an artefact naming the wrong one would send a client to a script
22
+ * their tree does not have. The default is this repository's, so its committed
23
+ * artefacts are byte-identical across the move and a host that means the other
24
+ * one says so.
25
+ */
26
+ export declare const COMPOSER_DIVERGENCE_MODULE_HEADER: string;
27
+ /** The same, for the human rendering, whose comment syntax is HTML's. */
28
+ export declare const COMPOSER_DIVERGENCE_MARKDOWN_HEADER: string[];
29
+ /**
30
+ * Emit the report as a committed, typed TS module (mirrors
31
+ * `manifest-index.generated.ts`).
32
+ *
33
+ * `typesImportSpecifier` is the module-resolvable path from the emitted file's
34
+ * directory to `src/overlay/types.js` — it differs between the core output
35
+ * (`./types.js`) and a deployment output (`../../overlay/types.js`), so the
36
+ * caller computes and passes it.
37
+ */
38
+ export declare function serializeDivergenceModule(report: DivergenceReport, typesImportSpecifier: string, header?: string): string;
39
+ /** Stable JSON serialization, for a caller that wants the shape and no module. */
40
+ export declare function serializeDivergenceJson(report: DivergenceReport): string;
41
+ /**
42
+ * The human rendering — D-30's own word for this artefact is *report*.
43
+ *
44
+ * Three rules, all of them SC-001's: no key strings (a reader is not looking
45
+ * anything up), no repository-relative paths (the reader's tree is not this
46
+ * one), and the rung's **cost** spelled out rather than its number.
47
+ */
48
+ export declare function renderDivergenceMarkdown(report: DivergenceReport, header?: readonly string[]): string;
49
+ /**
50
+ * Every TypeScript or emitted-JavaScript source under a root, recursively.
51
+ *
52
+ * One walk rather than one per host, because the two hosts read two *different
53
+ * dialects of the same tree* — this repository's modules are sources and an
54
+ * instance's are the `dist` those sources compile to — and the analysis is the
55
+ * compiler API either way (`registeredNames` and `routeIdentities` both parse
56
+ * with `ts.createSourceFile`, which reads emitted JavaScript as readily as it
57
+ * reads TypeScript). Measured on `packages/modules/blog`: the six container
58
+ * names and the twenty-nine route identities its sources yield are the same six
59
+ * and the same twenty-nine its `dist/backend` yields.
60
+ *
61
+ * `.d.ts` is excluded here and asked for separately by {@link seamsFromKernel},
62
+ * which is the one input whose instance answer is a declaration file.
63
+ */
64
+ export declare function walkAnalysableSources(root: string, out?: string[]): string[];
65
+ /**
66
+ * A deployment's own overlay sources, attributed to the overlay module that
67
+ * owns them.
68
+ *
69
+ * `base` is the root the reported path is relative to — this repository's root
70
+ * here, the instance's root there — so an entry names a path in the reader's own
71
+ * tree and never in ours (SC-001's second rule).
72
+ */
73
+ export declare function overlaySourcesUnder(overlayRoot: string | null, moduleIds: readonly string[], base: string): OverlaySource[];
74
+ /**
75
+ * Everything one run needs that does not change between deployments.
76
+ *
77
+ * Four facts, and the whole of what the two hosts differ about is **how each is
78
+ * assembled** — never what it is. `contracts/divergence-report.md` §3.2's
79
+ * *"it is not recomputed here"* is the same instruction one host over.
80
+ */
81
+ export interface DivergenceEnvironment {
82
+ /** Container name → the module that registers it. */
83
+ readonly owners: ReadonlyMap<string, string>;
84
+ /** Names a composition root supplies, which no module owns. */
85
+ readonly rootSupplied: ReadonlySet<string>;
86
+ /** Every `"<METHOD> <path>"` the composition serves, and who owns it. */
87
+ readonly routes: ReadonlyMap<string, string | null>;
88
+ /** `ModuleContext`'s own members. */
89
+ readonly seams: readonly string[];
90
+ /** Files this assembly opened — half of the run's `files`. */
91
+ readonly filesRead: number;
92
+ }
93
+ /** One rendering a host asks for: where it goes and in which dialect. */
94
+ export type DivergenceRenderingSpec = {
95
+ readonly rendering: 'module';
96
+ readonly outputPath: string;
97
+ /** The module-resolvable specifier the emitted file imports `DivergenceReport` from. */
98
+ readonly typesImportSpecifier: string;
99
+ readonly header?: string;
100
+ readonly label: string;
101
+ } | {
102
+ readonly rendering: 'markdown';
103
+ readonly outputPath: string;
104
+ readonly header?: readonly string[];
105
+ readonly label: string;
106
+ } | {
107
+ readonly rendering: 'json';
108
+ readonly outputPath: string;
109
+ readonly label: string;
110
+ };
111
+ /** One rendering, rendered. */
112
+ export interface DivergenceRendering {
113
+ readonly outputPath: string;
114
+ readonly content: string;
115
+ /** The label `overlay:check` and `endora generate` print. */
116
+ readonly label: string;
117
+ }
118
+ export interface RenderedDivergenceArtefacts {
119
+ readonly result: DivergenceResult;
120
+ readonly renderings: readonly DivergenceRendering[];
121
+ }
122
+ /**
123
+ * One derivation, N renderings (`data-model.md` §3).
124
+ *
125
+ * The loop is here rather than in either host for the reason the file header
126
+ * gives: a second derivation for a second rendering is two answers to one
127
+ * question waiting to disagree, and the moment there were three renderings
128
+ * across two hosts that stopped being hypothetical.
129
+ */
130
+ export declare function renderDivergenceArtefacts(input: DivergenceInput, specs: readonly DivergenceRenderingSpec[]): RenderedDivergenceArtefacts;
131
+ /**
132
+ * Does the overlay tree **spell** a seam call at all?
133
+ *
134
+ * A second author for the "no seam call of any kind read" refusal
135
+ * (`divergence-report.md` §5, refusal 3), and the reason it is a text probe
136
+ * rather than a second walk: what has to be caught is the *syntax walk* going
137
+ * blind, and a second syntax walk would go blind with it. With two overlay
138
+ * modules in this repository, a resolver that stopped recognising
139
+ * `ctx.di.decorate` prints a clean report over a tree full of decorations, and
140
+ * `sites=0` is indistinguishable from a deployment that only registers routes —
141
+ * which is a legal thing for an overlay module to do. This tells the two apart.
142
+ */
143
+ export declare function overlayTreeSpellsASeamCall(sources: readonly OverlaySource[]): boolean;
144
+ /**
145
+ * What an instance's report cannot derive, each with a reason (FR-018).
146
+ *
147
+ * **Every one of the nine kinds is derived in an instance exactly as it is
148
+ * here**, because the population of all nine is the deployment's own overlay
149
+ * tree — `apps/<deployment>/modules/**` — which is the client's own source and
150
+ * is read by the same walk. What differs is **attribution**, in one place, and
151
+ * that one place is written down here rather than left to be discovered by a
152
+ * client reading a report with a silent hole in it.
153
+ *
154
+ * `HOST_REGISTERED_PORTS` is the bridging table `check:port-dependencies`
155
+ * carries: names this repository's composition roots register *on an unconverted
156
+ * module's behalf*, each with its own retiring condition. It is a judgement about
157
+ * this repository's roots and nothing derives it, so it has no instance
158
+ * equivalent — in an instance those names are registered by `composeApp` inside
159
+ * `@endora-commerce/platform`, the walk finds them there, and they come out as
160
+ * root-supplied. That answer is *true of the instance*; it is simply less
161
+ * specific than ours, and a client who did not know that would read `a
162
+ * composition root (no module owns it)` and conclude nothing owns it.
163
+ */
164
+ export declare const INSTANCE_BOUNDARY_NOTES: ReadonlyArray<{
165
+ readonly seam: string;
166
+ readonly why: string;
167
+ }>;
168
+ /** One installed package this run could not read, named rather than skipped. */
169
+ export interface UnreadableCompositionInput {
170
+ readonly packageName: string;
171
+ readonly at: string;
172
+ readonly reason: string;
173
+ }
174
+ export interface InstanceCompositionScan {
175
+ readonly environment: DivergenceEnvironment;
176
+ readonly unreadable: readonly UnreadableCompositionInput[];
177
+ /** Module packages that contributed at least one analysable file. */
178
+ readonly covered: number;
179
+ /** Module packages that publish a `./backend` subpath at all. */
180
+ readonly expected: number;
181
+ }
182
+ /**
183
+ * `ModuleContext`'s members, out of whatever file beside the platform's
184
+ * `./kernel` entry point declares the interface.
185
+ *
186
+ * A **search** rather than a spelled path, and deliberately: the entry point is
187
+ * a barrel and re-exports the interface rather than declaring it, so the
188
+ * declaration is in a sibling — and which sibling is the platform's own business
189
+ * and its build layout's, neither of which this file may assert (D-100). The
190
+ * interface *name* is the one thing that is contract here, and it is already
191
+ * spelled exactly once, in `moduleContextSeams`.
192
+ */
193
+ export declare function seamsFromKernel(kernelEntry: string): readonly string[];
194
+ /**
195
+ * The composition an instance runs, read out of what it installed.
196
+ *
197
+ * Three of the four facts come from the same two walks: each module package's
198
+ * published `./backend` layer, and the platform's own. The fourth —
199
+ * `ModuleContext`'s members — comes from the platform's shipped kernel
200
+ * declarations, which yield byte-identically what this repository's source does
201
+ * (measured: the same sixteen members, in the same order).
202
+ *
203
+ * A package that publishes no `./backend` subpath is an admin- or
204
+ * storefront-only module: it registers nothing and serves nothing, so it is
205
+ * *readable and empty* rather than unreadable, exactly as
206
+ * `package-declarations.ts` classifies the same state. A package that publishes
207
+ * one whose target the walk cannot open is **named**, because an unread package
208
+ * is a package whose registrations are in no owner map and every decoration of
209
+ * one of its names would read `unowned-subject` — a finding about the run
210
+ * dressed as a finding about the tree.
211
+ */
212
+ export declare function instanceComposition(input: {
213
+ readonly packages: readonly ModulePackage[];
214
+ /** The installed platform, or `null` when it does not resolve. */
215
+ readonly platform: {
216
+ readonly dir: string;
217
+ readonly exports: ReadonlyMap<string, string>;
218
+ } | null;
219
+ }): InstanceCompositionScan;
220
+ /**
221
+ * The scan's environment, with the **deployment's own** overlay registrations
222
+ * merged into the owner map (`specs/124-instance-customisation-gap/` FR-005,
223
+ * FR-006, FR-007).
224
+ *
225
+ * ## Why it is a second step rather than a fourth input to `instanceComposition`
226
+ *
227
+ * That function is documented as *"everything one run needs that does not change
228
+ * between deployments"*, and the overlay claim set is **per deployment** — a
229
+ * report is rendered once per directory under `apps/`. The package half is where
230
+ * the scan's cost is (one platform walk plus one per installed package, against
231
+ * one small overlay tree), so hoisting it and merging here is the shape that
232
+ * repairs the defect without making the expensive half run once per deployment.
233
+ *
234
+ * ## Why it is a conformance repair and not a widening
235
+ *
236
+ * `contracts/divergence-report.md` §3.2 specifies the owner map as *"module
237
+ * sources plus each installed package's `./backend` artefact"*, and this
238
+ * repository's own host already obeys it: `moduleWalkRoots` contains
239
+ * `overlayRoot`. The instance host was the one out of conformance — it built
240
+ * `owners` from installed packages and `rootSupplied` from the platform walk,
241
+ * and the client's own overlay tree was in neither. Measured by A8 of the
242
+ * instance acceptance criterion: one rendering listing
243
+ * `registration:<overlay>:<name>` and reporting `unowned-subject` for `<name>`,
244
+ * whose remedy sentence — *"Composition throws for it at boot"* — was untrue of
245
+ * a tree that had just booted.
246
+ *
247
+ * ## The claim is keyed from `OverlaySource.moduleId`, never from `moduleOf`
248
+ *
249
+ * FR-006, and it is not a preference: `moduleOf`'s overlay branch requires
250
+ * `/src/apps/` in the path and an instance's overlay root is
251
+ * `<root>/apps/<deployment>/modules/`, so a claim placed by path would attribute
252
+ * nothing at all here. `overlaySourcesUnder` already carries the id, from the
253
+ * directory the walk descended into.
254
+ *
255
+ * The precedence is `registration-owners.ts`': the deployment's own tree is the
256
+ * **tree** half and overwrites, an installed package claims only what nothing
257
+ * above claimed. That is the right way round — a name the client registers in
258
+ * their own overlay module is theirs — and it is the same rule this repository's
259
+ * host applies to its own `backend/src/apps/` sources.
260
+ */
261
+ export declare function withOverlayRegistrationOwners(environment: DivergenceEnvironment, sources: readonly OverlaySource[]): DivergenceEnvironment;
262
+ /** The refusal sentence, or `null` when every package this run needed was readable. */
263
+ export declare function unreadableCompositionReason(scan: InstanceCompositionScan): string | null;
264
+ /** The three fields a deployment declares (`deployment-declaration.md` §2). */
265
+ export interface DeclarationLiterals {
266
+ readonly omittedModules: ReadonlyArray<{
267
+ readonly moduleId: string;
268
+ readonly reason: string;
269
+ }>;
270
+ readonly decorationOrder: Readonly<Record<string, readonly string[]>>;
271
+ readonly reasons: Readonly<Record<string, string>>;
272
+ }
273
+ /** The empty declaration — what a deployment that has declared nothing says. */
274
+ export declare const EMPTY_DECLARATION: DeclarationLiterals;
275
+ export interface DeclarationReading {
276
+ readonly declaration: DeclarationLiterals;
277
+ /**
278
+ * Fields the analysis could not resolve to literals, each named.
279
+ *
280
+ * Never merged into "declares nothing": an absent declaration and one this run
281
+ * could not read are the same answer only if you let them be, and that is the
282
+ * exact silence `divergence-loader.ts`' own header records as having hidden a
283
+ * broken root derivation from every deployment in the tree.
284
+ */
285
+ readonly unresolved: readonly string[];
286
+ }
287
+ /**
288
+ * A deployment's declaration, out of the file's **source text**.
289
+ *
290
+ * The running platform `import()`s this file; this run may not, and the reason
291
+ * is not a preference. `endora` runs as compiled JavaScript under plain `node`,
292
+ * and an instance's `apps/<deployment>/divergence.ts` is TypeScript — there is
293
+ * no loader in the process that could evaluate it, and adding one would make a
294
+ * scaffolding tool evaluate a client's code in order to describe it. Reading the
295
+ * text is also what the rest of this analysis does: the whole derivation is
296
+ * *"every subject is read as a literal"* (§3.3), and the declaration is held to
297
+ * the same rule as the tree it describes.
298
+ *
299
+ * What that costs is stated rather than discovered: a declaration whose fields
300
+ * are computed — spread from another module, built in a loop — resolves to
301
+ * nothing and is **named** in {@link DeclarationReading.unresolved}, never
302
+ * silently read as empty.
303
+ */
304
+ export declare function readDivergenceDeclaration(source: string, file: string): DeclarationReading;
305
+ //# sourceMappingURL=divergence-artefacts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"divergence-artefacts.d.ts","sourceRoot":"","sources":["../../src/lib/divergence-artefacts.ts"],"names":[],"mappings":"AA0DA,OAAO,KAAK,EAAmC,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEpG,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAEnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAY1D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOvD,CAAC;AA6BF;;;;;;;;;GASG;AACH,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