@endora-commerce/platform 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 (657) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +58 -0
  3. package/dist/cli/dispatch.d.ts +146 -0
  4. package/dist/cli/dispatch.d.ts.map +1 -0
  5. package/dist/cli/dispatch.js +259 -0
  6. package/dist/cli/dispatch.js.map +1 -0
  7. package/dist/cli/index.d.ts +58 -0
  8. package/dist/cli/index.d.ts.map +1 -0
  9. package/dist/cli/index.js +58 -0
  10. package/dist/cli/index.js.map +1 -0
  11. package/dist/cli/module-commands.d.ts +118 -0
  12. package/dist/cli/module-commands.d.ts.map +1 -0
  13. package/dist/cli/module-commands.js +120 -0
  14. package/dist/cli/module-commands.js.map +1 -0
  15. package/dist/commands/actor.d.ts +19 -0
  16. package/dist/commands/actor.d.ts.map +1 -0
  17. package/dist/commands/actor.js +45 -0
  18. package/dist/commands/actor.js.map +1 -0
  19. package/dist/commands/audit-from-context.d.ts +24 -0
  20. package/dist/commands/audit-from-context.d.ts.map +1 -0
  21. package/dist/commands/audit-from-context.js +28 -0
  22. package/dist/commands/audit-from-context.js.map +1 -0
  23. package/dist/commands/command-bus.d.ts +40 -0
  24. package/dist/commands/command-bus.d.ts.map +1 -0
  25. package/dist/commands/command-bus.js +46 -0
  26. package/dist/commands/command-bus.js.map +1 -0
  27. package/dist/commands/command.d.ts +76 -0
  28. package/dist/commands/command.d.ts.map +1 -0
  29. package/dist/commands/command.js +2 -0
  30. package/dist/commands/command.js.map +1 -0
  31. package/dist/commands/index.d.ts +65 -0
  32. package/dist/commands/index.d.ts.map +1 -0
  33. package/dist/commands/index.js +57 -0
  34. package/dist/commands/index.js.map +1 -0
  35. package/dist/commands/reversible.d.ts +66 -0
  36. package/dist/commands/reversible.d.ts.map +1 -0
  37. package/dist/commands/reversible.js +41 -0
  38. package/dist/commands/reversible.js.map +1 -0
  39. package/dist/composition/compose-app.d.ts +305 -0
  40. package/dist/composition/compose-app.d.ts.map +1 -0
  41. package/dist/composition/compose-app.js +939 -0
  42. package/dist/composition/compose-app.js.map +1 -0
  43. package/dist/composition/index.d.ts +92 -0
  44. package/dist/composition/index.d.ts.map +1 -0
  45. package/dist/composition/index.js +175 -0
  46. package/dist/composition/index.js.map +1 -0
  47. package/dist/composition/newsletter-token-secret.d.ts +19 -0
  48. package/dist/composition/newsletter-token-secret.d.ts.map +1 -0
  49. package/dist/composition/newsletter-token-secret.js +24 -0
  50. package/dist/composition/newsletter-token-secret.js.map +1 -0
  51. package/dist/composition/process-runs-workers.d.ts +17 -0
  52. package/dist/composition/process-runs-workers.d.ts.map +1 -0
  53. package/dist/composition/process-runs-workers.js +19 -0
  54. package/dist/composition/process-runs-workers.js.map +1 -0
  55. package/dist/db/baseline-migration-inventory.d.ts +15 -0
  56. package/dist/db/baseline-migration-inventory.d.ts.map +1 -0
  57. package/dist/db/baseline-migration-inventory.js +115 -0
  58. package/dist/db/baseline-migration-inventory.js.map +1 -0
  59. package/dist/db/configured-entities.d.ts +74 -0
  60. package/dist/db/configured-entities.d.ts.map +1 -0
  61. package/dist/db/configured-entities.js +20 -0
  62. package/dist/db/configured-entities.js.map +1 -0
  63. package/dist/db/configured-migrations.d.ts +199 -0
  64. package/dist/db/configured-migrations.d.ts.map +1 -0
  65. package/dist/db/configured-migrations.js +181 -0
  66. package/dist/db/configured-migrations.js.map +1 -0
  67. package/dist/db/index.d.ts +54 -0
  68. package/dist/db/index.d.ts.map +1 -0
  69. package/dist/db/index.js +54 -0
  70. package/dist/db/index.js.map +1 -0
  71. package/dist/db/migrate.d.ts +21 -0
  72. package/dist/db/migrate.d.ts.map +1 -0
  73. package/dist/db/migrate.js +48 -0
  74. package/dist/db/migrate.js.map +1 -0
  75. package/dist/db/migration-order.d.ts +159 -0
  76. package/dist/db/migration-order.d.ts.map +1 -0
  77. package/dist/db/migration-order.js +273 -0
  78. package/dist/db/migration-order.js.map +1 -0
  79. package/dist/db/mikro-orm.config.d.ts +51 -0
  80. package/dist/db/mikro-orm.config.d.ts.map +1 -0
  81. package/dist/db/mikro-orm.config.js +64 -0
  82. package/dist/db/mikro-orm.config.js.map +1 -0
  83. package/dist/db/orm.d.ts +40 -0
  84. package/dist/db/orm.d.ts.map +1 -0
  85. package/dist/db/orm.js +25 -0
  86. package/dist/db/orm.js.map +1 -0
  87. package/dist/db/platform-schema.d.ts +102 -0
  88. package/dist/db/platform-schema.d.ts.map +1 -0
  89. package/dist/db/platform-schema.js +79 -0
  90. package/dist/db/platform-schema.js.map +1 -0
  91. package/dist/db/pluralizing-naming-strategy.d.ts +16 -0
  92. package/dist/db/pluralizing-naming-strategy.d.ts.map +1 -0
  93. package/dist/db/pluralizing-naming-strategy.js +66 -0
  94. package/dist/db/pluralizing-naming-strategy.js.map +1 -0
  95. package/dist/demo/guard.d.ts +101 -0
  96. package/dist/demo/guard.d.ts.map +1 -0
  97. package/dist/demo/guard.js +168 -0
  98. package/dist/demo/guard.js.map +1 -0
  99. package/dist/demo/host-command.d.ts +133 -0
  100. package/dist/demo/host-command.d.ts.map +1 -0
  101. package/dist/demo/host-command.js +113 -0
  102. package/dist/demo/host-command.js.map +1 -0
  103. package/dist/demo/index.d.ts +82 -0
  104. package/dist/demo/index.d.ts.map +1 -0
  105. package/dist/demo/index.js +82 -0
  106. package/dist/demo/index.js.map +1 -0
  107. package/dist/demo/packages.d.ts +67 -0
  108. package/dist/demo/packages.d.ts.map +1 -0
  109. package/dist/demo/packages.js +132 -0
  110. package/dist/demo/packages.js.map +1 -0
  111. package/dist/demo/plan.d.ts +111 -0
  112. package/dist/demo/plan.d.ts.map +1 -0
  113. package/dist/demo/plan.js +74 -0
  114. package/dist/demo/plan.js.map +1 -0
  115. package/dist/demo/report.d.ts +17 -0
  116. package/dist/demo/report.d.ts.map +1 -0
  117. package/dist/demo/report.js +85 -0
  118. package/dist/demo/report.js.map +1 -0
  119. package/dist/demo/runner.d.ts +207 -0
  120. package/dist/demo/runner.d.ts.map +1 -0
  121. package/dist/demo/runner.js +169 -0
  122. package/dist/demo/runner.js.map +1 -0
  123. package/dist/demo/scope.d.ts +44 -0
  124. package/dist/demo/scope.d.ts.map +1 -0
  125. package/dist/demo/scope.js +44 -0
  126. package/dist/demo/scope.js.map +1 -0
  127. package/dist/env/index.d.ts +68 -0
  128. package/dist/env/index.d.ts.map +1 -0
  129. package/dist/env/index.js +427 -0
  130. package/dist/env/index.js.map +1 -0
  131. package/dist/events/bus.d.ts +29 -0
  132. package/dist/events/bus.d.ts.map +1 -0
  133. package/dist/events/bus.js +67 -0
  134. package/dist/events/bus.js.map +1 -0
  135. package/dist/events/index.d.ts +19 -0
  136. package/dist/events/index.d.ts.map +1 -0
  137. package/dist/events/index.js +19 -0
  138. package/dist/events/index.js.map +1 -0
  139. package/dist/http/cursor.d.ts +10 -0
  140. package/dist/http/cursor.d.ts.map +1 -0
  141. package/dist/http/cursor.js +20 -0
  142. package/dist/http/cursor.js.map +1 -0
  143. package/dist/http/error-envelope.d.ts +127 -0
  144. package/dist/http/error-envelope.d.ts.map +1 -0
  145. package/dist/http/error-envelope.js +402 -0
  146. package/dist/http/error-envelope.js.map +1 -0
  147. package/dist/http/health.d.ts +88 -0
  148. package/dist/http/health.d.ts.map +1 -0
  149. package/dist/http/health.js +77 -0
  150. package/dist/http/health.js.map +1 -0
  151. package/dist/http/index.d.ts +50 -0
  152. package/dist/http/index.d.ts.map +1 -0
  153. package/dist/http/index.js +50 -0
  154. package/dist/http/index.js.map +1 -0
  155. package/dist/http/interceptors/dispatch.d.ts +14 -0
  156. package/dist/http/interceptors/dispatch.d.ts.map +1 -0
  157. package/dist/http/interceptors/dispatch.js +113 -0
  158. package/dist/http/interceptors/dispatch.js.map +1 -0
  159. package/dist/http/interceptors/index.d.ts +6 -0
  160. package/dist/http/interceptors/index.d.ts.map +1 -0
  161. package/dist/http/interceptors/index.js +5 -0
  162. package/dist/http/interceptors/index.js.map +1 -0
  163. package/dist/http/interceptors/registry.d.ts +44 -0
  164. package/dist/http/interceptors/registry.d.ts.map +1 -0
  165. package/dist/http/interceptors/registry.js +123 -0
  166. package/dist/http/interceptors/registry.js.map +1 -0
  167. package/dist/http/interceptors/route-table.d.ts +33 -0
  168. package/dist/http/interceptors/route-table.d.ts.map +1 -0
  169. package/dist/http/interceptors/route-table.js +39 -0
  170. package/dist/http/interceptors/route-table.js.map +1 -0
  171. package/dist/http/interceptors/types.d.ts +101 -0
  172. package/dist/http/interceptors/types.d.ts.map +1 -0
  173. package/dist/http/interceptors/types.js +2 -0
  174. package/dist/http/interceptors/types.js.map +1 -0
  175. package/dist/http/interceptors/validation.d.ts +22 -0
  176. package/dist/http/interceptors/validation.d.ts.map +1 -0
  177. package/dist/http/interceptors/validation.js +39 -0
  178. package/dist/http/interceptors/validation.js.map +1 -0
  179. package/dist/http/logger.d.ts +9 -0
  180. package/dist/http/logger.d.ts.map +1 -0
  181. package/dist/http/logger.js +25 -0
  182. package/dist/http/logger.js.map +1 -0
  183. package/dist/http/openapi.d.ts +21 -0
  184. package/dist/http/openapi.d.ts.map +1 -0
  185. package/dist/http/openapi.js +114 -0
  186. package/dist/http/openapi.js.map +1 -0
  187. package/dist/http/product-audience.d.ts +78 -0
  188. package/dist/http/product-audience.d.ts.map +1 -0
  189. package/dist/http/product-audience.js +92 -0
  190. package/dist/http/product-audience.js.map +1 -0
  191. package/dist/http/request-actor.d.ts +82 -0
  192. package/dist/http/request-actor.d.ts.map +1 -0
  193. package/dist/http/request-actor.js +2 -0
  194. package/dist/http/request-actor.js.map +1 -0
  195. package/dist/http/server.d.ts +60 -0
  196. package/dist/http/server.d.ts.map +1 -0
  197. package/dist/http/server.js +117 -0
  198. package/dist/http/server.js.map +1 -0
  199. package/dist/http/storefront-revalidator.d.ts +29 -0
  200. package/dist/http/storefront-revalidator.d.ts.map +1 -0
  201. package/dist/http/storefront-revalidator.js +34 -0
  202. package/dist/http/storefront-revalidator.js.map +1 -0
  203. package/dist/http/test-actor-carrier.d.ts +28 -0
  204. package/dist/http/test-actor-carrier.d.ts.map +1 -0
  205. package/dist/http/test-actor-carrier.js +10 -0
  206. package/dist/http/test-actor-carrier.js.map +1 -0
  207. package/dist/http/trusted-proxy.d.ts +48 -0
  208. package/dist/http/trusted-proxy.d.ts.map +1 -0
  209. package/dist/http/trusted-proxy.js +136 -0
  210. package/dist/http/trusted-proxy.js.map +1 -0
  211. package/dist/kernel/audit/audit-log-entry.entity.d.ts +33 -0
  212. package/dist/kernel/audit/audit-log-entry.entity.d.ts.map +1 -0
  213. package/dist/kernel/audit/audit-log-entry.entity.js +102 -0
  214. package/dist/kernel/audit/audit-log-entry.entity.js.map +1 -0
  215. package/dist/kernel/audit/audit-log-service.d.ts +63 -0
  216. package/dist/kernel/audit/audit-log-service.d.ts.map +1 -0
  217. package/dist/kernel/audit/audit-log-service.js +107 -0
  218. package/dist/kernel/audit/audit-log-service.js.map +1 -0
  219. package/dist/kernel/cache/in-process-cache-registry.d.ts +93 -0
  220. package/dist/kernel/cache/in-process-cache-registry.d.ts.map +1 -0
  221. package/dist/kernel/cache/in-process-cache-registry.js +78 -0
  222. package/dist/kernel/cache/in-process-cache-registry.js.map +1 -0
  223. package/dist/kernel/cache/shared-drop-marks.d.ts +39 -0
  224. package/dist/kernel/cache/shared-drop-marks.d.ts.map +1 -0
  225. package/dist/kernel/cache/shared-drop-marks.js +68 -0
  226. package/dist/kernel/cache/shared-drop-marks.js.map +1 -0
  227. package/dist/kernel/compose.d.ts +234 -0
  228. package/dist/kernel/compose.d.ts.map +1 -0
  229. package/dist/kernel/compose.js +279 -0
  230. package/dist/kernel/compose.js.map +1 -0
  231. package/dist/kernel/container.d.ts +95 -0
  232. package/dist/kernel/container.d.ts.map +1 -0
  233. package/dist/kernel/container.js +90 -0
  234. package/dist/kernel/container.js.map +1 -0
  235. package/dist/kernel/contribution-sinks.d.ts +106 -0
  236. package/dist/kernel/contribution-sinks.d.ts.map +1 -0
  237. package/dist/kernel/contribution-sinks.js +153 -0
  238. package/dist/kernel/contribution-sinks.js.map +1 -0
  239. package/dist/kernel/crypto/password-hasher.d.ts +3 -0
  240. package/dist/kernel/crypto/password-hasher.d.ts.map +1 -0
  241. package/dist/kernel/crypto/password-hasher.js +44 -0
  242. package/dist/kernel/crypto/password-hasher.js.map +1 -0
  243. package/dist/kernel/i18n/error-envelope-options.d.ts +56 -0
  244. package/dist/kernel/i18n/error-envelope-options.d.ts.map +1 -0
  245. package/dist/kernel/i18n/error-envelope-options.js +46 -0
  246. package/dist/kernel/i18n/error-envelope-options.js.map +1 -0
  247. package/dist/kernel/i18n/error-translation.d.ts +144 -0
  248. package/dist/kernel/i18n/error-translation.d.ts.map +1 -0
  249. package/dist/kernel/i18n/error-translation.js +84 -0
  250. package/dist/kernel/i18n/error-translation.js.map +1 -0
  251. package/dist/kernel/i18n/request-language.d.ts +80 -0
  252. package/dist/kernel/i18n/request-language.d.ts.map +1 -0
  253. package/dist/kernel/i18n/request-language.js +168 -0
  254. package/dist/kernel/i18n/request-language.js.map +1 -0
  255. package/dist/kernel/index.d.ts +142 -0
  256. package/dist/kernel/index.d.ts.map +1 -0
  257. package/dist/kernel/index.js +160 -0
  258. package/dist/kernel/index.js.map +1 -0
  259. package/dist/kernel/lazy-port.d.ts +59 -0
  260. package/dist/kernel/lazy-port.d.ts.map +1 -0
  261. package/dist/kernel/lazy-port.js +78 -0
  262. package/dist/kernel/lazy-port.js.map +1 -0
  263. package/dist/kernel/lifecycle/activation-resolver.d.ts +63 -0
  264. package/dist/kernel/lifecycle/activation-resolver.d.ts.map +1 -0
  265. package/dist/kernel/lifecycle/activation-resolver.js +70 -0
  266. package/dist/kernel/lifecycle/activation-resolver.js.map +1 -0
  267. package/dist/kernel/lifecycle/capability-registry.d.ts +145 -0
  268. package/dist/kernel/lifecycle/capability-registry.d.ts.map +1 -0
  269. package/dist/kernel/lifecycle/capability-registry.js +170 -0
  270. package/dist/kernel/lifecycle/capability-registry.js.map +1 -0
  271. package/dist/kernel/lifecycle/effective-state.d.ts +126 -0
  272. package/dist/kernel/lifecycle/effective-state.d.ts.map +1 -0
  273. package/dist/kernel/lifecycle/effective-state.js +111 -0
  274. package/dist/kernel/lifecycle/effective-state.js.map +1 -0
  275. package/dist/kernel/lifecycle/module-registration.entity.d.ts +57 -0
  276. package/dist/kernel/lifecycle/module-registration.entity.d.ts.map +1 -0
  277. package/dist/kernel/lifecycle/module-registration.entity.js +111 -0
  278. package/dist/kernel/lifecycle/module-registration.entity.js.map +1 -0
  279. package/dist/kernel/lifecycle/plugin-helpers.d.ts +165 -0
  280. package/dist/kernel/lifecycle/plugin-helpers.d.ts.map +1 -0
  281. package/dist/kernel/lifecycle/plugin-helpers.js +395 -0
  282. package/dist/kernel/lifecycle/plugin-helpers.js.map +1 -0
  283. package/dist/kernel/lifecycle/registry-cache.d.ts +318 -0
  284. package/dist/kernel/lifecycle/registry-cache.d.ts.map +1 -0
  285. package/dist/kernel/lifecycle/registry-cache.js +509 -0
  286. package/dist/kernel/lifecycle/registry-cache.js.map +1 -0
  287. package/dist/kernel/lifecycle/required-modules.d.ts +137 -0
  288. package/dist/kernel/lifecycle/required-modules.d.ts.map +1 -0
  289. package/dist/kernel/lifecycle/required-modules.js +80 -0
  290. package/dist/kernel/lifecycle/required-modules.js.map +1 -0
  291. package/dist/kernel/lifecycle/unique-module-ids.d.ts +58 -0
  292. package/dist/kernel/lifecycle/unique-module-ids.d.ts.map +1 -0
  293. package/dist/kernel/lifecycle/unique-module-ids.js +82 -0
  294. package/dist/kernel/lifecycle/unique-module-ids.js.map +1 -0
  295. package/dist/kernel/logging.d.ts +116 -0
  296. package/dist/kernel/logging.d.ts.map +1 -0
  297. package/dist/kernel/logging.js +71 -0
  298. package/dist/kernel/logging.js.map +1 -0
  299. package/dist/kernel/module-context.d.ts +563 -0
  300. package/dist/kernel/module-context.d.ts.map +1 -0
  301. package/dist/kernel/module-context.js +670 -0
  302. package/dist/kernel/module-context.js.map +1 -0
  303. package/dist/kernel/ports/audit.d.ts +115 -0
  304. package/dist/kernel/ports/audit.d.ts.map +1 -0
  305. package/dist/kernel/ports/audit.js +2 -0
  306. package/dist/kernel/ports/audit.js.map +1 -0
  307. package/dist/kernel/ports/organizations.d.ts +56 -0
  308. package/dist/kernel/ports/organizations.d.ts.map +1 -0
  309. package/dist/kernel/ports/organizations.js +2 -0
  310. package/dist/kernel/ports/organizations.js.map +1 -0
  311. package/dist/kernel/ports/provide.d.ts +14 -0
  312. package/dist/kernel/ports/provide.d.ts.map +1 -0
  313. package/dist/kernel/ports/provide.js +50 -0
  314. package/dist/kernel/ports/provide.js.map +1 -0
  315. package/dist/kernel/ports/require-admin.d.ts +61 -0
  316. package/dist/kernel/ports/require-admin.d.ts.map +1 -0
  317. package/dist/kernel/ports/require-admin.js +2 -0
  318. package/dist/kernel/ports/require-admin.js.map +1 -0
  319. package/dist/kernel/ports/require-customer.d.ts +17 -0
  320. package/dist/kernel/ports/require-customer.d.ts.map +1 -0
  321. package/dist/kernel/ports/require-customer.js +2 -0
  322. package/dist/kernel/ports/require-customer.js.map +1 -0
  323. package/dist/kernel/ports/sales-channel.d.ts +84 -0
  324. package/dist/kernel/ports/sales-channel.d.ts.map +1 -0
  325. package/dist/kernel/ports/sales-channel.js +2 -0
  326. package/dist/kernel/ports/sales-channel.js.map +1 -0
  327. package/dist/kernel/ports/settings.d.ts +59 -0
  328. package/dist/kernel/ports/settings.d.ts.map +1 -0
  329. package/dist/kernel/ports/settings.js +2 -0
  330. package/dist/kernel/ports/settings.js.map +1 -0
  331. package/dist/kernel/public-api-base-url.d.ts +98 -0
  332. package/dist/kernel/public-api-base-url.d.ts.map +1 -0
  333. package/dist/kernel/public-api-base-url.js +144 -0
  334. package/dist/kernel/public-api-base-url.js.map +1 -0
  335. package/dist/kernel/request-scope-hook.d.ts +63 -0
  336. package/dist/kernel/request-scope-hook.d.ts.map +1 -0
  337. package/dist/kernel/request-scope-hook.js +67 -0
  338. package/dist/kernel/request-scope-hook.js.map +1 -0
  339. package/dist/kernel/sales-channels/channel-bridge-registry.d.ts +109 -0
  340. package/dist/kernel/sales-channels/channel-bridge-registry.d.ts.map +1 -0
  341. package/dist/kernel/sales-channels/channel-bridge-registry.js +75 -0
  342. package/dist/kernel/sales-channels/channel-bridge-registry.js.map +1 -0
  343. package/dist/kernel/sales-channels/compose.d.ts +69 -0
  344. package/dist/kernel/sales-channels/compose.d.ts.map +1 -0
  345. package/dist/kernel/sales-channels/compose.js +43 -0
  346. package/dist/kernel/sales-channels/compose.js.map +1 -0
  347. package/dist/kernel/sales-channels/default-channel-reconciler.d.ts +66 -0
  348. package/dist/kernel/sales-channels/default-channel-reconciler.d.ts.map +1 -0
  349. package/dist/kernel/sales-channels/default-channel-reconciler.js +91 -0
  350. package/dist/kernel/sales-channels/default-channel-reconciler.js.map +1 -0
  351. package/dist/kernel/sales-channels/no-system-default-channel.error.d.ts +28 -0
  352. package/dist/kernel/sales-channels/no-system-default-channel.error.d.ts.map +1 -0
  353. package/dist/kernel/sales-channels/no-system-default-channel.error.js +33 -0
  354. package/dist/kernel/sales-channels/no-system-default-channel.error.js.map +1 -0
  355. package/dist/kernel/sales-channels/request-channel-assortment.d.ts +72 -0
  356. package/dist/kernel/sales-channels/request-channel-assortment.d.ts.map +1 -0
  357. package/dist/kernel/sales-channels/request-channel-assortment.js +83 -0
  358. package/dist/kernel/sales-channels/request-channel-assortment.js.map +1 -0
  359. package/dist/kernel/sales-channels/sales-channel-membership.service.d.ts +157 -0
  360. package/dist/kernel/sales-channels/sales-channel-membership.service.d.ts.map +1 -0
  361. package/dist/kernel/sales-channels/sales-channel-membership.service.js +302 -0
  362. package/dist/kernel/sales-channels/sales-channel-membership.service.js.map +1 -0
  363. package/dist/kernel/sales-channels/sales-channel-resolver.middleware.d.ts +76 -0
  364. package/dist/kernel/sales-channels/sales-channel-resolver.middleware.d.ts.map +1 -0
  365. package/dist/kernel/sales-channels/sales-channel-resolver.middleware.js +184 -0
  366. package/dist/kernel/sales-channels/sales-channel-resolver.middleware.js.map +1 -0
  367. package/dist/kernel/sales-channels/sales-channel-resolver.service.d.ts +82 -0
  368. package/dist/kernel/sales-channels/sales-channel-resolver.service.d.ts.map +1 -0
  369. package/dist/kernel/sales-channels/sales-channel-resolver.service.js +126 -0
  370. package/dist/kernel/sales-channels/sales-channel-resolver.service.js.map +1 -0
  371. package/dist/kernel/sales-channels/sales-channel.entity.d.ts +50 -0
  372. package/dist/kernel/sales-channels/sales-channel.entity.d.ts.map +1 -0
  373. package/dist/kernel/sales-channels/sales-channel.entity.js +132 -0
  374. package/dist/kernel/sales-channels/sales-channel.entity.js.map +1 -0
  375. package/dist/kernel/sales-channels/sales-channels-cache.d.ts +170 -0
  376. package/dist/kernel/sales-channels/sales-channels-cache.d.ts.map +1 -0
  377. package/dist/kernel/sales-channels/sales-channels-cache.js +243 -0
  378. package/dist/kernel/sales-channels/sales-channels-cache.js.map +1 -0
  379. package/dist/kernel/scope.d.ts +153 -0
  380. package/dist/kernel/scope.d.ts.map +1 -0
  381. package/dist/kernel/scope.js +172 -0
  382. package/dist/kernel/scope.js.map +1 -0
  383. package/dist/kernel/settings/compose.d.ts +49 -0
  384. package/dist/kernel/settings/compose.d.ts.map +1 -0
  385. package/dist/kernel/settings/compose.js +21 -0
  386. package/dist/kernel/settings/compose.js.map +1 -0
  387. package/dist/kernel/settings/manifest-reconciler.d.ts +78 -0
  388. package/dist/kernel/settings/manifest-reconciler.d.ts.map +1 -0
  389. package/dist/kernel/settings/manifest-reconciler.js +343 -0
  390. package/dist/kernel/settings/manifest-reconciler.js.map +1 -0
  391. package/dist/kernel/settings/secret-value-codec.d.ts +52 -0
  392. package/dist/kernel/settings/secret-value-codec.d.ts.map +1 -0
  393. package/dist/kernel/settings/secret-value-codec.js +102 -0
  394. package/dist/kernel/settings/secret-value-codec.js.map +1 -0
  395. package/dist/kernel/settings/setting-group.entity.d.ts +25 -0
  396. package/dist/kernel/settings/setting-group.entity.d.ts.map +1 -0
  397. package/dist/kernel/settings/setting-group.entity.js +79 -0
  398. package/dist/kernel/settings/setting-group.entity.js.map +1 -0
  399. package/dist/kernel/settings/setting-value.entity.d.ts +23 -0
  400. package/dist/kernel/settings/setting-value.entity.d.ts.map +1 -0
  401. package/dist/kernel/settings/setting-value.entity.js +66 -0
  402. package/dist/kernel/settings/setting-value.entity.js.map +1 -0
  403. package/dist/kernel/settings/setting.entity.d.ts +56 -0
  404. package/dist/kernel/settings/setting.entity.d.ts.map +1 -0
  405. package/dist/kernel/settings/setting.entity.js +147 -0
  406. package/dist/kernel/settings/setting.entity.js.map +1 -0
  407. package/dist/kernel/settings/settings-cache.d.ts +158 -0
  408. package/dist/kernel/settings/settings-cache.d.ts.map +1 -0
  409. package/dist/kernel/settings/settings-cache.js +253 -0
  410. package/dist/kernel/settings/settings-cache.js.map +1 -0
  411. package/dist/kernel/settings/settings.service.d.ts +142 -0
  412. package/dist/kernel/settings/settings.service.d.ts.map +1 -0
  413. package/dist/kernel/settings/settings.service.js +294 -0
  414. package/dist/kernel/settings/settings.service.js.map +1 -0
  415. package/dist/lifecycle/backend.d.ts +51 -0
  416. package/dist/lifecycle/backend.d.ts.map +1 -0
  417. package/dist/lifecycle/backend.js +40 -0
  418. package/dist/lifecycle/backend.js.map +1 -0
  419. package/dist/lifecycle/commands/activation.commands.d.ts +97 -0
  420. package/dist/lifecycle/commands/activation.commands.d.ts.map +1 -0
  421. package/dist/lifecycle/commands/activation.commands.js +142 -0
  422. package/dist/lifecycle/commands/activation.commands.js.map +1 -0
  423. package/dist/lifecycle/commands/disable.d.ts +3 -0
  424. package/dist/lifecycle/commands/disable.d.ts.map +1 -0
  425. package/dist/lifecycle/commands/disable.js +126 -0
  426. package/dist/lifecycle/commands/disable.js.map +1 -0
  427. package/dist/lifecycle/commands/enable.d.ts +3 -0
  428. package/dist/lifecycle/commands/enable.d.ts.map +1 -0
  429. package/dist/lifecycle/commands/enable.js +102 -0
  430. package/dist/lifecycle/commands/enable.js.map +1 -0
  431. package/dist/lifecycle/commands/install.d.ts +3 -0
  432. package/dist/lifecycle/commands/install.d.ts.map +1 -0
  433. package/dist/lifecycle/commands/install.js +263 -0
  434. package/dist/lifecycle/commands/install.js.map +1 -0
  435. package/dist/lifecycle/commands/operator-entry.d.ts +104 -0
  436. package/dist/lifecycle/commands/operator-entry.d.ts.map +1 -0
  437. package/dist/lifecycle/commands/operator-entry.js +127 -0
  438. package/dist/lifecycle/commands/operator-entry.js.map +1 -0
  439. package/dist/lifecycle/commands/operator-runtime.d.ts +147 -0
  440. package/dist/lifecycle/commands/operator-runtime.d.ts.map +1 -0
  441. package/dist/lifecycle/commands/operator-runtime.js +40 -0
  442. package/dist/lifecycle/commands/operator-runtime.js.map +1 -0
  443. package/dist/lifecycle/commands/status.d.ts +3 -0
  444. package/dist/lifecycle/commands/status.d.ts.map +1 -0
  445. package/dist/lifecycle/commands/status.js +108 -0
  446. package/dist/lifecycle/commands/status.js.map +1 -0
  447. package/dist/lifecycle/commands/uninstall.d.ts +3 -0
  448. package/dist/lifecycle/commands/uninstall.d.ts.map +1 -0
  449. package/dist/lifecycle/commands/uninstall.js +223 -0
  450. package/dist/lifecycle/commands/uninstall.js.map +1 -0
  451. package/dist/lifecycle/divergence-declaration.d.ts +74 -0
  452. package/dist/lifecycle/divergence-declaration.d.ts.map +1 -0
  453. package/dist/lifecycle/divergence-declaration.js +92 -0
  454. package/dist/lifecycle/divergence-declaration.js.map +1 -0
  455. package/dist/lifecycle/i18n/en.json +4 -0
  456. package/dist/lifecycle/i18n/pl.json +4 -0
  457. package/dist/lifecycle/index.d.ts +110 -0
  458. package/dist/lifecycle/index.d.ts.map +1 -0
  459. package/dist/lifecycle/index.js +189 -0
  460. package/dist/lifecycle/index.js.map +1 -0
  461. package/dist/lifecycle/manifest-registry.d.ts +244 -0
  462. package/dist/lifecycle/manifest-registry.d.ts.map +1 -0
  463. package/dist/lifecycle/manifest-registry.js +223 -0
  464. package/dist/lifecycle/manifest-registry.js.map +1 -0
  465. package/dist/lifecycle/manifest.d.ts +166 -0
  466. package/dist/lifecycle/manifest.d.ts.map +1 -0
  467. package/dist/lifecycle/manifest.js +121 -0
  468. package/dist/lifecycle/manifest.js.map +1 -0
  469. package/dist/lifecycle/plugin.d.ts +56 -0
  470. package/dist/lifecycle/plugin.d.ts.map +1 -0
  471. package/dist/lifecycle/plugin.js +59 -0
  472. package/dist/lifecycle/plugin.js.map +1 -0
  473. package/dist/lifecycle/resident.d.ts +16 -0
  474. package/dist/lifecycle/resident.d.ts.map +1 -0
  475. package/dist/lifecycle/resident.js +59 -0
  476. package/dist/lifecycle/resident.js.map +1 -0
  477. package/dist/lifecycle/routes.admin.d.ts +57 -0
  478. package/dist/lifecycle/routes.admin.d.ts.map +1 -0
  479. package/dist/lifecycle/routes.admin.js +162 -0
  480. package/dist/lifecycle/routes.admin.js.map +1 -0
  481. package/dist/lifecycle/routes.storefront.d.ts +26 -0
  482. package/dist/lifecycle/routes.storefront.d.ts.map +1 -0
  483. package/dist/lifecycle/routes.storefront.js +36 -0
  484. package/dist/lifecycle/routes.storefront.js.map +1 -0
  485. package/dist/lifecycle/services/deactivation-ledger.d.ts +216 -0
  486. package/dist/lifecycle/services/deactivation-ledger.d.ts.map +1 -0
  487. package/dist/lifecycle/services/deactivation-ledger.js +171 -0
  488. package/dist/lifecycle/services/deactivation-ledger.js.map +1 -0
  489. package/dist/lifecycle/services/dep-graph.d.ts +119 -0
  490. package/dist/lifecycle/services/dep-graph.d.ts.map +1 -0
  491. package/dist/lifecycle/services/dep-graph.js +334 -0
  492. package/dist/lifecycle/services/dep-graph.js.map +1 -0
  493. package/dist/lifecycle/services/gating-graph.d.ts +164 -0
  494. package/dist/lifecycle/services/gating-graph.d.ts.map +1 -0
  495. package/dist/lifecycle/services/gating-graph.js +203 -0
  496. package/dist/lifecycle/services/gating-graph.js.map +1 -0
  497. package/dist/lifecycle/services/lock.d.ts +27 -0
  498. package/dist/lifecycle/services/lock.d.ts.map +1 -0
  499. package/dist/lifecycle/services/lock.js +82 -0
  500. package/dist/lifecycle/services/lock.js.map +1 -0
  501. package/dist/lifecycle/services/manifest-loader.d.ts +125 -0
  502. package/dist/lifecycle/services/manifest-loader.d.ts.map +1 -0
  503. package/dist/lifecycle/services/manifest-loader.js +210 -0
  504. package/dist/lifecycle/services/manifest-loader.js.map +1 -0
  505. package/dist/lifecycle/services/migration-ownership.d.ts +36 -0
  506. package/dist/lifecycle/services/migration-ownership.d.ts.map +1 -0
  507. package/dist/lifecycle/services/migration-ownership.js +15 -0
  508. package/dist/lifecycle/services/migration-ownership.js.map +1 -0
  509. package/dist/lifecycle/services/module-id-claims.d.ts +38 -0
  510. package/dist/lifecycle/services/module-id-claims.d.ts.map +1 -0
  511. package/dist/lifecycle/services/module-id-claims.js +123 -0
  512. package/dist/lifecycle/services/module-id-claims.js.map +1 -0
  513. package/dist/lifecycle/services/module-origin.d.ts +55 -0
  514. package/dist/lifecycle/services/module-origin.d.ts.map +1 -0
  515. package/dist/lifecycle/services/module-origin.js +47 -0
  516. package/dist/lifecycle/services/module-origin.js.map +1 -0
  517. package/dist/lifecycle/services/orchestrator.d.ts +235 -0
  518. package/dist/lifecycle/services/orchestrator.d.ts.map +1 -0
  519. package/dist/lifecycle/services/orchestrator.js +954 -0
  520. package/dist/lifecycle/services/orchestrator.js.map +1 -0
  521. package/dist/lifecycle/services/presence-load.d.ts +281 -0
  522. package/dist/lifecycle/services/presence-load.d.ts.map +1 -0
  523. package/dist/lifecycle/services/presence-load.js +437 -0
  524. package/dist/lifecycle/services/presence-load.js.map +1 -0
  525. package/dist/lifecycle/services/static-registry.d.ts +47 -0
  526. package/dist/lifecycle/services/static-registry.d.ts.map +1 -0
  527. package/dist/lifecycle/services/static-registry.js +41 -0
  528. package/dist/lifecycle/services/static-registry.js.map +1 -0
  529. package/dist/migrations/20260424T165847_core_foundation_init.d.ts +25 -0
  530. package/dist/migrations/20260424T165847_core_foundation_init.d.ts.map +1 -0
  531. package/dist/migrations/20260424T165847_core_foundation_init.js +238 -0
  532. package/dist/migrations/20260424T165847_core_foundation_init.js.map +1 -0
  533. package/dist/migrations/20260425T050720_core_commerce_init.d.ts +19 -0
  534. package/dist/migrations/20260425T050720_core_commerce_init.d.ts.map +1 -0
  535. package/dist/migrations/20260425T050720_core_commerce_init.js +200 -0
  536. package/dist/migrations/20260425T050720_core_commerce_init.js.map +1 -0
  537. package/dist/migrations/20260430T101450_core_settings_init.d.ts +25 -0
  538. package/dist/migrations/20260430T101450_core_settings_init.d.ts.map +1 -0
  539. package/dist/migrations/20260430T101450_core_settings_init.js +113 -0
  540. package/dist/migrations/20260430T101450_core_settings_init.js.map +1 -0
  541. package/dist/migrations/20260430T170044_core_sales_channels_promote.d.ts +67 -0
  542. package/dist/migrations/20260430T170044_core_sales_channels_promote.d.ts.map +1 -0
  543. package/dist/migrations/20260430T170044_core_sales_channels_promote.js +101 -0
  544. package/dist/migrations/20260430T170044_core_sales_channels_promote.js.map +1 -0
  545. package/dist/migrations/20260506T200657_core_module_lifecycle_init.d.ts +21 -0
  546. package/dist/migrations/20260506T200657_core_module_lifecycle_init.d.ts.map +1 -0
  547. package/dist/migrations/20260506T200657_core_module_lifecycle_init.js +41 -0
  548. package/dist/migrations/20260506T200657_core_module_lifecycle_init.js.map +1 -0
  549. package/dist/migrations/20260514T111329_core_settings_global_value.d.ts +30 -0
  550. package/dist/migrations/20260514T111329_core_settings_global_value.d.ts.map +1 -0
  551. package/dist/migrations/20260514T111329_core_settings_global_value.js +34 -0
  552. package/dist/migrations/20260514T111329_core_settings_global_value.js.map +1 -0
  553. package/dist/migrations/20260611T140411_core_settings_secret_value_type.d.ts +26 -0
  554. package/dist/migrations/20260611T140411_core_settings_secret_value_type.d.ts.map +1 -0
  555. package/dist/migrations/20260611T140411_core_settings_secret_value_type.js +63 -0
  556. package/dist/migrations/20260611T140411_core_settings_secret_value_type.js.map +1 -0
  557. package/dist/migrations/20260611T140419_core_settings_enum_options.d.ts +19 -0
  558. package/dist/migrations/20260611T140419_core_settings_enum_options.d.ts.map +1 -0
  559. package/dist/migrations/20260611T140419_core_settings_enum_options.js +23 -0
  560. package/dist/migrations/20260611T140419_core_settings_enum_options.js.map +1 -0
  561. package/dist/migrations/20260629T090100_core_settings_hidden_flag.d.ts +20 -0
  562. package/dist/migrations/20260629T090100_core_settings_hidden_flag.d.ts.map +1 -0
  563. package/dist/migrations/20260629T090100_core_settings_hidden_flag.js +24 -0
  564. package/dist/migrations/20260629T090100_core_settings_hidden_flag.js.map +1 -0
  565. package/dist/migrations/20260717T134752_core_tenant_scope_indexes.d.ts +27 -0
  566. package/dist/migrations/20260717T134752_core_tenant_scope_indexes.d.ts.map +1 -0
  567. package/dist/migrations/20260717T134752_core_tenant_scope_indexes.js +32 -0
  568. package/dist/migrations/20260717T134752_core_tenant_scope_indexes.js.map +1 -0
  569. package/dist/migrations/20260721T011510_core_settings_credential_ref_value_type.d.ts +24 -0
  570. package/dist/migrations/20260721T011510_core_settings_credential_ref_value_type.d.ts.map +1 -0
  571. package/dist/migrations/20260721T011510_core_settings_credential_ref_value_type.js +57 -0
  572. package/dist/migrations/20260721T011510_core_settings_credential_ref_value_type.js.map +1 -0
  573. package/dist/migrations/20260816T203339_core_retire_core_activation_settings.d.ts +39 -0
  574. package/dist/migrations/20260816T203339_core_retire_core_activation_settings.d.ts.map +1 -0
  575. package/dist/migrations/20260816T203339_core_retire_core_activation_settings.js +59 -0
  576. package/dist/migrations/20260816T203339_core_retire_core_activation_settings.js.map +1 -0
  577. package/dist/migrations/20260919T101500_core_module_registrations_boot_converged.d.ts +34 -0
  578. package/dist/migrations/20260919T101500_core_module_registrations_boot_converged.d.ts.map +1 -0
  579. package/dist/migrations/20260919T101500_core_module_registrations_boot_converged.js +38 -0
  580. package/dist/migrations/20260919T101500_core_module_registrations_boot_converged.js.map +1 -0
  581. package/dist/migrations/baseline-migrations.generated.d.ts +2 -0
  582. package/dist/migrations/baseline-migrations.generated.d.ts.map +1 -0
  583. package/dist/migrations/baseline-migrations.generated.js +136 -0
  584. package/dist/migrations/baseline-migrations.generated.js.map +1 -0
  585. package/dist/migrations/index.d.ts +62 -0
  586. package/dist/migrations/index.d.ts.map +1 -0
  587. package/dist/migrations/index.js +75 -0
  588. package/dist/migrations/index.js.map +1 -0
  589. package/dist/overlay/deployment-roots.d.ts +37 -0
  590. package/dist/overlay/deployment-roots.d.ts.map +1 -0
  591. package/dist/overlay/deployment-roots.js +90 -0
  592. package/dist/overlay/deployment-roots.js.map +1 -0
  593. package/dist/overlay/index.d.ts +62 -0
  594. package/dist/overlay/index.d.ts.map +1 -0
  595. package/dist/overlay/index.js +62 -0
  596. package/dist/overlay/index.js.map +1 -0
  597. package/dist/overlay/overlay-runtime.d.ts +173 -0
  598. package/dist/overlay/overlay-runtime.d.ts.map +1 -0
  599. package/dist/overlay/overlay-runtime.js +281 -0
  600. package/dist/overlay/overlay-runtime.js.map +1 -0
  601. package/dist/overlay/resolve-overlay.d.ts +41 -0
  602. package/dist/overlay/resolve-overlay.d.ts.map +1 -0
  603. package/dist/overlay/resolve-overlay.js +72 -0
  604. package/dist/overlay/resolve-overlay.js.map +1 -0
  605. package/dist/packages/index.d.ts +57 -0
  606. package/dist/packages/index.d.ts.map +1 -0
  607. package/dist/packages/index.js +57 -0
  608. package/dist/packages/index.js.map +1 -0
  609. package/dist/packages/installed-packages.d.ts +79 -0
  610. package/dist/packages/installed-packages.d.ts.map +1 -0
  611. package/dist/packages/installed-packages.js +312 -0
  612. package/dist/packages/installed-packages.js.map +1 -0
  613. package/dist/packages/package-entity-lookup.d.ts +120 -0
  614. package/dist/packages/package-entity-lookup.d.ts.map +1 -0
  615. package/dist/packages/package-entity-lookup.js +17 -0
  616. package/dist/packages/package-entity-lookup.js.map +1 -0
  617. package/dist/packages/package-runtime.d.ts +177 -0
  618. package/dist/packages/package-runtime.d.ts.map +1 -0
  619. package/dist/packages/package-runtime.js +386 -0
  620. package/dist/packages/package-runtime.js.map +1 -0
  621. package/dist/tenancy/derived-scope.d.ts +43 -0
  622. package/dist/tenancy/derived-scope.d.ts.map +1 -0
  623. package/dist/tenancy/derived-scope.js +76 -0
  624. package/dist/tenancy/derived-scope.js.map +1 -0
  625. package/dist/tenancy/escape-hatch.d.ts +30 -0
  626. package/dist/tenancy/escape-hatch.d.ts.map +1 -0
  627. package/dist/tenancy/escape-hatch.js +50 -0
  628. package/dist/tenancy/escape-hatch.js.map +1 -0
  629. package/dist/tenancy/filters.d.ts +87 -0
  630. package/dist/tenancy/filters.d.ts.map +1 -0
  631. package/dist/tenancy/filters.js +126 -0
  632. package/dist/tenancy/filters.js.map +1 -0
  633. package/dist/tenancy/index.d.ts +63 -0
  634. package/dist/tenancy/index.d.ts.map +1 -0
  635. package/dist/tenancy/index.js +61 -0
  636. package/dist/tenancy/index.js.map +1 -0
  637. package/dist/tenancy/org-scoped.decorator.d.ts +150 -0
  638. package/dist/tenancy/org-scoped.decorator.d.ts.map +1 -0
  639. package/dist/tenancy/org-scoped.decorator.js +339 -0
  640. package/dist/tenancy/org-scoped.decorator.js.map +1 -0
  641. package/dist/tenancy/org-write-guard.d.ts +106 -0
  642. package/dist/tenancy/org-write-guard.d.ts.map +1 -0
  643. package/dist/tenancy/org-write-guard.js +141 -0
  644. package/dist/tenancy/org-write-guard.js.map +1 -0
  645. package/dist/tenancy/resolve-tenant-context.d.ts +91 -0
  646. package/dist/tenancy/resolve-tenant-context.d.ts.map +1 -0
  647. package/dist/tenancy/resolve-tenant-context.js +85 -0
  648. package/dist/tenancy/resolve-tenant-context.js.map +1 -0
  649. package/dist/tenancy/scoped-em.d.ts +10 -0
  650. package/dist/tenancy/scoped-em.d.ts.map +1 -0
  651. package/dist/tenancy/scoped-em.js +11 -0
  652. package/dist/tenancy/scoped-em.js.map +1 -0
  653. package/dist/tenancy/tenant-context.d.ts +154 -0
  654. package/dist/tenancy/tenant-context.d.ts.map +1 -0
  655. package/dist/tenancy/tenant-context.js +109 -0
  656. package/dist/tenancy/tenant-context.js.map +1 -0
  657. package/package.json +123 -0
@@ -0,0 +1,16 @@
1
+ import type { RegisteredManifestEntry } from './manifest-registry.js';
2
+ /**
3
+ * Every module whose sources are this package's, as manifest entries.
4
+ *
5
+ * A function rather than a constant because `import.meta.url` is read once per
6
+ * call and the array is handed to callers that may sort or splice it; there is
7
+ * nothing here worth memoising.
8
+ *
9
+ * `origin: 'core'` is the truth and it is load-bearing: `deploymentShippedEntries`
10
+ * narrows the first-boot `module_registrations` insert and the boot settings
11
+ * reconcile to entries that are **not** `'package'`, and `_lifecycle` is not an
12
+ * installed package — there is no `module:install` that could converge it, so an
13
+ * instance whose registry never learns about it has no module registry at all.
14
+ */
15
+ export declare function platformResidentManifestEntries(): RegisteredManifestEntry[];
16
+ //# sourceMappingURL=resident.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resident.d.ts","sourceRoot":"","sources":["../../src/lifecycle/resident.ts"],"names":[],"mappings":"AA0CA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAGtE;;;;;;;;;;;;GAYG;AACH,wBAAgB,+BAA+B,IAAI,uBAAuB,EAAE,CAE3E"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * The modules that arrive **with this package** rather than with the tree that
3
+ * installs it (`specs/110-instance-repository/` T141).
4
+ *
5
+ * ## The defect this closes
6
+ *
7
+ * `_lifecycle` is a registered module that is not a package (D-160.11): its
8
+ * sources are this package's, at `lifecycle/`, and the only thing that has ever
9
+ * named it is this repository's own generated manifest index, through the
10
+ * host-internal `@endora-commerce/platform/lifecycle` subpath. An instance ships
11
+ * no generated index — that is what an instance *is* — so it passes `core: []`
12
+ * to {@link resolveManifestEntries} and composes `_lifecycle` nowhere.
13
+ *
14
+ * Measured on the first end-to-end run of `endora new instance` (T140), the boot
15
+ * refuses with `not-shipped: _lifecycle`, needed by `admin_actions`,
16
+ * `credentials`, `_i18n`, `prompt_actions` and `pwa` — every one of them in the
17
+ * default module set the command writes. There is nothing a client could put in
18
+ * their own tree to fix it: the module is ours, and the subpath that reaches it
19
+ * is one `check:platform-surface` gives a module a finding for naming.
20
+ *
21
+ * ## Why the platform contributes it, and why the host still may not be asked
22
+ *
23
+ * It is the same argument `../migrations/index.ts` makes for
24
+ * `BASELINE_MIGRATIONS` and `../db/platform-schema.ts` makes for the twelve
25
+ * migrations and six entities beside it: a datum that arrives by installing this
26
+ * package is this package's to supply, and a client receives a correction to it
27
+ * by `pnpm update`. The host keeps supplying **its** core registry, which is a
28
+ * fact about its own tree (R7.4); this adds what is a fact about ours.
29
+ *
30
+ * ## The `filePath` is this file, and that is not an approximation
31
+ *
32
+ * Every consumer of `filePath` takes `dirname` of it and joins a directory —
33
+ * `i18n.bundlesDir` above all, which the `_i18n` boot reconciler *logs and
34
+ * skips* when it is absent. `dirname` of this file is `lifecycle/`, which is
35
+ * where `i18n/en.json` and `i18n/pl.json` are, in the sources and in the build
36
+ * alike. It is the same directory `resolveManifestPath` answers for
37
+ * `@endora-commerce/platform/lifecycle` — that call resolves the subpath to
38
+ * `lifecycle/index.js` — reached here without a resolver, because a file knows
39
+ * where it is.
40
+ */
41
+ import { fileURLToPath } from 'node:url';
42
+ import { manifest } from './manifest.js';
43
+ /**
44
+ * Every module whose sources are this package's, as manifest entries.
45
+ *
46
+ * A function rather than a constant because `import.meta.url` is read once per
47
+ * call and the array is handed to callers that may sort or splice it; there is
48
+ * nothing here worth memoising.
49
+ *
50
+ * `origin: 'core'` is the truth and it is load-bearing: `deploymentShippedEntries`
51
+ * narrows the first-boot `module_registrations` insert and the boot settings
52
+ * reconcile to entries that are **not** `'package'`, and `_lifecycle` is not an
53
+ * installed package — there is no `module:install` that could converge it, so an
54
+ * instance whose registry never learns about it has no module registry at all.
55
+ */
56
+ export function platformResidentManifestEntries() {
57
+ return [{ manifest, filePath: fileURLToPath(import.meta.url), origin: 'core' }];
58
+ }
59
+ //# sourceMappingURL=resident.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resident.js","sourceRoot":"","sources":["../../src/lifecycle/resident.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,+BAA+B;IAC7C,OAAO,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;AAClF,CAAC"}
@@ -0,0 +1,57 @@
1
+ import type { FastifyInstance } from 'fastify';
2
+ import { type MfaEnrolmentCountPort } from '@endora-commerce/contracts';
3
+ import type { CommandBus } from '../commands/index.js';
4
+ import type { ApiInterceptorRegistry } from '../http/interceptors/index.js';
5
+ import type { ModuleLifecycleOrchestrator } from './services/orchestrator.js';
6
+ import { type ActivationPropagation } from './commands/activation.commands.js';
7
+ import type { RequireAdminFactory } from '../kernel/ports/require-admin.js';
8
+ export interface LifecycleAdminDeps {
9
+ orchestrator: ModuleLifecycleOrchestrator;
10
+ requireAdmin: RequireAdminFactory;
11
+ }
12
+ export declare function registerLifecycleAdminRoutes(app: FastifyInstance, deps: LifecycleAdminDeps): Promise<void>;
13
+ export interface ModulePresenceAdminDeps {
14
+ requireAdmin: RequireAdminFactory;
15
+ /**
16
+ * The write path's collaborators. Omitted in a composition that has no
17
+ * Command Bus — the projection still serves, because rendering a correct
18
+ * navigation must not depend on being able to change it.
19
+ */
20
+ activation?: {
21
+ commandBus: CommandBus;
22
+ propagation: ActivationPropagation;
23
+ };
24
+ /**
25
+ * `mfa`'s live enrolment count, for the deactivation-impact projection.
26
+ * Resolved lazily by `backend.ts`; this surface decides `mfa`'s presence
27
+ * before it calls, and treats a failure as "unavailable".
28
+ */
29
+ mfaEnrolmentCount: MfaEnrolmentCountPort;
30
+ }
31
+ /**
32
+ * Feature 073 — the presence projection and the activation write.
33
+ *
34
+ * Registered outside `defineModuleRoutes`, and not because this module holds a
35
+ * privilege: gating a surface that reports on module presence on module
36
+ * presence is circular, which is the same argument `ctx.ungatedRoutes` states
37
+ * for the liveness probes (D-36b).
38
+ *
39
+ * The activation write joins them under D-36. It backs the kernel-served
40
+ * `/platform/modules` screen rather than a module's own admin surface, so
41
+ * switching a module off can no longer remove the control that would switch it
42
+ * back on — the circle is gone rather than patched with a flag.
43
+ */
44
+ export declare function registerModulePresenceRoutes(app: FastifyInstance, deps: ModulePresenceAdminDeps): void;
45
+ export interface ApiInterceptorAdminDeps {
46
+ registry: ApiInterceptorRegistry;
47
+ requireAdmin: RequireAdminFactory;
48
+ }
49
+ /**
50
+ * Feature 060 — read-only diagnostics for the API interceptor mechanism.
51
+ * The response IS the execution plan: items sorted by target, then phase
52
+ * (pre before post), then execution order. `moduleEnabled` is resolved live
53
+ * from the enabled-set predicate at request time. Registrations are shipped
54
+ * module code, so there is no write surface (and no Command Bus involvement).
55
+ */
56
+ export declare function registerApiInterceptorAdminRoutes(app: FastifyInstance, deps: ApiInterceptorAdminDeps): void;
57
+ //# sourceMappingURL=routes.admin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes.admin.d.ts","sourceRoot":"","sources":["../../src/lifecycle/routes.admin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAUL,KAAK,qBAAqB,EAI3B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAE5E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAG9E,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAsB5E,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,2BAA2B,CAAC;IAC1C,YAAY,EAAE,mBAAmB,CAAC;CACnC;AAED,wBAAsB,4BAA4B,CAChD,GAAG,EAAE,eAAe,EACpB,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC,IAAI,CAAC,CAuBf;AAED,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,mBAAmB,CAAC;IAClC;;;;OAIG;IACH,UAAU,CAAC,EAAE;QACX,UAAU,EAAE,UAAU,CAAC;QACvB,WAAW,EAAE,qBAAqB,CAAC;KACpC,CAAC;IACF;;;;OAIG;IACH,iBAAiB,EAAE,qBAAqB,CAAC;CAC1C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,eAAe,EACpB,IAAI,EAAE,uBAAuB,GAC5B,IAAI,CA8GN;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,sBAAsB,CAAC;IACjC,YAAY,EAAE,mBAAmB,CAAC;CACnC;AAED;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAC/C,GAAG,EAAE,eAAe,EACpB,IAAI,EAAE,uBAAuB,GAC5B,IAAI,CAcN"}
@@ -0,0 +1,162 @@
1
+ import { AdminModulePresenceResponseSchema, ModuleActivationRequestSchema, ModuleActivationResponseSchema, ModuleDeactivationImpactSchema, ModuleListQuerySchema, ModuleListResponseSchema, apiInterceptorListSchema, } from '@endora-commerce/contracts';
2
+ import { HttpError } from '../http/error-envelope.js';
3
+ import { effectiveState, toModulePresenceDto } from '../kernel/lifecycle/effective-state.js';
4
+ import { rethrowIfModuleDisabled } from '../kernel/lifecycle/plugin-helpers.js';
5
+ import { makeSetActivationCommand, propagateActivationChange, } from './commands/activation.commands.js';
6
+ /**
7
+ * Read-only admin surface for the lifecycle subsystem (feature 018 / E-1).
8
+ *
9
+ * The platform axis stays CLI-only (per `contracts/admin-http.md` E-2
10
+ * deferred): installing, uninstalling, enabling and disabling a module at
11
+ * deployment level is deployment-operator work. The admin app renders an
12
+ * "Installed Modules" panel from this response and surfaces orphan /
13
+ * pending-upgrade flags as warnings.
14
+ *
15
+ * Feature 073 adds the **other** axis — the business operator's activation
16
+ * control — plus the presence projection both frontends resolve their surfaces
17
+ * from. Those two are not the same thing and the API keeps them apart.
18
+ */
19
+ /**
20
+ * Wire shape for one module. The conjunction is computed once, in the kernel,
21
+ * because a second surface reports a module's presence too (issue #96).
22
+ */
23
+ const toPresenceDto = toModulePresenceDto;
24
+ export async function registerLifecycleAdminRoutes(app, deps) {
25
+ app.get('/api/v1/admin/modules', {
26
+ preHandler: deps.requireAdmin('platform.modules.read'),
27
+ schema: {
28
+ querystring: ModuleListQuerySchema,
29
+ response: { 200: ModuleListResponseSchema },
30
+ },
31
+ }, async (request) => {
32
+ const query = ModuleListQuerySchema.parse(request.query);
33
+ const all = await deps.orchestrator.status();
34
+ let modules = all;
35
+ if (query.state) {
36
+ modules = modules.filter((m) => m.state === query.state);
37
+ }
38
+ if (query.flag) {
39
+ modules = modules.filter((m) => m.flags.includes(query.flag));
40
+ }
41
+ return { modules };
42
+ });
43
+ }
44
+ /**
45
+ * Feature 073 — the presence projection and the activation write.
46
+ *
47
+ * Registered outside `defineModuleRoutes`, and not because this module holds a
48
+ * privilege: gating a surface that reports on module presence on module
49
+ * presence is circular, which is the same argument `ctx.ungatedRoutes` states
50
+ * for the liveness probes (D-36b).
51
+ *
52
+ * The activation write joins them under D-36. It backs the kernel-served
53
+ * `/platform/modules` screen rather than a module's own admin surface, so
54
+ * switching a module off can no longer remove the control that would switch it
55
+ * back on — the circle is gone rather than patched with a flag.
56
+ */
57
+ export function registerModulePresenceRoutes(app, deps) {
58
+ /**
59
+ * No permission code, deliberately. Every admin needs this to render their
60
+ * own navigation; `platform.modules.read` is a restricted code, and gating
61
+ * presence behind it would leave most admins with an unfiltered sidebar —
62
+ * the exact leak this feature exists to close.
63
+ */
64
+ app.get('/api/v1/admin/module-presence', {
65
+ preHandler: deps.requireAdmin(),
66
+ schema: { response: { 200: AdminModulePresenceResponseSchema } },
67
+ }, async () => ({
68
+ modules: effectiveState.all().map(toPresenceDto),
69
+ degraded: effectiveState.isDegraded(),
70
+ }));
71
+ /**
72
+ * The live half of the deactivation confirmation — the owner's ruling on
73
+ * D-96.5, and the **first live datum** on a screen whose consequence rows are
74
+ * otherwise static facts about the code (one `whenAbsent` sentence per
75
+ * present dependent, from a manifest, computed by
76
+ * `deactivationConsequencesFor`).
77
+ *
78
+ * Read here rather than at flip time on purpose: the dialog renders *before*
79
+ * the operator confirms, while the module is still on, so
80
+ * `mfaEnrolmentCountPort` is asked through an **open** gate. The same
81
+ * question after the flip would be a read of `mfa_enrolments` through a
82
+ * closed one, which is why the "refuse only enrolled subjects" answer was
83
+ * ruled unimplementable (D-96.7). Nothing is cached, denormalised, or
84
+ * expected to survive deactivation.
85
+ *
86
+ * Two failure modes, one policy: **the number never blocks the flip.** If
87
+ * `mfa` is already off there is no dialog and no count; if the read fails,
88
+ * this answers `null` and the dialog renders the rest of the consequences
89
+ * saying the count is unavailable. The presence decision is taken *before*
90
+ * the `try`, so an absent module and a broken query are not one silent
91
+ * `null`, and `rethrowIfModuleDisabled` is the first line of the `catch` so a
92
+ * flip racing this read still fails closed rather than being laundered into
93
+ * "unavailable".
94
+ */
95
+ app.get('/api/v1/admin/modules/:id/deactivation-impact', {
96
+ preHandler: deps.requireAdmin('platform.modules.activate'),
97
+ schema: { response: { 200: ModuleDeactivationImpactSchema } },
98
+ }, async (request) => {
99
+ const moduleId = request.params.id;
100
+ if (moduleId !== 'mfa' || !effectiveState.isPresent('mfa')) {
101
+ return { moduleId, activeSecondFactorUsers: null };
102
+ }
103
+ try {
104
+ return {
105
+ moduleId,
106
+ activeSecondFactorUsers: await deps.mfaEnrolmentCount.countActiveEnrolments(),
107
+ };
108
+ }
109
+ catch (error) {
110
+ // Narrow tolerance, and the reason is the product's: an operator must
111
+ // be able to switch a module off when a count cannot be produced.
112
+ // Everything else in the dialog is still true without it.
113
+ rethrowIfModuleDisabled(error);
114
+ request.log.warn({ err: error, moduleId }, '[lifecycle] the active-second-factor count could not be read; the deactivation ' +
115
+ 'dialog renders without it');
116
+ return { moduleId, activeSecondFactorUsers: null };
117
+ }
118
+ });
119
+ if (!deps.activation)
120
+ return;
121
+ const { commandBus, propagation } = deps.activation;
122
+ app.post('/api/v1/admin/modules/:id/activation', {
123
+ preHandler: deps.requireAdmin('platform.modules.activate'),
124
+ schema: {
125
+ body: ModuleActivationRequestSchema,
126
+ response: { 200: ModuleActivationResponseSchema },
127
+ },
128
+ }, async (request) => {
129
+ const body = ModuleActivationRequestSchema.parse(request.body);
130
+ const moduleId = request.params.id;
131
+ // The Command's factory performs the refusals, so an invalid flip never
132
+ // opens a transaction. `CommandBus.run` resolves the actor from the
133
+ // ambient TenantContext and throws without one, which satisfies FR-007's
134
+ // actor requirement without this handler naming an actor at all.
135
+ const result = await commandBus.run(makeSetActivationCommand({ moduleId, active: body.active }));
136
+ await propagateActivationChange(propagation, result);
137
+ const presence = effectiveState.presence(moduleId);
138
+ if (!presence) {
139
+ throw new HttpError(500, 'INTERNAL', `Module "${moduleId}" vanished from the presence projection after its activation was written.`);
140
+ }
141
+ return { module: toPresenceDto(presence) };
142
+ });
143
+ }
144
+ /**
145
+ * Feature 060 — read-only diagnostics for the API interceptor mechanism.
146
+ * The response IS the execution plan: items sorted by target, then phase
147
+ * (pre before post), then execution order. `moduleEnabled` is resolved live
148
+ * from the enabled-set predicate at request time. Registrations are shipped
149
+ * module code, so there is no write surface (and no Command Bus involvement).
150
+ */
151
+ export function registerApiInterceptorAdminRoutes(app, deps) {
152
+ app.get('/api/v1/admin/api-interceptors', {
153
+ preHandler: deps.requireAdmin('platform.modules.read'),
154
+ schema: { response: { 200: apiInterceptorListSchema } },
155
+ }, async () => ({
156
+ items: deps.registry.list().map((item) => ({
157
+ ...item,
158
+ moduleEnabled: deps.registry.isModuleEnabled(item.module),
159
+ })),
160
+ }));
161
+ }
162
+ //# sourceMappingURL=routes.admin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes.admin.js","sourceRoot":"","sources":["../../src/lifecycle/routes.admin.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,26 @@
1
+ import type { FastifyInstance } from 'fastify';
2
+ /**
3
+ * The storefront's presence projection — feature 073, FR-030 / FR-035.
4
+ *
5
+ * Owned by `_lifecycle` because `_lifecycle` is non-deactivatable. The
6
+ * storefront's most-called endpoint is `GET /api/v1/i18n/config`, resolved on
7
+ * every page in `getServerContext()`, but it belongs to `languages` — a
8
+ * deactivatable module — so hanging presence off it would make presence depend
9
+ * on something that can be switched off. `shop-info` is owned by `settings`
10
+ * (non-deactivatable) but is not called on every request.
11
+ *
12
+ * Only `{ id, present }`: the storefront has no use for the two axes. "Not
13
+ * installed here" and "the operator switched it off" are the same fact to a
14
+ * buyer, and giving the storefront the distinction would only create a second
15
+ * place where the conjunction could be recomputed differently.
16
+ *
17
+ * Absence is **projected, never inferred from a 503.** Nearly every storefront
18
+ * fetch already swallows errors into defaults, so gating the API alone yields
19
+ * silent defaults rather than absence — the storefront would keep rendering an
20
+ * empty module surface, which is precisely what Constitution XVII forbids.
21
+ *
22
+ * Public: the response says which capabilities a storefront renders, which is
23
+ * already observable from the pages themselves.
24
+ */
25
+ export declare function registerModulePresenceStorefrontRoutes(app: FastifyInstance): void;
26
+ //# sourceMappingURL=routes.storefront.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes.storefront.d.ts","sourceRoot":"","sources":["../../src/lifecycle/routes.storefront.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAO/C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,sCAAsC,CAAC,GAAG,EAAE,eAAe,GAAG,IAAI,CAajF"}
@@ -0,0 +1,36 @@
1
+ import { StorefrontModulePresenceResponseSchema, } from '@endora-commerce/contracts';
2
+ import { effectiveState } from '../kernel/lifecycle/effective-state.js';
3
+ /**
4
+ * The storefront's presence projection — feature 073, FR-030 / FR-035.
5
+ *
6
+ * Owned by `_lifecycle` because `_lifecycle` is non-deactivatable. The
7
+ * storefront's most-called endpoint is `GET /api/v1/i18n/config`, resolved on
8
+ * every page in `getServerContext()`, but it belongs to `languages` — a
9
+ * deactivatable module — so hanging presence off it would make presence depend
10
+ * on something that can be switched off. `shop-info` is owned by `settings`
11
+ * (non-deactivatable) but is not called on every request.
12
+ *
13
+ * Only `{ id, present }`: the storefront has no use for the two axes. "Not
14
+ * installed here" and "the operator switched it off" are the same fact to a
15
+ * buyer, and giving the storefront the distinction would only create a second
16
+ * place where the conjunction could be recomputed differently.
17
+ *
18
+ * Absence is **projected, never inferred from a 503.** Nearly every storefront
19
+ * fetch already swallows errors into defaults, so gating the API alone yields
20
+ * silent defaults rather than absence — the storefront would keep rendering an
21
+ * empty module surface, which is precisely what Constitution XVII forbids.
22
+ *
23
+ * Public: the response says which capabilities a storefront renders, which is
24
+ * already observable from the pages themselves.
25
+ */
26
+ export function registerModulePresenceStorefrontRoutes(app) {
27
+ app.get('/api/v1/storefront/module-presence', { schema: { response: { 200: StorefrontModulePresenceResponseSchema } } }, async () => ({
28
+ modules: effectiveState
29
+ .all()
30
+ .map((state) => ({
31
+ id: state.moduleId,
32
+ present: state.platformAvailable && state.operatorActivated,
33
+ })),
34
+ }));
35
+ }
36
+ //# sourceMappingURL=routes.storefront.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes.storefront.js","sourceRoot":"","sources":["../../src/lifecycle/routes.storefront.ts"],"names":[],"mappings":"AACA,OAAO,EACL,sCAAsC,GAEvC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAExE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,sCAAsC,CAAC,GAAoB;IACzE,GAAG,CAAC,GAAG,CACL,oCAAoC,EACpC,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,EAAE,GAAG,EAAE,sCAAsC,EAAE,EAAE,EAAE,EACzE,KAAK,IAA+C,EAAE,CAAC,CAAC;QACtD,OAAO,EAAE,cAAc;aACpB,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACf,EAAE,EAAE,KAAK,CAAC,QAAQ;YAClB,OAAO,EAAE,KAAK,CAAC,iBAAiB,IAAI,KAAK,CAAC,iBAAiB;SAC5D,CAAC,CAAC;KACN,CAAC,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,216 @@
1
+ import type { NonBindingPortEdge } from './gating-graph.js';
2
+ /**
3
+ * The deactivation-consequence ledger — feature 074, FR-017 … FR-023.
4
+ *
5
+ * **This is not machinery bought for CI.** It is the data the confirmation
6
+ * dialog renders. Principle XVII's flip-time refusal is becoming an informed
7
+ * confirmation, which means the platform may come to rest with a present module
8
+ * depending on an absent one — so every seam between them needs an answer to
9
+ * *"what happens?"*, and the operator being asked to accept the flip needs the
10
+ * same answer, by name, before the write. Two independent computations of "what
11
+ * will stop working" would drift, and the CI one would be the copy nobody
12
+ * reads. So there is one:
13
+ *
14
+ * - {@link buildDeactivationLedger} assigns an outcome to every cross-module
15
+ * edge whose owner an operator may switch off, and reports the edges it can
16
+ * assign none to. `check-port-dependencies.ts` fails the build on that
17
+ * second list.
18
+ * - {@link deactivationConsequencesFor} projects the *same entries* into the
19
+ * rows an operator is shown. It is the **only** way those rows may be
20
+ * computed: the presence projection the dialog reads and the 409
21
+ * `MODULE_DEACTIVATION_UNCONFIRMED` envelope the write is refused with each
22
+ * call it, so FR-022's equality — the id set in the dialog equals the id set
23
+ * in `details.consequences` — holds by being one expression evaluated twice
24
+ * rather than two lists somebody keeps in step. A second computation of
25
+ * "what will stop working" anywhere in the tree is the defect, however
26
+ * correct it looks on the day it is written.
27
+ *
28
+ * The module is **pure**: it takes the edges as data and reads no tree, no
29
+ * container and no manifest index. That is what lets the build-time caller
30
+ * supply them from a TypeScript scan and a runtime caller supply them from the
31
+ * composed deployment without the classification differing between the two.
32
+ *
33
+ * **What exists today, honestly.** The build-time caller is
34
+ * `backend/scripts/check-port-dependencies.ts`, which measures the reads with
35
+ * the TypeScript compiler API. The two runtime callers are 074's later phases
36
+ * and do not exist yet; what this file settles ahead of them is that there is
37
+ * one classifier and one projection for both to call, and one place — the
38
+ * classification below — where a change reaches the build gate and the operator
39
+ * screen together.
40
+ *
41
+ * The four acceptable outcomes and the one unacceptable one are FR-017's table;
42
+ * {@link DeactivationOutcome} and {@link UnassignedShape} carry them.
43
+ */
44
+ /**
45
+ * What happens to a dependent when the module it reads is switched off.
46
+ *
47
+ * - `fails-closed` — the calls that touch the owner answer 503
48
+ * `MODULE_DISABLED`, everything else in the dependent keeps working. The
49
+ * default for a call-time read of a gated port, and equally for a read of a
50
+ * registry whose host *skips* an absent owner's entry: the caller gets
51
+ * nothing back, which is the same answer arriving at enumeration instead of
52
+ * at the port. A `refuses-without` entry reaches the same outcome **and
53
+ * brings a sentence with it** — same behaviour, named rather than inferred.
54
+ * - `degrades` — the dependent keeps working with less, as its own manifest
55
+ * declares. The `whenAbsent` sentence is the one the dialog renders.
56
+ * - `contributes` — nothing happens: a boot-time push into an ungated table
57
+ * the host filters, or a host that deliberately honours an absent owner's
58
+ * entry.
59
+ * - `schema-only` — nothing happens: deactivation drops no tables, so a
60
+ * foreign key into the owner's schema stays valid.
61
+ */
62
+ export type DeactivationOutcome = 'fails-closed' | 'degrades' | 'contributes' | 'schema-only';
63
+ /**
64
+ * The three shapes of "silently wrong, or a crash" — each a *fail-open* rather
65
+ * than a fail-closed, and each a build failure.
66
+ *
67
+ * - `captured-registration` — the name is read once, at construction, so it
68
+ * keeps answering after its owner is switched off.
69
+ * - `registry-without-policy` — an ungated registration whose owner has not
70
+ * said what happens to an entry, or to a caller, while it is absent. The
71
+ * host is the only party that can answer, because the answer depends on the
72
+ * contributor and a gate on the host's own registration cannot express that.
73
+ * - `gated-port-before-first-request` — a gated port resolved from a boot hook
74
+ * or a route-registration body, where the gate's "no" stops the next start
75
+ * instead of stopping one request.
76
+ */
77
+ export type UnassignedShape = 'captured-registration' | 'registry-without-policy' | 'gated-port-before-first-request';
78
+ /** One cross-module read of a registration, as the caller measured it. */
79
+ export interface CrossModuleRead {
80
+ /** The module doing the reading. */
81
+ readonly moduleId: string;
82
+ /** The module that owns the registration. */
83
+ readonly dependsOn: string;
84
+ /** The registration name. */
85
+ readonly name: string;
86
+ /** Registered with `di.providePort`, so resolving it asks a presence gate. */
87
+ readonly gated: boolean;
88
+ /** Resolved once, when the reading module's registration is constructed. */
89
+ readonly captured: boolean;
90
+ /** When the read happens, relative to the first request the platform serves. */
91
+ readonly site: 'boot' | 'wiring' | 'call';
92
+ }
93
+ export interface LedgerEntry {
94
+ /** The dependent. */
95
+ readonly moduleId: string;
96
+ /** The module an operator would be switching off. */
97
+ readonly dependsOn: string;
98
+ /** The registration the edge runs over; `null` for an edge with no container read under it. */
99
+ readonly name: string | null;
100
+ readonly outcome: DeactivationOutcome;
101
+ /**
102
+ * The dependent's own sentence. Always set for `degrades`; set for
103
+ * `fails-closed` when the dependent declared `refuses-without`, and `null`
104
+ * for the fail-closed the gate produces on its own.
105
+ */
106
+ readonly whenAbsent: string | null;
107
+ }
108
+ export interface UnassignedEdge {
109
+ readonly moduleId: string;
110
+ readonly dependsOn: string;
111
+ readonly name: string;
112
+ readonly shape: UnassignedShape;
113
+ readonly detail: string;
114
+ }
115
+ export interface DeactivationLedger {
116
+ readonly entries: readonly LedgerEntry[];
117
+ readonly unassigned: readonly UnassignedEdge[];
118
+ /**
119
+ * Reads left out because the name is not the owning module's registration —
120
+ * see {@link LedgerInput.excludedNames}. Counted rather than dropped, so a
121
+ * growing exclusion is visible in the check's own output line.
122
+ */
123
+ readonly excluded: number;
124
+ }
125
+ export interface LedgerInput {
126
+ /** Every cross-module read the caller measured. */
127
+ readonly reads: readonly CrossModuleRead[];
128
+ /** moduleId → `manifest.dependencies`, for the edges with no read under them. */
129
+ readonly declaredDependencies: ReadonlyMap<string, readonly string[]>;
130
+ /** The `nonBindingDependencies` edges, flattened (D-44). */
131
+ readonly nonBinding: readonly NonBindingPortEdge[];
132
+ /**
133
+ * Modules the platform refuses to switch off on either axis. Their edges need
134
+ * no outcome: the flip cannot happen, so there is no state to describe
135
+ * (FR-021).
136
+ */
137
+ readonly neverAbsentOwners: ReadonlySet<string>;
138
+ /**
139
+ * The `acknowledgedDependencies` edges, as `<dependent>` + `<name>` — D-101 §5.
140
+ *
141
+ * They are the one exception to the line above, and the exception is about
142
+ * *states* rather than flips. `nonDeactivatable` binds the transition: an
143
+ * operator cannot switch the owner off, and no `--force` exists. It does not
144
+ * bind the **initial state** — a deployment may omit the module outright, and
145
+ * since D-101 it may do so only by declaring the omission in a committed
146
+ * per-deployment ledger. The consequence rows are what that declaration is
147
+ * read against: the difference between "we shipped without `admin_users`" and
148
+ * "we shipped without `admin_users`, and here are the seams that now fail
149
+ * closed."
150
+ *
151
+ * Only the acknowledged edges, because they are the ones a reader checking
152
+ * what a deployment loses would otherwise never see — an edge deliberately
153
+ * withheld from `dependencies` shows up in no array they would think to read.
154
+ */
155
+ readonly acknowledged: readonly {
156
+ readonly moduleId: string;
157
+ readonly name: string;
158
+ }[];
159
+ /**
160
+ * `<owner>:<name>` → what the host does with an entry whose owner is absent.
161
+ * `skip` answers as if the entry were not registered; `honour` returns it
162
+ * anyway, deliberately and with a reason written at the class.
163
+ */
164
+ readonly contributionPolicies: Readonly<Record<string, 'skip' | 'honour'>>;
165
+ /**
166
+ * Names a **composition root** registers on the owning module's behalf. They
167
+ * are excluded rather than classified: a root's registration does not
168
+ * disappear when the module it stands in for is switched off, so there is no
169
+ * host that could state a policy for it, and nothing the owning module can
170
+ * declare. Their ledger is the bridging table itself, which drains as each
171
+ * name becomes a real port.
172
+ */
173
+ readonly excludedNames: ReadonlySet<string>;
174
+ }
175
+ /**
176
+ * Assign an outcome to every cross-module edge, and report the ones that get
177
+ * none.
178
+ *
179
+ * Rule order is load-bearing and reads top to bottom as "what could make this
180
+ * edge lie to an operator?": a capture survives every other answer the edge
181
+ * might have had, because it is about *when* the name is read rather than what
182
+ * it answers; a gated port resolved too early takes the platform down rather
183
+ * than the request; only then do the declarations and the gate get to speak.
184
+ */
185
+ export declare function buildDeactivationLedger(input: LedgerInput): DeactivationLedger;
186
+ /** One row of the confirmation dialog, and one element of `details.consequences`. */
187
+ export interface ConsequenceRow {
188
+ /** The dependent that has the consequence. */
189
+ readonly moduleId: string;
190
+ readonly effect: 'unavailable' | 'degraded';
191
+ /**
192
+ * The dependent's own `whenAbsent` sentence, or `null` when it declared none
193
+ * — in which case the caller renders the platform's translated default.
194
+ */
195
+ readonly description: string | null;
196
+ }
197
+ /**
198
+ * The rows an operator is shown before switching `moduleId` off, and the rows
199
+ * the refusal carries when they have not acknowledged them.
200
+ *
201
+ * One row per dependent, whatever the number of edges between the two: an
202
+ * operator is choosing about modules, not about registrations. Where a
203
+ * dependent both pulls and contributes, **the pull decides** — a contribution
204
+ * costs nothing and saying so beside a capability that stops would be a
205
+ * consequence list that reads as reassurance.
206
+ *
207
+ * **The sentence follows the effect that wins**, and it has to, now that
208
+ * `fails-closed` can carry one. A dependent that degrades on one edge and
209
+ * refuses on another gets `unavailable`, and pairing that word with the
210
+ * degrade's *"keeps working with less"* sentence would be a row that
211
+ * contradicts itself in six words. A declared sentence is still kept when the
212
+ * winning effect has none of its own, because it is then the only specific
213
+ * thing the platform knows about that dependent.
214
+ */
215
+ export declare function deactivationConsequencesFor(entries: readonly LedgerEntry[], moduleId: string, isPresent: (dependentId: string) => boolean): ConsequenceRow[];
216
+ //# sourceMappingURL=deactivation-ledger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deactivation-ledger.d.ts","sourceRoot":"","sources":["../../../src/lifecycle/services/deactivation-ledger.ts"],"names":[],"mappings":"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"}