@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,136 @@
1
+ import { type EmitLayout } from './module-packages.js';
2
+ import { type WorkspaceFs, type WorkspaceMember } from './workspace-packages.js';
3
+ /** The subpath a package publishes its own `@source` declarations at (R1.1). */
4
+ export declare const TAILWIND_SOURCE_SUBPATH = "./tailwind.css";
5
+ /**
6
+ * The generated stylesheet the host imports, beside the admin contribution
7
+ * registry (R2.1/R2.5).
8
+ *
9
+ * It sits in the admin project's own source root — found through the `"@/*"`
10
+ * tsconfig alias, like every other admin derivation — so an instance's copy
11
+ * lands in the client's tree and this repository's lands in `admin/src/`. In an
12
+ * instance it is a **build input** rather than a committed file (R2.4): which
13
+ * packages were installed is a fact about the process. Here it is committed and
14
+ * held to `overlay:check`'s four verdicts, which is R7.6 — a shape we cannot
15
+ * adopt ourselves is one we may not ask a client for, and it is what makes our
16
+ * own admin build the instance's mechanism on every pipeline.
17
+ */
18
+ export declare const TAILWIND_REGISTRY_ARTEFACT = "tailwind.generated.css";
19
+ /** The file that subpath names, at the package root beside `package.json`. */
20
+ export declare const TAILWIND_SOURCE_FILE = "tailwind.css";
21
+ /**
22
+ * The subpath the admin's **design system** is published at — its custom-property
23
+ * vocabulary and its class vocabulary, in one file (R3.1/R3.4, and R4.3 + R4.4
24
+ * for the two kinds it carries).
25
+ *
26
+ * Which package publishes it is derived and never written down: it is the one
27
+ * every renderer already declares, which is `@endora-commerce/admin-kit` today
28
+ * and would be `@endora-commerce/admin-shell` if the kit family folded into it
29
+ * (owner ruling D-219). T126 published it from the shell, where 11 module
30
+ * packages would have rendered classes defined by a package they cannot name;
31
+ * T129 moved it.
32
+ *
33
+ * A *different kind of file* from the two around it, which is why it is a
34
+ * different subpath and not a second entry in either (R3.3). `./tailwind.css` is
35
+ * a source declaration whose order is irrelevant; `./styles.css` is finished
36
+ * bytes the host does not compile. This one is neither: the host compiles it,
37
+ * against the host's own `@theme`, and the order of its `@theme` and `:root`
38
+ * declarations is exactly what decides whether an instance's redeclaration wins.
39
+ *
40
+ * Unlike its neighbour it is **hand-written**, because there is nothing to
41
+ * derive a palette from — R1.4's argument for generating `./tailwind.css` is
42
+ * that a mistyped `@source` is silent, and a mistyped colour is not.
43
+ */
44
+ export declare const THEME_STYLESHEET_SUBPATH = "./theme.css";
45
+ /**
46
+ * The subpath a package publishes a **finished** stylesheet at (R4.2).
47
+ *
48
+ * A package declaring it is excluded from R1: the host imports its bytes and
49
+ * must not also scan it, which R4.4 measures as three unprefixed utilities
50
+ * emitted into the admin bundle for a component whose every class is prefixed.
51
+ */
52
+ export declare const PREBUILT_STYLESHEET_SUBPATH = "./styles.css";
53
+ /** One directory a package asks the host to scan, both spellings (R1.2). */
54
+ export interface TailwindScannableLayer {
55
+ /** Package-relative, POSIX: what the build emits — `dist/admin`, or `dist`. */
56
+ readonly emitted: string;
57
+ /** Package-relative, POSIX: the sources that emit it — `src/admin`, or `src`. */
58
+ readonly source: string;
59
+ }
60
+ /** A package that ships scannable UI, and the layers it declares. */
61
+ export interface TailwindScannablePackage {
62
+ readonly name: string;
63
+ /** Absolute package directory. */
64
+ readonly dir: string;
65
+ /** `true` when the package's own `endora` block declares it a module. */
66
+ readonly isModule: boolean;
67
+ /** Sorted, non-empty: a package with no layer is not in this population. */
68
+ readonly layers: readonly TailwindScannableLayer[];
69
+ }
70
+ /** Raised when a package's scannable layers cannot be derived. Never a guess. */
71
+ export declare class TailwindSourceError extends Error {
72
+ readonly name = "TailwindSourceError";
73
+ }
74
+ /** Does this member publish a finished stylesheet, and therefore owe no sources (R4.2)? */
75
+ export declare function shipsPrebuiltStylesheet(member: WorkspaceMember): boolean;
76
+ /** Does this member declare `./tailwind.css` — R2.1's predicate, read off the map? */
77
+ export declare function declaresTailwindSources(member: WorkspaceMember): boolean;
78
+ /** Immediate file names in a directory, or `[]` when it is absent. */
79
+ export type FileLister = (path: string) => readonly string[];
80
+ /**
81
+ * The layers a package asks the host to scan, given the source directories its
82
+ * inventory holds and the build layout it declares.
83
+ *
84
+ * Exported because the manifest generator has already read both — it renders
85
+ * every `exports` target through the same {@link EmitLayout} — and asking the
86
+ * filesystem a second time there would be a second answer to *"which layers
87
+ * does this package publish"*, in the one file whose whole job is that
88
+ * question.
89
+ */
90
+ export declare function scannableLayersFrom(sourceDirectories: readonly string[], emit: EmitLayout): readonly TailwindScannableLayer[];
91
+ /**
92
+ * The layers one member asks the host to scan, or `[]` when it ships no UI.
93
+ *
94
+ * @throws TailwindSourceError when a member that ships UI declares no build
95
+ * layout: the emitted half of every declaration is read out of
96
+ * `tsconfig.build.json`, and guessing `dist` would be the one spelling this
97
+ * whole mechanism exists to stop a host from writing (§4(b)).
98
+ */
99
+ export declare function scannableLayersOf(member: WorkspaceMember, fs: WorkspaceFs, listFiles: FileLister): readonly TailwindScannableLayer[];
100
+ /** The UI layers a module package's `src/` holds, in {@link UI_LAYER_DIRECTORIES} order. */
101
+ export declare function moduleUiSourceDirectories(packageDir: string, fs: WorkspaceFs): readonly string[];
102
+ /**
103
+ * Every workspace member that ships scannable UI, sorted by package name.
104
+ *
105
+ * The sort is the artefact's order (R2.1) and the guard's, so a package moving
106
+ * in the workspace globs does not reorder either.
107
+ *
108
+ * **The population is the library family, never an application.** The split is
109
+ * `classifyWorkspaceMembers`' — a glob workspace entry enumerates a family, a
110
+ * literal names one deployable — and it is the right one here for the reason
111
+ * R2.3 gives: an application's own sources are covered by Tailwind's automatic
112
+ * detection, rooted at the project it builds, so it neither needs nor could
113
+ * publish a `./tailwind.css`. It also publishes nothing at all, which is what
114
+ * makes an `exports` entry there meaningless.
115
+ */
116
+ export declare function tailwindScannablePackages(repoRoot: string, fs?: WorkspaceFs, listFiles?: FileLister): readonly TailwindScannablePackage[];
117
+ /** The real filesystem behind {@link FileLister}. Absence is `[]`, never a throw. */
118
+ export declare function nodeFileLister(): FileLister;
119
+ /**
120
+ * One package's `./tailwind.css`, rendered (R1.2).
121
+ *
122
+ * Two lines per layer, the emitted one first. The `src` line is inert in a
123
+ * published tarball, which ships no `src` — a missing `@source` directory is
124
+ * skipped rather than an error (M12) — and it is there so that this
125
+ * repository's own `pnpm --filter admin run dev` keeps scanning source and does
126
+ * not need a package rebuild to see a class, which is the one property the glob
127
+ * it replaces had.
128
+ *
129
+ * The file is generated rather than written by hand for the reason M12 states:
130
+ * a mistyped `@source` is silent, and the remedy for a silent path is that no
131
+ * human types it.
132
+ */
133
+ export declare function renderTailwindStylesheet(pkg: TailwindScannablePackage): string;
134
+ /** Where one package's stylesheet lands: the package root, beside `package.json`. */
135
+ export declare function tailwindStylesheetPathOf(pkg: TailwindScannablePackage): string;
136
+ //# sourceMappingURL=tailwind-sources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tailwind-sources.d.ts","sourceRoot":"","sources":["../../src/lib/tailwind-sources.ts"],"names":[],"mappings":"AAgEA,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,eAAe,EACrB,MAAM,yBAAyB,CAAC;AAGjC,gFAAgF;AAChF,eAAO,MAAM,uBAAuB,mBAAmB,CAAC;AAExD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,0BAA0B,2BAA2B,CAAC;AAEnE,8EAA8E;AAC9E,eAAO,MAAM,oBAAoB,iBAAiB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,wBAAwB,gBAAgB,CAAC;AAEtD;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,iBAAiB,CAAC;AAE1D,4EAA4E;AAC5E,MAAM,WAAW,sBAAsB;IACrC,+EAA+E;IAC/E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,iFAAiF;IACjF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,qEAAqE;AACrE,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,IA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AAE,wBAAwB,GAAG,MAAM,CAoB9E;AAED,qFAAqF;AACrF,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,wBAAwB,GAAG,MAAM,CAE9E"}
@@ -0,0 +1,307 @@
1
+ /**
2
+ * Which packages ship scannable UI, and what their own `./tailwind.css` says
3
+ * (`specs/110-instance-repository/contracts/admin-stylesheet-composition.md`,
4
+ * R1 and R2.2; FR-023).
5
+ *
6
+ * ## The defect, stated once
7
+ *
8
+ * `admin/src/index.css` reached every package's UI with
9
+ * `@source "../../packages/**"`. In this repository that is correct; in a
10
+ * client's instance it names a directory that is not there, because under D-207
11
+ * the shell and the module packages are **installed**. Tailwind emits no
12
+ * diagnostic for a source that matches nothing (§1, M12), so the instance's
13
+ * admin would build green and render every screen unstyled.
14
+ *
15
+ * The repair inverts the direction: a package names **its own** layers, in a
16
+ * stylesheet it publishes at `./tailwind.css`, and the host imports it by name.
17
+ * That converts the two silent failures into build errors — an undeclared
18
+ * subpath is `ERR_PACKAGE_PATH_NOT_EXPORTED` (M9) and a missing package is
19
+ * `Can't resolve` (M10) — and `@source` resolves relative to the stylesheet
20
+ * that declares it (M7), so the package needs to know nothing about where it
21
+ * was installed.
22
+ *
23
+ * ## Why this derivation is shared rather than repeated
24
+ *
25
+ * Three programs need one answer to *"does this package ship scannable UI, and
26
+ * where"*: `manifests:generate` renders the stylesheet and its `exports`/`files`
27
+ * entries (R1.4), `composer:generate` renders `admin/src/tailwind.generated.css`
28
+ * over the packages that declare the subpath (R2.1), and the guard
29
+ * (`backend/scripts/tailwind-source-scan.ts`) plants a probe in each directory and
30
+ * asserts the compiled stylesheet carries it (T125). Two derivations of one
31
+ * population are two answers waiting to disagree, and the disagreement here is
32
+ * invisible: the stylesheet would name a directory the guard never probes, or
33
+ * the guard would probe a directory nothing declares.
34
+ *
35
+ * ## What decides the population, and what does not
36
+ *
37
+ * Nothing here names a package. R4.3 asks *"do this package's components take
38
+ * the host's design tokens?"*, and the answer a program can read is the subpath
39
+ * the package **declares**: a package that publishes a finished stylesheet at
40
+ * `./styles.css` compiled its own CSS and the host imports the bytes (R4.2), so
41
+ * it is excluded — that is the whole of `cms-components`' exclusion, derived
42
+ * rather than written down (D-100).
43
+ *
44
+ * Beyond that exclusion there are two shapes of scannable package and the
45
+ * package's own `endora` block says which:
46
+ *
47
+ * * a **module package** ships UI in its declared UI layers, and only there
48
+ * (R1.2) — `src/admin/` and `src/admin-ui/`, the same inventory that decides
49
+ * whether it declares `./admin`;
50
+ * * a **library family member** whose whole build is UI (R1.3) declares its
51
+ * whole `src` and its whole emit directory, because it has no layer
52
+ * structure to narrow to.
53
+ *
54
+ * A family member ships scannable UI iff it ships a `.tsx` source: that is a
55
+ * fact about what is in the package rather than a name, and it fails in the safe
56
+ * direction — a package that grows a React component grows its declaration in
57
+ * the same regeneration. Reading `react` out of `peerDependencies` would answer
58
+ * the same for this tree and would be a **generated** manifest field answering a
59
+ * question that decides another generated field, which is a derivation reading
60
+ * its own output.
61
+ */
62
+ import { readdirSync } from 'node:fs';
63
+ import { join } from 'node:path';
64
+ import { readEmitLayout } from './module-packages.js';
65
+ import { classifyWorkspaceMembers, nodeWorkspaceFs, } from './workspace-packages.js';
66
+ import { UI_LAYER_DIRECTORIES } from './ui-layer.js';
67
+ /** The subpath a package publishes its own `@source` declarations at (R1.1). */
68
+ export const TAILWIND_SOURCE_SUBPATH = './tailwind.css';
69
+ /**
70
+ * The generated stylesheet the host imports, beside the admin contribution
71
+ * registry (R2.1/R2.5).
72
+ *
73
+ * It sits in the admin project's own source root — found through the `"@/*"`
74
+ * tsconfig alias, like every other admin derivation — so an instance's copy
75
+ * lands in the client's tree and this repository's lands in `admin/src/`. In an
76
+ * instance it is a **build input** rather than a committed file (R2.4): which
77
+ * packages were installed is a fact about the process. Here it is committed and
78
+ * held to `overlay:check`'s four verdicts, which is R7.6 — a shape we cannot
79
+ * adopt ourselves is one we may not ask a client for, and it is what makes our
80
+ * own admin build the instance's mechanism on every pipeline.
81
+ */
82
+ export const TAILWIND_REGISTRY_ARTEFACT = 'tailwind.generated.css';
83
+ /** The file that subpath names, at the package root beside `package.json`. */
84
+ export const TAILWIND_SOURCE_FILE = 'tailwind.css';
85
+ /**
86
+ * The subpath the admin's **design system** is published at — its custom-property
87
+ * vocabulary and its class vocabulary, in one file (R3.1/R3.4, and R4.3 + R4.4
88
+ * for the two kinds it carries).
89
+ *
90
+ * Which package publishes it is derived and never written down: it is the one
91
+ * every renderer already declares, which is `@endora-commerce/admin-kit` today
92
+ * and would be `@endora-commerce/admin-shell` if the kit family folded into it
93
+ * (owner ruling D-219). T126 published it from the shell, where 11 module
94
+ * packages would have rendered classes defined by a package they cannot name;
95
+ * T129 moved it.
96
+ *
97
+ * A *different kind of file* from the two around it, which is why it is a
98
+ * different subpath and not a second entry in either (R3.3). `./tailwind.css` is
99
+ * a source declaration whose order is irrelevant; `./styles.css` is finished
100
+ * bytes the host does not compile. This one is neither: the host compiles it,
101
+ * against the host's own `@theme`, and the order of its `@theme` and `:root`
102
+ * declarations is exactly what decides whether an instance's redeclaration wins.
103
+ *
104
+ * Unlike its neighbour it is **hand-written**, because there is nothing to
105
+ * derive a palette from — R1.4's argument for generating `./tailwind.css` is
106
+ * that a mistyped `@source` is silent, and a mistyped colour is not.
107
+ */
108
+ export const THEME_STYLESHEET_SUBPATH = './theme.css';
109
+ /**
110
+ * The subpath a package publishes a **finished** stylesheet at (R4.2).
111
+ *
112
+ * A package declaring it is excluded from R1: the host imports its bytes and
113
+ * must not also scan it, which R4.4 measures as three unprefixed utilities
114
+ * emitted into the admin bundle for a component whose every class is prefixed.
115
+ */
116
+ export const PREBUILT_STYLESHEET_SUBPATH = './styles.css';
117
+ /** Raised when a package's scannable layers cannot be derived. Never a guess. */
118
+ export class TailwindSourceError extends Error {
119
+ name = 'TailwindSourceError';
120
+ }
121
+ /** Does this member's own `endora` block declare it a module package? */
122
+ function declaresModule(member) {
123
+ const endora = member.manifest['endora'];
124
+ if (typeof endora !== 'object' || endora === null || Array.isArray(endora))
125
+ return false;
126
+ return endora['type'] === 'module';
127
+ }
128
+ /** The `exports` map a member declares, as a plain record. */
129
+ function exportsOf(member) {
130
+ const declared = member.manifest['exports'];
131
+ if (typeof declared !== 'object' || declared === null || Array.isArray(declared))
132
+ return {};
133
+ return declared;
134
+ }
135
+ /** Does this member publish a finished stylesheet, and therefore owe no sources (R4.2)? */
136
+ export function shipsPrebuiltStylesheet(member) {
137
+ return exportsOf(member)[PREBUILT_STYLESHEET_SUBPATH] !== undefined;
138
+ }
139
+ /** Does this member declare `./tailwind.css` — R2.1's predicate, read off the map? */
140
+ export function declaresTailwindSources(member) {
141
+ return exportsOf(member)[TAILWIND_SOURCE_SUBPATH] !== undefined;
142
+ }
143
+ /**
144
+ * `src/admin` → `dist/admin`, and `src` → `dist`, through the package's own
145
+ * build declaration.
146
+ *
147
+ * The whole-root case is the one worth naming: `tsc` emits a file at
148
+ * `rootDir/x` to `outDir/x`, so the *root itself* maps to `outDir` and not to
149
+ * `outDir/rootDir`. Getting it wrong is silent in the direction this whole
150
+ * contract is about — `@source "./dist/src"` names a directory that is not
151
+ * there, which Tailwind skips without a word (M12).
152
+ */
153
+ function emittedDirectoryOf(emit, sourceDirectory) {
154
+ const prefix = emit.rootDir === '' ? '' : `${emit.rootDir}/`;
155
+ const within = sourceDirectory === emit.rootDir
156
+ ? ''
157
+ : sourceDirectory.startsWith(prefix)
158
+ ? sourceDirectory.slice(prefix.length)
159
+ : sourceDirectory;
160
+ if (within === '')
161
+ return emit.outDir === '' ? '.' : emit.outDir;
162
+ return emit.outDir === '' ? within : `${emit.outDir}/${within}`;
163
+ }
164
+ /** Does a directory hold a `.tsx` file, at any depth? */
165
+ function holdsComponent(directory, fs, listFiles) {
166
+ if (listFiles(directory).some((name) => name.endsWith('.tsx')))
167
+ return true;
168
+ return fs
169
+ .listDirectories(directory)
170
+ .some((name) => holdsComponent(join(directory, name), fs, listFiles));
171
+ }
172
+ /**
173
+ * The layers a package asks the host to scan, given the source directories its
174
+ * inventory holds and the build layout it declares.
175
+ *
176
+ * Exported because the manifest generator has already read both — it renders
177
+ * every `exports` target through the same {@link EmitLayout} — and asking the
178
+ * filesystem a second time there would be a second answer to *"which layers
179
+ * does this package publish"*, in the one file whose whole job is that
180
+ * question.
181
+ */
182
+ export function scannableLayersFrom(sourceDirectories, emit) {
183
+ return sourceDirectories.map((source) => ({
184
+ emitted: emittedDirectoryOf(emit, source),
185
+ source,
186
+ }));
187
+ }
188
+ /**
189
+ * The layers one member asks the host to scan, or `[]` when it ships no UI.
190
+ *
191
+ * @throws TailwindSourceError when a member that ships UI declares no build
192
+ * layout: the emitted half of every declaration is read out of
193
+ * `tsconfig.build.json`, and guessing `dist` would be the one spelling this
194
+ * whole mechanism exists to stop a host from writing (§4(b)).
195
+ */
196
+ export function scannableLayersOf(member, fs, listFiles) {
197
+ // R4.2, and it is asked first: a package that publishes finished CSS owes no
198
+ // source declaration whatever else it ships.
199
+ if (shipsPrebuiltStylesheet(member))
200
+ return [];
201
+ const sourceDirectories = declaresModule(member)
202
+ ? moduleUiSourceDirectories(member.dir, fs)
203
+ : holdsComponent(join(member.dir, 'src'), fs, listFiles)
204
+ ? ['src']
205
+ : [];
206
+ if (sourceDirectories.length === 0)
207
+ return [];
208
+ const emit = readEmitLayout(member.dir, member.name, fs);
209
+ if (emit === null) {
210
+ throw new TailwindSourceError(`${member.name} ships scannable UI (${sourceDirectories.join(', ')}) and declares no ` +
211
+ `tsconfig.build.json. Its \`@source\` lines name what the build emits, and where a ` +
212
+ `build puts its output is not something this derivation may assume — writing 'dist' ` +
213
+ `here would be the host naming a directory inside a package, which is exactly the ` +
214
+ `silent failure (M12) R1 exists to remove.`);
215
+ }
216
+ return scannableLayersFrom(sourceDirectories, emit);
217
+ }
218
+ /** The UI layers a module package's `src/` holds, in {@link UI_LAYER_DIRECTORIES} order. */
219
+ export function moduleUiSourceDirectories(packageDir, fs) {
220
+ const present = fs.listDirectories(join(packageDir, 'src'));
221
+ return UI_LAYER_DIRECTORIES.filter((layer) => present.includes(layer)).map((layer) => `src/${layer}`);
222
+ }
223
+ /**
224
+ * Every workspace member that ships scannable UI, sorted by package name.
225
+ *
226
+ * The sort is the artefact's order (R2.1) and the guard's, so a package moving
227
+ * in the workspace globs does not reorder either.
228
+ *
229
+ * **The population is the library family, never an application.** The split is
230
+ * `classifyWorkspaceMembers`' — a glob workspace entry enumerates a family, a
231
+ * literal names one deployable — and it is the right one here for the reason
232
+ * R2.3 gives: an application's own sources are covered by Tailwind's automatic
233
+ * detection, rooted at the project it builds, so it neither needs nor could
234
+ * publish a `./tailwind.css`. It also publishes nothing at all, which is what
235
+ * makes an `exports` entry there meaningless.
236
+ */
237
+ export function tailwindScannablePackages(repoRoot, fs = nodeWorkspaceFs(), listFiles = nodeFileLister()) {
238
+ const found = [];
239
+ for (const member of classifyWorkspaceMembers(repoRoot, fs).members) {
240
+ if (!member.family)
241
+ continue;
242
+ const layers = scannableLayersOf(member, fs, listFiles);
243
+ if (layers.length === 0)
244
+ continue;
245
+ found.push({
246
+ name: member.name,
247
+ dir: member.dir,
248
+ isModule: declaresModule(member),
249
+ layers,
250
+ });
251
+ }
252
+ return found.sort((left, right) => (left.name < right.name ? -1 : left.name > right.name ? 1 : 0));
253
+ }
254
+ /** The real filesystem behind {@link FileLister}. Absence is `[]`, never a throw. */
255
+ export function nodeFileLister() {
256
+ return (path) => {
257
+ try {
258
+ return readdirSync(path, { withFileTypes: true })
259
+ .filter((entry) => entry.isFile())
260
+ .map((entry) => entry.name)
261
+ .sort();
262
+ }
263
+ catch {
264
+ return [];
265
+ }
266
+ };
267
+ }
268
+ /**
269
+ * One package's `./tailwind.css`, rendered (R1.2).
270
+ *
271
+ * Two lines per layer, the emitted one first. The `src` line is inert in a
272
+ * published tarball, which ships no `src` — a missing `@source` directory is
273
+ * skipped rather than an error (M12) — and it is there so that this
274
+ * repository's own `pnpm --filter admin run dev` keeps scanning source and does
275
+ * not need a package rebuild to see a class, which is the one property the glob
276
+ * it replaces had.
277
+ *
278
+ * The file is generated rather than written by hand for the reason M12 states:
279
+ * a mistyped `@source` is silent, and the remedy for a silent path is that no
280
+ * human types it.
281
+ */
282
+ export function renderTailwindStylesheet(pkg) {
283
+ const lines = [
284
+ `/* ${pkg.name} — AUTO-GENERATED by \`pnpm --filter backend run manifests:generate\`.`,
285
+ ` *`,
286
+ ` * The \`@source\` directives this package asks its host to scan`,
287
+ ` * (\`specs/110-instance-repository/contracts/admin-stylesheet-composition.md\` R1).`,
288
+ ` * They resolve relative to **this file**, so they hold wherever the package is`,
289
+ ` * installed — a workspace link here, \`node_modules\` in a client's instance.`,
290
+ ` *`,
291
+ ` * The \`dist\` line is what a published tarball ships and is what an instance`,
292
+ ` * scans; the \`src\` line is inert there and is what keeps \`pnpm --filter admin`,
293
+ ` * run dev\` reading source in this repository. Do not edit: run`,
294
+ ` * \`pnpm --filter backend run manifests:generate\`.`,
295
+ ` */`,
296
+ ];
297
+ for (const layer of pkg.layers) {
298
+ lines.push(`@source "./${layer.emitted}";`);
299
+ lines.push(`@source "./${layer.source}";`);
300
+ }
301
+ return `${lines.join('\n')}\n`;
302
+ }
303
+ /** Where one package's stylesheet lands: the package root, beside `package.json`. */
304
+ export function tailwindStylesheetPathOf(pkg) {
305
+ return join(pkg.dir, TAILWIND_SOURCE_FILE);
306
+ }
307
+ //# sourceMappingURL=tailwind-sources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tailwind-sources.js","sourceRoot":"","sources":["../../src/lib/tailwind-sources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,cAAc,EAAmB,MAAM,sBAAsB,CAAC;AACvE,OAAO,EACL,wBAAwB,EACxB,eAAe,GAGhB,MAAM,y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AAC;AAC7C,CAAC"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * The one name of a module package's UI layer (feature 091).
3
+ *
4
+ * It has two readers that must not disagree, and they are on opposite sides of
5
+ * the build:
6
+ *
7
+ * * `lib/module-package-manifest.ts` renders `"./admin"` into a package's
8
+ * `exports` map and switches the package's `build` to a second `tsc`
9
+ * invocation when the directory is there;
10
+ * * `check-action-route-permissions.ts` **skips** the directory, because its
11
+ * subject is Fastify registrations and a screen's `api/*-client.ts` writes
12
+ * `apiClient.post(`${BASE}/custom-events`, body)` — a method, a path and no
13
+ * `preHandler`, which is indistinguishable from an ungated route at the
14
+ * syntax that check reads. The first module to move its admin directory into
15
+ * its package therefore made one of its own routes report as gated by
16
+ * nothing (feature 091, Phase 4).
17
+ *
18
+ * It lives in a file of its own rather than in the manifest generator because
19
+ * of *where* the second reader runs: `moved-module-tree.test.ts` spawns every
20
+ * check over a synthetic backend that holds `backend/` and not the repository
21
+ * root, and `module-package-manifest.ts` imports `scripts/lib/runtime-assets.mjs`
22
+ * from that root. Importing it for one string turns a check into one that
23
+ * cannot start in the fixture built to prove the check refuses a moved tree.
24
+ */
25
+ /** The layer that compiles under `tsconfig.ui.json` rather than the backend build. */
26
+ export declare const ADMIN_LAYER_DIRECTORY = "admin";
27
+ /**
28
+ * Every UI-layer directory a module package may ship — one declaration, the two
29
+ * readers above (feature 091, P4a; Z9 of `admin-component-contribution.md`).
30
+ *
31
+ * `admin-ui` is the sibling directory D-191's published-component exit lands
32
+ * in, and it has a name of its own below because a **third** reader needs it
33
+ * specifically rather than as one of the two: `module-package-manifest.ts`'
34
+ * R4 refusal has to tell a published component's subpath apart from `./admin`,
35
+ * which publishes a contribution *descriptor* no other module may name.
36
+ *
37
+ * It is a **sibling** and not a second entry file inside `src/admin/`, because
38
+ * `admin-contribution.md` R2 is *"`src/admin/index.ts` exports exactly one
39
+ * value"* and a second file in that directory turns the rule into a rule with a
40
+ * filename carve-out.
41
+ *
42
+ * The first two readers take the list rather than the single name, and the
43
+ * second of them is why
44
+ * this lands with the mechanism rather than with the first package that ships
45
+ * the directory: `check-action-route-permissions` skips a UI layer for a reason
46
+ * that is about **browser code**, not about `admin` in particular — a published
47
+ * component's `apiClient.post(path, body)` is a method, a path and no
48
+ * `preHandler`, which is indistinguishable from an ungated route at the syntax
49
+ * that check reads. A skip that arrives with the directory arrives one merge
50
+ * request after the false finding.
51
+ */
52
+ export declare const PUBLISHED_COMPONENT_LAYER_DIRECTORY = "admin-ui";
53
+ export declare const UI_LAYER_DIRECTORIES: readonly string[];
54
+ //# sourceMappingURL=ui-layer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-layer.d.ts","sourceRoot":"","sources":["../../src/lib/ui-layer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,sFAAsF;AACtF,eAAO,MAAM,qBAAqB,UAAU,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,mCAAmC,aAAa,CAAC;AAE9D,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAGjD,CAAC"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * The one name of a module package's UI layer (feature 091).
3
+ *
4
+ * It has two readers that must not disagree, and they are on opposite sides of
5
+ * the build:
6
+ *
7
+ * * `lib/module-package-manifest.ts` renders `"./admin"` into a package's
8
+ * `exports` map and switches the package's `build` to a second `tsc`
9
+ * invocation when the directory is there;
10
+ * * `check-action-route-permissions.ts` **skips** the directory, because its
11
+ * subject is Fastify registrations and a screen's `api/*-client.ts` writes
12
+ * `apiClient.post(`${BASE}/custom-events`, body)` — a method, a path and no
13
+ * `preHandler`, which is indistinguishable from an ungated route at the
14
+ * syntax that check reads. The first module to move its admin directory into
15
+ * its package therefore made one of its own routes report as gated by
16
+ * nothing (feature 091, Phase 4).
17
+ *
18
+ * It lives in a file of its own rather than in the manifest generator because
19
+ * of *where* the second reader runs: `moved-module-tree.test.ts` spawns every
20
+ * check over a synthetic backend that holds `backend/` and not the repository
21
+ * root, and `module-package-manifest.ts` imports `scripts/lib/runtime-assets.mjs`
22
+ * from that root. Importing it for one string turns a check into one that
23
+ * cannot start in the fixture built to prove the check refuses a moved tree.
24
+ */
25
+ /** The layer that compiles under `tsconfig.ui.json` rather than the backend build. */
26
+ export const ADMIN_LAYER_DIRECTORY = 'admin';
27
+ /**
28
+ * Every UI-layer directory a module package may ship — one declaration, the two
29
+ * readers above (feature 091, P4a; Z9 of `admin-component-contribution.md`).
30
+ *
31
+ * `admin-ui` is the sibling directory D-191's published-component exit lands
32
+ * in, and it has a name of its own below because a **third** reader needs it
33
+ * specifically rather than as one of the two: `module-package-manifest.ts`'
34
+ * R4 refusal has to tell a published component's subpath apart from `./admin`,
35
+ * which publishes a contribution *descriptor* no other module may name.
36
+ *
37
+ * It is a **sibling** and not a second entry file inside `src/admin/`, because
38
+ * `admin-contribution.md` R2 is *"`src/admin/index.ts` exports exactly one
39
+ * value"* and a second file in that directory turns the rule into a rule with a
40
+ * filename carve-out.
41
+ *
42
+ * The first two readers take the list rather than the single name, and the
43
+ * second of them is why
44
+ * this lands with the mechanism rather than with the first package that ships
45
+ * the directory: `check-action-route-permissions` skips a UI layer for a reason
46
+ * that is about **browser code**, not about `admin` in particular — a published
47
+ * component's `apiClient.post(path, body)` is a method, a path and no
48
+ * `preHandler`, which is indistinguishable from an ungated route at the syntax
49
+ * that check reads. A skip that arrives with the directory arrives one merge
50
+ * request after the false finding.
51
+ */
52
+ export const PUBLISHED_COMPONENT_LAYER_DIRECTORY = 'admin-ui';
53
+ export const UI_LAYER_DIRECTORIES = [
54
+ ADMIN_LAYER_DIRECTORY,
55
+ PUBLISHED_COMPONENT_LAYER_DIRECTORY,
56
+ ];
57
+ //# sourceMappingURL=ui-layer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-layer.js","sourceRoot":"","sources":["../../src/lib/ui-layer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,sFAAsF;AACtF,MAAM,CAAC,MAAM,qBAAqB,GAAG,OAAO,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,UAAU,CAAC;AAE9D,MAAM,CAAC,MAAM,oBAAoB,GAAsB;IACrD,qBAAqB;IACrB,mCAAmC;CACpC,CAAC"}