@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,298 @@
1
+ import type { WorkspaceMember } from './workspace-packages.js';
2
+ /** The alias every admin file writes its own host imports through. */
3
+ export declare const ADMIN_SOURCE_ALIAS = "@/*";
4
+ /**
5
+ * The owner id of the admin application itself.
6
+ *
7
+ * Not a module, and it has to be spelled somewhere: since P1 of
8
+ * `specs/091-module-owned-admin-surfaces/` § *Phase 4* `check:module-boundary`
9
+ * attributes an admin **host** file to it, so a reach out of one has a consumer
10
+ * to be ledgered under.
11
+ *
12
+ * One spelling, **here**, and this is the moment that placement was for:
13
+ * `check:admin-registrations` — which attributed a route or a nav entry no
14
+ * module claimed to the same owner — and `ledgers/admin-registrations.ts`,
15
+ * where this constant used to live, were deleted by batch 16 when the drain
16
+ * emptied their population (SC-007, Phase 5 T5). The boundary ledger outlives
17
+ * them and goes on using this name unchanged.
18
+ */
19
+ export declare const ADMIN_HOST_OWNER = "host";
20
+ /**
21
+ * The generated admin contribution registry, by name.
22
+ *
23
+ * `generate-composer.ts` renders it into {@link AdminSurfaceLayout.sourceRoot},
24
+ * and `check:module-boundary` exempts it: a generated registry naming every
25
+ * contributing module package by a bare specifier is a composition root doing
26
+ * its job, exactly as `composition.generated.ts` is in the backend. Both derive
27
+ * the path from this constant and from the alias member, so neither can end up
28
+ * looking at a file the other has stopped writing.
29
+ */
30
+ export declare const ADMIN_REGISTRY_ARTEFACT = "modules.generated.ts";
31
+ /** Raised when the admin layout cannot be resolved; a caller turns it into exit 2. */
32
+ export declare class AdminLayoutUnresolvableError extends Error {
33
+ readonly name = "AdminLayoutUnresolvableError";
34
+ }
35
+ /** One admin route as `App.tsx` declares it. */
36
+ export interface AdminRouteDeclaration {
37
+ /** The `path` prop, exactly as written. */
38
+ readonly path: string;
39
+ /** The component the `element` prop renders, or `null` when it renders none. */
40
+ readonly component: string | null;
41
+ readonly line: number;
42
+ }
43
+ /** One sidebar entry as `AppShell.tsx`'s `NAV` declares it. */
44
+ export interface AdminNavDeclaration {
45
+ /** The `to` field. */
46
+ readonly to: string;
47
+ /** The `module` field — `null` where the entry is the application's own. */
48
+ readonly module: string | null;
49
+ readonly line: number;
50
+ }
51
+ /** Everything derived about the admin application's module surfaces. */
52
+ export interface AdminSurfaceLayout {
53
+ /** The workspace member declaring the `@/*` alias. */
54
+ readonly memberDir: string;
55
+ /**
56
+ * The directory that alias points at — `admin/src`.
57
+ *
58
+ * The **admin project's** source root, and since feature 110's T120 that is
59
+ * narrower than "where the admin's code is": the generated contribution
60
+ * registry lands here and the shell's screens do not. Use
61
+ * {@link AdminSurfaceLayout.hostRoots} for a walk of the admin's own sources.
62
+ */
63
+ readonly sourceRoot: string;
64
+ /**
65
+ * The source root holding the route table and the nav —
66
+ * `packages/admin-shell/src`, or {@link AdminSurfaceLayout.sourceRoot} on a
67
+ * tree where the alias member still holds them.
68
+ *
69
+ * Located by the pair of artefacts this layout is read out of rather than by
70
+ * a directory or a package name, so the extraction moved the derivation with
71
+ * the files instead of rewriting it (feature 110, T122).
72
+ */
73
+ readonly shellRoot: string;
74
+ /**
75
+ * Every source root the admin application owns — the alias member's and the
76
+ * shell's, deduplicated and sorted.
77
+ *
78
+ * This is the population for anything whose subject is *"the admin's own
79
+ * code"*: `check:module-boundary`'s {@link ADMIN_HOST_OWNER} walk,
80
+ * `check:admin-zones`' render and contribution walk, and `i18n:hardcoded`'s
81
+ * first root. One list, because two instruments deriving the same population
82
+ * twice are two answers waiting to disagree — which this repository has
83
+ * already watched happen to `i18n:hardcoded` and its own companion test
84
+ * (!1182).
85
+ *
86
+ * The shell is deliberately **not** an `endora: { type: 'admin-ui' }` member:
87
+ * that declaration's third population assumes no namespace in the file can be
88
+ * the file's own, which is true of a design-system package and false of the
89
+ * host — the dashboard's tiles gate on `catalog` and `orders` by name because
90
+ * mounting module surfaces is what the shell is for.
91
+ */
92
+ readonly hostRoots: readonly string[];
93
+ /**
94
+ * The directory holding the module surfaces — `admin/src/modules` — or
95
+ * `null` when the application has none left (feature 091, R16).
96
+ *
97
+ * **Zero module roots is a measurement; two is still blindness.** The
98
+ * predicate's two inputs are proved present before it is evaluated:
99
+ * {@link resolveAdminSurfaces} has already refused a missing or ambiguous
100
+ * alias member and an alias target that is not on disk, and the registered id
101
+ * set comes from a generated manifest index `requireModuleLayout` refuses a
102
+ * tree without. With both proved, *"no directory under the source root is
103
+ * named after a registered module"* is an answer three artefacts with three
104
+ * authors give together — the tsconfig alias, the manifest index and the
105
+ * filesystem — and it flips back by itself the day a module directory
106
+ * reappears, which is the property a written-down "drain complete" flag would
107
+ * not have.
108
+ *
109
+ * `null` rather than `''` so `tsc` forces every consumer to answer; every
110
+ * answer is the same trivial one, because nothing is under a directory that
111
+ * does not exist.
112
+ */
113
+ readonly moduleRoot: string | null;
114
+ /** The alias prefix a specifier is written with, including its slash: `@/`. */
115
+ readonly aliasPrefix: string;
116
+ /** Every directory under {@link moduleRoot}, sorted — empty where it is `null`. */
117
+ readonly directories: readonly string[];
118
+ /** Directory name → the module that owns it. Absent means host-owned. */
119
+ readonly moduleOfDirectory: ReadonlyMap<string, string>;
120
+ /** The routes `App.tsx` declares. */
121
+ readonly routes: readonly AdminRouteDeclaration[];
122
+ /** The nav entries `AppShell.tsx` declares. */
123
+ readonly nav: readonly AdminNavDeclaration[];
124
+ /** Component name → the module directory `App.tsx` imports it from. */
125
+ readonly componentDirectories: ReadonlyMap<string, string>;
126
+ /**
127
+ * The two hand-written registries this layout is read out of — `App.tsx` and
128
+ * `components/AppShell.tsx` under {@link AdminSurfaceLayout.shellRoot},
129
+ * absolute.
130
+ *
131
+ * Returned rather than left implicit because a consumer has to be able to
132
+ * exclude them **without spelling them a second time**. `App.tsx` imports one
133
+ * component per module screen, so a boundary ledger that counted them would
134
+ * record the feature's own subject as its debt, one entry per route, churning
135
+ * with every batch. They were the whole population of the deleted
136
+ * `check:admin-registrations` (`files=2`); what asserts them now is
137
+ * `admin/test/modules/host-admin-registrations.test.tsx` (R13a).
138
+ */
139
+ readonly registryFiles: readonly string[];
140
+ /**
141
+ * The generated contribution registry — {@link ADMIN_REGISTRY_ARTEFACT} under
142
+ * {@link sourceRoot}, absolute.
143
+ *
144
+ * Named whether or not it is on disk: the path is where the generator puts
145
+ * it, and a checkout that has not run `composer:generate` has no artefact and
146
+ * nothing to exclude.
147
+ */
148
+ readonly generatedRegistryFile: string;
149
+ }
150
+ /**
151
+ * The one workspace member whose tsconfig declares the source alias.
152
+ *
153
+ * Read out of `tsconfig.json` rather than out of a Vite config, because the
154
+ * tsconfig is the one both `tsc` and the bundler agree on and the one this
155
+ * repository's own `paths` discipline is already written against.
156
+ */
157
+ export declare function findAliasMember(members: readonly WorkspaceMember[], readText?: (path: string) => string | null): {
158
+ readonly member: WorkspaceMember;
159
+ readonly target: string;
160
+ };
161
+ /**
162
+ * The directory `"@/*"` maps to, as written in the tsconfig, or `null`.
163
+ *
164
+ * Parsed with the compiler's own JSONC reader, because a tsconfig in this
165
+ * repository carries comments and `JSON.parse` refuses one.
166
+ */
167
+ export declare function aliasTargetOf(tsconfigText: string): string | null;
168
+ /**
169
+ * Does this workspace hold an admin application at all?
170
+ *
171
+ * `true` when a member declares the source alias, which is the one declaration
172
+ * that says *"this repository has a frontend"* and needs neither the shell nor
173
+ * a registered-id set to answer. It is the discriminator between the two states
174
+ * a `null` {@link AdminSurfaceLayout} has run together since feature 091: a
175
+ * workspace with no frontend — every fixture in the tree, and the behaviour
176
+ * that shipped — and a frontend whose route table the walk has stopped finding,
177
+ * which is exit 2 (feature 110, T122).
178
+ *
179
+ * The second state is not hypothetical and is what T120 makes reachable: with
180
+ * `App.tsx` and the nav inside `@endora-commerce/admin-shell`, a checkout whose
181
+ * shell is not installed, not built, or renamed has a perfectly good alias
182
+ * member holding four files — and every admin population would come back empty
183
+ * with `violations=0` beside it.
184
+ */
185
+ export declare function adminApplicationPresent(members: readonly WorkspaceMember[], readText?: (path: string) => string | null): boolean;
186
+ /**
187
+ * The source root holding **both** the route table and the nav.
188
+ *
189
+ * Feature 110's T120 moved them out of the admin project into
190
+ * `@endora-commerce/admin-shell`, and T122's requirement is that the two checks
191
+ * reading them report the same findings before and after. So the subject is the
192
+ * **pair of artefacts** and never the directory: whichever member holds them is
193
+ * the shell, and on a tree where that is still the alias member the answer does
194
+ * not move at all.
195
+ *
196
+ * Zero is a refusal and not a `null`, unlike {@link findAdminModuleRoot}'s
197
+ * empty answer: an admin application with no route table is not a drained
198
+ * population, it is a walk that has stopped finding the file every attribution
199
+ * in this module is read out of. Two is a refusal for {@link findAliasMember}'s
200
+ * reason — picking one narrows every scan to it without saying so.
201
+ */
202
+ export declare function findAdminShellRoot(members: readonly WorkspaceMember[], readText?: (path: string) => string | null): string;
203
+ /**
204
+ * Every source root the admin application owns — the alias member's and the
205
+ * shell's — sorted, deduplicated.
206
+ *
207
+ * **Narrower than the layout, deliberately**, on {@link adminRegistryPathOf}'s
208
+ * reasoning: `i18n:hardcoded` needs the walk and needs nothing about module
209
+ * attribution, so it must not be made to depend on a registered-id set it has
210
+ * no other use for. One derivation, two entry points —
211
+ * {@link resolveAdminSurfaces} builds its `hostRoots` from this function.
212
+ */
213
+ export declare function adminHostRootsOf(members: readonly WorkspaceMember[], readText?: (path: string) => string | null): readonly string[];
214
+ /**
215
+ * The generated admin contribution registry's path, or `null` when this
216
+ * workspace has no admin application at all (feature 091, R13b).
217
+ *
218
+ * **Narrower than the layout, deliberately.** It needs the alias member and its
219
+ * target and nothing else — not `App.tsx`, not `components/AppShell.tsx`, not a
220
+ * module root — because two checks gate a population floor on this file's
221
+ * presence and *"the gate went true for a reason having nothing to do with the
222
+ * registry"* is the exact defect §7.5 measured. `resolveAdminSurfaces` builds
223
+ * {@link AdminSurfaceLayout.generatedRegistryFile} from this function, so there
224
+ * is one derivation with two entry points rather than two answers.
225
+ *
226
+ * `null` here is the honest absence: with no alias member there is no directory
227
+ * the artefact could be under, and a caller omits its token rather than
228
+ * printing `0/0`.
229
+ */
230
+ export declare function adminRegistryPathOf(members: readonly WorkspaceMember[], readText?: (path: string) => string | null): string | null;
231
+ /**
232
+ * The one directory under `sourceRoot` whose children are named after registered
233
+ * modules, or `null` when none is.
234
+ *
235
+ * The same predicate {@link applicationModuleRoots} applies in `backend/src`,
236
+ * minus its `manifest.ts` half: an admin surface directory has no manifest, so
237
+ * requiring one would find nothing.
238
+ *
239
+ * **Absence is a measurement, ambiguity is blindness** (feature 091, R16). Zero
240
+ * is `null`, because this feature exists to empty that directory and a refusal
241
+ * would send a reader to repair a finished tree; two is still a throw, because
242
+ * picking one narrows every walk to it without saying so.
243
+ *
244
+ * It takes the admin's **host roots** since feature 110's T122 — the admin
245
+ * project's and the shell's — because a module surface directory left in the
246
+ * application would move with `App.tsx` rather than stay behind it. A single
247
+ * root is still accepted, and means the same thing it meant.
248
+ */
249
+ export declare function findAdminModuleRoot(sourceRoots: readonly string[] | string, registered: ReadonlySet<string>): string | null;
250
+ /** `<Route path="…" element={<X … />} />` — every one `source` declares. */
251
+ export declare function adminRoutes(source: string, file?: string): AdminRouteDeclaration[];
252
+ /**
253
+ * `{ to: '…', …, module: '…' }` — every nav entry `source` declares.
254
+ *
255
+ * Read as object literals carrying both fields rather than as members of a
256
+ * constant named `NAV`, so a second nav array — a mobile strip, a settings
257
+ * sub-nav — is in the population by construction rather than by being added
258
+ * here.
259
+ */
260
+ export declare function adminNavEntries(source: string, file?: string): AdminNavDeclaration[];
261
+ /**
262
+ * Component name → the module directory `App.tsx` imports it from.
263
+ *
264
+ * Only specifiers landing inside the module root are recorded, so a host
265
+ * component is absent rather than attributed to a directory that is not a
266
+ * module's.
267
+ */
268
+ export declare function routeComponentDirectories(source: string, moduleRootSegment: string, file?: string): Map<string, string>;
269
+ /**
270
+ * Directory name → the module that owns it, for every directory under the
271
+ * module root.
272
+ *
273
+ * Two rules, in order, and the second is the one this function exists for:
274
+ *
275
+ * 1. a directory named after a registered module is that module's;
276
+ * 2. a directory whose component renders a route a nav entry attributes to a
277
+ * registered module is that module's.
278
+ *
279
+ * A directory neither rule claims is the admin application's own and is absent
280
+ * from the map. Rule 2's join is by route path — exact first, then the longest
281
+ * nav `to` the route sits under, because `/warehouses/new` is declared as a
282
+ * route and never as its own sidebar row.
283
+ */
284
+ export declare function adminModuleDirectories(input: {
285
+ readonly directories: readonly string[];
286
+ readonly registered: ReadonlySet<string>;
287
+ readonly routes: readonly AdminRouteDeclaration[];
288
+ readonly nav: readonly AdminNavDeclaration[];
289
+ readonly componentDirectories: ReadonlyMap<string, string>;
290
+ }): Map<string, string>;
291
+ /**
292
+ * The whole admin layout, resolved once.
293
+ *
294
+ * `registered` is the manifest index's own id list, handed in rather than read
295
+ * here, so the two derivations of "which modules exist" cannot disagree.
296
+ */
297
+ export declare function resolveAdminSurfaces(members: readonly WorkspaceMember[], registered: ReadonlySet<string>, readText?: (path: string) => string | null): AdminSurfaceLayout;
298
+ //# sourceMappingURL=admin-surfaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-surfaces.d.ts","sourceRoot":"","sources":["../../src/lib/admin-surfaces.ts"],"names":[],"mappings":"AAmFA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D,sEAAsE;AACtE,eAAO,MAAM,kBAAkB,QAAQ,CAAC;AAExC;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gBAAgB,SAAS,CAAC;AAEvC;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,yBAAyB,CAAC;AAE9D,sFAAsF;AACtF,qBAAa,4BAA6B,SAAQ,KAAK;IACrD,SAAkB,IAAI,kCAAkC;CACzD;AAKD,gDAAgD;AAChD,MAAM,WAAW,qBAAqB;IACpC,2CAA2C;IAC3C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,gFAAgF;IAChF,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;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