@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,170 @@
1
+ /**
2
+ * Two modules claim to own one capability (R3.4).
3
+ *
4
+ * A distinct error type, per D-101's closing rule about the refusals that share a
5
+ * manifest declaration and share nothing else: this refuses a **deployment that
6
+ * was assembled wrong**, from the manifests, before the first module registers —
7
+ * not a transition an operator asked for, and not something to answer with an
8
+ * HTTP envelope.
9
+ *
10
+ * It fails closed rather than picking a claimant, because a contested capability
11
+ * routes to neither: the refusal code, the lock row and the admin page all belong
12
+ * to "the owner", and with two of them every one of those three answers is
13
+ * arbitrary. `check:error-translations` reaches the same verdict about a code with
14
+ * two declarers, and for the same reason.
15
+ */
16
+ export class ContestedCapabilityError extends Error {
17
+ findings;
18
+ constructor(findings) {
19
+ super(refusalMessage(findings));
20
+ this.name = 'ContestedCapabilityError';
21
+ this.findings = findings;
22
+ }
23
+ }
24
+ function refusalMessage(findings) {
25
+ const lines = [
26
+ 'This deployment will not start: a capability is claimed by more than one owner.',
27
+ '',
28
+ ];
29
+ for (const finding of findings) {
30
+ lines.push(` ${finding.key} — claimed by ${finding.ownerModuleIds.join(', ')}`, ' Each of them declares it in `exclusiveCapabilities`, so the refusal code, the', ' activation lock and the claim-holder page would all have two owners and the', ' exclusion would route to neither.', '');
31
+ }
32
+ lines.push('Exactly one installed module may own a capability. A module that merely *belongs* to the', 'family declares it in `capabilities` instead; ownership is the declaration that the family', 'is mutually exclusive and mints the code an operator meets.');
33
+ return lines.join('\n');
34
+ }
35
+ /**
36
+ * A member of an **exclusive** capability declares `activation.default: true`
37
+ * (R3.6, spec FR-016).
38
+ *
39
+ * ## Why this is a refusal and not a runtime tolerance
40
+ *
41
+ * `resolveActivation` returns `Map<string, boolean>` and carries **no provenance**:
42
+ * nothing downstream can tell "the operator wrote this row" from "no row exists and
43
+ * the manifest said `true`". So a mutual exclusion resolved on the activation axis
44
+ * cannot ask the question it needs to ask, and a default-activated member holds a
45
+ * claim nobody made — which is what an operator meets as a refusal naming a
46
+ * connector they never configured.
47
+ *
48
+ * The tempting repair is to add provenance and have the exclusion require an
49
+ * **explicit** choice. It is unsafe, and `research.md` D6 records why: member `A`
50
+ * default-activated and member `B` explicitly activated would then **both** be
51
+ * active, because the test that was supposed to refuse `B` now ignores `A`. A mutual
52
+ * exclusion may not fail open. Refusing the manifest makes the state unreachable
53
+ * rather than tolerated, which is the difference between a guard and a repair.
54
+ *
55
+ * ## Why it is weaker-looking than the defect it prevents, and is not
56
+ *
57
+ * The exclusion is a `pre` interceptor on the activation route, so it guards the
58
+ * **transition** and not the **existing state**: two default-activated members are
59
+ * both present from the first boot and no transition ever happens to be refused.
60
+ * Nothing surfaces it. That is not a hypothetical — it was measured on a freshly
61
+ * migrated database, three connectors deep, before this refusal existed.
62
+ *
63
+ * ## Why not `defineModuleManifest`
64
+ *
65
+ * Same reason {@link ContestedCapabilityError} is not there: that function sees one
66
+ * manifest and cannot see whether the key is **exclusive**, which is the owner's
67
+ * declaration. Both facts are in hand only here. `check:port-dependencies` carries
68
+ * the same assertion as an earlier instrument for this repository's own modules
69
+ * (R3.7); the two layers cover what the other cannot — the check sees a member merged
70
+ * here before anybody boots, and this sees a connector installed from npm, which no
71
+ * check in this repository walks.
72
+ */
73
+ export class DefaultActivatedMemberError extends Error {
74
+ findings;
75
+ constructor(findings) {
76
+ super(defaultActivatedMessage(findings));
77
+ this.name = 'DefaultActivatedMemberError';
78
+ this.findings = findings;
79
+ }
80
+ }
81
+ function defaultActivatedMessage(findings) {
82
+ const lines = [
83
+ 'This deployment will not start: a module ships activated into a capability that ' +
84
+ 'permits one active member.',
85
+ '',
86
+ ];
87
+ for (const finding of findings) {
88
+ lines.push(` ${finding.moduleId} — declares \`capabilities: ['${finding.key}']\` and ` +
89
+ `\`activation.default: true\``, ` remedy: set \`default: false\` on \`${finding.settingCode}\` in ` +
90
+ `${finding.moduleId}'s manifest.`, '');
91
+ }
92
+ lines.push('An exclusion resolved on the activation axis cannot tell an operator\'s recorded choice', 'from a manifest default — the resolver returns booleans and carries no provenance — so a', 'member that ships activated holds a claim nobody made. Two such members are both active', 'from the first boot, and the exclusion guards the *transition* rather than the existing', 'state, so nothing ever refuses it and nothing reports it.', '', 'Shipping off is not a smaller default: it is the only one an operator can be asked to', 'choose from. A member the deployment wants running is switched on once, on', '/platform/modules, and that choice is recorded and survives every upgrade.');
93
+ return lines.join('\n');
94
+ }
95
+ /**
96
+ * Distil the capability registry from a manifest list.
97
+ *
98
+ * A module that declares nothing is omitted, and so is one whose `capabilities`
99
+ * is present but empty: an empty array says nothing a missing field does not, and
100
+ * carrying it would put a member with no family into every family read.
101
+ *
102
+ * **A member of a key that no installed module owns is not an error** (R3.5). The
103
+ * capability is simply not exclusive in that deployment and the member works.
104
+ * Refusing would turn a shared layer into an undeclared hard dependency, which is
105
+ * what `dependencies` is for and which the member already declares if it genuinely
106
+ * needs it.
107
+ *
108
+ * Order is manifest order, deliberately: every message derived from this reads in
109
+ * the order the deployment composes, which is the order the author is looking at.
110
+ */
111
+ export function capabilityRegistryFrom(manifests) {
112
+ const declarations = [];
113
+ const exclusive = [];
114
+ const claimants = new Map();
115
+ for (const manifest of manifests) {
116
+ const capabilities = manifest.capabilities ?? [];
117
+ if (capabilities.length > 0) {
118
+ declarations.push({ moduleId: manifest.id, capabilities: [...capabilities] });
119
+ }
120
+ for (const entry of manifest.exclusiveCapabilities ?? []) {
121
+ exclusive.push({
122
+ key: entry.key,
123
+ ownerModuleId: manifest.id,
124
+ errorCode: entry.errorCode,
125
+ });
126
+ const claimed = claimants.get(entry.key) ?? [];
127
+ claimed.push(manifest.id);
128
+ claimants.set(entry.key, claimed);
129
+ }
130
+ }
131
+ const contested = [];
132
+ for (const [key, ownerModuleIds] of claimants) {
133
+ if (ownerModuleIds.length > 1)
134
+ contested.push({ key, ownerModuleIds });
135
+ }
136
+ // Ordering is deliberate: whether a member's default is illegal depends on the key
137
+ // being exclusive, and a key with two claimants is exclusive on nobody's authority.
138
+ // The mis-assembly has to be read first.
139
+ if (contested.length > 0)
140
+ throw new ContestedCapabilityError(contested);
141
+ // R3.6 / FR-016 — reported per (module, key) pair, so the message says which of a
142
+ // member's keys is the one that cannot tolerate the default. Only an **exclusive**
143
+ // key counts: a key no installed module owns is not exclusive in this deployment, so
144
+ // there is no claim for a default to pre-empt (R3.5).
145
+ const exclusiveKeys = new Set(exclusive.map((entry) => entry.key));
146
+ const defaultActivated = [];
147
+ for (const manifest of manifests) {
148
+ const activation = manifest.activation;
149
+ // A `nonDeactivatable` module declares no control and is not resolved on this axis
150
+ // — every family owner in this tree is one. A member with no `activation` at all is
151
+ // already refused by `defineModuleManifest` (R4.1) and cannot reach here.
152
+ if (activation === undefined || 'nonDeactivatable' in activation)
153
+ continue;
154
+ if (activation.default !== true)
155
+ continue;
156
+ for (const key of manifest.capabilities ?? []) {
157
+ if (!exclusiveKeys.has(key))
158
+ continue;
159
+ defaultActivated.push({
160
+ moduleId: manifest.id,
161
+ key,
162
+ settingCode: activation.settingCode,
163
+ });
164
+ }
165
+ }
166
+ if (defaultActivated.length > 0)
167
+ throw new DefaultActivatedMemberError(defaultActivated);
168
+ return { declarations, exclusive };
169
+ }
170
+ //# sourceMappingURL=capability-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capability-registry.js","sourceRoot":"","sources":["../../../src/kernel/lifecycle/capability-registry.ts"],"names":[],"mappings":"AAiEA;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,wBAAyB,SAAQ,KAAK;IACxC,QAAQ,CAAwC;IAEzD,YAAY,QAA+C;QACzD,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC;QAChC,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;QACvC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;CACF;AAED,SAAS,cAAc,CAAC,QAA+C;IACrE,MAAM,KAAK,GAAa;QACtB,iFAAiF;QACjF,EAAE;KACH,CAAC;IACF,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,KAAK,CAAC,IAAI,CACR,KAA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IACpF,yCAAyC;IACzC,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC;QAAE,MAAM,IAAI,wBAAwB,CAAC,SAAS,CAAC,CAAC;IAExE,kFAAkF;IAClF,mFAAmF;IACnF,qFAAqF;IACrF,sDAAsD;IACtD,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IACnE,MAAM,gBAAgB,GAAoC,EAAE,CAAC;IAC7D,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;QACjC,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;QACvC,mFAAmF;QACnF,oFAAoF;QACpF,0EAA0E;QAC1E,IAAI,UAAU,KAAK,SAAS,IAAI,kBAAkB,IAAI,UAAU;YAAE,SAAS;QAC3E,IAAI,UAAU,CAAC,OAAO,KAAK,IAAI;YAAE,SAAS;QAC1C,KAAK,MAAM,GAAG,IAAI,QAAQ,CAAC,YAAY,IAAI,EAAE,EAAE,CAAC;YAC9C,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC;gBAAE,SAAS;YACtC,gBAAgB,CAAC,IAAI,CAAC;gBACpB,QAAQ,EAAE,QAAQ,CAAC,EAAE;gBACrB,GAAG;gBACH,WAAW,EAAE,UAAU,CAAC,WAAW;aACpC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC;QAAE,MAAM,IAAI,2BAA2B,CAAC,gBAAgB,CAAC,CAAC;IAEzF,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;AACrC,CAAC"}
@@ -0,0 +1,126 @@
1
+ import type { ModulePresence, RegistryState } from '@endora-commerce/contracts';
2
+ import { type ModuleRegistryCache } from './registry-cache.js';
3
+ import type { ExclusiveCapabilityDeclaration } from './capability-registry.js';
4
+ /**
5
+ * Effective module state — the conjunction of the two presence axes
6
+ * (Constitution XVII, feature 073, data-model §2.1).
7
+ *
8
+ * Platform availability is owned by whoever operates the deployment and lives
9
+ * in `module_registrations`. Operator activation is owned by the business and
10
+ * lives in a Setting the module declares. A module is present only when both
11
+ * are true, and every gating seam resolves *this* value rather than one axis.
12
+ *
13
+ * This is deliberately the only place the two are combined: no caller — not
14
+ * the four wrappers, not the Admin UI, not the storefront — recombines them,
15
+ * which is what makes "off means absent" one decision instead of several
16
+ * implementations that can disagree.
17
+ */
18
+ /** Per-module view of both axes, kept separate because the Admin UI must
19
+ * render "not installed here" differently from "we turned it off". */
20
+ export interface ModulePresenceState {
21
+ readonly moduleId: string;
22
+ readonly platformAvailable: boolean;
23
+ readonly platformState: RegistryState | 'not-installed';
24
+ readonly operatorActivated: boolean;
25
+ readonly deactivatable: boolean;
26
+ readonly nonDeactivatableReason: string | null;
27
+ }
28
+ export interface EffectiveModuleState {
29
+ /** The hot path. Synchronous, in-memory, called on every gated request. */
30
+ isPresent(moduleId: string): boolean;
31
+ presence(moduleId: string): ModulePresenceState | undefined;
32
+ all(): readonly ModulePresenceState[];
33
+ isDegraded(): boolean;
34
+ /**
35
+ * Issue #225 — the generation of the presence every read above answers from.
36
+ * It changes when a refresh installs presence that differs from the presence
37
+ * before it, and it is what a consumer caching a projection of presence
38
+ * compares against so its cache cannot outlive the refresh that followed the
39
+ * state change it was rebuilt for.
40
+ */
41
+ presenceVersion(): number;
42
+ /**
43
+ * The module whose activation control is stored under `settingCode`, or
44
+ * `undefined` when the code is an ordinary setting. The settings write path
45
+ * asks this so an activation code cannot be flipped through the generic
46
+ * screen, bypassing the audited Command (FR-009).
47
+ */
48
+ activationControlOwner(settingCode: string): string | undefined;
49
+ /** The Setting that holds `moduleId`'s activation, if it declares one. */
50
+ activationSettingCode(moduleId: string): string | null;
51
+ /**
52
+ * Tri-state presence, for the callers that must tell "this module is absent"
53
+ * from "this is not a module at all".
54
+ *
55
+ * `isPresent` collapses both into `false`, which is right for a gating seam:
56
+ * an unknown id gets nothing. It is wrong for a caller that classifies
57
+ * *existing rows* by their owner — a `settings` row may be owned by a
58
+ * hand-created group or by a string that was never a module id, and locking
59
+ * those rows as "belonging to a switched-off module" would take an operator's
60
+ * configuration away for a module that does not exist.
61
+ */
62
+ presenceOf(moduleId: string): boolean | undefined;
63
+ /**
64
+ * The members of capability `key` whose **effective** presence is true — the
65
+ * conjunction of both axes, never the activation Setting alone (feature 132,
66
+ * spec FR-012).
67
+ *
68
+ * This is the read a family owner's mutual-exclusion registry asks, and the
69
+ * conjunction is the behaviour change: `findActiveSibling` reads
70
+ * `presence(id)?.operatorActivated` today, which answers `true` for a module
71
+ * whose platform axis is off — so a connector the deployment never installed
72
+ * holds a claim that refuses another (Principle XVII).
73
+ *
74
+ * Synchronous and in-memory, on the same budget {@link isPresent} has.
75
+ */
76
+ membersOfCapability(key: string): readonly string[];
77
+ /** Every **declared** member of `key`, present or not — for diagnostics and the admin panel. */
78
+ declaredMembersOfCapability(key: string): readonly string[];
79
+ /** The owner and refusal code for an exclusive key, or `undefined` if it is not exclusive here. */
80
+ exclusiveCapability(key: string): ExclusiveCapabilityDeclaration | undefined;
81
+ }
82
+ export declare class ModuleEffectiveState implements EffectiveModuleState {
83
+ private readonly cache;
84
+ constructor(cache: ModuleRegistryCache);
85
+ /**
86
+ * FR-004: no I/O, no await, no database read. Two in-memory lookups.
87
+ *
88
+ * Fail-closed falls out of the conjunction rather than from a special case:
89
+ * a cold cache has an empty platform set, so nothing is present until the
90
+ * first successful refresh.
91
+ */
92
+ isPresent(moduleId: string): boolean;
93
+ presence(moduleId: string): ModulePresenceState | undefined;
94
+ all(): readonly ModulePresenceState[];
95
+ isDegraded(): boolean;
96
+ presenceVersion(): number;
97
+ activationControlOwner(settingCode: string): string | undefined;
98
+ activationSettingCode(moduleId: string): string | null;
99
+ presenceOf(moduleId: string): boolean | undefined;
100
+ membersOfCapability(key: string): readonly string[];
101
+ declaredMembersOfCapability(key: string): readonly string[];
102
+ exclusiveCapability(key: string): ExclusiveCapabilityDeclaration | undefined;
103
+ /**
104
+ * The operator axis, with the two rules that keep it from eating itself:
105
+ *
106
+ * - a module that declared itself non-deactivatable is activated whatever
107
+ * is stored, so resolving presence never has to ask "is `settings` on?";
108
+ * - a module that has declared no control at all cannot be switched off by
109
+ * an operator, so it is governed by the platform axis alone until its
110
+ * batch converts it. This is not a fall-open: there is no control to
111
+ * resolve, and the ratchet fails CI for a converted module that omits one.
112
+ */
113
+ private operatorActivated;
114
+ }
115
+ /**
116
+ * The wire projection of one module's presence.
117
+ *
118
+ * It lives here rather than beside the `/admin/module-presence` handler because
119
+ * a second surface now reports a module's presence as the reason something else
120
+ * is unavailable — the payment-method admin list, issue #96 — and two copies of
121
+ * this mapping are two ways for "off" to mean different things on two screens.
122
+ */
123
+ export declare function toModulePresenceDto(state: ModulePresenceState): ModulePresence;
124
+ /** Process singleton read by the four lifecycle wrappers. */
125
+ export declare const effectiveState: ModuleEffectiveState;
126
+ //# sourceMappingURL=effective-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"effective-state.d.ts","sourceRoot":"","sources":["../../../src/kernel/lifecycle/effective-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAiB,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAE/E;;;;;;;;;;;;;GAaG;AAEH;uEACuE;AACvE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC,QAAQ,CAAC,aAAa,EAAE,aAAa,GAAG,eAAe,CAAC;IACxD,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;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W,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAI/D,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAItD,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS;IAMjD,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE;IAMnD,2BAA2B,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE;IAI3D,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,8BAA8B,GAAG,SAAS;IAI5E;;;;;;;;;OASG;IACH,OAAO,CAAC,iBAAiB;CAO1B;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,mBAAmB,GAAG,cAAc,CAS9E;AAED,6DAA6D;AAC7D,eAAO,MAAM,cAAc,sBAA0C,CAAC"}
@@ -0,0 +1,111 @@
1
+ import { registryCache } from './registry-cache.js';
2
+ export class ModuleEffectiveState {
3
+ cache;
4
+ constructor(cache) {
5
+ this.cache = cache;
6
+ }
7
+ /**
8
+ * FR-004: no I/O, no await, no database read. Two in-memory lookups.
9
+ *
10
+ * Fail-closed falls out of the conjunction rather than from a special case:
11
+ * a cold cache has an empty platform set, so nothing is present until the
12
+ * first successful refresh.
13
+ */
14
+ isPresent(moduleId) {
15
+ return this.cache.isEnabled(moduleId) && this.operatorActivated(moduleId);
16
+ }
17
+ presence(moduleId) {
18
+ const declaration = this.cache.activationDeclaration(moduleId);
19
+ const platformState = this.cache.platformStateOf(moduleId);
20
+ // Unknown to both the registry and the manifests ⇒ we say nothing about
21
+ // it. `isPresent` already answers `false` for such an id.
22
+ if (!declaration && platformState === 'not-installed')
23
+ return undefined;
24
+ return {
25
+ moduleId,
26
+ platformAvailable: this.cache.isEnabled(moduleId),
27
+ platformState,
28
+ operatorActivated: this.operatorActivated(moduleId),
29
+ deactivatable: declaration?.settingCode != null,
30
+ nonDeactivatableReason: declaration?.nonDeactivatableReason ?? null,
31
+ };
32
+ }
33
+ all() {
34
+ const states = [];
35
+ for (const moduleId of this.cache.knownModuleIds()) {
36
+ const presence = this.presence(moduleId);
37
+ if (presence)
38
+ states.push(presence);
39
+ }
40
+ return states;
41
+ }
42
+ isDegraded() {
43
+ return this.cache.isDegraded();
44
+ }
45
+ presenceVersion() {
46
+ return this.cache.presenceVersion();
47
+ }
48
+ activationControlOwner(settingCode) {
49
+ return this.cache.activationDeclarationByCode(settingCode)?.moduleId;
50
+ }
51
+ activationSettingCode(moduleId) {
52
+ return this.cache.activationDeclaration(moduleId)?.settingCode ?? null;
53
+ }
54
+ presenceOf(moduleId) {
55
+ const presence = this.presence(moduleId);
56
+ if (!presence)
57
+ return undefined;
58
+ return presence.platformAvailable && presence.operatorActivated;
59
+ }
60
+ membersOfCapability(key) {
61
+ return this.cache
62
+ .declaredCapabilityMembers(key)
63
+ .filter((moduleId) => this.isPresent(moduleId));
64
+ }
65
+ declaredMembersOfCapability(key) {
66
+ return this.cache.declaredCapabilityMembers(key);
67
+ }
68
+ exclusiveCapability(key) {
69
+ return this.cache.exclusiveCapability(key);
70
+ }
71
+ /**
72
+ * The operator axis, with the two rules that keep it from eating itself:
73
+ *
74
+ * - a module that declared itself non-deactivatable is activated whatever
75
+ * is stored, so resolving presence never has to ask "is `settings` on?";
76
+ * - a module that has declared no control at all cannot be switched off by
77
+ * an operator, so it is governed by the platform axis alone until its
78
+ * batch converts it. This is not a fall-open: there is no control to
79
+ * resolve, and the ratchet fails CI for a converted module that omits one.
80
+ */
81
+ operatorActivated(moduleId) {
82
+ const declaration = this.cache.activationDeclaration(moduleId);
83
+ if (declaration && declaration.settingCode === null)
84
+ return true;
85
+ const stored = this.cache.activationValue(moduleId);
86
+ if (stored !== undefined)
87
+ return stored;
88
+ return declaration?.default ?? true;
89
+ }
90
+ }
91
+ /**
92
+ * The wire projection of one module's presence.
93
+ *
94
+ * It lives here rather than beside the `/admin/module-presence` handler because
95
+ * a second surface now reports a module's presence as the reason something else
96
+ * is unavailable — the payment-method admin list, issue #96 — and two copies of
97
+ * this mapping are two ways for "off" to mean different things on two screens.
98
+ */
99
+ export function toModulePresenceDto(state) {
100
+ return {
101
+ id: state.moduleId,
102
+ present: state.platformAvailable && state.operatorActivated,
103
+ platformState: state.platformState,
104
+ activated: state.operatorActivated,
105
+ deactivatable: state.deactivatable,
106
+ nonDeactivatableReason: state.nonDeactivatableReason,
107
+ };
108
+ }
109
+ /** Process singleton read by the four lifecycle wrappers. */
110
+ export const effectiveState = new ModuleEffectiveState(registryCache);
111
+ //# sourceMappingURL=effective-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"effective-state.js","sourceRoot":"","sources":["../../../src/kernel/lifecycle/effective-state.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAA4B,MAAM,qBAAqB,CAAC;AAoF9E,MAAM,OAAO,oBAAoB;IACF;IAA7B,YAA6B,KAA0B;QAA1B,UAAK,GAAL,KAAK,CAAqB;IAAG,CAAC;IAE3D;;;;;;OAMG;IACH,SAAS,CAAC,QAAgB;QACxB,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAC5E,CAAC;IAED,QAAQ,CAAC,QAAgB;QACvB,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;QAC/D,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QAC3D,wEAAwE;QACxE,0DAA0D;QAC1D,IAAI,CAAC,WAAW,IAAI,aAAa,KAAK,eAAe;YAAE,OAAO,SAAS,CAAC;QACxE,OAAO;YACL,QAAQ;YACR,iBAAiB,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC;YACjD,aAAa;YACb,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,CAA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SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;IACpD,CAAC;IAED,2BAA2B,CAAC,GAAW;QACrC,OAAO,IAAI,CAAC,KAAK,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC;IACnD,CAAC;IAED,mBAAmB,CAAC,GAAW;QAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC;IAC7C,CAAC;IAED;;;;;;;;;OASG;IACK,iBAAiB,CAAC,QAAgB;QACxC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;QAC/D,IAAI,WAAW,IAAI,WAAW,CAAC,WAAW,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC;QACjE,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QACpD,IAAI,MAAM,KAAK,SAAS;YAAE,OAAO,MAAM,CAAC;QACxC,OAAO,WAAW,EAAE,OAAO,IAAI,IAAI,CAAC;IACtC,CAAC;CACF;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAA0B;IAC5D,OAAO;QACL,EAAE,EAAE,KAAK,CAAC,QAAQ;QAClB,OAAO,EAAE,KAAK,CAAC,iBAAiB,IAAI,KAAK,CAAC,iBAAiB;QAC3D,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,SAAS,EAAE,KAAK,CAAC,iBAAiB;QAClC,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,sBAAsB,EAAE,KAAK,CAAC,sBAAsB;KACrD,CAAC;AACJ,CAAC;AAED,6DAA6D;AAC7D,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,oBAAoB,CAAC,aAAa,CAAC,CAAC"}
@@ -0,0 +1,57 @@
1
+ import { OptionalProps } from '@mikro-orm/core';
2
+ import type { RegistryState } from '@endora-commerce/contracts';
3
+ /**
4
+ * Module Registration — feature 018 / data-model.md.
5
+ *
6
+ * One row per module the system has ever installed. The PK is the module
7
+ * id (matches `manifest.id`). State follows the four-state FSM enforced
8
+ * by a CHECK constraint on the column. Hard-uninstall deletes the row;
9
+ * soft-uninstall leaves it in `state = 'uninstalled'` so a later
10
+ * re-install can detect the prior version and skip already-applied
11
+ * migrations.
12
+ */
13
+ export declare class ModuleRegistration {
14
+ [OptionalProps]?: 'lastInstallFailedAt' | 'lastInstallError' | 'bootConvergedAt' | 'createdAt' | 'updatedAt';
15
+ moduleId: string;
16
+ state: RegistryState;
17
+ version: string;
18
+ installedAt: Date;
19
+ lastStateChangeAt: Date;
20
+ lastInstallFailedAt?: Date | null;
21
+ lastInstallError?: string | null;
22
+ /**
23
+ * *"This row was written by boot convergence, and no install has run."*
24
+ *
25
+ * `reconcileExistingModules` inserts `state='installed'` for every shipped
26
+ * manifest with no row, from `composeApp`, and runs no install hook — it
27
+ * cannot, and D-157.6(b) is why it must not. Before this column,
28
+ * `install` could not tell such a row from one it had written itself, so it
29
+ * answered `already-installed` and the module's `installHook` never ran and
30
+ * never would: no migration, no settings reconcile, no participant pass, and
31
+ * nothing said so. The marker is the one datum that distinguishes the two,
32
+ * and it is what makes `module:install --all` the command that **repairs** a
33
+ * boot-first database.
34
+ *
35
+ * Written only by the reconciler and cleared only by `install`'s step 4. Any
36
+ * other writer would be claiming an install did not happen when it did, which
37
+ * is the opposite of what this field says.
38
+ *
39
+ * **No backfill, and it is provable rather than chosen.** The migration adds
40
+ * the column `null` everywhere. No `installed` row predating it can have
41
+ * skipped a hook, because until feature 134's W7 the tree had **no
42
+ * `installHook` at all** — `custom_fields`' `uninstallHook` was the only
43
+ * lifecycle hook in it. A blanket backfill would make every existing row claim
44
+ * *"no install has run"* when one had, which would stop the field meaning what
45
+ * it says and would be the wrong datum for a future boot refusal to read.
46
+ *
47
+ * **One residual it does not reach**, recorded rather than discovered: a
48
+ * database converged *before* this column existed holds `null`, so a module
49
+ * that gains its first `installHook` afterwards is still answered
50
+ * `already-installed` there. `db:fresh` plus the `setup` script is the dev
51
+ * remedy, and `module:uninstall <id> && module:install <id>` the surgical one.
52
+ */
53
+ bootConvergedAt?: Date | null;
54
+ createdAt: Date;
55
+ updatedAt: Date;
56
+ }
57
+ //# sourceMappingURL=module-registration.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module-registration.entity.d.ts","sourceRoot":"","sources":["../../../src/kernel/lifecycle/module-registration.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,aAAa,EAAwB,MAAM,iBAAiB,CAAC;AAE9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEhE;;;;;;;;;GASG;AACH,qBAEa,kBAAkB;IAC7B,CAAC,aAAa,CAAC,CAAC,EACZ,qBAAqB,GACrB,kBAAkB,GAClB,iBAAiB,GACjB,WAAW,GACX,WAAW,CAAC;IAGhB,QAAQ,EAAG,MAAM,CAAC;IAGlB,KAAK,EAAG,aAAa,CAAC;IAGtB,OAAO,EAAG,MAAM,CAAC;IAGjB,WAAW,EAAG,IAAI,CAAC;IAGnB,iBAAiB,EAAG,IAAI,CAAC;IAGzB,mBAAmB,CAAC,EAAE,IAAI,GAAG,IAAI,CAAQ;IAGzC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAQ;IAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IAEH,eAAe,CAAC,EAAE,IAAI,GAAG,IAAI,CAAQ;IAGrC,SAAS,EAAE,IAAI,CAAc;IAG7B,SAAS,EAAE,IAAI,CAAc;CAC9B"}
@@ -0,0 +1,111 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { Entity, OptionalProps, PrimaryKey, Property } from '@mikro-orm/core';
11
+ import { GlobalEntity } from '../../tenancy/org-scoped.decorator.js';
12
+ /**
13
+ * Module Registration — feature 018 / data-model.md.
14
+ *
15
+ * One row per module the system has ever installed. The PK is the module
16
+ * id (matches `manifest.id`). State follows the four-state FSM enforced
17
+ * by a CHECK constraint on the column. Hard-uninstall deletes the row;
18
+ * soft-uninstall leaves it in `state = 'uninstalled'` so a later
19
+ * re-install can detect the prior version and skip already-applied
20
+ * migrations.
21
+ */
22
+ let ModuleRegistration = class ModuleRegistration {
23
+ [OptionalProps];
24
+ moduleId;
25
+ state;
26
+ version;
27
+ installedAt;
28
+ lastStateChangeAt;
29
+ lastInstallFailedAt = null;
30
+ lastInstallError = null;
31
+ /**
32
+ * *"This row was written by boot convergence, and no install has run."*
33
+ *
34
+ * `reconcileExistingModules` inserts `state='installed'` for every shipped
35
+ * manifest with no row, from `composeApp`, and runs no install hook — it
36
+ * cannot, and D-157.6(b) is why it must not. Before this column,
37
+ * `install` could not tell such a row from one it had written itself, so it
38
+ * answered `already-installed` and the module's `installHook` never ran and
39
+ * never would: no migration, no settings reconcile, no participant pass, and
40
+ * nothing said so. The marker is the one datum that distinguishes the two,
41
+ * and it is what makes `module:install --all` the command that **repairs** a
42
+ * boot-first database.
43
+ *
44
+ * Written only by the reconciler and cleared only by `install`'s step 4. Any
45
+ * other writer would be claiming an install did not happen when it did, which
46
+ * is the opposite of what this field says.
47
+ *
48
+ * **No backfill, and it is provable rather than chosen.** The migration adds
49
+ * the column `null` everywhere. No `installed` row predating it can have
50
+ * skipped a hook, because until feature 134's W7 the tree had **no
51
+ * `installHook` at all** — `custom_fields`' `uninstallHook` was the only
52
+ * lifecycle hook in it. A blanket backfill would make every existing row claim
53
+ * *"no install has run"* when one had, which would stop the field meaning what
54
+ * it says and would be the wrong datum for a future boot refusal to read.
55
+ *
56
+ * **One residual it does not reach**, recorded rather than discovered: a
57
+ * database converged *before* this column existed holds `null`, so a module
58
+ * that gains its first `installHook` afterwards is still answered
59
+ * `already-installed` there. `db:fresh` plus the `setup` script is the dev
60
+ * remedy, and `module:uninstall <id> && module:install <id>` the surgical one.
61
+ */
62
+ bootConvergedAt = null;
63
+ createdAt = new Date();
64
+ updatedAt = new Date();
65
+ };
66
+ __decorate([
67
+ PrimaryKey({ type: 'string', length: 80 }),
68
+ __metadata("design:type", String)
69
+ ], ModuleRegistration.prototype, "moduleId", void 0);
70
+ __decorate([
71
+ Property({ type: 'string', length: 16 }),
72
+ __metadata("design:type", String)
73
+ ], ModuleRegistration.prototype, "state", void 0);
74
+ __decorate([
75
+ Property({ type: 'string', length: 32 }),
76
+ __metadata("design:type", String)
77
+ ], ModuleRegistration.prototype, "version", void 0);
78
+ __decorate([
79
+ Property({ type: 'Date' }),
80
+ __metadata("design:type", Date)
81
+ ], ModuleRegistration.prototype, "installedAt", void 0);
82
+ __decorate([
83
+ Property({ type: 'Date' }),
84
+ __metadata("design:type", Date)
85
+ ], ModuleRegistration.prototype, "lastStateChangeAt", void 0);
86
+ __decorate([
87
+ Property({ type: 'Date', nullable: true }),
88
+ __metadata("design:type", Object)
89
+ ], ModuleRegistration.prototype, "lastInstallFailedAt", void 0);
90
+ __decorate([
91
+ Property({ type: 'text', nullable: true }),
92
+ __metadata("design:type", Object)
93
+ ], ModuleRegistration.prototype, "lastInstallError", void 0);
94
+ __decorate([
95
+ Property({ type: 'Date', nullable: true }),
96
+ __metadata("design:type", Object)
97
+ ], ModuleRegistration.prototype, "bootConvergedAt", void 0);
98
+ __decorate([
99
+ Property({ type: 'Date' }),
100
+ __metadata("design:type", Date)
101
+ ], ModuleRegistration.prototype, "createdAt", void 0);
102
+ __decorate([
103
+ Property({ type: 'Date', onUpdate: () => new Date() }),
104
+ __metadata("design:type", Date)
105
+ ], ModuleRegistration.prototype, "updatedAt", void 0);
106
+ ModuleRegistration = __decorate([
107
+ GlobalEntity(),
108
+ Entity({ tableName: 'module_registrations' })
109
+ ], ModuleRegistration);
110
+ export { ModuleRegistration };
111
+ //# sourceMappingURL=module-registration.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module-registration.entity.js","sourceRoot":"","sources":["../../../src/kernel/lifecycle/module-registration.entity.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAGrE;;;;;;;;;GASG;AAGI,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC7B,CAAC,aAAa,CAAC,CAKC;IAGhB,QAAQ,CAAU;IAGlB,KAAK,CAAiB;IAGtB,OAAO,CAAU;IAGjB,WAAW,CAAQ;IAGnB,iBAAiB,CAAQ;IAGzB,mBAAmB,GAAiB,IAAI,CAAC;IAGzC,gBAAgB,GAAmB,IAAI,CAAC;IAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IAEH,eAAe,GAAiB,IAAI,CAAC;IAGrC,SAAS,GAAS,IAAI,IAAI,EAAE,CAAC;IAG7B,SAAS,GAAS,IAAI,IAAI,EAAE,CAAC;CAC9B,CAAA;AA3DC;IADC,UAAU,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;oDACzB;AAGlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;iDACnB;AAGtB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;mDACxB;AAGj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