@powerhousedao/shared 6.2.3-dev.7 → 6.2.3-dev.70

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 (301) hide show
  1. package/dist/analytics/index.d.ts +4 -4
  2. package/dist/analytics/index.d.ts.map +1 -1
  3. package/dist/analytics/index.js +25 -24
  4. package/dist/analytics/index.js.map +1 -1
  5. package/dist/clis/args/{access-token-To5LaIfL.mjs → access-token-3Hqv_U8I.mjs} +2 -2
  6. package/dist/clis/args/{access-token-To5LaIfL.mjs.map → access-token-3Hqv_U8I.mjs.map} +1 -1
  7. package/dist/clis/args/access-token-C5sKsH2O.d.mts +16 -0
  8. package/dist/clis/args/access-token-C5sKsH2O.d.mts.map +1 -0
  9. package/dist/clis/args/access-token.d.mts +3 -2
  10. package/dist/clis/args/access-token.mjs +1 -1
  11. package/dist/clis/args/{common-CcYbXrBx.mjs → common-BXabdhiO.mjs} +30 -7
  12. package/dist/clis/args/common-BXabdhiO.mjs.map +1 -0
  13. package/dist/clis/args/common-Bnm859xU.d.mts +186 -0
  14. package/dist/clis/args/common-Bnm859xU.d.mts.map +1 -0
  15. package/dist/clis/args/common.d.mts +3 -2
  16. package/dist/clis/args/common.mjs +1 -1
  17. package/dist/clis/args/{connect-BVVvCmL9.mjs → connect-BG3HkYBk.mjs} +8 -3
  18. package/dist/clis/args/connect-BG3HkYBk.mjs.map +1 -0
  19. package/dist/clis/args/connect-DjeiqXus.d.mts +450 -0
  20. package/dist/clis/args/connect-DjeiqXus.d.mts.map +1 -0
  21. package/dist/clis/args/connect.d.mts +3 -2
  22. package/dist/clis/args/connect.mjs +1 -1
  23. package/dist/clis/args/dist-CorQTQL-.mjs +1533 -0
  24. package/dist/clis/args/dist-CorQTQL-.mjs.map +1 -0
  25. package/dist/clis/args/{generate-CA916Fvj.mjs → generate-BOItUNvP.mjs} +40 -2
  26. package/dist/clis/args/generate-BOItUNvP.mjs.map +1 -0
  27. package/dist/clis/args/generate-BPBBLeUD.d.mts +103 -0
  28. package/dist/clis/args/generate-BPBBLeUD.d.mts.map +1 -0
  29. package/dist/clis/args/generate.d.mts +3 -2
  30. package/dist/clis/args/generate.mjs +1 -1
  31. package/dist/clis/args/{help-Bqbgbalu.mjs → help-BfAqpYvC.mjs} +43 -16
  32. package/dist/clis/args/help-BfAqpYvC.mjs.map +1 -0
  33. package/dist/clis/args/help-KuqI-EEG.d.mts +203 -0
  34. package/dist/clis/args/help-KuqI-EEG.d.mts.map +1 -0
  35. package/dist/clis/args/help.d.mts +3 -2
  36. package/dist/clis/args/help.mjs +1 -1
  37. package/dist/clis/args/index.d.mts +20 -19
  38. package/dist/clis/args/index.mjs +18 -18
  39. package/dist/clis/args/init-CTaK80wE.d.mts +55 -0
  40. package/dist/clis/args/init-CTaK80wE.d.mts.map +1 -0
  41. package/dist/clis/args/{init-rz9Ei7nq.mjs → init-xlCNZ8Oe.mjs} +7 -2
  42. package/dist/clis/args/{init-rz9Ei7nq.mjs.map → init-xlCNZ8Oe.mjs.map} +1 -1
  43. package/dist/clis/args/init.d.mts +3 -2
  44. package/dist/clis/args/init.mjs +1 -1
  45. package/dist/clis/args/inspect-BjRmtB86.d.mts +13 -0
  46. package/dist/clis/args/inspect-BjRmtB86.d.mts.map +1 -0
  47. package/dist/clis/args/{inspect-tckH8mSw.mjs → inspect-UNQgtuR0.mjs} +2 -2
  48. package/dist/clis/args/{inspect-tckH8mSw.mjs.map → inspect-UNQgtuR0.mjs.map} +1 -1
  49. package/dist/clis/args/inspect.d.mts +3 -2
  50. package/dist/clis/args/inspect.mjs +1 -1
  51. package/dist/clis/args/install-B0tMyUMw.d.mts +37 -0
  52. package/dist/clis/args/install-B0tMyUMw.d.mts.map +1 -0
  53. package/dist/clis/args/{install-Sz2DlCHh.mjs → install-F-27kF6m.mjs} +2 -2
  54. package/dist/clis/args/{install-Sz2DlCHh.mjs.map → install-F-27kF6m.mjs.map} +1 -1
  55. package/dist/clis/args/install.d.mts +3 -2
  56. package/dist/clis/args/install.mjs +1 -1
  57. package/dist/clis/args/{list-DM2d6f1m.mjs → list-Bkfn8Yuo.mjs} +2 -2
  58. package/dist/clis/args/{list-DM2d6f1m.mjs.map → list-Bkfn8Yuo.mjs.map} +1 -1
  59. package/dist/clis/args/list-DrbxA7JJ.d.mts +10 -0
  60. package/dist/clis/args/list-DrbxA7JJ.d.mts.map +1 -0
  61. package/dist/clis/args/list.d.mts +3 -2
  62. package/dist/clis/args/list.mjs +1 -1
  63. package/dist/clis/args/{login-DiKT5Jfu.mjs → login-CIFkQExi.mjs} +2 -2
  64. package/dist/clis/args/{login-DiKT5Jfu.mjs.map → login-CIFkQExi.mjs.map} +1 -1
  65. package/dist/clis/args/login-CXRJXg71.d.mts +25 -0
  66. package/dist/clis/args/login-CXRJXg71.d.mts.map +1 -0
  67. package/dist/clis/args/login.d.mts +3 -2
  68. package/dist/clis/args/login.mjs +1 -1
  69. package/dist/clis/args/migrate-DkCQRL2D.d.mts +19 -0
  70. package/dist/clis/args/migrate-DkCQRL2D.d.mts.map +1 -0
  71. package/dist/clis/args/{migrate-CG_gWc4k.mjs → migrate-DwJGhc2d.mjs} +2 -2
  72. package/dist/clis/args/{migrate-CG_gWc4k.mjs.map → migrate-DwJGhc2d.mjs.map} +1 -1
  73. package/dist/clis/args/migrate.d.mts +3 -2
  74. package/dist/clis/args/migrate.mjs +1 -1
  75. package/dist/clis/args/publish-CeW4bOrl.d.mts +16 -0
  76. package/dist/clis/args/publish-CeW4bOrl.d.mts.map +1 -0
  77. package/dist/clis/args/{publish-DDZYsUfV.mjs → publish-DHqlGWmL.mjs} +2 -2
  78. package/dist/clis/args/{publish-DDZYsUfV.mjs.map → publish-DHqlGWmL.mjs.map} +1 -1
  79. package/dist/clis/args/publish.d.mts +3 -2
  80. package/dist/clis/args/publish.mjs +1 -1
  81. package/dist/clis/args/{registry-C_OVFQmI.mjs → registry-DIwES3l2.mjs} +2 -2
  82. package/dist/clis/args/{registry-C_OVFQmI.mjs.map → registry-DIwES3l2.mjs.map} +1 -1
  83. package/dist/clis/args/registry-DNH8xuaE.d.mts +17 -0
  84. package/dist/clis/args/registry-DNH8xuaE.d.mts.map +1 -0
  85. package/dist/clis/args/registry.d.mts +3 -2
  86. package/dist/clis/args/registry.mjs +1 -1
  87. package/dist/clis/args/run-CYp5t1xU.mjs +28 -0
  88. package/dist/clis/args/run-CYp5t1xU.mjs.map +1 -0
  89. package/dist/clis/args/run.d.mts +18 -0
  90. package/dist/clis/args/run.d.mts.map +1 -0
  91. package/dist/clis/args/run.mjs +2 -0
  92. package/dist/clis/args/service-CHjY5epu.d.mts +27 -0
  93. package/dist/clis/args/service-CHjY5epu.d.mts.map +1 -0
  94. package/dist/clis/args/{service-CHOOr0Gg.mjs → service-Cpjlyeu5.mjs} +2 -2
  95. package/dist/clis/args/{service-CHOOr0Gg.mjs.map → service-Cpjlyeu5.mjs.map} +1 -1
  96. package/dist/clis/args/service.d.mts +3 -2
  97. package/dist/clis/args/service.mjs +1 -1
  98. package/dist/clis/args/{switchboard-Dsp7nosi.mjs → switchboard-CCaAtU56.mjs} +2 -2
  99. package/dist/clis/args/{switchboard-Dsp7nosi.mjs.map → switchboard-CCaAtU56.mjs.map} +1 -1
  100. package/dist/clis/args/switchboard-RrNb1fUH.d.mts +70 -0
  101. package/dist/clis/args/switchboard-RrNb1fUH.d.mts.map +1 -0
  102. package/dist/clis/args/switchboard.d.mts +3 -2
  103. package/dist/clis/args/switchboard.mjs +1 -1
  104. package/dist/clis/args/{uninstall-CTwTX0u_.mjs → uninstall-3U0B8g5c.mjs} +2 -2
  105. package/dist/clis/args/{uninstall-CTwTX0u_.mjs.map → uninstall-3U0B8g5c.mjs.map} +1 -1
  106. package/dist/clis/args/uninstall-CDx7lwxn.d.mts +28 -0
  107. package/dist/clis/args/uninstall-CDx7lwxn.d.mts.map +1 -0
  108. package/dist/clis/args/uninstall.d.mts +3 -2
  109. package/dist/clis/args/uninstall.mjs +1 -1
  110. package/dist/clis/args/unpublish-CEDsk6uv.d.mts +22 -0
  111. package/dist/clis/args/unpublish-CEDsk6uv.d.mts.map +1 -0
  112. package/dist/clis/args/{unpublish-BPMkGEg5.mjs → unpublish-s9zUh6Gw.mjs} +2 -2
  113. package/dist/clis/args/{unpublish-BPMkGEg5.mjs.map → unpublish-s9zUh6Gw.mjs.map} +1 -1
  114. package/dist/clis/args/unpublish.d.mts +3 -2
  115. package/dist/clis/args/unpublish.mjs +1 -1
  116. package/dist/clis/args/{vetra-b4KUu1Ax.mjs → vetra-BUNlAAPp.mjs} +2 -2
  117. package/dist/clis/args/{vetra-b4KUu1Ax.mjs.map → vetra-BUNlAAPp.mjs.map} +1 -1
  118. package/dist/clis/args/vetra-DkDaWFPi.d.mts +111 -0
  119. package/dist/clis/args/vetra-DkDaWFPi.d.mts.map +1 -0
  120. package/dist/clis/args/vetra-ports.test.d.mts +2 -1
  121. package/dist/clis/args/vetra-ports.test.mjs +7366 -5728
  122. package/dist/clis/args/vetra-ports.test.mjs.map +1 -1
  123. package/dist/clis/args/vetra.d.mts +3 -2
  124. package/dist/clis/args/vetra.mjs +1 -1
  125. package/dist/clis/build-config-DwRi23zQ.mjs +262 -0
  126. package/dist/clis/build-config-DwRi23zQ.mjs.map +1 -0
  127. package/dist/clis/build-config.d.mts +55 -10616
  128. package/dist/clis/build-config.d.mts.map +1 -1
  129. package/dist/clis/build-config.mjs +2 -88
  130. package/dist/clis/build-pieces.d.mts +160 -0
  131. package/dist/clis/build-pieces.d.mts.map +1 -0
  132. package/dist/clis/build-pieces.mjs +549 -0
  133. package/dist/clis/build-pieces.mjs.map +1 -0
  134. package/dist/clis/command-names.d.mts +2 -2
  135. package/dist/clis/command-names.d.mts.map +1 -1
  136. package/dist/clis/command-names.mjs +1 -0
  137. package/dist/clis/command-names.mjs.map +1 -1
  138. package/dist/clis/constants.d.mts +3 -462
  139. package/dist/clis/constants.mjs +45 -13
  140. package/dist/clis/constants.mjs.map +1 -1
  141. package/dist/clis/feature-flags.d.mts +17 -0
  142. package/dist/clis/feature-flags.d.mts.map +1 -0
  143. package/dist/clis/feature-flags.mjs +21 -0
  144. package/dist/clis/feature-flags.mjs.map +1 -0
  145. package/dist/clis/index-DnZYG-8g.d.mts +11154 -0
  146. package/dist/clis/index-DnZYG-8g.d.mts.map +1 -0
  147. package/dist/clis/index.d.mts +1483 -1226
  148. package/dist/clis/index.d.mts.map +1 -1
  149. package/dist/clis/index.mjs +705 -353
  150. package/dist/clis/index.mjs.map +1 -1
  151. package/dist/clis/package-style.d.mts +32 -0
  152. package/dist/clis/package-style.d.mts.map +1 -0
  153. package/dist/clis/package-style.mjs +102 -0
  154. package/dist/clis/package-style.mjs.map +1 -0
  155. package/dist/clis/ph-dir.d.mts +26 -0
  156. package/dist/clis/ph-dir.d.mts.map +1 -0
  157. package/dist/clis/ph-dir.mjs +37 -0
  158. package/dist/clis/ph-dir.mjs.map +1 -0
  159. package/dist/clis/project-env.d.mts +4 -4
  160. package/dist/clis/project-env.d.mts.map +1 -1
  161. package/dist/clis/project-env.mjs.map +1 -1
  162. package/dist/clis/project-ports.d.mts +5 -5
  163. package/dist/clis/project-ports.d.mts.map +1 -1
  164. package/dist/clis/project-ports.mjs +1 -1
  165. package/dist/clis/project-ports.mjs.map +1 -1
  166. package/dist/clis/services/telemetry.d.mts +7 -7
  167. package/dist/clis/services/telemetry.d.mts.map +1 -1
  168. package/dist/clis/services/telemetry.mjs.map +1 -1
  169. package/dist/clis/types-BxOUzRvH.d.mts +588 -0
  170. package/dist/clis/types-BxOUzRvH.d.mts.map +1 -0
  171. package/dist/clis/utils.d.mts +4 -4
  172. package/dist/clis/utils.d.mts.map +1 -1
  173. package/dist/clis/utils.mjs.map +1 -1
  174. package/dist/{config-loader-B845Hidf.js → config-loader-DBJolZd0.js} +43 -9
  175. package/dist/config-loader-DBJolZd0.js.map +1 -0
  176. package/dist/connect/config-loader.d.ts +21 -8
  177. package/dist/connect/config-loader.d.ts.map +1 -1
  178. package/dist/connect/config-loader.js +2 -2
  179. package/dist/connect/index.d.ts +215 -57
  180. package/dist/connect/index.d.ts.map +1 -1
  181. package/dist/connect/index.js +341 -31
  182. package/dist/connect/index.js.map +1 -1
  183. package/dist/connect/json-adapter.d.ts +3 -4
  184. package/dist/connect/json-adapter.d.ts.map +1 -1
  185. package/dist/connect/json-adapter.js.map +1 -1
  186. package/dist/constants-CcaK3k1D.d.ts +9 -0
  187. package/dist/constants-CcaK3k1D.d.ts.map +1 -0
  188. package/dist/constants.d.ts +3 -2
  189. package/dist/constants.js +15 -5
  190. package/dist/constants.js.map +1 -1
  191. package/dist/document-drive/index.d.ts +103 -101
  192. package/dist/document-drive/index.d.ts.map +1 -1
  193. package/dist/document-drive/index.js +39 -19
  194. package/dist/document-drive/index.js.map +1 -1
  195. package/dist/document-model/errors.d.ts +3 -0
  196. package/dist/document-model/errors.js +152 -0
  197. package/dist/document-model/errors.js.map +1 -0
  198. package/dist/document-model/index.d.ts +5 -4
  199. package/dist/document-model/index.js +298 -391
  200. package/dist/document-model/index.js.map +1 -1
  201. package/dist/document-model/mock.d.ts +2 -3
  202. package/dist/document-model/mock.d.ts.map +1 -1
  203. package/dist/document-model/mock.js +2 -1
  204. package/dist/document-model/mock.js.map +1 -1
  205. package/dist/document-model/utils.d.ts +3 -2
  206. package/dist/document-model/utils.js +1 -1
  207. package/dist/document-model/version.d.ts +3 -0
  208. package/dist/document-model/version.js +8 -0
  209. package/dist/document-model/version.js.map +1 -0
  210. package/dist/index-DeEVCeve.d.ts +36 -0
  211. package/dist/index-DeEVCeve.d.ts.map +1 -0
  212. package/dist/index.d.ts +7 -6
  213. package/dist/index.js.map +1 -1
  214. package/dist/processors/index.d.ts +3 -2
  215. package/dist/processors/index.js +63 -4
  216. package/dist/processors/index.js.map +1 -1
  217. package/dist/purge-v06m_oGz.js +381 -0
  218. package/dist/purge-v06m_oGz.js.map +1 -0
  219. package/dist/registry/index.d.ts +15 -15
  220. package/dist/registry/index.d.ts.map +1 -1
  221. package/dist/registry/index.js +24 -6
  222. package/dist/registry/index.js.map +1 -1
  223. package/dist/registry/manifest-slim.d.ts +4 -3
  224. package/dist/registry/manifest-slim.d.ts.map +1 -1
  225. package/dist/registry/manifest-slim.js +21 -0
  226. package/dist/registry/manifest-slim.js.map +1 -1
  227. package/dist/registry/updates.d.ts +3 -3
  228. package/dist/registry/updates.d.ts.map +1 -1
  229. package/dist/registry/updates.js.map +1 -1
  230. package/dist/registry/urls.d.ts +2 -2
  231. package/dist/registry/urls.d.ts.map +1 -1
  232. package/dist/registry/urls.js.map +1 -1
  233. package/dist/{types-C1in4fl3.d.ts → types-Bsp8VL2y.d.ts} +2 -2
  234. package/dist/types-Bsp8VL2y.d.ts.map +1 -0
  235. package/dist/{types-CpnWmiFY.d.ts → types-PM0i4vns.d.ts} +2063 -824
  236. package/dist/types-PM0i4vns.d.ts.map +1 -0
  237. package/dist/{types-YqLqb0Zb.d.ts → types-f_wMStgZ.d.ts} +39 -43
  238. package/dist/types-f_wMStgZ.d.ts.map +1 -0
  239. package/dist/{utils-DP122OSS.d.ts → utils-BrKxCmKx.d.ts} +2 -2
  240. package/dist/utils-BrKxCmKx.d.ts.map +1 -0
  241. package/dist/{utils-aaTmfxFW.js → utils-CSF716ux.js} +10 -3
  242. package/dist/utils-CSF716ux.js.map +1 -0
  243. package/dist/version-BxLITo9P.d.ts +6 -0
  244. package/dist/version-BxLITo9P.d.ts.map +1 -0
  245. package/package.json +24 -7
  246. package/dist/clis/args/access-token--9H57y8J.d.mts +0 -18
  247. package/dist/clis/args/access-token--9H57y8J.d.mts.map +0 -1
  248. package/dist/clis/args/common-CcYbXrBx.mjs.map +0 -1
  249. package/dist/clis/args/common-zPBoTNJF.d.mts +0 -183
  250. package/dist/clis/args/common-zPBoTNJF.d.mts.map +0 -1
  251. package/dist/clis/args/connect-BVVvCmL9.mjs.map +0 -1
  252. package/dist/clis/args/connect-BtU0MTTc.d.mts +0 -443
  253. package/dist/clis/args/connect-BtU0MTTc.d.mts.map +0 -1
  254. package/dist/clis/args/generate-CA916Fvj.mjs.map +0 -1
  255. package/dist/clis/args/generate-DnV-bfXt.d.mts +0 -87
  256. package/dist/clis/args/generate-DnV-bfXt.d.mts.map +0 -1
  257. package/dist/clis/args/help-Bqbgbalu.mjs.map +0 -1
  258. package/dist/clis/args/help-CjAsudUn.d.mts +0 -193
  259. package/dist/clis/args/help-CjAsudUn.d.mts.map +0 -1
  260. package/dist/clis/args/init-CUXyfquF.d.mts +0 -55
  261. package/dist/clis/args/init-CUXyfquF.d.mts.map +0 -1
  262. package/dist/clis/args/inspect-DtZeoA5c.d.mts +0 -15
  263. package/dist/clis/args/inspect-DtZeoA5c.d.mts.map +0 -1
  264. package/dist/clis/args/install-CkP8zcHb.d.mts +0 -40
  265. package/dist/clis/args/install-CkP8zcHb.d.mts.map +0 -1
  266. package/dist/clis/args/list-BGf8s_gj.d.mts +0 -12
  267. package/dist/clis/args/list-BGf8s_gj.d.mts.map +0 -1
  268. package/dist/clis/args/login-DNsHwvqk.d.mts +0 -27
  269. package/dist/clis/args/login-DNsHwvqk.d.mts.map +0 -1
  270. package/dist/clis/args/magic-string.es-h_0HDQBQ.mjs +0 -1013
  271. package/dist/clis/args/magic-string.es-h_0HDQBQ.mjs.map +0 -1
  272. package/dist/clis/args/migrate-sixkWhxm.d.mts +0 -21
  273. package/dist/clis/args/migrate-sixkWhxm.d.mts.map +0 -1
  274. package/dist/clis/args/publish-Dqe5DUst.d.mts +0 -18
  275. package/dist/clis/args/publish-Dqe5DUst.d.mts.map +0 -1
  276. package/dist/clis/args/registry-C_RfTsKB.d.mts +0 -19
  277. package/dist/clis/args/registry-C_RfTsKB.d.mts.map +0 -1
  278. package/dist/clis/args/service-DhIkf8-O.d.mts +0 -22
  279. package/dist/clis/args/service-DhIkf8-O.d.mts.map +0 -1
  280. package/dist/clis/args/switchboard-BlPaq2at.d.mts +0 -72
  281. package/dist/clis/args/switchboard-BlPaq2at.d.mts.map +0 -1
  282. package/dist/clis/args/uninstall-BpA3YYbw.d.mts +0 -31
  283. package/dist/clis/args/uninstall-BpA3YYbw.d.mts.map +0 -1
  284. package/dist/clis/args/unpublish-CvwaIimG.d.mts +0 -24
  285. package/dist/clis/args/unpublish-CvwaIimG.d.mts.map +0 -1
  286. package/dist/clis/args/vetra-CoMvTJK7.d.mts +0 -113
  287. package/dist/clis/args/vetra-CoMvTJK7.d.mts.map +0 -1
  288. package/dist/clis/build-config.mjs.map +0 -1
  289. package/dist/clis/constants.d.mts.map +0 -1
  290. package/dist/config-loader-B845Hidf.js.map +0 -1
  291. package/dist/constants-BP_gjn8g.d.ts +0 -8
  292. package/dist/constants-BP_gjn8g.d.ts.map +0 -1
  293. package/dist/index-C_iVZe7f.d.ts +0 -7
  294. package/dist/index-C_iVZe7f.d.ts.map +0 -1
  295. package/dist/index-DyYIJtVy.d.ts +0 -836
  296. package/dist/index-DyYIJtVy.d.ts.map +0 -1
  297. package/dist/types-C1in4fl3.d.ts.map +0 -1
  298. package/dist/types-CpnWmiFY.d.ts.map +0 -1
  299. package/dist/types-YqLqb0Zb.d.ts.map +0 -1
  300. package/dist/utils-DP122OSS.d.ts.map +0 -1
  301. package/dist/utils-aaTmfxFW.js.map +0 -1
@@ -1,6 +1,27 @@
1
- import { i as buildRuntimeConfig, n as deepMerge, r as DEFAULT_CONNECT_CONFIG, t as ConfigLoader } from "../config-loader-B845Hidf.js";
1
+ import { a as DEFAULT_CONNECT_CONFIG, i as workflowsSettingConflict, n as deepMerge, o as buildRuntimeConfig, r as resolveSourceConnect, t as ConfigLoader } from "../config-loader-DBJolZd0.js";
2
2
  import { JsonConfigAdapter } from "./json-adapter.js";
3
3
  import { z } from "zod";
4
+ import { satisfies, validRange } from "semver";
5
+ //#region connect/dynamic-base.ts
6
+ /**
7
+ * The base a dynamic-base Connect build is compiled against. The build emits
8
+ * this literal wherever a base-relative URL would go, and the serving layer
9
+ * (the dynamic-base vite plugin at build time, the connect proxy at serve
10
+ * time) rewrites it to the base the app is actually deployed under.
11
+ *
12
+ * It lives here, in the browser-safe shared package, rather than in
13
+ * `@powerhousedao/builder-tools`, because both the node-only build toolchain
14
+ * and Connect's own browser code need it. Importing builder-tools from app
15
+ * code pulls the whole build toolchain (and its node-only `read-pkg`
16
+ * dependency) into the browser graph.
17
+ */
18
+ const DYNAMIC_BASE_PLACEHOLDER = "/__PH_DYNAMIC_BASE__/";
19
+ const PLACEHOLDER_TOKEN = /\/__PH_DYNAMIC_BASE__\//;
20
+ /** Swaps a build-time placeholder in `url` for `runtimeBase`; URLs without one pass through. */
21
+ function resolveDynamicBaseUrl(url, runtimeBase) {
22
+ return url.replace(PLACEHOLDER_TOKEN, runtimeBase);
23
+ }
24
+ //#endregion
4
25
  //#region connect/env-config.ts
5
26
  /**
6
27
  * Coerces string values to boolean.
@@ -14,10 +35,26 @@ const booleanString = z.union([z.boolean(), z.enum(["true", "false"])]).transfor
14
35
  * Build-time configuration schema
15
36
  */
16
37
  const buildEnvSchema = z.object({
38
+ /**
39
+ * Comma-separated list of package names to load
40
+ * @example "package1,package2"
41
+ */
17
42
  PH_PACKAGES: z.string().optional(),
43
+ /**
44
+ * Path to local package to load during development
45
+ */
18
46
  PH_LOCAL_PACKAGE: z.string().optional(),
47
+ /**
48
+ * Sentry authentication token for uploading source maps
49
+ */
19
50
  PH_SENTRY_AUTH_TOKEN: z.string().optional(),
51
+ /**
52
+ * Sentry organization slug
53
+ */
20
54
  PH_SENTRY_ORG: z.string().optional(),
55
+ /**
56
+ * Sentry project slug
57
+ */
21
58
  PH_SENTRY_PROJECT: z.string().optional()
22
59
  });
23
60
  /**
@@ -30,7 +67,14 @@ const buildEnvSchema = z.object({
30
67
  * credentials, analytics processor toggles, etc.
31
68
  */
32
69
  const appConfigSchema = z.object({
70
+ /**
71
+ * Application version number (build metadata stamp)
72
+ * @default "unknown"
73
+ */
33
74
  PH_CONNECT_VERSION: z.string().default("unknown"),
75
+ /**
76
+ * CLI version number (build metadata stamp)
77
+ */
34
78
  PH_CONNECT_CLI_VERSION: z.string().optional()
35
79
  });
36
80
  /**
@@ -39,17 +83,43 @@ const appConfigSchema = z.object({
39
83
  * schema and stay env-driven.
40
84
  */
41
85
  const processorsConfigSchema = z.object({
86
+ /**
87
+ * Enable diff analytics tracking
88
+ * @default false
89
+ */
42
90
  PH_CONNECT_DIFF_ANALYTICS_ENABLED: booleanString.default(false),
91
+ /**
92
+ * Enable drive analytics tracking
93
+ * @default true
94
+ */
43
95
  PH_CONNECT_DRIVE_ANALYTICS_ENABLED: booleanString.default(true),
96
+ /**
97
+ * Enable external analytics processors
98
+ * @default true
99
+ */
44
100
  PH_CONNECT_EXTERNAL_ANALYTICS_PROCESSORS_ENABLED: booleanString.default(true)
45
101
  });
46
102
  /**
47
103
  * OpenPanel analytics configuration schema
48
104
  */
49
105
  const openPanelConfigSchema = z.object({
106
+ /**
107
+ * OpenPanel client ID. When unset, the OpenPanel subsystem is a no-op.
108
+ */
50
109
  PH_CONNECT_OPENPANEL_CLIENT_ID: z.string().optional(),
110
+ /**
111
+ * OpenPanel API URL override. Defaults to the OpenPanel cloud when unset.
112
+ */
51
113
  PH_CONNECT_OPENPANEL_API_URL: z.string().optional(),
114
+ /**
115
+ * Track UI events via the useOpenPanel() hook
116
+ * @default true
117
+ */
52
118
  PH_CONNECT_OPENPANEL_TRACK_UI_EVENTS: booleanString.default(true),
119
+ /**
120
+ * Track document operations via the OpenPanel processor
121
+ * @default true
122
+ */
53
123
  PH_CONNECT_OPENPANEL_TRACK_OPERATIONS: booleanString.default(true)
54
124
  });
55
125
  /**
@@ -108,7 +178,7 @@ function mergeEnvSources(options, keys, schema) {
108
178
  * @returns Validated and typed environment configuration
109
179
  */
110
180
  function loadConnectEnv(options = {}) {
111
- const merged = mergeEnvSources(options, new Set([...Object.keys(buildEnvSchema.shape), ...Object.keys(runtimeEnvSchema.shape)]), connectEnvSchema);
181
+ const merged = mergeEnvSources(options, /* @__PURE__ */ new Set([...Object.keys(buildEnvSchema.shape), ...Object.keys(runtimeEnvSchema.shape)]), connectEnvSchema);
112
182
  return connectEnvSchema.parse(merged);
113
183
  }
114
184
  /**
@@ -207,9 +277,15 @@ const ROOT_STORAGE_NAMESPACE = "reactor";
207
277
  function getStorageNamespace(basePath) {
208
278
  const normalized = normalizeBasePath(basePath);
209
279
  if (normalized === "/") return ROOT_STORAGE_NAMESPACE;
210
- return `${ROOT_STORAGE_NAMESPACE}--${normalized.slice(1, -1).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "default"}`;
280
+ const slug = normalized.slice(1, -1).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
281
+ return `${ROOT_STORAGE_NAMESPACE}--${slug || "default"}`;
211
282
  }
212
283
  //#endregion
284
+ //#region connect/layers.ts
285
+ /** Connect's cascade layers, Tailwind's `properties` first: package CSS goes in
286
+ * external-packages, above Connect's reset and below its utilities. */
287
+ const CONNECT_LAYER_ORDER = "@layer properties, theme, base, components, external-packages, utilities;";
288
+ //#endregion
213
289
  //#region connect/pwa-config.ts
214
290
  const MANIFEST_SCALAR_KEYS = [
215
291
  "name",
@@ -222,7 +298,7 @@ const MANIFEST_SCALAR_KEYS = [
222
298
  "scope",
223
299
  "launch_handler"
224
300
  ];
225
- const ADDITIVE_MANIFEST_KEYS = new Set([
301
+ const ADDITIVE_MANIFEST_KEYS = /* @__PURE__ */ new Set([
226
302
  "icons",
227
303
  "file_handlers",
228
304
  "categories"
@@ -527,6 +603,10 @@ const phConnectRuntimeConfigSchema = {
527
603
  homeBackground: {
528
604
  type: ["string", "null"],
529
605
  description: "Hero image on the empty home screen. URL or path to override; null or omitted uses the bundled default image."
606
+ },
607
+ favicon: {
608
+ type: ["string", "null"],
609
+ description: "The browser tab icon: a file (.ico, .svg or .png) relative to the project, served and built as icon.ico. A build input; the built runtime config leaves it out. `ph connect build --favicon` wins over it."
530
610
  }
531
611
  }
532
612
  },
@@ -560,6 +640,10 @@ const phConnectRuntimeConfigSchema = {
560
640
  type: "boolean",
561
641
  description: "Studio mode. Enables builder-only capabilities: Connect loads the vetra package and exposes DocumentModel (and vetra spec types) as creatable documents. Forced on by `ph vetra` / `ph connect studio`; false by default.",
562
642
  default: false
643
+ },
644
+ workflowsEnabled: {
645
+ type: "boolean",
646
+ description: "Powerhouse workflows in Connect. When true the tab loads the @powerhousedao/workflow package (workflow + connection documents, their editors and Workflow Studio) and the reactor worker registers its document models. Falls back to the top-level `workflows.enabled`; set it to override that for Connect. Independent of studioMode. False when neither is set."
563
647
  }
564
648
  }
565
649
  },
@@ -745,6 +829,32 @@ const phConnectRuntimeConfigSchema = {
745
829
  }
746
830
  }
747
831
  },
832
+ openPanel: {
833
+ type: "object",
834
+ additionalProperties: false,
835
+ description: "OpenPanel product analytics. Set `clientId` to enable; an empty `clientId` disables it. Events are only sent after the user accepts analytics cookies. Takes precedence over the build-time PH_CONNECT_OPENPANEL_* env vars.",
836
+ properties: {
837
+ clientId: {
838
+ type: "string",
839
+ description: "OpenPanel client id. Empty string disables OpenPanel entirely.",
840
+ default: ""
841
+ },
842
+ apiUrl: {
843
+ type: "string",
844
+ description: "OpenPanel API URL for self-hosted instances (e.g. 'https://openpanel.example/api'). Omit to use OpenPanel's hosted API."
845
+ },
846
+ trackUiEvents: {
847
+ type: "boolean",
848
+ description: "Track UI events.",
849
+ default: true
850
+ },
851
+ trackOperations: {
852
+ type: "boolean",
853
+ description: "Track document operations.",
854
+ default: true
855
+ }
856
+ }
857
+ },
748
858
  instance: {
749
859
  type: "object",
750
860
  additionalProperties: false,
@@ -758,7 +868,12 @@ const phConnectRuntimeConfigSchema = {
758
868
  },
759
869
  reactorWorker: {
760
870
  type: "boolean",
761
- description: "Host the reactor in a shared worker instead of on the main thread. Off by default; the main-thread reactor stays the proven path until cutover is verified.",
871
+ description: "Host the reactor in a shared worker instead of on the main thread. Off by default; the main-thread reactor stays the proven path until cutover is verified. Packaged deployments load the worker from the prebuilt bundle `ph connect build` emits under __reactor_worker__/ (the dev server builds it lazily at the same path); when that bundle is absent the feature reports itself unavailable instead of starting a worker that cannot load.",
872
+ default: false
873
+ },
874
+ multiReactor: {
875
+ type: "boolean",
876
+ description: "Opt-in multi-reactor routing. When on, Connect routes through the in-browser reactor plus remote backends instead of the single in-browser reactor. Off by default; the single-reactor path is unchanged.",
762
877
  default: false
763
878
  }
764
879
  }
@@ -767,33 +882,47 @@ const phConnectRuntimeConfigSchema = {
767
882
  type: "object",
768
883
  additionalProperties: false,
769
884
  description: "Settings for the reactor Connect runs in the browser, on the main thread or in the shared worker alike.",
770
- properties: { featureFlags: {
771
- type: "object",
772
- additionalProperties: false,
773
- description: "Enforcement flags. Each implies its predecessors, and the reactor refuses to boot on a set that names a later flag without an earlier one. These are consensus settings: a Connect syncing with a fleet must carry the same flags the fleet does, or the two reach different replay outcomes for the same history and diverge.",
774
- properties: {
775
- documentDecisions: {
776
- type: "boolean",
777
- description: "Decide writes from the document stream rather than the document meta cache, so a backdated deletion denies the operations that sort after it.",
778
- default: false
779
- },
780
- authEnforcement: {
781
- type: "boolean",
782
- description: "Enforce the auth scope's policy at admission, replay, and read. Requires documentDecisions.",
783
- default: false
784
- },
785
- authGroups: {
786
- type: "boolean",
787
- description: "Let `{ group }` principals match against the rosters of the group documents a policy names. Requires authEnforcement.",
788
- default: false
789
- },
790
- authConditions: {
791
- type: "boolean",
792
- description: "Evaluate `where` and `match` conditions on grants. Requires authGroups. Do not enable on a fleet `preflight:auth` reports as crossing a reducer version.",
793
- default: false
885
+ properties: {
886
+ featureFlags: {
887
+ type: "object",
888
+ additionalProperties: false,
889
+ description: "Enforcement flags. Each implies its predecessors, and the reactor refuses to boot on a set that names a later flag without an earlier one. These are consensus settings: a Connect syncing with a fleet must carry the same flags the fleet does, or the two reach different replay outcomes for the same history and diverge.",
890
+ properties: {
891
+ documentDecisions: {
892
+ type: "boolean",
893
+ description: "Decide writes from the document stream rather than the document meta cache, so a backdated deletion denies the operations that sort after it.",
894
+ default: false
895
+ },
896
+ authEnforcement: {
897
+ type: "boolean",
898
+ description: "Enforce the auth scope's policy at admission, replay, and read. Requires documentDecisions.",
899
+ default: false
900
+ },
901
+ authGroups: {
902
+ type: "boolean",
903
+ description: "Let `{ group }` principals match against the rosters of the group documents a policy names. Requires authEnforcement.",
904
+ default: false
905
+ },
906
+ authConditions: {
907
+ type: "boolean",
908
+ description: "Evaluate `where` and `match` conditions on grants. Requires authGroups. Do not enable on a fleet `preflight:auth` reports as crossing a reducer version.",
909
+ default: false
910
+ }
794
911
  }
912
+ },
913
+ createSignaturePolicy: {
914
+ type: "string",
915
+ enum: ["legacy", "v2-required"],
916
+ description: "What new documents are created as. `v2-required` documents accept only v2 action signatures and take content-addressed ids; set `legacy` while any peer Connect syncs with predates them. Existing documents keep their policy.",
917
+ default: "v2-required"
918
+ },
919
+ unsupportedStoredDocuments: {
920
+ type: "string",
921
+ enum: ["refuse", "read-only"],
922
+ description: "What the reactor does when this browser's store holds documents at protocol versions this build does not run. `refuse` fails the boot and names the versions; `read-only` boots and keeps those documents read-only.",
923
+ default: "refuse"
795
924
  }
796
- } }
925
+ }
797
926
  },
798
927
  pwa: {
799
928
  type: "object",
@@ -964,6 +1093,187 @@ const phConnectRuntimeConfigSchema = {
964
1093
  }
965
1094
  };
966
1095
  //#endregion
967
- export { ConfigLoader, DEFAULT_CONNECT_CONFIG, JsonConfigAdapter, PWA_FILE_HANDLER_ACTION, PWA_IDB_KEY, PWA_IDB_NAME, PWA_IDB_STORE, PWA_IDB_VERSION, ROOT_STORAGE_NAMESPACE, buildRuntimeConfig, connectEnvSchema, dedupeFileHandlers, dedupeIcons, deepMerge, getStorageNamespace, loadConnectEnv, loadRuntimeEnv, mergeManifest, mergePwaConfig, normalizeBasePath, phConnectRuntimeConfigSchema, powerhousePackageSchema, runtimeEnvSchema, setConnectEnv, toRegExpOrString, unionStrings, withInferredCategory };
1096
+ //#region connect/shared-deps.ts
1097
+ /**
1098
+ * The dependency set Connect and loaded packages share via the import map.
1099
+ * `@powerhousedao/connect` is deliberately absent: it is the Connect app, not
1100
+ * vendored (a host with routes compiles its files), so its exports are for a
1101
+ * host's own routes and layout. Packages share `@powerhousedao/connect-core`.
1102
+ */
1103
+ const SHARED_DEPS = [
1104
+ {
1105
+ specifier: "document-model",
1106
+ package: "document-model"
1107
+ },
1108
+ {
1109
+ specifier: "@powerhousedao/document-engineering",
1110
+ package: "@powerhousedao/document-engineering"
1111
+ },
1112
+ {
1113
+ specifier: "@powerhousedao/shared",
1114
+ package: "@powerhousedao/shared"
1115
+ },
1116
+ {
1117
+ specifier: "@powerhousedao/shared/registry/urls",
1118
+ package: "@powerhousedao/shared"
1119
+ },
1120
+ {
1121
+ specifier: "@powerhousedao/design-system/connect",
1122
+ package: "@powerhousedao/design-system"
1123
+ },
1124
+ {
1125
+ specifier: "@powerhousedao/reactor-browser",
1126
+ package: "@powerhousedao/reactor-browser"
1127
+ },
1128
+ {
1129
+ specifier: "zod",
1130
+ package: "zod"
1131
+ },
1132
+ {
1133
+ specifier: "@powerhousedao/connect-core",
1134
+ package: "@powerhousedao/connect-core"
1135
+ },
1136
+ {
1137
+ specifier: "@tanstack/react-router",
1138
+ package: "@tanstack/react-router"
1139
+ }
1140
+ ];
1141
+ const SHARED_DEP_SPECIFIERS = SHARED_DEPS.map((d) => d.specifier);
1142
+ /**
1143
+ * The `@powerhousedao/shared` subpaths the production vendor bundles. The
1144
+ * bare root is deliberately absent: its type barrel references node-only
1145
+ * modules (`clis/`), which the current vite/rolldown cannot bundle for the
1146
+ * browser — vendoring the root fails the build (a pre-existing latent
1147
+ * issue). A package that imports the bare root is simply not shared; it
1148
+ * bundles its own copy.
1149
+ */
1150
+ const SHARED_SUBPATHS = [
1151
+ "connect",
1152
+ "document-model",
1153
+ "processors",
1154
+ "document-drive",
1155
+ "registry",
1156
+ "registry/urls",
1157
+ "registry/manifest-slim"
1158
+ ];
1159
+ /**
1160
+ * The specifiers a package build may safely externalize onto the host's
1161
+ * import map — i.e. the ones the vendor actually publishes an entry for.
1162
+ *
1163
+ * `@powerhousedao/shared` is narrowed to SHARED_SUBPATHS rather than taken as
1164
+ * a prefix: the bare root is never vendored (see SHARED_SUBPATHS), and
1165
+ * neither are its other subpaths (`analytics`, `constants`, `clis`, ...).
1166
+ * Externalizing those would leave a bare specifier in the package's output
1167
+ * that nothing in the import map resolves, so the package would fail to load
1168
+ * at runtime instead of simply bundling its own copy.
1169
+ */
1170
+ const EXTERNALIZABLE_SHARED_SPECIFIERS = [.../* @__PURE__ */ new Set([...SHARED_DEP_SPECIFIERS.filter((s) => s !== "@powerhousedao/shared"), ...SHARED_SUBPATHS.map((s) => `@powerhousedao/shared/${s}`)])];
1171
+ /** Split a specifier into its package name and subpath ("" for a root). */
1172
+ function parseDepSpec(spec) {
1173
+ if (spec.startsWith("@")) {
1174
+ const parts = spec.split("/");
1175
+ return {
1176
+ pkg: parts.slice(0, 2).join("/"),
1177
+ sub: parts.slice(2).join("/")
1178
+ };
1179
+ }
1180
+ const i = spec.indexOf("/");
1181
+ return i === -1 ? {
1182
+ pkg: spec,
1183
+ sub: ""
1184
+ } : {
1185
+ pkg: spec.slice(0, i),
1186
+ sub: spec.slice(i + 1)
1187
+ };
1188
+ }
1189
+ function isSharedSpecifier(spec, specs) {
1190
+ return specs.some((s) => spec === s || spec.startsWith(s + "/"));
1191
+ }
1192
+ /**
1193
+ * Return the import/export specifiers in `source` that are a shared
1194
+ * specifier (or a subpath of one), sorted. Heuristic: only statement
1195
+ * positions are scanned (`from "x"`, `import "x"`, `import("x")`;
1196
+ * `export … from "x"` is covered by the `from` pattern), so import-like
1197
+ * text inside comments or strings can be reported too. That errs toward
1198
+ * over-reporting, which is the safe direction for the advisory build
1199
+ * warning.
1200
+ */
1201
+ function findSharedImports(source, specs = SHARED_DEP_SPECIFIERS) {
1202
+ const found = /* @__PURE__ */ new Set();
1203
+ for (const re of [
1204
+ /\bfrom\s+["']([^"'\\]+)["']/g,
1205
+ /\bimport\s+["']([^"'\\]+)["']/g,
1206
+ /\bimport\s*\(\s*["']([^"'\\]+)["']\s*\)/g
1207
+ ]) for (const m of source.matchAll(re)) {
1208
+ const spec = m[1];
1209
+ if (isSharedSpecifier(spec, specs)) found.add(spec);
1210
+ }
1211
+ return [...found].sort();
1212
+ }
1213
+ /**
1214
+ * Rewrite a package source for blob import in a worker context (import maps
1215
+ * don't apply there): shared specifiers become their mapped URLs, and
1216
+ * relative (`./`, `../`) specifiers become absolute against `sourceUrl`
1217
+ * (a blob URL has no directory to resolve against). `#` subpath imports are
1218
+ * deliberately left alone: they resolve via the package's own
1219
+ * `package.json` "imports" field, which the rewrite cannot reproduce.
1220
+ * Returns the input unchanged when nothing matched.
1221
+ */
1222
+ function rewritePackageSource(source, sourceUrl, imports) {
1223
+ if (!Object.keys(imports).length) return source;
1224
+ const base = new URL(sourceUrl);
1225
+ const map = (spec) => {
1226
+ const mapped = imports[spec];
1227
+ if (mapped) return mapped;
1228
+ if (spec.startsWith("./") || spec.startsWith("../")) return new URL(spec, base).href;
1229
+ return null;
1230
+ };
1231
+ let out = source;
1232
+ for (const re of [
1233
+ /\bfrom\s+(["'])([^"'\\]+)\1/g,
1234
+ /\bimport\s+(["'])([^"'\\]+)\1/g,
1235
+ /\bimport\s*\(\s*(["'])([^"'\\]+)\1\s*\)/g
1236
+ ]) out = out.replace(re, (match, quote, spec) => {
1237
+ const mapped = map(spec);
1238
+ return mapped ? match.replace(`${quote}${spec}${quote}`, `${quote}${mapped}${quote}`) : match;
1239
+ });
1240
+ return out;
1241
+ }
1242
+ /**
1243
+ * Compare a package's declared ranges against the host's version table.
1244
+ * `hostVersions` defines the checked set (only deps present in it are
1245
+ * checked). `*`, non-semver protocols (workspace:, file:, git:, npm:, URLs)
1246
+ * and unparseable ranges never mismatch.
1247
+ */
1248
+ function checkSharedDeps(pkgJson, hostVersions) {
1249
+ const out = [];
1250
+ const entries = [...Object.entries(pkgJson.dependencies ?? {}), ...Object.entries(pkgJson.peerDependencies ?? {})];
1251
+ for (const [dep, range] of entries) {
1252
+ const provided = hostVersions[dep];
1253
+ if (provided === void 0 || typeof range !== "string") continue;
1254
+ if (range === "*" || /^[a-z]+:/i.test(range)) continue;
1255
+ if (!validRange(range)) continue;
1256
+ if (!satisfies(provided, range, { includePrerelease: true })) out.push({
1257
+ package: dep,
1258
+ required: range,
1259
+ provided
1260
+ });
1261
+ }
1262
+ return out;
1263
+ }
1264
+ function formatSharedDepWarnings(mismatches) {
1265
+ return mismatches.map((m) => `${m.package}: requires ${m.required}, Connect provides ${m.provided}`);
1266
+ }
1267
+ /**
1268
+ * Stable filename for a local package's worker model bundle under
1269
+ * `__reactor_worker__/packages/`. Shared by the tab (URL computation via the
1270
+ * manifest) and the production prebuild (emitted entry names), so the two can
1271
+ * never drift. Scoped names flatten (`@scope/name` -> `scope__name`).
1272
+ */
1273
+ function workerPackageFileName(packageName) {
1274
+ return `${packageName.replace(/^@/, "").replace(/[^\w.-]+/g, "__")}.js`;
1275
+ }
1276
+ //#endregion
1277
+ export { CONNECT_LAYER_ORDER, ConfigLoader, DEFAULT_CONNECT_CONFIG, DYNAMIC_BASE_PLACEHOLDER, EXTERNALIZABLE_SHARED_SPECIFIERS, JsonConfigAdapter, PWA_FILE_HANDLER_ACTION, PWA_IDB_KEY, PWA_IDB_NAME, PWA_IDB_STORE, PWA_IDB_VERSION, ROOT_STORAGE_NAMESPACE, SHARED_DEPS, SHARED_DEP_SPECIFIERS, SHARED_SUBPATHS, buildRuntimeConfig, checkSharedDeps, connectEnvSchema, dedupeFileHandlers, dedupeIcons, deepMerge, findSharedImports, formatSharedDepWarnings, getStorageNamespace, loadConnectEnv, loadRuntimeEnv, mergeManifest, mergePwaConfig, normalizeBasePath, parseDepSpec, phConnectRuntimeConfigSchema, powerhousePackageSchema, resolveDynamicBaseUrl, resolveSourceConnect, rewritePackageSource, runtimeEnvSchema, setConnectEnv, toRegExpOrString, unionStrings, withInferredCategory, workerPackageFileName, workflowsSettingConflict };
968
1278
 
969
1279
  //# sourceMappingURL=index.js.map