@powerhousedao/shared 6.2.3-dev.6 → 6.2.3-dev.60
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-BG3HkYBk.mjs} +8 -3
- package/dist/clis/args/connect-BG3HkYBk.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-BfAqpYvC.mjs} +43 -16
- package/dist/clis/args/help-BfAqpYvC.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-CYp5t1xU.mjs +28 -0
- package/dist/clis/args/run-CYp5t1xU.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-CHjY5epu.d.mts +27 -0
- package/dist/clis/args/service-CHjY5epu.d.mts.map +1 -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.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-HbYUSZS1.mjs +252 -0
- package/dist/clis/build-config-HbYUSZS1.mjs.map +1 -0
- package/dist/clis/build-config.d.mts +52 -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 +43 -12
- 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-6CZwrmQi.d.mts +11154 -0
- package/dist/clis/index-6CZwrmQi.d.mts.map +1 -0
- package/dist/clis/index.d.mts +1448 -1225
- package/dist/clis/index.d.mts.map +1 -1
- package/dist/clis/index.mjs +665 -352
- package/dist/clis/index.mjs.map +1 -1
- 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/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-DvsXtkR2.d.mts +582 -0
- package/dist/clis/types-DvsXtkR2.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-DBJolZd0.js} +43 -9
- package/dist/config-loader-DBJolZd0.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/index.d.ts +203 -57
- package/dist/connect/index.d.ts.map +1 -1
- package/dist/connect/index.js +318 -31
- 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/constants-DVJon33y.d.ts +9 -0
- package/dist/constants-DVJon33y.d.ts.map +1 -0
- package/dist/constants.d.ts +3 -2
- package/dist/constants.js +14 -5
- package/dist/constants.js.map +1 -1
- package/dist/document-drive/index.d.ts +131 -105
- package/dist/document-drive/index.d.ts.map +1 -1
- package/dist/document-drive/index.js +116 -54
- 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 +296 -390
- 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/index-bx0vYtFw.d.ts +36 -0
- package/dist/index-bx0vYtFw.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 +24 -6
- 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/{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-CfU91XFU.d.ts} +39 -43
- package/dist/types-CfU91XFU.d.ts.map +1 -0
- package/dist/{types-CpnWmiFY.d.ts → types-DzleLgA8.d.ts} +2038 -822
- package/dist/types-DzleLgA8.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 +15 -6
- 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-Dsf1vpHV.d.mts +0 -183
- package/dist/clis/args/common-Dsf1vpHV.d.mts.map +0 -1
- package/dist/clis/args/connect-BVVvCmL9.mjs.map +0 -1
- package/dist/clis/args/connect-DetTnI8g.d.mts +0 -443
- package/dist/clis/args/connect-DetTnI8g.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-DLQ6lhLl.d.mts +0 -113
- package/dist/clis/args/vetra-DLQ6lhLl.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
|
@@ -3,20 +3,20 @@ import { array, boolean, command, flag, multioption, number, oneOf, option, opti
|
|
|
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
21
|
import lt from "semver/functions/lt.js";
|
|
22
22
|
//#region \0rolldown/runtime.js
|
|
@@ -26,7 +26,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
26
26
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
27
27
|
var __getProtoOf = Object.getPrototypeOf;
|
|
28
28
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
29
|
-
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
29
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
30
30
|
var __copyProps = (to, from, except, desc) => {
|
|
31
31
|
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
32
32
|
key = keys[i];
|
|
@@ -37,11 +37,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
37
37
|
}
|
|
38
38
|
return to;
|
|
39
39
|
};
|
|
40
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
40
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
41
41
|
value: mod,
|
|
42
42
|
enumerable: true
|
|
43
43
|
}) : target, mod));
|
|
44
|
-
var __require = /*
|
|
44
|
+
var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
45
45
|
//#endregion
|
|
46
46
|
//#region clis/constants.ts
|
|
47
47
|
const SERVICE_ACTIONS = [
|
|
@@ -51,7 +51,7 @@ const SERVICE_ACTIONS = [
|
|
|
51
51
|
"setup",
|
|
52
52
|
"restart"
|
|
53
53
|
];
|
|
54
|
-
const SECONDS_IN_DAY =
|
|
54
|
+
const SECONDS_IN_DAY = 86400;
|
|
55
55
|
const DEFAULT_EXPIRY_DAYS = 7;
|
|
56
56
|
const DEFAULT_EXPIRY_SECONDS = 7 * SECONDS_IN_DAY;
|
|
57
57
|
const DRIVES_PRESERVE_STRATEGIES = ["preserve-all", "preserve-by-url-and-detach"];
|
|
@@ -74,6 +74,18 @@ const PROJECT_PORT_BAND_SIZE = 1e3;
|
|
|
74
74
|
const PROJECT_PORT_BAND_SWITCHBOARD = 7e3;
|
|
75
75
|
const PROJECT_PORT_BAND_STUDIO = 6e3;
|
|
76
76
|
const PROJECT_PORT_BAND_VETRA_CONNECT = 2e3;
|
|
77
|
+
/**
|
|
78
|
+
* Icon for the drives switchboard creates by default, inlined as a data URI.
|
|
79
|
+
*
|
|
80
|
+
* A remote URL is the wrong shape for this: the value is baked into the drive
|
|
81
|
+
* document and rendered by every Connect that opens it, so the icon only
|
|
82
|
+
* appears when that client can reach that host. A desktop or air-gapped install
|
|
83
|
+
* cannot, and the ipfs.io gateway this previously pointed at now answers 403
|
|
84
|
+
* regardless.
|
|
85
|
+
*
|
|
86
|
+
* The mark is drawn dark-on-light so it stays legible against either theme.
|
|
87
|
+
*/
|
|
88
|
+
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
89
|
const DEFAULT_VETRA_DRIVE_ID = "vetra";
|
|
78
90
|
const MINIMUM_NODE_VERSION = "24.0.0";
|
|
79
91
|
const PH_BIN = "ph-cli-legacy";
|
|
@@ -87,6 +99,7 @@ const REACTOR_API_PACKAGE = "@powerhousedao/reactor-api";
|
|
|
87
99
|
const ANALYTICS_ENGINE_CORE_PACKAGE = "@powerhousedao/analytics-engine-core";
|
|
88
100
|
const GRAPHQL_PACKAGE = "graphql";
|
|
89
101
|
const GRAPHQL_TAG_PACKAGE = "graphql-tag";
|
|
102
|
+
const PIECES_FRAMEWORK_PACKAGE = "@powerhousedao/pieces-framework";
|
|
90
103
|
const PEER_EXTERNAL_DEPENDENCIES = {
|
|
91
104
|
[GRAPHQL_PACKAGE]: {
|
|
92
105
|
peer: "^16",
|
|
@@ -109,10 +122,18 @@ const PEER_EXTERNAL_DEPENDENCIES = {
|
|
|
109
122
|
dev: "4.3.6"
|
|
110
123
|
}
|
|
111
124
|
};
|
|
112
|
-
const FEATURE_DEPENDENCIES = {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
125
|
+
const FEATURE_DEPENDENCIES = {
|
|
126
|
+
analyticsProcessor: {
|
|
127
|
+
peerVersioned: [ANALYTICS_ENGINE_CORE_PACKAGE],
|
|
128
|
+
peerExternal: {},
|
|
129
|
+
devVersioned: []
|
|
130
|
+
},
|
|
131
|
+
piece: {
|
|
132
|
+
peerVersioned: [],
|
|
133
|
+
peerExternal: {},
|
|
134
|
+
devVersioned: [PIECES_FRAMEWORK_PACKAGE]
|
|
135
|
+
}
|
|
136
|
+
};
|
|
116
137
|
const VERSIONED_DEPENDENCIES = [...VERSIONED_PEER_DEPENDENCIES, ...FEATURE_DEPENDENCIES.analyticsProcessor.peerVersioned];
|
|
117
138
|
const BOILERPLATE_ALLOWED_BUILDS = [
|
|
118
139
|
"@apollo/protobufjs",
|
|
@@ -135,7 +156,10 @@ const VERSIONED_DEV_DEPENDENCIES = [
|
|
|
135
156
|
"@powerhousedao/reactor",
|
|
136
157
|
"@powerhousedao/shared",
|
|
137
158
|
"@powerhousedao/connect",
|
|
138
|
-
"@powerhousedao/design-system"
|
|
159
|
+
"@powerhousedao/design-system",
|
|
160
|
+
"@powerhousedao/host-core",
|
|
161
|
+
"@powerhousedao/clint",
|
|
162
|
+
"@powerhousedao/desktop"
|
|
139
163
|
];
|
|
140
164
|
const packageJsonExports = {
|
|
141
165
|
".": {
|
|
@@ -169,7 +193,6 @@ const packageJsonExports = {
|
|
|
169
193
|
},
|
|
170
194
|
"./subgraphs": {
|
|
171
195
|
types: "./dist/types/subgraphs/index.d.ts",
|
|
172
|
-
browser: "./dist/browser/subgraphs/index.js",
|
|
173
196
|
node: "./dist/node/subgraphs/index.mjs"
|
|
174
197
|
},
|
|
175
198
|
"./processors": {
|
|
@@ -177,6 +200,14 @@ const packageJsonExports = {
|
|
|
177
200
|
browser: "./dist/browser/processors/index.js",
|
|
178
201
|
node: "./dist/node/processors/index.mjs"
|
|
179
202
|
},
|
|
203
|
+
"./pieces": {
|
|
204
|
+
types: "./dist/types/pieces/index.d.ts",
|
|
205
|
+
node: "./dist/node/pieces/index.mjs"
|
|
206
|
+
},
|
|
207
|
+
"./pieces/*": {
|
|
208
|
+
types: "./dist/types/pieces/*/index.d.ts",
|
|
209
|
+
node: "./dist/node/pieces/*/index.mjs"
|
|
210
|
+
},
|
|
180
211
|
"./manifest": "./dist/powerhouse.manifest.json",
|
|
181
212
|
"./style.css": "./dist/style.css"
|
|
182
213
|
};
|
|
@@ -242,15 +273,15 @@ const externalDevDependencies = {
|
|
|
242
273
|
"@types/react": "^19.2.3",
|
|
243
274
|
"@types/react-dom": "^19.2.3",
|
|
244
275
|
"@vitejs/plugin-react": "^6.0.1",
|
|
245
|
-
"@vitest/coverage-v8": "
|
|
246
|
-
oxfmt: "0.
|
|
276
|
+
"@vitest/coverage-v8": "5.0.3",
|
|
277
|
+
oxfmt: "0.68.0",
|
|
247
278
|
oxlint: "1.70.0",
|
|
248
279
|
"oxlint-tsgolint": "0.23.0",
|
|
249
280
|
tailwindcss: "^4.1.16",
|
|
250
|
-
typescript: "
|
|
281
|
+
typescript: "~7.0.2",
|
|
251
282
|
vite: "^8.0.10",
|
|
252
283
|
"vite-tsconfig-paths": "6.1.1",
|
|
253
|
-
vitest: "
|
|
284
|
+
vitest: "5.0.3"
|
|
254
285
|
};
|
|
255
286
|
const defaultManifest = {
|
|
256
287
|
name: "",
|
|
@@ -309,6 +340,20 @@ const buildArgs = {
|
|
|
309
340
|
defaultValue: () => "dist",
|
|
310
341
|
defaultValueIsSerializable: true
|
|
311
342
|
}),
|
|
343
|
+
noSharedDeps: flag({
|
|
344
|
+
type: boolean,
|
|
345
|
+
long: "no-shared-deps",
|
|
346
|
+
description: "Bundle the shared dependency set instead of externalizing it (default: externalize)",
|
|
347
|
+
defaultValue: () => false,
|
|
348
|
+
defaultValueIsSerializable: true
|
|
349
|
+
}),
|
|
350
|
+
ignoreTypeErrors: flag({
|
|
351
|
+
type: boolean,
|
|
352
|
+
long: "ignore-type-errors",
|
|
353
|
+
description: "Unsafe: build even when tsc reports type errors, without asking. The package can load and still fail at runtime",
|
|
354
|
+
defaultValue: () => false,
|
|
355
|
+
defaultValueIsSerializable: true
|
|
356
|
+
}),
|
|
312
357
|
...debugArgs
|
|
313
358
|
};
|
|
314
359
|
const packageManagerArgs = {
|
|
@@ -414,7 +459,7 @@ const vetraSwitchboardArgs = {
|
|
|
414
459
|
const defaultDrivesUrl = option({
|
|
415
460
|
type: optional(string),
|
|
416
461
|
long: "default-drives-url",
|
|
417
|
-
description: "
|
|
462
|
+
description: "Comma-separated drive URLs to use as Connect's default drives.",
|
|
418
463
|
defaultValue: () => ""
|
|
419
464
|
});
|
|
420
465
|
const logLevel = option({
|
|
@@ -551,7 +596,7 @@ const connectRuntimeOverrideArgs = {
|
|
|
551
596
|
json: option({
|
|
552
597
|
type: optional(string),
|
|
553
598
|
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
|
|
599
|
+
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
600
|
}),
|
|
556
601
|
renownUrl: option({
|
|
557
602
|
type: optional(string),
|
|
@@ -580,6 +625,11 @@ const connectRuntimeOverrideArgs = {
|
|
|
580
625
|
long: "external-packages",
|
|
581
626
|
description: "Override connect.packages.externalEnabled."
|
|
582
627
|
}),
|
|
628
|
+
workflows: option({
|
|
629
|
+
type: optional(cliBoolean),
|
|
630
|
+
long: "workflows",
|
|
631
|
+
description: "Override connect.app.workflowsEnabled (load the @powerhousedao/workflow package: workflow + connection documents, their editors and Workflow Studio)."
|
|
632
|
+
}),
|
|
583
633
|
remoteDrivesEnabled: option({
|
|
584
634
|
type: optional(cliBoolean),
|
|
585
635
|
long: "remote-drives-enabled",
|
|
@@ -801,6 +851,44 @@ const generateArgs = {
|
|
|
801
851
|
long: "subgraph",
|
|
802
852
|
description: "Subgraph name."
|
|
803
853
|
}),
|
|
854
|
+
pieceName: option({
|
|
855
|
+
type: optional(string),
|
|
856
|
+
long: "piece",
|
|
857
|
+
description: "Piece name."
|
|
858
|
+
}),
|
|
859
|
+
pieceId: option({
|
|
860
|
+
type: optional(string),
|
|
861
|
+
long: "piece-id",
|
|
862
|
+
description: "Piece id, the pieceName a workflow step holds, e.g. @acme/piece-crm. Defaults to one derived from the package name."
|
|
863
|
+
}),
|
|
864
|
+
pieceAuth: option({
|
|
865
|
+
type: oneOf([
|
|
866
|
+
"none",
|
|
867
|
+
"secret",
|
|
868
|
+
"custom"
|
|
869
|
+
]),
|
|
870
|
+
long: "piece-auth",
|
|
871
|
+
description: "The kind of connection the generated piece asks for. Default is custom.",
|
|
872
|
+
defaultValue: () => "custom",
|
|
873
|
+
defaultValueIsSerializable: true
|
|
874
|
+
}),
|
|
875
|
+
pieceActionName: option({
|
|
876
|
+
type: optional(string),
|
|
877
|
+
long: "piece-action",
|
|
878
|
+
description: "Name of an action to generate inside a piece."
|
|
879
|
+
}),
|
|
880
|
+
pieceTriggerName: option({
|
|
881
|
+
type: optional(string),
|
|
882
|
+
long: "piece-trigger",
|
|
883
|
+
description: "Name of a trigger to generate inside a piece."
|
|
884
|
+
}),
|
|
885
|
+
pieceTriggerStrategy: option({
|
|
886
|
+
type: oneOf(["polling", "webhook"]),
|
|
887
|
+
long: "piece-trigger-strategy",
|
|
888
|
+
description: "How a generated trigger fires. Default is polling.",
|
|
889
|
+
defaultValue: () => "polling",
|
|
890
|
+
defaultValueIsSerializable: true
|
|
891
|
+
}),
|
|
804
892
|
importScriptName: option({
|
|
805
893
|
type: optional(string),
|
|
806
894
|
long: "import-script",
|
|
@@ -866,6 +954,24 @@ const generateArgs = {
|
|
|
866
954
|
...debugArgs
|
|
867
955
|
};
|
|
868
956
|
//#endregion
|
|
957
|
+
//#region clis/feature-flags.ts
|
|
958
|
+
/**
|
|
959
|
+
* Feature toggles shared by the CLIs (ph-cli and ph-cmd's dispatch/help).
|
|
960
|
+
* Hand-rolled env predicates by the CLI convention — deliberately no
|
|
961
|
+
* OpenFeature dependency here; that stack belongs to the runtime apps.
|
|
962
|
+
*/
|
|
963
|
+
/**
|
|
964
|
+
* Gates the uniform-runners surface: the `ph run` command (registration,
|
|
965
|
+
* help listing, and ph-cmd forwarding), host-name sugar, and the `ph init`
|
|
966
|
+
* hosts/ scaffold. Off by default; set to `1` or `true` to enable. Rollout
|
|
967
|
+
* plan: docs/plans/2026-10-13-uniform-runners.md.
|
|
968
|
+
*/
|
|
969
|
+
const UNIFORM_RUNNERS_FLAG = "FEATURE_UNIFORM_RUNNERS_ENABLED";
|
|
970
|
+
function isUniformRunnersEnabled(env = process.env) {
|
|
971
|
+
const value = env[UNIFORM_RUNNERS_FLAG]?.trim().toLowerCase();
|
|
972
|
+
return value === "1" || value === "true";
|
|
973
|
+
}
|
|
974
|
+
//#endregion
|
|
869
975
|
//#region clis/args/inspect.ts
|
|
870
976
|
const inspectArgs = {
|
|
871
977
|
packageName: positional({
|
|
@@ -997,6 +1103,30 @@ const registryLoginArgs = {
|
|
|
997
1103
|
...debugArgs
|
|
998
1104
|
};
|
|
999
1105
|
//#endregion
|
|
1106
|
+
//#region clis/args/run.ts
|
|
1107
|
+
const runArgs = {
|
|
1108
|
+
host: positional({
|
|
1109
|
+
type: string,
|
|
1110
|
+
displayName: "host",
|
|
1111
|
+
description: "the host to run (a directory under hosts/)"
|
|
1112
|
+
}),
|
|
1113
|
+
verb: positional({
|
|
1114
|
+
type: optional(string),
|
|
1115
|
+
displayName: "verb",
|
|
1116
|
+
description: "optional verb the runner forwards (dev, build, serve, …)"
|
|
1117
|
+
}),
|
|
1118
|
+
debug: flag({
|
|
1119
|
+
type: optional(boolean),
|
|
1120
|
+
long: "debug",
|
|
1121
|
+
description: "verbose runner diagnostics"
|
|
1122
|
+
}),
|
|
1123
|
+
explain: option({
|
|
1124
|
+
type: optional(string),
|
|
1125
|
+
long: "explain",
|
|
1126
|
+
description: "explain a resolved aspect instead of running (drives)"
|
|
1127
|
+
})
|
|
1128
|
+
};
|
|
1129
|
+
//#endregion
|
|
1000
1130
|
//#region clis/args/switchboard.ts
|
|
1001
1131
|
const switchboardArgs = {
|
|
1002
1132
|
...vetraSwitchboardArgs,
|
|
@@ -1209,6 +1339,7 @@ const vetraArgs = {
|
|
|
1209
1339
|
//#endregion
|
|
1210
1340
|
//#region clis/command-names.ts
|
|
1211
1341
|
const phCliCommandNames = [
|
|
1342
|
+
"run",
|
|
1212
1343
|
"generate",
|
|
1213
1344
|
"vetra",
|
|
1214
1345
|
"connect",
|
|
@@ -1243,7 +1374,13 @@ function helpCommand(config) {
|
|
|
1243
1374
|
aliases
|
|
1244
1375
|
});
|
|
1245
1376
|
}
|
|
1246
|
-
const
|
|
1377
|
+
const allPhCliHelpCommands = {
|
|
1378
|
+
run: helpCommand({
|
|
1379
|
+
name: "run",
|
|
1380
|
+
args: runArgs,
|
|
1381
|
+
description: "Run a host from hosts/ with its runner",
|
|
1382
|
+
handler: () => {}
|
|
1383
|
+
}),
|
|
1247
1384
|
generate: helpCommand({
|
|
1248
1385
|
name: "generate",
|
|
1249
1386
|
args: generateArgs,
|
|
@@ -1340,6 +1477,7 @@ const phCliHelpCommands = {
|
|
|
1340
1477
|
handler: () => {}
|
|
1341
1478
|
})
|
|
1342
1479
|
};
|
|
1480
|
+
const phCliHelpCommands = isUniformRunnersEnabled() ? allPhCliHelpCommands : (({ run: _run, ...rest }) => rest)(allPhCliHelpCommands);
|
|
1343
1481
|
//#endregion
|
|
1344
1482
|
//#region clis/args/init.ts
|
|
1345
1483
|
const initArgs = {
|
|
@@ -1395,6 +1533,11 @@ const initArgs = {
|
|
|
1395
1533
|
short: "r",
|
|
1396
1534
|
description: "Remote drive identifier."
|
|
1397
1535
|
}),
|
|
1536
|
+
uniformRunners: flag({
|
|
1537
|
+
type: optional(boolean),
|
|
1538
|
+
long: "uniform-runners",
|
|
1539
|
+
description: "Scaffold the hosts/ folder (uniform-runners architecture). Also enabled project-wide by FEATURE_UNIFORM_RUNNERS_ENABLED."
|
|
1540
|
+
}),
|
|
1398
1541
|
clone: option({
|
|
1399
1542
|
type: optional(string),
|
|
1400
1543
|
long: "clone",
|
|
@@ -1436,7 +1579,9 @@ const unpublishArgs = {
|
|
|
1436
1579
|
//#endregion
|
|
1437
1580
|
//#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
1438
1581
|
var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1439
|
-
let p = process || {}
|
|
1582
|
+
let p = process || {};
|
|
1583
|
+
let argv = p.argv || [];
|
|
1584
|
+
let env = p.env || {};
|
|
1440
1585
|
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
1586
|
let formatter = (open, close, replace = open) => (input) => {
|
|
1442
1587
|
let string = "" + input, index = string.indexOf(close, open.length);
|
|
@@ -1524,7 +1669,7 @@ var require_js_tokens = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1524
1669
|
};
|
|
1525
1670
|
}));
|
|
1526
1671
|
//#endregion
|
|
1527
|
-
//#region ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.
|
|
1672
|
+
//#region ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.29.7/node_modules/@babel/helper-validator-identifier/lib/identifier.js
|
|
1528
1673
|
var require_identifier = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1529
1674
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1530
1675
|
exports.isIdentifierChar = isIdentifierChar;
|
|
@@ -2532,7 +2677,7 @@ var require_identifier = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2532
2677
|
}
|
|
2533
2678
|
}));
|
|
2534
2679
|
//#endregion
|
|
2535
|
-
//#region ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.
|
|
2680
|
+
//#region ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.29.7/node_modules/@babel/helper-validator-identifier/lib/keyword.js
|
|
2536
2681
|
var require_keyword = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
2537
2682
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2538
2683
|
exports.isKeyword = isKeyword;
|
|
@@ -2611,7 +2756,7 @@ var require_keyword = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2611
2756
|
}
|
|
2612
2757
|
}));
|
|
2613
2758
|
//#endregion
|
|
2614
|
-
//#region ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.
|
|
2759
|
+
//#region ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.29.7/node_modules/@babel/helper-validator-identifier/lib/index.js
|
|
2615
2760
|
var require_lib$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
2616
2761
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2617
2762
|
Object.defineProperty(exports, "isIdentifierChar", {
|
|
@@ -2698,7 +2843,7 @@ var import_lib = (/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2698
2843
|
function getDefs(enabled) {
|
|
2699
2844
|
return enabled ? defsOn : defsOff;
|
|
2700
2845
|
}
|
|
2701
|
-
const sometimesKeywords = new Set([
|
|
2846
|
+
const sometimesKeywords = /* @__PURE__ */ new Set([
|
|
2702
2847
|
"as",
|
|
2703
2848
|
"async",
|
|
2704
2849
|
"from",
|
|
@@ -2765,9 +2910,10 @@ var import_lib = (/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2765
2910
|
else if (i === lineDiff) markerLines[lineNumber] = [0, endColumn];
|
|
2766
2911
|
else markerLines[lineNumber] = [0, source[lineNumber - i].length];
|
|
2767
2912
|
}
|
|
2768
|
-
else if (startColumn === endColumn)
|
|
2769
|
-
|
|
2770
|
-
|
|
2913
|
+
else if (startColumn === endColumn) {
|
|
2914
|
+
if (startColumn) markerLines[startLine] = [startColumn, 0];
|
|
2915
|
+
else markerLines[startLine] = true;
|
|
2916
|
+
} else markerLines[startLine] = [startColumn, endColumn - startColumn];
|
|
2771
2917
|
return {
|
|
2772
2918
|
start,
|
|
2773
2919
|
end,
|
|
@@ -4227,49 +4373,47 @@ var require_validate_npm_package_license = /* @__PURE__ */ __commonJSMin(((expor
|
|
|
4227
4373
|
};
|
|
4228
4374
|
}));
|
|
4229
4375
|
//#endregion
|
|
4230
|
-
//#region ../../node_modules/.pnpm/lru-cache@11.
|
|
4376
|
+
//#region ../../node_modules/.pnpm/lru-cache@11.5.0/node_modules/lru-cache/dist/commonjs/node/index.min.js
|
|
4231
4377
|
var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4378
|
+
var j = (c, t) => () => (t || c((t = { exports: {} }).exports, t), t.exports);
|
|
4379
|
+
var I = j((O) => {
|
|
4380
|
+
"use strict";
|
|
4381
|
+
Object.defineProperty(O, "__esModule", { value: !0 });
|
|
4382
|
+
O.tracing = O.metrics = void 0;
|
|
4383
|
+
var U = __require("node:diagnostics_channel");
|
|
4384
|
+
O.metrics = (0, U.channel)("lru-cache:metrics");
|
|
4385
|
+
O.tracing = (0, U.tracingChannel)("lru-cache");
|
|
4386
|
+
});
|
|
4387
|
+
var P = j((D) => {
|
|
4388
|
+
"use strict";
|
|
4389
|
+
Object.defineProperty(D, "__esModule", { value: !0 });
|
|
4390
|
+
D.defaultPerf = void 0;
|
|
4391
|
+
D.defaultPerf = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date;
|
|
4392
|
+
});
|
|
4232
4393
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
4233
4394
|
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 {
|
|
4395
|
+
var g = I();
|
|
4396
|
+
var N = P();
|
|
4397
|
+
var C = () => g.metrics.hasSubscribers || g.tracing.hasSubscribers;
|
|
4398
|
+
var k = /* @__PURE__ */ new Set();
|
|
4399
|
+
var G = typeof process == "object" && process ? process : {};
|
|
4400
|
+
var V = (c, t, e, i) => {
|
|
4401
|
+
typeof G.emitWarning == "function" ? G.emitWarning(c, t, e, i) : console.error(`[${e}] ${t}: ${c}`);
|
|
4402
|
+
};
|
|
4403
|
+
var q = (c) => !k.has(c);
|
|
4404
|
+
var T = (c) => !!c && c === Math.floor(c) && c > 0 && isFinite(c);
|
|
4405
|
+
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;
|
|
4406
|
+
var W = class extends Array {
|
|
4264
4407
|
constructor(t) {
|
|
4265
4408
|
super(t), this.fill(0);
|
|
4266
4409
|
}
|
|
4267
|
-
}
|
|
4410
|
+
};
|
|
4411
|
+
var x = class c {
|
|
4268
4412
|
heap;
|
|
4269
4413
|
length;
|
|
4270
4414
|
static #o = !1;
|
|
4271
4415
|
static create(t) {
|
|
4272
|
-
let e =
|
|
4416
|
+
let e = H(t);
|
|
4273
4417
|
if (!e) return [];
|
|
4274
4418
|
c.#o = !0;
|
|
4275
4419
|
let i = new c(t, e);
|
|
@@ -4289,14 +4433,14 @@ var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4289
4433
|
exports.LRUCache = class c {
|
|
4290
4434
|
#o;
|
|
4291
4435
|
#c;
|
|
4292
|
-
#w;
|
|
4293
|
-
#C;
|
|
4294
|
-
#S;
|
|
4295
|
-
#L;
|
|
4296
|
-
#U;
|
|
4297
4436
|
#m;
|
|
4437
|
+
#W;
|
|
4438
|
+
#S;
|
|
4439
|
+
#M;
|
|
4440
|
+
#j;
|
|
4441
|
+
#w;
|
|
4298
4442
|
get perf() {
|
|
4299
|
-
return this.#
|
|
4443
|
+
return this.#w;
|
|
4300
4444
|
}
|
|
4301
4445
|
ttl;
|
|
4302
4446
|
ttlResolution;
|
|
@@ -4313,48 +4457,49 @@ var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4313
4457
|
allowStaleOnFetchAbort;
|
|
4314
4458
|
allowStaleOnFetchRejection;
|
|
4315
4459
|
ignoreFetchAbort;
|
|
4460
|
+
backgroundFetchSize;
|
|
4316
4461
|
#n;
|
|
4317
|
-
#
|
|
4462
|
+
#b;
|
|
4318
4463
|
#s;
|
|
4319
4464
|
#i;
|
|
4320
4465
|
#t;
|
|
4321
|
-
#a;
|
|
4322
|
-
#u;
|
|
4323
4466
|
#l;
|
|
4467
|
+
#u;
|
|
4468
|
+
#a;
|
|
4324
4469
|
#h;
|
|
4325
|
-
#
|
|
4470
|
+
#_;
|
|
4326
4471
|
#r;
|
|
4327
4472
|
#y;
|
|
4328
|
-
#
|
|
4473
|
+
#F;
|
|
4329
4474
|
#d;
|
|
4330
4475
|
#g;
|
|
4331
4476
|
#T;
|
|
4332
|
-
#
|
|
4477
|
+
#U;
|
|
4333
4478
|
#f;
|
|
4334
|
-
#
|
|
4479
|
+
#D;
|
|
4335
4480
|
static unsafeExposeInternals(t) {
|
|
4336
4481
|
return {
|
|
4337
|
-
starts: t.#
|
|
4482
|
+
starts: t.#F,
|
|
4338
4483
|
ttls: t.#d,
|
|
4339
4484
|
autopurgeTimers: t.#g,
|
|
4340
4485
|
sizes: t.#y,
|
|
4341
4486
|
keyMap: t.#s,
|
|
4342
4487
|
keyList: t.#i,
|
|
4343
4488
|
valList: t.#t,
|
|
4344
|
-
next: t.#
|
|
4489
|
+
next: t.#l,
|
|
4345
4490
|
prev: t.#u,
|
|
4346
4491
|
get head() {
|
|
4347
|
-
return t.#
|
|
4492
|
+
return t.#a;
|
|
4348
4493
|
},
|
|
4349
4494
|
get tail() {
|
|
4350
4495
|
return t.#h;
|
|
4351
4496
|
},
|
|
4352
|
-
free: t.#
|
|
4497
|
+
free: t.#_,
|
|
4353
4498
|
isBackgroundFetch: (e) => t.#e(e),
|
|
4354
|
-
backgroundFetch: (e, i, s, n) => t.#
|
|
4355
|
-
moveToTail: (e) => t.#
|
|
4356
|
-
indexes: (e) => t.#
|
|
4357
|
-
rindexes: (e) => t.#
|
|
4499
|
+
backgroundFetch: (e, i, s, n) => t.#G(e, i, s, n),
|
|
4500
|
+
moveToTail: (e) => t.#L(e),
|
|
4501
|
+
indexes: (e) => t.#A(e),
|
|
4502
|
+
rindexes: (e) => t.#z(e),
|
|
4358
4503
|
isStale: (e) => t.#p(e)
|
|
4359
4504
|
};
|
|
4360
4505
|
}
|
|
@@ -4365,188 +4510,190 @@ var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4365
4510
|
return this.#c;
|
|
4366
4511
|
}
|
|
4367
4512
|
get calculatedSize() {
|
|
4368
|
-
return this.#
|
|
4513
|
+
return this.#b;
|
|
4369
4514
|
}
|
|
4370
4515
|
get size() {
|
|
4371
4516
|
return this.#n;
|
|
4372
4517
|
}
|
|
4373
4518
|
get fetchMethod() {
|
|
4374
|
-
return this.#
|
|
4519
|
+
return this.#M;
|
|
4375
4520
|
}
|
|
4376
4521
|
get memoMethod() {
|
|
4377
|
-
return this.#
|
|
4522
|
+
return this.#j;
|
|
4378
4523
|
}
|
|
4379
4524
|
get dispose() {
|
|
4380
|
-
return this.#
|
|
4525
|
+
return this.#m;
|
|
4381
4526
|
}
|
|
4382
4527
|
get onInsert() {
|
|
4383
|
-
return this.#
|
|
4528
|
+
return this.#W;
|
|
4384
4529
|
}
|
|
4385
4530
|
get disposeAfter() {
|
|
4386
4531
|
return this.#S;
|
|
4387
4532
|
}
|
|
4388
4533
|
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 =
|
|
4534
|
+
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;
|
|
4535
|
+
if (this.backgroundFetchSize = M, v !== void 0 && typeof v?.now != "function") throw new TypeError("perf option must have a now() method if specified");
|
|
4536
|
+
if (this.#w = v ?? N.defaultPerf, e !== 0 && !T(e)) throw new TypeError("max option must be a nonnegative integer");
|
|
4537
|
+
let E = e ? H(e) : Array;
|
|
4538
|
+
if (!E) throw new Error("invalid max value: " + e);
|
|
4539
|
+
if (this.#o = e, this.#c = p, this.maxEntrySize = f || this.#c, this.sizeCalculation = b, this.sizeCalculation) {
|
|
4395
4540
|
if (!this.#c && !this.maxEntrySize) throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
|
|
4396
4541
|
if (typeof this.sizeCalculation != "function") throw new TypeError("sizeCalculation set to non-function");
|
|
4397
4542
|
}
|
|
4398
4543
|
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.#
|
|
4544
|
+
if (this.#j = S, l !== void 0 && typeof l != "function") throw new TypeError("fetchMethod must be a function if specified");
|
|
4545
|
+
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) {
|
|
4546
|
+
if (this.#c !== 0 && !T(this.#c)) throw new TypeError("maxSize must be a positive integer if specified");
|
|
4547
|
+
if (!T(this.maxEntrySize)) throw new TypeError("maxEntrySize must be a positive integer if specified");
|
|
4548
|
+
this.#X();
|
|
4404
4549
|
}
|
|
4405
|
-
if (this.allowStale = !!
|
|
4406
|
-
if (!
|
|
4407
|
-
this.#
|
|
4550
|
+
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) {
|
|
4551
|
+
if (!T(this.ttl)) throw new TypeError("ttl must be a positive integer if specified");
|
|
4552
|
+
this.#k();
|
|
4408
4553
|
}
|
|
4409
4554
|
if (this.#o === 0 && this.ttl === 0 && this.#c === 0) throw new TypeError("At least one of max, maxSize, or ttl is required");
|
|
4410
4555
|
if (!this.ttlAutopurge && !this.#o && !this.#c) {
|
|
4411
|
-
let
|
|
4412
|
-
|
|
4556
|
+
let R = "LRU_CACHE_UNBOUNDED";
|
|
4557
|
+
q(R) && (k.add(R), V("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", R, c));
|
|
4413
4558
|
}
|
|
4414
4559
|
}
|
|
4415
4560
|
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] =
|
|
4561
|
+
return this.#s.has(t) ? 1 / 0 : 0;
|
|
4562
|
+
}
|
|
4563
|
+
#k() {
|
|
4564
|
+
let t = new W(this.#o), e = new W(this.#o);
|
|
4565
|
+
this.#d = t, this.#F = e;
|
|
4566
|
+
let i = this.ttlAutopurge ? Array.from({ length: this.#o }) : void 0;
|
|
4567
|
+
this.#g = i, this.#H = (h, a, o = this.#w.now()) => {
|
|
4568
|
+
e[h] = a !== 0 ? o : 0, t[h] = a, s(h, a);
|
|
4424
4569
|
}, this.#R = (h) => {
|
|
4425
|
-
e[h] = t[h] !== 0 ? this.#
|
|
4570
|
+
e[h] = t[h] !== 0 ? this.#w.now() : 0, s(h, t[h]);
|
|
4426
4571
|
};
|
|
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
|
-
|
|
4572
|
+
let s = this.ttlAutopurge ? (h, a) => {
|
|
4573
|
+
if (i?.[h] && (clearTimeout(i[h]), i[h] = void 0), a && a !== 0 && i) {
|
|
4574
|
+
let o = setTimeout(() => {
|
|
4575
|
+
this.#p(h) && this.#v(this.#i[h], "expire");
|
|
4576
|
+
}, a + 1);
|
|
4577
|
+
o.unref && o.unref(), i[h] = o;
|
|
4433
4578
|
}
|
|
4434
4579
|
} : () => {};
|
|
4435
|
-
this.#
|
|
4436
|
-
if (t[
|
|
4437
|
-
let
|
|
4438
|
-
if (!
|
|
4439
|
-
h.ttl =
|
|
4440
|
-
h.remainingTTL =
|
|
4580
|
+
this.#E = (h, a) => {
|
|
4581
|
+
if (t[a]) {
|
|
4582
|
+
let o = t[a], d = e[a];
|
|
4583
|
+
if (!o || !d) return;
|
|
4584
|
+
h.ttl = o, h.start = d, h.now = n || r();
|
|
4585
|
+
h.remainingTTL = o - (h.now - d);
|
|
4441
4586
|
}
|
|
4442
4587
|
};
|
|
4443
|
-
let n = 0,
|
|
4444
|
-
let h = this.#
|
|
4588
|
+
let n = 0, r = () => {
|
|
4589
|
+
let h = this.#w.now();
|
|
4445
4590
|
if (this.ttlResolution > 0) {
|
|
4446
4591
|
n = h;
|
|
4447
|
-
let
|
|
4448
|
-
|
|
4592
|
+
let a = setTimeout(() => n = 0, this.ttlResolution);
|
|
4593
|
+
a.unref && a.unref();
|
|
4449
4594
|
}
|
|
4450
4595
|
return h;
|
|
4451
4596
|
};
|
|
4452
4597
|
this.getRemainingTTL = (h) => {
|
|
4453
|
-
let
|
|
4454
|
-
if (
|
|
4455
|
-
let
|
|
4456
|
-
if (!
|
|
4457
|
-
return
|
|
4598
|
+
let a = this.#s.get(h);
|
|
4599
|
+
if (a === void 0) return 0;
|
|
4600
|
+
let o = t[a], d = e[a];
|
|
4601
|
+
if (!o || !d) return 1 / 0;
|
|
4602
|
+
return o - ((n || r()) - d);
|
|
4458
4603
|
}, this.#p = (h) => {
|
|
4459
|
-
let
|
|
4460
|
-
return !!
|
|
4604
|
+
let a = e[h], o = t[h];
|
|
4605
|
+
return !!o && !!a && (n || r()) - a > o;
|
|
4461
4606
|
};
|
|
4462
4607
|
}
|
|
4463
4608
|
#R = () => {};
|
|
4464
|
-
#
|
|
4465
|
-
#
|
|
4609
|
+
#E = () => {};
|
|
4610
|
+
#H = () => {};
|
|
4466
4611
|
#p = () => !1;
|
|
4467
|
-
#
|
|
4468
|
-
let t = new
|
|
4469
|
-
this.#
|
|
4470
|
-
this.#
|
|
4471
|
-
}, this.#
|
|
4472
|
-
if (
|
|
4473
|
-
|
|
4474
|
-
if (
|
|
4475
|
-
|
|
4476
|
-
|
|
4612
|
+
#X() {
|
|
4613
|
+
let t = new W(this.#o);
|
|
4614
|
+
this.#b = 0, this.#y = t, this.#C = (e) => {
|
|
4615
|
+
this.#b -= t[e], t[e] = 0;
|
|
4616
|
+
}, this.#N = (e, i, s, n) => {
|
|
4617
|
+
if (!T(s)) {
|
|
4618
|
+
if (this.#e(i)) return this.backgroundFetchSize;
|
|
4619
|
+
if (n) {
|
|
4620
|
+
if (typeof n != "function") throw new TypeError("sizeCalculation must be a function");
|
|
4621
|
+
if (s = n(i, e), !T(s)) throw new TypeError("sizeCalculation return invalid (expect positive integer)");
|
|
4622
|
+
} else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
|
|
4623
|
+
}
|
|
4477
4624
|
return s;
|
|
4478
|
-
}, this.#
|
|
4625
|
+
}, this.#I = (e, i, s) => {
|
|
4479
4626
|
if (t[e] = i, this.#c) {
|
|
4480
4627
|
let n = this.#c - t[e];
|
|
4481
|
-
for (; this.#
|
|
4628
|
+
for (; this.#b > n;) this.#P(!0);
|
|
4482
4629
|
}
|
|
4483
|
-
this.#
|
|
4630
|
+
this.#b += t[e], s && (s.entrySize = i, s.totalCalculatedSize = this.#b);
|
|
4484
4631
|
};
|
|
4485
4632
|
}
|
|
4486
|
-
#
|
|
4487
|
-
#
|
|
4488
|
-
#
|
|
4633
|
+
#C = (t) => {};
|
|
4634
|
+
#I = (t, e, i) => {};
|
|
4635
|
+
#N = (t, e, i, s) => {
|
|
4489
4636
|
if (i || s) throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
|
|
4490
4637
|
return 0;
|
|
4491
4638
|
};
|
|
4492
|
-
*#
|
|
4493
|
-
if (this.#n) for (let e = this.#h;
|
|
4639
|
+
*#A({ allowStale: t = this.allowStale } = {}) {
|
|
4640
|
+
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
4641
|
}
|
|
4495
|
-
*#
|
|
4496
|
-
if (this.#n) for (let e = this.#
|
|
4642
|
+
*#z({ allowStale: t = this.allowStale } = {}) {
|
|
4643
|
+
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
4644
|
}
|
|
4498
|
-
#
|
|
4645
|
+
#V(t) {
|
|
4499
4646
|
return t !== void 0 && this.#s.get(this.#i[t]) === t;
|
|
4500
4647
|
}
|
|
4501
4648
|
*entries() {
|
|
4502
|
-
for (let t of this.#
|
|
4649
|
+
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
4650
|
}
|
|
4504
4651
|
*rentries() {
|
|
4505
|
-
for (let t of this.#
|
|
4652
|
+
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
4653
|
}
|
|
4507
4654
|
*keys() {
|
|
4508
|
-
for (let t of this.#
|
|
4655
|
+
for (let t of this.#A()) {
|
|
4509
4656
|
let e = this.#i[t];
|
|
4510
4657
|
e !== void 0 && !this.#e(this.#t[t]) && (yield e);
|
|
4511
4658
|
}
|
|
4512
4659
|
}
|
|
4513
4660
|
*rkeys() {
|
|
4514
|
-
for (let t of this.#
|
|
4661
|
+
for (let t of this.#z()) {
|
|
4515
4662
|
let e = this.#i[t];
|
|
4516
4663
|
e !== void 0 && !this.#e(this.#t[t]) && (yield e);
|
|
4517
4664
|
}
|
|
4518
4665
|
}
|
|
4519
4666
|
*values() {
|
|
4520
|
-
for (let t of this.#
|
|
4667
|
+
for (let t of this.#A()) this.#t[t] !== void 0 && !this.#e(this.#t[t]) && (yield this.#t[t]);
|
|
4521
4668
|
}
|
|
4522
4669
|
*rvalues() {
|
|
4523
|
-
for (let t of this.#
|
|
4670
|
+
for (let t of this.#z()) this.#t[t] !== void 0 && !this.#e(this.#t[t]) && (yield this.#t[t]);
|
|
4524
4671
|
}
|
|
4525
4672
|
[Symbol.iterator]() {
|
|
4526
4673
|
return this.entries();
|
|
4527
4674
|
}
|
|
4528
4675
|
[Symbol.toStringTag] = "LRUCache";
|
|
4529
4676
|
find(t, e = {}) {
|
|
4530
|
-
for (let i of this.#
|
|
4677
|
+
for (let i of this.#A()) {
|
|
4531
4678
|
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
|
|
4679
|
+
if (n !== void 0 && t(n, this.#i[i], this)) return this.#x(this.#i[i], e);
|
|
4533
4680
|
}
|
|
4534
4681
|
}
|
|
4535
4682
|
forEach(t, e = this) {
|
|
4536
|
-
for (let i of this.#
|
|
4683
|
+
for (let i of this.#A()) {
|
|
4537
4684
|
let s = this.#t[i], n = this.#e(s) ? s.__staleWhileFetching : s;
|
|
4538
4685
|
n !== void 0 && t.call(e, n, this.#i[i], this);
|
|
4539
4686
|
}
|
|
4540
4687
|
}
|
|
4541
4688
|
rforEach(t, e = this) {
|
|
4542
|
-
for (let i of this.#
|
|
4689
|
+
for (let i of this.#z()) {
|
|
4543
4690
|
let s = this.#t[i], n = this.#e(s) ? s.__staleWhileFetching : s;
|
|
4544
4691
|
n !== void 0 && t.call(e, n, this.#i[i], this);
|
|
4545
4692
|
}
|
|
4546
4693
|
}
|
|
4547
4694
|
purgeStale() {
|
|
4548
4695
|
let t = !1;
|
|
4549
|
-
for (let e of this.#
|
|
4696
|
+
for (let e of this.#z({ allowStale: !0 })) this.#p(e) && (this.#v(this.#i[e], "expire"), t = !0);
|
|
4550
4697
|
return t;
|
|
4551
4698
|
}
|
|
4552
4699
|
info(t) {
|
|
@@ -4555,24 +4702,24 @@ var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4555
4702
|
let i = this.#t[e], s = this.#e(i) ? i.__staleWhileFetching : i;
|
|
4556
4703
|
if (s === void 0) return;
|
|
4557
4704
|
let n = { value: s };
|
|
4558
|
-
if (this.#d && this.#
|
|
4559
|
-
let
|
|
4560
|
-
if (
|
|
4705
|
+
if (this.#d && this.#F) {
|
|
4706
|
+
let r = this.#d[e], h = this.#F[e];
|
|
4707
|
+
if (r && h) n.ttl = r - (this.#w.now() - h), n.start = Date.now();
|
|
4561
4708
|
}
|
|
4562
4709
|
return this.#y && (n.size = this.#y[e]), n;
|
|
4563
4710
|
}
|
|
4564
4711
|
dump() {
|
|
4565
4712
|
let t = [];
|
|
4566
|
-
for (let e of this.#
|
|
4713
|
+
for (let e of this.#A({ allowStale: !0 })) {
|
|
4567
4714
|
let i = this.#i[e], s = this.#t[e], n = this.#e(s) ? s.__staleWhileFetching : s;
|
|
4568
4715
|
if (n === void 0 || i === void 0) continue;
|
|
4569
|
-
let
|
|
4570
|
-
if (this.#d && this.#
|
|
4571
|
-
|
|
4572
|
-
let h = this.#
|
|
4573
|
-
|
|
4716
|
+
let r = { value: n };
|
|
4717
|
+
if (this.#d && this.#F) {
|
|
4718
|
+
r.ttl = this.#d[e];
|
|
4719
|
+
let h = this.#w.now() - this.#F[e];
|
|
4720
|
+
r.start = Math.floor(Date.now() - h);
|
|
4574
4721
|
}
|
|
4575
|
-
this.#y && (
|
|
4722
|
+
this.#y && (r.size = this.#y[e]), t.unshift([i, r]);
|
|
4576
4723
|
}
|
|
4577
4724
|
return t;
|
|
4578
4725
|
}
|
|
@@ -4581,53 +4728,60 @@ var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4581
4728
|
for (let [e, i] of t) {
|
|
4582
4729
|
if (i.start) {
|
|
4583
4730
|
let s = Date.now() - i.start;
|
|
4584
|
-
i.start = this.#
|
|
4731
|
+
i.start = this.#w.now() - s;
|
|
4585
4732
|
}
|
|
4586
|
-
this
|
|
4733
|
+
this.#O(e, i.value, i);
|
|
4587
4734
|
}
|
|
4588
4735
|
}
|
|
4589
4736
|
set(t, e, i = {}) {
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4737
|
+
let { status: s = g.metrics.hasSubscribers ? {} : void 0 } = i;
|
|
4738
|
+
i.status = s, s && (s.op = "set", s.key = t, e !== void 0 && (s.value = e), s.cache = this);
|
|
4739
|
+
let n = this.#O(t, e, i);
|
|
4740
|
+
return s && g.metrics.hasSubscribers && g.metrics.publish(s), n;
|
|
4741
|
+
}
|
|
4742
|
+
#O(t, e, i, s) {
|
|
4743
|
+
let { ttl: n = this.ttl, start: r, noDisposeOnSet: h = this.noDisposeOnSet, sizeCalculation: a = this.sizeCalculation, status: o } = i, d = this.#e(e);
|
|
4744
|
+
if (e === void 0) return o && (o.set = "deleted"), this.delete(t), this;
|
|
4745
|
+
let { noUpdateTTL: _ = this.noUpdateTTL } = i;
|
|
4746
|
+
o && !d && (o.value = e);
|
|
4747
|
+
let y = this.#N(t, e, i.size || 0, a, o);
|
|
4748
|
+
if (this.maxEntrySize && y > this.maxEntrySize) return this.#v(t, "set"), o && (o.set = "miss", o.maxEntrySizeExceeded = !0), this;
|
|
4749
|
+
let u = this.#n === 0 ? void 0 : this.#s.get(t);
|
|
4750
|
+
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
4751
|
else {
|
|
4596
|
-
this.#
|
|
4597
|
-
let
|
|
4598
|
-
if (e !==
|
|
4599
|
-
if (
|
|
4600
|
-
|
|
4601
|
-
let { __staleWhileFetching:
|
|
4602
|
-
|
|
4603
|
-
|
|
4752
|
+
this.#L(u);
|
|
4753
|
+
let p = this.#t[u];
|
|
4754
|
+
if (e !== p) {
|
|
4755
|
+
if (!h) if (this.#e(p)) {
|
|
4756
|
+
p !== s && p.__abortController.abort(/* @__PURE__ */ new Error("replaced"));
|
|
4757
|
+
let { __staleWhileFetching: f } = p;
|
|
4758
|
+
f !== void 0 && f !== e && (this.#T && this.#m?.(f, t, "set"), this.#f && this.#r?.push([
|
|
4759
|
+
f,
|
|
4604
4760
|
t,
|
|
4605
4761
|
"set"
|
|
4606
4762
|
]));
|
|
4607
|
-
} else
|
|
4608
|
-
|
|
4763
|
+
} else this.#T && this.#m?.(p, t, "set"), this.#f && this.#r?.push([
|
|
4764
|
+
p,
|
|
4609
4765
|
t,
|
|
4610
4766
|
"set"
|
|
4611
|
-
])
|
|
4612
|
-
if (this.#
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
g !== void 0 && (r.oldValue = g);
|
|
4767
|
+
]);
|
|
4768
|
+
if (this.#C(u), this.#I(u, y, o), this.#t[u] = e, !d) {
|
|
4769
|
+
let f = p && this.#e(p) ? p.__staleWhileFetching : p, b = f === void 0 ? "add" : e !== f ? "replace" : "update";
|
|
4770
|
+
o && (o.set = b, f !== void 0 && (o.oldValue = f)), this.#D && this.onInsert?.(e, t, b);
|
|
4616
4771
|
}
|
|
4617
|
-
} else
|
|
4618
|
-
this.#I && this.onInsert?.(e, t, e === d ? "update" : "replace");
|
|
4772
|
+
} else d || (o && (o.set = "update"), this.#D && this.onInsert?.(e, t, "update"));
|
|
4619
4773
|
}
|
|
4620
|
-
if (
|
|
4621
|
-
let
|
|
4622
|
-
for (;
|
|
4774
|
+
if (n !== 0 && !this.#d && this.#k(), this.#d && (_ || this.#H(u, n, r), o && this.#E(o, u)), !h && this.#f && this.#r) {
|
|
4775
|
+
let p = this.#r, f;
|
|
4776
|
+
for (; f = p?.shift();) this.#S?.(...f);
|
|
4623
4777
|
}
|
|
4624
4778
|
return this;
|
|
4625
4779
|
}
|
|
4626
4780
|
pop() {
|
|
4627
4781
|
try {
|
|
4628
4782
|
for (; this.#n;) {
|
|
4629
|
-
let t = this.#t[this.#
|
|
4630
|
-
if (this.#
|
|
4783
|
+
let t = this.#t[this.#a];
|
|
4784
|
+
if (this.#P(!0), this.#e(t)) {
|
|
4631
4785
|
if (t.__staleWhileFetching) return t.__staleWhileFetching;
|
|
4632
4786
|
} else if (t !== void 0) return t;
|
|
4633
4787
|
}
|
|
@@ -4638,163 +4792,214 @@ var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4638
4792
|
}
|
|
4639
4793
|
}
|
|
4640
4794
|
}
|
|
4641
|
-
#
|
|
4642
|
-
let e = this.#
|
|
4643
|
-
|
|
4644
|
-
|
|
4795
|
+
#P(t) {
|
|
4796
|
+
let e = this.#a, i = this.#i[e], s = this.#t[e], n = this.#e(s);
|
|
4797
|
+
n && s.__abortController.abort(/* @__PURE__ */ new Error("evicted"));
|
|
4798
|
+
let r = n ? s.__staleWhileFetching : s;
|
|
4799
|
+
return (this.#T || this.#f) && r !== void 0 && (this.#T && this.#m?.(r, i, "evict"), this.#f && this.#r?.push([
|
|
4800
|
+
r,
|
|
4645
4801
|
i,
|
|
4646
4802
|
"evict"
|
|
4647
|
-
])), this.#
|
|
4803
|
+
])), 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
4804
|
}
|
|
4649
4805
|
has(t, e = {}) {
|
|
4806
|
+
let { status: i = g.metrics.hasSubscribers ? {} : void 0 } = e;
|
|
4807
|
+
e.status = i, i && (i.op = "has", i.key = t, i.cache = this);
|
|
4808
|
+
let s = this.#Y(t, e);
|
|
4809
|
+
return g.metrics.hasSubscribers && g.metrics.publish(i), s;
|
|
4810
|
+
}
|
|
4811
|
+
#Y(t, e = {}) {
|
|
4650
4812
|
let { updateAgeOnHas: i = this.updateAgeOnHas, status: s } = e, n = this.#s.get(t);
|
|
4651
4813
|
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.#
|
|
4814
|
+
let r = this.#t[n];
|
|
4815
|
+
if (this.#e(r) && r.__staleWhileFetching === void 0) return !1;
|
|
4816
|
+
if (this.#p(n)) s && (s.has = "stale", this.#E(s, n));
|
|
4817
|
+
else return i && this.#R(n), s && (s.has = "hit", this.#E(s, n)), !0;
|
|
4656
4818
|
} else s && (s.has = "miss");
|
|
4657
4819
|
return !1;
|
|
4658
4820
|
}
|
|
4659
4821
|
peek(t, e = {}) {
|
|
4660
|
-
let {
|
|
4661
|
-
|
|
4662
|
-
let
|
|
4663
|
-
return
|
|
4822
|
+
let { status: i = C() ? {} : void 0 } = e;
|
|
4823
|
+
i && (i.op = "peek", i.key = t, i.cache = this), e.status = i;
|
|
4824
|
+
let s = this.#J(t, e);
|
|
4825
|
+
return g.metrics.hasSubscribers && g.metrics.publish(i), s;
|
|
4826
|
+
}
|
|
4827
|
+
#J(t, e) {
|
|
4828
|
+
let { status: i, allowStale: s = this.allowStale } = e, n = this.#s.get(t);
|
|
4829
|
+
if (n === void 0 || !s && this.#p(n)) {
|
|
4830
|
+
i && (i.peek = n === void 0 ? "miss" : "stale");
|
|
4831
|
+
return;
|
|
4832
|
+
}
|
|
4833
|
+
let r = this.#t[n], h = this.#e(r) ? r.__staleWhileFetching : r;
|
|
4834
|
+
return i && (h !== void 0 ? (i.peek = "hit", i.value = h) : i.peek = "miss"), h;
|
|
4664
4835
|
}
|
|
4665
|
-
#
|
|
4836
|
+
#G(t, e, i, s) {
|
|
4666
4837
|
let n = e === void 0 ? void 0 : this.#t[e];
|
|
4667
4838
|
if (this.#e(n)) return n;
|
|
4668
|
-
let
|
|
4669
|
-
h?.addEventListener("abort", () =>
|
|
4670
|
-
let
|
|
4671
|
-
signal:
|
|
4839
|
+
let r = new AbortController(), { signal: h } = i;
|
|
4840
|
+
h?.addEventListener("abort", () => r.abort(h.reason), { signal: r.signal });
|
|
4841
|
+
let a = {
|
|
4842
|
+
signal: r.signal,
|
|
4672
4843
|
options: i,
|
|
4673
4844
|
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
|
-
});
|
|
4845
|
+
}, o = (f, b = !1) => {
|
|
4846
|
+
let { aborted: l } = r.signal, S = i.ignoreFetchAbort && f !== void 0, F = i.ignoreFetchAbort || !!(i.allowStaleOnFetchAbort && f !== void 0);
|
|
4847
|
+
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);
|
|
4848
|
+
let w = u, m = this.#t[e];
|
|
4849
|
+
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;
|
|
4850
|
+
}, d = (f) => (i.status && (i.status.fetchRejected = !0, i.status.fetchError = f), _(f, !1)), _ = (f, b) => {
|
|
4851
|
+
let { aborted: l } = r.signal, S = l && i.allowStaleOnFetchAbort, F = S || i.allowStaleOnFetchRejection, w = F || i.noDeleteOnFetchRejection, m = u;
|
|
4852
|
+
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;
|
|
4853
|
+
if (m.__returned === m) throw f;
|
|
4854
|
+
}, y = (f, b) => {
|
|
4855
|
+
let l = this.#M?.(t, n, a);
|
|
4856
|
+
r.signal.addEventListener("abort", () => {
|
|
4857
|
+
(!i.ignoreFetchAbort || i.allowStaleOnFetchAbort) && (f(void 0), i.allowStaleOnFetchAbort && (f = (S) => o(S, !0)));
|
|
4858
|
+
}), l && l instanceof Promise ? l.then((S) => f(S === void 0 ? void 0 : S), b) : l !== void 0 && f(l);
|
|
4688
4859
|
};
|
|
4689
4860
|
i.status && (i.status.fetchDispatched = !0);
|
|
4690
|
-
let
|
|
4691
|
-
__abortController:
|
|
4861
|
+
let u = new Promise(y).then(o, d), p = Object.assign(u, {
|
|
4862
|
+
__abortController: r,
|
|
4692
4863
|
__staleWhileFetching: n,
|
|
4693
4864
|
__returned: void 0
|
|
4694
4865
|
});
|
|
4695
|
-
return e === void 0 ? (this
|
|
4696
|
-
...
|
|
4866
|
+
return e === void 0 ? (this.#O(t, p, {
|
|
4867
|
+
...a.options,
|
|
4697
4868
|
status: void 0
|
|
4698
|
-
}), e = this.#s.get(t)) : this.#t[e] =
|
|
4869
|
+
}), e = this.#s.get(t)) : this.#t[e] = p, p;
|
|
4699
4870
|
}
|
|
4700
4871
|
#e(t) {
|
|
4701
|
-
if (!this.#
|
|
4872
|
+
if (!this.#U) return !1;
|
|
4702
4873
|
let e = t;
|
|
4703
|
-
return !!e && e instanceof Promise && e.hasOwnProperty("__staleWhileFetching") && e.__abortController instanceof
|
|
4874
|
+
return !!e && e instanceof Promise && e.hasOwnProperty("__staleWhileFetching") && e.__abortController instanceof AbortController;
|
|
4875
|
+
}
|
|
4876
|
+
fetch(t, e = {}) {
|
|
4877
|
+
let i = g.tracing.hasSubscribers, { status: s = C() ? {} : void 0 } = e;
|
|
4878
|
+
e.status = s, s && e.context && (s.context = e.context);
|
|
4879
|
+
let n = this.#q(t, e);
|
|
4880
|
+
return s && i && (s.trace = !0, g.tracing.tracePromise(() => n, s).catch(() => {})), n;
|
|
4704
4881
|
}
|
|
4705
|
-
async
|
|
4706
|
-
let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, ttl:
|
|
4707
|
-
if (!this.#
|
|
4882
|
+
async #q(t, e = {}) {
|
|
4883
|
+
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;
|
|
4884
|
+
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
4885
|
allowStale: i,
|
|
4709
4886
|
updateAgeOnGet: s,
|
|
4710
4887
|
noDeleteOnStaleGet: n,
|
|
4711
4888
|
status: l
|
|
4712
4889
|
});
|
|
4713
|
-
let
|
|
4890
|
+
let F = {
|
|
4714
4891
|
allowStale: i,
|
|
4715
4892
|
updateAgeOnGet: s,
|
|
4716
4893
|
noDeleteOnStaleGet: n,
|
|
4717
|
-
ttl:
|
|
4894
|
+
ttl: r,
|
|
4718
4895
|
noDisposeOnSet: h,
|
|
4719
|
-
size:
|
|
4720
|
-
sizeCalculation:
|
|
4721
|
-
noUpdateTTL:
|
|
4722
|
-
noDeleteOnFetchRejection:
|
|
4723
|
-
allowStaleOnFetchRejection:
|
|
4724
|
-
allowStaleOnFetchAbort:
|
|
4725
|
-
ignoreFetchAbort:
|
|
4896
|
+
size: a,
|
|
4897
|
+
sizeCalculation: o,
|
|
4898
|
+
noUpdateTTL: d,
|
|
4899
|
+
noDeleteOnFetchRejection: _,
|
|
4900
|
+
allowStaleOnFetchRejection: y,
|
|
4901
|
+
allowStaleOnFetchAbort: p,
|
|
4902
|
+
ignoreFetchAbort: u,
|
|
4726
4903
|
status: l,
|
|
4727
4904
|
signal: S
|
|
4728
|
-
},
|
|
4729
|
-
if (
|
|
4905
|
+
}, w = this.#s.get(t);
|
|
4906
|
+
if (w === void 0) {
|
|
4730
4907
|
l && (l.fetch = "miss");
|
|
4731
|
-
let
|
|
4732
|
-
return
|
|
4908
|
+
let m = this.#G(t, w, F, f);
|
|
4909
|
+
return m.__returned = m;
|
|
4733
4910
|
} else {
|
|
4734
|
-
let
|
|
4735
|
-
if (this.#e(
|
|
4736
|
-
let E = i &&
|
|
4737
|
-
return l && (l.fetch = "inflight", E && (l.returnedStale = !0)), E ?
|
|
4911
|
+
let m = this.#t[w];
|
|
4912
|
+
if (this.#e(m)) {
|
|
4913
|
+
let E = i && m.__staleWhileFetching !== void 0;
|
|
4914
|
+
return l && (l.fetch = "inflight", E && (l.returnedStale = !0)), E ? m.__staleWhileFetching : m.__returned = m;
|
|
4738
4915
|
}
|
|
4739
|
-
let
|
|
4740
|
-
if (!
|
|
4741
|
-
let
|
|
4742
|
-
return l && (l.fetch =
|
|
4916
|
+
let A = this.#p(w);
|
|
4917
|
+
if (!b && !A) return l && (l.fetch = "hit"), this.#L(w), s && this.#R(w), l && this.#E(l, w), m;
|
|
4918
|
+
let z = this.#G(t, w, F, f), v = z.__staleWhileFetching !== void 0 && i;
|
|
4919
|
+
return l && (l.fetch = A ? "stale" : "refresh", v && A && (l.returnedStale = !0)), v ? z.__staleWhileFetching : z.__returned = z;
|
|
4743
4920
|
}
|
|
4744
4921
|
}
|
|
4745
|
-
|
|
4746
|
-
let i =
|
|
4922
|
+
forceFetch(t, e = {}) {
|
|
4923
|
+
let i = g.tracing.hasSubscribers, { status: s = C() ? {} : void 0 } = e;
|
|
4924
|
+
e.status = s, s && e.context && (s.context = e.context);
|
|
4925
|
+
let n = this.#K(t, e);
|
|
4926
|
+
return s && i && (s.trace = !0, g.tracing.tracePromise(() => n, s).catch(() => {})), n;
|
|
4927
|
+
}
|
|
4928
|
+
async #K(t, e = {}) {
|
|
4929
|
+
let i = await this.#q(t, e);
|
|
4747
4930
|
if (i === void 0) throw new Error("fetch() returned undefined");
|
|
4748
4931
|
return i;
|
|
4749
4932
|
}
|
|
4750
4933
|
memo(t, e = {}) {
|
|
4751
|
-
let i =
|
|
4934
|
+
let { status: i = g.metrics.hasSubscribers ? {} : void 0 } = e;
|
|
4935
|
+
e.status = i, i && (i.op = "memo", i.key = t, e.context && (i.context = e.context), i.cache = this);
|
|
4936
|
+
let s = this.#Q(t, e);
|
|
4937
|
+
return i && (i.value = s), g.metrics.hasSubscribers && g.metrics.publish(i), s;
|
|
4938
|
+
}
|
|
4939
|
+
#Q(t, e = {}) {
|
|
4940
|
+
let i = this.#j;
|
|
4752
4941
|
if (!i) throw new Error("no memoMethod provided to constructor");
|
|
4753
|
-
let { context: s,
|
|
4754
|
-
|
|
4755
|
-
let
|
|
4756
|
-
|
|
4942
|
+
let { context: s, status: n, forceRefresh: r, ...h } = e;
|
|
4943
|
+
n && r && (n.forceRefresh = !0);
|
|
4944
|
+
let a = this.#x(t, h), o = r || a === void 0;
|
|
4945
|
+
if (n && (n.memo = o ? "miss" : "hit", o || (n.value = a)), !o) return a;
|
|
4946
|
+
let d = i(t, a, {
|
|
4947
|
+
options: h,
|
|
4757
4948
|
context: s
|
|
4758
4949
|
});
|
|
4759
|
-
return this
|
|
4950
|
+
return n && (n.value = d), this.#O(t, d, h), d;
|
|
4760
4951
|
}
|
|
4761
4952
|
get(t, e = {}) {
|
|
4762
|
-
let {
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4953
|
+
let { status: i = g.metrics.hasSubscribers ? {} : void 0 } = e;
|
|
4954
|
+
e.status = i, i && (i.op = "get", i.key = t, i.cache = this);
|
|
4955
|
+
let s = this.#x(t, e);
|
|
4956
|
+
return i && (s !== void 0 && (i.value = s), g.metrics.hasSubscribers && g.metrics.publish(i)), s;
|
|
4957
|
+
}
|
|
4958
|
+
#x(t, e = {}) {
|
|
4959
|
+
let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, status: r } = e, h = this.#s.get(t);
|
|
4960
|
+
if (h === void 0) {
|
|
4961
|
+
r && (r.get = "miss");
|
|
4962
|
+
return;
|
|
4963
|
+
}
|
|
4964
|
+
let a = this.#t[h], o = this.#e(a);
|
|
4965
|
+
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
4966
|
}
|
|
4768
|
-
#
|
|
4769
|
-
this.#u[e] = t, this.#
|
|
4967
|
+
#B(t, e) {
|
|
4968
|
+
this.#u[e] = t, this.#l[t] = e;
|
|
4770
4969
|
}
|
|
4771
|
-
#
|
|
4772
|
-
t !== this.#h && (t === this.#
|
|
4970
|
+
#L(t) {
|
|
4971
|
+
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
4972
|
}
|
|
4774
4973
|
delete(t) {
|
|
4775
|
-
return this.#
|
|
4776
|
-
}
|
|
4777
|
-
#
|
|
4974
|
+
return this.#v(t, "delete");
|
|
4975
|
+
}
|
|
4976
|
+
#v(t, e) {
|
|
4977
|
+
g.metrics.hasSubscribers && g.metrics.publish({
|
|
4978
|
+
op: "delete",
|
|
4979
|
+
delete: e,
|
|
4980
|
+
key: t,
|
|
4981
|
+
cache: this
|
|
4982
|
+
});
|
|
4778
4983
|
let i = !1;
|
|
4779
4984
|
if (this.#n !== 0) {
|
|
4780
4985
|
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
|
|
4986
|
+
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
4987
|
else {
|
|
4783
|
-
this.#
|
|
4988
|
+
this.#C(s);
|
|
4784
4989
|
let n = this.#t[s];
|
|
4785
|
-
if (this.#e(n) ? n.__abortController.abort(/* @__PURE__ */ new Error("deleted")) : (this.#T || this.#f) && (this.#T && this.#
|
|
4990
|
+
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
4991
|
n,
|
|
4787
4992
|
t,
|
|
4788
4993
|
e
|
|
4789
4994
|
])), 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.#
|
|
4995
|
+
else if (s === this.#a) this.#a = this.#l[s];
|
|
4791
4996
|
else {
|
|
4792
|
-
let
|
|
4793
|
-
this.#
|
|
4794
|
-
let h = this.#
|
|
4997
|
+
let r = this.#u[s];
|
|
4998
|
+
this.#l[r] = this.#l[s];
|
|
4999
|
+
let h = this.#l[s];
|
|
4795
5000
|
this.#u[h] = this.#u[s];
|
|
4796
5001
|
}
|
|
4797
|
-
this.#n--, this.#
|
|
5002
|
+
this.#n--, this.#_.push(s);
|
|
4798
5003
|
}
|
|
4799
5004
|
}
|
|
4800
5005
|
if (this.#f && this.#r?.length) {
|
|
@@ -4804,27 +5009,27 @@ var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4804
5009
|
return i;
|
|
4805
5010
|
}
|
|
4806
5011
|
clear() {
|
|
4807
|
-
return this
|
|
5012
|
+
return this.#$("delete");
|
|
4808
5013
|
}
|
|
4809
|
-
|
|
4810
|
-
for (let e of this.#
|
|
5014
|
+
#$(t) {
|
|
5015
|
+
for (let e of this.#z({ allowStale: !0 })) {
|
|
4811
5016
|
let i = this.#t[e];
|
|
4812
5017
|
if (this.#e(i)) i.__abortController.abort(/* @__PURE__ */ new Error("deleted"));
|
|
4813
5018
|
else {
|
|
4814
5019
|
let s = this.#i[e];
|
|
4815
|
-
this.#T && this.#
|
|
5020
|
+
this.#T && this.#m?.(i, s, t), this.#f && this.#r?.push([
|
|
4816
5021
|
i,
|
|
4817
5022
|
s,
|
|
4818
5023
|
t
|
|
4819
5024
|
]);
|
|
4820
5025
|
}
|
|
4821
5026
|
}
|
|
4822
|
-
if (this.#s.clear(), this.#t.fill(void 0), this.#i.fill(void 0), this.#d && this.#
|
|
4823
|
-
this.#d.fill(0), this.#
|
|
5027
|
+
if (this.#s.clear(), this.#t.fill(void 0), this.#i.fill(void 0), this.#d && this.#F) {
|
|
5028
|
+
this.#d.fill(0), this.#F.fill(0);
|
|
4824
5029
|
for (let e of this.#g ?? []) e !== void 0 && clearTimeout(e);
|
|
4825
5030
|
this.#g?.fill(void 0);
|
|
4826
5031
|
}
|
|
4827
|
-
if (this.#y && this.#y.fill(0), this.#
|
|
5032
|
+
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
5033
|
let e = this.#r, i;
|
|
4829
5034
|
for (; i = e?.shift();) this.#S?.(...i);
|
|
4830
5035
|
}
|
|
@@ -5020,8 +5225,10 @@ var require_parse_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5020
5225
|
if (Object.prototype.hasOwnProperty.call(protocols, proto)) return arg;
|
|
5021
5226
|
if (arg.substr(firstColon, 3) === "://") return arg;
|
|
5022
5227
|
const firstAt = arg.indexOf("@");
|
|
5023
|
-
if (firstAt > -1)
|
|
5024
|
-
|
|
5228
|
+
if (firstAt > -1) {
|
|
5229
|
+
if (firstAt > firstColon) return `git+ssh://${arg}`;
|
|
5230
|
+
else return arg;
|
|
5231
|
+
}
|
|
5025
5232
|
return `${arg.slice(0, firstColon + 1)}//${arg.slice(firstColon + 1)}`;
|
|
5026
5233
|
};
|
|
5027
5234
|
const correctUrl = (giturl) => {
|
|
@@ -5058,7 +5265,8 @@ var require_from_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5058
5265
|
};
|
|
5059
5266
|
module.exports = (giturl, opts, { gitHosts, protocols }) => {
|
|
5060
5267
|
if (!giturl) return;
|
|
5061
|
-
const
|
|
5268
|
+
const correctedUrl = isGitHubShorthand(giturl) ? `github:${giturl}` : giturl;
|
|
5269
|
+
const parsed = parseUrl(correctedUrl, protocols);
|
|
5062
5270
|
if (!parsed) return;
|
|
5063
5271
|
const gitHostShortcut = gitHosts.byShortcut[parsed.protocol];
|
|
5064
5272
|
const gitHostDomain = gitHosts.byDomain[parsed.hostname.startsWith("www.") ? parsed.hostname.slice(4) : parsed.hostname];
|
|
@@ -5521,17 +5729,22 @@ var require_fixer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5521
5729
|
var hosted = hostedGitInfo.fromUrl(data.repository.url);
|
|
5522
5730
|
if (hosted && hosted.bugs()) data.bugs = { url: hosted.bugs() };
|
|
5523
5731
|
} else if (data.bugs) {
|
|
5524
|
-
if (typeof data.bugs === "string")
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5732
|
+
if (typeof data.bugs === "string") {
|
|
5733
|
+
if (isEmail(data.bugs)) data.bugs = { email: data.bugs };
|
|
5734
|
+
else if (URL$1.canParse(data.bugs)) data.bugs = { url: data.bugs };
|
|
5735
|
+
else this.warn("nonEmailUrlBugsString");
|
|
5736
|
+
} else {
|
|
5528
5737
|
bugsTypos(data.bugs, this.warn);
|
|
5529
5738
|
var oldBugs = data.bugs;
|
|
5530
5739
|
data.bugs = {};
|
|
5531
|
-
if (oldBugs.url)
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5740
|
+
if (oldBugs.url) {
|
|
5741
|
+
if (URL$1.canParse(oldBugs.url)) data.bugs.url = oldBugs.url;
|
|
5742
|
+
else this.warn("nonUrlBugsUrlField");
|
|
5743
|
+
}
|
|
5744
|
+
if (oldBugs.email) {
|
|
5745
|
+
if (typeof oldBugs.email === "string" && isEmail(oldBugs.email)) data.bugs.email = oldBugs.email;
|
|
5746
|
+
else this.warn("nonEmailBugsEmailField");
|
|
5747
|
+
}
|
|
5535
5748
|
}
|
|
5536
5749
|
if (!data.bugs.email && !data.bugs.url) {
|
|
5537
5750
|
delete data.bugs;
|
|
@@ -5763,7 +5976,8 @@ const _readPackage = (file, normalize) => {
|
|
|
5763
5976
|
return json;
|
|
5764
5977
|
};
|
|
5765
5978
|
async function readPackage({ cwd, normalize = true } = {}) {
|
|
5766
|
-
|
|
5979
|
+
const packageFile = await fsPromises.readFile(getPackagePath(cwd), "utf8");
|
|
5980
|
+
return _readPackage(packageFile, normalize);
|
|
5767
5981
|
}
|
|
5768
5982
|
//#endregion
|
|
5769
5983
|
//#region clis/file-system/spawn-async.ts
|
|
@@ -5796,10 +6010,14 @@ function spawnAsync(command, args, options = {}) {
|
|
|
5796
6010
|
//#endregion
|
|
5797
6011
|
//#region clis/file-system/dependencies.ts
|
|
5798
6012
|
async function fetchNpmVersionFromRegistryForTag(packageName, tag) {
|
|
5799
|
-
const
|
|
6013
|
+
const version = await fetchPackageVersionFromNpmRegistry(`${packageName}@${tag}`);
|
|
6014
|
+
const cleanedVersion = clean(version);
|
|
5800
6015
|
if (!cleanedVersion) throw new Error(`Failed to fetch version for package "${packageName}" at tag "${tag}".`);
|
|
5801
6016
|
return cleanedVersion;
|
|
5802
6017
|
}
|
|
6018
|
+
function lowestVersion(versions) {
|
|
6019
|
+
return [...versions].sort(compare)[0];
|
|
6020
|
+
}
|
|
5803
6021
|
async function fetchPackageVersionFromNpmRegistry(packageSpecifier, registryUrl) {
|
|
5804
6022
|
const failedFetchErrorMessage = `Failed to fetch version from npm registry for ${packageSpecifier}.`;
|
|
5805
6023
|
try {
|
|
@@ -6046,7 +6264,7 @@ PH CLI package manager: ${packageManager}
|
|
|
6046
6264
|
//#endregion
|
|
6047
6265
|
//#region clis/file-system/write-file-ensuring-dir.ts
|
|
6048
6266
|
async function writeFileEnsuringDir(filePath, contents) {
|
|
6049
|
-
await mkdir(dirname(filePath), { recursive: true });
|
|
6267
|
+
await mkdir(dirname(resolve(filePath)), { recursive: true });
|
|
6050
6268
|
await writeFile(filePath, contents, { encoding: "utf-8" });
|
|
6051
6269
|
}
|
|
6052
6270
|
//#endregion
|
|
@@ -6268,18 +6486,32 @@ function getTelemetryStatus() {
|
|
|
6268
6486
|
//#region constants.ts
|
|
6269
6487
|
const PACKAGES_DEPENDENCIES = [
|
|
6270
6488
|
"@powerhousedao/builder-tools",
|
|
6489
|
+
"@powerhousedao/clint",
|
|
6271
6490
|
"@powerhousedao/codegen",
|
|
6272
6491
|
"@powerhousedao/common",
|
|
6273
6492
|
"@powerhousedao/config",
|
|
6274
6493
|
"@powerhousedao/design-system",
|
|
6494
|
+
"@powerhousedao/desktop",
|
|
6495
|
+
"@powerhousedao/host-core",
|
|
6275
6496
|
"document-drive",
|
|
6276
6497
|
"document-model",
|
|
6498
|
+
"@powerhousedao/opentelemetry-instrumentation-reactor",
|
|
6499
|
+
"@powerhousedao/pieces-framework",
|
|
6277
6500
|
"@powerhousedao/reactor",
|
|
6278
6501
|
"@powerhousedao/reactor-api",
|
|
6502
|
+
"@powerhousedao/reactor-attachments",
|
|
6279
6503
|
"@powerhousedao/reactor-browser",
|
|
6504
|
+
"@powerhousedao/reactor-drive",
|
|
6505
|
+
"@powerhousedao/reactor-group",
|
|
6506
|
+
"@powerhousedao/reactor-hypercore",
|
|
6280
6507
|
"@powerhousedao/reactor-mcp",
|
|
6508
|
+
"@powerhousedao/reactor-privacy",
|
|
6509
|
+
"@powerhousedao/reactor-router",
|
|
6510
|
+
"@powerhousedao/reactor-workflow",
|
|
6511
|
+
"@powerhousedao/registry",
|
|
6281
6512
|
"@powerhousedao/switchboard-gui",
|
|
6282
6513
|
"@powerhousedao/vetra",
|
|
6514
|
+
"@powerhousedao/workflow",
|
|
6283
6515
|
"@powerhousedao/analytics-engine-core",
|
|
6284
6516
|
"@powerhousedao/analytics-engine-knex",
|
|
6285
6517
|
"@powerhousedao/analytics-engine-pg",
|
|
@@ -6287,11 +6519,6 @@ const PACKAGES_DEPENDENCIES = [
|
|
|
6287
6519
|
"@powerhousedao/analytics-engine-graphql",
|
|
6288
6520
|
"@powerhousedao/shared",
|
|
6289
6521
|
"@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
6522
|
"@renown/sdk"
|
|
6296
6523
|
];
|
|
6297
6524
|
const CLIS_DEPENDENCIES = ["ph-cmd", "@powerhousedao/ph-cli"];
|
|
@@ -6357,7 +6584,35 @@ async function runUseLocal(monorepoPath, skipInstall) {
|
|
|
6357
6584
|
runCmd(`pnpm install`);
|
|
6358
6585
|
}
|
|
6359
6586
|
}
|
|
6587
|
+
const WORKSPACE_DIRS = [
|
|
6588
|
+
"packages",
|
|
6589
|
+
"packages/analytics-engine",
|
|
6590
|
+
"clis",
|
|
6591
|
+
"apps"
|
|
6592
|
+
];
|
|
6593
|
+
const workspaces = /* @__PURE__ */ new Map();
|
|
6594
|
+
function workspacePackages(monorepoPath) {
|
|
6595
|
+
let dirs = workspaces.get(monorepoPath);
|
|
6596
|
+
if (dirs) return dirs;
|
|
6597
|
+
dirs = /* @__PURE__ */ new Map();
|
|
6598
|
+
for (const parent of WORKSPACE_DIRS) {
|
|
6599
|
+
const root = path.join(monorepoPath, parent);
|
|
6600
|
+
if (!existsSync(root)) continue;
|
|
6601
|
+
for (const entry of readdirSync(root, { withFileTypes: true })) {
|
|
6602
|
+
const manifest = path.join(root, entry.name, "package.json");
|
|
6603
|
+
if (!entry.isDirectory() || !existsSync(manifest)) continue;
|
|
6604
|
+
try {
|
|
6605
|
+
const { name } = JSON.parse(readFileSync(manifest, "utf8"));
|
|
6606
|
+
if (name) dirs.set(name, path.join(root, entry.name));
|
|
6607
|
+
} catch {}
|
|
6608
|
+
}
|
|
6609
|
+
}
|
|
6610
|
+
workspaces.set(monorepoPath, dirs);
|
|
6611
|
+
return dirs;
|
|
6612
|
+
}
|
|
6360
6613
|
function buildPnpmLink(packageName, monorepoPath) {
|
|
6614
|
+
const dir = workspacePackages(monorepoPath).get(packageName);
|
|
6615
|
+
if (dir) return `link:${dir}`;
|
|
6361
6616
|
const isCli = CLIS_DEPENDENCIES.includes(packageName);
|
|
6362
6617
|
const isApp = APPS_DEPENDENCIES.includes(packageName);
|
|
6363
6618
|
const packageDir = isCli ? "clis" : isApp ? "apps" : "packages";
|
|
@@ -6496,6 +6751,10 @@ const phConnectRuntimeConfigSchema = {
|
|
|
6496
6751
|
type: "boolean",
|
|
6497
6752
|
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
6753
|
default: false
|
|
6754
|
+
},
|
|
6755
|
+
workflowsEnabled: {
|
|
6756
|
+
type: "boolean",
|
|
6757
|
+
description: "Powerhouse workflows in Connect. When true the tab loads the @powerhousedao/workflow package (workflow + connection documents, their editors and Workflow Studio) and the reactor worker registers its document models. Falls back to the top-level `workflows.enabled`; set it to override that for Connect. Independent of studioMode. False when neither is set."
|
|
6499
6758
|
}
|
|
6500
6759
|
}
|
|
6501
6760
|
},
|
|
@@ -6681,6 +6940,32 @@ const phConnectRuntimeConfigSchema = {
|
|
|
6681
6940
|
}
|
|
6682
6941
|
}
|
|
6683
6942
|
},
|
|
6943
|
+
openPanel: {
|
|
6944
|
+
type: "object",
|
|
6945
|
+
additionalProperties: false,
|
|
6946
|
+
description: "OpenPanel product analytics. Set `clientId` to enable; an empty `clientId` disables it. Events are only sent after the user accepts analytics cookies. Takes precedence over the build-time PH_CONNECT_OPENPANEL_* env vars.",
|
|
6947
|
+
properties: {
|
|
6948
|
+
clientId: {
|
|
6949
|
+
type: "string",
|
|
6950
|
+
description: "OpenPanel client id. Empty string disables OpenPanel entirely.",
|
|
6951
|
+
default: ""
|
|
6952
|
+
},
|
|
6953
|
+
apiUrl: {
|
|
6954
|
+
type: "string",
|
|
6955
|
+
description: "OpenPanel API URL for self-hosted instances (e.g. 'https://openpanel.example/api'). Omit to use OpenPanel's hosted API."
|
|
6956
|
+
},
|
|
6957
|
+
trackUiEvents: {
|
|
6958
|
+
type: "boolean",
|
|
6959
|
+
description: "Track UI events.",
|
|
6960
|
+
default: true
|
|
6961
|
+
},
|
|
6962
|
+
trackOperations: {
|
|
6963
|
+
type: "boolean",
|
|
6964
|
+
description: "Track document operations.",
|
|
6965
|
+
default: true
|
|
6966
|
+
}
|
|
6967
|
+
}
|
|
6968
|
+
},
|
|
6684
6969
|
instance: {
|
|
6685
6970
|
type: "object",
|
|
6686
6971
|
additionalProperties: false,
|
|
@@ -6694,7 +6979,12 @@ const phConnectRuntimeConfigSchema = {
|
|
|
6694
6979
|
},
|
|
6695
6980
|
reactorWorker: {
|
|
6696
6981
|
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.",
|
|
6982
|
+
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.",
|
|
6983
|
+
default: false
|
|
6984
|
+
},
|
|
6985
|
+
multiReactor: {
|
|
6986
|
+
type: "boolean",
|
|
6987
|
+
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.",
|
|
6698
6988
|
default: false
|
|
6699
6989
|
}
|
|
6700
6990
|
}
|
|
@@ -6703,33 +6993,47 @@ const phConnectRuntimeConfigSchema = {
|
|
|
6703
6993
|
type: "object",
|
|
6704
6994
|
additionalProperties: false,
|
|
6705
6995
|
description: "Settings for the reactor Connect runs in the browser, on the main thread or in the shared worker alike.",
|
|
6706
|
-
properties: {
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
|
|
6725
|
-
|
|
6726
|
-
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
|
|
6996
|
+
properties: {
|
|
6997
|
+
featureFlags: {
|
|
6998
|
+
type: "object",
|
|
6999
|
+
additionalProperties: false,
|
|
7000
|
+
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.",
|
|
7001
|
+
properties: {
|
|
7002
|
+
documentDecisions: {
|
|
7003
|
+
type: "boolean",
|
|
7004
|
+
description: "Decide writes from the document stream rather than the document meta cache, so a backdated deletion denies the operations that sort after it.",
|
|
7005
|
+
default: false
|
|
7006
|
+
},
|
|
7007
|
+
authEnforcement: {
|
|
7008
|
+
type: "boolean",
|
|
7009
|
+
description: "Enforce the auth scope's policy at admission, replay, and read. Requires documentDecisions.",
|
|
7010
|
+
default: false
|
|
7011
|
+
},
|
|
7012
|
+
authGroups: {
|
|
7013
|
+
type: "boolean",
|
|
7014
|
+
description: "Let `{ group }` principals match against the rosters of the group documents a policy names. Requires authEnforcement.",
|
|
7015
|
+
default: false
|
|
7016
|
+
},
|
|
7017
|
+
authConditions: {
|
|
7018
|
+
type: "boolean",
|
|
7019
|
+
description: "Evaluate `where` and `match` conditions on grants. Requires authGroups. Do not enable on a fleet `preflight:auth` reports as crossing a reducer version.",
|
|
7020
|
+
default: false
|
|
7021
|
+
}
|
|
6730
7022
|
}
|
|
7023
|
+
},
|
|
7024
|
+
createSignaturePolicy: {
|
|
7025
|
+
type: "string",
|
|
7026
|
+
enum: ["legacy", "v2-required"],
|
|
7027
|
+
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.",
|
|
7028
|
+
default: "v2-required"
|
|
7029
|
+
},
|
|
7030
|
+
unsupportedStoredDocuments: {
|
|
7031
|
+
type: "string",
|
|
7032
|
+
enum: ["refuse", "read-only"],
|
|
7033
|
+
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.",
|
|
7034
|
+
default: "refuse"
|
|
6731
7035
|
}
|
|
6732
|
-
}
|
|
7036
|
+
}
|
|
6733
7037
|
},
|
|
6734
7038
|
pwa: {
|
|
6735
7039
|
type: "object",
|
|
@@ -7103,6 +7407,15 @@ const sourceConfigSchema = {
|
|
|
7103
7407
|
}
|
|
7104
7408
|
}
|
|
7105
7409
|
},
|
|
7410
|
+
workflows: {
|
|
7411
|
+
type: "object",
|
|
7412
|
+
additionalProperties: false,
|
|
7413
|
+
description: "Powerhouse workflows on this reactor.",
|
|
7414
|
+
properties: { enabled: {
|
|
7415
|
+
type: "boolean",
|
|
7416
|
+
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."
|
|
7417
|
+
} }
|
|
7418
|
+
},
|
|
7106
7419
|
packageRegistryUrl: {
|
|
7107
7420
|
type: "string",
|
|
7108
7421
|
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 +7457,6 @@ function assertNodeVersion(nodeVersion = process.versions.node) {
|
|
|
7144
7457
|
if (lt(nodeVersion, "24.0.0")) throw new NodeVersionError(nodeVersion, MINIMUM_NODE_VERSION);
|
|
7145
7458
|
}
|
|
7146
7459
|
//#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 };
|
|
7460
|
+
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, 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, resolveSwitchboardPortDefault, resolveTelemetryConsent, runCmd, runUseLocal, serviceArgs, setTelemetryConsent, sourceConfigSchema, spawnAsync, switchboardArgs, uninstallArgs, unpublishArgs, vetraArgs, vetraSwitchboardArgs, writeFileEnsuringDir };
|
|
7148
7461
|
|
|
7149
7462
|
//# sourceMappingURL=index.mjs.map
|