@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,290 @@
1
+ /**
2
+ * How a command acquires the values it was not given
3
+ * (`specs/117-instance-bring-up/contracts/input-resolution.md`, FR-010…FR-015).
4
+ *
5
+ * Four tiers, in one fixed order, stopping at the first that answers: an
6
+ * explicit **flag**, then a **`.env` already placed in the target directory**,
7
+ * then an interactive **prompt**, then a **refusal**. The order is contract and
8
+ * is not configurable (R1.1) — a precedence an operator can change is a value
9
+ * nobody can predict.
10
+ *
11
+ * ## `defaulted=0` is made unfakeable by arithmetic, not by discipline
12
+ *
13
+ * R2.2 binds the provenance line's `defaulted` count to `0`, and the temptation
14
+ * is to satisfy that with a counter nothing increments. That is the *fakeable*
15
+ * construction, and it is fakeable in the precise sense that matters: it prints
16
+ * `0` because no code path calls it, which is indistinguishable from printing
17
+ * `0` because nothing was invented. The estate has a name for that shape —
18
+ * a check that reports what it found and never what it read (issue #244).
19
+ *
20
+ * So `defaulted` is a **residue**, not a counter:
21
+ *
22
+ * ```
23
+ * defaulted = resolved.length − (flags + env-file + prompted + generated)
24
+ * ```
25
+ *
26
+ * Two consequences, and both are the point. A value can only enter `resolved`
27
+ * carrying a {@link Provenance}, which is a closed union of the four tiers, so
28
+ * inventing one requires a fifth tag and `tsc` refuses it. And if a later author
29
+ * *does* widen the union and forgets the sum, the arithmetic does not stay
30
+ * silent — the residue goes non-zero, the line says so on the operator's own
31
+ * terminal, and the acceptance test fails. The number cannot be right by
32
+ * accident and cannot be wrong quietly.
33
+ *
34
+ * `provenanceCounts` therefore takes the loosest record it can, so a red proof
35
+ * can hand it a value whose origin is none of the four and watch the residue
36
+ * appear. That is the whole of the guarantee, and it is one subtraction.
37
+ *
38
+ * ## The prompt is a fallback, never a generator
39
+ *
40
+ * A prompt exists for a **required** input the first two tiers did not answer.
41
+ * An optional input is never prompted for (R1.4): the prompt's length is the
42
+ * required set's length and nothing more, because a tool that asks twelve
43
+ * questions to save one is not assistance. And nothing here supplies a value of
44
+ * its own — the one exception is {@link generateSecret}, whose whole class is a
45
+ * value with no human judgement in it (R4.1).
46
+ *
47
+ * ## One module, every command
48
+ *
49
+ * R5.3. Two implementations of a precedence order are two orders, and R5.2 is
50
+ * that one product means one behaviour: a command that resolved inputs
51
+ * differently from its sibling would be `cli-product.md` R3.3's *"three commands
52
+ * that happen to share a prefix"* arriving through the input layer instead of
53
+ * the command layer.
54
+ */
55
+ import { randomBytes } from 'node:crypto';
56
+ import { isRequiredGiven, scopeToMembers, } from '@endora-commerce/contracts';
57
+ /**
58
+ * Markers a continuous-integration environment sets.
59
+ *
60
+ * A **floor**, not a closed set, and the distinction costs nothing because it is
61
+ * not what protects the run: conditions 1 and 2 of R3.1 are the TTY tests, and a
62
+ * pipeline that set none of these still has no terminal on either descriptor. So
63
+ * an unlisted vendor is a marker this does not know about and a run this still
64
+ * refuses to prompt in. `CI` alone would very nearly do; the rest are here
65
+ * because a vendor that sets only its own name costs one entry and a hung
66
+ * pipeline costs an hour.
67
+ */
68
+ const CI_MARKERS = [
69
+ 'CI',
70
+ 'CONTINUOUS_INTEGRATION',
71
+ 'GITLAB_CI',
72
+ 'GITHUB_ACTIONS',
73
+ 'BUILDKITE',
74
+ 'CIRCLECI',
75
+ 'TF_BUILD',
76
+ 'TEAMCITY_VERSION',
77
+ 'JENKINS_URL',
78
+ ];
79
+ /** Is a CI marker set to something meaning yes? */
80
+ export function ciMarkerSet(environment) {
81
+ return CI_MARKERS.some((marker) => {
82
+ const value = environment[marker];
83
+ if (value === undefined)
84
+ return false;
85
+ const normalised = value.trim().toLowerCase();
86
+ // `CI=false` and `CI=0` are how a developer says "not a pipeline"; an empty
87
+ // value is a variable exported and never set, which says nothing either.
88
+ return normalised.length > 0 && normalised !== 'false' && normalised !== '0';
89
+ });
90
+ }
91
+ /**
92
+ * May this run issue a prompt? (R3.1 — a conjunction of five.)
93
+ *
94
+ * **Checking stdin alone is insufficient and R3.5 forbids it**: a run whose
95
+ * stdout is captured and whose stdin is inherited would prompt into a log nobody
96
+ * reads, which is the same hang wearing different clothes.
97
+ *
98
+ * There is deliberately no `--interactive` (R3.4). A flag that turns the
99
+ * assistance on is a flag the person who needs it does not know about.
100
+ */
101
+ export function mayPrompt(facts) {
102
+ return (facts.stdinIsTty &&
103
+ facts.stdoutIsTty &&
104
+ !facts.nonInteractive &&
105
+ !facts.dryRun &&
106
+ !ciMarkerSet(facts.environment));
107
+ }
108
+ /** The facts, read off this process. The only place the resolution touches globals. */
109
+ export function interactivityOf(options) {
110
+ return {
111
+ stdinIsTty: process.stdin.isTTY === true,
112
+ stdoutIsTty: process.stdout.isTTY === true,
113
+ nonInteractive: options.nonInteractive,
114
+ dryRun: options.dryRun,
115
+ environment: process.env,
116
+ };
117
+ }
118
+ /**
119
+ * The flag that supplies an input, derived from its name and never written down.
120
+ *
121
+ * `SESSION_COOKIE_SECRET` → `--session-cookie-secret`. Deriving it is what keeps
122
+ * the refusal's remedy true for an input nobody has declared yet — including one
123
+ * a module installed from a registry declares, which no table here could name.
124
+ */
125
+ export function flagFor(name) {
126
+ return `--${name.toLowerCase().replace(/_/g, '-')}`;
127
+ }
128
+ /** The variable a flag names, inverted from {@link flagFor}. */
129
+ export function inputForFlag(flag) {
130
+ return flag.replace(/^--/, '').toUpperCase().replace(/-/g, '_');
131
+ }
132
+ /**
133
+ * A value whose only required properties are that it is unguessable and
134
+ * per-environment (R4.1).
135
+ *
136
+ * **32 random bytes, base64**, one format for every generable input, and the
137
+ * format is not arbitrary: the platform's own secret settings are decrypted with
138
+ * `Buffer.from(key, 'base64')` over a 32-byte AES key, so a hex key would fail
139
+ * at the first secret setting an operator wrote. The same string is a perfectly
140
+ * good cookie-signing key, which is why one format serves both and no `format`
141
+ * field exists to get wrong.
142
+ *
143
+ * **Never at boot** (R4.4). That is a rule about the platform rather than about
144
+ * this function, and it is why generation lives in a command an operator ran
145
+ * once: a signing key that changed on restart would invalidate every session,
146
+ * and a settings-encryption key that did would make every stored secret
147
+ * unreadable. Both are worse than a refusal.
148
+ */
149
+ export function generateSecret() {
150
+ return randomBytes(32).toString('base64');
151
+ }
152
+ /**
153
+ * The counts, over a record loose enough for a proof to break.
154
+ *
155
+ * The parameter is `{ provenance: string }` rather than {@link ResolvedInput} on
156
+ * purpose: `defaulted` is a residue and a residue can only be *shown* to work by
157
+ * handing in something outside the partition. With the parameter narrowed, the
158
+ * one assertion that proves the guarantee would not compile.
159
+ */
160
+ export function provenanceCounts(resolved) {
161
+ const count = (tier) => resolved.filter((entry) => entry.provenance === tier).length;
162
+ const flags = count('flag');
163
+ const envFile = count('env-file');
164
+ const prompted = count('prompt');
165
+ const generated = count('generated');
166
+ return {
167
+ total: resolved.length,
168
+ flags,
169
+ envFile,
170
+ prompted,
171
+ generated,
172
+ defaulted: resolved.length - (flags + envFile + prompted + generated),
173
+ };
174
+ }
175
+ /** The line itself (R2.1), in the estate's `read:` grammar. */
176
+ export function provenanceLine(resolved) {
177
+ const counts = provenanceCounts(resolved);
178
+ const generatedNames = resolved
179
+ .filter((entry) => entry.provenance === 'generated')
180
+ .map((entry) => entry.name);
181
+ // R2.3 — a count with no names is a disclosure an operator cannot act on. The
182
+ // **name** is printed and the value never is: it is in the `.env` this run
183
+ // wrote, which is where an operator can read it, change it and copy it into a
184
+ // secret store.
185
+ const named = generatedNames.length === 0 ? '' : ` (${generatedNames.join(', ')})`;
186
+ return (`[inputs] resolved: total=${counts.total} flags=${counts.flags} ` +
187
+ `env-file=${counts.envFile} prompted=${counts.prompted} ` +
188
+ `generated=${counts.generated}${named} defaulted=${counts.defaulted}`);
189
+ }
190
+ /**
191
+ * The first two tiers, and the decision about the other two.
192
+ *
193
+ * Pure: it asks nothing, generates nothing and writes nothing, so a caller can
194
+ * print the whole plan under `--dry-run` (R2.4, R7.3) and a test can assert
195
+ * every branch without a terminal.
196
+ *
197
+ * **A condition is answered against the values this run has resolved**, not
198
+ * against `process.env`, which is the case that happens: a run supplying
199
+ * `--catalog-search-backend meilisearch` on its command line has to be asked for
200
+ * `MEILISEARCH_URL` in the same run rather than in the next one.
201
+ */
202
+ export function planResolution(request) {
203
+ const inScope = scopeToMembers(request.declared, request.members);
204
+ const resolved = [];
205
+ const values = {};
206
+ const unanswered = [];
207
+ for (const input of inScope) {
208
+ const flag = request.flags[input.name];
209
+ if (flag !== undefined && flag.length > 0) {
210
+ resolved.push({ name: input.name, value: flag, provenance: 'flag' });
211
+ values[input.name] = flag;
212
+ continue;
213
+ }
214
+ const fromFile = request.envFile.get(input.name);
215
+ if (fromFile !== undefined && fromFile.length > 0) {
216
+ resolved.push({ name: input.name, value: fromFile, provenance: 'env-file' });
217
+ values[input.name] = fromFile;
218
+ continue;
219
+ }
220
+ unanswered.push(input);
221
+ }
222
+ const interactive = mayPrompt(request.interactivity);
223
+ const toPrompt = [];
224
+ const toGenerate = [];
225
+ const missing = [];
226
+ const unset = [];
227
+ for (const input of unanswered) {
228
+ // Generation comes before the prompt, and only for a value with no human
229
+ // judgement in it (R4.5): asking a human to type a session-signing key gets
230
+ // a human-typed one, reliably.
231
+ if (input.generable && input.secret) {
232
+ toGenerate.push(input);
233
+ continue;
234
+ }
235
+ if (!isRequiredGiven(input, values)) {
236
+ // R1.4 — an optional input is never prompted for.
237
+ unset.push(input);
238
+ continue;
239
+ }
240
+ // **A dry run reports; it does not refuse.** R2.4 and R7.3: it answers
241
+ // *"what would happen"* completely, and an unanswered required input is
242
+ // part of that answer rather than a reason to stop giving it. It is also
243
+ // the reason `--dry-run` is one of R3.1's five conditions and not merely a
244
+ // consequence of them — the run must neither ask nor refuse.
245
+ if (interactive || request.interactivity.dryRun) {
246
+ toPrompt.push(input);
247
+ continue;
248
+ }
249
+ missing.push({
250
+ name: input.name,
251
+ flag: flagFor(input.name),
252
+ describes: input.describes[request.language],
253
+ secret: input.secret,
254
+ });
255
+ }
256
+ return { resolved, toPrompt, toGenerate, missing, unset };
257
+ }
258
+ /**
259
+ * The refusal a run that may not ask prints, naming **every** missing input
260
+ * (R3.2).
261
+ *
262
+ * Not one per run: a twelve-input setup must not be twelve failed invocations,
263
+ * and that is a design point rather than a nicety — it is precisely the
264
+ * experience the owner asked to have removed.
265
+ */
266
+ export function missingInputsRefusal(missing, facts) {
267
+ const why = facts.dryRun
268
+ ? 'this is a dry run, which resolves and reports and never asks'
269
+ : facts.nonInteractive
270
+ ? '`--non-interactive` was given'
271
+ : !facts.stdinIsTty || !facts.stdoutIsTty
272
+ ? 'neither a question nor its answer has anywhere to go: ' +
273
+ `stdin ${facts.stdinIsTty ? 'is' : 'is not'} a terminal and stdout ` +
274
+ `${facts.stdoutIsTty ? 'is' : 'is not'}`
275
+ : 'a continuous-integration marker is set in the environment';
276
+ const lines = missing.map((input) => ` ${input.flag} <value>\n ${input.describes}`);
277
+ return [
278
+ `endora: ${missing.length} required input${missing.length === 1 ? '' : 's'} ` +
279
+ `${missing.length === 1 ? 'is' : 'are'} not set, and this run cannot ask for ` +
280
+ `${missing.length === 1 ? 'it' : 'them'} — ${why}.`,
281
+ '',
282
+ 'Supply each on the command line, or put it in a `.env` in the target directory',
283
+ 'before running this again:',
284
+ '',
285
+ ...lines,
286
+ '',
287
+ 'Nothing was written.',
288
+ ].join('\n');
289
+ }
290
+ //# sourceMappingURL=resolve.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../src/inputs/resolve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EACL,eAAe,EACf,cAAc,GAGf,MAAM,4BAA4B,CAAC;AAyCpC;;;;;;;;;;GAUG;AACH,MAAM,UAAU,GAAG;IACjB,IAAI;IACJ,wBAAwB;IACxB,WAAW;IACX,gBAAgB;IAChB,WAAW;IACX,UAAU;IACV,UAAU;IACV,kBAAkB;IAClB,aAAa;CACL,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CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,MAAM,GAAG,GAAG;QACrD,EAAE;QACF,gFAAgF;QAChF,4BAA4B;QAC5B,EAAE;QACF,GAAG,KAAK;QACR,EAAE;QACF,sBAAsB;KACvB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { type ReleaseIndex } from '../lib/release-index.js';
2
+ /** The prefix of the host's directory name under the OS temp directory. */
3
+ export declare const HOST_DIRECTORY_PREFIX = "endora-install-host-";
4
+ /**
5
+ * This CLI's release index, or `null` with the reason it could not be read.
6
+ *
7
+ * `null` rather than a throw of this module's own: the install verb decides
8
+ * which class the refusal is reported under, and it is exit 2 — an input the
9
+ * run could not read, exactly as a module manifest it could not read is F7.
10
+ */
11
+ export declare function readReleaseIndex(file: string): {
12
+ readonly index: ReleaseIndex;
13
+ } | {
14
+ readonly problem: string;
15
+ };
16
+ /**
17
+ * The host's `.npmrc`, or `null` when no `--registry` was given.
18
+ *
19
+ * The writer is the one `endora new instance --registry` uses, so the host and
20
+ * the instance it writes name one endpoint keyed one way. A value that is not a
21
+ * registry is **F5**, the class `new instance` reports it under, decided here
22
+ * because the host is installed before `new instance` is called.
23
+ */
24
+ export declare function hostNpmrc(registry: string | undefined, scope: string): string | null;
25
+ /** Write the host's manifest and `.npmrc` into `dir`, which the caller created. */
26
+ export declare function writeHost(dir: string, index: ReleaseIndex, npmrc: string | null): void;
27
+ //# sourceMappingURL=host.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../src/install/host.ts"],"names":[],"mappings":"AA6BA,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAI/E,2EAA2E;AAC3E,eAAO,MAAM,qBAAqB,yBAAyB,CAAC;AAE5D;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,GACX;IAAE,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAcjE;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOpF;AAED,mFAAmF;AACnF,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAsBtF"}
@@ -0,0 +1,90 @@
1
+ /**
2
+ * The temporary host `endora install` provisions when nothing of ours is
3
+ * installed beside the target (`specs/080-f4-real-scope/rulings.md` D-271).
4
+ *
5
+ * ## Why it exists
6
+ *
7
+ * `endora new instance` reads the platform's and every module's manifest off
8
+ * the packages installed **beside** the target or the working directory
9
+ * (`new-instance/host.ts`), because the module set is a derivation over those
10
+ * manifests and nothing in it can be read without installing it. Under `npx`
11
+ * the CLI lives in npx's cache, which is above neither directory, so the front
12
+ * door refused F6 before it had derived anything.
13
+ *
14
+ * ## What it is, and what it is not
15
+ *
16
+ * A fresh directory under the OS temp directory — never inside or above the
17
+ * target, for the reason the acceptance criterion's `provisionHost` gives: a
18
+ * `node_modules` above the instance would let its own install resolve a package
19
+ * it never declared. It holds a `package.json` declaring every package of this
20
+ * CLI's release index at its indexed version, the `.npmrc` `--registry` writes
21
+ * (the same writer, `new-storefront/npmrc.ts`), and whatever `<runner> install`
22
+ * puts there. The install verb then calls `runNewInstance` with the host as its
23
+ * working directory, so **every resolution stays where it was**: the host is a
24
+ * place for `resolveInstanceHost` to look, and this file installs packages,
25
+ * resolves no module and decides no member (125 FR-143).
26
+ */
27
+ import { readFileSync, writeFileSync } from 'node:fs';
28
+ import { join } from 'node:path';
29
+ import { parseReleaseIndex } from '../lib/release-index.js';
30
+ import { InstanceHostError } from '../new-instance/host.js';
31
+ import { npmrcContent, normalizeRegistry } from '../new-storefront/npmrc.js';
32
+ /** The prefix of the host's directory name under the OS temp directory. */
33
+ export const HOST_DIRECTORY_PREFIX = 'endora-install-host-';
34
+ /**
35
+ * This CLI's release index, or `null` with the reason it could not be read.
36
+ *
37
+ * `null` rather than a throw of this module's own: the install verb decides
38
+ * which class the refusal is reported under, and it is exit 2 — an input the
39
+ * run could not read, exactly as a module manifest it could not read is F7.
40
+ */
41
+ export function readReleaseIndex(file) {
42
+ let text;
43
+ try {
44
+ text = readFileSync(file, 'utf8');
45
+ }
46
+ catch (error) {
47
+ return {
48
+ problem: `${file} could not be read (${error instanceof Error ? error.message : String(error)})`,
49
+ };
50
+ }
51
+ try {
52
+ return { index: parseReleaseIndex(text, file) };
53
+ }
54
+ catch (error) {
55
+ return { problem: error instanceof Error ? error.message : String(error) };
56
+ }
57
+ }
58
+ /**
59
+ * The host's `.npmrc`, or `null` when no `--registry` was given.
60
+ *
61
+ * The writer is the one `endora new instance --registry` uses, so the host and
62
+ * the instance it writes name one endpoint keyed one way. A value that is not a
63
+ * registry is **F5**, the class `new instance` reports it under, decided here
64
+ * because the host is installed before `new instance` is called.
65
+ */
66
+ export function hostNpmrc(registry, scope) {
67
+ if (registry === undefined)
68
+ return null;
69
+ try {
70
+ return npmrcContent(normalizeRegistry(registry), [scope.slice(0, -1)]);
71
+ }
72
+ catch (error) {
73
+ throw new InstanceHostError('F5', error instanceof Error ? error.message : String(error));
74
+ }
75
+ }
76
+ /** Write the host's manifest and `.npmrc` into `dir`, which the caller created. */
77
+ export function writeHost(dir, index, npmrc) {
78
+ const dependencies = Object.fromEntries(index.packages.map((entry) => [entry.name, entry.version]));
79
+ writeFileSync(join(dir, 'package.json'), `${JSON.stringify({
80
+ name: 'endora-install-host',
81
+ version: '0.0.0',
82
+ private: true,
83
+ description: 'A temporary directory `endora install` reads the release\'s packages from. ' +
84
+ 'Removed when the install succeeds; safe to delete.',
85
+ dependencies,
86
+ }, null, 2)}\n`, 'utf8');
87
+ if (npmrc !== null)
88
+ writeFileSync(join(dir, '.npmrc'), npmrc, 'utf8');
89
+ }
90
+ //# sourceMappingURL=host.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host.js","sourceRoot":"","sources":["../../src/install/host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAqB,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE7E,2EAA2E;AAC3E,MAAM,CAAC,MAAM,qBAAqB,GAAG,sBAAsB,CAAC;AAE5D;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAC9B,IAAY;IAEZ,IAAI,IAAY,CAAC;IACjB,IAAI,CAAC;QACH,IAAI,GAAG,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACpC,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACxB,OAAO;YACL,OAAO,EAAE,GAAG,IAAI,uBAAuB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG;SACjG,CAAC;IACJ,CAAC;IACD,IAAI,CAAC;QACH,OAAO,EAAE,KAAK,EAAE,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC;IAClD,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACxB,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;IAC7E,CAAC;AAC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+ import { type NewInstanceResult } from '../new-instance/index.js';
3
+ import { type NewStorefrontResult } from '../new-storefront/index.js';
4
+ import { type WizardIo } from './wizard.js';
5
+ /** A refusal the operator can act on — exit 1. */
6
+ export declare class InstallInputError extends Error {
7
+ readonly name = "InstallInputError";
8
+ }
9
+ /**
10
+ * An input this run could not read — exit 2 — or a failed host install, which
11
+ * exits with **that step's own** code like every other step (FR-156).
12
+ */
13
+ export declare class InstallHostError extends Error {
14
+ readonly name = "InstallHostError";
15
+ readonly exitCode: number;
16
+ constructor(message: string, exitCode?: number);
17
+ }
18
+ /**
19
+ * One step of the pipeline.
20
+ *
21
+ * Data rather than a call, because FR-155 is a statement about a **list** —
22
+ * *"the pipeline it runs is the printed next-steps sequence and nothing else"*
23
+ * — and a list is assertable where a sequence of `await`s is not. `--dry-run`
24
+ * prints exactly this, which is R2.4's *"report what it would do"* with no
25
+ * second derivation of what that is.
26
+ */
27
+ export interface InstallStep {
28
+ /** Stable across renderings; what a test and a resume list address. */
29
+ readonly id: 'host' | 'install' | 'services' | 'setup' | 'admin' | 'demo' | 'storefront-install';
30
+ /** The command as an operator would type it, echoed before it runs. */
31
+ readonly command: string;
32
+ /** What it is for, in one clause. */
33
+ readonly purpose: string;
34
+ /** The binary, as this machine offers it — `pnpm`, or `corepack`. */
35
+ readonly bin: string;
36
+ readonly argv: readonly string[];
37
+ readonly cwd: string;
38
+ /**
39
+ * A failure here is reported and does not fail the install (FR-126).
40
+ *
41
+ * Exactly one step is optional and it is the seeding: the instance is
42
+ * complete without demo rows, and an optional extra that can red a mandatory
43
+ * outcome is the ordering mistake that requirement exists to refuse.
44
+ */
45
+ readonly optional?: boolean;
46
+ }
47
+ /** How a step is executed. Injected so a test asserts the list, not a shell. */
48
+ export type StepRunner = (step: InstallStep) => Promise<number>;
49
+ export interface InstallOptions {
50
+ /** Where the instance goes. Required: this command invents no name. */
51
+ readonly dir?: string | undefined;
52
+ readonly cwd?: string | undefined;
53
+ readonly modules?: readonly string[] | undefined;
54
+ readonly deployment?: string | undefined;
55
+ readonly registry?: string | undefined;
56
+ readonly topology?: string | undefined;
57
+ /**
58
+ * The members not to write — `--without <member>`, passed through to
59
+ * `endora new instance` and validated with every other precondition here.
60
+ * Empty or absent passes **nothing**, so the common case is the argv a bare
61
+ * `endora new instance <dir>` has (125 R6.3b).
62
+ */
63
+ readonly without?: readonly string[] | undefined;
64
+ /** Write the storefront repository too. Default yes; `--no-storefront` off. */
65
+ readonly storefront?: boolean | undefined;
66
+ /** Where it goes. Default `<dir>-storefront`, a **sibling** (FR-160). */
67
+ readonly storefrontDir?: string | undefined;
68
+ /** Start the development stack. Default yes; `--no-services` off. */
69
+ readonly services?: boolean | undefined;
70
+ /**
71
+ * Seed demo data.
72
+ *
73
+ * **`undefined` is a refusal, and that is final** (FR-124): 125 PR-2 was
74
+ * ruled option (c) by the owner on 2026-09-25 (D-269) — the one question
75
+ * whose two audiences want opposite answers has no default, in the wizard
76
+ * (where Enter re-asks) or on the command line.
77
+ */
78
+ readonly demo?: boolean | undefined;
79
+ readonly adminEmail?: string | undefined;
80
+ readonly adminPassword?: string | undefined;
81
+ readonly adminFirstName?: string | undefined;
82
+ readonly adminLastName?: string | undefined;
83
+ /**
84
+ * The secret both trees share (FR-153).
85
+ *
86
+ * Supplied, it is used verbatim. Absent, this run generates it **once** and
87
+ * writes the same value into both `.env` files — the one thing no sequence of
88
+ * the existing commands can do, because a per-tree generator writes two
89
+ * values that are *"each internally consistent and jointly wrong"*
90
+ * (`packages/platform/src/env/index.ts`). Proposed ruling PR-3 states that as
91
+ * a narrowing of the `generable: false` declaration rather than a reversal:
92
+ * a single run over both trees is a single environment. Ruled as proposed
93
+ * on 2026-09-25 (D-269); `input-resolution.md` R4.6 is the rule.
94
+ */
95
+ readonly revalidateSecret?: string | undefined;
96
+ /** Report every step and every file; run nothing and write nothing. */
97
+ readonly dryRun?: boolean | undefined;
98
+ /** Refuse rather than ask, even at a terminal (`input-resolution.md` R3.4). */
99
+ readonly nonInteractive?: boolean | undefined;
100
+ /**
101
+ * Where a line goes as it is produced.
102
+ *
103
+ * Every line is kept on the result as well, so a proof reads the sequence
104
+ * rather than a process's stdout — but an install is minutes long and a
105
+ * client watching it needs the echo **now**, not at the end. The argv layer
106
+ * passes `process.stdout`; a test passes nothing and reads the result.
107
+ */
108
+ readonly echo?: ((line: string) => void) | undefined;
109
+ /** How a step runs. Defaults to spawning it. */
110
+ readonly run?: StepRunner | undefined;
111
+ /**
112
+ * The package-manager runners this machine offers, in preference order.
113
+ *
114
+ * Defaults to a probe of `pnpm` on `PATH` and then `corepack` (FR-158). An
115
+ * empty list is the refusal, which is how a test reaches it without editing
116
+ * `PATH`.
117
+ */
118
+ readonly packageManagers?: readonly PackageManagerRunner[] | undefined;
119
+ /** Whether a Docker daemon answers. Defaults to a probe. */
120
+ readonly dockerReachable?: boolean | undefined;
121
+ /**
122
+ * The facts R2.5c's conjunction is decided over. Defaults to this process's
123
+ * own descriptors, flags and environment; a test hands in *"both are
124
+ * terminals"* without being on one.
125
+ */
126
+ readonly interactivity?: InteractivityFacts | undefined;
127
+ /** Where the wizard asks and reads. Defaults to this process's own. */
128
+ readonly io?: WizardIo | undefined;
129
+ /**
130
+ * Where this CLI's release index is read from when a host has to be
131
+ * provisioned (D-271). Defaults to the one its own build wrote into `dist`.
132
+ */
133
+ readonly releaseIndexFile?: string | undefined;
134
+ }
135
+ /** One way to run `pnpm` on this machine. */
136
+ export interface PackageManagerRunner {
137
+ readonly command: string;
138
+ readonly prefix: readonly string[];
139
+ /** How it reads in the echo and in the resumable list. */
140
+ readonly label: string;
141
+ }
142
+ export interface InstallResult {
143
+ readonly targetDir: string;
144
+ readonly storefrontDir: string | null;
145
+ readonly instance: NewInstanceResult;
146
+ readonly storefront: NewStorefrontResult | null;
147
+ /** The pipeline, in order — the whole of it, whether or not it ran. */
148
+ readonly steps: readonly InstallStep[];
149
+ /**
150
+ * The temporary host step, when one ran (D-271) — not a pipeline step: it is
151
+ * how this run reads the release, not a command the instance is left with.
152
+ */
153
+ readonly hostStep: InstallStep | null;
154
+ /** Everything this run printed, in order. Exported so a proof reads it. */
155
+ readonly output: readonly string[];
156
+ /** The failing step's own code, or 0 (FR-156). */
157
+ readonly exitCode: number;
158
+ /** What this run derived from the document it rendered, by name (FR-105). */
159
+ readonly derived: readonly string[];
160
+ /** R2.5f (iv) — the `[answers]` line: where each of §6.2's answers came from. */
161
+ readonly answers: string;
162
+ readonly dryRun: boolean;
163
+ }
164
+ /**
165
+ * The whole command.
166
+ *
167
+ * Three phases, in this order and never interleaved: **decide** (every
168
+ * precondition, one refusal), **write** (the two scaffolds and the derived
169
+ * `.env`), **run** (the pipeline, each step echoed). A `--dry-run` stops after
170
+ * the first and reports the other two.
171
+ */
172
+ export declare function runInstall(given: InstallOptions): Promise<InstallResult>;
173
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/install/index.ts"],"names":[],"mappings":"AAmEA,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,sBAAsB,CAAC;AAO9B,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,4BAA4B,CAAC;AAIpC,OAAO,EAML,KAAK,QAAQ,EACd,MAAM,aAAa,CAAC;AAErB,kDAAkD;AAClD,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,SAAkB,IAAI,uBAAuB;CAC9C;AAED;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,SAAkB,IAAI,sBAAsB;IAC5C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;gBAEd,OAAO,EAAE,MAAM,EAAE,QAAQ,SAAI;CAI1C;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,WAAW;IAC1B,uEAAuE;IACvE,QAAQ,CAAC,EAAE,EACP,MAAM,GACN,SAAS,GACT,UAAU,GACV,OAAO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