@powerhousedao/shared 6.2.3-staging.0 → 6.3.0-dev.1
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/action-id-DON1WCeY.d.ts +19 -0
- package/dist/action-id-DON1WCeY.d.ts.map +1 -0
- package/dist/clis/args/access-token.d.mts +14 -2
- package/dist/clis/args/access-token.d.mts.map +1 -0
- package/dist/clis/args/access-token.mjs +21 -1
- package/dist/clis/args/access-token.mjs.map +1 -0
- package/dist/clis/args/{common-BXabdhiO.mjs → common-DG_SF8fN.mjs} +39 -8
- package/dist/clis/args/common-DG_SF8fN.mjs.map +1 -0
- package/dist/clis/args/{common-Bnm859xU.d.mts → common-DmerPWXo.d.mts} +8 -4
- package/dist/clis/args/common-DmerPWXo.d.mts.map +1 -0
- package/dist/clis/args/common.d.mts +1 -1
- package/dist/clis/args/common.mjs +1 -1
- package/dist/clis/args/connect.d.mts +448 -2
- package/dist/clis/args/connect.d.mts.map +1 -0
- package/dist/clis/args/connect.mjs +202 -1
- package/dist/clis/args/connect.mjs.map +1 -0
- package/dist/clis/args/{generate-BOItUNvP.mjs → generate-DMKgc6et.mjs} +2 -21
- package/dist/clis/args/generate-DMKgc6et.mjs.map +1 -0
- package/dist/clis/args/generate.d.mts +92 -2
- package/dist/clis/args/generate.d.mts.map +1 -0
- package/dist/clis/args/generate.mjs +1 -1
- package/dist/clis/args/{help-DVPTARGn.d.mts → help-BnD14eCa.d.mts} +62 -2
- package/dist/clis/args/help-BnD14eCa.d.mts.map +1 -0
- package/dist/clis/args/{help-DS1NlcJQ.mjs → help-Cjoe-b7d.mjs} +55 -15
- package/dist/clis/args/help-Cjoe-b7d.mjs.map +1 -0
- package/dist/clis/args/help.d.mts +1 -1
- package/dist/clis/args/help.mjs +16 -1
- package/dist/clis/args/host.d.mts +23 -0
- package/dist/clis/args/host.d.mts.map +1 -0
- package/dist/clis/args/host.mjs +35 -0
- package/dist/clis/args/host.mjs.map +1 -0
- package/dist/clis/args/index.d.mts +23 -19
- package/dist/clis/args/index.mjs +23 -19
- package/dist/clis/args/init.d.mts +53 -2
- package/dist/clis/args/init.d.mts.map +1 -0
- package/dist/clis/args/init.mjs +77 -1
- package/dist/clis/args/init.mjs.map +1 -0
- package/dist/clis/args/inspect.d.mts +11 -2
- package/dist/clis/args/inspect.d.mts.map +1 -0
- package/dist/clis/args/inspect.mjs +14 -1
- package/dist/clis/args/inspect.mjs.map +1 -0
- package/dist/clis/args/install.d.mts +35 -2
- package/dist/clis/args/install.d.mts.map +1 -0
- package/dist/clis/args/install.mjs +31 -1
- package/dist/clis/args/install.mjs.map +1 -0
- package/dist/clis/args/{login-CXRJXg71.d.mts → keyframes.d.mts} +13 -13
- package/dist/clis/args/keyframes.d.mts.map +1 -0
- package/dist/clis/args/keyframes.mjs +42 -0
- package/dist/clis/args/keyframes.mjs.map +1 -0
- package/dist/clis/args/list.d.mts +8 -2
- package/dist/clis/args/list.d.mts.map +1 -0
- package/dist/clis/args/list.mjs +6 -1
- package/dist/clis/args/list.mjs.map +1 -0
- package/dist/clis/args/login.d.mts +23 -2
- package/dist/clis/args/login.d.mts.map +1 -0
- package/dist/clis/args/login.mjs +39 -1
- package/dist/clis/args/login.mjs.map +1 -0
- package/dist/clis/args/{access-token-C5sKsH2O.d.mts → mcp.d.mts} +6 -7
- package/dist/clis/args/mcp.d.mts.map +1 -0
- package/dist/clis/args/mcp.mjs +22 -0
- package/dist/clis/args/mcp.mjs.map +1 -0
- package/dist/clis/args/migrate.d.mts +26 -2
- package/dist/clis/args/migrate.d.mts.map +1 -0
- package/dist/clis/args/migrate.mjs +43 -1
- package/dist/clis/args/migrate.mjs.map +1 -0
- package/dist/clis/args/{uninstall-CDx7lwxn.d.mts → model.d.mts} +28 -17
- package/dist/clis/args/model.d.mts.map +1 -0
- package/dist/clis/args/model.mjs +51 -0
- package/dist/clis/args/model.mjs.map +1 -0
- package/dist/clis/args/publish.d.mts +18 -2
- package/dist/clis/args/publish.d.mts.map +1 -0
- package/dist/clis/args/publish.mjs +26 -1
- package/dist/clis/args/publish.mjs.map +1 -0
- package/dist/clis/args/registry.d.mts +15 -2
- package/dist/clis/args/registry.d.mts.map +1 -0
- package/dist/clis/args/registry.mjs +22 -1
- package/dist/clis/args/registry.mjs.map +1 -0
- package/dist/clis/args/{unpublish-CEDsk6uv.d.mts → run.d.mts} +11 -12
- package/dist/clis/args/run.d.mts.map +1 -0
- package/dist/clis/args/run.mjs +33 -0
- package/dist/clis/args/run.mjs.map +1 -0
- package/dist/clis/args/{service-BBx5GDTc.d.mts → service-CLCvH3kf.d.mts} +4 -4
- package/dist/clis/args/service-CLCvH3kf.d.mts.map +1 -0
- package/dist/clis/args/service.d.mts +1 -1
- package/dist/clis/args/service.mjs +10 -1
- package/dist/clis/args/service.mjs.map +1 -0
- package/dist/clis/args/switchboard.d.mts +68 -2
- package/dist/clis/args/switchboard.d.mts.map +1 -0
- package/dist/clis/args/switchboard.mjs +84 -1
- package/dist/clis/args/switchboard.mjs.map +1 -0
- package/dist/clis/args/uninstall.d.mts +26 -2
- package/dist/clis/args/uninstall.d.mts.map +1 -0
- package/dist/clis/args/uninstall.mjs +15 -1
- package/dist/clis/args/uninstall.mjs.map +1 -0
- package/dist/clis/args/unpublish.d.mts +20 -2
- package/dist/clis/args/unpublish.d.mts.map +1 -0
- package/dist/clis/args/unpublish.mjs +29 -1
- package/dist/clis/args/unpublish.mjs.map +1 -0
- package/dist/clis/args/{vetra-BUNlAAPp.mjs → vetra-BqjDopAP.mjs} +18 -2
- package/dist/clis/args/vetra-BqjDopAP.mjs.map +1 -0
- package/dist/clis/args/vetra.d.mts +112 -2
- package/dist/clis/args/vetra.d.mts.map +1 -0
- package/dist/clis/args/vetra.mjs +1 -1
- package/dist/clis/{build-config-CmdMi_wu.mjs → build-config-BM1RL4u_.mjs} +87 -8
- package/dist/clis/build-config-BM1RL4u_.mjs.map +1 -0
- package/dist/clis/build-config.d.mts +26 -1
- package/dist/clis/build-config.d.mts.map +1 -1
- package/dist/clis/build-config.mjs +2 -2
- package/dist/clis/build-pieces.d.mts +71 -4
- package/dist/clis/build-pieces.d.mts.map +1 -1
- package/dist/clis/build-pieces.mjs +249 -26
- package/dist/clis/build-pieces.mjs.map +1 -1
- package/dist/clis/command-names.d.mts +3 -1
- package/dist/clis/command-names.d.mts.map +1 -1
- package/dist/clis/command-names.mjs +8 -1
- package/dist/clis/command-names.mjs.map +1 -1
- package/dist/clis/constants.d.mts +2 -2
- package/dist/clis/constants.mjs +92 -20
- package/dist/clis/constants.mjs.map +1 -1
- package/dist/clis/definition-sources.d.mts +26 -0
- package/dist/clis/definition-sources.d.mts.map +1 -0
- package/dist/clis/definition-sources.mjs +27 -0
- package/dist/clis/definition-sources.mjs.map +1 -0
- package/dist/clis/deprecations.d.mts +73 -0
- package/dist/clis/deprecations.d.mts.map +1 -0
- package/dist/clis/deprecations.mjs +121 -0
- package/dist/clis/deprecations.mjs.map +1 -0
- package/dist/clis/{index-6CZwrmQi.d.mts → index-DnZYG-8g.d.mts} +2 -2
- package/dist/clis/{index-6CZwrmQi.d.mts.map → index-DnZYG-8g.d.mts.map} +1 -1
- package/dist/clis/index.d.mts +2584 -901
- package/dist/clis/index.d.mts.map +1 -1
- package/dist/clis/index.mjs +1540 -919
- package/dist/clis/index.mjs.map +1 -1
- package/dist/clis/package-style.d.mts +32 -0
- package/dist/clis/package-style.d.mts.map +1 -0
- package/dist/clis/package-style.mjs +102 -0
- package/dist/clis/package-style.mjs.map +1 -0
- package/dist/clis/ph-dir.d.mts +26 -0
- package/dist/clis/ph-dir.d.mts.map +1 -0
- package/dist/clis/ph-dir.mjs +37 -0
- package/dist/clis/ph-dir.mjs.map +1 -0
- package/dist/clis/project-env.d.mts +6 -0
- package/dist/clis/project-env.d.mts.map +1 -1
- package/dist/clis/project-env.mjs +16 -1
- package/dist/clis/project-env.mjs.map +1 -1
- package/dist/clis/real-paths.d.mts +14 -0
- package/dist/clis/real-paths.d.mts.map +1 -0
- package/dist/clis/real-paths.mjs +36 -0
- package/dist/clis/real-paths.mjs.map +1 -0
- package/dist/clis/retired-flags.d.mts +45 -0
- package/dist/clis/retired-flags.d.mts.map +1 -0
- package/dist/clis/retired-flags.mjs +55 -0
- package/dist/clis/retired-flags.mjs.map +1 -0
- package/dist/clis/rolldown-runtime-B4iAMlE-.mjs +35 -0
- package/dist/clis/types-CZU17kAm.d.mts +2510 -0
- package/dist/clis/types-CZU17kAm.d.mts.map +1 -0
- package/dist/clis/utils.d.mts.map +1 -1
- package/dist/clis/utils.mjs.map +1 -1
- package/dist/{config-loader-C6dZB_iX.js → config-loader-B7SqNz8z.js} +24 -6
- package/dist/config-loader-B7SqNz8z.js.map +1 -0
- package/dist/connect/app-shell.d.ts +48 -0
- package/dist/connect/app-shell.d.ts.map +1 -0
- package/dist/connect/app-shell.js +90 -0
- package/dist/connect/app-shell.js.map +1 -0
- package/dist/connect/config-loader.d.ts +8 -1
- package/dist/connect/config-loader.d.ts.map +1 -1
- package/dist/connect/config-loader.js +2 -2
- package/dist/connect/connect-config-schema.d.ts +3 -0
- package/dist/connect/connect-config-schema.js +486 -0
- package/dist/connect/connect-config-schema.js.map +1 -0
- package/dist/connect/image-ref.d.ts +32 -0
- package/dist/connect/image-ref.d.ts.map +1 -0
- package/dist/connect/image-ref.js +80 -0
- package/dist/connect/image-ref.js.map +1 -0
- package/dist/connect/index.d.ts +84 -635
- package/dist/connect/index.d.ts.map +1 -1
- package/dist/connect/index.js +216 -553
- package/dist/connect/index.js.map +1 -1
- package/dist/connect/origin-placeholder.d.ts +52 -0
- package/dist/connect/origin-placeholder.d.ts.map +1 -0
- package/dist/connect/origin-placeholder.js +101 -0
- package/dist/connect/origin-placeholder.js.map +1 -0
- package/dist/connect-config-schema-cBfkNo1b.d.ts +1872 -0
- package/dist/connect-config-schema-cBfkNo1b.d.ts.map +1 -0
- package/dist/constants-5UFY_rXh.d.ts +9 -0
- package/dist/constants-5UFY_rXh.d.ts.map +1 -0
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +22 -6
- package/dist/constants.js.map +1 -1
- package/dist/document-drive/index.d.ts +3 -4
- package/dist/document-drive/index.d.ts.map +1 -1
- package/dist/document-drive/index.js +2 -13
- package/dist/document-drive/index.js.map +1 -1
- package/dist/document-model/action-id.d.ts +3 -0
- package/dist/document-model/action-id.js +59 -0
- package/dist/document-model/action-id.js.map +1 -0
- package/dist/document-model/dispatch.d.ts +25 -0
- package/dist/document-model/dispatch.d.ts.map +1 -0
- package/dist/document-model/dispatch.js +0 -0
- package/dist/document-model/errors.d.ts +3 -0
- package/dist/document-model/errors.js +214 -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 +7 -5521
- package/dist/document-model/utils.d.ts +3 -2
- package/dist/document-model/utils.js +3 -2
- 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/document-model-CqySIaKV.js +5805 -0
- package/dist/document-model-CqySIaKV.js.map +1 -0
- package/dist/host-tokens/index.d.ts +3 -0
- package/dist/host-tokens/index.js +2 -0
- package/dist/host-tokens-DOeyxqLi.js +322 -0
- package/dist/host-tokens-DOeyxqLi.js.map +1 -0
- package/dist/{index-5gwOhPG5.d.ts → index-CUZ8eWun.d.ts} +2 -2
- package/dist/{index-5gwOhPG5.d.ts.map → index-CUZ8eWun.d.ts.map} +1 -1
- package/dist/index-D58WVj_E.d.ts +246 -0
- package/dist/index-D58WVj_E.d.ts.map +1 -0
- package/dist/index.d.ts +5 -5
- package/dist/processors/index.d.ts +2 -2
- package/dist/processors/index.js +177 -68
- package/dist/processors/index.js.map +1 -1
- package/dist/processors/testing.d.ts +22 -0
- package/dist/processors/testing.d.ts.map +1 -0
- package/dist/processors/testing.js +77 -0
- package/dist/processors/testing.js.map +1 -0
- package/dist/purge-CbAV5DVh.js +631 -0
- package/dist/purge-CbAV5DVh.js.map +1 -0
- package/dist/registry/index.d.ts +3 -3
- package/dist/registry/index.js +52 -9
- package/dist/registry/index.js.map +1 -1
- package/dist/registry/manifest-slim.d.ts +2 -2
- package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
- package/dist/types-CV2j3BvH.d.ts +5709 -0
- package/dist/types-CV2j3BvH.d.ts.map +1 -0
- package/dist/{types-CI3ren9F.d.ts → types-D_6ZcaJj.d.ts} +20 -12
- package/dist/types-D_6ZcaJj.d.ts.map +1 -0
- package/dist/{utils-CSF716ux.js → utils-DiV32YIj.js} +45 -2
- package/dist/utils-DiV32YIj.js.map +1 -0
- package/dist/utils-MrLmLEVr.js +78 -0
- package/dist/utils-MrLmLEVr.js.map +1 -0
- package/dist/version-BxLITo9P.d.ts +6 -0
- package/dist/version-BxLITo9P.d.ts.map +1 -0
- package/package.json +37 -3
- package/dist/clis/args/access-token-3Hqv_U8I.mjs +0 -22
- package/dist/clis/args/access-token-3Hqv_U8I.mjs.map +0 -1
- package/dist/clis/args/access-token-C5sKsH2O.d.mts.map +0 -1
- package/dist/clis/args/common-BXabdhiO.mjs.map +0 -1
- package/dist/clis/args/common-Bnm859xU.d.mts.map +0 -1
- package/dist/clis/args/connect-BG3HkYBk.mjs +0 -203
- package/dist/clis/args/connect-BG3HkYBk.mjs.map +0 -1
- package/dist/clis/args/connect-DjeiqXus.d.mts +0 -450
- package/dist/clis/args/connect-DjeiqXus.d.mts.map +0 -1
- package/dist/clis/args/generate-BOItUNvP.mjs.map +0 -1
- package/dist/clis/args/generate-BPBBLeUD.d.mts +0 -103
- package/dist/clis/args/generate-BPBBLeUD.d.mts.map +0 -1
- package/dist/clis/args/help-DS1NlcJQ.mjs.map +0 -1
- package/dist/clis/args/help-DVPTARGn.d.mts.map +0 -1
- package/dist/clis/args/init-CFeTq4Cq.d.mts +0 -52
- package/dist/clis/args/init-CFeTq4Cq.d.mts.map +0 -1
- package/dist/clis/args/init-Dvb42Y87.mjs +0 -67
- package/dist/clis/args/init-Dvb42Y87.mjs.map +0 -1
- package/dist/clis/args/inspect-BjRmtB86.d.mts +0 -13
- package/dist/clis/args/inspect-BjRmtB86.d.mts.map +0 -1
- package/dist/clis/args/inspect-UNQgtuR0.mjs +0 -15
- package/dist/clis/args/inspect-UNQgtuR0.mjs.map +0 -1
- package/dist/clis/args/install-B0tMyUMw.d.mts +0 -37
- package/dist/clis/args/install-B0tMyUMw.d.mts.map +0 -1
- package/dist/clis/args/install-F-27kF6m.mjs +0 -32
- package/dist/clis/args/install-F-27kF6m.mjs.map +0 -1
- package/dist/clis/args/list-Bkfn8Yuo.mjs +0 -7
- package/dist/clis/args/list-Bkfn8Yuo.mjs.map +0 -1
- package/dist/clis/args/list-DrbxA7JJ.d.mts +0 -10
- package/dist/clis/args/list-DrbxA7JJ.d.mts.map +0 -1
- package/dist/clis/args/login-CIFkQExi.mjs +0 -40
- package/dist/clis/args/login-CIFkQExi.mjs.map +0 -1
- package/dist/clis/args/login-CXRJXg71.d.mts.map +0 -1
- package/dist/clis/args/magic-string.es-BWtG0AyA.mjs +0 -1019
- package/dist/clis/args/magic-string.es-BWtG0AyA.mjs.map +0 -1
- package/dist/clis/args/migrate-DkCQRL2D.d.mts +0 -19
- package/dist/clis/args/migrate-DkCQRL2D.d.mts.map +0 -1
- package/dist/clis/args/migrate-DwJGhc2d.mjs +0 -29
- package/dist/clis/args/migrate-DwJGhc2d.mjs.map +0 -1
- package/dist/clis/args/publish-CeW4bOrl.d.mts +0 -16
- package/dist/clis/args/publish-CeW4bOrl.d.mts.map +0 -1
- package/dist/clis/args/publish-DHqlGWmL.mjs +0 -19
- package/dist/clis/args/publish-DHqlGWmL.mjs.map +0 -1
- package/dist/clis/args/registry-DIwES3l2.mjs +0 -23
- package/dist/clis/args/registry-DIwES3l2.mjs.map +0 -1
- package/dist/clis/args/registry-DNH8xuaE.d.mts +0 -17
- package/dist/clis/args/registry-DNH8xuaE.d.mts.map +0 -1
- package/dist/clis/args/service-BBx5GDTc.d.mts.map +0 -1
- package/dist/clis/args/service-Cpjlyeu5.mjs +0 -11
- package/dist/clis/args/service-Cpjlyeu5.mjs.map +0 -1
- package/dist/clis/args/switchboard-CCaAtU56.mjs +0 -85
- package/dist/clis/args/switchboard-CCaAtU56.mjs.map +0 -1
- package/dist/clis/args/switchboard-RrNb1fUH.d.mts +0 -70
- package/dist/clis/args/switchboard-RrNb1fUH.d.mts.map +0 -1
- package/dist/clis/args/uninstall-3U0B8g5c.mjs +0 -16
- package/dist/clis/args/uninstall-3U0B8g5c.mjs.map +0 -1
- package/dist/clis/args/uninstall-CDx7lwxn.d.mts.map +0 -1
- package/dist/clis/args/unpublish-CEDsk6uv.d.mts.map +0 -1
- package/dist/clis/args/unpublish-s9zUh6Gw.mjs +0 -30
- package/dist/clis/args/unpublish-s9zUh6Gw.mjs.map +0 -1
- package/dist/clis/args/vetra-BUNlAAPp.mjs.map +0 -1
- package/dist/clis/args/vetra-DkDaWFPi.d.mts +0 -111
- package/dist/clis/args/vetra-DkDaWFPi.d.mts.map +0 -1
- package/dist/clis/args/vetra-ports.test.d.mts +0 -2
- package/dist/clis/args/vetra-ports.test.mjs +0 -13354
- package/dist/clis/args/vetra-ports.test.mjs.map +0 -1
- package/dist/clis/build-config-CmdMi_wu.mjs.map +0 -1
- package/dist/clis/types-nzer4WIr.d.mts +0 -541
- package/dist/clis/types-nzer4WIr.d.mts.map +0 -1
- package/dist/config-loader-C6dZB_iX.js.map +0 -1
- package/dist/constants-DO4IYxuR.d.ts +0 -9
- package/dist/constants-DO4IYxuR.d.ts.map +0 -1
- package/dist/document-model/index.js.map +0 -1
- package/dist/index-D6833Siv.d.ts +0 -939
- package/dist/index-D6833Siv.d.ts.map +0 -1
- package/dist/types-CI3ren9F.d.ts.map +0 -1
- package/dist/types-CmeoQg_J.d.ts +0 -3337
- package/dist/types-CmeoQg_J.d.ts.map +0 -1
- package/dist/utils-BrKxCmKx.d.ts +0 -18
- package/dist/utils-BrKxCmKx.d.ts.map +0 -1
- package/dist/utils-CSF716ux.js.map +0 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
//#region clis/command-names.ts
|
|
2
2
|
const phCliCommandNames = [
|
|
3
|
+
"run",
|
|
4
|
+
"host",
|
|
3
5
|
"generate",
|
|
4
6
|
"vetra",
|
|
5
7
|
"connect",
|
|
@@ -11,7 +13,10 @@ const phCliCommandNames = [
|
|
|
11
13
|
"registry-login",
|
|
12
14
|
"inspect",
|
|
13
15
|
"is",
|
|
16
|
+
"keyframes",
|
|
17
|
+
"mcp",
|
|
14
18
|
"migrate",
|
|
19
|
+
"model",
|
|
15
20
|
"switchboard",
|
|
16
21
|
"reactor",
|
|
17
22
|
"login",
|
|
@@ -22,7 +27,9 @@ const phCliCommandNames = [
|
|
|
22
27
|
"uninstall",
|
|
23
28
|
"remove"
|
|
24
29
|
];
|
|
30
|
+
/** Set by ph-cmd on the ph-cli it spawns in the project root: where `ph` was run. */
|
|
31
|
+
const CALLER_CWD_ENV = "PH_CALLER_CWD";
|
|
25
32
|
//#endregion
|
|
26
|
-
export { phCliCommandNames };
|
|
33
|
+
export { CALLER_CWD_ENV, phCliCommandNames };
|
|
27
34
|
|
|
28
35
|
//# sourceMappingURL=command-names.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-names.mjs","names":[],"sources":["../../clis/command-names.ts"],"sourcesContent":["// Hardcoded so ph-cmd's dispatch doesn't have to evaluate phCliHelpCommands.\n// The compile-time guard in args/help.ts catches drift.\nexport const phCliCommandNames = [\n \"generate\",\n \"vetra\",\n \"connect\",\n \"build\",\n \"publish\",\n \"list\",\n \"l\",\n \"access-token\",\n \"registry-login\",\n \"inspect\",\n \"is\",\n \"migrate\",\n \"switchboard\",\n \"reactor\",\n \"login\",\n \"logout\",\n \"install\",\n \"add\",\n \"i\",\n \"uninstall\",\n \"remove\",\n] as const;\n"],"mappings":";AAEA,MAAa,oBAAoB;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF"}
|
|
1
|
+
{"version":3,"file":"command-names.mjs","names":[],"sources":["../../clis/command-names.ts"],"sourcesContent":["// Hardcoded so ph-cmd's dispatch doesn't have to evaluate phCliHelpCommands.\n// The compile-time guard in args/help.ts catches drift.\nexport const phCliCommandNames = [\n \"run\",\n \"host\",\n \"generate\",\n \"vetra\",\n \"connect\",\n \"build\",\n \"publish\",\n \"list\",\n \"l\",\n \"access-token\",\n \"registry-login\",\n \"inspect\",\n \"is\",\n \"keyframes\",\n \"mcp\",\n \"migrate\",\n \"model\",\n \"switchboard\",\n \"reactor\",\n \"login\",\n \"logout\",\n \"install\",\n \"add\",\n \"i\",\n \"uninstall\",\n \"remove\",\n] as const;\n\n/** Set by ph-cmd on the ph-cli it spawns in the project root: where `ph` was run. */\nexport const CALLER_CWD_ENV = \"PH_CALLER_CWD\";\n"],"mappings":";AAEA,MAAa,oBAAoB;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;AAGA,MAAa,iBAAiB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
export { 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_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, 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, VERSIONED_DEPENDENCIES, VERSIONED_DEV_DEPENDENCIES, VERSIONED_PEER_DEPENDENCIES, defaultManifest, externalDependencies, externalDevDependencies, packageJsonExports, packageScripts };
|
|
1
|
+
import { $ as packageJsonExports, A as PEER_EXTERNAL_DEPENDENCIES, B as PROJECT_PORT_BAND_VETRA_CONNECT, C as HOME_DIR, D as LEGACY_LINT_FORMAT_FILES, E as LEGACY_LINT_FORMAT_DEPENDENCIES, F as POWERHOUSE_CONFIG_FILE, G as SERVICE_ACTIONS, H as RELATIONAL_DB_PROCESSOR_CLASS, I as POWERHOUSE_GLOBAL_DIR, J as VERSIONED_DEV_DEPENDENCIES, K as SUPERSEDED_PACKAGE_SCRIPTS, L as PROJECT_PORT_BAND_SIZE, M as PH_GLOBAL_DIR_NAME, N as PH_GLOBAL_PROJECT_NAME, O as LOG_LEVELS, P as PIECES_FRAMEWORK_PACKAGE, Q as externalDevDependencies, R as PROJECT_PORT_BAND_STUDIO, S as GRAPHQL_TAG_PACKAGE, T as KYSELY_PACKAGE, U as RETIRED_PACKAGE_SCRIPTS, V as REACTOR_API_PACKAGE, W as SECONDS_IN_DAY, X as defaultManifest, Y as VERSIONED_PEER_DEPENDENCIES, Z as externalDependencies, _ as DEFAULT_VETRA_CONNECT_PORT, a as BOILERPLATE_TRANSITIVE_OVERRIDES, b as FEATURE_DEPENDENCIES, c as DEFAULT_CONNECT_PREVIEW_PORT, d as DEFAULT_EXPIRY_DAYS, et as packageScripts, f as DEFAULT_EXPIRY_SECONDS, g as DEFAULT_TIMEOUT, h as DEFAULT_SWITCHBOARD_PORT, i as BOILERPLATE_DEPENDENCY_OVERRIDES, j as PH_BIN, k as MINIMUM_NODE_VERSION, l as DEFAULT_CONNECT_STUDIO_PORT, m as DEFAULT_RENOWN_URL, n as ANALYTICS_ENGINE_CORE_PACKAGE, o as DEFAULT_CONFIG, p as DEFAULT_REGISTRY_URL, q as VERSIONED_DEPENDENCIES, r as BOILERPLATE_ALLOWED_BUILDS, s as DEFAULT_CONNECT_OUTDIR, u as DEFAULT_DRIVE_ICON, v as DEFAULT_VETRA_DRIVE_ID, w as HOST_PACKAGE_SCRIPTS, x as GRAPHQL_PACKAGE, y as DRIVES_PRESERVE_STRATEGIES, z as PROJECT_PORT_BAND_SWITCHBOARD } from "./types-CZU17kAm.mjs";
|
|
2
|
+
export { ANALYTICS_ENGINE_CORE_PACKAGE, BOILERPLATE_ALLOWED_BUILDS, BOILERPLATE_DEPENDENCY_OVERRIDES, BOILERPLATE_TRANSITIVE_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_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, HOST_PACKAGE_SCRIPTS, KYSELY_PACKAGE, LEGACY_LINT_FORMAT_DEPENDENCIES, LEGACY_LINT_FORMAT_FILES, LOG_LEVELS, MINIMUM_NODE_VERSION, 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, RELATIONAL_DB_PROCESSOR_CLASS, RETIRED_PACKAGE_SCRIPTS, SECONDS_IN_DAY, SERVICE_ACTIONS, SUPERSEDED_PACKAGE_SCRIPTS, VERSIONED_DEPENDENCIES, VERSIONED_DEV_DEPENDENCIES, VERSIONED_PEER_DEPENDENCIES, defaultManifest, externalDependencies, externalDevDependencies, packageJsonExports, packageScripts };
|
|
3
3
|
export {};
|
package/dist/clis/constants.mjs
CHANGED
|
@@ -31,6 +31,18 @@ const PROJECT_PORT_BAND_SIZE = 1e3;
|
|
|
31
31
|
const PROJECT_PORT_BAND_SWITCHBOARD = 7e3;
|
|
32
32
|
const PROJECT_PORT_BAND_STUDIO = 6e3;
|
|
33
33
|
const PROJECT_PORT_BAND_VETRA_CONNECT = 2e3;
|
|
34
|
+
/**
|
|
35
|
+
* Icon for the drives switchboard creates by default, inlined as a data URI.
|
|
36
|
+
*
|
|
37
|
+
* A remote URL is the wrong shape for this: the value is baked into the drive
|
|
38
|
+
* document and rendered by every Connect that opens it, so the icon only
|
|
39
|
+
* appears when that client can reach that host. A desktop or air-gapped install
|
|
40
|
+
* cannot, and the ipfs.io gateway this previously pointed at now answers 403
|
|
41
|
+
* regardless.
|
|
42
|
+
*
|
|
43
|
+
* The mark is drawn dark-on-light so it stays legible against either theme.
|
|
44
|
+
*/
|
|
45
|
+
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";
|
|
34
46
|
const DEFAULT_VETRA_DRIVE_ID = "vetra";
|
|
35
47
|
const MINIMUM_NODE_VERSION = "24.0.0";
|
|
36
48
|
const PH_BIN = "ph-cli-legacy";
|
|
@@ -39,12 +51,18 @@ const PH_GLOBAL_DIR_NAME = ".ph";
|
|
|
39
51
|
const PH_GLOBAL_PROJECT_NAME = ".ph";
|
|
40
52
|
const HOME_DIR = homedir();
|
|
41
53
|
const POWERHOUSE_GLOBAL_DIR = join(HOME_DIR, ".ph");
|
|
42
|
-
const VERSIONED_PEER_DEPENDENCIES = [
|
|
54
|
+
const VERSIONED_PEER_DEPENDENCIES = [
|
|
55
|
+
"document-model",
|
|
56
|
+
"@powerhousedao/reactor-browser",
|
|
57
|
+
"@powerhousedao/connect-core"
|
|
58
|
+
];
|
|
43
59
|
const REACTOR_API_PACKAGE = "@powerhousedao/reactor-api";
|
|
44
60
|
const ANALYTICS_ENGINE_CORE_PACKAGE = "@powerhousedao/analytics-engine-core";
|
|
45
61
|
const GRAPHQL_PACKAGE = "graphql";
|
|
46
62
|
const GRAPHQL_TAG_PACKAGE = "graphql-tag";
|
|
47
63
|
const PIECES_FRAMEWORK_PACKAGE = "@powerhousedao/pieces-framework";
|
|
64
|
+
const KYSELY_PACKAGE = "kysely";
|
|
65
|
+
const RELATIONAL_DB_PROCESSOR_CLASS = "RelationalDbProcessor";
|
|
48
66
|
const PEER_EXTERNAL_DEPENDENCIES = {
|
|
49
67
|
[GRAPHQL_PACKAGE]: {
|
|
50
68
|
peer: "^16",
|
|
@@ -64,7 +82,11 @@ const PEER_EXTERNAL_DEPENDENCIES = {
|
|
|
64
82
|
},
|
|
65
83
|
zod: {
|
|
66
84
|
peer: "^4",
|
|
67
|
-
dev: "4.
|
|
85
|
+
dev: "4.6.5"
|
|
86
|
+
},
|
|
87
|
+
"@tanstack/react-router": {
|
|
88
|
+
peer: "^1.170.41",
|
|
89
|
+
dev: "1.170.41"
|
|
68
90
|
}
|
|
69
91
|
};
|
|
70
92
|
const FEATURE_DEPENDENCIES = {
|
|
@@ -73,13 +95,30 @@ const FEATURE_DEPENDENCIES = {
|
|
|
73
95
|
peerExternal: {},
|
|
74
96
|
devVersioned: []
|
|
75
97
|
},
|
|
98
|
+
relationalDbProcessor: {
|
|
99
|
+
peerVersioned: [],
|
|
100
|
+
peerExternal: { [KYSELY_PACKAGE]: {
|
|
101
|
+
peer: "^0.28",
|
|
102
|
+
dev: "0.28.16"
|
|
103
|
+
} },
|
|
104
|
+
devVersioned: []
|
|
105
|
+
},
|
|
106
|
+
subgraph: {
|
|
107
|
+
peerVersioned: [REACTOR_API_PACKAGE],
|
|
108
|
+
peerExternal: {},
|
|
109
|
+
devVersioned: []
|
|
110
|
+
},
|
|
76
111
|
piece: {
|
|
77
112
|
peerVersioned: [],
|
|
78
113
|
peerExternal: {},
|
|
79
114
|
devVersioned: [PIECES_FRAMEWORK_PACKAGE]
|
|
80
115
|
}
|
|
81
116
|
};
|
|
82
|
-
const VERSIONED_DEPENDENCIES = [
|
|
117
|
+
const VERSIONED_DEPENDENCIES = [
|
|
118
|
+
...VERSIONED_PEER_DEPENDENCIES,
|
|
119
|
+
...FEATURE_DEPENDENCIES.analyticsProcessor.peerVersioned,
|
|
120
|
+
...FEATURE_DEPENDENCIES.subgraph.peerVersioned
|
|
121
|
+
];
|
|
83
122
|
const BOILERPLATE_ALLOWED_BUILDS = [
|
|
84
123
|
"@apollo/protobufjs",
|
|
85
124
|
"@datadog/pprof",
|
|
@@ -96,12 +135,22 @@ const BOILERPLATE_DEPENDENCY_OVERRIDES = {
|
|
|
96
135
|
vite: "8.0.14",
|
|
97
136
|
rolldown: "1.0.2"
|
|
98
137
|
};
|
|
138
|
+
const BOILERPLATE_TRANSITIVE_OVERRIDES = {
|
|
139
|
+
"@solana/kit": "5.5.1",
|
|
140
|
+
"@solana-program/system": "0.10.0",
|
|
141
|
+
"@solana-program/token": "0.9.0"
|
|
142
|
+
};
|
|
99
143
|
const VERSIONED_DEV_DEPENDENCIES = [
|
|
100
144
|
"@powerhousedao/ph-cli",
|
|
101
145
|
"@powerhousedao/reactor",
|
|
102
146
|
"@powerhousedao/shared",
|
|
103
147
|
"@powerhousedao/connect",
|
|
104
|
-
"@powerhousedao/design-system"
|
|
148
|
+
"@powerhousedao/design-system",
|
|
149
|
+
"@powerhousedao/host-core",
|
|
150
|
+
"@powerhousedao/clint",
|
|
151
|
+
"@powerhousedao/desktop",
|
|
152
|
+
"@powerhousedao/vetra-studio",
|
|
153
|
+
"@powerhousedao/switchboard"
|
|
105
154
|
];
|
|
106
155
|
const packageJsonExports = {
|
|
107
156
|
".": {
|
|
@@ -135,9 +184,14 @@ const packageJsonExports = {
|
|
|
135
184
|
},
|
|
136
185
|
"./subgraphs": {
|
|
137
186
|
types: "./dist/types/subgraphs/index.d.ts",
|
|
138
|
-
browser: "./dist/browser/subgraphs/index.js",
|
|
139
187
|
node: "./dist/node/subgraphs/index.mjs"
|
|
140
188
|
},
|
|
189
|
+
"./scalars": {
|
|
190
|
+
types: "./dist/types/scalars/index.d.ts",
|
|
191
|
+
browser: "./dist/browser/scalars/index.js",
|
|
192
|
+
node: "./dist/node/scalars/index.mjs"
|
|
193
|
+
},
|
|
194
|
+
"./connect-routes": { browser: "./dist/browser/connect-routes.js" },
|
|
141
195
|
"./processors": {
|
|
142
196
|
types: "./dist/types/processors/index.d.ts",
|
|
143
197
|
browser: "./dist/browser/processors/index.js",
|
|
@@ -156,20 +210,39 @@ const packageJsonExports = {
|
|
|
156
210
|
};
|
|
157
211
|
const packageScripts = {
|
|
158
212
|
"test:watch": "vitest",
|
|
159
|
-
lint: "oxlint --type-aware --type-check",
|
|
160
|
-
"lint:fix": "oxlint --type-aware --type-check --fix",
|
|
213
|
+
lint: "ph-cli generate connect-routes && oxlint --type-aware --type-check",
|
|
214
|
+
"lint:fix": "ph-cli generate connect-routes && oxlint --type-aware --type-check --fix",
|
|
161
215
|
format: "oxfmt",
|
|
162
216
|
"format:check": "oxfmt --check",
|
|
163
|
-
tsc: "tsc",
|
|
217
|
+
tsc: "ph-cli generate connect-routes && tsc",
|
|
164
218
|
"tsc:watch": "tsc --watch",
|
|
165
219
|
generate: "ph-cli generate",
|
|
166
|
-
connect: "ph-cli connect",
|
|
220
|
+
connect: "ph-cli run connect",
|
|
167
221
|
build: "ph-cli build",
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
222
|
+
vetra: "ph-cli run vetra",
|
|
223
|
+
mcp: "ph-cli mcp"
|
|
224
|
+
};
|
|
225
|
+
const HOST_PACKAGE_SCRIPTS = ["connect", "vetra"];
|
|
226
|
+
const SUPERSEDED_PACKAGE_SCRIPTS = {
|
|
227
|
+
lint: [
|
|
228
|
+
"eslint --config eslint.config.js --cache",
|
|
229
|
+
"eslint --config eslint.config.js --cache --cache-strategy content",
|
|
230
|
+
"oxlint --type-aware --type-check"
|
|
231
|
+
],
|
|
232
|
+
"lint:fix": ["npm run lint -- --fix", "oxlint --type-aware --type-check --fix"],
|
|
233
|
+
tsc: ["tsc"],
|
|
234
|
+
build: ["npm run tsc && npm run tailwind"],
|
|
235
|
+
connect: ["ph-cli connect"],
|
|
236
|
+
vetra: ["ph-cli vetra"]
|
|
237
|
+
};
|
|
238
|
+
const RETIRED_PACKAGE_SCRIPTS = {
|
|
239
|
+
reactor: {
|
|
240
|
+
values: ["ph-cli reactor"],
|
|
241
|
+
replacement: "ph-cli run switchboard",
|
|
242
|
+
host: "switchboard"
|
|
243
|
+
},
|
|
244
|
+
"service-startup": { values: ["bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-startup.sh"] },
|
|
245
|
+
"service-unstartup": { values: ["bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-unstartup.sh"] }
|
|
173
246
|
};
|
|
174
247
|
const externalDependencies = {};
|
|
175
248
|
const LEGACY_LINT_FORMAT_DEPENDENCIES = [
|
|
@@ -216,15 +289,14 @@ const externalDevDependencies = {
|
|
|
216
289
|
"@types/react": "^19.2.3",
|
|
217
290
|
"@types/react-dom": "^19.2.3",
|
|
218
291
|
"@vitejs/plugin-react": "^6.0.1",
|
|
219
|
-
"@vitest/coverage-v8": "
|
|
292
|
+
"@vitest/coverage-v8": "5.0.3",
|
|
220
293
|
oxfmt: "0.68.0",
|
|
221
|
-
oxlint: "1.
|
|
222
|
-
"oxlint-tsgolint": "0.
|
|
294
|
+
oxlint: "1.83.0",
|
|
295
|
+
"oxlint-tsgolint": "7.0.2001",
|
|
223
296
|
tailwindcss: "^4.1.16",
|
|
224
297
|
typescript: "~7.0.2",
|
|
225
298
|
vite: "^8.0.10",
|
|
226
|
-
|
|
227
|
-
vitest: "4.1.1"
|
|
299
|
+
vitest: "5.0.3"
|
|
228
300
|
};
|
|
229
301
|
const defaultManifest = {
|
|
230
302
|
name: "",
|
|
@@ -254,6 +326,6 @@ const DEFAULT_CONFIG = {
|
|
|
254
326
|
}
|
|
255
327
|
};
|
|
256
328
|
//#endregion
|
|
257
|
-
export { 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_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, 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, VERSIONED_DEPENDENCIES, VERSIONED_DEV_DEPENDENCIES, VERSIONED_PEER_DEPENDENCIES, defaultManifest, externalDependencies, externalDevDependencies, packageJsonExports, packageScripts };
|
|
329
|
+
export { ANALYTICS_ENGINE_CORE_PACKAGE, BOILERPLATE_ALLOWED_BUILDS, BOILERPLATE_DEPENDENCY_OVERRIDES, BOILERPLATE_TRANSITIVE_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_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, HOST_PACKAGE_SCRIPTS, KYSELY_PACKAGE, LEGACY_LINT_FORMAT_DEPENDENCIES, LEGACY_LINT_FORMAT_FILES, LOG_LEVELS, MINIMUM_NODE_VERSION, 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, RELATIONAL_DB_PROCESSOR_CLASS, RETIRED_PACKAGE_SCRIPTS, SECONDS_IN_DAY, SERVICE_ACTIONS, SUPERSEDED_PACKAGE_SCRIPTS, VERSIONED_DEPENDENCIES, VERSIONED_DEV_DEPENDENCIES, VERSIONED_PEER_DEPENDENCIES, defaultManifest, externalDependencies, externalDevDependencies, packageJsonExports, packageScripts };
|
|
258
330
|
|
|
259
331
|
//# sourceMappingURL=constants.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.mjs","names":[],"sources":["../../clis/constants.ts"],"sourcesContent":["import { homedir } from \"node:os\";\nimport { join } from \"node:path\";\nimport type { Manifest } from \"../document-model/types.js\";\nimport type { PowerhouseConfig } from \"./types.js\";\n\nexport const SERVICE_ACTIONS = [\n \"start\",\n \"stop\",\n \"status\",\n \"setup\",\n \"restart\",\n] as const;\n\nexport const SECONDS_IN_DAY = 24 * 60 * 60;\nexport const DEFAULT_EXPIRY_DAYS = 7;\nexport const DEFAULT_EXPIRY_SECONDS = DEFAULT_EXPIRY_DAYS * SECONDS_IN_DAY;\n\nexport const DRIVES_PRESERVE_STRATEGIES = [\n \"preserve-all\",\n \"preserve-by-url-and-detach\",\n] as const;\n\nexport const LOG_LEVELS = [\n \"debug\",\n \"info\",\n \"warn\",\n \"error\",\n \"verbose\",\n] as const;\n\nexport const DEFAULT_TIMEOUT = 300 as const;\n\nexport const DEFAULT_CONNECT_STUDIO_PORT = 3000 as const;\n\nexport const DEFAULT_VETRA_CONNECT_PORT = 3001 as const;\n\nexport const DEFAULT_CONNECT_PREVIEW_PORT = 4173 as const;\n\nexport const DEFAULT_CONNECT_OUTDIR = \".ph/connect-build/dist/\" as const;\n\nexport const DEFAULT_RENOWN_URL = \"https://www.renown.id\" as const;\n\nexport const DEFAULT_REGISTRY_URL = \"https://registry.vetra.io\" as const;\n\nexport const DEFAULT_SWITCHBOARD_PORT = 4001 as const;\n\n// Per-project dev-server port bands. `ph init` assigns each project a port\n// triple derived from its name, so two projects never collide and an agent's\n// MCP URL can be baked into .mcp.json before a session starts.\n//\n// Two hard constraints picked these bands, both below 10000:\n//\n// 1. Below the OS ephemeral range. Linux allocates outbound source ports\n// from 32768-60999 (`/proc/sys/net/ipv4/ip_local_port_range`); macOS and\n// Windows start at 49152. A listener parked in that window can lose a\n// race to a transient outbound socket, which would surface as a\n// `--strictPort` failure blaming a project conflict that does not exist.\n// 2. Below 10000, which is where ph-clint starts. ph-clint derives its own\n// per-CLI ports by hashing into 10000-59900, so staying under 10000\n// keeps the two schemes from ever contending.\n//\n// Within those limits the blocks were chosen by measuring which ports the\n// Powerhouse repos actually reference: 2000-2999 has none, 7000-7999 has one,\n// 6000-6999 has five. See PROJECT_PORT_DENYLIST in project-ports.ts for the\n// individual ports skipped inside them.\nexport const PROJECT_PORT_BAND_SIZE = 1000 as const;\nexport const PROJECT_PORT_BAND_SWITCHBOARD = 7000 as const;\nexport const PROJECT_PORT_BAND_STUDIO = 6000 as const;\nexport const PROJECT_PORT_BAND_VETRA_CONNECT = 2000 as const;\n\nexport const DEFAULT_VETRA_DRIVE_ID = \"vetra\" as const;\n\nexport const MINIMUM_NODE_VERSION = \"24.0.0\" as const;\nexport const PH_BIN = \"ph-cli-legacy\" as const;\nexport const POWERHOUSE_CONFIG_FILE = \"powerhouse.config.json\" as const;\nexport const PH_GLOBAL_DIR_NAME = \".ph\" as const;\n// Keep PH_GLOBAL_PROJECT_NAME for backwards compatibility\nexport const PH_GLOBAL_PROJECT_NAME = PH_GLOBAL_DIR_NAME;\n\nexport const HOME_DIR = homedir();\n\nexport const POWERHOUSE_GLOBAL_DIR = join(HOME_DIR, PH_GLOBAL_DIR_NAME);\n\n// Workspace packages that go in peerDependencies of every generated project.\nexport const VERSIONED_PEER_DEPENDENCIES = [\n \"document-model\",\n \"@powerhousedao/reactor-browser\",\n];\n\ntype PeerSpec = { peer: string; dev: string };\n\nexport const REACTOR_API_PACKAGE = \"@powerhousedao/reactor-api\";\nexport const ANALYTICS_ENGINE_CORE_PACKAGE =\n \"@powerhousedao/analytics-engine-core\";\nexport const GRAPHQL_PACKAGE = \"graphql\";\nexport const GRAPHQL_TAG_PACKAGE = \"graphql-tag\";\nexport const PIECES_FRAMEWORK_PACKAGE = \"@powerhousedao/pieces-framework\";\n\n// External peerDependencies of every generated project.\n// `peer` is the consumer-facing range; `dev` is the exact build-tested pin.\n// graphql / graphql-tag are always-on because the workspace packages pulled\n// in by every `ph init` project (codegen, reactor-api, reactor-browser,\n// vetra-packages) declare them as peers — even projects without subgraphs\n// need them in scope so pnpm hoists a single graphql instance.\nexport const PEER_EXTERNAL_DEPENDENCIES = {\n [GRAPHQL_PACKAGE]: { peer: \"^16\", dev: \"16.12.0\" },\n [GRAPHQL_TAG_PACKAGE]: { peer: \"^2\", dev: \"2.12.6\" },\n react: { peer: \"^19\", dev: \"19.2.6\" },\n \"react-dom\": { peer: \"^19\", dev: \"19.2.6\" },\n zod: { peer: \"^4\", dev: \"4.3.6\" },\n} as const satisfies Record<string, PeerSpec>;\n\n// Per-feature deps added dynamically by codegen when required. `devVersioned`\n// is for a workspace package the build inlines, which no consumer provides.\nexport const FEATURE_DEPENDENCIES = {\n analyticsProcessor: {\n peerVersioned: [ANALYTICS_ENGINE_CORE_PACKAGE],\n peerExternal: {},\n devVersioned: [],\n },\n // Each piece is bundled whole (build-pieces.mts), framework included, so the\n // framework is only ever needed to compile the piece's own source.\n piece: {\n peerVersioned: [],\n peerExternal: {},\n devVersioned: [PIECES_FRAMEWORK_PACKAGE],\n },\n} as const satisfies Record<\n string,\n {\n peerVersioned: readonly string[];\n peerExternal: Record<string, PeerSpec>;\n devVersioned: readonly string[];\n }\n>;\n\nexport const VERSIONED_DEPENDENCIES = [\n ...VERSIONED_PEER_DEPENDENCIES,\n ...FEATURE_DEPENDENCIES.analyticsProcessor.peerVersioned,\n];\n\n// Transitive dependencies whose postinstall scripts the generated project\n// trusts. Mirrors the `allowBuilds` map in the boilerplate's\n// pnpm-workspace.yaml and is also passed as `--allow-build` flags to\n// `pnpm dlx @powerhousedao/ph-cli init` so pnpm 11's strict-dep-builds\n// default doesn't prompt during the outer dlx download.\nexport const BOILERPLATE_ALLOWED_BUILDS = [\n \"@apollo/protobufjs\",\n \"@datadog/pprof\",\n \"@parcel/watcher\",\n \"@reown/appkit\",\n \"bufferutil\",\n \"esbuild\",\n \"keccak\",\n \"protobufjs\",\n \"utf-8-validate\",\n] as const;\n\n// Single-version pins the boilerplate enforces on generated projects,\n// avoiding duplicates from coexisting version ranges. Rendered as pnpm\n// `overrides` (pnpm-workspace.yaml) and as yarn v1 `resolutions`\n// (package.json). Generated-project only — never change the monorepo\n// catalog for this (a re-resolution there pulls a tsc-crashing TS6 beta).\nexport const BOILERPLATE_DEPENDENCY_OVERRIDES = {\n \"date-fns\": \"4.3.0\",\n vite: \"8.0.14\",\n rolldown: \"1.0.2\",\n} as const satisfies Record<string, string>;\n\nexport const VERSIONED_DEV_DEPENDENCIES = [\n \"@powerhousedao/ph-cli\",\n \"@powerhousedao/reactor\",\n \"@powerhousedao/shared\",\n \"@powerhousedao/connect\",\n \"@powerhousedao/design-system\",\n];\n\nexport const packageJsonExports = {\n \".\": {\n types: \"./dist/types/index.d.ts\",\n browser: \"./dist/browser/index.js\",\n node: \"./dist/node/index.mjs\",\n },\n \"./reactor\": {\n types: \"./dist/types/reactor/index.d.ts\",\n browser: \"./dist/browser/reactor/index.js\",\n },\n \"./document-models\": {\n types: \"./dist/types/document-models/index.d.ts\",\n browser: \"./dist/browser/document-models/index.js\",\n node: \"./dist/node/document-models/index.mjs\",\n },\n \"./document-models/*\": {\n types: \"./dist/types/document-models/*/index.d.ts\",\n browser: \"./dist/browser/document-models/*/index.js\",\n node: \"./dist/node/document-models/*/index.mjs\",\n },\n \"./editors\": {\n types: \"./dist/types/editors/index.d.ts\",\n browser: \"./dist/browser/editors/index.js\",\n node: \"./dist/node/editors/index.mjs\",\n },\n \"./editors/*\": {\n types: \"./dist/types/editors/*/editor.d.ts\",\n browser: \"./dist/browser/editors/*/editor.js\",\n node: \"./dist/node/editors/*/editor.mjs\",\n },\n \"./subgraphs\": {\n types: \"./dist/types/subgraphs/index.d.ts\",\n browser: \"./dist/browser/subgraphs/index.js\",\n node: \"./dist/node/subgraphs/index.mjs\",\n },\n \"./processors\": {\n types: \"./dist/types/processors/index.d.ts\",\n browser: \"./dist/browser/processors/index.js\",\n node: \"./dist/node/processors/index.mjs\",\n },\n // Node only, as the build is: a piece is loaded by a host process, never by\n // the browser. Without these a package can build a piece and still fail the\n // `packageName/pieces` import a host resolves it through.\n \"./pieces\": {\n types: \"./dist/types/pieces/index.d.ts\",\n node: \"./dist/node/pieces/index.mjs\",\n },\n \"./pieces/*\": {\n types: \"./dist/types/pieces/*/index.d.ts\",\n node: \"./dist/node/pieces/*/index.mjs\",\n },\n \"./manifest\": \"./dist/powerhouse.manifest.json\",\n \"./style.css\": \"./dist/style.css\",\n} as const;\n\nexport const packageScripts = {\n \"test:watch\": \"vitest\",\n lint: \"oxlint --type-aware --type-check\",\n \"lint:fix\": \"oxlint --type-aware --type-check --fix\",\n format: \"oxfmt\",\n \"format:check\": \"oxfmt --check\",\n tsc: \"tsc\",\n \"tsc:watch\": \"tsc --watch\",\n generate: \"ph-cli generate\",\n connect: \"ph-cli connect\",\n build: \"ph-cli build\",\n reactor: \"ph-cli reactor\",\n service: \"ph-cli service\",\n vetra: \"ph-cli vetra\",\n \"service-startup\":\n \"bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-startup.sh\",\n \"service-unstartup\":\n \"bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-unstartup.sh\",\n} as const;\n\nexport const externalDependencies = {} as const;\n\n// eslint/prettier devDependencies present in projects scaffolded before the oxc migration.\n// Stripped from package.json during `ph migrate`.\nexport const LEGACY_LINT_FORMAT_DEPENDENCIES = [\n \"@eslint/js\",\n \"eslint\",\n \"eslint-config-prettier\",\n \"eslint-plugin-prettier\",\n \"eslint-plugin-react\",\n \"eslint-plugin-react-hooks\",\n \"globals\",\n \"prettier\",\n \"typescript-eslint\",\n] as const;\n\n// Legacy lint/format config files written by eslint/prettier boilerplate.\n// Removed from the project root during `ph migrate`.\nexport const LEGACY_LINT_FORMAT_FILES = [\n \"eslint.config.js\",\n \"eslint.config.mjs\",\n \"eslint.config.cjs\",\n \"eslint.config.ts\",\n \".eslintrc\",\n \".eslintrc.js\",\n \".eslintrc.cjs\",\n \".eslintrc.json\",\n \".eslintrc.yml\",\n \".eslintrc.yaml\",\n \".eslintignore\",\n \".prettierrc\",\n \".prettierrc.js\",\n \".prettierrc.cjs\",\n \".prettierrc.json\",\n \".prettierrc.yml\",\n \".prettierrc.yaml\",\n \"prettier.config.js\",\n \"prettier.config.cjs\",\n \"prettier.config.mjs\",\n \".prettierignore\",\n] as const;\n\nexport const externalDevDependencies = {\n \"@electric-sql/pglite\": \"0.3.15\",\n \"@electric-sql/pglite-tools\": \"0.2.20\",\n \"@powerhousedao/document-engineering\": \"1.40.5\",\n \"@tailwindcss/cli\": \"^4.1.18\",\n \"@tailwindcss/vite\": \"^4.1.18\",\n \"@types/node\": \"^24.9.2\",\n \"@types/react\": \"^19.2.3\",\n \"@types/react-dom\": \"^19.2.3\",\n \"@vitejs/plugin-react\": \"^6.0.1\",\n \"@vitest/coverage-v8\": \"4.1.1\",\n oxfmt: \"0.68.0\",\n oxlint: \"1.70.0\",\n \"oxlint-tsgolint\": \"0.23.0\",\n tailwindcss: \"^4.1.16\",\n typescript: \"~7.0.2\",\n vite: \"^8.0.10\",\n \"vite-tsconfig-paths\": \"6.1.1\",\n vitest: \"4.1.1\",\n} as const;\n\nexport const defaultManifest: Manifest = {\n name: \"\",\n description: \"\",\n category: \"\",\n publisher: {\n name: \"\",\n url: \"\",\n },\n documentModels: [],\n editors: [],\n apps: [],\n subgraphs: [],\n processors: [],\n};\n\nconst DEFAULT_DOCUMENT_MODELS_DIR = \"./document-models\";\nconst DEFAULT_EDITORS_DIR = \"./editors\";\nconst DEFAULT_PROCESSORS_DIR = \"./processors\";\nconst DEFAULT_SUBGRAPHS_DIR = \"./subgraphs\";\nconst DEFAULT_IMPORT_SCRIPTS_DIR = \"./scripts\";\nconst DEFAULT_SKIP_FORMAT = false;\nconst DEFAULT_LOG_LEVEL = \"info\";\n\nexport const DEFAULT_CONFIG: PowerhouseConfig = {\n documentModelsDir: DEFAULT_DOCUMENT_MODELS_DIR,\n editorsDir: DEFAULT_EDITORS_DIR,\n processorsDir: DEFAULT_PROCESSORS_DIR,\n subgraphsDir: DEFAULT_SUBGRAPHS_DIR,\n importScriptsDir: DEFAULT_IMPORT_SCRIPTS_DIR,\n skipFormat: DEFAULT_SKIP_FORMAT,\n logLevel: DEFAULT_LOG_LEVEL,\n auth: {\n enabled: false,\n admins: [],\n },\n};\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"constants.mjs","names":[],"sources":["../../clis/constants.ts"],"sourcesContent":["import { homedir } from \"node:os\";\nimport { join } from \"node:path\";\nimport type { Manifest } from \"../document-model/types.js\";\nimport type { PowerhouseConfig } from \"./types.js\";\n\nexport const SERVICE_ACTIONS = [\n \"start\",\n \"stop\",\n \"status\",\n \"setup\",\n \"restart\",\n] as const;\n\nexport const SECONDS_IN_DAY = 24 * 60 * 60;\nexport const DEFAULT_EXPIRY_DAYS = 7;\nexport const DEFAULT_EXPIRY_SECONDS = DEFAULT_EXPIRY_DAYS * SECONDS_IN_DAY;\n\nexport const DRIVES_PRESERVE_STRATEGIES = [\n \"preserve-all\",\n \"preserve-by-url-and-detach\",\n] as const;\n\nexport const LOG_LEVELS = [\n \"debug\",\n \"info\",\n \"warn\",\n \"error\",\n \"verbose\",\n] as const;\n\nexport const DEFAULT_TIMEOUT = 300 as const;\n\nexport const DEFAULT_CONNECT_STUDIO_PORT = 3000 as const;\n\nexport const DEFAULT_VETRA_CONNECT_PORT = 3001 as const;\n\nexport const DEFAULT_CONNECT_PREVIEW_PORT = 4173 as const;\n\nexport const DEFAULT_CONNECT_OUTDIR = \".ph/connect-build/dist/\" as const;\n\nexport const DEFAULT_RENOWN_URL = \"https://www.renown.id\" as const;\n\nexport const DEFAULT_REGISTRY_URL = \"https://registry.vetra.io\" as const;\n\nexport const DEFAULT_SWITCHBOARD_PORT = 4001 as const;\n\n// Per-project dev-server port bands. `ph init` assigns each project a port\n// triple derived from its name, so two projects never collide and an agent's\n// MCP URL can be baked into .mcp.json before a session starts.\n//\n// Two hard constraints picked these bands, both below 10000:\n//\n// 1. Below the OS ephemeral range. Linux allocates outbound source ports\n// from 32768-60999 (`/proc/sys/net/ipv4/ip_local_port_range`); macOS and\n// Windows start at 49152. A listener parked in that window can lose a\n// race to a transient outbound socket, which would surface as a\n// `--strictPort` failure blaming a project conflict that does not exist.\n// 2. Below 10000, which is where ph-clint starts. ph-clint derives its own\n// per-CLI ports by hashing into 10000-59900, so staying under 10000\n// keeps the two schemes from ever contending.\n//\n// Within those limits the blocks were chosen by measuring which ports the\n// Powerhouse repos actually reference: 2000-2999 has none, 7000-7999 has one,\n// 6000-6999 has five. See PROJECT_PORT_DENYLIST in project-ports.ts for the\n// individual ports skipped inside them.\nexport const PROJECT_PORT_BAND_SIZE = 1000 as const;\nexport const PROJECT_PORT_BAND_SWITCHBOARD = 7000 as const;\nexport const PROJECT_PORT_BAND_STUDIO = 6000 as const;\nexport const PROJECT_PORT_BAND_VETRA_CONNECT = 2000 as const;\n\n/**\n * Icon for the drives switchboard creates by default, inlined as a data URI.\n *\n * A remote URL is the wrong shape for this: the value is baked into the drive\n * document and rendered by every Connect that opens it, so the icon only\n * appears when that client can reach that host. A desktop or air-gapped install\n * cannot, and the ipfs.io gateway this previously pointed at now answers 403\n * regardless.\n *\n * The mark is drawn dark-on-light so it stays legible against either theme.\n */\nexport const DEFAULT_DRIVE_ICON =\n \"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\" as const;\n\nexport const DEFAULT_VETRA_DRIVE_ID = \"vetra\" as const;\n\nexport const MINIMUM_NODE_VERSION = \"24.0.0\" as const;\nexport const PH_BIN = \"ph-cli-legacy\" as const;\nexport const POWERHOUSE_CONFIG_FILE = \"powerhouse.config.json\" as const;\nexport const PH_GLOBAL_DIR_NAME = \".ph\" as const;\n// Keep PH_GLOBAL_PROJECT_NAME for backwards compatibility\nexport const PH_GLOBAL_PROJECT_NAME = PH_GLOBAL_DIR_NAME;\n\nexport const HOME_DIR = homedir();\n\nexport const POWERHOUSE_GLOBAL_DIR = join(HOME_DIR, PH_GLOBAL_DIR_NAME);\n\n// Workspace packages that go in peerDependencies of every generated project.\nexport const VERSIONED_PEER_DEPENDENCIES = [\n \"document-model\",\n \"@powerhousedao/reactor-browser\",\n // Offered routes import it; the Connect that loads the package provides it.\n \"@powerhousedao/connect-core\",\n];\n\ntype PeerSpec = { peer: string; dev: string };\n\nexport const REACTOR_API_PACKAGE = \"@powerhousedao/reactor-api\";\nexport const ANALYTICS_ENGINE_CORE_PACKAGE =\n \"@powerhousedao/analytics-engine-core\";\nexport const GRAPHQL_PACKAGE = \"graphql\";\nexport const GRAPHQL_TAG_PACKAGE = \"graphql-tag\";\nexport const PIECES_FRAMEWORK_PACKAGE = \"@powerhousedao/pieces-framework\";\nexport const KYSELY_PACKAGE = \"kysely\";\nexport const RELATIONAL_DB_PROCESSOR_CLASS = \"RelationalDbProcessor\";\n\n// External peerDependencies of every generated project.\n// `peer` is the consumer-facing range; `dev` is the exact build-tested pin.\n// graphql / graphql-tag are always-on because the workspace packages pulled\n// in by every `ph init` project (codegen, reactor-api, reactor-browser,\n// vetra-packages) declare them as peers — even projects without subgraphs\n// need them in scope so pnpm hoists a single graphql instance.\nexport const PEER_EXTERNAL_DEPENDENCIES = {\n [GRAPHQL_PACKAGE]: { peer: \"^16\", dev: \"16.12.0\" },\n [GRAPHQL_TAG_PACKAGE]: { peer: \"^2\", dev: \"2.12.6\" },\n react: { peer: \"^19\", dev: \"19.2.6\" },\n \"react-dom\": { peer: \"^19\", dev: \"19.2.6\" },\n zod: { peer: \"^4\", dev: \"4.6.5\" },\n // Project routes import it; Connect and connect-core take the project's copy.\n \"@tanstack/react-router\": { peer: \"^1.170.41\", dev: \"1.170.41\" },\n} as const satisfies Record<string, PeerSpec>;\n\n// Per-feature deps added dynamically by codegen when required. `devVersioned`\n// is for a workspace package the build inlines, which no consumer provides.\nexport const FEATURE_DEPENDENCIES = {\n analyticsProcessor: {\n peerVersioned: [ANALYTICS_ENGINE_CORE_PACKAGE],\n peerExternal: {},\n devVersioned: [],\n },\n // The schema `ph generate migration-file` writes imports kysely's types, and\n // queries import its `sql`; the host's kysely runs them.\n relationalDbProcessor: {\n peerVersioned: [],\n peerExternal: { [KYSELY_PACKAGE]: { peer: \"^0.28\", dev: \"0.28.16\" } },\n devVersioned: [],\n },\n // A subgraph's BaseSubgraph is the host's: the build leaves it external.\n subgraph: {\n peerVersioned: [REACTOR_API_PACKAGE],\n peerExternal: {},\n devVersioned: [],\n },\n // Each piece is bundled whole (build-pieces.mts), framework included, so the\n // framework is only ever needed to compile the piece's own source.\n piece: {\n peerVersioned: [],\n peerExternal: {},\n devVersioned: [PIECES_FRAMEWORK_PACKAGE],\n },\n} as const satisfies Record<\n string,\n {\n peerVersioned: readonly string[];\n peerExternal: Record<string, PeerSpec>;\n devVersioned: readonly string[];\n }\n>;\n\nexport const VERSIONED_DEPENDENCIES = [\n ...VERSIONED_PEER_DEPENDENCIES,\n ...FEATURE_DEPENDENCIES.analyticsProcessor.peerVersioned,\n ...FEATURE_DEPENDENCIES.subgraph.peerVersioned,\n];\n\n// Transitive dependencies whose postinstall scripts the generated project\n// trusts. Mirrors the `allowBuilds` map in the boilerplate's\n// pnpm-workspace.yaml and is also passed as `--allow-build` flags to\n// `pnpm dlx @powerhousedao/ph-cli init` so pnpm 11's strict-dep-builds\n// default doesn't prompt during the outer dlx download.\nexport const BOILERPLATE_ALLOWED_BUILDS = [\n \"@apollo/protobufjs\",\n \"@datadog/pprof\",\n \"@parcel/watcher\",\n \"@reown/appkit\",\n \"bufferutil\",\n \"esbuild\",\n \"keccak\",\n \"protobufjs\",\n \"utf-8-validate\",\n] as const;\n\n// Single-version pins the boilerplate enforces on generated projects,\n// avoiding duplicates from coexisting version ranges. Rendered as pnpm\n// `overrides` (pnpm-workspace.yaml) and as package.json `resolutions` and\n// `overrides`, with each pin also an exact devDependency. Generated-project\n// only — never change the monorepo catalog for this (a re-resolution there\n// pulls a tsc-crashing TS6 beta).\nexport const BOILERPLATE_DEPENDENCY_OVERRIDES = {\n \"date-fns\": \"4.3.0\",\n vite: \"8.0.14\",\n rolldown: \"1.0.2\",\n} as const satisfies Record<string, string>;\n\n// Pins on packages a generated project only gets through its dependencies,\n// rendered like the ones above but never as devDependencies, so the npm\n// `overrides` entry is the literal version. npm checks a direct dependency's\n// peers against the project: @solana/kit's optional `typescript ^5` peer\n// against the project's TypeScript 7 fails `ph init` with ERESOLVE.\n//\n// They hold @privy-io/react-auth's optional peers to the kit that installs:\n// its open ranges (`@solana-program/system >=0.8.0`) let a fresh install take\n// system 0.16 and token 0.16+, which import `@solana/kit/program-client-core`\n// (kit ^8), while the kit that installs is 5.5.1, and `ph connect build`\n// fails. These are the monorepo lockfile's versions.\nexport const BOILERPLATE_TRANSITIVE_OVERRIDES = {\n \"@solana/kit\": \"5.5.1\",\n \"@solana-program/system\": \"0.10.0\",\n \"@solana-program/token\": \"0.9.0\",\n} as const satisfies Record<string, string>;\n\nexport const VERSIONED_DEV_DEPENDENCIES = [\n \"@powerhousedao/ph-cli\",\n \"@powerhousedao/reactor\",\n \"@powerhousedao/shared\",\n \"@powerhousedao/connect\",\n \"@powerhousedao/design-system\",\n // uniform-runners: the runner modules the scaffolded hosts/*/host.js\n // files name (desktop runner, clint-runner/mastra-runner, and the generic\n // compound they build on); dormant in classic projects until the feature\n // flag defaults on.\n \"@powerhousedao/host-core\",\n \"@powerhousedao/clint\",\n \"@powerhousedao/desktop\",\n // the Vetra Studio plugins the scaffolded vetra host composes (verb dev)\n \"@powerhousedao/vetra-studio\",\n // the switchboard plugins the scaffolded switchboard host composes\n // (workflows, mcp, …) and their PHPluginConfigs types for tsc -p hosts.\n \"@powerhousedao/switchboard\",\n];\n\nexport const packageJsonExports = {\n \".\": {\n types: \"./dist/types/index.d.ts\",\n browser: \"./dist/browser/index.js\",\n node: \"./dist/node/index.mjs\",\n },\n \"./reactor\": {\n types: \"./dist/types/reactor/index.d.ts\",\n browser: \"./dist/browser/reactor/index.js\",\n },\n \"./document-models\": {\n types: \"./dist/types/document-models/index.d.ts\",\n browser: \"./dist/browser/document-models/index.js\",\n node: \"./dist/node/document-models/index.mjs\",\n },\n \"./document-models/*\": {\n types: \"./dist/types/document-models/*/index.d.ts\",\n browser: \"./dist/browser/document-models/*/index.js\",\n node: \"./dist/node/document-models/*/index.mjs\",\n },\n \"./editors\": {\n types: \"./dist/types/editors/index.d.ts\",\n browser: \"./dist/browser/editors/index.js\",\n node: \"./dist/node/editors/index.mjs\",\n },\n \"./editors/*\": {\n types: \"./dist/types/editors/*/editor.d.ts\",\n browser: \"./dist/browser/editors/*/editor.js\",\n node: \"./dist/node/editors/*/editor.mjs\",\n },\n \"./subgraphs\": {\n types: \"./dist/types/subgraphs/index.d.ts\",\n node: \"./dist/node/subgraphs/index.mjs\",\n },\n \"./scalars\": {\n types: \"./dist/types/scalars/index.d.ts\",\n browser: \"./dist/browser/scalars/index.js\",\n node: \"./dist/node/scalars/index.mjs\",\n },\n // The routes the package offers other Connects; built when it has any.\n \"./connect-routes\": {\n browser: \"./dist/browser/connect-routes.js\",\n },\n \"./processors\": {\n types: \"./dist/types/processors/index.d.ts\",\n browser: \"./dist/browser/processors/index.js\",\n node: \"./dist/node/processors/index.mjs\",\n },\n // Node only, as the build is: a piece is loaded by a host process, never by\n // the browser. Without these a package can build a piece and still fail the\n // `packageName/pieces` import a host resolves it through.\n \"./pieces\": {\n types: \"./dist/types/pieces/index.d.ts\",\n node: \"./dist/node/pieces/index.mjs\",\n },\n \"./pieces/*\": {\n types: \"./dist/types/pieces/*/index.d.ts\",\n node: \"./dist/node/pieces/*/index.mjs\",\n },\n \"./manifest\": \"./dist/powerhouse.manifest.json\",\n \"./style.css\": \"./dist/style.css\",\n} as const;\n\nexport const packageScripts = {\n \"test:watch\": \"vitest\",\n // Routes type-check against the tree, which Vetra or a build would write.\n lint: \"ph-cli generate connect-routes && oxlint --type-aware --type-check\",\n \"lint:fix\":\n \"ph-cli generate connect-routes && oxlint --type-aware --type-check --fix\",\n format: \"oxfmt\",\n \"format:check\": \"oxfmt --check\",\n tsc: \"ph-cli generate connect-routes && tsc\",\n \"tsc:watch\": \"tsc --watch\",\n generate: \"ph-cli generate\",\n // The project's hosts (hosts/<name>/host.js), as `ph run <host>`.\n connect: \"ph-cli run connect\",\n build: \"ph-cli build\",\n vetra: \"ph-cli run vetra\",\n // The MCP configs run it as `node --run mcp`, which needs no shell on Windows.\n mcp: \"ph-cli mcp\",\n} as const;\n\n// The scripts of `packageScripts` that run the host of the same name.\nexport const HOST_PACKAGE_SCRIPTS: readonly (keyof typeof packageScripts)[] = [\n \"connect\",\n \"vetra\",\n];\n\n// The values earlier scaffolds wrote for a script of `packageScripts`. `ph\n// migrate` updates a script that still holds one of these, and keeps any\n// other value as the project's own.\nexport const SUPERSEDED_PACKAGE_SCRIPTS: Partial<\n Record<keyof typeof packageScripts, readonly string[]>\n> = {\n lint: [\n \"eslint --config eslint.config.js --cache\",\n \"eslint --config eslint.config.js --cache --cache-strategy content\",\n \"oxlint --type-aware --type-check\",\n ],\n \"lint:fix\": [\n \"npm run lint -- --fix\",\n \"oxlint --type-aware --type-check --fix\",\n ],\n tsc: [\"tsc\"],\n build: [\"npm run tsc && npm run tailwind\"],\n // The classic commands, before the hosts.\n connect: [\"ph-cli connect\"],\n vetra: [\"ph-cli vetra\"],\n};\n\n// Scripts earlier scaffolds wrote under names `packageScripts` no longer has.\n// `ph migrate` handles one that still holds the scaffold's value: it sets\n// `replacement` when the project has `host`, and removes a script that has no\n// replacement, as the file it ran is gone. Any other value is the project's\n// own and stays.\nexport const RETIRED_PACKAGE_SCRIPTS: Record<\n string,\n { values: readonly string[]; replacement?: string; host?: string }\n> = {\n reactor: {\n values: [\"ph-cli reactor\"],\n replacement: \"ph-cli run switchboard\",\n host: \"switchboard\",\n },\n \"service-startup\": {\n values: [\n \"bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-startup.sh\",\n ],\n },\n \"service-unstartup\": {\n values: [\n \"bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-unstartup.sh\",\n ],\n },\n};\n\nexport const externalDependencies = {} as const;\n\n// eslint/prettier devDependencies present in projects scaffolded before the oxc migration.\n// Stripped from package.json during `ph migrate`.\nexport const LEGACY_LINT_FORMAT_DEPENDENCIES = [\n \"@eslint/js\",\n \"eslint\",\n \"eslint-config-prettier\",\n \"eslint-plugin-prettier\",\n \"eslint-plugin-react\",\n \"eslint-plugin-react-hooks\",\n \"globals\",\n \"prettier\",\n \"typescript-eslint\",\n] as const;\n\n// Legacy lint/format config files written by eslint/prettier boilerplate.\n// Removed from the project root during `ph migrate`.\nexport const LEGACY_LINT_FORMAT_FILES = [\n \"eslint.config.js\",\n \"eslint.config.mjs\",\n \"eslint.config.cjs\",\n \"eslint.config.ts\",\n \".eslintrc\",\n \".eslintrc.js\",\n \".eslintrc.cjs\",\n \".eslintrc.json\",\n \".eslintrc.yml\",\n \".eslintrc.yaml\",\n \".eslintignore\",\n \".prettierrc\",\n \".prettierrc.js\",\n \".prettierrc.cjs\",\n \".prettierrc.json\",\n \".prettierrc.yml\",\n \".prettierrc.yaml\",\n \"prettier.config.js\",\n \"prettier.config.cjs\",\n \"prettier.config.mjs\",\n \".prettierignore\",\n] as const;\n\nexport const externalDevDependencies = {\n \"@electric-sql/pglite\": \"0.3.15\",\n \"@electric-sql/pglite-tools\": \"0.2.20\",\n \"@powerhousedao/document-engineering\": \"1.40.5\",\n \"@tailwindcss/cli\": \"^4.1.18\",\n \"@tailwindcss/vite\": \"^4.1.18\",\n \"@types/node\": \"^24.9.2\",\n \"@types/react\": \"^19.2.3\",\n \"@types/react-dom\": \"^19.2.3\",\n \"@vitejs/plugin-react\": \"^6.0.1\",\n \"@vitest/coverage-v8\": \"5.0.3\",\n oxfmt: \"0.68.0\",\n oxlint: \"1.83.0\",\n \"oxlint-tsgolint\": \"7.0.2001\",\n tailwindcss: \"^4.1.16\",\n typescript: \"~7.0.2\",\n vite: \"^8.0.10\",\n vitest: \"5.0.3\",\n} as const;\n\nexport const defaultManifest: Manifest = {\n name: \"\",\n description: \"\",\n category: \"\",\n publisher: {\n name: \"\",\n url: \"\",\n },\n documentModels: [],\n editors: [],\n apps: [],\n subgraphs: [],\n processors: [],\n};\n\nconst DEFAULT_DOCUMENT_MODELS_DIR = \"./document-models\";\nconst DEFAULT_EDITORS_DIR = \"./editors\";\nconst DEFAULT_PROCESSORS_DIR = \"./processors\";\nconst DEFAULT_SUBGRAPHS_DIR = \"./subgraphs\";\nconst DEFAULT_IMPORT_SCRIPTS_DIR = \"./scripts\";\nconst DEFAULT_SKIP_FORMAT = false;\nconst DEFAULT_LOG_LEVEL = \"info\";\n\nexport const DEFAULT_CONFIG: PowerhouseConfig = {\n documentModelsDir: DEFAULT_DOCUMENT_MODELS_DIR,\n editorsDir: DEFAULT_EDITORS_DIR,\n processorsDir: DEFAULT_PROCESSORS_DIR,\n subgraphsDir: DEFAULT_SUBGRAPHS_DIR,\n importScriptsDir: DEFAULT_IMPORT_SCRIPTS_DIR,\n skipFormat: DEFAULT_SKIP_FORMAT,\n logLevel: DEFAULT_LOG_LEVEL,\n auth: {\n enabled: false,\n admins: [],\n },\n};\n"],"mappings":"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"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//#region document-model/definition-types.d.ts
|
|
2
|
+
type DefinitionSource = {
|
|
3
|
+
readonly specifier: `./${string}`;
|
|
4
|
+
readonly exportPath?: readonly string[];
|
|
5
|
+
};
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region clis/definition-sources.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* @experimental The extensions a definition source may have. Hosts evaluate
|
|
10
|
+
* every source as an ES module.
|
|
11
|
+
*/
|
|
12
|
+
export declare const DEFINITION_SOURCE_EXTENSION: RegExp;
|
|
13
|
+
/** @experimental A CommonJS module, which cannot be a definition source. */
|
|
14
|
+
export declare const COMMONJS_DEFINITION_SOURCE: RegExp;
|
|
15
|
+
/** @experimental How to make a CommonJS module a definition source. */
|
|
16
|
+
export declare const COMMONJS_DEFINITION_SOURCE_REPAIR = "Rename the module to .ts, .mts, .js or .mjs and declare its definitions with ES module exports.";
|
|
17
|
+
/**
|
|
18
|
+
* @experimental The entry file names a code-first model directory may use,
|
|
19
|
+
* in the order a reader lists them. A directory with more than one is
|
|
20
|
+
* ambiguous.
|
|
21
|
+
*/
|
|
22
|
+
export declare const DOCUMENT_MODEL_ENTRY_FILES: readonly ["index.ts", "index.mts", "index.tsx", "index.js", "index.mjs", "index.jsx"];
|
|
23
|
+
//#endregion
|
|
24
|
+
export type { DefinitionSource };
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=definition-sources.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition-sources.d.mts","names":[],"sources":["../../document-model/definition-types.ts","../../clis/definition-sources.ts"],"mappings":";KAQY;WACD;WACA;;;;;;;;qBCFE,6BAA2B;;qBAG3B,4BAA0B;;qBAG1B;;;;;;qBAQA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region clis/definition-sources.ts
|
|
2
|
+
/**
|
|
3
|
+
* @experimental The extensions a definition source may have. Hosts evaluate
|
|
4
|
+
* every source as an ES module.
|
|
5
|
+
*/
|
|
6
|
+
const DEFINITION_SOURCE_EXTENSION = /\.(?:[jt]sx?|m[jt]s)$/;
|
|
7
|
+
/** @experimental A CommonJS module, which cannot be a definition source. */
|
|
8
|
+
const COMMONJS_DEFINITION_SOURCE = /\.c[jt]s$/;
|
|
9
|
+
/** @experimental How to make a CommonJS module a definition source. */
|
|
10
|
+
const COMMONJS_DEFINITION_SOURCE_REPAIR = "Rename the module to .ts, .mts, .js or .mjs and declare its definitions with ES module exports.";
|
|
11
|
+
/**
|
|
12
|
+
* @experimental The entry file names a code-first model directory may use,
|
|
13
|
+
* in the order a reader lists them. A directory with more than one is
|
|
14
|
+
* ambiguous.
|
|
15
|
+
*/
|
|
16
|
+
const DOCUMENT_MODEL_ENTRY_FILES = [
|
|
17
|
+
"index.ts",
|
|
18
|
+
"index.mts",
|
|
19
|
+
"index.tsx",
|
|
20
|
+
"index.js",
|
|
21
|
+
"index.mjs",
|
|
22
|
+
"index.jsx"
|
|
23
|
+
];
|
|
24
|
+
//#endregion
|
|
25
|
+
export { COMMONJS_DEFINITION_SOURCE, COMMONJS_DEFINITION_SOURCE_REPAIR, DEFINITION_SOURCE_EXTENSION, DOCUMENT_MODEL_ENTRY_FILES };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=definition-sources.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition-sources.mjs","names":[],"sources":["../../clis/definition-sources.ts"],"sourcesContent":["import type { DefinitionSource } from \"../document-model/definition-types.js\";\n\nexport type { DefinitionSource };\n\n/**\n * @experimental The extensions a definition source may have. Hosts evaluate\n * every source as an ES module.\n */\nexport const DEFINITION_SOURCE_EXTENSION = /\\.(?:[jt]sx?|m[jt]s)$/;\n\n/** @experimental A CommonJS module, which cannot be a definition source. */\nexport const COMMONJS_DEFINITION_SOURCE = /\\.c[jt]s$/;\n\n/** @experimental How to make a CommonJS module a definition source. */\nexport const COMMONJS_DEFINITION_SOURCE_REPAIR =\n \"Rename the module to .ts, .mts, .js or .mjs and declare its definitions with ES module exports.\";\n\n/**\n * @experimental The entry file names a code-first model directory may use,\n * in the order a reader lists them. A directory with more than one is\n * ambiguous.\n */\nexport const DOCUMENT_MODEL_ENTRY_FILES = [\n \"index.ts\",\n \"index.mts\",\n \"index.tsx\",\n \"index.js\",\n \"index.mjs\",\n \"index.jsx\",\n] as const;\n"],"mappings":";;;;;AAQA,MAAa,8BAA8B;;AAG3C,MAAa,6BAA6B;;AAG1C,MAAa,oCACX;;;;;;AAOF,MAAa,6BAA6B;CACxC;CACA;CACA;CACA;CACA;CACA;AACF"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
//#region clis/deprecations.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Things that still work in this release and stop working in the next one:
|
|
4
|
+
* the classic commands, their flags, and the configuration the host files
|
|
5
|
+
* replace. Each one warns once per invocation, on stderr, and changes nothing
|
|
6
|
+
* else. Retired environment variables (no effect any more) are in
|
|
7
|
+
* `retired-flags.ts`.
|
|
8
|
+
*/
|
|
9
|
+
/** The first release without the deprecated behaviour. */
|
|
10
|
+
export declare const DEPRECATIONS_REMOVED_IN = "6.4";
|
|
11
|
+
/** The migration page every deprecation warning links to. */
|
|
12
|
+
export declare const MIGRATION_GUIDE_URL = "https://academy.vetra.io/academy/Reference/HostsAndRunners/MigratingToHosts";
|
|
13
|
+
/**
|
|
14
|
+
* The ids a process has warned about, comma separated. The CLIs it spawns
|
|
15
|
+
* inherit it, so one invocation warns once per id.
|
|
16
|
+
*/
|
|
17
|
+
export declare const DEPRECATIONS_WARNED_ENV = "PH_DEPRECATIONS_WARNED";
|
|
18
|
+
export interface Deprecation {
|
|
19
|
+
/** Stable per subject, e.g. `flag:FEATURE_PLUGIN_HOST_ENABLED`. */
|
|
20
|
+
id: string;
|
|
21
|
+
/** What is deprecated, what replaces it and when it goes, as sentences. */
|
|
22
|
+
text: string;
|
|
23
|
+
}
|
|
24
|
+
type Env = Record<string, string | undefined>;
|
|
25
|
+
/** Whether this invocation already warned about `id`. */
|
|
26
|
+
export declare function deprecationWarned(id: string, env?: Env): boolean;
|
|
27
|
+
/** Marks `id` as warned about, for this process and the CLIs it spawns. */
|
|
28
|
+
export declare function markDeprecationWarned(id: string, env?: Env): void;
|
|
29
|
+
/** The line a deprecation prints: its text and the migration link. */
|
|
30
|
+
export declare function formatDeprecation(text: string): string;
|
|
31
|
+
/**
|
|
32
|
+
* Prints one warning per deprecation to stderr, once per id and invocation.
|
|
33
|
+
* Returns the ones it printed.
|
|
34
|
+
*/
|
|
35
|
+
export declare function warnDeprecations(deprecations: readonly Deprecation[], env?: Env, warn?: (text: string) => void): Deprecation[];
|
|
36
|
+
export interface DeprecatedFlag {
|
|
37
|
+
/** The environment variable. */
|
|
38
|
+
name: string;
|
|
39
|
+
/** Which values ask for the behaviour that goes: a false one, or any. */
|
|
40
|
+
when: "false" | "set";
|
|
41
|
+
/** What the value still does, and what replaces it, as full sentences. */
|
|
42
|
+
message: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Environment variables that still switch something the next release removes.
|
|
46
|
+
* `MCP_ENABLED` and `PH_WORKFLOWS_ENABLED` are not here: they stay.
|
|
47
|
+
*/
|
|
48
|
+
export declare const deprecatedFlags: readonly DeprecatedFlag[];
|
|
49
|
+
/** The deprecated variables that `env` still sets in the way their entry names. */
|
|
50
|
+
export declare function findDeprecatedFlags(env?: Env, flags?: readonly DeprecatedFlag[]): Deprecation[];
|
|
51
|
+
/** Run at CLI start, next to `checkRetiredFlags`. */
|
|
52
|
+
export declare function checkDeprecatedFlags(env?: Env, flags?: readonly DeprecatedFlag[], warn?: (text: string) => void): void;
|
|
53
|
+
/**
|
|
54
|
+
* powerhouse.config.json keys the host files supersede, with their new home.
|
|
55
|
+
* `ph run` ignores them; the classic commands read them until
|
|
56
|
+
* DEPRECATIONS_REMOVED_IN.
|
|
57
|
+
*
|
|
58
|
+
* Keys the scaffolded host files reference (studio.port, reactor.port,
|
|
59
|
+
* vetra.connectPort, assistant.port and the whole connect.* block) stay in a
|
|
60
|
+
* migrated project and are not in this table.
|
|
61
|
+
*/
|
|
62
|
+
export declare const supersededConfigKeys: Readonly<Record<string, string>>;
|
|
63
|
+
/**
|
|
64
|
+
* Connect chrome keys the classic Connect reads from the top level of
|
|
65
|
+
* powerhouse.config.json. Under hosts the generic plugin's config in
|
|
66
|
+
* hosts/connect/host.js carries them, so only the classic path warns.
|
|
67
|
+
*/
|
|
68
|
+
export declare const connectChromeConfigKeys: readonly string[];
|
|
69
|
+
/** The keys of `keys` that `config` (a parsed powerhouse.config.json) sets. */
|
|
70
|
+
export declare function presentConfigKeys(config: unknown, keys: readonly string[]): string[];
|
|
71
|
+
//#endregion
|
|
72
|
+
export {};
|
|
73
|
+
//# sourceMappingURL=deprecations.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deprecations.d.mts","names":[],"sources":["../../clis/deprecations.ts"],"mappings":";;;;;;;;;qBAWa;;qBAGA;;;;;qBAOA;iBAEI;;EAEf;;EAEA;;KAGG,MAAM;;wBAOK,kBAAkB,YAAY,MAAK;;wBAKnC,sBACd,YACA,MAAK;;wBAQS,kBAAkB;;;;;wBAQlB,iBACd,uBAAuB,eACvB,MAAK,KACL,QAAO,wBACN;iBAWc;;EAEf;;EAEA;;EAEA;;;;;;qBAOW,0BAA0B;;wBAavB,oBACd,MAAK,KACL,iBAAgB,mBACf;;wBAkBa,qBACd,MAAK,KACL,iBAAgB,kBAChB,QAAQ;;;;;;;;;;qBAcG,sBAAsB,SAAS;;;;;;qBAiB/B;;wBAiBG,kBACd,iBACA"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { FALSE_VALUES } from "./retired-flags.mjs";
|
|
2
|
+
//#region clis/deprecations.ts
|
|
3
|
+
/**
|
|
4
|
+
* Things that still work in this release and stop working in the next one:
|
|
5
|
+
* the classic commands, their flags, and the configuration the host files
|
|
6
|
+
* replace. Each one warns once per invocation, on stderr, and changes nothing
|
|
7
|
+
* else. Retired environment variables (no effect any more) are in
|
|
8
|
+
* `retired-flags.ts`.
|
|
9
|
+
*/
|
|
10
|
+
/** The first release without the deprecated behaviour. */
|
|
11
|
+
const DEPRECATIONS_REMOVED_IN = "6.4";
|
|
12
|
+
/** The migration page every deprecation warning links to. */
|
|
13
|
+
const MIGRATION_GUIDE_URL = "https://academy.vetra.io/academy/Reference/HostsAndRunners/MigratingToHosts";
|
|
14
|
+
/**
|
|
15
|
+
* The ids a process has warned about, comma separated. The CLIs it spawns
|
|
16
|
+
* inherit it, so one invocation warns once per id.
|
|
17
|
+
*/
|
|
18
|
+
const DEPRECATIONS_WARNED_ENV = "PH_DEPRECATIONS_WARNED";
|
|
19
|
+
function warnedIds(env) {
|
|
20
|
+
return (env["PH_DEPRECATIONS_WARNED"] ?? "").split(",").filter(Boolean);
|
|
21
|
+
}
|
|
22
|
+
/** Whether this invocation already warned about `id`. */
|
|
23
|
+
function deprecationWarned(id, env = process.env) {
|
|
24
|
+
return warnedIds(env).includes(id);
|
|
25
|
+
}
|
|
26
|
+
/** Marks `id` as warned about, for this process and the CLIs it spawns. */
|
|
27
|
+
function markDeprecationWarned(id, env = process.env) {
|
|
28
|
+
const ids = warnedIds(env);
|
|
29
|
+
if (ids.includes(id)) return;
|
|
30
|
+
env[DEPRECATIONS_WARNED_ENV] = [...ids, id].join(",");
|
|
31
|
+
}
|
|
32
|
+
/** The line a deprecation prints: its text and the migration link. */
|
|
33
|
+
function formatDeprecation(text) {
|
|
34
|
+
return `Warning: ${text} See ${MIGRATION_GUIDE_URL}`;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Prints one warning per deprecation to stderr, once per id and invocation.
|
|
38
|
+
* Returns the ones it printed.
|
|
39
|
+
*/
|
|
40
|
+
function warnDeprecations(deprecations, env = process.env, warn = (text) => console.warn(text)) {
|
|
41
|
+
const printed = [];
|
|
42
|
+
for (const deprecation of deprecations) {
|
|
43
|
+
if (deprecationWarned(deprecation.id, env)) continue;
|
|
44
|
+
warn(formatDeprecation(deprecation.text));
|
|
45
|
+
markDeprecationWarned(deprecation.id, env);
|
|
46
|
+
printed.push(deprecation);
|
|
47
|
+
}
|
|
48
|
+
return printed;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Environment variables that still switch something the next release removes.
|
|
52
|
+
* `MCP_ENABLED` and `PH_WORKFLOWS_ENABLED` are not here: they stay.
|
|
53
|
+
*/
|
|
54
|
+
const deprecatedFlags = [{
|
|
55
|
+
name: "FEATURE_PLUGIN_HOST_ENABLED",
|
|
56
|
+
when: "false",
|
|
57
|
+
message: `It keeps Switchboard on the classic boot path, which 6.4 removes: the plugin host is then the only path. Remove the variable: Switchboard then starts the same subsystems through the plugin host. To choose them yourself, list the plugins under \`runner.plugins\` in hosts/switchboard/host.js.`
|
|
58
|
+
}];
|
|
59
|
+
/** The deprecated variables that `env` still sets in the way their entry names. */
|
|
60
|
+
function findDeprecatedFlags(env = process.env, flags = deprecatedFlags) {
|
|
61
|
+
const found = [];
|
|
62
|
+
for (const flag of flags) {
|
|
63
|
+
const value = env[flag.name];
|
|
64
|
+
if (value === void 0) continue;
|
|
65
|
+
const normalized = value.trim().toLowerCase();
|
|
66
|
+
if (!(flag.when === "set" ? normalized !== "" : FALSE_VALUES.has(normalized))) continue;
|
|
67
|
+
found.push({
|
|
68
|
+
id: `flag:${flag.name}`,
|
|
69
|
+
text: `${flag.name}=${value} stops working in 6.4. ${flag.message}`
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
return found;
|
|
73
|
+
}
|
|
74
|
+
/** Run at CLI start, next to `checkRetiredFlags`. */
|
|
75
|
+
function checkDeprecatedFlags(env = process.env, flags = deprecatedFlags, warn) {
|
|
76
|
+
warnDeprecations(findDeprecatedFlags(env, flags), env, warn);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* powerhouse.config.json keys the host files supersede, with their new home.
|
|
80
|
+
* `ph run` ignores them; the classic commands read them until
|
|
81
|
+
* DEPRECATIONS_REMOVED_IN.
|
|
82
|
+
*
|
|
83
|
+
* Keys the scaffolded host files reference (studio.port, reactor.port,
|
|
84
|
+
* vetra.connectPort, assistant.port and the whole connect.* block) stay in a
|
|
85
|
+
* migrated project and are not in this table.
|
|
86
|
+
*/
|
|
87
|
+
const supersededConfigKeys = {
|
|
88
|
+
"studio.host": "runner.host in hosts/connect/host.js",
|
|
89
|
+
"studio.https": "runner.https in hosts/connect/host.js",
|
|
90
|
+
"studio.openBrowser": "runner.openBrowser in hosts/connect/host.js",
|
|
91
|
+
"reactor.https": "config.switchboard.server.https in hosts/switchboard/host.js",
|
|
92
|
+
"reactor.storage": "reactor.backends.<name>.storage in hosts/switchboard/host.js",
|
|
93
|
+
"switchboard.database.url": "reactor.backends.<name>.storage.url in hosts/switchboard/host.js"
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Connect chrome keys the classic Connect reads from the top level of
|
|
97
|
+
* powerhouse.config.json. Under hosts the generic plugin's config in
|
|
98
|
+
* hosts/connect/host.js carries them, so only the classic path warns.
|
|
99
|
+
*/
|
|
100
|
+
const connectChromeConfigKeys = [
|
|
101
|
+
"connect.drives.allowAddDrive",
|
|
102
|
+
"connect.drives.sections",
|
|
103
|
+
"connect.drives.icons",
|
|
104
|
+
"connect.home.background"
|
|
105
|
+
];
|
|
106
|
+
function lookup(config, dottedKey) {
|
|
107
|
+
let cursor = config;
|
|
108
|
+
for (const part of dottedKey.split(".")) {
|
|
109
|
+
if (cursor === null || typeof cursor !== "object") return void 0;
|
|
110
|
+
cursor = cursor[part];
|
|
111
|
+
}
|
|
112
|
+
return cursor;
|
|
113
|
+
}
|
|
114
|
+
/** The keys of `keys` that `config` (a parsed powerhouse.config.json) sets. */
|
|
115
|
+
function presentConfigKeys(config, keys) {
|
|
116
|
+
return keys.filter((key) => lookup(config, key) !== void 0);
|
|
117
|
+
}
|
|
118
|
+
//#endregion
|
|
119
|
+
export { DEPRECATIONS_REMOVED_IN, DEPRECATIONS_WARNED_ENV, MIGRATION_GUIDE_URL, checkDeprecatedFlags, connectChromeConfigKeys, deprecatedFlags, deprecationWarned, findDeprecatedFlags, formatDeprecation, markDeprecationWarned, presentConfigKeys, supersededConfigKeys, warnDeprecations };
|
|
120
|
+
|
|
121
|
+
//# sourceMappingURL=deprecations.mjs.map
|