@powerhousedao/shared 6.2.3-dev.7 → 6.2.3-dev.71
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.
- package/dist/analytics/index.d.ts +4 -4
- package/dist/analytics/index.d.ts.map +1 -1
- package/dist/analytics/index.js +25 -24
- package/dist/analytics/index.js.map +1 -1
- package/dist/clis/args/{access-token-To5LaIfL.mjs → access-token-3Hqv_U8I.mjs} +2 -2
- package/dist/clis/args/{access-token-To5LaIfL.mjs.map → access-token-3Hqv_U8I.mjs.map} +1 -1
- package/dist/clis/args/access-token-C5sKsH2O.d.mts +16 -0
- package/dist/clis/args/access-token-C5sKsH2O.d.mts.map +1 -0
- package/dist/clis/args/access-token.d.mts +3 -2
- package/dist/clis/args/access-token.mjs +1 -1
- package/dist/clis/args/{common-CcYbXrBx.mjs → common-BXabdhiO.mjs} +30 -7
- package/dist/clis/args/common-BXabdhiO.mjs.map +1 -0
- package/dist/clis/args/common-Bnm859xU.d.mts +186 -0
- package/dist/clis/args/common-Bnm859xU.d.mts.map +1 -0
- package/dist/clis/args/common.d.mts +3 -2
- package/dist/clis/args/common.mjs +1 -1
- package/dist/clis/args/{connect-BVVvCmL9.mjs → connect-BLAht4dO.mjs} +9 -4
- package/dist/clis/args/connect-BLAht4dO.mjs.map +1 -0
- package/dist/clis/args/connect-DjeiqXus.d.mts +450 -0
- package/dist/clis/args/connect-DjeiqXus.d.mts.map +1 -0
- package/dist/clis/args/connect.d.mts +3 -2
- package/dist/clis/args/connect.mjs +1 -1
- package/dist/clis/args/dist-CorQTQL-.mjs +1533 -0
- package/dist/clis/args/dist-CorQTQL-.mjs.map +1 -0
- package/dist/clis/args/{generate-CA916Fvj.mjs → generate-BOItUNvP.mjs} +40 -2
- package/dist/clis/args/generate-BOItUNvP.mjs.map +1 -0
- package/dist/clis/args/generate-BPBBLeUD.d.mts +103 -0
- package/dist/clis/args/generate-BPBBLeUD.d.mts.map +1 -0
- package/dist/clis/args/generate.d.mts +3 -2
- package/dist/clis/args/generate.mjs +1 -1
- package/dist/clis/args/{help-Bqbgbalu.mjs → help-Dejwe6Bz.mjs} +43 -16
- package/dist/clis/args/help-Dejwe6Bz.mjs.map +1 -0
- package/dist/clis/args/help-KuqI-EEG.d.mts +203 -0
- package/dist/clis/args/help-KuqI-EEG.d.mts.map +1 -0
- package/dist/clis/args/help.d.mts +3 -2
- package/dist/clis/args/help.mjs +1 -1
- package/dist/clis/args/index.d.mts +20 -19
- package/dist/clis/args/index.mjs +18 -18
- package/dist/clis/args/init-CTaK80wE.d.mts +55 -0
- package/dist/clis/args/init-CTaK80wE.d.mts.map +1 -0
- package/dist/clis/args/{init-rz9Ei7nq.mjs → init-xlCNZ8Oe.mjs} +7 -2
- package/dist/clis/args/{init-rz9Ei7nq.mjs.map → init-xlCNZ8Oe.mjs.map} +1 -1
- package/dist/clis/args/init.d.mts +3 -2
- package/dist/clis/args/init.mjs +1 -1
- package/dist/clis/args/inspect-BjRmtB86.d.mts +13 -0
- package/dist/clis/args/inspect-BjRmtB86.d.mts.map +1 -0
- package/dist/clis/args/{inspect-tckH8mSw.mjs → inspect-UNQgtuR0.mjs} +2 -2
- package/dist/clis/args/{inspect-tckH8mSw.mjs.map → inspect-UNQgtuR0.mjs.map} +1 -1
- package/dist/clis/args/inspect.d.mts +3 -2
- package/dist/clis/args/inspect.mjs +1 -1
- package/dist/clis/args/install-B0tMyUMw.d.mts +37 -0
- package/dist/clis/args/install-B0tMyUMw.d.mts.map +1 -0
- package/dist/clis/args/{install-Sz2DlCHh.mjs → install-F-27kF6m.mjs} +2 -2
- package/dist/clis/args/{install-Sz2DlCHh.mjs.map → install-F-27kF6m.mjs.map} +1 -1
- package/dist/clis/args/install.d.mts +3 -2
- package/dist/clis/args/install.mjs +1 -1
- package/dist/clis/args/{list-DM2d6f1m.mjs → list-Bkfn8Yuo.mjs} +2 -2
- package/dist/clis/args/{list-DM2d6f1m.mjs.map → list-Bkfn8Yuo.mjs.map} +1 -1
- package/dist/clis/args/list-DrbxA7JJ.d.mts +10 -0
- package/dist/clis/args/list-DrbxA7JJ.d.mts.map +1 -0
- package/dist/clis/args/list.d.mts +3 -2
- package/dist/clis/args/list.mjs +1 -1
- package/dist/clis/args/{login-DiKT5Jfu.mjs → login-CIFkQExi.mjs} +2 -2
- package/dist/clis/args/{login-DiKT5Jfu.mjs.map → login-CIFkQExi.mjs.map} +1 -1
- package/dist/clis/args/login-CXRJXg71.d.mts +25 -0
- package/dist/clis/args/login-CXRJXg71.d.mts.map +1 -0
- package/dist/clis/args/login.d.mts +3 -2
- package/dist/clis/args/login.mjs +1 -1
- package/dist/clis/args/migrate-DkCQRL2D.d.mts +19 -0
- package/dist/clis/args/migrate-DkCQRL2D.d.mts.map +1 -0
- package/dist/clis/args/{migrate-CG_gWc4k.mjs → migrate-DwJGhc2d.mjs} +2 -2
- package/dist/clis/args/{migrate-CG_gWc4k.mjs.map → migrate-DwJGhc2d.mjs.map} +1 -1
- package/dist/clis/args/migrate.d.mts +3 -2
- package/dist/clis/args/migrate.mjs +1 -1
- package/dist/clis/args/publish-CeW4bOrl.d.mts +16 -0
- package/dist/clis/args/publish-CeW4bOrl.d.mts.map +1 -0
- package/dist/clis/args/{publish-DDZYsUfV.mjs → publish-DHqlGWmL.mjs} +2 -2
- package/dist/clis/args/{publish-DDZYsUfV.mjs.map → publish-DHqlGWmL.mjs.map} +1 -1
- package/dist/clis/args/publish.d.mts +3 -2
- package/dist/clis/args/publish.mjs +1 -1
- package/dist/clis/args/{registry-C_OVFQmI.mjs → registry-DIwES3l2.mjs} +2 -2
- package/dist/clis/args/{registry-C_OVFQmI.mjs.map → registry-DIwES3l2.mjs.map} +1 -1
- package/dist/clis/args/registry-DNH8xuaE.d.mts +17 -0
- package/dist/clis/args/registry-DNH8xuaE.d.mts.map +1 -0
- package/dist/clis/args/registry.d.mts +3 -2
- package/dist/clis/args/registry.mjs +1 -1
- package/dist/clis/args/run-l_LiMplO.mjs +28 -0
- package/dist/clis/args/run-l_LiMplO.mjs.map +1 -0
- package/dist/clis/args/run.d.mts +18 -0
- package/dist/clis/args/run.d.mts.map +1 -0
- package/dist/clis/args/run.mjs +2 -0
- package/dist/clis/args/{service-CHOOr0Gg.mjs → service-Cpjlyeu5.mjs} +2 -2
- package/dist/clis/args/{service-CHOOr0Gg.mjs.map → service-Cpjlyeu5.mjs.map} +1 -1
- package/dist/clis/args/service-DiTFThbn.d.mts +27 -0
- package/dist/clis/args/service-DiTFThbn.d.mts.map +1 -0
- package/dist/clis/args/service.d.mts +3 -2
- package/dist/clis/args/service.mjs +1 -1
- package/dist/clis/args/{switchboard-Dsp7nosi.mjs → switchboard-CCaAtU56.mjs} +2 -2
- package/dist/clis/args/{switchboard-Dsp7nosi.mjs.map → switchboard-CCaAtU56.mjs.map} +1 -1
- package/dist/clis/args/switchboard-RrNb1fUH.d.mts +70 -0
- package/dist/clis/args/switchboard-RrNb1fUH.d.mts.map +1 -0
- package/dist/clis/args/switchboard.d.mts +3 -2
- package/dist/clis/args/switchboard.mjs +1 -1
- package/dist/clis/args/{uninstall-CTwTX0u_.mjs → uninstall-3U0B8g5c.mjs} +2 -2
- package/dist/clis/args/{uninstall-CTwTX0u_.mjs.map → uninstall-3U0B8g5c.mjs.map} +1 -1
- package/dist/clis/args/uninstall-CDx7lwxn.d.mts +28 -0
- package/dist/clis/args/uninstall-CDx7lwxn.d.mts.map +1 -0
- package/dist/clis/args/uninstall.d.mts +3 -2
- package/dist/clis/args/uninstall.mjs +1 -1
- package/dist/clis/args/unpublish-CEDsk6uv.d.mts +22 -0
- package/dist/clis/args/unpublish-CEDsk6uv.d.mts.map +1 -0
- package/dist/clis/args/{unpublish-BPMkGEg5.mjs → unpublish-s9zUh6Gw.mjs} +2 -2
- package/dist/clis/args/{unpublish-BPMkGEg5.mjs.map → unpublish-s9zUh6Gw.mjs.map} +1 -1
- package/dist/clis/args/unpublish.d.mts +3 -2
- package/dist/clis/args/unpublish.mjs +1 -1
- package/dist/clis/args/{vetra-b4KUu1Ax.mjs → vetra-BUNlAAPp.mjs} +2 -2
- package/dist/clis/args/{vetra-b4KUu1Ax.mjs.map → vetra-BUNlAAPp.mjs.map} +1 -1
- package/dist/clis/args/vetra-DkDaWFPi.d.mts +111 -0
- package/dist/clis/args/vetra-DkDaWFPi.d.mts.map +1 -0
- package/dist/clis/args/vetra-ports.test.d.mts +2 -1
- package/dist/clis/args/vetra-ports.test.mjs +7366 -5728
- package/dist/clis/args/vetra-ports.test.mjs.map +1 -1
- package/dist/clis/args/vetra.d.mts +3 -2
- package/dist/clis/args/vetra.mjs +1 -1
- package/dist/clis/build-config-tJhHVdPm.mjs +277 -0
- package/dist/clis/build-config-tJhHVdPm.mjs.map +1 -0
- package/dist/clis/build-config.d.mts +56 -10616
- package/dist/clis/build-config.d.mts.map +1 -1
- package/dist/clis/build-config.mjs +2 -88
- package/dist/clis/build-pieces.d.mts +160 -0
- package/dist/clis/build-pieces.d.mts.map +1 -0
- package/dist/clis/build-pieces.mjs +549 -0
- package/dist/clis/build-pieces.mjs.map +1 -0
- package/dist/clis/command-names.d.mts +2 -2
- package/dist/clis/command-names.d.mts.map +1 -1
- package/dist/clis/command-names.mjs +1 -0
- package/dist/clis/command-names.mjs.map +1 -1
- package/dist/clis/constants.d.mts +3 -462
- package/dist/clis/constants.mjs +46 -13
- package/dist/clis/constants.mjs.map +1 -1
- package/dist/clis/feature-flags.d.mts +17 -0
- package/dist/clis/feature-flags.d.mts.map +1 -0
- package/dist/clis/feature-flags.mjs +21 -0
- package/dist/clis/feature-flags.mjs.map +1 -0
- package/dist/clis/index-DnZYG-8g.d.mts +11154 -0
- package/dist/clis/index-DnZYG-8g.d.mts.map +1 -0
- package/dist/clis/index.d.mts +3390 -1963
- package/dist/clis/index.d.mts.map +1 -1
- package/dist/clis/index.mjs +1052 -854
- package/dist/clis/index.mjs.map +1 -1
- package/dist/clis/package-style.d.mts +32 -0
- package/dist/clis/package-style.d.mts.map +1 -0
- package/dist/clis/package-style.mjs +102 -0
- package/dist/clis/package-style.mjs.map +1 -0
- package/dist/clis/ph-dir.d.mts +26 -0
- package/dist/clis/ph-dir.d.mts.map +1 -0
- package/dist/clis/ph-dir.mjs +37 -0
- package/dist/clis/ph-dir.mjs.map +1 -0
- package/dist/clis/project-env.d.mts +4 -4
- package/dist/clis/project-env.d.mts.map +1 -1
- package/dist/clis/project-env.mjs.map +1 -1
- package/dist/clis/project-ports.d.mts +5 -5
- package/dist/clis/project-ports.d.mts.map +1 -1
- package/dist/clis/project-ports.mjs +1 -1
- package/dist/clis/project-ports.mjs.map +1 -1
- package/dist/clis/rolldown-runtime-B4iAMlE-.mjs +35 -0
- package/dist/clis/services/telemetry.d.mts +7 -7
- package/dist/clis/services/telemetry.d.mts.map +1 -1
- package/dist/clis/services/telemetry.mjs.map +1 -1
- package/dist/clis/types-DT6KawYx.d.mts +2317 -0
- package/dist/clis/types-DT6KawYx.d.mts.map +1 -0
- package/dist/clis/utils.d.mts +4 -4
- package/dist/clis/utils.d.mts.map +1 -1
- package/dist/clis/utils.mjs.map +1 -1
- package/dist/{config-loader-B845Hidf.js → config-loader-BWt0c0eU.js} +48 -11
- package/dist/config-loader-BWt0c0eU.js.map +1 -0
- package/dist/connect/config-loader.d.ts +21 -8
- package/dist/connect/config-loader.d.ts.map +1 -1
- package/dist/connect/config-loader.js +2 -2
- package/dist/connect/connect-config-schema.d.ts +3 -0
- package/dist/connect/connect-config-schema.js +445 -0
- package/dist/connect/connect-config-schema.js.map +1 -0
- package/dist/connect/image-ref.d.ts +32 -0
- package/dist/connect/image-ref.d.ts.map +1 -0
- package/dist/connect/image-ref.js +80 -0
- package/dist/connect/image-ref.js.map +1 -0
- package/dist/connect/index.d.ts +220 -643
- package/dist/connect/index.d.ts.map +1 -1
- package/dist/connect/index.js +432 -507
- package/dist/connect/index.js.map +1 -1
- package/dist/connect/json-adapter.d.ts +3 -4
- package/dist/connect/json-adapter.d.ts.map +1 -1
- package/dist/connect/json-adapter.js.map +1 -1
- package/dist/connect-config-schema-1-O1CQ4v.d.ts +1731 -0
- package/dist/connect-config-schema-1-O1CQ4v.d.ts.map +1 -0
- package/dist/constants-CcaK3k1D.d.ts +9 -0
- package/dist/constants-CcaK3k1D.d.ts.map +1 -0
- package/dist/constants.d.ts +3 -2
- package/dist/constants.js +15 -5
- package/dist/constants.js.map +1 -1
- package/dist/document-drive/index.d.ts +103 -101
- package/dist/document-drive/index.d.ts.map +1 -1
- package/dist/document-drive/index.js +40 -31
- package/dist/document-drive/index.js.map +1 -1
- package/dist/document-model/errors.d.ts +3 -0
- package/dist/document-model/errors.js +152 -0
- package/dist/document-model/errors.js.map +1 -0
- package/dist/document-model/index.d.ts +5 -4
- package/dist/document-model/index.js +298 -391
- package/dist/document-model/index.js.map +1 -1
- package/dist/document-model/mock.d.ts +2 -3
- package/dist/document-model/mock.d.ts.map +1 -1
- package/dist/document-model/mock.js +2 -1
- package/dist/document-model/mock.js.map +1 -1
- package/dist/document-model/utils.d.ts +3 -2
- package/dist/document-model/utils.js +1 -1
- package/dist/document-model/version.d.ts +3 -0
- package/dist/document-model/version.js +8 -0
- package/dist/document-model/version.js.map +1 -0
- package/dist/host-tokens/index.d.ts +3 -0
- package/dist/host-tokens/index.js +278 -0
- package/dist/host-tokens/index.js.map +1 -0
- package/dist/index-DIM6qtzj.d.ts +227 -0
- package/dist/index-DIM6qtzj.d.ts.map +1 -0
- package/dist/index-DvbhwImT.d.ts +36 -0
- package/dist/index-DvbhwImT.d.ts.map +1 -0
- package/dist/index.d.ts +7 -6
- package/dist/index.js.map +1 -1
- package/dist/processors/index.d.ts +3 -2
- package/dist/processors/index.js +63 -4
- package/dist/processors/index.js.map +1 -1
- package/dist/purge-v06m_oGz.js +381 -0
- package/dist/purge-v06m_oGz.js.map +1 -0
- package/dist/registry/index.d.ts +15 -15
- package/dist/registry/index.d.ts.map +1 -1
- package/dist/registry/index.js +25 -7
- package/dist/registry/index.js.map +1 -1
- package/dist/registry/manifest-slim.d.ts +4 -3
- package/dist/registry/manifest-slim.d.ts.map +1 -1
- package/dist/registry/manifest-slim.js +21 -0
- package/dist/registry/manifest-slim.js.map +1 -1
- package/dist/registry/updates.d.ts +3 -3
- package/dist/registry/updates.d.ts.map +1 -1
- package/dist/registry/updates.js.map +1 -1
- package/dist/registry/urls.d.ts +2 -2
- package/dist/registry/urls.d.ts.map +1 -1
- package/dist/registry/urls.js.map +1 -1
- package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
- package/dist/{types-CpnWmiFY.d.ts → types-BpO4LIKj.d.ts} +2149 -985
- package/dist/types-BpO4LIKj.d.ts.map +1 -0
- package/dist/{types-C1in4fl3.d.ts → types-Bsp8VL2y.d.ts} +2 -2
- package/dist/types-Bsp8VL2y.d.ts.map +1 -0
- package/dist/{types-YqLqb0Zb.d.ts → types-OXIqeH8W.d.ts} +39 -43
- package/dist/types-OXIqeH8W.d.ts.map +1 -0
- package/dist/{utils-DP122OSS.d.ts → utils-BrKxCmKx.d.ts} +2 -2
- package/dist/utils-BrKxCmKx.d.ts.map +1 -0
- package/dist/{utils-aaTmfxFW.js → utils-CSF716ux.js} +10 -3
- package/dist/utils-CSF716ux.js.map +1 -0
- package/dist/version-BxLITo9P.d.ts +6 -0
- package/dist/version-BxLITo9P.d.ts.map +1 -0
- package/package.json +28 -7
- package/dist/clis/args/access-token--9H57y8J.d.mts +0 -18
- package/dist/clis/args/access-token--9H57y8J.d.mts.map +0 -1
- package/dist/clis/args/common-CcYbXrBx.mjs.map +0 -1
- package/dist/clis/args/common-zPBoTNJF.d.mts +0 -183
- package/dist/clis/args/common-zPBoTNJF.d.mts.map +0 -1
- package/dist/clis/args/connect-BVVvCmL9.mjs.map +0 -1
- package/dist/clis/args/connect-BtU0MTTc.d.mts +0 -443
- package/dist/clis/args/connect-BtU0MTTc.d.mts.map +0 -1
- package/dist/clis/args/generate-CA916Fvj.mjs.map +0 -1
- package/dist/clis/args/generate-DnV-bfXt.d.mts +0 -87
- package/dist/clis/args/generate-DnV-bfXt.d.mts.map +0 -1
- package/dist/clis/args/help-Bqbgbalu.mjs.map +0 -1
- package/dist/clis/args/help-CjAsudUn.d.mts +0 -193
- package/dist/clis/args/help-CjAsudUn.d.mts.map +0 -1
- package/dist/clis/args/init-CUXyfquF.d.mts +0 -55
- package/dist/clis/args/init-CUXyfquF.d.mts.map +0 -1
- package/dist/clis/args/inspect-DtZeoA5c.d.mts +0 -15
- package/dist/clis/args/inspect-DtZeoA5c.d.mts.map +0 -1
- package/dist/clis/args/install-CkP8zcHb.d.mts +0 -40
- package/dist/clis/args/install-CkP8zcHb.d.mts.map +0 -1
- package/dist/clis/args/list-BGf8s_gj.d.mts +0 -12
- package/dist/clis/args/list-BGf8s_gj.d.mts.map +0 -1
- package/dist/clis/args/login-DNsHwvqk.d.mts +0 -27
- package/dist/clis/args/login-DNsHwvqk.d.mts.map +0 -1
- package/dist/clis/args/magic-string.es-h_0HDQBQ.mjs +0 -1013
- package/dist/clis/args/magic-string.es-h_0HDQBQ.mjs.map +0 -1
- package/dist/clis/args/migrate-sixkWhxm.d.mts +0 -21
- package/dist/clis/args/migrate-sixkWhxm.d.mts.map +0 -1
- package/dist/clis/args/publish-Dqe5DUst.d.mts +0 -18
- package/dist/clis/args/publish-Dqe5DUst.d.mts.map +0 -1
- package/dist/clis/args/registry-C_RfTsKB.d.mts +0 -19
- package/dist/clis/args/registry-C_RfTsKB.d.mts.map +0 -1
- package/dist/clis/args/service-DhIkf8-O.d.mts +0 -22
- package/dist/clis/args/service-DhIkf8-O.d.mts.map +0 -1
- package/dist/clis/args/switchboard-BlPaq2at.d.mts +0 -72
- package/dist/clis/args/switchboard-BlPaq2at.d.mts.map +0 -1
- package/dist/clis/args/uninstall-BpA3YYbw.d.mts +0 -31
- package/dist/clis/args/uninstall-BpA3YYbw.d.mts.map +0 -1
- package/dist/clis/args/unpublish-CvwaIimG.d.mts +0 -24
- package/dist/clis/args/unpublish-CvwaIimG.d.mts.map +0 -1
- package/dist/clis/args/vetra-CoMvTJK7.d.mts +0 -113
- package/dist/clis/args/vetra-CoMvTJK7.d.mts.map +0 -1
- package/dist/clis/build-config.mjs.map +0 -1
- package/dist/clis/constants.d.mts.map +0 -1
- package/dist/config-loader-B845Hidf.js.map +0 -1
- package/dist/constants-BP_gjn8g.d.ts +0 -8
- package/dist/constants-BP_gjn8g.d.ts.map +0 -1
- package/dist/index-C_iVZe7f.d.ts +0 -7
- package/dist/index-C_iVZe7f.d.ts.map +0 -1
- package/dist/index-DyYIJtVy.d.ts +0 -836
- package/dist/index-DyYIJtVy.d.ts.map +0 -1
- package/dist/types-C1in4fl3.d.ts.map +0 -1
- package/dist/types-CpnWmiFY.d.ts.map +0 -1
- package/dist/types-YqLqb0Zb.d.ts.map +0 -1
- package/dist/utils-DP122OSS.d.ts.map +0 -1
- package/dist/utils-aaTmfxFW.js.map +0 -1
package/dist/clis/index.mjs
CHANGED
|
@@ -1,48 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as __toESM, r as __require, t as __commonJSMin } from "./rolldown-runtime-B4iAMlE-.mjs";
|
|
2
2
|
import { array, boolean, command, flag, multioption, number, oneOf, option, optional, positional, rest, restPositionals, string } from "cmd-ts";
|
|
3
3
|
import { AGENTS as AGENTS$1 } from "package-manager-detector/constants";
|
|
4
4
|
import { homedir } from "node:os";
|
|
5
5
|
import path, { join } from "node:path";
|
|
6
|
-
import { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
|
|
6
|
+
import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
|
|
7
7
|
import dotenv from "dotenv";
|
|
8
8
|
import chalk from "chalk";
|
|
9
9
|
import fsPromises, { mkdir, stat, writeFile } from "node:fs/promises";
|
|
10
10
|
import { fileURLToPath } from "node:url";
|
|
11
11
|
import { promisify } from "node:util";
|
|
12
12
|
import { execFile } from "node:child_process";
|
|
13
|
-
import { clean, valid } from "semver";
|
|
13
|
+
import { clean, compare, valid } from "semver";
|
|
14
14
|
import spawn from "cross-spawn";
|
|
15
15
|
import { isTruthy } from "remeda";
|
|
16
16
|
import npa from "npm-package-arg";
|
|
17
17
|
import { packageDirectory } from "package-directory";
|
|
18
18
|
import { execSync } from "child_process";
|
|
19
|
-
import { dirname } from "path";
|
|
19
|
+
import { dirname, resolve } from "path";
|
|
20
20
|
import { writePackage } from "write-package";
|
|
21
|
+
import { toJSONSchema, z } from "zod";
|
|
21
22
|
import lt from "semver/functions/lt.js";
|
|
22
|
-
//#region \0rolldown/runtime.js
|
|
23
|
-
var __create = Object.create;
|
|
24
|
-
var __defProp = Object.defineProperty;
|
|
25
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
26
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
27
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
28
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
29
|
-
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
30
|
-
var __copyProps = (to, from, except, desc) => {
|
|
31
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
32
|
-
key = keys[i];
|
|
33
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
34
|
-
get: ((k) => from[k]).bind(null, key),
|
|
35
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
return to;
|
|
39
|
-
};
|
|
40
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
41
|
-
value: mod,
|
|
42
|
-
enumerable: true
|
|
43
|
-
}) : target, mod));
|
|
44
|
-
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
45
|
-
//#endregion
|
|
46
23
|
//#region clis/constants.ts
|
|
47
24
|
const SERVICE_ACTIONS = [
|
|
48
25
|
"start",
|
|
@@ -51,7 +28,7 @@ const SERVICE_ACTIONS = [
|
|
|
51
28
|
"setup",
|
|
52
29
|
"restart"
|
|
53
30
|
];
|
|
54
|
-
const SECONDS_IN_DAY =
|
|
31
|
+
const SECONDS_IN_DAY = 86400;
|
|
55
32
|
const DEFAULT_EXPIRY_DAYS = 7;
|
|
56
33
|
const DEFAULT_EXPIRY_SECONDS = 7 * SECONDS_IN_DAY;
|
|
57
34
|
const DRIVES_PRESERVE_STRATEGIES = ["preserve-all", "preserve-by-url-and-detach"];
|
|
@@ -74,6 +51,18 @@ const PROJECT_PORT_BAND_SIZE = 1e3;
|
|
|
74
51
|
const PROJECT_PORT_BAND_SWITCHBOARD = 7e3;
|
|
75
52
|
const PROJECT_PORT_BAND_STUDIO = 6e3;
|
|
76
53
|
const PROJECT_PORT_BAND_VETRA_CONNECT = 2e3;
|
|
54
|
+
/**
|
|
55
|
+
* Icon for the drives switchboard creates by default, inlined as a data URI.
|
|
56
|
+
*
|
|
57
|
+
* A remote URL is the wrong shape for this: the value is baked into the drive
|
|
58
|
+
* document and rendered by every Connect that opens it, so the icon only
|
|
59
|
+
* appears when that client can reach that host. A desktop or air-gapped install
|
|
60
|
+
* cannot, and the ipfs.io gateway this previously pointed at now answers 403
|
|
61
|
+
* regardless.
|
|
62
|
+
*
|
|
63
|
+
* The mark is drawn dark-on-light so it stays legible against either theme.
|
|
64
|
+
*/
|
|
65
|
+
const DEFAULT_DRIVE_ICON = "data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3E%3Crect%20width='16'%20height='16'%20rx='3'%20fill='%23F3F5F7'/%3E%3Cpath%20fill='%23343839'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10.0059%200L3.41636%205.45646C2.44979%206.25682%202.3795%207.71452%203.26456%208.60418L5.54425%2010.8957C6.21311%2011.568%206.35783%2012.6012%205.89944%2013.4314L4.48126%2016H2.13333C0.955126%2016%200%2015.0449%200%2013.8667V2.13333C0%200.955126%200.955126%200%202.13333%200H10.0059ZM11.2436%200L10.0128%202.24221C9.55899%203.06891%209.70183%204.09549%2010.3641%204.7669L12.7825%207.21868C13.6656%208.11402%2013.5866%209.57512%2012.612%2010.37L5.70922%2016H13.8667C15.0449%2016%2016%2015.0449%2016%2013.8667V2.13333C16%200.955126%2015.0449%200%2013.8667%200H11.2436Z'/%3E%3C/svg%3E";
|
|
77
66
|
const DEFAULT_VETRA_DRIVE_ID = "vetra";
|
|
78
67
|
const MINIMUM_NODE_VERSION = "24.0.0";
|
|
79
68
|
const PH_BIN = "ph-cli-legacy";
|
|
@@ -87,6 +76,7 @@ const REACTOR_API_PACKAGE = "@powerhousedao/reactor-api";
|
|
|
87
76
|
const ANALYTICS_ENGINE_CORE_PACKAGE = "@powerhousedao/analytics-engine-core";
|
|
88
77
|
const GRAPHQL_PACKAGE = "graphql";
|
|
89
78
|
const GRAPHQL_TAG_PACKAGE = "graphql-tag";
|
|
79
|
+
const PIECES_FRAMEWORK_PACKAGE = "@powerhousedao/pieces-framework";
|
|
90
80
|
const PEER_EXTERNAL_DEPENDENCIES = {
|
|
91
81
|
[GRAPHQL_PACKAGE]: {
|
|
92
82
|
peer: "^16",
|
|
@@ -106,13 +96,21 @@ const PEER_EXTERNAL_DEPENDENCIES = {
|
|
|
106
96
|
},
|
|
107
97
|
zod: {
|
|
108
98
|
peer: "^4",
|
|
109
|
-
dev: "4.
|
|
99
|
+
dev: "4.6.5"
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
const FEATURE_DEPENDENCIES = {
|
|
103
|
+
analyticsProcessor: {
|
|
104
|
+
peerVersioned: [ANALYTICS_ENGINE_CORE_PACKAGE],
|
|
105
|
+
peerExternal: {},
|
|
106
|
+
devVersioned: []
|
|
107
|
+
},
|
|
108
|
+
piece: {
|
|
109
|
+
peerVersioned: [],
|
|
110
|
+
peerExternal: {},
|
|
111
|
+
devVersioned: [PIECES_FRAMEWORK_PACKAGE]
|
|
110
112
|
}
|
|
111
113
|
};
|
|
112
|
-
const FEATURE_DEPENDENCIES = { analyticsProcessor: {
|
|
113
|
-
peerVersioned: [ANALYTICS_ENGINE_CORE_PACKAGE],
|
|
114
|
-
peerExternal: {}
|
|
115
|
-
} };
|
|
116
114
|
const VERSIONED_DEPENDENCIES = [...VERSIONED_PEER_DEPENDENCIES, ...FEATURE_DEPENDENCIES.analyticsProcessor.peerVersioned];
|
|
117
115
|
const BOILERPLATE_ALLOWED_BUILDS = [
|
|
118
116
|
"@apollo/protobufjs",
|
|
@@ -135,7 +133,11 @@ const VERSIONED_DEV_DEPENDENCIES = [
|
|
|
135
133
|
"@powerhousedao/reactor",
|
|
136
134
|
"@powerhousedao/shared",
|
|
137
135
|
"@powerhousedao/connect",
|
|
138
|
-
"@powerhousedao/design-system"
|
|
136
|
+
"@powerhousedao/design-system",
|
|
137
|
+
"@powerhousedao/host-core",
|
|
138
|
+
"@powerhousedao/clint",
|
|
139
|
+
"@powerhousedao/desktop",
|
|
140
|
+
"@powerhousedao/switchboard"
|
|
139
141
|
];
|
|
140
142
|
const packageJsonExports = {
|
|
141
143
|
".": {
|
|
@@ -169,14 +171,22 @@ const packageJsonExports = {
|
|
|
169
171
|
},
|
|
170
172
|
"./subgraphs": {
|
|
171
173
|
types: "./dist/types/subgraphs/index.d.ts",
|
|
172
|
-
browser: "./dist/browser/subgraphs/index.js",
|
|
173
174
|
node: "./dist/node/subgraphs/index.mjs"
|
|
174
175
|
},
|
|
176
|
+
"./connect-routes": { browser: "./dist/browser/connect-routes.js" },
|
|
175
177
|
"./processors": {
|
|
176
178
|
types: "./dist/types/processors/index.d.ts",
|
|
177
179
|
browser: "./dist/browser/processors/index.js",
|
|
178
180
|
node: "./dist/node/processors/index.mjs"
|
|
179
181
|
},
|
|
182
|
+
"./pieces": {
|
|
183
|
+
types: "./dist/types/pieces/index.d.ts",
|
|
184
|
+
node: "./dist/node/pieces/index.mjs"
|
|
185
|
+
},
|
|
186
|
+
"./pieces/*": {
|
|
187
|
+
types: "./dist/types/pieces/*/index.d.ts",
|
|
188
|
+
node: "./dist/node/pieces/*/index.mjs"
|
|
189
|
+
},
|
|
180
190
|
"./manifest": "./dist/powerhouse.manifest.json",
|
|
181
191
|
"./style.css": "./dist/style.css"
|
|
182
192
|
};
|
|
@@ -242,15 +252,15 @@ const externalDevDependencies = {
|
|
|
242
252
|
"@types/react": "^19.2.3",
|
|
243
253
|
"@types/react-dom": "^19.2.3",
|
|
244
254
|
"@vitejs/plugin-react": "^6.0.1",
|
|
245
|
-
"@vitest/coverage-v8": "
|
|
246
|
-
oxfmt: "0.
|
|
255
|
+
"@vitest/coverage-v8": "5.0.3",
|
|
256
|
+
oxfmt: "0.68.0",
|
|
247
257
|
oxlint: "1.70.0",
|
|
248
258
|
"oxlint-tsgolint": "0.23.0",
|
|
249
259
|
tailwindcss: "^4.1.16",
|
|
250
|
-
typescript: "
|
|
260
|
+
typescript: "~7.0.2",
|
|
251
261
|
vite: "^8.0.10",
|
|
252
262
|
"vite-tsconfig-paths": "6.1.1",
|
|
253
|
-
vitest: "
|
|
263
|
+
vitest: "5.0.3"
|
|
254
264
|
};
|
|
255
265
|
const defaultManifest = {
|
|
256
266
|
name: "",
|
|
@@ -309,6 +319,20 @@ const buildArgs = {
|
|
|
309
319
|
defaultValue: () => "dist",
|
|
310
320
|
defaultValueIsSerializable: true
|
|
311
321
|
}),
|
|
322
|
+
noSharedDeps: flag({
|
|
323
|
+
type: boolean,
|
|
324
|
+
long: "no-shared-deps",
|
|
325
|
+
description: "Bundle the shared dependency set instead of externalizing it (default: externalize)",
|
|
326
|
+
defaultValue: () => false,
|
|
327
|
+
defaultValueIsSerializable: true
|
|
328
|
+
}),
|
|
329
|
+
ignoreTypeErrors: flag({
|
|
330
|
+
type: boolean,
|
|
331
|
+
long: "ignore-type-errors",
|
|
332
|
+
description: "Unsafe: build even when tsc reports type errors, without asking. The package can load and still fail at runtime",
|
|
333
|
+
defaultValue: () => false,
|
|
334
|
+
defaultValueIsSerializable: true
|
|
335
|
+
}),
|
|
312
336
|
...debugArgs
|
|
313
337
|
};
|
|
314
338
|
const packageManagerArgs = {
|
|
@@ -414,7 +438,7 @@ const vetraSwitchboardArgs = {
|
|
|
414
438
|
const defaultDrivesUrl = option({
|
|
415
439
|
type: optional(string),
|
|
416
440
|
long: "default-drives-url",
|
|
417
|
-
description: "
|
|
441
|
+
description: "Comma-separated drive URLs to use as Connect's default drives.",
|
|
418
442
|
defaultValue: () => ""
|
|
419
443
|
});
|
|
420
444
|
const logLevel = option({
|
|
@@ -551,7 +575,7 @@ const connectRuntimeOverrideArgs = {
|
|
|
551
575
|
json: option({
|
|
552
576
|
type: optional(string),
|
|
553
577
|
long: "json",
|
|
554
|
-
description: "Inline JSON override for the runtime connect.* block, e.g. '{\"renown\":{\"url\":\"...\"}}'. Validated against the runtime schema; deep-merged on top of
|
|
578
|
+
description: "Inline JSON override for the runtime connect.* block, without the \"connect\" wrapper, e.g. '{\"app\":{\"workflowsEnabled\":true},\"renown\":{\"url\":\"...\"}}'. A top-level packageRegistryUrl is also accepted. Validated against the runtime schema (unknown keys fail); deep-merged on top of source powerhouse.config.json. Individual --flag values beat --json on collision."
|
|
555
579
|
}),
|
|
556
580
|
renownUrl: option({
|
|
557
581
|
type: optional(string),
|
|
@@ -580,6 +604,11 @@ const connectRuntimeOverrideArgs = {
|
|
|
580
604
|
long: "external-packages",
|
|
581
605
|
description: "Override connect.packages.externalEnabled."
|
|
582
606
|
}),
|
|
607
|
+
workflows: option({
|
|
608
|
+
type: optional(cliBoolean),
|
|
609
|
+
long: "workflows",
|
|
610
|
+
description: "Override connect.app.workflowsEnabled (load the @powerhousedao/workflow package: workflow + connection documents, their editors and Workflow Studio)."
|
|
611
|
+
}),
|
|
583
612
|
remoteDrivesEnabled: option({
|
|
584
613
|
type: optional(cliBoolean),
|
|
585
614
|
long: "remote-drives-enabled",
|
|
@@ -623,7 +652,7 @@ const connectRuntimeOverrideArgs = {
|
|
|
623
652
|
homeBackground: option({
|
|
624
653
|
type: optional(string),
|
|
625
654
|
long: "home-background",
|
|
626
|
-
description: "Override connect.
|
|
655
|
+
description: "Override connect.home.background (the generic plugin's home screen). URL or path to an image, pinned bottom-right; pass an empty string (\"\") to reset to the bundled gradient."
|
|
627
656
|
}),
|
|
628
657
|
sentryDsn: option({
|
|
629
658
|
type: optional(string),
|
|
@@ -801,6 +830,44 @@ const generateArgs = {
|
|
|
801
830
|
long: "subgraph",
|
|
802
831
|
description: "Subgraph name."
|
|
803
832
|
}),
|
|
833
|
+
pieceName: option({
|
|
834
|
+
type: optional(string),
|
|
835
|
+
long: "piece",
|
|
836
|
+
description: "Piece name."
|
|
837
|
+
}),
|
|
838
|
+
pieceId: option({
|
|
839
|
+
type: optional(string),
|
|
840
|
+
long: "piece-id",
|
|
841
|
+
description: "Piece id, the pieceName a workflow step holds, e.g. @acme/piece-crm. Defaults to one derived from the package name."
|
|
842
|
+
}),
|
|
843
|
+
pieceAuth: option({
|
|
844
|
+
type: oneOf([
|
|
845
|
+
"none",
|
|
846
|
+
"secret",
|
|
847
|
+
"custom"
|
|
848
|
+
]),
|
|
849
|
+
long: "piece-auth",
|
|
850
|
+
description: "The kind of connection the generated piece asks for. Default is custom.",
|
|
851
|
+
defaultValue: () => "custom",
|
|
852
|
+
defaultValueIsSerializable: true
|
|
853
|
+
}),
|
|
854
|
+
pieceActionName: option({
|
|
855
|
+
type: optional(string),
|
|
856
|
+
long: "piece-action",
|
|
857
|
+
description: "Name of an action to generate inside a piece."
|
|
858
|
+
}),
|
|
859
|
+
pieceTriggerName: option({
|
|
860
|
+
type: optional(string),
|
|
861
|
+
long: "piece-trigger",
|
|
862
|
+
description: "Name of a trigger to generate inside a piece."
|
|
863
|
+
}),
|
|
864
|
+
pieceTriggerStrategy: option({
|
|
865
|
+
type: oneOf(["polling", "webhook"]),
|
|
866
|
+
long: "piece-trigger-strategy",
|
|
867
|
+
description: "How a generated trigger fires. Default is polling.",
|
|
868
|
+
defaultValue: () => "polling",
|
|
869
|
+
defaultValueIsSerializable: true
|
|
870
|
+
}),
|
|
804
871
|
importScriptName: option({
|
|
805
872
|
type: optional(string),
|
|
806
873
|
long: "import-script",
|
|
@@ -866,6 +933,24 @@ const generateArgs = {
|
|
|
866
933
|
...debugArgs
|
|
867
934
|
};
|
|
868
935
|
//#endregion
|
|
936
|
+
//#region clis/feature-flags.ts
|
|
937
|
+
/**
|
|
938
|
+
* Feature toggles shared by the CLIs (ph-cli and ph-cmd's dispatch/help).
|
|
939
|
+
* Hand-rolled env predicates by the CLI convention — deliberately no
|
|
940
|
+
* OpenFeature dependency here; that stack belongs to the runtime apps.
|
|
941
|
+
*/
|
|
942
|
+
/**
|
|
943
|
+
* Gates the uniform-runners surface: the `ph run` command (registration,
|
|
944
|
+
* help listing, and ph-cmd forwarding), host-name sugar, and the `ph init`
|
|
945
|
+
* hosts/ scaffold. Off by default; set to `1` or `true` to enable. Rollout
|
|
946
|
+
* plan: docs/plans/2026-10-13-uniform-runners.md.
|
|
947
|
+
*/
|
|
948
|
+
const UNIFORM_RUNNERS_FLAG = "FEATURE_UNIFORM_RUNNERS_ENABLED";
|
|
949
|
+
function isUniformRunnersEnabled(env = process.env) {
|
|
950
|
+
const value = env[UNIFORM_RUNNERS_FLAG]?.trim().toLowerCase();
|
|
951
|
+
return value === "1" || value === "true";
|
|
952
|
+
}
|
|
953
|
+
//#endregion
|
|
869
954
|
//#region clis/args/inspect.ts
|
|
870
955
|
const inspectArgs = {
|
|
871
956
|
packageName: positional({
|
|
@@ -997,6 +1082,30 @@ const registryLoginArgs = {
|
|
|
997
1082
|
...debugArgs
|
|
998
1083
|
};
|
|
999
1084
|
//#endregion
|
|
1085
|
+
//#region clis/args/run.ts
|
|
1086
|
+
const runArgs = {
|
|
1087
|
+
host: positional({
|
|
1088
|
+
type: string,
|
|
1089
|
+
displayName: "host",
|
|
1090
|
+
description: "the host to run (a directory under hosts/)"
|
|
1091
|
+
}),
|
|
1092
|
+
verb: positional({
|
|
1093
|
+
type: optional(string),
|
|
1094
|
+
displayName: "verb",
|
|
1095
|
+
description: "optional verb the runner forwards (dev, build, serve, …)"
|
|
1096
|
+
}),
|
|
1097
|
+
debug: flag({
|
|
1098
|
+
type: optional(boolean),
|
|
1099
|
+
long: "debug",
|
|
1100
|
+
description: "verbose runner diagnostics"
|
|
1101
|
+
}),
|
|
1102
|
+
explain: option({
|
|
1103
|
+
type: optional(string),
|
|
1104
|
+
long: "explain",
|
|
1105
|
+
description: "explain a resolved aspect instead of running (drives, outputs)"
|
|
1106
|
+
})
|
|
1107
|
+
};
|
|
1108
|
+
//#endregion
|
|
1000
1109
|
//#region clis/args/switchboard.ts
|
|
1001
1110
|
const switchboardArgs = {
|
|
1002
1111
|
...vetraSwitchboardArgs,
|
|
@@ -1209,6 +1318,7 @@ const vetraArgs = {
|
|
|
1209
1318
|
//#endregion
|
|
1210
1319
|
//#region clis/command-names.ts
|
|
1211
1320
|
const phCliCommandNames = [
|
|
1321
|
+
"run",
|
|
1212
1322
|
"generate",
|
|
1213
1323
|
"vetra",
|
|
1214
1324
|
"connect",
|
|
@@ -1243,7 +1353,13 @@ function helpCommand(config) {
|
|
|
1243
1353
|
aliases
|
|
1244
1354
|
});
|
|
1245
1355
|
}
|
|
1246
|
-
const
|
|
1356
|
+
const allPhCliHelpCommands = {
|
|
1357
|
+
run: helpCommand({
|
|
1358
|
+
name: "run",
|
|
1359
|
+
args: runArgs,
|
|
1360
|
+
description: "Run a host from hosts/ with its runner",
|
|
1361
|
+
handler: () => {}
|
|
1362
|
+
}),
|
|
1247
1363
|
generate: helpCommand({
|
|
1248
1364
|
name: "generate",
|
|
1249
1365
|
args: generateArgs,
|
|
@@ -1340,6 +1456,7 @@ const phCliHelpCommands = {
|
|
|
1340
1456
|
handler: () => {}
|
|
1341
1457
|
})
|
|
1342
1458
|
};
|
|
1459
|
+
const phCliHelpCommands = isUniformRunnersEnabled() ? allPhCliHelpCommands : (({ run: _run, ...rest }) => rest)(allPhCliHelpCommands);
|
|
1343
1460
|
//#endregion
|
|
1344
1461
|
//#region clis/args/init.ts
|
|
1345
1462
|
const initArgs = {
|
|
@@ -1395,6 +1512,11 @@ const initArgs = {
|
|
|
1395
1512
|
short: "r",
|
|
1396
1513
|
description: "Remote drive identifier."
|
|
1397
1514
|
}),
|
|
1515
|
+
uniformRunners: flag({
|
|
1516
|
+
type: optional(boolean),
|
|
1517
|
+
long: "uniform-runners",
|
|
1518
|
+
description: "Scaffold the hosts/ folder (uniform-runners architecture). Also enabled project-wide by FEATURE_UNIFORM_RUNNERS_ENABLED."
|
|
1519
|
+
}),
|
|
1398
1520
|
clone: option({
|
|
1399
1521
|
type: optional(string),
|
|
1400
1522
|
long: "clone",
|
|
@@ -1434,9 +1556,44 @@ const unpublishArgs = {
|
|
|
1434
1556
|
})
|
|
1435
1557
|
};
|
|
1436
1558
|
//#endregion
|
|
1559
|
+
//#region clis/ph-dir.ts
|
|
1560
|
+
/**
|
|
1561
|
+
* The project's `.ph` tree — stores, identity, run records, registry cache.
|
|
1562
|
+
*
|
|
1563
|
+
* Classically `<cwd>/.ph` (every classic command resolves it exactly so). A
|
|
1564
|
+
* desktop shell relocates the WHOLE tree under the user's profile by setting
|
|
1565
|
+
* `PH_USER_DATA_DIR`: the tree is then `${userData}/.ph`, the same names
|
|
1566
|
+
* under a different root, and nothing of the user's lands in the install
|
|
1567
|
+
* dir. One resolver replaces the former `.ph/...` literals; it adds no path
|
|
1568
|
+
* names and no layout of its own.
|
|
1569
|
+
*/
|
|
1570
|
+
function resolvePhDir(base = process.cwd(), env = process.env) {
|
|
1571
|
+
return path.join(env.PH_USER_DATA_DIR ?? base, ".ph");
|
|
1572
|
+
}
|
|
1573
|
+
/**
|
|
1574
|
+
* The two PGlite store dirs the switchboard defaults to, for the server and
|
|
1575
|
+
* for `ph switchboard --reset` (which must touch the same paths). Without a
|
|
1576
|
+
* user-data root these are the classic literals, verbatim — byte-identical
|
|
1577
|
+
* to every classic boot log and reset prompt. Under PH_USER_DATA_DIR they
|
|
1578
|
+
* are the same names inside `${userData}/.ph`.
|
|
1579
|
+
*/
|
|
1580
|
+
function defaultStoreDirs(env = process.env, phDir) {
|
|
1581
|
+
const root = phDir ?? (env.PH_USER_DATA_DIR ? resolvePhDir(void 0, env) : void 0);
|
|
1582
|
+
if (root === void 0) return {
|
|
1583
|
+
reactor: "./.ph/reactor-storage",
|
|
1584
|
+
readModel: ".ph/read-storage"
|
|
1585
|
+
};
|
|
1586
|
+
return {
|
|
1587
|
+
reactor: path.join(root, "reactor-storage"),
|
|
1588
|
+
readModel: path.join(root, "read-storage")
|
|
1589
|
+
};
|
|
1590
|
+
}
|
|
1591
|
+
//#endregion
|
|
1437
1592
|
//#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
1438
1593
|
var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1439
|
-
let p = process || {}
|
|
1594
|
+
let p = process || {};
|
|
1595
|
+
let argv = p.argv || [];
|
|
1596
|
+
let env = p.env || {};
|
|
1440
1597
|
let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
1441
1598
|
let formatter = (open, close, replace = open) => (input) => {
|
|
1442
1599
|
let string = "" + input, index = string.indexOf(close, open.length);
|
|
@@ -1524,7 +1681,7 @@ var require_js_tokens = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1524
1681
|
};
|
|
1525
1682
|
}));
|
|
1526
1683
|
//#endregion
|
|
1527
|
-
//#region ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.
|
|
1684
|
+
//#region ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.29.7/node_modules/@babel/helper-validator-identifier/lib/identifier.js
|
|
1528
1685
|
var require_identifier = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1529
1686
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1530
1687
|
exports.isIdentifierChar = isIdentifierChar;
|
|
@@ -2532,7 +2689,7 @@ var require_identifier = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2532
2689
|
}
|
|
2533
2690
|
}));
|
|
2534
2691
|
//#endregion
|
|
2535
|
-
//#region ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.
|
|
2692
|
+
//#region ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.29.7/node_modules/@babel/helper-validator-identifier/lib/keyword.js
|
|
2536
2693
|
var require_keyword = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
2537
2694
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2538
2695
|
exports.isKeyword = isKeyword;
|
|
@@ -2611,7 +2768,7 @@ var require_keyword = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2611
2768
|
}
|
|
2612
2769
|
}));
|
|
2613
2770
|
//#endregion
|
|
2614
|
-
//#region ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.
|
|
2771
|
+
//#region ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.29.7/node_modules/@babel/helper-validator-identifier/lib/index.js
|
|
2615
2772
|
var require_lib$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
2616
2773
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2617
2774
|
Object.defineProperty(exports, "isIdentifierChar", {
|
|
@@ -2698,7 +2855,7 @@ var import_lib = (/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2698
2855
|
function getDefs(enabled) {
|
|
2699
2856
|
return enabled ? defsOn : defsOff;
|
|
2700
2857
|
}
|
|
2701
|
-
const sometimesKeywords = new Set([
|
|
2858
|
+
const sometimesKeywords = /* @__PURE__ */ new Set([
|
|
2702
2859
|
"as",
|
|
2703
2860
|
"async",
|
|
2704
2861
|
"from",
|
|
@@ -2765,9 +2922,10 @@ var import_lib = (/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2765
2922
|
else if (i === lineDiff) markerLines[lineNumber] = [0, endColumn];
|
|
2766
2923
|
else markerLines[lineNumber] = [0, source[lineNumber - i].length];
|
|
2767
2924
|
}
|
|
2768
|
-
else if (startColumn === endColumn)
|
|
2769
|
-
|
|
2770
|
-
|
|
2925
|
+
else if (startColumn === endColumn) {
|
|
2926
|
+
if (startColumn) markerLines[startLine] = [startColumn, 0];
|
|
2927
|
+
else markerLines[startLine] = true;
|
|
2928
|
+
} else markerLines[startLine] = [startColumn, endColumn - startColumn];
|
|
2771
2929
|
return {
|
|
2772
2930
|
start,
|
|
2773
2931
|
end,
|
|
@@ -4227,49 +4385,47 @@ var require_validate_npm_package_license = /* @__PURE__ */ __commonJSMin(((expor
|
|
|
4227
4385
|
};
|
|
4228
4386
|
}));
|
|
4229
4387
|
//#endregion
|
|
4230
|
-
//#region ../../node_modules/.pnpm/lru-cache@11.
|
|
4388
|
+
//#region ../../node_modules/.pnpm/lru-cache@11.5.0/node_modules/lru-cache/dist/commonjs/node/index.min.js
|
|
4231
4389
|
var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4390
|
+
var j = (c, t) => () => (t || c((t = { exports: {} }).exports, t), t.exports);
|
|
4391
|
+
var I = j((O) => {
|
|
4392
|
+
"use strict";
|
|
4393
|
+
Object.defineProperty(O, "__esModule", { value: !0 });
|
|
4394
|
+
O.tracing = O.metrics = void 0;
|
|
4395
|
+
var U = __require("node:diagnostics_channel");
|
|
4396
|
+
O.metrics = (0, U.channel)("lru-cache:metrics");
|
|
4397
|
+
O.tracing = (0, U.tracingChannel)("lru-cache");
|
|
4398
|
+
});
|
|
4399
|
+
var P = j((D) => {
|
|
4400
|
+
"use strict";
|
|
4401
|
+
Object.defineProperty(D, "__esModule", { value: !0 });
|
|
4402
|
+
D.defaultPerf = void 0;
|
|
4403
|
+
D.defaultPerf = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date;
|
|
4404
|
+
});
|
|
4232
4405
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
4233
4406
|
exports.LRUCache = void 0;
|
|
4234
|
-
var
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
}, C = class {
|
|
4247
|
-
constructor() {
|
|
4248
|
-
t();
|
|
4249
|
-
}
|
|
4250
|
-
signal = new L();
|
|
4251
|
-
abort(i) {
|
|
4252
|
-
if (!this.signal.aborted) {
|
|
4253
|
-
this.signal.reason = i, this.signal.aborted = !0;
|
|
4254
|
-
for (let s of this.signal._onabort) s(i);
|
|
4255
|
-
this.signal.onabort?.(i);
|
|
4256
|
-
}
|
|
4257
|
-
}
|
|
4258
|
-
};
|
|
4259
|
-
let c = R.env?.LRU_CACHE_IGNORE_AC_WARNING !== "1", t = () => {
|
|
4260
|
-
c && (c = !1, I("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", "NO_ABORT_CONTROLLER", "ENOTSUP", t));
|
|
4261
|
-
};
|
|
4262
|
-
}
|
|
4263
|
-
var x = (c) => !U.has(c), y = (c) => c && c === Math.floor(c) && c > 0 && isFinite(c), M = (c) => y(c) ? c <= Math.pow(2, 8) ? Uint8Array : c <= Math.pow(2, 16) ? Uint16Array : c <= Math.pow(2, 32) ? Uint32Array : c <= Number.MAX_SAFE_INTEGER ? z : null : null, z = class extends Array {
|
|
4407
|
+
var g = I();
|
|
4408
|
+
var N = P();
|
|
4409
|
+
var C = () => g.metrics.hasSubscribers || g.tracing.hasSubscribers;
|
|
4410
|
+
var k = /* @__PURE__ */ new Set();
|
|
4411
|
+
var G = typeof process == "object" && process ? process : {};
|
|
4412
|
+
var V = (c, t, e, i) => {
|
|
4413
|
+
typeof G.emitWarning == "function" ? G.emitWarning(c, t, e, i) : console.error(`[${e}] ${t}: ${c}`);
|
|
4414
|
+
};
|
|
4415
|
+
var q = (c) => !k.has(c);
|
|
4416
|
+
var T = (c) => !!c && c === Math.floor(c) && c > 0 && isFinite(c);
|
|
4417
|
+
var H = (c) => T(c) ? c <= Math.pow(2, 8) ? Uint8Array : c <= Math.pow(2, 16) ? Uint16Array : c <= Math.pow(2, 32) ? Uint32Array : c <= Number.MAX_SAFE_INTEGER ? W : null : null;
|
|
4418
|
+
var W = class extends Array {
|
|
4264
4419
|
constructor(t) {
|
|
4265
4420
|
super(t), this.fill(0);
|
|
4266
4421
|
}
|
|
4267
|
-
}
|
|
4422
|
+
};
|
|
4423
|
+
var x = class c {
|
|
4268
4424
|
heap;
|
|
4269
4425
|
length;
|
|
4270
4426
|
static #o = !1;
|
|
4271
4427
|
static create(t) {
|
|
4272
|
-
let e =
|
|
4428
|
+
let e = H(t);
|
|
4273
4429
|
if (!e) return [];
|
|
4274
4430
|
c.#o = !0;
|
|
4275
4431
|
let i = new c(t, e);
|
|
@@ -4289,14 +4445,14 @@ var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4289
4445
|
exports.LRUCache = class c {
|
|
4290
4446
|
#o;
|
|
4291
4447
|
#c;
|
|
4292
|
-
#w;
|
|
4293
|
-
#C;
|
|
4294
|
-
#S;
|
|
4295
|
-
#L;
|
|
4296
|
-
#U;
|
|
4297
4448
|
#m;
|
|
4449
|
+
#W;
|
|
4450
|
+
#S;
|
|
4451
|
+
#M;
|
|
4452
|
+
#j;
|
|
4453
|
+
#w;
|
|
4298
4454
|
get perf() {
|
|
4299
|
-
return this.#
|
|
4455
|
+
return this.#w;
|
|
4300
4456
|
}
|
|
4301
4457
|
ttl;
|
|
4302
4458
|
ttlResolution;
|
|
@@ -4313,48 +4469,49 @@ var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4313
4469
|
allowStaleOnFetchAbort;
|
|
4314
4470
|
allowStaleOnFetchRejection;
|
|
4315
4471
|
ignoreFetchAbort;
|
|
4472
|
+
backgroundFetchSize;
|
|
4316
4473
|
#n;
|
|
4317
|
-
#
|
|
4474
|
+
#b;
|
|
4318
4475
|
#s;
|
|
4319
4476
|
#i;
|
|
4320
4477
|
#t;
|
|
4321
|
-
#a;
|
|
4322
|
-
#u;
|
|
4323
4478
|
#l;
|
|
4479
|
+
#u;
|
|
4480
|
+
#a;
|
|
4324
4481
|
#h;
|
|
4325
|
-
#
|
|
4482
|
+
#_;
|
|
4326
4483
|
#r;
|
|
4327
4484
|
#y;
|
|
4328
|
-
#
|
|
4485
|
+
#F;
|
|
4329
4486
|
#d;
|
|
4330
4487
|
#g;
|
|
4331
4488
|
#T;
|
|
4332
|
-
#
|
|
4489
|
+
#U;
|
|
4333
4490
|
#f;
|
|
4334
|
-
#
|
|
4491
|
+
#D;
|
|
4335
4492
|
static unsafeExposeInternals(t) {
|
|
4336
4493
|
return {
|
|
4337
|
-
starts: t.#
|
|
4494
|
+
starts: t.#F,
|
|
4338
4495
|
ttls: t.#d,
|
|
4339
4496
|
autopurgeTimers: t.#g,
|
|
4340
4497
|
sizes: t.#y,
|
|
4341
4498
|
keyMap: t.#s,
|
|
4342
4499
|
keyList: t.#i,
|
|
4343
4500
|
valList: t.#t,
|
|
4344
|
-
next: t.#
|
|
4501
|
+
next: t.#l,
|
|
4345
4502
|
prev: t.#u,
|
|
4346
4503
|
get head() {
|
|
4347
|
-
return t.#
|
|
4504
|
+
return t.#a;
|
|
4348
4505
|
},
|
|
4349
4506
|
get tail() {
|
|
4350
4507
|
return t.#h;
|
|
4351
4508
|
},
|
|
4352
|
-
free: t.#
|
|
4509
|
+
free: t.#_,
|
|
4353
4510
|
isBackgroundFetch: (e) => t.#e(e),
|
|
4354
|
-
backgroundFetch: (e, i, s, n) => t.#
|
|
4355
|
-
moveToTail: (e) => t.#
|
|
4356
|
-
indexes: (e) => t.#
|
|
4357
|
-
rindexes: (e) => t.#
|
|
4511
|
+
backgroundFetch: (e, i, s, n) => t.#G(e, i, s, n),
|
|
4512
|
+
moveToTail: (e) => t.#L(e),
|
|
4513
|
+
indexes: (e) => t.#A(e),
|
|
4514
|
+
rindexes: (e) => t.#z(e),
|
|
4358
4515
|
isStale: (e) => t.#p(e)
|
|
4359
4516
|
};
|
|
4360
4517
|
}
|
|
@@ -4365,188 +4522,190 @@ var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4365
4522
|
return this.#c;
|
|
4366
4523
|
}
|
|
4367
4524
|
get calculatedSize() {
|
|
4368
|
-
return this.#
|
|
4525
|
+
return this.#b;
|
|
4369
4526
|
}
|
|
4370
4527
|
get size() {
|
|
4371
4528
|
return this.#n;
|
|
4372
4529
|
}
|
|
4373
4530
|
get fetchMethod() {
|
|
4374
|
-
return this.#
|
|
4531
|
+
return this.#M;
|
|
4375
4532
|
}
|
|
4376
4533
|
get memoMethod() {
|
|
4377
|
-
return this.#
|
|
4534
|
+
return this.#j;
|
|
4378
4535
|
}
|
|
4379
4536
|
get dispose() {
|
|
4380
|
-
return this.#
|
|
4537
|
+
return this.#m;
|
|
4381
4538
|
}
|
|
4382
4539
|
get onInsert() {
|
|
4383
|
-
return this.#
|
|
4540
|
+
return this.#W;
|
|
4384
4541
|
}
|
|
4385
4542
|
get disposeAfter() {
|
|
4386
4543
|
return this.#S;
|
|
4387
4544
|
}
|
|
4388
4545
|
constructor(t) {
|
|
4389
|
-
let { max: e = 0, ttl: i, ttlResolution: s = 1, ttlAutopurge: n, updateAgeOnGet:
|
|
4390
|
-
if (v !== void 0 && typeof v?.now != "function") throw new TypeError("perf option must have a now() method if specified");
|
|
4391
|
-
if (this.#
|
|
4392
|
-
let
|
|
4393
|
-
if (!
|
|
4394
|
-
if (this.#o = e, this.#c =
|
|
4546
|
+
let { max: e = 0, ttl: i, ttlResolution: s = 1, ttlAutopurge: n, updateAgeOnGet: r, updateAgeOnHas: h, allowStale: a, dispose: o, onInsert: d, disposeAfter: _, noDisposeOnSet: y, noUpdateTTL: u, maxSize: p = 0, maxEntrySize: f = 0, sizeCalculation: b, fetchMethod: l, memoMethod: S, noDeleteOnFetchRejection: F, noDeleteOnStaleGet: w, allowStaleOnFetchRejection: m, allowStaleOnFetchAbort: A, ignoreFetchAbort: z, backgroundFetchSize: M = 1, perf: v } = t;
|
|
4547
|
+
if (this.backgroundFetchSize = M, v !== void 0 && typeof v?.now != "function") throw new TypeError("perf option must have a now() method if specified");
|
|
4548
|
+
if (this.#w = v ?? N.defaultPerf, e !== 0 && !T(e)) throw new TypeError("max option must be a nonnegative integer");
|
|
4549
|
+
let E = e ? H(e) : Array;
|
|
4550
|
+
if (!E) throw new Error("invalid max value: " + e);
|
|
4551
|
+
if (this.#o = e, this.#c = p, this.maxEntrySize = f || this.#c, this.sizeCalculation = b, this.sizeCalculation) {
|
|
4395
4552
|
if (!this.#c && !this.maxEntrySize) throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
|
|
4396
4553
|
if (typeof this.sizeCalculation != "function") throw new TypeError("sizeCalculation set to non-function");
|
|
4397
4554
|
}
|
|
4398
4555
|
if (S !== void 0 && typeof S != "function") throw new TypeError("memoMethod must be a function if defined");
|
|
4399
|
-
if (this.#
|
|
4400
|
-
if (this.#
|
|
4401
|
-
if (this.#c !== 0 && !
|
|
4402
|
-
if (!
|
|
4403
|
-
this.#
|
|
4556
|
+
if (this.#j = S, l !== void 0 && typeof l != "function") throw new TypeError("fetchMethod must be a function if specified");
|
|
4557
|
+
if (this.#M = l, this.#U = !!l, this.#s = /* @__PURE__ */ new Map(), this.#i = Array.from({ length: e }).fill(void 0), this.#t = Array.from({ length: e }).fill(void 0), this.#l = new E(e), this.#u = new E(e), this.#a = 0, this.#h = 0, this.#_ = x.create(e), this.#n = 0, this.#b = 0, typeof o == "function" && (this.#m = o), typeof d == "function" && (this.#W = d), typeof _ == "function" ? (this.#S = _, this.#r = []) : (this.#S = void 0, this.#r = void 0), this.#T = !!this.#m, this.#D = !!this.#W, this.#f = !!this.#S, this.noDisposeOnSet = !!y, this.noUpdateTTL = !!u, this.noDeleteOnFetchRejection = !!F, this.allowStaleOnFetchRejection = !!m, this.allowStaleOnFetchAbort = !!A, this.ignoreFetchAbort = !!z, this.maxEntrySize !== 0) {
|
|
4558
|
+
if (this.#c !== 0 && !T(this.#c)) throw new TypeError("maxSize must be a positive integer if specified");
|
|
4559
|
+
if (!T(this.maxEntrySize)) throw new TypeError("maxEntrySize must be a positive integer if specified");
|
|
4560
|
+
this.#X();
|
|
4404
4561
|
}
|
|
4405
|
-
if (this.allowStale = !!
|
|
4406
|
-
if (!
|
|
4407
|
-
this.#
|
|
4562
|
+
if (this.allowStale = !!a, this.noDeleteOnStaleGet = !!w, this.updateAgeOnGet = !!r, this.updateAgeOnHas = !!h, this.ttlResolution = T(s) || s === 0 ? s : 1, this.ttlAutopurge = !!n, this.ttl = i || 0, this.ttl) {
|
|
4563
|
+
if (!T(this.ttl)) throw new TypeError("ttl must be a positive integer if specified");
|
|
4564
|
+
this.#k();
|
|
4408
4565
|
}
|
|
4409
4566
|
if (this.#o === 0 && this.ttl === 0 && this.#c === 0) throw new TypeError("At least one of max, maxSize, or ttl is required");
|
|
4410
4567
|
if (!this.ttlAutopurge && !this.#o && !this.#c) {
|
|
4411
|
-
let
|
|
4412
|
-
|
|
4568
|
+
let R = "LRU_CACHE_UNBOUNDED";
|
|
4569
|
+
q(R) && (k.add(R), V("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", R, c));
|
|
4413
4570
|
}
|
|
4414
4571
|
}
|
|
4415
4572
|
getRemainingTTL(t) {
|
|
4416
|
-
return this.#s.has(t) ?
|
|
4417
|
-
}
|
|
4418
|
-
#
|
|
4419
|
-
let t = new
|
|
4420
|
-
this.#d = t, this.#
|
|
4421
|
-
let i = this.ttlAutopurge ?
|
|
4422
|
-
this.#g = i, this.#
|
|
4423
|
-
e[h] =
|
|
4573
|
+
return this.#s.has(t) ? 1 / 0 : 0;
|
|
4574
|
+
}
|
|
4575
|
+
#k() {
|
|
4576
|
+
let t = new W(this.#o), e = new W(this.#o);
|
|
4577
|
+
this.#d = t, this.#F = e;
|
|
4578
|
+
let i = this.ttlAutopurge ? Array.from({ length: this.#o }) : void 0;
|
|
4579
|
+
this.#g = i, this.#H = (h, a, o = this.#w.now()) => {
|
|
4580
|
+
e[h] = a !== 0 ? o : 0, t[h] = a, s(h, a);
|
|
4424
4581
|
}, this.#R = (h) => {
|
|
4425
|
-
e[h] = t[h] !== 0 ? this.#
|
|
4582
|
+
e[h] = t[h] !== 0 ? this.#w.now() : 0, s(h, t[h]);
|
|
4426
4583
|
};
|
|
4427
|
-
let s = this.ttlAutopurge ? (h,
|
|
4428
|
-
if (i?.[h] && (clearTimeout(i[h]), i[h] = void 0),
|
|
4429
|
-
let
|
|
4430
|
-
this.#p(h) && this.#
|
|
4431
|
-
},
|
|
4432
|
-
|
|
4584
|
+
let s = this.ttlAutopurge ? (h, a) => {
|
|
4585
|
+
if (i?.[h] && (clearTimeout(i[h]), i[h] = void 0), a && a !== 0 && i) {
|
|
4586
|
+
let o = setTimeout(() => {
|
|
4587
|
+
this.#p(h) && this.#v(this.#i[h], "expire");
|
|
4588
|
+
}, a + 1);
|
|
4589
|
+
o.unref && o.unref(), i[h] = o;
|
|
4433
4590
|
}
|
|
4434
4591
|
} : () => {};
|
|
4435
|
-
this.#
|
|
4436
|
-
if (t[
|
|
4437
|
-
let
|
|
4438
|
-
if (!
|
|
4439
|
-
h.ttl =
|
|
4440
|
-
h.remainingTTL =
|
|
4592
|
+
this.#E = (h, a) => {
|
|
4593
|
+
if (t[a]) {
|
|
4594
|
+
let o = t[a], d = e[a];
|
|
4595
|
+
if (!o || !d) return;
|
|
4596
|
+
h.ttl = o, h.start = d, h.now = n || r();
|
|
4597
|
+
h.remainingTTL = o - (h.now - d);
|
|
4441
4598
|
}
|
|
4442
4599
|
};
|
|
4443
|
-
let n = 0,
|
|
4444
|
-
let h = this.#
|
|
4600
|
+
let n = 0, r = () => {
|
|
4601
|
+
let h = this.#w.now();
|
|
4445
4602
|
if (this.ttlResolution > 0) {
|
|
4446
4603
|
n = h;
|
|
4447
|
-
let
|
|
4448
|
-
|
|
4604
|
+
let a = setTimeout(() => n = 0, this.ttlResolution);
|
|
4605
|
+
a.unref && a.unref();
|
|
4449
4606
|
}
|
|
4450
4607
|
return h;
|
|
4451
4608
|
};
|
|
4452
4609
|
this.getRemainingTTL = (h) => {
|
|
4453
|
-
let
|
|
4454
|
-
if (
|
|
4455
|
-
let
|
|
4456
|
-
if (!
|
|
4457
|
-
return
|
|
4610
|
+
let a = this.#s.get(h);
|
|
4611
|
+
if (a === void 0) return 0;
|
|
4612
|
+
let o = t[a], d = e[a];
|
|
4613
|
+
if (!o || !d) return 1 / 0;
|
|
4614
|
+
return o - ((n || r()) - d);
|
|
4458
4615
|
}, this.#p = (h) => {
|
|
4459
|
-
let
|
|
4460
|
-
return !!
|
|
4616
|
+
let a = e[h], o = t[h];
|
|
4617
|
+
return !!o && !!a && (n || r()) - a > o;
|
|
4461
4618
|
};
|
|
4462
4619
|
}
|
|
4463
4620
|
#R = () => {};
|
|
4464
|
-
#
|
|
4465
|
-
#
|
|
4621
|
+
#E = () => {};
|
|
4622
|
+
#H = () => {};
|
|
4466
4623
|
#p = () => !1;
|
|
4467
|
-
#
|
|
4468
|
-
let t = new
|
|
4469
|
-
this.#
|
|
4470
|
-
this.#
|
|
4471
|
-
}, this.#
|
|
4472
|
-
if (
|
|
4473
|
-
|
|
4474
|
-
if (
|
|
4475
|
-
|
|
4476
|
-
|
|
4624
|
+
#X() {
|
|
4625
|
+
let t = new W(this.#o);
|
|
4626
|
+
this.#b = 0, this.#y = t, this.#C = (e) => {
|
|
4627
|
+
this.#b -= t[e], t[e] = 0;
|
|
4628
|
+
}, this.#N = (e, i, s, n) => {
|
|
4629
|
+
if (!T(s)) {
|
|
4630
|
+
if (this.#e(i)) return this.backgroundFetchSize;
|
|
4631
|
+
if (n) {
|
|
4632
|
+
if (typeof n != "function") throw new TypeError("sizeCalculation must be a function");
|
|
4633
|
+
if (s = n(i, e), !T(s)) throw new TypeError("sizeCalculation return invalid (expect positive integer)");
|
|
4634
|
+
} else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
|
|
4635
|
+
}
|
|
4477
4636
|
return s;
|
|
4478
|
-
}, this.#
|
|
4637
|
+
}, this.#I = (e, i, s) => {
|
|
4479
4638
|
if (t[e] = i, this.#c) {
|
|
4480
4639
|
let n = this.#c - t[e];
|
|
4481
|
-
for (; this.#
|
|
4640
|
+
for (; this.#b > n;) this.#P(!0);
|
|
4482
4641
|
}
|
|
4483
|
-
this.#
|
|
4642
|
+
this.#b += t[e], s && (s.entrySize = i, s.totalCalculatedSize = this.#b);
|
|
4484
4643
|
};
|
|
4485
4644
|
}
|
|
4486
|
-
#
|
|
4487
|
-
#
|
|
4488
|
-
#
|
|
4645
|
+
#C = (t) => {};
|
|
4646
|
+
#I = (t, e, i) => {};
|
|
4647
|
+
#N = (t, e, i, s) => {
|
|
4489
4648
|
if (i || s) throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
|
|
4490
4649
|
return 0;
|
|
4491
4650
|
};
|
|
4492
|
-
*#
|
|
4493
|
-
if (this.#n) for (let e = this.#h;
|
|
4651
|
+
*#A({ allowStale: t = this.allowStale } = {}) {
|
|
4652
|
+
if (this.#n) for (let e = this.#h; this.#V(e) && ((t || !this.#p(e)) && (yield e), e !== this.#a);) e = this.#u[e];
|
|
4494
4653
|
}
|
|
4495
|
-
*#
|
|
4496
|
-
if (this.#n) for (let e = this.#
|
|
4654
|
+
*#z({ allowStale: t = this.allowStale } = {}) {
|
|
4655
|
+
if (this.#n) for (let e = this.#a; this.#V(e) && ((t || !this.#p(e)) && (yield e), e !== this.#h);) e = this.#l[e];
|
|
4497
4656
|
}
|
|
4498
|
-
#
|
|
4657
|
+
#V(t) {
|
|
4499
4658
|
return t !== void 0 && this.#s.get(this.#i[t]) === t;
|
|
4500
4659
|
}
|
|
4501
4660
|
*entries() {
|
|
4502
|
-
for (let t of this.#
|
|
4661
|
+
for (let t of this.#A()) this.#t[t] !== void 0 && this.#i[t] !== void 0 && !this.#e(this.#t[t]) && (yield [this.#i[t], this.#t[t]]);
|
|
4503
4662
|
}
|
|
4504
4663
|
*rentries() {
|
|
4505
|
-
for (let t of this.#
|
|
4664
|
+
for (let t of this.#z()) this.#t[t] !== void 0 && this.#i[t] !== void 0 && !this.#e(this.#t[t]) && (yield [this.#i[t], this.#t[t]]);
|
|
4506
4665
|
}
|
|
4507
4666
|
*keys() {
|
|
4508
|
-
for (let t of this.#
|
|
4667
|
+
for (let t of this.#A()) {
|
|
4509
4668
|
let e = this.#i[t];
|
|
4510
4669
|
e !== void 0 && !this.#e(this.#t[t]) && (yield e);
|
|
4511
4670
|
}
|
|
4512
4671
|
}
|
|
4513
4672
|
*rkeys() {
|
|
4514
|
-
for (let t of this.#
|
|
4673
|
+
for (let t of this.#z()) {
|
|
4515
4674
|
let e = this.#i[t];
|
|
4516
4675
|
e !== void 0 && !this.#e(this.#t[t]) && (yield e);
|
|
4517
4676
|
}
|
|
4518
4677
|
}
|
|
4519
4678
|
*values() {
|
|
4520
|
-
for (let t of this.#
|
|
4679
|
+
for (let t of this.#A()) this.#t[t] !== void 0 && !this.#e(this.#t[t]) && (yield this.#t[t]);
|
|
4521
4680
|
}
|
|
4522
4681
|
*rvalues() {
|
|
4523
|
-
for (let t of this.#
|
|
4682
|
+
for (let t of this.#z()) this.#t[t] !== void 0 && !this.#e(this.#t[t]) && (yield this.#t[t]);
|
|
4524
4683
|
}
|
|
4525
4684
|
[Symbol.iterator]() {
|
|
4526
4685
|
return this.entries();
|
|
4527
4686
|
}
|
|
4528
4687
|
[Symbol.toStringTag] = "LRUCache";
|
|
4529
4688
|
find(t, e = {}) {
|
|
4530
|
-
for (let i of this.#
|
|
4689
|
+
for (let i of this.#A()) {
|
|
4531
4690
|
let s = this.#t[i], n = this.#e(s) ? s.__staleWhileFetching : s;
|
|
4532
|
-
if (n !== void 0 && t(n, this.#i[i], this)) return this
|
|
4691
|
+
if (n !== void 0 && t(n, this.#i[i], this)) return this.#x(this.#i[i], e);
|
|
4533
4692
|
}
|
|
4534
4693
|
}
|
|
4535
4694
|
forEach(t, e = this) {
|
|
4536
|
-
for (let i of this.#
|
|
4695
|
+
for (let i of this.#A()) {
|
|
4537
4696
|
let s = this.#t[i], n = this.#e(s) ? s.__staleWhileFetching : s;
|
|
4538
4697
|
n !== void 0 && t.call(e, n, this.#i[i], this);
|
|
4539
4698
|
}
|
|
4540
4699
|
}
|
|
4541
4700
|
rforEach(t, e = this) {
|
|
4542
|
-
for (let i of this.#
|
|
4701
|
+
for (let i of this.#z()) {
|
|
4543
4702
|
let s = this.#t[i], n = this.#e(s) ? s.__staleWhileFetching : s;
|
|
4544
4703
|
n !== void 0 && t.call(e, n, this.#i[i], this);
|
|
4545
4704
|
}
|
|
4546
4705
|
}
|
|
4547
4706
|
purgeStale() {
|
|
4548
4707
|
let t = !1;
|
|
4549
|
-
for (let e of this.#
|
|
4708
|
+
for (let e of this.#z({ allowStale: !0 })) this.#p(e) && (this.#v(this.#i[e], "expire"), t = !0);
|
|
4550
4709
|
return t;
|
|
4551
4710
|
}
|
|
4552
4711
|
info(t) {
|
|
@@ -4555,24 +4714,24 @@ var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4555
4714
|
let i = this.#t[e], s = this.#e(i) ? i.__staleWhileFetching : i;
|
|
4556
4715
|
if (s === void 0) return;
|
|
4557
4716
|
let n = { value: s };
|
|
4558
|
-
if (this.#d && this.#
|
|
4559
|
-
let
|
|
4560
|
-
if (
|
|
4717
|
+
if (this.#d && this.#F) {
|
|
4718
|
+
let r = this.#d[e], h = this.#F[e];
|
|
4719
|
+
if (r && h) n.ttl = r - (this.#w.now() - h), n.start = Date.now();
|
|
4561
4720
|
}
|
|
4562
4721
|
return this.#y && (n.size = this.#y[e]), n;
|
|
4563
4722
|
}
|
|
4564
4723
|
dump() {
|
|
4565
4724
|
let t = [];
|
|
4566
|
-
for (let e of this.#
|
|
4725
|
+
for (let e of this.#A({ allowStale: !0 })) {
|
|
4567
4726
|
let i = this.#i[e], s = this.#t[e], n = this.#e(s) ? s.__staleWhileFetching : s;
|
|
4568
4727
|
if (n === void 0 || i === void 0) continue;
|
|
4569
|
-
let
|
|
4570
|
-
if (this.#d && this.#
|
|
4571
|
-
|
|
4572
|
-
let h = this.#
|
|
4573
|
-
|
|
4728
|
+
let r = { value: n };
|
|
4729
|
+
if (this.#d && this.#F) {
|
|
4730
|
+
r.ttl = this.#d[e];
|
|
4731
|
+
let h = this.#w.now() - this.#F[e];
|
|
4732
|
+
r.start = Math.floor(Date.now() - h);
|
|
4574
4733
|
}
|
|
4575
|
-
this.#y && (
|
|
4734
|
+
this.#y && (r.size = this.#y[e]), t.unshift([i, r]);
|
|
4576
4735
|
}
|
|
4577
4736
|
return t;
|
|
4578
4737
|
}
|
|
@@ -4581,53 +4740,60 @@ var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4581
4740
|
for (let [e, i] of t) {
|
|
4582
4741
|
if (i.start) {
|
|
4583
4742
|
let s = Date.now() - i.start;
|
|
4584
|
-
i.start = this.#
|
|
4743
|
+
i.start = this.#w.now() - s;
|
|
4585
4744
|
}
|
|
4586
|
-
this
|
|
4745
|
+
this.#O(e, i.value, i);
|
|
4587
4746
|
}
|
|
4588
4747
|
}
|
|
4589
4748
|
set(t, e, i = {}) {
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4749
|
+
let { status: s = g.metrics.hasSubscribers ? {} : void 0 } = i;
|
|
4750
|
+
i.status = s, s && (s.op = "set", s.key = t, e !== void 0 && (s.value = e), s.cache = this);
|
|
4751
|
+
let n = this.#O(t, e, i);
|
|
4752
|
+
return s && g.metrics.hasSubscribers && g.metrics.publish(s), n;
|
|
4753
|
+
}
|
|
4754
|
+
#O(t, e, i, s) {
|
|
4755
|
+
let { ttl: n = this.ttl, start: r, noDisposeOnSet: h = this.noDisposeOnSet, sizeCalculation: a = this.sizeCalculation, status: o } = i, d = this.#e(e);
|
|
4756
|
+
if (e === void 0) return o && (o.set = "deleted"), this.delete(t), this;
|
|
4757
|
+
let { noUpdateTTL: _ = this.noUpdateTTL } = i;
|
|
4758
|
+
o && !d && (o.value = e);
|
|
4759
|
+
let y = this.#N(t, e, i.size || 0, a, o);
|
|
4760
|
+
if (this.maxEntrySize && y > this.maxEntrySize) return this.#v(t, "set"), o && (o.set = "miss", o.maxEntrySizeExceeded = !0), this;
|
|
4761
|
+
let u = this.#n === 0 ? void 0 : this.#s.get(t);
|
|
4762
|
+
if (u === void 0) u = this.#n === 0 ? this.#h : this.#_.length !== 0 ? this.#_.pop() : this.#n === this.#o ? this.#P(!1) : this.#n, this.#i[u] = t, this.#t[u] = e, this.#s.set(t, u), this.#l[this.#h] = u, this.#u[u] = this.#h, this.#h = u, this.#n++, this.#I(u, y, o), o && (o.set = "add"), _ = !1, this.#D && !d && this.#W?.(e, t, "add");
|
|
4595
4763
|
else {
|
|
4596
|
-
this.#
|
|
4597
|
-
let
|
|
4598
|
-
if (e !==
|
|
4599
|
-
if (
|
|
4600
|
-
|
|
4601
|
-
let { __staleWhileFetching:
|
|
4602
|
-
|
|
4603
|
-
|
|
4764
|
+
this.#L(u);
|
|
4765
|
+
let p = this.#t[u];
|
|
4766
|
+
if (e !== p) {
|
|
4767
|
+
if (!h) if (this.#e(p)) {
|
|
4768
|
+
p !== s && p.__abortController.abort(/* @__PURE__ */ new Error("replaced"));
|
|
4769
|
+
let { __staleWhileFetching: f } = p;
|
|
4770
|
+
f !== void 0 && f !== e && (this.#T && this.#m?.(f, t, "set"), this.#f && this.#r?.push([
|
|
4771
|
+
f,
|
|
4604
4772
|
t,
|
|
4605
4773
|
"set"
|
|
4606
4774
|
]));
|
|
4607
|
-
} else
|
|
4608
|
-
|
|
4775
|
+
} else this.#T && this.#m?.(p, t, "set"), this.#f && this.#r?.push([
|
|
4776
|
+
p,
|
|
4609
4777
|
t,
|
|
4610
4778
|
"set"
|
|
4611
|
-
])
|
|
4612
|
-
if (this.#
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
g !== void 0 && (r.oldValue = g);
|
|
4779
|
+
]);
|
|
4780
|
+
if (this.#C(u), this.#I(u, y, o), this.#t[u] = e, !d) {
|
|
4781
|
+
let f = p && this.#e(p) ? p.__staleWhileFetching : p, b = f === void 0 ? "add" : e !== f ? "replace" : "update";
|
|
4782
|
+
o && (o.set = b, f !== void 0 && (o.oldValue = f)), this.#D && this.onInsert?.(e, t, b);
|
|
4616
4783
|
}
|
|
4617
|
-
} else
|
|
4618
|
-
this.#I && this.onInsert?.(e, t, e === d ? "update" : "replace");
|
|
4784
|
+
} else d || (o && (o.set = "update"), this.#D && this.onInsert?.(e, t, "update"));
|
|
4619
4785
|
}
|
|
4620
|
-
if (
|
|
4621
|
-
let
|
|
4622
|
-
for (;
|
|
4786
|
+
if (n !== 0 && !this.#d && this.#k(), this.#d && (_ || this.#H(u, n, r), o && this.#E(o, u)), !h && this.#f && this.#r) {
|
|
4787
|
+
let p = this.#r, f;
|
|
4788
|
+
for (; f = p?.shift();) this.#S?.(...f);
|
|
4623
4789
|
}
|
|
4624
4790
|
return this;
|
|
4625
4791
|
}
|
|
4626
4792
|
pop() {
|
|
4627
4793
|
try {
|
|
4628
4794
|
for (; this.#n;) {
|
|
4629
|
-
let t = this.#t[this.#
|
|
4630
|
-
if (this.#
|
|
4795
|
+
let t = this.#t[this.#a];
|
|
4796
|
+
if (this.#P(!0), this.#e(t)) {
|
|
4631
4797
|
if (t.__staleWhileFetching) return t.__staleWhileFetching;
|
|
4632
4798
|
} else if (t !== void 0) return t;
|
|
4633
4799
|
}
|
|
@@ -4638,163 +4804,214 @@ var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4638
4804
|
}
|
|
4639
4805
|
}
|
|
4640
4806
|
}
|
|
4641
|
-
#
|
|
4642
|
-
let e = this.#
|
|
4643
|
-
|
|
4644
|
-
|
|
4807
|
+
#P(t) {
|
|
4808
|
+
let e = this.#a, i = this.#i[e], s = this.#t[e], n = this.#e(s);
|
|
4809
|
+
n && s.__abortController.abort(/* @__PURE__ */ new Error("evicted"));
|
|
4810
|
+
let r = n ? s.__staleWhileFetching : s;
|
|
4811
|
+
return (this.#T || this.#f) && r !== void 0 && (this.#T && this.#m?.(r, i, "evict"), this.#f && this.#r?.push([
|
|
4812
|
+
r,
|
|
4645
4813
|
i,
|
|
4646
4814
|
"evict"
|
|
4647
|
-
])), this.#
|
|
4815
|
+
])), this.#C(e), this.#g?.[e] && (clearTimeout(this.#g[e]), this.#g[e] = void 0), t && (this.#i[e] = void 0, this.#t[e] = void 0, this.#_.push(e)), this.#n === 1 ? (this.#a = this.#h = 0, this.#_.length = 0) : this.#a = this.#l[e], this.#s.delete(i), this.#n--, e;
|
|
4648
4816
|
}
|
|
4649
4817
|
has(t, e = {}) {
|
|
4818
|
+
let { status: i = g.metrics.hasSubscribers ? {} : void 0 } = e;
|
|
4819
|
+
e.status = i, i && (i.op = "has", i.key = t, i.cache = this);
|
|
4820
|
+
let s = this.#Y(t, e);
|
|
4821
|
+
return g.metrics.hasSubscribers && g.metrics.publish(i), s;
|
|
4822
|
+
}
|
|
4823
|
+
#Y(t, e = {}) {
|
|
4650
4824
|
let { updateAgeOnHas: i = this.updateAgeOnHas, status: s } = e, n = this.#s.get(t);
|
|
4651
4825
|
if (n !== void 0) {
|
|
4652
|
-
let
|
|
4653
|
-
if (this.#e(
|
|
4654
|
-
if (this.#p(n)) s && (s.has = "stale", this.#
|
|
4655
|
-
else return i && this.#R(n), s && (s.has = "hit", this.#
|
|
4826
|
+
let r = this.#t[n];
|
|
4827
|
+
if (this.#e(r) && r.__staleWhileFetching === void 0) return !1;
|
|
4828
|
+
if (this.#p(n)) s && (s.has = "stale", this.#E(s, n));
|
|
4829
|
+
else return i && this.#R(n), s && (s.has = "hit", this.#E(s, n)), !0;
|
|
4656
4830
|
} else s && (s.has = "miss");
|
|
4657
4831
|
return !1;
|
|
4658
4832
|
}
|
|
4659
4833
|
peek(t, e = {}) {
|
|
4660
|
-
let {
|
|
4661
|
-
|
|
4662
|
-
let
|
|
4663
|
-
return
|
|
4834
|
+
let { status: i = C() ? {} : void 0 } = e;
|
|
4835
|
+
i && (i.op = "peek", i.key = t, i.cache = this), e.status = i;
|
|
4836
|
+
let s = this.#J(t, e);
|
|
4837
|
+
return g.metrics.hasSubscribers && g.metrics.publish(i), s;
|
|
4838
|
+
}
|
|
4839
|
+
#J(t, e) {
|
|
4840
|
+
let { status: i, allowStale: s = this.allowStale } = e, n = this.#s.get(t);
|
|
4841
|
+
if (n === void 0 || !s && this.#p(n)) {
|
|
4842
|
+
i && (i.peek = n === void 0 ? "miss" : "stale");
|
|
4843
|
+
return;
|
|
4844
|
+
}
|
|
4845
|
+
let r = this.#t[n], h = this.#e(r) ? r.__staleWhileFetching : r;
|
|
4846
|
+
return i && (h !== void 0 ? (i.peek = "hit", i.value = h) : i.peek = "miss"), h;
|
|
4664
4847
|
}
|
|
4665
|
-
#
|
|
4848
|
+
#G(t, e, i, s) {
|
|
4666
4849
|
let n = e === void 0 ? void 0 : this.#t[e];
|
|
4667
4850
|
if (this.#e(n)) return n;
|
|
4668
|
-
let
|
|
4669
|
-
h?.addEventListener("abort", () =>
|
|
4670
|
-
let
|
|
4671
|
-
signal:
|
|
4851
|
+
let r = new AbortController(), { signal: h } = i;
|
|
4852
|
+
h?.addEventListener("abort", () => r.abort(h.reason), { signal: r.signal });
|
|
4853
|
+
let a = {
|
|
4854
|
+
signal: r.signal,
|
|
4672
4855
|
options: i,
|
|
4673
4856
|
context: s
|
|
4674
|
-
},
|
|
4675
|
-
let { aborted: l } =
|
|
4676
|
-
if (i.status && (l && !
|
|
4677
|
-
let
|
|
4678
|
-
return (
|
|
4679
|
-
},
|
|
4680
|
-
let { aborted: l } =
|
|
4681
|
-
if (this.#t[e] ===
|
|
4682
|
-
if (
|
|
4683
|
-
},
|
|
4684
|
-
let l = this.#
|
|
4685
|
-
|
|
4686
|
-
(!i.ignoreFetchAbort || i.allowStaleOnFetchAbort) && (
|
|
4687
|
-
});
|
|
4857
|
+
}, o = (f, b = !1) => {
|
|
4858
|
+
let { aborted: l } = r.signal, S = i.ignoreFetchAbort && f !== void 0, F = i.ignoreFetchAbort || !!(i.allowStaleOnFetchAbort && f !== void 0);
|
|
4859
|
+
if (i.status && (l && !b ? (i.status.fetchAborted = !0, i.status.fetchError = r.signal.reason, S && (i.status.fetchAbortIgnored = !0)) : i.status.fetchResolved = !0), l && !S && !b) return _(r.signal.reason, F);
|
|
4860
|
+
let w = u, m = this.#t[e];
|
|
4861
|
+
return (m === u || m === void 0 && S && b) && (f === void 0 ? w.__staleWhileFetching !== void 0 ? this.#t[e] = w.__staleWhileFetching : this.#v(t, "fetch") : (i.status && (i.status.fetchUpdated = !0), this.#O(t, f, a.options, w))), f;
|
|
4862
|
+
}, d = (f) => (i.status && (i.status.fetchRejected = !0, i.status.fetchError = f), _(f, !1)), _ = (f, b) => {
|
|
4863
|
+
let { aborted: l } = r.signal, S = l && i.allowStaleOnFetchAbort, F = S || i.allowStaleOnFetchRejection, w = F || i.noDeleteOnFetchRejection, m = u;
|
|
4864
|
+
if (this.#t[e] === u && (!w || !b && m.__staleWhileFetching === void 0 ? this.#v(t, "fetch") : S || (this.#t[e] = m.__staleWhileFetching)), F) return i.status && m.__staleWhileFetching !== void 0 && (i.status.returnedStale = !0), m.__staleWhileFetching;
|
|
4865
|
+
if (m.__returned === m) throw f;
|
|
4866
|
+
}, y = (f, b) => {
|
|
4867
|
+
let l = this.#M?.(t, n, a);
|
|
4868
|
+
r.signal.addEventListener("abort", () => {
|
|
4869
|
+
(!i.ignoreFetchAbort || i.allowStaleOnFetchAbort) && (f(void 0), i.allowStaleOnFetchAbort && (f = (S) => o(S, !0)));
|
|
4870
|
+
}), l && l instanceof Promise ? l.then((S) => f(S === void 0 ? void 0 : S), b) : l !== void 0 && f(l);
|
|
4688
4871
|
};
|
|
4689
4872
|
i.status && (i.status.fetchDispatched = !0);
|
|
4690
|
-
let
|
|
4691
|
-
__abortController:
|
|
4873
|
+
let u = new Promise(y).then(o, d), p = Object.assign(u, {
|
|
4874
|
+
__abortController: r,
|
|
4692
4875
|
__staleWhileFetching: n,
|
|
4693
4876
|
__returned: void 0
|
|
4694
4877
|
});
|
|
4695
|
-
return e === void 0 ? (this
|
|
4696
|
-
...
|
|
4878
|
+
return e === void 0 ? (this.#O(t, p, {
|
|
4879
|
+
...a.options,
|
|
4697
4880
|
status: void 0
|
|
4698
|
-
}), e = this.#s.get(t)) : this.#t[e] =
|
|
4881
|
+
}), e = this.#s.get(t)) : this.#t[e] = p, p;
|
|
4699
4882
|
}
|
|
4700
4883
|
#e(t) {
|
|
4701
|
-
if (!this.#
|
|
4884
|
+
if (!this.#U) return !1;
|
|
4702
4885
|
let e = t;
|
|
4703
|
-
return !!e && e instanceof Promise && e.hasOwnProperty("__staleWhileFetching") && e.__abortController instanceof
|
|
4886
|
+
return !!e && e instanceof Promise && e.hasOwnProperty("__staleWhileFetching") && e.__abortController instanceof AbortController;
|
|
4887
|
+
}
|
|
4888
|
+
fetch(t, e = {}) {
|
|
4889
|
+
let i = g.tracing.hasSubscribers, { status: s = C() ? {} : void 0 } = e;
|
|
4890
|
+
e.status = s, s && e.context && (s.context = e.context);
|
|
4891
|
+
let n = this.#q(t, e);
|
|
4892
|
+
return s && i && (s.trace = !0, g.tracing.tracePromise(() => n, s).catch(() => {})), n;
|
|
4704
4893
|
}
|
|
4705
|
-
async
|
|
4706
|
-
let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, ttl:
|
|
4707
|
-
if (!this.#
|
|
4894
|
+
async #q(t, e = {}) {
|
|
4895
|
+
let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, ttl: r = this.ttl, noDisposeOnSet: h = this.noDisposeOnSet, size: a = 0, sizeCalculation: o = this.sizeCalculation, noUpdateTTL: d = this.noUpdateTTL, noDeleteOnFetchRejection: _ = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: y = this.allowStaleOnFetchRejection, ignoreFetchAbort: u = this.ignoreFetchAbort, allowStaleOnFetchAbort: p = this.allowStaleOnFetchAbort, context: f, forceRefresh: b = !1, status: l, signal: S } = e;
|
|
4896
|
+
if (l && (l.op = "fetch", l.key = t, b && (l.forceRefresh = !0), l.cache = this), !this.#U) return l && (l.fetch = "get"), this.#x(t, {
|
|
4708
4897
|
allowStale: i,
|
|
4709
4898
|
updateAgeOnGet: s,
|
|
4710
4899
|
noDeleteOnStaleGet: n,
|
|
4711
4900
|
status: l
|
|
4712
4901
|
});
|
|
4713
|
-
let
|
|
4902
|
+
let F = {
|
|
4714
4903
|
allowStale: i,
|
|
4715
4904
|
updateAgeOnGet: s,
|
|
4716
4905
|
noDeleteOnStaleGet: n,
|
|
4717
|
-
ttl:
|
|
4906
|
+
ttl: r,
|
|
4718
4907
|
noDisposeOnSet: h,
|
|
4719
|
-
size:
|
|
4720
|
-
sizeCalculation:
|
|
4721
|
-
noUpdateTTL:
|
|
4722
|
-
noDeleteOnFetchRejection:
|
|
4723
|
-
allowStaleOnFetchRejection:
|
|
4724
|
-
allowStaleOnFetchAbort:
|
|
4725
|
-
ignoreFetchAbort:
|
|
4908
|
+
size: a,
|
|
4909
|
+
sizeCalculation: o,
|
|
4910
|
+
noUpdateTTL: d,
|
|
4911
|
+
noDeleteOnFetchRejection: _,
|
|
4912
|
+
allowStaleOnFetchRejection: y,
|
|
4913
|
+
allowStaleOnFetchAbort: p,
|
|
4914
|
+
ignoreFetchAbort: u,
|
|
4726
4915
|
status: l,
|
|
4727
4916
|
signal: S
|
|
4728
|
-
},
|
|
4729
|
-
if (
|
|
4917
|
+
}, w = this.#s.get(t);
|
|
4918
|
+
if (w === void 0) {
|
|
4730
4919
|
l && (l.fetch = "miss");
|
|
4731
|
-
let
|
|
4732
|
-
return
|
|
4920
|
+
let m = this.#G(t, w, F, f);
|
|
4921
|
+
return m.__returned = m;
|
|
4733
4922
|
} else {
|
|
4734
|
-
let
|
|
4735
|
-
if (this.#e(
|
|
4736
|
-
let E = i &&
|
|
4737
|
-
return l && (l.fetch = "inflight", E && (l.returnedStale = !0)), E ?
|
|
4923
|
+
let m = this.#t[w];
|
|
4924
|
+
if (this.#e(m)) {
|
|
4925
|
+
let E = i && m.__staleWhileFetching !== void 0;
|
|
4926
|
+
return l && (l.fetch = "inflight", E && (l.returnedStale = !0)), E ? m.__staleWhileFetching : m.__returned = m;
|
|
4738
4927
|
}
|
|
4739
|
-
let
|
|
4740
|
-
if (!
|
|
4741
|
-
let
|
|
4742
|
-
return l && (l.fetch =
|
|
4928
|
+
let A = this.#p(w);
|
|
4929
|
+
if (!b && !A) return l && (l.fetch = "hit"), this.#L(w), s && this.#R(w), l && this.#E(l, w), m;
|
|
4930
|
+
let z = this.#G(t, w, F, f), v = z.__staleWhileFetching !== void 0 && i;
|
|
4931
|
+
return l && (l.fetch = A ? "stale" : "refresh", v && A && (l.returnedStale = !0)), v ? z.__staleWhileFetching : z.__returned = z;
|
|
4743
4932
|
}
|
|
4744
4933
|
}
|
|
4745
|
-
|
|
4746
|
-
let i =
|
|
4934
|
+
forceFetch(t, e = {}) {
|
|
4935
|
+
let i = g.tracing.hasSubscribers, { status: s = C() ? {} : void 0 } = e;
|
|
4936
|
+
e.status = s, s && e.context && (s.context = e.context);
|
|
4937
|
+
let n = this.#K(t, e);
|
|
4938
|
+
return s && i && (s.trace = !0, g.tracing.tracePromise(() => n, s).catch(() => {})), n;
|
|
4939
|
+
}
|
|
4940
|
+
async #K(t, e = {}) {
|
|
4941
|
+
let i = await this.#q(t, e);
|
|
4747
4942
|
if (i === void 0) throw new Error("fetch() returned undefined");
|
|
4748
4943
|
return i;
|
|
4749
4944
|
}
|
|
4750
4945
|
memo(t, e = {}) {
|
|
4751
|
-
let i =
|
|
4946
|
+
let { status: i = g.metrics.hasSubscribers ? {} : void 0 } = e;
|
|
4947
|
+
e.status = i, i && (i.op = "memo", i.key = t, e.context && (i.context = e.context), i.cache = this);
|
|
4948
|
+
let s = this.#Q(t, e);
|
|
4949
|
+
return i && (i.value = s), g.metrics.hasSubscribers && g.metrics.publish(i), s;
|
|
4950
|
+
}
|
|
4951
|
+
#Q(t, e = {}) {
|
|
4952
|
+
let i = this.#j;
|
|
4752
4953
|
if (!i) throw new Error("no memoMethod provided to constructor");
|
|
4753
|
-
let { context: s,
|
|
4754
|
-
|
|
4755
|
-
let
|
|
4756
|
-
|
|
4954
|
+
let { context: s, status: n, forceRefresh: r, ...h } = e;
|
|
4955
|
+
n && r && (n.forceRefresh = !0);
|
|
4956
|
+
let a = this.#x(t, h), o = r || a === void 0;
|
|
4957
|
+
if (n && (n.memo = o ? "miss" : "hit", o || (n.value = a)), !o) return a;
|
|
4958
|
+
let d = i(t, a, {
|
|
4959
|
+
options: h,
|
|
4757
4960
|
context: s
|
|
4758
4961
|
});
|
|
4759
|
-
return this
|
|
4962
|
+
return n && (n.value = d), this.#O(t, d, h), d;
|
|
4760
4963
|
}
|
|
4761
4964
|
get(t, e = {}) {
|
|
4762
|
-
let {
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4965
|
+
let { status: i = g.metrics.hasSubscribers ? {} : void 0 } = e;
|
|
4966
|
+
e.status = i, i && (i.op = "get", i.key = t, i.cache = this);
|
|
4967
|
+
let s = this.#x(t, e);
|
|
4968
|
+
return i && (s !== void 0 && (i.value = s), g.metrics.hasSubscribers && g.metrics.publish(i)), s;
|
|
4969
|
+
}
|
|
4970
|
+
#x(t, e = {}) {
|
|
4971
|
+
let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, status: r } = e, h = this.#s.get(t);
|
|
4972
|
+
if (h === void 0) {
|
|
4973
|
+
r && (r.get = "miss");
|
|
4974
|
+
return;
|
|
4975
|
+
}
|
|
4976
|
+
let a = this.#t[h], o = this.#e(a);
|
|
4977
|
+
return r && this.#E(r, h), this.#p(h) ? o ? (r && (r.get = "stale-fetching"), i && a.__staleWhileFetching !== void 0 ? (r && (r.returnedStale = !0), a.__staleWhileFetching) : void 0) : (n || this.#v(t, "expire"), r && (r.get = "stale"), i ? (r && (r.returnedStale = !0), a) : void 0) : (r && (r.get = o ? "fetching" : "hit"), this.#L(h), s && this.#R(h), o ? a.__staleWhileFetching : a);
|
|
4767
4978
|
}
|
|
4768
|
-
#
|
|
4769
|
-
this.#u[e] = t, this.#
|
|
4979
|
+
#B(t, e) {
|
|
4980
|
+
this.#u[e] = t, this.#l[t] = e;
|
|
4770
4981
|
}
|
|
4771
|
-
#
|
|
4772
|
-
t !== this.#h && (t === this.#
|
|
4982
|
+
#L(t) {
|
|
4983
|
+
t !== this.#h && (t === this.#a ? this.#a = this.#l[t] : this.#B(this.#u[t], this.#l[t]), this.#B(this.#h, t), this.#h = t);
|
|
4773
4984
|
}
|
|
4774
4985
|
delete(t) {
|
|
4775
|
-
return this.#
|
|
4776
|
-
}
|
|
4777
|
-
#
|
|
4986
|
+
return this.#v(t, "delete");
|
|
4987
|
+
}
|
|
4988
|
+
#v(t, e) {
|
|
4989
|
+
g.metrics.hasSubscribers && g.metrics.publish({
|
|
4990
|
+
op: "delete",
|
|
4991
|
+
delete: e,
|
|
4992
|
+
key: t,
|
|
4993
|
+
cache: this
|
|
4994
|
+
});
|
|
4778
4995
|
let i = !1;
|
|
4779
4996
|
if (this.#n !== 0) {
|
|
4780
4997
|
let s = this.#s.get(t);
|
|
4781
|
-
if (s !== void 0) if (this.#g?.[s] && (clearTimeout(this.#g?.[s]), this.#g[s] = void 0), i = !0, this.#n === 1) this
|
|
4998
|
+
if (s !== void 0) if (this.#g?.[s] && (clearTimeout(this.#g?.[s]), this.#g[s] = void 0), i = !0, this.#n === 1) this.#$(e);
|
|
4782
4999
|
else {
|
|
4783
|
-
this.#
|
|
5000
|
+
this.#C(s);
|
|
4784
5001
|
let n = this.#t[s];
|
|
4785
|
-
if (this.#e(n) ? n.__abortController.abort(/* @__PURE__ */ new Error("deleted")) : (this.#T || this.#f) && (this.#T && this.#
|
|
5002
|
+
if (this.#e(n) ? n.__abortController.abort(/* @__PURE__ */ new Error("deleted")) : (this.#T || this.#f) && (this.#T && this.#m?.(n, t, e), this.#f && this.#r?.push([
|
|
4786
5003
|
n,
|
|
4787
5004
|
t,
|
|
4788
5005
|
e
|
|
4789
5006
|
])), this.#s.delete(t), this.#i[s] = void 0, this.#t[s] = void 0, s === this.#h) this.#h = this.#u[s];
|
|
4790
|
-
else if (s === this.#
|
|
5007
|
+
else if (s === this.#a) this.#a = this.#l[s];
|
|
4791
5008
|
else {
|
|
4792
|
-
let
|
|
4793
|
-
this.#
|
|
4794
|
-
let h = this.#
|
|
5009
|
+
let r = this.#u[s];
|
|
5010
|
+
this.#l[r] = this.#l[s];
|
|
5011
|
+
let h = this.#l[s];
|
|
4795
5012
|
this.#u[h] = this.#u[s];
|
|
4796
5013
|
}
|
|
4797
|
-
this.#n--, this.#
|
|
5014
|
+
this.#n--, this.#_.push(s);
|
|
4798
5015
|
}
|
|
4799
5016
|
}
|
|
4800
5017
|
if (this.#f && this.#r?.length) {
|
|
@@ -4804,27 +5021,27 @@ var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4804
5021
|
return i;
|
|
4805
5022
|
}
|
|
4806
5023
|
clear() {
|
|
4807
|
-
return this
|
|
5024
|
+
return this.#$("delete");
|
|
4808
5025
|
}
|
|
4809
|
-
|
|
4810
|
-
for (let e of this.#
|
|
5026
|
+
#$(t) {
|
|
5027
|
+
for (let e of this.#z({ allowStale: !0 })) {
|
|
4811
5028
|
let i = this.#t[e];
|
|
4812
5029
|
if (this.#e(i)) i.__abortController.abort(/* @__PURE__ */ new Error("deleted"));
|
|
4813
5030
|
else {
|
|
4814
5031
|
let s = this.#i[e];
|
|
4815
|
-
this.#T && this.#
|
|
5032
|
+
this.#T && this.#m?.(i, s, t), this.#f && this.#r?.push([
|
|
4816
5033
|
i,
|
|
4817
5034
|
s,
|
|
4818
5035
|
t
|
|
4819
5036
|
]);
|
|
4820
5037
|
}
|
|
4821
5038
|
}
|
|
4822
|
-
if (this.#s.clear(), this.#t.fill(void 0), this.#i.fill(void 0), this.#d && this.#
|
|
4823
|
-
this.#d.fill(0), this.#
|
|
5039
|
+
if (this.#s.clear(), this.#t.fill(void 0), this.#i.fill(void 0), this.#d && this.#F) {
|
|
5040
|
+
this.#d.fill(0), this.#F.fill(0);
|
|
4824
5041
|
for (let e of this.#g ?? []) e !== void 0 && clearTimeout(e);
|
|
4825
5042
|
this.#g?.fill(void 0);
|
|
4826
5043
|
}
|
|
4827
|
-
if (this.#y && this.#y.fill(0), this.#
|
|
5044
|
+
if (this.#y && this.#y.fill(0), this.#a = 0, this.#h = 0, this.#_.length = 0, this.#b = 0, this.#n = 0, this.#f && this.#r) {
|
|
4828
5045
|
let e = this.#r, i;
|
|
4829
5046
|
for (; i = e?.shift();) this.#S?.(...i);
|
|
4830
5047
|
}
|
|
@@ -5020,8 +5237,10 @@ var require_parse_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5020
5237
|
if (Object.prototype.hasOwnProperty.call(protocols, proto)) return arg;
|
|
5021
5238
|
if (arg.substr(firstColon, 3) === "://") return arg;
|
|
5022
5239
|
const firstAt = arg.indexOf("@");
|
|
5023
|
-
if (firstAt > -1)
|
|
5024
|
-
|
|
5240
|
+
if (firstAt > -1) {
|
|
5241
|
+
if (firstAt > firstColon) return `git+ssh://${arg}`;
|
|
5242
|
+
else return arg;
|
|
5243
|
+
}
|
|
5025
5244
|
return `${arg.slice(0, firstColon + 1)}//${arg.slice(firstColon + 1)}`;
|
|
5026
5245
|
};
|
|
5027
5246
|
const correctUrl = (giturl) => {
|
|
@@ -5058,7 +5277,8 @@ var require_from_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5058
5277
|
};
|
|
5059
5278
|
module.exports = (giturl, opts, { gitHosts, protocols }) => {
|
|
5060
5279
|
if (!giturl) return;
|
|
5061
|
-
const
|
|
5280
|
+
const correctedUrl = isGitHubShorthand(giturl) ? `github:${giturl}` : giturl;
|
|
5281
|
+
const parsed = parseUrl(correctedUrl, protocols);
|
|
5062
5282
|
if (!parsed) return;
|
|
5063
5283
|
const gitHostShortcut = gitHosts.byShortcut[parsed.protocol];
|
|
5064
5284
|
const gitHostDomain = gitHosts.byDomain[parsed.hostname.startsWith("www.") ? parsed.hostname.slice(4) : parsed.hostname];
|
|
@@ -5521,17 +5741,22 @@ var require_fixer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5521
5741
|
var hosted = hostedGitInfo.fromUrl(data.repository.url);
|
|
5522
5742
|
if (hosted && hosted.bugs()) data.bugs = { url: hosted.bugs() };
|
|
5523
5743
|
} else if (data.bugs) {
|
|
5524
|
-
if (typeof data.bugs === "string")
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5744
|
+
if (typeof data.bugs === "string") {
|
|
5745
|
+
if (isEmail(data.bugs)) data.bugs = { email: data.bugs };
|
|
5746
|
+
else if (URL$1.canParse(data.bugs)) data.bugs = { url: data.bugs };
|
|
5747
|
+
else this.warn("nonEmailUrlBugsString");
|
|
5748
|
+
} else {
|
|
5528
5749
|
bugsTypos(data.bugs, this.warn);
|
|
5529
5750
|
var oldBugs = data.bugs;
|
|
5530
5751
|
data.bugs = {};
|
|
5531
|
-
if (oldBugs.url)
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5752
|
+
if (oldBugs.url) {
|
|
5753
|
+
if (URL$1.canParse(oldBugs.url)) data.bugs.url = oldBugs.url;
|
|
5754
|
+
else this.warn("nonUrlBugsUrlField");
|
|
5755
|
+
}
|
|
5756
|
+
if (oldBugs.email) {
|
|
5757
|
+
if (typeof oldBugs.email === "string" && isEmail(oldBugs.email)) data.bugs.email = oldBugs.email;
|
|
5758
|
+
else this.warn("nonEmailBugsEmailField");
|
|
5759
|
+
}
|
|
5535
5760
|
}
|
|
5536
5761
|
if (!data.bugs.email && !data.bugs.url) {
|
|
5537
5762
|
delete data.bugs;
|
|
@@ -5763,7 +5988,8 @@ const _readPackage = (file, normalize) => {
|
|
|
5763
5988
|
return json;
|
|
5764
5989
|
};
|
|
5765
5990
|
async function readPackage({ cwd, normalize = true } = {}) {
|
|
5766
|
-
|
|
5991
|
+
const packageFile = await fsPromises.readFile(getPackagePath(cwd), "utf8");
|
|
5992
|
+
return _readPackage(packageFile, normalize);
|
|
5767
5993
|
}
|
|
5768
5994
|
//#endregion
|
|
5769
5995
|
//#region clis/file-system/spawn-async.ts
|
|
@@ -5796,10 +6022,14 @@ function spawnAsync(command, args, options = {}) {
|
|
|
5796
6022
|
//#endregion
|
|
5797
6023
|
//#region clis/file-system/dependencies.ts
|
|
5798
6024
|
async function fetchNpmVersionFromRegistryForTag(packageName, tag) {
|
|
5799
|
-
const
|
|
6025
|
+
const version = await fetchPackageVersionFromNpmRegistry(`${packageName}@${tag}`);
|
|
6026
|
+
const cleanedVersion = clean(version);
|
|
5800
6027
|
if (!cleanedVersion) throw new Error(`Failed to fetch version for package "${packageName}" at tag "${tag}".`);
|
|
5801
6028
|
return cleanedVersion;
|
|
5802
6029
|
}
|
|
6030
|
+
function lowestVersion(versions) {
|
|
6031
|
+
return [...versions].sort(compare)[0];
|
|
6032
|
+
}
|
|
5803
6033
|
async function fetchPackageVersionFromNpmRegistry(packageSpecifier, registryUrl) {
|
|
5804
6034
|
const failedFetchErrorMessage = `Failed to fetch version from npm registry for ${packageSpecifier}.`;
|
|
5805
6035
|
try {
|
|
@@ -6046,7 +6276,7 @@ PH CLI package manager: ${packageManager}
|
|
|
6046
6276
|
//#endregion
|
|
6047
6277
|
//#region clis/file-system/write-file-ensuring-dir.ts
|
|
6048
6278
|
async function writeFileEnsuringDir(filePath, contents) {
|
|
6049
|
-
await mkdir(dirname(filePath), { recursive: true });
|
|
6279
|
+
await mkdir(dirname(resolve(filePath)), { recursive: true });
|
|
6050
6280
|
await writeFile(filePath, contents, { encoding: "utf-8" });
|
|
6051
6281
|
}
|
|
6052
6282
|
//#endregion
|
|
@@ -6268,18 +6498,33 @@ function getTelemetryStatus() {
|
|
|
6268
6498
|
//#region constants.ts
|
|
6269
6499
|
const PACKAGES_DEPENDENCIES = [
|
|
6270
6500
|
"@powerhousedao/builder-tools",
|
|
6501
|
+
"@powerhousedao/clint",
|
|
6271
6502
|
"@powerhousedao/codegen",
|
|
6272
6503
|
"@powerhousedao/common",
|
|
6273
6504
|
"@powerhousedao/config",
|
|
6505
|
+
"@powerhousedao/connect-core",
|
|
6274
6506
|
"@powerhousedao/design-system",
|
|
6507
|
+
"@powerhousedao/desktop",
|
|
6508
|
+
"@powerhousedao/host-core",
|
|
6275
6509
|
"document-drive",
|
|
6276
6510
|
"document-model",
|
|
6511
|
+
"@powerhousedao/opentelemetry-instrumentation-reactor",
|
|
6512
|
+
"@powerhousedao/pieces-framework",
|
|
6277
6513
|
"@powerhousedao/reactor",
|
|
6278
6514
|
"@powerhousedao/reactor-api",
|
|
6515
|
+
"@powerhousedao/reactor-attachments",
|
|
6279
6516
|
"@powerhousedao/reactor-browser",
|
|
6517
|
+
"@powerhousedao/reactor-drive",
|
|
6518
|
+
"@powerhousedao/reactor-group",
|
|
6519
|
+
"@powerhousedao/reactor-hypercore",
|
|
6280
6520
|
"@powerhousedao/reactor-mcp",
|
|
6521
|
+
"@powerhousedao/reactor-privacy",
|
|
6522
|
+
"@powerhousedao/reactor-router",
|
|
6523
|
+
"@powerhousedao/reactor-workflow",
|
|
6524
|
+
"@powerhousedao/registry",
|
|
6281
6525
|
"@powerhousedao/switchboard-gui",
|
|
6282
6526
|
"@powerhousedao/vetra",
|
|
6527
|
+
"@powerhousedao/workflow",
|
|
6283
6528
|
"@powerhousedao/analytics-engine-core",
|
|
6284
6529
|
"@powerhousedao/analytics-engine-knex",
|
|
6285
6530
|
"@powerhousedao/analytics-engine-pg",
|
|
@@ -6287,11 +6532,6 @@ const PACKAGES_DEPENDENCIES = [
|
|
|
6287
6532
|
"@powerhousedao/analytics-engine-graphql",
|
|
6288
6533
|
"@powerhousedao/shared",
|
|
6289
6534
|
"@powerhousedao/powerhouse-vetra-packages",
|
|
6290
|
-
"@powerhousedao/analytics-engine-core",
|
|
6291
|
-
"@powerhousedao/analytics-engine-graphql",
|
|
6292
|
-
"@powerhousedao/analytics-engine-knex",
|
|
6293
|
-
"@powerhousedao/analytics-engine-pg",
|
|
6294
|
-
"@powerhousedao/analytics-engine-browser",
|
|
6295
6535
|
"@renown/sdk"
|
|
6296
6536
|
];
|
|
6297
6537
|
const CLIS_DEPENDENCIES = ["ph-cmd", "@powerhousedao/ph-cli"];
|
|
@@ -6357,7 +6597,35 @@ async function runUseLocal(monorepoPath, skipInstall) {
|
|
|
6357
6597
|
runCmd(`pnpm install`);
|
|
6358
6598
|
}
|
|
6359
6599
|
}
|
|
6600
|
+
const WORKSPACE_DIRS = [
|
|
6601
|
+
"packages",
|
|
6602
|
+
"packages/analytics-engine",
|
|
6603
|
+
"clis",
|
|
6604
|
+
"apps"
|
|
6605
|
+
];
|
|
6606
|
+
const workspaces = /* @__PURE__ */ new Map();
|
|
6607
|
+
function workspacePackages(monorepoPath) {
|
|
6608
|
+
let dirs = workspaces.get(monorepoPath);
|
|
6609
|
+
if (dirs) return dirs;
|
|
6610
|
+
dirs = /* @__PURE__ */ new Map();
|
|
6611
|
+
for (const parent of WORKSPACE_DIRS) {
|
|
6612
|
+
const root = path.join(monorepoPath, parent);
|
|
6613
|
+
if (!existsSync(root)) continue;
|
|
6614
|
+
for (const entry of readdirSync(root, { withFileTypes: true })) {
|
|
6615
|
+
const manifest = path.join(root, entry.name, "package.json");
|
|
6616
|
+
if (!entry.isDirectory() || !existsSync(manifest)) continue;
|
|
6617
|
+
try {
|
|
6618
|
+
const { name } = JSON.parse(readFileSync(manifest, "utf8"));
|
|
6619
|
+
if (name) dirs.set(name, path.join(root, entry.name));
|
|
6620
|
+
} catch {}
|
|
6621
|
+
}
|
|
6622
|
+
}
|
|
6623
|
+
workspaces.set(monorepoPath, dirs);
|
|
6624
|
+
return dirs;
|
|
6625
|
+
}
|
|
6360
6626
|
function buildPnpmLink(packageName, monorepoPath) {
|
|
6627
|
+
const dir = workspacePackages(monorepoPath).get(packageName);
|
|
6628
|
+
if (dir) return `link:${dir}`;
|
|
6361
6629
|
const isCli = CLIS_DEPENDENCIES.includes(packageName);
|
|
6362
6630
|
const isApp = APPS_DEPENDENCIES.includes(packageName);
|
|
6363
6631
|
const packageDir = isCli ? "clis" : isApp ? "apps" : "packages";
|
|
@@ -6365,6 +6633,411 @@ function buildPnpmLink(packageName, monorepoPath) {
|
|
|
6365
6633
|
return `link:${path.join(monorepoPath, packageDir, packageNameWithoutNamespace).replace("analytics-engine-", "analytics-engine/")}`;
|
|
6366
6634
|
}
|
|
6367
6635
|
//#endregion
|
|
6636
|
+
//#region connect/connect-config-schema.ts
|
|
6637
|
+
const IMAGE_REF = "Image reference: a project-relative file path, a URL, or a data URI.";
|
|
6638
|
+
const IMAGE_REF_OR_DEFAULT = "Image reference: a project-relative file path (resolved by the Connect build), a URL, or a data URI. null keeps the default.";
|
|
6639
|
+
/** An image reference: a project-relative file path (the Connect build turns
|
|
6640
|
+
* it into a data URI or an emitted file), a URL, or a data URI. */
|
|
6641
|
+
const connectImageRefSchema = z.string().describe(IMAGE_REF);
|
|
6642
|
+
/** An image reference where `null` (or omitting it) keeps the default. */
|
|
6643
|
+
const optionalImageRef = (description = IMAGE_REF_OR_DEFAULT) => connectImageRefSchema.nullable().optional().describe(description);
|
|
6644
|
+
/** An image per colour scheme: one reference for both, or `{ light, dark }`
|
|
6645
|
+
* (`dark` falls back to `light`). */
|
|
6646
|
+
const connectSchemedImageSchema = z.union([connectImageRefSchema, z.strictObject({
|
|
6647
|
+
light: connectImageRefSchema,
|
|
6648
|
+
dark: connectImageRefSchema.nullable().optional()
|
|
6649
|
+
})]).describe("One image for both colour schemes, or { light, dark } (dark falls back to light).");
|
|
6650
|
+
/** A CSS colour per colour scheme (`dark` falls back to `light`). */
|
|
6651
|
+
const connectSchemedColorSchema = z.union([z.string(), z.strictObject({
|
|
6652
|
+
light: z.string(),
|
|
6653
|
+
dark: z.string().nullable().optional()
|
|
6654
|
+
})]);
|
|
6655
|
+
/** A CSS length: a number is px, a string is passed through as written. */
|
|
6656
|
+
const connectLengthSchema = z.union([z.number(), z.string()]);
|
|
6657
|
+
const optionalLength = () => connectLengthSchema.nullable().optional().describe("A CSS length: a number is px; a string is used as written (\"40%\", \"min(55%, 880px)\", \"calc(50% - 120px)\").");
|
|
6658
|
+
/** Distances to the four edges; each is optional. */
|
|
6659
|
+
const connectEdgesSchema = z.strictObject({
|
|
6660
|
+
top: optionalLength(),
|
|
6661
|
+
right: optionalLength(),
|
|
6662
|
+
bottom: optionalLength(),
|
|
6663
|
+
left: optionalLength()
|
|
6664
|
+
});
|
|
6665
|
+
/** One image of a decorated pane, absolutely positioned inside it. */
|
|
6666
|
+
const connectBackgroundLayerSchema = z.strictObject({
|
|
6667
|
+
src: connectSchemedImageSchema,
|
|
6668
|
+
position: connectEdgesSchema.nullable().optional().describe("Distances to the pane's edges; at most one per axis. Omitted: centred both ways."),
|
|
6669
|
+
width: optionalLength(),
|
|
6670
|
+
height: optionalLength(),
|
|
6671
|
+
minWidth: optionalLength(),
|
|
6672
|
+
minHeight: optionalLength(),
|
|
6673
|
+
maxWidth: optionalLength(),
|
|
6674
|
+
maxHeight: optionalLength(),
|
|
6675
|
+
opacity: z.number().min(0).max(1).nullable().optional().describe("0 to 1 (default 1)."),
|
|
6676
|
+
fade: connectEdgesSchema.nullable().optional().describe("Feather depth per edge, fading the layer into the page colour.")
|
|
6677
|
+
}).describe("An image laid over the page, absolutely positioned: the edges set in `position` pin it, an axis with neither edge set is centred.");
|
|
6678
|
+
/** A decorated pane: the page colour and the images laid over it. */
|
|
6679
|
+
const connectBackgroundLayersSchema = z.strictObject({
|
|
6680
|
+
color: connectSchemedColorSchema.nullable().optional().describe("The page colour, or { light, dark }. Omitted or null: the theme's page background."),
|
|
6681
|
+
layers: z.array(connectBackgroundLayerSchema).describe("Painted in order; the first is at the back.")
|
|
6682
|
+
});
|
|
6683
|
+
/** A pane's background: layers over a page colour, or one image as
|
|
6684
|
+
* shorthand for a single layer pinned bottom-right. */
|
|
6685
|
+
const connectBackgroundSchema = z.union([connectImageRefSchema, connectBackgroundLayersSchema]).describe("Layered images over a page colour, or a single image pinned to the bottom-right corner. null keeps the default.");
|
|
6686
|
+
/** The loading image and the motion applied to it. */
|
|
6687
|
+
const connectLoaderSchema = z.strictObject({
|
|
6688
|
+
src: connectImageRefSchema,
|
|
6689
|
+
animation: z.enum([
|
|
6690
|
+
"pulse",
|
|
6691
|
+
"spin",
|
|
6692
|
+
"none"
|
|
6693
|
+
]).nullable().optional().describe("Motion applied to the image (default pulse)."),
|
|
6694
|
+
size: z.number().min(16).max(512).nullable().optional().describe("Rendered width in CSS pixels (default 96); the height follows the image.")
|
|
6695
|
+
});
|
|
6696
|
+
/** `connect.branding`: Connect's identity and look. */
|
|
6697
|
+
const connectBrandingSchema = z.strictObject({
|
|
6698
|
+
appName: z.string().nullable().optional().describe("Browser tab title, installed-app name and in-app brand text. null or omitted: 'Powerhouse Connect'."),
|
|
6699
|
+
icon: optionalImageRef("App icon master (1024x1024 PNG recommended, or an SVG). The favicons and installed-app icons are found next to it as <name>_16x16.png, _32x32, _64x64, _192x192 and _512x512; the 64 px one is the in-app logo. null or omitted: Connect's icon."),
|
|
6700
|
+
favicon: z.string().nullable().optional().describe("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."),
|
|
6701
|
+
loader: z.union([connectImageRefSchema, connectLoaderSchema]).nullable().optional().describe("The loading image (first paint, app start, drive and editor loading). A path gets a gentle pulse; { src, animation, size } says otherwise, with animation \"none\" for an image that animates itself (animated SVG, GIF or WebP). null or omitted: Connect's animated logo.")
|
|
6702
|
+
}).describe("App identity and visual branding. Every field is optional; null means the default.");
|
|
6703
|
+
/** `connect.home`: the home screen (the generic chrome's landing page). */
|
|
6704
|
+
const connectHomeSchema = z.strictObject({ background: connectBackgroundSchema.nullable().optional().describe("The home screen's background: { color, layers } with each image positioned and sized, or one image pinned bottom-right. null or omitted: the bundled gradient.") }).describe("The home screen (the generic chrome's landing page).");
|
|
6705
|
+
const connectAppSchema = z.strictObject({
|
|
6706
|
+
logLevel: z.enum([
|
|
6707
|
+
"debug",
|
|
6708
|
+
"info",
|
|
6709
|
+
"warn",
|
|
6710
|
+
"error"
|
|
6711
|
+
]).optional().meta({
|
|
6712
|
+
description: "Log level applied by Connect's logger at boot. Affects browser-side output only.",
|
|
6713
|
+
default: "info"
|
|
6714
|
+
}),
|
|
6715
|
+
basePath: z.string().optional().meta({
|
|
6716
|
+
description: "Base path Connect is mounted under (e.g. '/connect' for subpath deploys). Normalised at runtime to start and end with '/'. Defaults to the build-time BASE_URL.",
|
|
6717
|
+
default: "/"
|
|
6718
|
+
}),
|
|
6719
|
+
offline: z.boolean().optional().meta({
|
|
6720
|
+
description: "When true (default), the build emits a precaching service worker so Connect's app shell works offline, and the SPA registers it at boot. Set false to opt this deployment out: no service worker is built, the SPA skips registration, and any previously-installed worker is unregistered.",
|
|
6721
|
+
default: true
|
|
6722
|
+
}),
|
|
6723
|
+
studioMode: z.boolean().optional().meta({
|
|
6724
|
+
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.",
|
|
6725
|
+
default: false
|
|
6726
|
+
}),
|
|
6727
|
+
workflowsEnabled: z.boolean().optional().describe("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.")
|
|
6728
|
+
}).describe("Top-level Connect application behaviour.");
|
|
6729
|
+
const connectAiSchema = z.strictObject({ assistantEnabled: z.boolean().optional().meta({
|
|
6730
|
+
description: "When true, Connect mounts the in-browser AI assistant (bottom-right chat FAB that talks to a user-configured OpenAI-compatible endpoint and acts on the reactor). Disabled by default.",
|
|
6731
|
+
default: false
|
|
6732
|
+
}) }).describe("AI assistant (chat) behaviour.");
|
|
6733
|
+
const connectPackagesSchema = z.strictObject({
|
|
6734
|
+
externalEnabled: z.boolean().optional().meta({
|
|
6735
|
+
description: "When false, Connect refuses to load any package that wasn't bundled at build time. Affirmative replacement for the legacy PH_CONNECT_EXTERNAL_PACKAGES_DISABLED env var.",
|
|
6736
|
+
default: true
|
|
6737
|
+
}),
|
|
6738
|
+
liveReload: z.boolean().optional().meta({
|
|
6739
|
+
description: "When true, Connect subscribes to the static-mode `/__packages` SSE channel so live publishes flow into the running tab without a page reload. Only works under hosting that serves this channel (e.g. ph-clint static mode).",
|
|
6740
|
+
default: false
|
|
6741
|
+
})
|
|
6742
|
+
}).describe("Runtime behaviour for the Connect package manager (separate from top-level `packages[]`, which lists which packages to load).");
|
|
6743
|
+
const EXPLORER_ICONS_DESCRIPTION = "The drive explorer's icons (the generic plugin's); each null keeps the built-in icon.";
|
|
6744
|
+
/** The drive explorer's icons: the generic chrome's, owned by the generic
|
|
6745
|
+
* plugin. Each `null` keeps the built-in icon. */
|
|
6746
|
+
const connectExplorerIconsSchema = z.strictObject({
|
|
6747
|
+
localDrive: optionalImageRef("Local drives without an icon of their own."),
|
|
6748
|
+
remoteDrive: optionalImageRef("Remote drives without an icon of their own."),
|
|
6749
|
+
folder: optionalImageRef("Folders."),
|
|
6750
|
+
document: optionalImageRef("Documents whose type has no icon in `documents`."),
|
|
6751
|
+
documents: z.record(z.string(), connectImageRefSchema).nullable().optional().describe("Per document type, e.g. \"acme/invoice\".")
|
|
6752
|
+
}).describe(EXPLORER_ICONS_DESCRIPTION);
|
|
6753
|
+
const connectDefaultDriveRemoteSchema = z.strictObject({
|
|
6754
|
+
url: z.string(),
|
|
6755
|
+
name: z.string().nullable().optional(),
|
|
6756
|
+
icon: z.string().nullable().optional()
|
|
6757
|
+
});
|
|
6758
|
+
const connectDefaultDriveLocalSchema = z.strictObject({
|
|
6759
|
+
local: z.literal(true).describe("Discriminator: this entry is a local drive created on first boot."),
|
|
6760
|
+
id: z.string().describe("Stable drive id. The drive is created with this id on first boot and is not re-created on later boots."),
|
|
6761
|
+
name: z.string().nullable().optional(),
|
|
6762
|
+
icon: z.string().nullable().optional(),
|
|
6763
|
+
app: z.string().optional().describe("Drive app (preferred editor) to open on the drive.")
|
|
6764
|
+
});
|
|
6765
|
+
const connectDefaultDriveSchema = z.union([connectDefaultDriveRemoteSchema, connectDefaultDriveLocalSchema]);
|
|
6766
|
+
/** `connect.drives.sections.{remote,local}`: three affirmative toggles. */
|
|
6767
|
+
const connectDriveSectionSchema = z.strictObject({
|
|
6768
|
+
enabled: z.boolean().optional().meta({
|
|
6769
|
+
description: "When false, the section is hidden in the sidebar.",
|
|
6770
|
+
default: true
|
|
6771
|
+
}),
|
|
6772
|
+
allowAdd: z.boolean().optional().meta({
|
|
6773
|
+
description: "When false, the section's 'add drive' affordance is hidden.",
|
|
6774
|
+
default: true
|
|
6775
|
+
}),
|
|
6776
|
+
allowDelete: z.boolean().optional().meta({
|
|
6777
|
+
description: "When false, drives in this section cannot be deleted from the UI.",
|
|
6778
|
+
default: true
|
|
6779
|
+
})
|
|
6780
|
+
}).describe("Visibility and add/delete affordances for a drive section in the sidebar.");
|
|
6781
|
+
const connectDriveSectionsSchema = z.strictObject({
|
|
6782
|
+
remote: connectDriveSectionSchema.optional(),
|
|
6783
|
+
local: connectDriveSectionSchema.optional()
|
|
6784
|
+
}).describe("Per-section visibility and affordance toggles. `remote` covers what was historically split into 'public' + 'cloud'; `local` is browser-local drives.");
|
|
6785
|
+
/** Mirrors DRIVES_PRESERVE_STRATEGIES (../clis/constants.ts, which imports
|
|
6786
|
+
* node: modules, so it is not imported here); a test pins the two. */
|
|
6787
|
+
const connectDrivePreserveStrategySchema = z.enum(["preserve-all", "preserve-by-url-and-detach"]);
|
|
6788
|
+
const connectDrivesSchema = z.strictObject({
|
|
6789
|
+
allowAddDrive: z.boolean().optional().meta({
|
|
6790
|
+
description: "When false, the SPA hides the 'add drive' affordance entirely (top-level). Per-section overrides live in `sections.{remote,local}.allowAdd`.",
|
|
6791
|
+
default: true
|
|
6792
|
+
}),
|
|
6793
|
+
defaultDrives: z.array(connectDefaultDriveSchema).optional().meta({
|
|
6794
|
+
description: "Drives the SPA auto-connects to on first load. Each entry is either a remote drive (a URL, with optional name/icon overrides) or a local drive (created locally on first boot, with a stable id and optional name/icon/app).",
|
|
6795
|
+
default: []
|
|
6796
|
+
}),
|
|
6797
|
+
preserveStrategy: connectDrivePreserveStrategySchema.optional().describe("Strategy applied when defaultDrives change between deploys. 'preserve-all' keeps user-added drives untouched; 'preserve-by-url-and-detach' detaches removed default drives. No schema default — opt-in only."),
|
|
6798
|
+
sections: connectDriveSectionsSchema.optional(),
|
|
6799
|
+
icons: connectExplorerIconsSchema.nullable().optional().describe(EXPLORER_ICONS_DESCRIPTION)
|
|
6800
|
+
}).describe("Default-drive and add-drive UI behaviour.");
|
|
6801
|
+
const connectRenownRainbowAdapterSchema = z.strictObject({
|
|
6802
|
+
walletConnectProjectId: z.string().optional().describe("WalletConnect project id; required for this adapter to function."),
|
|
6803
|
+
infuraProjectId: z.string().optional().describe("Optional Infura project id used to build RPC transports.")
|
|
6804
|
+
}).describe("wagmi + RainbowKit external-wallet adapter config.");
|
|
6805
|
+
const connectRenownPrivyAdapterSchema = z.strictObject({
|
|
6806
|
+
appId: z.string().optional().describe("Privy application id; required for this adapter to function."),
|
|
6807
|
+
clientId: z.string().optional().describe("Optional Privy client id."),
|
|
6808
|
+
methods: z.array(z.string()).optional().describe("Login methods this adapter offers; default per adapter when omitted.")
|
|
6809
|
+
}).describe("Privy embedded/social adapter config.");
|
|
6810
|
+
const connectRenownAdaptersSchema = z.strictObject({
|
|
6811
|
+
rainbow: connectRenownRainbowAdapterSchema.optional(),
|
|
6812
|
+
privy: connectRenownPrivyAdapterSchema.optional()
|
|
6813
|
+
}).describe("Per-adapter wallet config for in-page auth. Presence of an adapter key enables it; omit or leave empty for redirect-only behaviour.");
|
|
6814
|
+
const connectRenownSchema = z.strictObject({
|
|
6815
|
+
url: z.string().optional().meta({
|
|
6816
|
+
description: "Renown auth service URL.",
|
|
6817
|
+
default: "https://www.renown.id"
|
|
6818
|
+
}),
|
|
6819
|
+
networkId: z.string().optional().meta({
|
|
6820
|
+
description: "CAIP-2 network namespace (e.g. 'eip155').",
|
|
6821
|
+
default: "eip155"
|
|
6822
|
+
}),
|
|
6823
|
+
chainId: z.number().optional().meta({
|
|
6824
|
+
description: "CAIP-2 chain reference within the network namespace.",
|
|
6825
|
+
default: 1
|
|
6826
|
+
}),
|
|
6827
|
+
namespace: z.string().optional().describe("Renown localStorage namespace; share it across Connects to share login."),
|
|
6828
|
+
switchboardUrl: z.string().optional().describe("Switchboard GraphQL URL. When set, Connect enables in-page (no-redirect) Renown sign-in; otherwise it falls back to the redirect flow via `url`."),
|
|
6829
|
+
adapters: connectRenownAdaptersSchema.optional()
|
|
6830
|
+
}).describe("Renown identity / authentication coordinates.");
|
|
6831
|
+
const connectSentrySchema = z.strictObject({
|
|
6832
|
+
dsn: z.string().nullable().optional().meta({
|
|
6833
|
+
description: "Sentry DSN URL. `null` disables Sentry entirely; the SPA never loads the Sentry SDK chunk.",
|
|
6834
|
+
default: null
|
|
6835
|
+
}),
|
|
6836
|
+
env: z.string().optional().meta({
|
|
6837
|
+
description: "Sentry environment label, surfaced as the `environment` tag on every event.",
|
|
6838
|
+
default: "dev"
|
|
6839
|
+
}),
|
|
6840
|
+
tracing: z.boolean().optional().meta({
|
|
6841
|
+
description: "Enable Sentry performance tracing.",
|
|
6842
|
+
default: false
|
|
6843
|
+
})
|
|
6844
|
+
}).describe("Sentry error-tracking coordinates. Set `dsn` to enable Sentry; leave `dsn` null to disable. The Sentry release tag stays build-time (stamped via Vite's `define` from WORKSPACE_VERSION) so it always matches the sourcemaps uploaded by CI.");
|
|
6845
|
+
const connectOpenPanelSchema = z.strictObject({
|
|
6846
|
+
clientId: z.string().optional().meta({
|
|
6847
|
+
description: "OpenPanel client id. Empty string disables OpenPanel entirely.",
|
|
6848
|
+
default: ""
|
|
6849
|
+
}),
|
|
6850
|
+
apiUrl: z.string().optional().describe("OpenPanel API URL for self-hosted instances (e.g. 'https://openpanel.example/api'). Omit to use OpenPanel's hosted API."),
|
|
6851
|
+
trackUiEvents: z.boolean().optional().meta({
|
|
6852
|
+
description: "Track UI events.",
|
|
6853
|
+
default: true
|
|
6854
|
+
}),
|
|
6855
|
+
trackOperations: z.boolean().optional().meta({
|
|
6856
|
+
description: "Track document operations.",
|
|
6857
|
+
default: true
|
|
6858
|
+
})
|
|
6859
|
+
}).describe("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.");
|
|
6860
|
+
/** Which reactor client Connect runs (see PHReactorClientMode). */
|
|
6861
|
+
const connectReactorClientModeSchema = z.enum([
|
|
6862
|
+
"in-process",
|
|
6863
|
+
"worker",
|
|
6864
|
+
"remote",
|
|
6865
|
+
"router"
|
|
6866
|
+
]);
|
|
6867
|
+
const connectInstanceSchema = z.strictObject({
|
|
6868
|
+
namespace: z.string().nullable().meta({
|
|
6869
|
+
description: "Explicit storage/SharedWorker namespace for this instance. `null` derives it from the base path (and, later, the configured endpoint), so root deployments stay byte-identical.",
|
|
6870
|
+
default: null
|
|
6871
|
+
}),
|
|
6872
|
+
reactorWorker: z.boolean().meta({
|
|
6873
|
+
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.",
|
|
6874
|
+
default: false
|
|
6875
|
+
}),
|
|
6876
|
+
multiReactor: z.boolean().optional().meta({
|
|
6877
|
+
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.",
|
|
6878
|
+
default: false
|
|
6879
|
+
})
|
|
6880
|
+
}).describe("Per-instance identity. Lets one origin host multiple isolated Connect instances, each with its own storage + SharedWorker namespace.");
|
|
6881
|
+
const connectReactorFeatureFlagsSchema = z.strictObject({
|
|
6882
|
+
documentDecisions: z.boolean().optional().meta({
|
|
6883
|
+
description: "Decide writes from the document stream rather than the document meta cache, so a backdated deletion denies the operations that sort after it.",
|
|
6884
|
+
default: false
|
|
6885
|
+
}),
|
|
6886
|
+
authEnforcement: z.boolean().optional().meta({
|
|
6887
|
+
description: "Enforce the auth scope's policy at admission, replay, and read. Requires documentDecisions.",
|
|
6888
|
+
default: false
|
|
6889
|
+
}),
|
|
6890
|
+
authGroups: z.boolean().optional().meta({
|
|
6891
|
+
description: "Let `{ group }` principals match against the rosters of the group documents a policy names. Requires authEnforcement.",
|
|
6892
|
+
default: false
|
|
6893
|
+
}),
|
|
6894
|
+
authConditions: z.boolean().optional().meta({
|
|
6895
|
+
description: "Evaluate `where` and `match` conditions on grants. Requires authGroups. Do not enable on a fleet `preflight:auth` reports as crossing a reducer version.",
|
|
6896
|
+
default: false
|
|
6897
|
+
})
|
|
6898
|
+
}).describe("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.");
|
|
6899
|
+
const connectReactorSchema = z.strictObject({
|
|
6900
|
+
featureFlags: connectReactorFeatureFlagsSchema.optional(),
|
|
6901
|
+
createSignaturePolicy: z.enum(["legacy", "v2-required"]).optional().meta({
|
|
6902
|
+
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.",
|
|
6903
|
+
default: "v2-required"
|
|
6904
|
+
}),
|
|
6905
|
+
unsupportedStoredDocuments: z.enum(["refuse", "read-only"]).optional().meta({
|
|
6906
|
+
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.",
|
|
6907
|
+
default: "refuse"
|
|
6908
|
+
})
|
|
6909
|
+
}).describe("Settings for the reactor Connect runs in the browser, on the main thread or in the shared worker alike.");
|
|
6910
|
+
/** A runtime-caching / denylist URL match. A string is handed to Workbox
|
|
6911
|
+
* verbatim; `{ source, flags }` is rebuilt into a RegExp at build time. */
|
|
6912
|
+
const connectPwaUrlPatternSchema = z.union([z.string(), z.strictObject({
|
|
6913
|
+
source: z.string().describe("RegExp source."),
|
|
6914
|
+
flags: z.string().optional().describe("RegExp flags (e.g. 'i').")
|
|
6915
|
+
}).refine((p) => {
|
|
6916
|
+
try {
|
|
6917
|
+
new RegExp(p.source, p.flags);
|
|
6918
|
+
return true;
|
|
6919
|
+
} catch {
|
|
6920
|
+
return false;
|
|
6921
|
+
}
|
|
6922
|
+
}, { message: "source/flags do not compile to a valid RegExp" })]).describe("URL match. A string is matched verbatim by Workbox; { source, flags } is rebuilt into a RegExp at build time.");
|
|
6923
|
+
const connectPwaCacheStrategySchema = z.enum([
|
|
6924
|
+
"CacheFirst",
|
|
6925
|
+
"CacheOnly",
|
|
6926
|
+
"NetworkFirst",
|
|
6927
|
+
"NetworkOnly",
|
|
6928
|
+
"StaleWhileRevalidate"
|
|
6929
|
+
]);
|
|
6930
|
+
/** Serialisable subset of a Workbox `RuntimeCaching` rule. */
|
|
6931
|
+
const connectPwaRuntimeCachingSchema = z.strictObject({
|
|
6932
|
+
urlPattern: connectPwaUrlPatternSchema,
|
|
6933
|
+
handler: connectPwaCacheStrategySchema,
|
|
6934
|
+
method: z.enum([
|
|
6935
|
+
"GET",
|
|
6936
|
+
"POST",
|
|
6937
|
+
"PUT",
|
|
6938
|
+
"DELETE",
|
|
6939
|
+
"HEAD",
|
|
6940
|
+
"PATCH"
|
|
6941
|
+
]).optional(),
|
|
6942
|
+
options: z.strictObject({
|
|
6943
|
+
cacheName: z.string().optional(),
|
|
6944
|
+
networkTimeoutSeconds: z.number().optional().describe("Seconds a NetworkFirst rule waits for the network before falling back to the cache."),
|
|
6945
|
+
expiration: z.strictObject({
|
|
6946
|
+
maxEntries: z.number().optional(),
|
|
6947
|
+
maxAgeSeconds: z.number().optional()
|
|
6948
|
+
}).optional(),
|
|
6949
|
+
cacheableResponse: z.strictObject({
|
|
6950
|
+
statuses: z.array(z.number()).optional(),
|
|
6951
|
+
headers: z.record(z.string(), z.string()).optional()
|
|
6952
|
+
}).optional()
|
|
6953
|
+
}).optional()
|
|
6954
|
+
});
|
|
6955
|
+
const connectPwaIconSchema = z.strictObject({
|
|
6956
|
+
src: z.string(),
|
|
6957
|
+
sizes: z.string().optional(),
|
|
6958
|
+
type: z.string().optional(),
|
|
6959
|
+
purpose: z.string().optional()
|
|
6960
|
+
});
|
|
6961
|
+
/** A File Handling API entry. No `action`: every handler opens at Connect's
|
|
6962
|
+
* app root, because consuming launched files needs Connect's own code. */
|
|
6963
|
+
const connectPwaFileHandlerSchema = z.strictObject({
|
|
6964
|
+
accept: z.record(z.string(), z.array(z.string().regex(/^\./, "file extensions must start with '.'"))).describe("MIME type → file extensions. Each extension must start with '.'; browsers ignore entries without it."),
|
|
6965
|
+
icons: z.array(connectPwaIconSchema).optional().describe("OS-level file-type icons."),
|
|
6966
|
+
launch_type: z.enum(["single-client", "multiple-clients"]).optional()
|
|
6967
|
+
});
|
|
6968
|
+
/** Web-app-manifest fields a package or project may override. */
|
|
6969
|
+
const connectPwaManifestSchema = z.strictObject({
|
|
6970
|
+
name: z.string().optional(),
|
|
6971
|
+
short_name: z.string().optional(),
|
|
6972
|
+
description: z.string().optional(),
|
|
6973
|
+
theme_color: z.string().optional(),
|
|
6974
|
+
background_color: z.string().optional(),
|
|
6975
|
+
display: z.enum([
|
|
6976
|
+
"fullscreen",
|
|
6977
|
+
"standalone",
|
|
6978
|
+
"minimal-ui",
|
|
6979
|
+
"browser"
|
|
6980
|
+
]).optional(),
|
|
6981
|
+
start_url: z.string().optional(),
|
|
6982
|
+
scope: z.string().optional(),
|
|
6983
|
+
icons: z.array(connectPwaIconSchema).optional().describe("Icons appended to the built-in set and de-duplicated by (src, sizes, purpose)."),
|
|
6984
|
+
file_handlers: z.array(connectPwaFileHandlerSchema).optional().describe("File associations appended after Connect's built-in .phd/.phdm handler and de-duplicated on the whole entry. Entries only declare accepted types; there is no action field, because opening the files requires Connect's own runtime handling, so every handler opens at the app root."),
|
|
6985
|
+
launch_handler: z.strictObject({ client_mode: z.enum([
|
|
6986
|
+
"auto",
|
|
6987
|
+
"focus-existing",
|
|
6988
|
+
"navigate-existing",
|
|
6989
|
+
"navigate-new"
|
|
6990
|
+
]) }).optional().describe("How the OS launches the app for handled files/links. Connect defaults to focus-existing.")
|
|
6991
|
+
}).describe("Web-app-manifest field overrides.");
|
|
6992
|
+
const pwaShape = {
|
|
6993
|
+
globPatterns: z.array(z.string()).optional().describe("Extra Workbox precache globs, unioned with the built-ins."),
|
|
6994
|
+
globIgnores: z.array(z.string()).optional().describe("Extra precache ignore globs, unioned with the built-ins."),
|
|
6995
|
+
maximumFileSizeToCacheInBytes: z.number().optional().describe("Raise the precache file-size ceiling. The max across all contributors wins, so no contributor can shrink another's limit."),
|
|
6996
|
+
runtimeCaching: z.array(connectPwaRuntimeCachingSchema).optional().describe("Runtime-caching rules appended after the built-in rules. Workbox is first-match-wins, so these cannot override a built-in rule matching the same URL."),
|
|
6997
|
+
navigateFallbackDenylist: z.array(connectPwaUrlPatternSchema).optional().describe("Extra SPA navigate-fallback denylist patterns, unioned with the built-ins.")
|
|
6998
|
+
};
|
|
6999
|
+
const PWA_DESCRIPTION = "Progressive-web-app / service-worker overrides, layered on Connect's built-in PWA defaults at build time. Scalar fields deep-merge (this layer wins); the array members (icons, file_handlers, globs, runtimeCaching and denylist patterns) are additive; maximumFileSizeToCacheInBytes takes the max across contributors. (categories is not set here — it is derived from the manifest's category field.) Only applied when connect.app.offline is true.";
|
|
7000
|
+
/** `connect.pwa` as authored. */
|
|
7001
|
+
const connectPwaSchema = z.strictObject({
|
|
7002
|
+
manifest: connectPwaManifestSchema.optional(),
|
|
7003
|
+
...pwaShape
|
|
7004
|
+
}).describe(PWA_DESCRIPTION);
|
|
7005
|
+
/**
|
|
7006
|
+
* The `connect` block as authored: powerhouse.config.json's `connect`, the
|
|
7007
|
+
* connect host's `config`, and `ph connect config` writes. Every field is
|
|
7008
|
+
* optional; omit the section entirely for default behaviour.
|
|
7009
|
+
*/
|
|
7010
|
+
const connectConfigSchema = z.strictObject({
|
|
7011
|
+
branding: connectBrandingSchema.optional(),
|
|
7012
|
+
home: connectHomeSchema.optional(),
|
|
7013
|
+
app: connectAppSchema.optional(),
|
|
7014
|
+
ai: connectAiSchema.optional(),
|
|
7015
|
+
packages: connectPackagesSchema.optional(),
|
|
7016
|
+
drives: connectDrivesSchema.optional(),
|
|
7017
|
+
renown: connectRenownSchema.optional(),
|
|
7018
|
+
sentry: connectSentrySchema.optional(),
|
|
7019
|
+
openPanel: connectOpenPanelSchema.optional(),
|
|
7020
|
+
instance: connectInstanceSchema.optional(),
|
|
7021
|
+
reactor: connectReactorSchema.optional(),
|
|
7022
|
+
pwa: connectPwaSchema.optional()
|
|
7023
|
+
}).describe("Connect-specific UI customisations. All fields optional; omit the section entirely for default behaviour.");
|
|
7024
|
+
/** One entry of the host.js composition, projected into the served config as
|
|
7025
|
+
* data (module specifier + validated config). */
|
|
7026
|
+
const connectCompositionEntrySchema = z.strictObject({
|
|
7027
|
+
module: z.string(),
|
|
7028
|
+
config: z.record(z.string(), z.unknown()).optional()
|
|
7029
|
+
});
|
|
7030
|
+
/** `instance` plus `reactorClient`, derived from the host's reactor backends. */
|
|
7031
|
+
const connectRuntimeInstanceSchema = connectInstanceSchema.extend({ reactorClient: connectReactorClientModeSchema.optional() });
|
|
7032
|
+
/** The manifest plus `categories`, derived from contributors' `category`. */
|
|
7033
|
+
const connectRuntimePwaManifestSchema = connectPwaManifestSchema.extend({ categories: z.array(z.string()).optional() });
|
|
7034
|
+
const connectRuntimePwaSchema = connectPwaSchema.extend({ manifest: connectRuntimePwaManifestSchema.optional() });
|
|
7035
|
+
connectConfigSchema.extend({
|
|
7036
|
+
composition: z.array(connectCompositionEntrySchema).optional(),
|
|
7037
|
+
instance: connectRuntimeInstanceSchema.optional(),
|
|
7038
|
+
pwa: connectRuntimePwaSchema.optional()
|
|
7039
|
+
});
|
|
7040
|
+
//#endregion
|
|
6368
7041
|
//#region connect/schema-fragments.ts
|
|
6369
7042
|
const powerhousePackageSchema = {
|
|
6370
7043
|
type: "object",
|
|
@@ -6395,510 +7068,17 @@ const powerhousePackageSchema = {
|
|
|
6395
7068
|
}
|
|
6396
7069
|
}
|
|
6397
7070
|
};
|
|
6398
|
-
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
type: "boolean",
|
|
6410
|
-
description: "When false, the section's 'add drive' affordance is hidden.",
|
|
6411
|
-
default: true
|
|
6412
|
-
},
|
|
6413
|
-
allowDelete: {
|
|
6414
|
-
type: "boolean",
|
|
6415
|
-
description: "When false, drives in this section cannot be deleted from the UI.",
|
|
6416
|
-
default: true
|
|
6417
|
-
}
|
|
6418
|
-
}
|
|
6419
|
-
};
|
|
6420
|
-
const pwaUrlPatternSchema = {
|
|
6421
|
-
description: "URL match. A string is matched verbatim by Workbox; { source, flags } is rebuilt into a RegExp at build time.",
|
|
6422
|
-
oneOf: [{ type: "string" }, {
|
|
6423
|
-
type: "object",
|
|
6424
|
-
additionalProperties: false,
|
|
6425
|
-
required: ["source"],
|
|
6426
|
-
properties: {
|
|
6427
|
-
source: {
|
|
6428
|
-
type: "string",
|
|
6429
|
-
description: "RegExp source."
|
|
6430
|
-
},
|
|
6431
|
-
flags: {
|
|
6432
|
-
type: "string",
|
|
6433
|
-
description: "RegExp flags (e.g. 'i')."
|
|
6434
|
-
}
|
|
6435
|
-
}
|
|
6436
|
-
}]
|
|
6437
|
-
};
|
|
6438
|
-
const pwaIconSchema = {
|
|
6439
|
-
type: "object",
|
|
6440
|
-
additionalProperties: false,
|
|
6441
|
-
required: ["src"],
|
|
6442
|
-
properties: {
|
|
6443
|
-
src: { type: "string" },
|
|
6444
|
-
sizes: { type: "string" },
|
|
6445
|
-
type: { type: "string" },
|
|
6446
|
-
purpose: { type: "string" }
|
|
6447
|
-
}
|
|
6448
|
-
};
|
|
6449
|
-
const phConnectRuntimeConfigSchema = {
|
|
6450
|
-
type: "object",
|
|
6451
|
-
additionalProperties: false,
|
|
6452
|
-
description: "Connect-specific UI customisations. All fields optional; omit the section entirely for default behaviour.",
|
|
6453
|
-
properties: {
|
|
6454
|
-
branding: {
|
|
6455
|
-
type: "object",
|
|
6456
|
-
additionalProperties: false,
|
|
6457
|
-
description: "App identity and visual branding.",
|
|
6458
|
-
properties: {
|
|
6459
|
-
appName: {
|
|
6460
|
-
type: "string",
|
|
6461
|
-
description: "Browser tab title and any in-app brand text. Defaults to 'Powerhouse Connect'."
|
|
6462
|
-
},
|
|
6463
|
-
homeBackground: {
|
|
6464
|
-
type: ["string", "null"],
|
|
6465
|
-
description: "Hero image on the empty home screen. URL or path to override; null or omitted uses the bundled default image."
|
|
6466
|
-
}
|
|
6467
|
-
}
|
|
6468
|
-
},
|
|
6469
|
-
app: {
|
|
6470
|
-
type: "object",
|
|
6471
|
-
additionalProperties: false,
|
|
6472
|
-
description: "Top-level Connect application behaviour.",
|
|
6473
|
-
properties: {
|
|
6474
|
-
logLevel: {
|
|
6475
|
-
type: "string",
|
|
6476
|
-
enum: [
|
|
6477
|
-
"debug",
|
|
6478
|
-
"info",
|
|
6479
|
-
"warn",
|
|
6480
|
-
"error"
|
|
6481
|
-
],
|
|
6482
|
-
description: "Log level applied by Connect's logger at boot. Affects browser-side output only.",
|
|
6483
|
-
default: "info"
|
|
6484
|
-
},
|
|
6485
|
-
basePath: {
|
|
6486
|
-
type: "string",
|
|
6487
|
-
description: "Base path Connect is mounted under (e.g. '/connect' for subpath deploys). Normalised at runtime to start and end with '/'. Defaults to the build-time BASE_URL.",
|
|
6488
|
-
default: "/"
|
|
6489
|
-
},
|
|
6490
|
-
offline: {
|
|
6491
|
-
type: "boolean",
|
|
6492
|
-
description: "When true (default), the build emits a precaching service worker so Connect's app shell works offline, and the SPA registers it at boot. Set false to opt this deployment out: no service worker is built, the SPA skips registration, and any previously-installed worker is unregistered.",
|
|
6493
|
-
default: true
|
|
6494
|
-
},
|
|
6495
|
-
studioMode: {
|
|
6496
|
-
type: "boolean",
|
|
6497
|
-
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.",
|
|
6498
|
-
default: false
|
|
6499
|
-
}
|
|
6500
|
-
}
|
|
6501
|
-
},
|
|
6502
|
-
ai: {
|
|
6503
|
-
type: "object",
|
|
6504
|
-
additionalProperties: false,
|
|
6505
|
-
description: "AI assistant (chat) behaviour.",
|
|
6506
|
-
properties: { assistantEnabled: {
|
|
6507
|
-
type: "boolean",
|
|
6508
|
-
description: "When true, Connect mounts the in-browser AI assistant (bottom-right chat FAB that talks to a user-configured OpenAI-compatible endpoint and acts on the reactor). Disabled by default.",
|
|
6509
|
-
default: false
|
|
6510
|
-
} }
|
|
6511
|
-
},
|
|
6512
|
-
packages: {
|
|
6513
|
-
type: "object",
|
|
6514
|
-
additionalProperties: false,
|
|
6515
|
-
description: "Runtime behaviour for the Connect package manager (separate from top-level `packages[]`, which lists which packages to load).",
|
|
6516
|
-
properties: {
|
|
6517
|
-
externalEnabled: {
|
|
6518
|
-
type: "boolean",
|
|
6519
|
-
description: "When false, Connect refuses to load any package that wasn't bundled at build time. Affirmative replacement for the legacy PH_CONNECT_EXTERNAL_PACKAGES_DISABLED env var.",
|
|
6520
|
-
default: true
|
|
6521
|
-
},
|
|
6522
|
-
liveReload: {
|
|
6523
|
-
type: "boolean",
|
|
6524
|
-
description: "When true, Connect subscribes to the static-mode `/__packages` SSE channel so live publishes flow into the running tab without a page reload. Only works under hosting that serves this channel (e.g. ph-clint static mode).",
|
|
6525
|
-
default: false
|
|
6526
|
-
}
|
|
6527
|
-
}
|
|
6528
|
-
},
|
|
6529
|
-
drives: {
|
|
6530
|
-
type: "object",
|
|
6531
|
-
additionalProperties: false,
|
|
6532
|
-
description: "Default-drive and add-drive UI behaviour.",
|
|
6533
|
-
properties: {
|
|
6534
|
-
allowAddDrive: {
|
|
6535
|
-
type: "boolean",
|
|
6536
|
-
description: "When false, the SPA hides the 'add drive' affordance entirely (top-level). Per-section overrides live in `sections.{remote,local}.allowAdd`.",
|
|
6537
|
-
default: true
|
|
6538
|
-
},
|
|
6539
|
-
defaultDrives: {
|
|
6540
|
-
type: "array",
|
|
6541
|
-
description: "Drives the SPA auto-connects to on first load. Each entry is either a remote drive (a URL, with optional name/icon overrides) or a local drive (created locally on first boot, with a stable id and optional name/icon/app).",
|
|
6542
|
-
default: [],
|
|
6543
|
-
items: { oneOf: [{
|
|
6544
|
-
type: "object",
|
|
6545
|
-
additionalProperties: false,
|
|
6546
|
-
required: ["url"],
|
|
6547
|
-
properties: {
|
|
6548
|
-
url: { type: "string" },
|
|
6549
|
-
name: { type: ["string", "null"] },
|
|
6550
|
-
icon: { type: ["string", "null"] }
|
|
6551
|
-
}
|
|
6552
|
-
}, {
|
|
6553
|
-
type: "object",
|
|
6554
|
-
additionalProperties: false,
|
|
6555
|
-
required: ["local", "id"],
|
|
6556
|
-
properties: {
|
|
6557
|
-
local: {
|
|
6558
|
-
const: true,
|
|
6559
|
-
description: "Discriminator: this entry is a local drive created on first boot."
|
|
6560
|
-
},
|
|
6561
|
-
id: {
|
|
6562
|
-
type: "string",
|
|
6563
|
-
description: "Stable drive id. The drive is created with this id on first boot and is not re-created on later boots."
|
|
6564
|
-
},
|
|
6565
|
-
name: { type: ["string", "null"] },
|
|
6566
|
-
icon: { type: ["string", "null"] },
|
|
6567
|
-
app: {
|
|
6568
|
-
type: "string",
|
|
6569
|
-
description: "Drive app (preferred editor) to open on the drive."
|
|
6570
|
-
}
|
|
6571
|
-
}
|
|
6572
|
-
}] }
|
|
6573
|
-
},
|
|
6574
|
-
preserveStrategy: {
|
|
6575
|
-
type: "string",
|
|
6576
|
-
enum: ["preserve-all", "preserve-by-url-and-detach"],
|
|
6577
|
-
description: "Strategy applied when defaultDrives change between deploys. 'preserve-all' keeps user-added drives untouched; 'preserve-by-url-and-detach' detaches removed default drives. No schema default — opt-in only."
|
|
6578
|
-
},
|
|
6579
|
-
sections: {
|
|
6580
|
-
type: "object",
|
|
6581
|
-
additionalProperties: false,
|
|
6582
|
-
description: "Per-section visibility and affordance toggles. `remote` covers what was historically split into 'public' + 'cloud'; `local` is browser-local drives.",
|
|
6583
|
-
properties: {
|
|
6584
|
-
remote: driveSectionSchema,
|
|
6585
|
-
local: driveSectionSchema
|
|
6586
|
-
}
|
|
6587
|
-
}
|
|
6588
|
-
}
|
|
6589
|
-
},
|
|
6590
|
-
renown: {
|
|
6591
|
-
type: "object",
|
|
6592
|
-
additionalProperties: false,
|
|
6593
|
-
description: "Renown identity / authentication coordinates.",
|
|
6594
|
-
properties: {
|
|
6595
|
-
url: {
|
|
6596
|
-
type: "string",
|
|
6597
|
-
description: "Renown auth service URL.",
|
|
6598
|
-
default: "https://www.renown.id"
|
|
6599
|
-
},
|
|
6600
|
-
networkId: {
|
|
6601
|
-
type: "string",
|
|
6602
|
-
description: "CAIP-2 network namespace (e.g. 'eip155').",
|
|
6603
|
-
default: "eip155"
|
|
6604
|
-
},
|
|
6605
|
-
chainId: {
|
|
6606
|
-
type: "number",
|
|
6607
|
-
description: "CAIP-2 chain reference within the network namespace.",
|
|
6608
|
-
default: 1
|
|
6609
|
-
},
|
|
6610
|
-
namespace: {
|
|
6611
|
-
type: "string",
|
|
6612
|
-
description: "Renown localStorage namespace; share it across Connects to share login."
|
|
6613
|
-
},
|
|
6614
|
-
switchboardUrl: {
|
|
6615
|
-
type: "string",
|
|
6616
|
-
description: "Switchboard GraphQL URL. When set, Connect enables in-page (no-redirect) Renown sign-in; otherwise it falls back to the redirect flow via `url`."
|
|
6617
|
-
},
|
|
6618
|
-
adapters: {
|
|
6619
|
-
type: "object",
|
|
6620
|
-
additionalProperties: false,
|
|
6621
|
-
description: "Per-adapter wallet config for in-page auth. Presence of an adapter key enables it; omit or leave empty for redirect-only behaviour.",
|
|
6622
|
-
properties: {
|
|
6623
|
-
rainbow: {
|
|
6624
|
-
type: "object",
|
|
6625
|
-
additionalProperties: false,
|
|
6626
|
-
description: "wagmi + RainbowKit external-wallet adapter config.",
|
|
6627
|
-
properties: {
|
|
6628
|
-
walletConnectProjectId: {
|
|
6629
|
-
type: "string",
|
|
6630
|
-
description: "WalletConnect project id; required for this adapter to function."
|
|
6631
|
-
},
|
|
6632
|
-
infuraProjectId: {
|
|
6633
|
-
type: "string",
|
|
6634
|
-
description: "Optional Infura project id used to build RPC transports."
|
|
6635
|
-
}
|
|
6636
|
-
}
|
|
6637
|
-
},
|
|
6638
|
-
privy: {
|
|
6639
|
-
type: "object",
|
|
6640
|
-
additionalProperties: false,
|
|
6641
|
-
description: "Privy embedded/social adapter config.",
|
|
6642
|
-
properties: {
|
|
6643
|
-
appId: {
|
|
6644
|
-
type: "string",
|
|
6645
|
-
description: "Privy application id; required for this adapter to function."
|
|
6646
|
-
},
|
|
6647
|
-
clientId: {
|
|
6648
|
-
type: "string",
|
|
6649
|
-
description: "Optional Privy client id."
|
|
6650
|
-
},
|
|
6651
|
-
methods: {
|
|
6652
|
-
type: "array",
|
|
6653
|
-
description: "Login methods this adapter offers; default per adapter when omitted.",
|
|
6654
|
-
items: { type: "string" }
|
|
6655
|
-
}
|
|
6656
|
-
}
|
|
6657
|
-
}
|
|
6658
|
-
}
|
|
6659
|
-
}
|
|
6660
|
-
}
|
|
6661
|
-
},
|
|
6662
|
-
sentry: {
|
|
6663
|
-
type: "object",
|
|
6664
|
-
additionalProperties: false,
|
|
6665
|
-
description: "Sentry error-tracking coordinates. Set `dsn` to enable Sentry; leave `dsn` null to disable. The Sentry release tag stays build-time (stamped via Vite's `define` from WORKSPACE_VERSION) so it always matches the sourcemaps uploaded by CI.",
|
|
6666
|
-
properties: {
|
|
6667
|
-
dsn: {
|
|
6668
|
-
type: ["string", "null"],
|
|
6669
|
-
description: "Sentry DSN URL. `null` disables Sentry entirely; the SPA never loads the Sentry SDK chunk.",
|
|
6670
|
-
default: null
|
|
6671
|
-
},
|
|
6672
|
-
env: {
|
|
6673
|
-
type: "string",
|
|
6674
|
-
description: "Sentry environment label, surfaced as the `environment` tag on every event.",
|
|
6675
|
-
default: "dev"
|
|
6676
|
-
},
|
|
6677
|
-
tracing: {
|
|
6678
|
-
type: "boolean",
|
|
6679
|
-
description: "Enable Sentry performance tracing.",
|
|
6680
|
-
default: false
|
|
6681
|
-
}
|
|
6682
|
-
}
|
|
6683
|
-
},
|
|
6684
|
-
instance: {
|
|
6685
|
-
type: "object",
|
|
6686
|
-
additionalProperties: false,
|
|
6687
|
-
required: ["namespace", "reactorWorker"],
|
|
6688
|
-
description: "Per-instance identity. Lets one origin host multiple isolated Connect instances, each with its own storage + SharedWorker namespace.",
|
|
6689
|
-
properties: {
|
|
6690
|
-
namespace: {
|
|
6691
|
-
type: ["string", "null"],
|
|
6692
|
-
description: "Explicit storage/SharedWorker namespace for this instance. `null` derives it from the base path (and, later, the configured endpoint), so root deployments stay byte-identical.",
|
|
6693
|
-
default: null
|
|
6694
|
-
},
|
|
6695
|
-
reactorWorker: {
|
|
6696
|
-
type: "boolean",
|
|
6697
|
-
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.",
|
|
6698
|
-
default: false
|
|
6699
|
-
}
|
|
6700
|
-
}
|
|
6701
|
-
},
|
|
6702
|
-
reactor: {
|
|
6703
|
-
type: "object",
|
|
6704
|
-
additionalProperties: false,
|
|
6705
|
-
description: "Settings for the reactor Connect runs in the browser, on the main thread or in the shared worker alike.",
|
|
6706
|
-
properties: { featureFlags: {
|
|
6707
|
-
type: "object",
|
|
6708
|
-
additionalProperties: false,
|
|
6709
|
-
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.",
|
|
6710
|
-
properties: {
|
|
6711
|
-
documentDecisions: {
|
|
6712
|
-
type: "boolean",
|
|
6713
|
-
description: "Decide writes from the document stream rather than the document meta cache, so a backdated deletion denies the operations that sort after it.",
|
|
6714
|
-
default: false
|
|
6715
|
-
},
|
|
6716
|
-
authEnforcement: {
|
|
6717
|
-
type: "boolean",
|
|
6718
|
-
description: "Enforce the auth scope's policy at admission, replay, and read. Requires documentDecisions.",
|
|
6719
|
-
default: false
|
|
6720
|
-
},
|
|
6721
|
-
authGroups: {
|
|
6722
|
-
type: "boolean",
|
|
6723
|
-
description: "Let `{ group }` principals match against the rosters of the group documents a policy names. Requires authEnforcement.",
|
|
6724
|
-
default: false
|
|
6725
|
-
},
|
|
6726
|
-
authConditions: {
|
|
6727
|
-
type: "boolean",
|
|
6728
|
-
description: "Evaluate `where` and `match` conditions on grants. Requires authGroups. Do not enable on a fleet `preflight:auth` reports as crossing a reducer version.",
|
|
6729
|
-
default: false
|
|
6730
|
-
}
|
|
6731
|
-
}
|
|
6732
|
-
} }
|
|
6733
|
-
},
|
|
6734
|
-
pwa: {
|
|
6735
|
-
type: "object",
|
|
6736
|
-
additionalProperties: false,
|
|
6737
|
-
description: "Progressive-web-app / service-worker overrides, layered on Connect's built-in PWA defaults at build time. Scalar fields deep-merge (this layer wins); the array members (icons, file_handlers, globs, runtimeCaching and denylist patterns) are additive; maximumFileSizeToCacheInBytes takes the max across contributors. (categories is not set here — it is derived from the manifest's category field.) Only applied when connect.app.offline is true.",
|
|
6738
|
-
properties: {
|
|
6739
|
-
manifest: {
|
|
6740
|
-
type: "object",
|
|
6741
|
-
additionalProperties: false,
|
|
6742
|
-
description: "Web-app-manifest field overrides.",
|
|
6743
|
-
properties: {
|
|
6744
|
-
name: { type: "string" },
|
|
6745
|
-
short_name: { type: "string" },
|
|
6746
|
-
description: { type: "string" },
|
|
6747
|
-
theme_color: { type: "string" },
|
|
6748
|
-
background_color: { type: "string" },
|
|
6749
|
-
display: {
|
|
6750
|
-
type: "string",
|
|
6751
|
-
enum: [
|
|
6752
|
-
"fullscreen",
|
|
6753
|
-
"standalone",
|
|
6754
|
-
"minimal-ui",
|
|
6755
|
-
"browser"
|
|
6756
|
-
]
|
|
6757
|
-
},
|
|
6758
|
-
start_url: { type: "string" },
|
|
6759
|
-
scope: { type: "string" },
|
|
6760
|
-
icons: {
|
|
6761
|
-
type: "array",
|
|
6762
|
-
description: "Icons appended to the built-in set and de-duplicated by (src, sizes, purpose).",
|
|
6763
|
-
items: pwaIconSchema
|
|
6764
|
-
},
|
|
6765
|
-
file_handlers: {
|
|
6766
|
-
type: "array",
|
|
6767
|
-
description: "File associations appended after Connect's built-in .phd/.phdm handler and de-duplicated on the whole entry. Entries only declare accepted types; there is no action field, because opening the files requires Connect's own runtime handling, so every handler opens at the app root.",
|
|
6768
|
-
items: {
|
|
6769
|
-
type: "object",
|
|
6770
|
-
additionalProperties: false,
|
|
6771
|
-
required: ["accept"],
|
|
6772
|
-
properties: {
|
|
6773
|
-
accept: {
|
|
6774
|
-
type: "object",
|
|
6775
|
-
description: "MIME type → file extensions. Each extension must start with '.'; browsers ignore entries without it.",
|
|
6776
|
-
additionalProperties: {
|
|
6777
|
-
type: "array",
|
|
6778
|
-
items: {
|
|
6779
|
-
type: "string",
|
|
6780
|
-
pattern: "^\\."
|
|
6781
|
-
}
|
|
6782
|
-
}
|
|
6783
|
-
},
|
|
6784
|
-
icons: {
|
|
6785
|
-
type: "array",
|
|
6786
|
-
description: "OS-level file-type icons.",
|
|
6787
|
-
items: pwaIconSchema
|
|
6788
|
-
},
|
|
6789
|
-
launch_type: {
|
|
6790
|
-
type: "string",
|
|
6791
|
-
enum: ["single-client", "multiple-clients"]
|
|
6792
|
-
}
|
|
6793
|
-
}
|
|
6794
|
-
}
|
|
6795
|
-
},
|
|
6796
|
-
launch_handler: {
|
|
6797
|
-
type: "object",
|
|
6798
|
-
additionalProperties: false,
|
|
6799
|
-
required: ["client_mode"],
|
|
6800
|
-
description: "How the OS launches the app for handled files/links. Connect defaults to focus-existing.",
|
|
6801
|
-
properties: { client_mode: {
|
|
6802
|
-
type: "string",
|
|
6803
|
-
enum: [
|
|
6804
|
-
"auto",
|
|
6805
|
-
"focus-existing",
|
|
6806
|
-
"navigate-existing",
|
|
6807
|
-
"navigate-new"
|
|
6808
|
-
]
|
|
6809
|
-
} }
|
|
6810
|
-
}
|
|
6811
|
-
}
|
|
6812
|
-
},
|
|
6813
|
-
globPatterns: {
|
|
6814
|
-
type: "array",
|
|
6815
|
-
items: { type: "string" },
|
|
6816
|
-
description: "Extra Workbox precache globs, unioned with the built-ins."
|
|
6817
|
-
},
|
|
6818
|
-
globIgnores: {
|
|
6819
|
-
type: "array",
|
|
6820
|
-
items: { type: "string" },
|
|
6821
|
-
description: "Extra precache ignore globs, unioned with the built-ins."
|
|
6822
|
-
},
|
|
6823
|
-
maximumFileSizeToCacheInBytes: {
|
|
6824
|
-
type: "number",
|
|
6825
|
-
description: "Raise the precache file-size ceiling. The max across all contributors wins, so no contributor can shrink another's limit."
|
|
6826
|
-
},
|
|
6827
|
-
runtimeCaching: {
|
|
6828
|
-
type: "array",
|
|
6829
|
-
description: "Runtime-caching rules appended after the built-in rules. Workbox is first-match-wins, so these cannot override a built-in rule matching the same URL.",
|
|
6830
|
-
items: {
|
|
6831
|
-
type: "object",
|
|
6832
|
-
additionalProperties: false,
|
|
6833
|
-
required: ["urlPattern", "handler"],
|
|
6834
|
-
properties: {
|
|
6835
|
-
urlPattern: pwaUrlPatternSchema,
|
|
6836
|
-
handler: {
|
|
6837
|
-
type: "string",
|
|
6838
|
-
enum: [
|
|
6839
|
-
"CacheFirst",
|
|
6840
|
-
"CacheOnly",
|
|
6841
|
-
"NetworkFirst",
|
|
6842
|
-
"NetworkOnly",
|
|
6843
|
-
"StaleWhileRevalidate"
|
|
6844
|
-
]
|
|
6845
|
-
},
|
|
6846
|
-
method: {
|
|
6847
|
-
type: "string",
|
|
6848
|
-
enum: [
|
|
6849
|
-
"GET",
|
|
6850
|
-
"POST",
|
|
6851
|
-
"PUT",
|
|
6852
|
-
"DELETE",
|
|
6853
|
-
"HEAD",
|
|
6854
|
-
"PATCH"
|
|
6855
|
-
]
|
|
6856
|
-
},
|
|
6857
|
-
options: {
|
|
6858
|
-
type: "object",
|
|
6859
|
-
additionalProperties: false,
|
|
6860
|
-
properties: {
|
|
6861
|
-
cacheName: { type: "string" },
|
|
6862
|
-
networkTimeoutSeconds: {
|
|
6863
|
-
type: "number",
|
|
6864
|
-
description: "Seconds a NetworkFirst rule waits for the network before falling back to the cache."
|
|
6865
|
-
},
|
|
6866
|
-
expiration: {
|
|
6867
|
-
type: "object",
|
|
6868
|
-
additionalProperties: false,
|
|
6869
|
-
properties: {
|
|
6870
|
-
maxEntries: { type: "number" },
|
|
6871
|
-
maxAgeSeconds: { type: "number" }
|
|
6872
|
-
}
|
|
6873
|
-
},
|
|
6874
|
-
cacheableResponse: {
|
|
6875
|
-
type: "object",
|
|
6876
|
-
additionalProperties: false,
|
|
6877
|
-
properties: {
|
|
6878
|
-
statuses: {
|
|
6879
|
-
type: "array",
|
|
6880
|
-
items: { type: "number" }
|
|
6881
|
-
},
|
|
6882
|
-
headers: {
|
|
6883
|
-
type: "object",
|
|
6884
|
-
additionalProperties: { type: "string" }
|
|
6885
|
-
}
|
|
6886
|
-
}
|
|
6887
|
-
}
|
|
6888
|
-
}
|
|
6889
|
-
}
|
|
6890
|
-
}
|
|
6891
|
-
}
|
|
6892
|
-
},
|
|
6893
|
-
navigateFallbackDenylist: {
|
|
6894
|
-
type: "array",
|
|
6895
|
-
description: "Extra SPA navigate-fallback denylist patterns, unioned with the built-ins.",
|
|
6896
|
-
items: pwaUrlPatternSchema
|
|
6897
|
-
}
|
|
6898
|
-
}
|
|
6899
|
-
}
|
|
6900
|
-
}
|
|
6901
|
-
};
|
|
7071
|
+
/** Emits a zod schema as a draft-07 fragment: input shape, no `$schema`. */
|
|
7072
|
+
function emitJsonSchemaFragment(schema) {
|
|
7073
|
+
const { $schema: _, ...fragment } = toJSONSchema(schema, {
|
|
7074
|
+
target: "draft-7",
|
|
7075
|
+
io: "input",
|
|
7076
|
+
unrepresentable: "throw"
|
|
7077
|
+
});
|
|
7078
|
+
return fragment;
|
|
7079
|
+
}
|
|
7080
|
+
/** The authored `connect` block, as validated by Ajv. */
|
|
7081
|
+
const phConnectRuntimeConfigSchema = /* @__PURE__ */ emitJsonSchemaFragment(connectConfigSchema);
|
|
6902
7082
|
//#endregion
|
|
6903
7083
|
//#region clis/source-config-schema.ts
|
|
6904
7084
|
const SOURCE_CONFIG_SCHEMA_ID = "https://powerhouse.inc/schemas/powerhouse.source.json";
|
|
@@ -7103,6 +7283,24 @@ const sourceConfigSchema = {
|
|
|
7103
7283
|
}
|
|
7104
7284
|
}
|
|
7105
7285
|
},
|
|
7286
|
+
assistant: {
|
|
7287
|
+
type: "object",
|
|
7288
|
+
additionalProperties: false,
|
|
7289
|
+
description: "The project's agent host (hosts/assistant): a headless Mastra agent API on the project switchboard.",
|
|
7290
|
+
properties: { port: {
|
|
7291
|
+
type: "integer",
|
|
7292
|
+
description: "Port the assistant host's chat-completions API listens on. Read by hosts/assistant/host.js (default 4910)."
|
|
7293
|
+
} }
|
|
7294
|
+
},
|
|
7295
|
+
workflows: {
|
|
7296
|
+
type: "object",
|
|
7297
|
+
additionalProperties: false,
|
|
7298
|
+
description: "Powerhouse workflows on this reactor.",
|
|
7299
|
+
properties: { enabled: {
|
|
7300
|
+
type: "boolean",
|
|
7301
|
+
description: "Register the workflow document models and run workflows, on the reactor and in Connect. PH_WORKFLOWS_ENABLED overrides it for the reactor, and connect.app.workflowsEnabled for Connect."
|
|
7302
|
+
} }
|
|
7303
|
+
},
|
|
7106
7304
|
packageRegistryUrl: {
|
|
7107
7305
|
type: "string",
|
|
7108
7306
|
description: "Project-wide package registry endpoint. Used by `ph install` / `ph publish` / `ph registry-login` and Switchboard, and copied verbatim into the runtime config so the Connect SPA's Package Manager UI reads the same registry."
|
|
@@ -7144,6 +7342,6 @@ function assertNodeVersion(nodeVersion = process.versions.node) {
|
|
|
7144
7342
|
if (lt(nodeVersion, "24.0.0")) throw new NodeVersionError(nodeVersion, MINIMUM_NODE_VERSION);
|
|
7145
7343
|
}
|
|
7146
7344
|
//#endregion
|
|
7147
|
-
export { AGENTS, ANALYTICS_ENGINE_CORE_PACKAGE, BOILERPLATE_ALLOWED_BUILDS, BOILERPLATE_DEPENDENCY_OVERRIDES, DEFAULT_CONFIG, DEFAULT_CONNECT_OUTDIR, DEFAULT_CONNECT_PREVIEW_PORT, DEFAULT_CONNECT_STUDIO_PORT, DEFAULT_EXPIRY_DAYS, DEFAULT_EXPIRY_SECONDS, DEFAULT_REGISTRY_LOGIN_EXPIRY, DEFAULT_REGISTRY_URL, DEFAULT_RENOWN_URL, DEFAULT_SWITCHBOARD_PORT, DEFAULT_TIMEOUT, DEFAULT_VETRA_CONNECT_PORT, DEFAULT_VETRA_DRIVE_ID, DRIVES_PRESERVE_STRATEGIES, FEATURE_DEPENDENCIES, GRAPHQL_PACKAGE, GRAPHQL_TAG_PACKAGE, HOME_DIR, LEGACY_LINT_FORMAT_DEPENDENCIES, LEGACY_LINT_FORMAT_FILES, LOG_LEVELS, MINIMUM_NODE_VERSION, NodeVersionError, PEER_EXTERNAL_DEPENDENCIES, PH_BIN, PH_GLOBAL_DIR_NAME, PH_GLOBAL_PROJECT_NAME, POWERHOUSE_CONFIG_FILE, POWERHOUSE_GLOBAL_DIR, PROJECT_PORT_BAND_SIZE, PROJECT_PORT_BAND_STUDIO, PROJECT_PORT_BAND_SWITCHBOARD, PROJECT_PORT_BAND_VETRA_CONNECT, REACTOR_API_PACKAGE, SECONDS_IN_DAY, SERVICE_ACTIONS, SOURCE_CONFIG_SCHEMA_ID, VERSIONED_DEPENDENCIES, VERSIONED_DEV_DEPENDENCIES, VERSIONED_PEER_DEPENDENCIES, accessTokenArgs, assertNodeVersion, buildArgs, commonArgs, commonServerArgs, connectArgs, connectBasePath, connectBuildArgs, connectConfigArgs, connectPreviewArgs, connectStudioArgs, debugArgs, defaultDrivesUrl, defaultManifest, directoryExists, directoryExistsSync, disableLocalPackages, drivesPreserveStrategy, externalDependencies, externalDevDependencies, fetchNpmVersionFromRegistryForTag, fetchPackageVersionFromNpmRegistry, fileExists, fileExistsSync, force, generateArgs, getConfig, getGlobalPowerhouseProjectDirPath, getLocalPowerhouseProjectDirPath, getPackageManagerAtPowerhouseProjectDirPath, getPackageManagerCommand, getPackageNameFromPackageJson, getPackageVersionFromPackageJson, getPhCliVersionInfo, getPhCmdVersionInfo, getPowerhouseProjectInfo, getPowerhouseProjectInstallCommand, getPowerhouseProjectUninstallCommand, getTagFromVersion, getTelemetryStatus, handleMutuallyExclusiveOptions, https, httpsCertFile, httpsKeyFile, initArgs, initCliTelemetry, injectPnpmAllowBuilds, inspectArgs, installArgs, isDirectory, isFile, isPowerhouseProject, listArgs, localPackage, logLevel, logVersionUpdate, loginArgs, makeDependenciesWithVersions, makeVersionedDependencies, makeVersionedDependenciesMap, migrateArgs, packageJsonExports, packageManagerArgs, packageScripts, packages, parsePackageManager, parsePackageVersion, parseTag, phCliCommandNames, phCliHelpCommands, publishArgs, registryLoginArgs, renownNamespace, renownSwitchboardUrl, resolveConnectPortDefault, resolveSwitchboardPortDefault, resolveTelemetryConsent, runCmd, runUseLocal, serviceArgs, setTelemetryConsent, sourceConfigSchema, spawnAsync, switchboardArgs, uninstallArgs, unpublishArgs, vetraArgs, vetraSwitchboardArgs, writeFileEnsuringDir };
|
|
7345
|
+
export { AGENTS, ANALYTICS_ENGINE_CORE_PACKAGE, BOILERPLATE_ALLOWED_BUILDS, BOILERPLATE_DEPENDENCY_OVERRIDES, DEFAULT_CONFIG, DEFAULT_CONNECT_OUTDIR, DEFAULT_CONNECT_PREVIEW_PORT, DEFAULT_CONNECT_STUDIO_PORT, DEFAULT_DRIVE_ICON, DEFAULT_EXPIRY_DAYS, DEFAULT_EXPIRY_SECONDS, DEFAULT_REGISTRY_LOGIN_EXPIRY, DEFAULT_REGISTRY_URL, DEFAULT_RENOWN_URL, DEFAULT_SWITCHBOARD_PORT, DEFAULT_TIMEOUT, DEFAULT_VETRA_CONNECT_PORT, DEFAULT_VETRA_DRIVE_ID, DRIVES_PRESERVE_STRATEGIES, FEATURE_DEPENDENCIES, GRAPHQL_PACKAGE, GRAPHQL_TAG_PACKAGE, HOME_DIR, LEGACY_LINT_FORMAT_DEPENDENCIES, LEGACY_LINT_FORMAT_FILES, LOG_LEVELS, MINIMUM_NODE_VERSION, NodeVersionError, PEER_EXTERNAL_DEPENDENCIES, PH_BIN, PH_GLOBAL_DIR_NAME, PH_GLOBAL_PROJECT_NAME, PIECES_FRAMEWORK_PACKAGE, POWERHOUSE_CONFIG_FILE, POWERHOUSE_GLOBAL_DIR, PROJECT_PORT_BAND_SIZE, PROJECT_PORT_BAND_STUDIO, PROJECT_PORT_BAND_SWITCHBOARD, PROJECT_PORT_BAND_VETRA_CONNECT, REACTOR_API_PACKAGE, SECONDS_IN_DAY, SERVICE_ACTIONS, SOURCE_CONFIG_SCHEMA_ID, VERSIONED_DEPENDENCIES, VERSIONED_DEV_DEPENDENCIES, VERSIONED_PEER_DEPENDENCIES, accessTokenArgs, assertNodeVersion, buildArgs, buildPnpmLink, commonArgs, commonServerArgs, connectArgs, connectBasePath, connectBuildArgs, connectConfigArgs, connectPreviewArgs, connectStudioArgs, debugArgs, defaultDrivesUrl, defaultManifest, defaultStoreDirs, directoryExists, directoryExistsSync, disableLocalPackages, drivesPreserveStrategy, externalDependencies, externalDevDependencies, fetchNpmVersionFromRegistryForTag, fetchPackageVersionFromNpmRegistry, fileExists, fileExistsSync, force, generateArgs, getConfig, getGlobalPowerhouseProjectDirPath, getLocalPowerhouseProjectDirPath, getPackageManagerAtPowerhouseProjectDirPath, getPackageManagerCommand, getPackageNameFromPackageJson, getPackageVersionFromPackageJson, getPhCliVersionInfo, getPhCmdVersionInfo, getPowerhouseProjectInfo, getPowerhouseProjectInstallCommand, getPowerhouseProjectUninstallCommand, getTagFromVersion, getTelemetryStatus, handleMutuallyExclusiveOptions, https, httpsCertFile, httpsKeyFile, initArgs, initCliTelemetry, injectPnpmAllowBuilds, inspectArgs, installArgs, isDirectory, isFile, isPowerhouseProject, listArgs, localPackage, logLevel, logVersionUpdate, loginArgs, lowestVersion, makeDependenciesWithVersions, makeVersionedDependencies, makeVersionedDependenciesMap, migrateArgs, packageJsonExports, packageManagerArgs, packageScripts, packages, parsePackageManager, parsePackageVersion, parseTag, phCliCommandNames, phCliHelpCommands, publishArgs, registryLoginArgs, renownNamespace, renownSwitchboardUrl, resolveConnectPortDefault, resolvePhDir, resolveSwitchboardPortDefault, resolveTelemetryConsent, runCmd, runUseLocal, serviceArgs, setTelemetryConsent, sourceConfigSchema, spawnAsync, switchboardArgs, uninstallArgs, unpublishArgs, vetraArgs, vetraSwitchboardArgs, writeFileEnsuringDir };
|
|
7148
7346
|
|
|
7149
7347
|
//# sourceMappingURL=index.mjs.map
|