@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,223 @@
1
+ /**
2
+ * The manifest registry's **derivation** — the core entries, the origin field,
3
+ * the path refusal, the collision assembly and the three-way merge
4
+ * (`specs/115-lifecycle-container-move/`, D115-2;
5
+ * `contracts/operator-half.md` §3).
6
+ *
7
+ * ## Why it is here and its input is not
8
+ *
9
+ * All of this lived in `backend/src/lifecycle/registered-manifests.ts`, because
10
+ * its **input** does: the generated manifest index is a fact about one
11
+ * repository's tree, is bare core under every value of `DEPLOYMENT` (D-104), and
12
+ * an instance's is a different file (D-160.3). But *"which modules exist, which
13
+ * of them claim the same id, and where did each entry come from"* is platform
14
+ * logic, and it sat in the application only because the artefact that answers
15
+ * the first clause is the application's.
16
+ *
17
+ * So the index is a **parameter**, never a reach: {@link coreManifestEntries}
18
+ * takes the discovered array and {@link resolveManifestEntries} takes
19
+ * {@link ManifestSources}. That is `specs/110-instance-repository/` FR-014
20
+ * stated as a mechanism, and the precedent is one directory over —
21
+ * `services/gating-graph.ts`'s `provideDefaultGatingManifests` is the host
22
+ * installing a supplier the platform refuses to default, with a comment saying
23
+ * exactly why the platform cannot read the registry itself. What that comment
24
+ * did not do is apply the reasoning to the derivation, which is what this file
25
+ * is.
26
+ *
27
+ * A parameter rather than a supplier slot, and the distinction is R3.2's: a slot
28
+ * is right for a *fallback* most processes never need and that must refuse
29
+ * rather than default. "Which modules exist" is answered at import,
30
+ * deterministically, by whoever built the binding; a slot would make *"did
31
+ * anyone supply it, and when?"* a runtime question in the one file whose job is
32
+ * to have the answer.
33
+ *
34
+ * ## What is left in the application, and why it is twenty lines
35
+ *
36
+ * `backend/src/lifecycle/registered-manifests.ts` keeps its path and every name
37
+ * it exports, and binds three suppliers — the generated index, this deployment's
38
+ * overlay scan and this instance's installed packages. 121 files import that
39
+ * path; moving the *file* would be a 121-file rewrite whose entire content is a
40
+ * path, and moving the *derivation* is a one-file edit. An instance writes the
41
+ * same twenty lines against its own three answers, which it owns regardless.
42
+ */
43
+ import { assertNoModuleIdCollisions, } from './services/module-id-claims.js';
44
+ import { platformResidentManifestEntries } from './resident.js';
45
+ function optionalExports(found) {
46
+ return {
47
+ ...(found.installHook ? { installHook: found.installHook } : {}),
48
+ ...(found.uninstallHook ? { uninstallHook: found.uninstallHook } : {}),
49
+ ...(found.lifecycleParticipant
50
+ ? { lifecycleParticipant: found.lifecycleParticipant }
51
+ : {}),
52
+ ...(found.cliCommands ? { cliCommands: found.cliCommands } : {}),
53
+ ...(found.recentActivity ? { recentActivity: found.recentActivity } : {}),
54
+ };
55
+ }
56
+ function entryFor(discovered, filePath) {
57
+ return {
58
+ manifest: discovered.manifest,
59
+ filePath,
60
+ // The generated index is bare core under every value of `DEPLOYMENT`
61
+ // (D-104), so every entry it carries is one this build ships — including a
62
+ // module that has become a workspace package, which the composer bakes in
63
+ // with a bare specifier (D-149).
64
+ origin: 'core',
65
+ ...optionalExports(discovered),
66
+ };
67
+ }
68
+ /** Raised when an index entry carries no location for the manifest it imported. */
69
+ export class ManifestPathMissingError extends Error {
70
+ name = 'ManifestPathMissingError';
71
+ }
72
+ /**
73
+ * The core registry: every discovered module, with the location the generator
74
+ * recorded for it.
75
+ *
76
+ * The index has no deployment entry to filter out any more (D-104). It is a
77
+ * walk of the shared core tree and nothing else, whatever `DEPLOYMENT` is set
78
+ * to when it is generated — which is what makes the committed artefact mean the
79
+ * same thing in every environment, and what makes a stale one detectable
80
+ * (FR-004, issue #120).
81
+ *
82
+ * **The path is read, not computed** (feature 080, T041a). It used to be
83
+ * `join(MODULES_ROOT, entry.id, 'manifest.ts')` — a convention, holding for as
84
+ * long as every module sits at `backend/src/modules/<id>/`, and giving a
85
+ * confident wrong answer the moment one does not. There is no reader of
86
+ * `filePath` that does not take `dirname` of it and join a directory: the
87
+ * `_i18n` boot reconciler joins `bundlesDir`, the orchestrator hands the same
88
+ * directory to the install-time bundle load, and both **skip** a directory that
89
+ * is absent. So a packaged module would have loaded no bundle, rendered every
90
+ * command-palette label as its raw key, and reported nothing anywhere.
91
+ *
92
+ * An entry with no path is therefore refused rather than defaulted. There is no
93
+ * honest fallback: the only candidate is the convention that just stopped
94
+ * holding, and a registry that answers with a directory nobody verified is the
95
+ * failure this replaces. The type makes the field required, which is what stops
96
+ * a *new* emitter from omitting it; this refusal is for the older artefact — a
97
+ * committed index generated before the field existed, or a hand-edited one —
98
+ * which the type cannot reach because it was compiled against a different shape.
99
+ */
100
+ export function coreManifestEntries(discovered) {
101
+ return discovered.map((entry) => {
102
+ const manifestPath = entry.manifestPath;
103
+ if (typeof manifestPath !== 'string' || manifestPath.length === 0) {
104
+ throw new ManifestPathMissingError(`[registered-manifests] the generated index entry for '${entry.id}' carries no ` +
105
+ `manifestPath. Every consumer takes dirname() of it to reach the module's own ` +
106
+ `directory — its i18n bundles above all — and there is no convention left to ` +
107
+ `guess one from, because a module may now live in a workspace package. ` +
108
+ `Regenerate the index: pnpm --filter backend run composer:generate`);
109
+ }
110
+ return entryFor(entry, manifestPath);
111
+ });
112
+ }
113
+ /**
114
+ * The **instance-resolved** manifest set = the core registry, PLUS every
115
+ * overlay module the active deployment ships (feature 057, D-104), PLUS every
116
+ * Endora module package installed in this instance's `node_modules` (feature
117
+ * 080, D-119/D-155).
118
+ *
119
+ * All three arrive through {@link ManifestSources}, each from the one
120
+ * implementation that discovers it. There used to be two overlay
121
+ * implementations: this function merged the generated index's overlay entries,
122
+ * `composition.ts` merged the runtime scan's, and the one under test was not
123
+ * the one that ran.
124
+ *
125
+ * Runtime discovery is not an optimisation, it is the only correct answer, and
126
+ * D-104's predicate gives it for both: an artefact is committed when its
127
+ * content is a fact about *the tree*, and resolved at runtime when it is a fact
128
+ * about *the process*. Which deployment this process runs as is one; which
129
+ * packages an operator installed into this instance is the other. For a
130
+ * bare-core build with nothing installed — every developer checkout and every
131
+ * test run — both discoveries come back empty and this returns the core
132
+ * registry unchanged (FR-008).
133
+ *
134
+ * ## Collisions: one rule, whoever the claimants are
135
+ *
136
+ * A module id claimed twice is **refused**, naming every claimant's file
137
+ * (T030c, D-155.7; widened to the overlay by feature 103, FR-004).
138
+ *
139
+ * The overlay half used to be answered differently — dropped with a `continue`,
140
+ * on the reading that a deployment shadowing a module it authored is what the
141
+ * overlay mechanism is for. File shadowing is retired (D-201), so that reading
142
+ * has nothing left to refer to, and it was never the whole answer anyway: this
143
+ * function dropped the manifest while `overlayModuleEntriesUnder` composed the
144
+ * module, so the deployment ran a module the resolved registry did not know
145
+ * about — no `module_registrations` row, no permission-catalogue entry, and its
146
+ * routes gated on the effective state of somebody else's module of the same id.
147
+ * Principle XVII defeated in silence.
148
+ *
149
+ * The refusal an overlay claim reaches is raised **before** this function sees
150
+ * it, inside the overlay scan, so that the composition path reaches the same
151
+ * rule without depending on a composition root calling this function first.
152
+ * What is left here is the claim set no single scan can assemble: core, the
153
+ * overlay and every installed package at once, so an operator with two bad
154
+ * packages has to run this only once.
155
+ */
156
+ export async function resolveManifestEntries(sources) {
157
+ const overlay = await sources.overlay();
158
+ const packages = await sources.packages();
159
+ const byId = new Map(sources.core.map((entry) => [entry.manifest.id, entry]));
160
+ // The platform's own resident modules (`specs/110-instance-repository/` T141).
161
+ // `_lifecycle`'s sources are this package's, so the only tree that could name
162
+ // it is one carrying a generated index — and an instance carries none, which
163
+ // is what left every instance refusing its own boot with
164
+ // `not-shipped: _lifecycle`, needed by five modules of the set the scaffolder
165
+ // itself writes.
166
+ //
167
+ // **Only where the host did not name it**, and appended rather than seeded, so
168
+ // a host that does — this repository's generated index, through the
169
+ // host-internal subpath — keeps its own entry *and* its own order. A `set`
170
+ // over an existing key would keep the position and replace the value, which is
171
+ // a difference nothing here needs to make. It is deliberately absent from the
172
+ // claim set below for the same reason: two names for one module is not a
173
+ // collision and must not be reported as one.
174
+ for (const resident of platformResidentManifestEntries()) {
175
+ if (!byId.has(resident.manifest.id))
176
+ byId.set(resident.manifest.id, resident);
177
+ }
178
+ for (const found of overlay) {
179
+ byId.set(found.id, {
180
+ manifest: found.manifest,
181
+ filePath: found.filePath,
182
+ origin: 'overlay',
183
+ ...optionalExports(found),
184
+ });
185
+ }
186
+ // Every claim at once, so the refusal reports all of them rather than the
187
+ // first — an operator with two bad packages should have to run this once.
188
+ //
189
+ // Assembled from the three discoveries and **not** from `byId`, which is keyed
190
+ // by id: reading the claim set off it would be asking a map that has already
191
+ // resolved the collision whether there was one.
192
+ const claims = [
193
+ ...sources.core.map((entry) => ({
194
+ id: entry.manifest.id,
195
+ origin: entry.origin,
196
+ claimedBy: entry.filePath,
197
+ })),
198
+ ...overlay.map((found) => ({
199
+ id: found.id,
200
+ origin: 'overlay',
201
+ claimedBy: found.filePath,
202
+ })),
203
+ ];
204
+ for (const found of packages) {
205
+ claims.push({
206
+ id: found.id,
207
+ origin: 'package',
208
+ claimedBy: found.filePath,
209
+ name: found.packageName,
210
+ });
211
+ }
212
+ assertNoModuleIdCollisions(claims);
213
+ for (const found of packages) {
214
+ byId.set(found.id, {
215
+ manifest: found.manifest,
216
+ filePath: found.filePath,
217
+ origin: 'package',
218
+ ...optionalExports(found),
219
+ });
220
+ }
221
+ return [...byId.values()];
222
+ }
223
+ //# sourceMappingURL=manifest-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest-registry.js","sourceRoot":"","sources":["../../src/lifecycle/manifest-registry.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,166 @@
1
+ /**
2
+ * Bootstrap manifest for the lifecycle subsystem itself. Carries no
3
+ * dependencies and no settings — every other module's manifest is
4
+ * discovered relative to this sentinel entry.
5
+ */
6
+ export declare const manifest: {
7
+ id: string;
8
+ name: string;
9
+ version: string;
10
+ dependencies: string[];
11
+ description?: string | undefined;
12
+ acknowledgedDependencies?: {
13
+ moduleId: string;
14
+ port: string;
15
+ reason: string;
16
+ }[] | undefined;
17
+ nonBindingDependencies?: {
18
+ moduleId: string;
19
+ name: string;
20
+ kind: "contributes-to" | "degrades-without" | "refuses-without";
21
+ reason: string;
22
+ whenAbsent?: string | undefined;
23
+ }[] | undefined;
24
+ activation?: {
25
+ settingCode: string;
26
+ default: boolean;
27
+ } | {
28
+ nonDeactivatable: true;
29
+ reason: string;
30
+ } | undefined;
31
+ settings?: {
32
+ moduleCode: string;
33
+ groups: {
34
+ code: string;
35
+ name: string;
36
+ salesChannelCodes?: string[] | undefined;
37
+ isSystemProtected?: boolean | undefined;
38
+ }[];
39
+ settings: {
40
+ code: string;
41
+ name: string;
42
+ valueType: "string" | "number" | "boolean" | "json" | "string_list" | "secret" | "credential_ref";
43
+ defaultValue: unknown;
44
+ description?: string | undefined;
45
+ groupCode?: string | undefined;
46
+ previousDefaultValues?: unknown[] | undefined;
47
+ salesChannelCodes?: string[] | undefined;
48
+ enumOptions?: string[] | undefined;
49
+ configurationType?: string | undefined;
50
+ hidden?: boolean | undefined;
51
+ }[];
52
+ } | undefined;
53
+ i18n?: {
54
+ bundlesDir: string;
55
+ } | undefined;
56
+ docs?: false | {
57
+ dir: string;
58
+ } | undefined;
59
+ demo?: false | {
60
+ summary: string;
61
+ seed: (context: import("@endora-commerce/contracts").ModuleDemoContext<never>) => Promise<import("@endora-commerce/contracts").DemoSeedResult>;
62
+ reset: (context: import("@endora-commerce/contracts").ModuleDemoContext<never>) => Promise<import("@endora-commerce/contracts").DemoResetResult>;
63
+ after?: readonly string[] | undefined;
64
+ package?: string | undefined;
65
+ } | undefined;
66
+ actions?: {
67
+ id: string;
68
+ labelKey: string;
69
+ icon: "Plus" | "Sparkles" | "Settings" | "Search" | "Boxes" | "Layers" | "Menu" | "PlusCircle" | "PlusSquare" | "FilePlus" | "FolderPlus" | "Upload" | "FileUp" | "CloudUpload" | "Download" | "FileDown" | "FileText" | "BookOpen" | "Rss" | "Package" | "Tag" | "ShoppingCart" | "Receipt" | "CreditCard" | "Users" | "UserPlus" | "Inbox" | "ListChecks" | "ClipboardList" | "Image" | "Video" | "LayoutDashboard" | "PanelLeft" | "KeyRound" | "ShieldCheck" | "Edit" | "Archive" | "Box" | "Truck" | "CircleDollarSign" | "Activity" | "LineChart" | "Smartphone" | "Webhook" | "Scale" | "PlugZap" | "PercentDiamond" | "Newspaper" | "Languages" | "Eraser" | "Warehouse" | "TrendingDown" | "Bell" | "PackageOpen" | "Building2" | "Store" | "ClipboardCheck";
70
+ targetRoute: string;
71
+ keywords: string[];
72
+ weight: number;
73
+ descriptionKey?: string | undefined;
74
+ requiredPermission?: string | undefined;
75
+ }[] | undefined;
76
+ permissions?: {
77
+ code: string;
78
+ label: string;
79
+ module?: string | undefined;
80
+ description?: string | undefined;
81
+ requires?: string[] | undefined;
82
+ }[] | undefined;
83
+ transactionalEmails?: {
84
+ code: string;
85
+ name: string;
86
+ variables: {
87
+ key: string;
88
+ label: string;
89
+ sampleValue?: string | undefined;
90
+ description?: string | undefined;
91
+ }[];
92
+ description?: string | undefined;
93
+ group?: string | undefined;
94
+ }[] | undefined;
95
+ capabilities?: string[] | undefined;
96
+ exclusiveCapabilities?: {
97
+ key: string;
98
+ errorCode: string;
99
+ }[] | undefined;
100
+ errorCodes?: {
101
+ code: string;
102
+ tokens?: string[] | undefined;
103
+ }[] | undefined;
104
+ blocks?: {
105
+ name: string;
106
+ labelKey: string;
107
+ category: string;
108
+ contexts: ("invoice" | "email" | "cms" | "newsletter")[];
109
+ fields: Record<string, {
110
+ type: "number" | "object" | "array" | "uuid" | "text" | "textarea" | "select" | "radio" | "external" | "richtext";
111
+ label?: string | undefined;
112
+ required?: boolean | undefined;
113
+ options?: {
114
+ label: string;
115
+ value: string | number;
116
+ }[] | undefined;
117
+ refKind?: string | undefined;
118
+ }>;
119
+ descriptionKey?: string | undefined;
120
+ defaultProps?: Record<string, unknown> | undefined;
121
+ responsiveFields?: string[] | undefined;
122
+ previewIcon?: string | undefined;
123
+ weight?: number | undefined;
124
+ }[] | undefined;
125
+ blockCategories?: {
126
+ key: string;
127
+ titleKey: string;
128
+ contexts: ("invoice" | "email" | "cms" | "newsletter")[];
129
+ weight?: number | undefined;
130
+ visible?: boolean | undefined;
131
+ }[] | undefined;
132
+ env?: {
133
+ name: string;
134
+ describes: {
135
+ en: string;
136
+ pl: string;
137
+ };
138
+ requirement: {
139
+ kind: "required";
140
+ } | {
141
+ kind: "requiredWhen";
142
+ input: string;
143
+ equals: string;
144
+ } | {
145
+ kind: "optional";
146
+ without: {
147
+ en: string;
148
+ pl: string;
149
+ };
150
+ };
151
+ secret: boolean;
152
+ generable: boolean;
153
+ owner: {
154
+ kind: "platform";
155
+ } | {
156
+ kind: "application";
157
+ application: "admin" | "backend" | "storefront";
158
+ } | {
159
+ kind: "module";
160
+ moduleId: string;
161
+ };
162
+ consumers: ("admin" | "backend" | "storefront")[];
163
+ addressOf: "admin" | "backend" | "storefront" | null;
164
+ }[] | undefined;
165
+ };
166
+ //# sourceMappingURL=manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/lifecycle/manifest.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsHnB,CAAC"}
@@ -0,0 +1,121 @@
1
+ import { defineModuleManifest } from '@endora-commerce/contracts';
2
+ /**
3
+ * Bootstrap manifest for the lifecycle subsystem itself. Carries no
4
+ * dependencies and no settings — every other module's manifest is
5
+ * discovered relative to this sentinel entry.
6
+ */
7
+ export const manifest = defineModuleManifest({
8
+ id: '_lifecycle',
9
+ name: 'Module Lifecycle',
10
+ description: 'Platform-internal subsystem that orchestrates install / uninstall / ' +
11
+ 'enable / disable / status across every domain module.',
12
+ version: '1.0.0',
13
+ dependencies: [],
14
+ /**
15
+ * The one edge this subsystem resolves and cannot declare (issue #90).
16
+ *
17
+ * Its two admin surfaces — the API-interceptor screen and the module presence
18
+ * projection — are guarded by `auth`'s `requireAdmin` port, exactly as every
19
+ * other admin surface is. `dependencies` is the wrong home for it: that array
20
+ * drives the **install order**, and this is the sentinel manifest every other
21
+ * module's installation is recorded against, so ordering it after `auth` (and
22
+ * transitively `admin_roles`) would have those modules install before the
23
+ * registry that records an installation exists. With `auth` absent the gate
24
+ * refuses and these surfaces answer 503 exactly as every other admin route
25
+ * does — which is what the edge costs, said as a behaviour rather than as a
26
+ * claim about a lock the build re-derives on every run (D-100). It stayed
27
+ * invisible until `check-port-dependencies` learned to follow a module-local
28
+ * cradle alias.
29
+ */
30
+ acknowledgedDependencies: [
31
+ {
32
+ moduleId: 'auth',
33
+ port: 'requireAdmin',
34
+ reason: 'The lifecycle admin surfaces are guarded by requireAdmin like every other admin ' +
35
+ 'surface, but this is the sentinel manifest the install order starts from: declaring ' +
36
+ 'auth would install it, and admin_roles, before the registry that records an ' +
37
+ 'installation. With auth absent the gate refuses and these surfaces answer 503, ' +
38
+ 'exactly as every other admin route does.',
39
+ },
40
+ ],
41
+ /**
42
+ * The live datum on the deactivation-confirmation screen (owner ruling on
43
+ * D-96.5): how many people hold a second factor, read from `mfa` before an
44
+ * operator switches it off.
45
+ *
46
+ * Non-binding, and it has to be: this is the sentinel manifest the install
47
+ * order starts from, and a module that reports on every module's presence may
48
+ * not be made to depend on one of them. `mfa` is the most switchable module
49
+ * in the tree — a client security policy — and the whole point of this read
50
+ * is to inform the flip, not to refuse it.
51
+ */
52
+ nonBindingDependencies: [
53
+ {
54
+ moduleId: 'mfa',
55
+ name: 'mfaEnrolmentCountPort',
56
+ kind: 'degrades-without',
57
+ whenAbsent: 'The deactivation dialog renders every consequence except the number of users who ' +
58
+ 'currently hold a second factor, which is shown as unavailable.',
59
+ reason: 'GET /api/v1/admin/modules/:id/deactivation-impact answers the one question the ' +
60
+ 'consequence rows cannot: how many people this flip affects. The count is a read of ' +
61
+ '`mfa_enrolments`, which `mfa` owns, so it arrives through a port and never as a ' +
62
+ 'query this module writes. The route decides `mfa`\'s presence before it resolves ' +
63
+ 'anything — an already-off module has no dialog to render — and a read that fails ' +
64
+ 'answers `null` rather than blocking the operator, because a number that could not ' +
65
+ 'be fetched is not a reason to refuse a deactivation.',
66
+ },
67
+ ],
68
+ // Feature 074 (Constitution XVII), test C1 — reachability. The ground is the
69
+ // presence machinery itself: this module resolves every other module's two
70
+ // axes, owns the orchestrator that flips them and the Command the activation
71
+ // endpoint runs, so switched off there is no way back on for anything,
72
+ // including itself. That is a statement about what this module *is*, not
73
+ // about the screen it once hosted — D-36 moved the activation surface to
74
+ // `/platform/modules`, which belongs to no module, and the old circular
75
+ // argument went with it. The `_`-prefix rule is the structural second
76
+ // ground: `assertActivationRules` (`packages/contracts/src/modules.ts`)
77
+ // refuses any other activation form for a platform-internal id. The route
78
+ // exemption (`ctx.ungatedRoutes`, T125) is a separate mechanism and is not
79
+ // what this declaration rests on.
80
+ activation: {
81
+ nonDeactivatable: true,
82
+ reason: 'Owns the presence machinery and the activation switches themselves; switched off, ' +
83
+ 'there is no way back on.',
84
+ },
85
+ i18n: { bundlesDir: 'i18n' },
86
+ /**
87
+ * Principle XVI. The screen that says what this deployment offers and what
88
+ * the business has switched on is reachable from ⌘K, not only from a nav
89
+ * entry buried under System — it is the surface an operator goes looking for
90
+ * precisely when something is missing and they cannot find the sidebar item
91
+ * for it, because the module owning it is off.
92
+ *
93
+ * One action, deliberately: the write is a per-module flip with no route of
94
+ * its own, so a palette entry per module would be a route dump.
95
+ */
96
+ actions: [
97
+ {
98
+ id: 'open-platform-modules',
99
+ labelKey: 'actions.openPlatformModules.label',
100
+ descriptionKey: 'actions.openPlatformModules.description',
101
+ icon: 'Boxes',
102
+ targetRoute: '/platform/modules',
103
+ requiredPermission: 'platform.modules.read',
104
+ keywords: ['modules', 'moduły', 'włącz', 'wyłącz', 'enable', 'disable', 'platform'],
105
+ weight: 300,
106
+ },
107
+ ],
108
+ permissions: [
109
+ {
110
+ code: 'platform.modules.read',
111
+ module: 'module_lifecycle',
112
+ label: 'View module lifecycle status',
113
+ },
114
+ {
115
+ code: 'platform.modules.activate',
116
+ module: 'module_lifecycle',
117
+ label: 'Switch modules on and off',
118
+ },
119
+ ],
120
+ });
121
+ //# sourceMappingURL=manifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/lifecycle/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,oBAAoB,CAAC;IAC3C,EAAE,EAAE,YAAY;IAChB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EACT,sEAAsE;QACtE,uDAAuD;IACzD,OAAO,EAAE,OAAO;IAChB,YAAY,EAAE,EAAE;IAChB;;;;;;;;;;;;;;;OAeG;IACH,wBAAwB,EAAE;QACxB;YACE,QAAQ,EAAE,MAAM;YAChB,IAAI,EAAE,cAAc;YACpB,MAAM,EACJ,kFAAkF;gBAClF,sFAAsF;gBACtF,8EAA8E;gBAC9E,iFAAiF;gBACjF,0CAA0C;SAC7C;KACF;IACD;;;;;;;;;;OAUG;IACH,sBAAsB,EAAE;QACtB;YACE,QAAQ,EAAE,KAAK;YACf,IAAI,EAAE,uBAAuB;YAC7B,IAAI,EAAE,kBAAkB;YACxB,UAAU,EACR,mFAAmF;gBACnF,gEAAgE;YAClE,MAAM,EACJ,iFAAiF;gBACjF,qFAAqF;gBACrF,kFAAkF;gBAClF,mFAAmF;gBACnF,mFAAmF;gBACnF,oFAAoF;gBACpF,sDAAsD;SACzD;KACF;IACD,6EAA6E;IAC7E,2EAA2E;IAC3E,6EAA6E;IAC7E,uEAAuE;IACvE,yEAAyE;IACzE,yEAAyE;IACzE,wEAAwE;IACxE,sEAAsE;IACtE,wEAAwE;IACxE,0EAA0E;IAC1E,2EAA2E;IAC3E,kCAAkC;IAClC,UAAU,EAAE;QACV,gBAAgB,EAAE,IAAI;QACtB,MAAM,EACJ,oFAAoF;YACpF,0BAA0B;KAC7B;IACD,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE;IAC5B;;;;;;;;;OASG;IACH,OAAO,EAAE;QACP;YACE,EAAE,EAAE,uBAAuB;YAC3B,QAAQ,EAAE,mCAAmC;YAC7C,cAAc,EAAE,yCAAyC;YACzD,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,mBAAmB;YAChC,kBAAkB,EAAE,uBAAuB;YAC3C,QAAQ,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC;YACnF,MAAM,EAAE,GAAG;SACZ;KACF;IACD,WAAW,EAAE;QACX;YACE,IAAI,EAAE,uBAAuB;YAC7B,MAAM,EAAE,kBAAkB;YAC1B,KAAK,EAAE,8BAA8B;SACtC;QACD;YACE,IAAI,EAAE,2BAA2B;YACjC,MAAM,EAAE,kBAAkB;YAC1B,KAAK,EAAE,2BAA2B;SACnC;KACF;CACF,CAAC,CAAC"}
@@ -0,0 +1,56 @@
1
+ import type { EntityManager, MikroORM } from '@mikro-orm/postgresql';
2
+ import type { Redis } from 'ioredis';
3
+ import type { ModulePlugin } from '../http/server.js';
4
+ import type { AuditPort } from '../kernel/ports/audit.js';
5
+ import { ModuleLifecycleOrchestrator, type OrchestratorDeps } from './services/orchestrator.js';
6
+ import type { ModuleRegistryCache } from '../kernel/lifecycle/registry-cache.js';
7
+ import { buildStaticRegistry } from './services/static-registry.js';
8
+ import type { LoadedManifestRegistry } from './services/manifest-loader.js';
9
+ export interface LifecycleModuleDeps {
10
+ orm: MikroORM;
11
+ redis: Redis;
12
+ /** Subscriber-mode Redis client; ioredis requires a separate connection for pub/sub. */
13
+ redisSubscriber: Redis;
14
+ emFactory: () => EntityManager;
15
+ auditLog: AuditPort;
16
+ /**
17
+ * Either a pre-built registry (production composition root supplies the
18
+ * static one), or a manifest list the module composes itself.
19
+ *
20
+ * Since feature 080's T036a it also carries the lifecycle participants the
21
+ * orchestrator runs on every install and hard uninstall — see
22
+ * `OrchestratorDeps.registry`. The two reconcilers this interface used to
23
+ * forward are gone with it: they were services only a composition root could
24
+ * resolve, which is why the five `module:*` commands passed neither.
25
+ */
26
+ registry: LoadedManifestRegistry;
27
+ /**
28
+ * Who owns which migration, for `uninstall --hard` (feature 080, T033).
29
+ *
30
+ * Forwarded rather than computed: the merged answer depends on which
31
+ * extension packages this instance installed, which only a composition root
32
+ * knows. Omitted, the orchestrator answers from the committed core registry
33
+ * and refuses a hard uninstall it cannot enumerate — see `OrchestratorDeps`.
34
+ */
35
+ migrationOwnership?: OrchestratorDeps['migrationOwnership'];
36
+ }
37
+ export interface LifecycleModuleHandle {
38
+ orchestrator: ModuleLifecycleOrchestrator;
39
+ registryCache: ModuleRegistryCache;
40
+ registry: LoadedManifestRegistry;
41
+ }
42
+ export interface LifecycleModule {
43
+ /** Composition handle exposed to other modules and the test harness. */
44
+ handle: LifecycleModuleHandle;
45
+ /** Fastify plugin — registers the read-only admin endpoint (US4). */
46
+ plugin: ModulePlugin;
47
+ }
48
+ export declare function lifecycleModule(deps: LifecycleModuleDeps): LifecycleModule;
49
+ /**
50
+ * Convenience factory for the production composition root: build the
51
+ * lifecycle module from a static list of manifest entries plus the
52
+ * cross-cutting deps. Other call sites (CLI scripts, tests) typically
53
+ * pass a `LoadedManifestRegistry` they already discovered.
54
+ */
55
+ export declare function lifecycleModuleFromStaticEntries(deps: Omit<LifecycleModuleDeps, 'registry'>, entries: Parameters<typeof buildStaticRegistry>[0]): LifecycleModule;
56
+ //# sourceMappingURL=plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/lifecycle/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EACL,2BAA2B,EAC3B,KAAK,gBAAgB,EACtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,mBAAmB,EAAC,MAAM,uCAAuC,CAAC;AAIpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAE5E,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,QAAQ,CAAC;IACd,KAAK,EAAE,KAAK,CAAC;IACb,wFAAwF;IACxF,eAAe,EAAE,KAAK,CAAC;IACvB,SAAS,EAAE,MAAM,aAAa,CAAC;IAC/B,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;;;;;;OASG;IACH,QAAQ,EAAE,sBAAsB,CAAC;IACjC;;;;;;;OAOG;IACH,kBAAkB,CAAC,EAAE,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;CAC7D;AAED,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,2BAA2B,CAAC;IAC1C,aAAa,EAAE,mBAAmB,CAAC;IACnC,QAAQ,EAAE,sBAAsB,CAAC;CAClC;AAED,MAAM,WAAW,eAAe;IAC9B,wEAAwE;IACxE,MAAM,EAAE,qBAAqB,CAAC;IAC9B,qEAAqE;IACrE,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,mBAAmB,GAAG,eAAe,CA6C1E;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,IAAI,CAAC,mBAAmB,EAAE,UAAU,CAAC,EAC3C,OAAO,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,GACjD,eAAe,CAKjB"}
@@ -0,0 +1,59 @@
1
+ import { ModuleLifecycleOrchestrator, } from './services/orchestrator.js';
2
+ import { registryCache } from '../kernel/lifecycle/registry-cache.js';
3
+ import { buildStaticRegistry } from './services/static-registry.js';
4
+ export function lifecycleModule(deps) {
5
+ const orchestrator = new ModuleLifecycleOrchestrator({
6
+ orm: deps.orm,
7
+ redis: deps.redis,
8
+ em: deps.emFactory,
9
+ auditLog: deps.auditLog,
10
+ registry: deps.registry,
11
+ ...(deps.migrationOwnership ? { migrationOwnership: deps.migrationOwnership } : {}),
12
+ });
13
+ // Feature 072 (D-38) — what is left of the boot half: arming the pub/sub
14
+ // subscriber that keeps the loaded presence fresh.
15
+ //
16
+ // The load itself is gone from here, and that is the point. Loading at plugin
17
+ // attach means loading inside `buildServer`, i.e. after `composeApp()` has
18
+ // registered every module and run every boot hook — while eleven of those
19
+ // hooks resolve a gated port. `loadModulePresence()` now runs as a
20
+ // composition step before the first module registers; see
21
+ // `services/presence-load.ts`.
22
+ //
23
+ // Three things went with it:
24
+ // - the first-boot reconciler, which is the load's first half;
25
+ // - `registryCache.start`, split into `load()` (fatal, PostgreSQL) and
26
+ // `watch()` (non-fatal, Redis);
27
+ // - the resume-everything worker loop. It existed to undo the pauses a cold
28
+ // cache caused at registration, and it iterated `enabledIds()` — the
29
+ // platform axis alone — so it resumed the workers of a module the
30
+ // operator had deactivated (a live Constitution XVII hole). With presence
31
+ // loaded before composition, `defineModuleWorker` sees the true effective
32
+ // state at registration and there is nothing to undo.
33
+ const plugin = async () => {
34
+ await registryCache.watch({
35
+ redisSubscriber: deps.redisSubscriber,
36
+ em: deps.emFactory,
37
+ });
38
+ // Feature 072 (T125) — the four route registrations moved to
39
+ // `backend.ts`, where they are declared through `ctx.ungatedRoutes` with
40
+ // the reason attached.
41
+ };
42
+ return {
43
+ handle: { orchestrator, registryCache, registry: deps.registry },
44
+ plugin,
45
+ };
46
+ }
47
+ /**
48
+ * Convenience factory for the production composition root: build the
49
+ * lifecycle module from a static list of manifest entries plus the
50
+ * cross-cutting deps. Other call sites (CLI scripts, tests) typically
51
+ * pass a `LoadedManifestRegistry` they already discovered.
52
+ */
53
+ export function lifecycleModuleFromStaticEntries(deps, entries) {
54
+ return lifecycleModule({
55
+ ...deps,
56
+ registry: buildStaticRegistry(entries),
57
+ });
58
+ }
59
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../src/lifecycle/plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,2BAA2B,GAE5B,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EACL,aAAa,EACd,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AA6CpE,MAAM,UAAU,eAAe,CAAC,IAAyB;IACvD,MAAM,YAAY,GAAG,IAAI,2BAA2B,CAAC;QACnD,GAAG,EAAE,IAAI,CAAC,GAAG;QACb,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,EAAE,EAAE,IAAI,CAAC,SAAS;QAClB,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,GAAG,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACzD,CAAC,CAAC;IAE9B,yEAAyE;IACzE,mDAAmD;IACnD,EAAE;IACF,8EAA8E;IAC9E,2EAA2E;IAC3E,0EAA0E;IAC1E,mEAAmE;IACnE,0DAA0D;IAC1D,+BAA+B;IAC/B,EAAE;IACF,6BAA6B;IAC7B,iEAAiE;IACjE,yEAAyE;IACzE,oCAAoC;IACpC,8EAA8E;IAC9E,yEAAyE;IACzE,sEAAsE;IACtE,8EAA8E;IAC9E,8EAA8E;IAC9E,0DAA0D;IAC1D,MAAM,MAAM,GAAiB,KAAK,IAAI,EAAE;QACtC,MAAM,aAAa,CAAC,KAAK,CAAC;YACxB,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,EAAE,EAAE,IAAI,CAAC,SAAS;SACnB,CAAC,CAAC;QAEH,6DAA6D;QAC7D,yEAAyE;QACzE,uBAAuB;IACzB,CAAC,CAAC;IAEF,OAAO;QACL,MAAM,EAAE,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE;QAChE,MAAM;KACP,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gCAAgC,CAC9C,IAA2C,EAC3C,OAAkD;IAElD,OAAO,eAAe,CAAC;QACrB,GAAG,IAAI;QACP,QAAQ,EAAE,mBAAmB,CAAC,OAAO,CAAC;KACvC,CAAC,CAAC;AACL,CAAC"}