@powerhousedao/shared 6.2.3 → 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
package/dist/connect/index.js
CHANGED
|
@@ -1,7 +1,153 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as DEFAULT_CONNECT_CONFIG, i as workflowsSettingConflict, n as deepMerge, o as buildRuntimeConfig, r as resolveSourceConnect, t as ConfigLoader } from "../config-loader-B7SqNz8z.js";
|
|
2
2
|
import { JsonConfigAdapter } from "./json-adapter.js";
|
|
3
|
-
import {
|
|
3
|
+
import { connectAiSchema, connectAppSchema, connectBackgroundLayerSchema, connectBackgroundLayersSchema, connectBackgroundSchema, connectBrandingSchema, connectCollectionSchema, connectCompositionEntrySchema, connectConfigSchema, connectConfigSchemaWith, connectDefaultDriveLocalSchema, connectDefaultDriveRemoteSchema, connectDefaultDriveSchema, connectDrivePreserveStrategySchema, connectDriveSectionSchema, connectDriveSectionsSchema, connectDrivesSchema, connectEdgesSchema, connectExplorerIconsSchema, connectHomeSchema, connectImageRefSchema, connectInstanceSchema, connectLengthSchema, connectLoaderSchema, connectOpenPanelSchema, connectPackagesSchema, connectPwaCacheStrategySchema, connectPwaFileHandlerSchema, connectPwaIconSchema, connectPwaManifestSchema, connectPwaRuntimeCachingSchema, connectPwaSchema, connectPwaUrlPatternSchema, connectReactorClientModeSchema, connectReactorFeatureFlagsSchema, connectReactorSchema, connectRemoteBackendSchema, connectRenownAdaptersSchema, connectRenownPrivyAdapterSchema, connectRenownRainbowAdapterSchema, connectRenownSchema, connectRouterSettingsSchema, connectRuntimeConfigSchema, connectRuntimeDefaultDriveRemoteSchema, connectRuntimeDefaultDriveSchema, connectRuntimeDrivesSchema, connectRuntimeInstanceSchema, connectRuntimePwaManifestSchema, connectRuntimePwaSchema, connectSchemedColorSchema, connectSchemedImageSchema, connectSentrySchema, declaredConnectConfigSchema } from "./connect-config-schema.js";
|
|
4
|
+
import { toJSONSchema, z } from "zod";
|
|
4
5
|
import { satisfies, validRange } from "semver";
|
|
6
|
+
//#region connect/background.ts
|
|
7
|
+
const EDGES = [
|
|
8
|
+
"top",
|
|
9
|
+
"right",
|
|
10
|
+
"bottom",
|
|
11
|
+
"left"
|
|
12
|
+
];
|
|
13
|
+
/** A single image is one layer pinned to the bottom-right corner. */
|
|
14
|
+
function normalizeBackground(background) {
|
|
15
|
+
if (!background) return null;
|
|
16
|
+
if (typeof background === "string") return { layers: [{
|
|
17
|
+
src: background,
|
|
18
|
+
position: {
|
|
19
|
+
bottom: 0,
|
|
20
|
+
right: 0
|
|
21
|
+
}
|
|
22
|
+
}] };
|
|
23
|
+
return background;
|
|
24
|
+
}
|
|
25
|
+
/** The light image and, when it differs, the dark one. */
|
|
26
|
+
function imageVariants(src) {
|
|
27
|
+
if (typeof src === "string") return { light: src };
|
|
28
|
+
return src.dark && src.dark !== src.light ? {
|
|
29
|
+
light: src.light,
|
|
30
|
+
dark: src.dark
|
|
31
|
+
} : { light: src.light };
|
|
32
|
+
}
|
|
33
|
+
/** The light colour and, when it differs, the dark one. */
|
|
34
|
+
function colorVariants(color) {
|
|
35
|
+
if (!color) return null;
|
|
36
|
+
if (typeof color === "string") return { light: color };
|
|
37
|
+
return color.dark && color.dark !== color.light ? {
|
|
38
|
+
light: color.light,
|
|
39
|
+
dark: color.dark
|
|
40
|
+
} : { light: color.light };
|
|
41
|
+
}
|
|
42
|
+
/** A number is px; a string is a CSS length as written. */
|
|
43
|
+
function cssLength(length) {
|
|
44
|
+
return typeof length === "number" ? `${length}px` : length.trim();
|
|
45
|
+
}
|
|
46
|
+
const FADE_DIRECTION = {
|
|
47
|
+
top: "to bottom",
|
|
48
|
+
right: "to left",
|
|
49
|
+
bottom: "to top",
|
|
50
|
+
left: "to right"
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* The CSS declarations (kebab-case) that place one layer inside a
|
|
54
|
+
* `position: relative` pane. The pane's content must come after the layers
|
|
55
|
+
* in the DOM (or carry a z-index) to paint above them.
|
|
56
|
+
*/
|
|
57
|
+
function layerDeclarations(layer) {
|
|
58
|
+
const out = {
|
|
59
|
+
position: "absolute",
|
|
60
|
+
"pointer-events": "none",
|
|
61
|
+
"object-fit": "contain"
|
|
62
|
+
};
|
|
63
|
+
const position = layer.position ?? {};
|
|
64
|
+
for (const edge of EDGES) {
|
|
65
|
+
const value = position[edge];
|
|
66
|
+
if (value !== void 0 && value !== null) out[edge] = cssLength(value);
|
|
67
|
+
}
|
|
68
|
+
const centreX = !("left" in out) && !("right" in out);
|
|
69
|
+
const centreY = !("top" in out) && !("bottom" in out);
|
|
70
|
+
if (centreX) out.left = "50%";
|
|
71
|
+
if (centreY) out.top = "50%";
|
|
72
|
+
if (centreX || centreY) out.transform = `translate(${centreX ? "-50%" : "0"}, ${centreY ? "-50%" : "0"})`;
|
|
73
|
+
for (const [key, property] of [
|
|
74
|
+
["width", "width"],
|
|
75
|
+
["height", "height"],
|
|
76
|
+
["minWidth", "min-width"],
|
|
77
|
+
["minHeight", "min-height"],
|
|
78
|
+
["maxWidth", "max-width"],
|
|
79
|
+
["maxHeight", "max-height"]
|
|
80
|
+
]) {
|
|
81
|
+
const value = layer[key];
|
|
82
|
+
if (value !== void 0 && value !== null) out[property] = cssLength(value);
|
|
83
|
+
}
|
|
84
|
+
if (layer.opacity !== void 0 && layer.opacity !== null) out.opacity = String(layer.opacity);
|
|
85
|
+
const fades = [];
|
|
86
|
+
for (const edge of EDGES) {
|
|
87
|
+
const depth = layer.fade?.[edge];
|
|
88
|
+
if (depth === void 0 || depth === null) continue;
|
|
89
|
+
fades.push(`linear-gradient(${FADE_DIRECTION[edge]}, transparent, #000 ${cssLength(depth)})`);
|
|
90
|
+
}
|
|
91
|
+
if (fades.length > 0) {
|
|
92
|
+
out["mask-image"] = fades.join(", ");
|
|
93
|
+
if (fades.length > 1) out["mask-composite"] = "intersect";
|
|
94
|
+
}
|
|
95
|
+
return out;
|
|
96
|
+
}
|
|
97
|
+
/** The declarations as one `style` attribute's text. */
|
|
98
|
+
function layerStyleText(layer) {
|
|
99
|
+
return Object.entries(layerDeclarations(layer)).map(([property, value]) => `${property}: ${value}`).join("; ");
|
|
100
|
+
}
|
|
101
|
+
/** The same declarations with the camelCase keys React's `style` takes. */
|
|
102
|
+
function layerStyle(layer) {
|
|
103
|
+
return Object.fromEntries(Object.entries(layerDeclarations(layer)).map(([property, value]) => [property.replace(/-([a-z])/g, (_, c) => c.toUpperCase()), value]));
|
|
104
|
+
}
|
|
105
|
+
function edgesConflict(edges) {
|
|
106
|
+
if (!edges) return null;
|
|
107
|
+
const set = (edge) => edges[edge] !== void 0 && edges[edge] !== null;
|
|
108
|
+
if (set("top") && set("bottom")) return "set top or bottom, not both";
|
|
109
|
+
if (set("left") && set("right")) return "set left or right, not both";
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
/** What is wrong with a background, one message per problem; empty when it
|
|
113
|
+
* is usable. `at` names the field in the messages. */
|
|
114
|
+
function validateBackground(background, at = "background") {
|
|
115
|
+
const problems = [];
|
|
116
|
+
(normalizeBackground(background)?.layers ?? []).forEach((layer, index) => {
|
|
117
|
+
const where = `${at}.layers[${index}]`;
|
|
118
|
+
if (!(typeof layer.src === "string" ? layer.src : layer.src.light)) problems.push(`${where}.src: an image is required`);
|
|
119
|
+
const conflict = edgesConflict(layer.position);
|
|
120
|
+
if (conflict) problems.push(`${where}.position: ${conflict}`);
|
|
121
|
+
if (layer.opacity !== void 0 && layer.opacity !== null && !(layer.opacity >= 0 && layer.opacity <= 1)) problems.push(`${where}.opacity: must be between 0 and 1`);
|
|
122
|
+
});
|
|
123
|
+
return problems;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* The background with every image reference mapped (resolved to a data URI,
|
|
127
|
+
* rebased to another directory, …). A layer whose light image maps to
|
|
128
|
+
* undefined is dropped; a dark image that does falls back to the light one.
|
|
129
|
+
*/
|
|
130
|
+
function mapBackgroundImages(background, map) {
|
|
131
|
+
const layers = [];
|
|
132
|
+
for (const layer of background.layers) {
|
|
133
|
+
const variants = imageVariants(layer.src);
|
|
134
|
+
const light = map(variants.light);
|
|
135
|
+
if (!light) continue;
|
|
136
|
+
const dark = variants.dark ? map(variants.dark) : void 0;
|
|
137
|
+
layers.push({
|
|
138
|
+
...layer,
|
|
139
|
+
src: dark ? {
|
|
140
|
+
light,
|
|
141
|
+
dark
|
|
142
|
+
} : light
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
return {
|
|
146
|
+
...background,
|
|
147
|
+
layers
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
//#endregion
|
|
5
151
|
//#region connect/dynamic-base.ts
|
|
6
152
|
/**
|
|
7
153
|
* The base a dynamic-base Connect build is compiled against. The build emits
|
|
@@ -16,6 +162,11 @@ import { satisfies, validRange } from "semver";
|
|
|
16
162
|
* dependency) into the browser graph.
|
|
17
163
|
*/
|
|
18
164
|
const DYNAMIC_BASE_PLACEHOLDER = "/__PH_DYNAMIC_BASE__/";
|
|
165
|
+
const PLACEHOLDER_TOKEN = /\/__PH_DYNAMIC_BASE__\//;
|
|
166
|
+
/** Swaps a build-time placeholder in `url` for `runtimeBase`; URLs without one pass through. */
|
|
167
|
+
function resolveDynamicBaseUrl(url, runtimeBase) {
|
|
168
|
+
return url.replace(PLACEHOLDER_TOKEN, runtimeBase);
|
|
169
|
+
}
|
|
19
170
|
//#endregion
|
|
20
171
|
//#region connect/env-config.ts
|
|
21
172
|
/**
|
|
@@ -276,6 +427,11 @@ function getStorageNamespace(basePath) {
|
|
|
276
427
|
return `${ROOT_STORAGE_NAMESPACE}--${slug || "default"}`;
|
|
277
428
|
}
|
|
278
429
|
//#endregion
|
|
430
|
+
//#region connect/layers.ts
|
|
431
|
+
/** Connect's cascade layers, Tailwind's `properties` first: package CSS goes in
|
|
432
|
+
* external-packages, above Connect's reset and below its utilities. */
|
|
433
|
+
const CONNECT_LAYER_ORDER = "@layer properties, theme, base, components, external-packages, utilities;";
|
|
434
|
+
//#endregion
|
|
279
435
|
//#region connect/pwa-config.ts
|
|
280
436
|
const MANIFEST_SCALAR_KEYS = [
|
|
281
437
|
"name",
|
|
@@ -436,6 +592,17 @@ function mergePwaConfig(packageContributions, projectConfig, onWarn = () => {})
|
|
|
436
592
|
function toRegExpOrString(pattern) {
|
|
437
593
|
return typeof pattern === "string" ? pattern : new RegExp(pattern.source, pattern.flags);
|
|
438
594
|
}
|
|
595
|
+
const FILE_PATH = /\.(?!html?$)[a-z0-9]+$/i;
|
|
596
|
+
/**
|
|
597
|
+
* Whether the service worker answers a navigation to `pathname` with the app
|
|
598
|
+
* shell. A request for a file, one with an extension or one of the project's
|
|
599
|
+
* static files (`staticFiles`, relative to `scopePath`), gets the file instead.
|
|
600
|
+
*/
|
|
601
|
+
function isAppShellNavigation(pathname, scopePath, staticFiles) {
|
|
602
|
+
if (FILE_PATH.test(pathname)) return false;
|
|
603
|
+
const path = pathname.startsWith(scopePath) ? pathname.slice(scopePath.length) : pathname;
|
|
604
|
+
return !staticFiles.includes(path.replace(/^\/+/, ""));
|
|
605
|
+
}
|
|
439
606
|
//#endregion
|
|
440
607
|
//#region connect/pwa-manifest.ts
|
|
441
608
|
/**
|
|
@@ -525,560 +692,39 @@ const powerhousePackageSchema = {
|
|
|
525
692
|
}
|
|
526
693
|
}
|
|
527
694
|
};
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
additionalProperties: false,
|
|
555
|
-
required: ["source"],
|
|
556
|
-
properties: {
|
|
557
|
-
source: {
|
|
558
|
-
type: "string",
|
|
559
|
-
description: "RegExp source."
|
|
560
|
-
},
|
|
561
|
-
flags: {
|
|
562
|
-
type: "string",
|
|
563
|
-
description: "RegExp flags (e.g. 'i')."
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
}]
|
|
567
|
-
};
|
|
568
|
-
const pwaIconSchema = {
|
|
569
|
-
type: "object",
|
|
570
|
-
additionalProperties: false,
|
|
571
|
-
required: ["src"],
|
|
572
|
-
properties: {
|
|
573
|
-
src: { type: "string" },
|
|
574
|
-
sizes: { type: "string" },
|
|
575
|
-
type: { type: "string" },
|
|
576
|
-
purpose: { type: "string" }
|
|
577
|
-
}
|
|
578
|
-
};
|
|
579
|
-
const phConnectRuntimeConfigSchema = {
|
|
580
|
-
type: "object",
|
|
581
|
-
additionalProperties: false,
|
|
582
|
-
description: "Connect-specific UI customisations. All fields optional; omit the section entirely for default behaviour.",
|
|
583
|
-
properties: {
|
|
584
|
-
branding: {
|
|
585
|
-
type: "object",
|
|
586
|
-
additionalProperties: false,
|
|
587
|
-
description: "App identity and visual branding.",
|
|
588
|
-
properties: {
|
|
589
|
-
appName: {
|
|
590
|
-
type: "string",
|
|
591
|
-
description: "Browser tab title and any in-app brand text. Defaults to 'Powerhouse Connect'."
|
|
592
|
-
},
|
|
593
|
-
homeBackground: {
|
|
594
|
-
type: ["string", "null"],
|
|
595
|
-
description: "Hero image on the empty home screen. URL or path to override; null or omitted uses the bundled default image."
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
},
|
|
599
|
-
app: {
|
|
600
|
-
type: "object",
|
|
601
|
-
additionalProperties: false,
|
|
602
|
-
description: "Top-level Connect application behaviour.",
|
|
603
|
-
properties: {
|
|
604
|
-
logLevel: {
|
|
605
|
-
type: "string",
|
|
606
|
-
enum: [
|
|
607
|
-
"debug",
|
|
608
|
-
"info",
|
|
609
|
-
"warn",
|
|
610
|
-
"error"
|
|
611
|
-
],
|
|
612
|
-
description: "Log level applied by Connect's logger at boot. Affects browser-side output only.",
|
|
613
|
-
default: "info"
|
|
614
|
-
},
|
|
615
|
-
basePath: {
|
|
616
|
-
type: "string",
|
|
617
|
-
description: "Base path Connect is mounted under (e.g. '/connect' for subpath deploys). Normalised at runtime to start and end with '/'. Defaults to the build-time BASE_URL.",
|
|
618
|
-
default: "/"
|
|
619
|
-
},
|
|
620
|
-
offline: {
|
|
621
|
-
type: "boolean",
|
|
622
|
-
description: "When true (default), the build emits a precaching service worker so Connect's app shell works offline, and the SPA registers it at boot. Set false to opt this deployment out: no service worker is built, the SPA skips registration, and any previously-installed worker is unregistered.",
|
|
623
|
-
default: true
|
|
624
|
-
},
|
|
625
|
-
studioMode: {
|
|
626
|
-
type: "boolean",
|
|
627
|
-
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.",
|
|
628
|
-
default: false
|
|
629
|
-
},
|
|
630
|
-
workflowsEnabled: {
|
|
631
|
-
type: "boolean",
|
|
632
|
-
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."
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
|
-
},
|
|
636
|
-
ai: {
|
|
637
|
-
type: "object",
|
|
638
|
-
additionalProperties: false,
|
|
639
|
-
description: "AI assistant (chat) behaviour.",
|
|
640
|
-
properties: { assistantEnabled: {
|
|
641
|
-
type: "boolean",
|
|
642
|
-
description: "When true, Connect mounts the in-browser AI assistant (bottom-right chat FAB that talks to a user-configured OpenAI-compatible endpoint and acts on the reactor). Disabled by default.",
|
|
643
|
-
default: false
|
|
644
|
-
} }
|
|
645
|
-
},
|
|
646
|
-
packages: {
|
|
647
|
-
type: "object",
|
|
648
|
-
additionalProperties: false,
|
|
649
|
-
description: "Runtime behaviour for the Connect package manager (separate from top-level `packages[]`, which lists which packages to load).",
|
|
650
|
-
properties: {
|
|
651
|
-
externalEnabled: {
|
|
652
|
-
type: "boolean",
|
|
653
|
-
description: "When false, Connect refuses to load any package that wasn't bundled at build time. Affirmative replacement for the legacy PH_CONNECT_EXTERNAL_PACKAGES_DISABLED env var.",
|
|
654
|
-
default: true
|
|
655
|
-
},
|
|
656
|
-
liveReload: {
|
|
657
|
-
type: "boolean",
|
|
658
|
-
description: "When true, Connect subscribes to the static-mode `/__packages` SSE channel so live publishes flow into the running tab without a page reload. Only works under hosting that serves this channel (e.g. ph-clint static mode).",
|
|
659
|
-
default: false
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
},
|
|
663
|
-
drives: {
|
|
664
|
-
type: "object",
|
|
665
|
-
additionalProperties: false,
|
|
666
|
-
description: "Default-drive and add-drive UI behaviour.",
|
|
667
|
-
properties: {
|
|
668
|
-
allowAddDrive: {
|
|
669
|
-
type: "boolean",
|
|
670
|
-
description: "When false, the SPA hides the 'add drive' affordance entirely (top-level). Per-section overrides live in `sections.{remote,local}.allowAdd`.",
|
|
671
|
-
default: true
|
|
672
|
-
},
|
|
673
|
-
defaultDrives: {
|
|
674
|
-
type: "array",
|
|
675
|
-
description: "Drives the SPA auto-connects to on first load. Each entry is either a remote drive (a URL, with optional name/icon overrides) or a local drive (created locally on first boot, with a stable id and optional name/icon/app).",
|
|
676
|
-
default: [],
|
|
677
|
-
items: { oneOf: [{
|
|
678
|
-
type: "object",
|
|
679
|
-
additionalProperties: false,
|
|
680
|
-
required: ["url"],
|
|
681
|
-
properties: {
|
|
682
|
-
url: { type: "string" },
|
|
683
|
-
name: { type: ["string", "null"] },
|
|
684
|
-
icon: { type: ["string", "null"] }
|
|
685
|
-
}
|
|
686
|
-
}, {
|
|
687
|
-
type: "object",
|
|
688
|
-
additionalProperties: false,
|
|
689
|
-
required: ["local", "id"],
|
|
690
|
-
properties: {
|
|
691
|
-
local: {
|
|
692
|
-
const: true,
|
|
693
|
-
description: "Discriminator: this entry is a local drive created on first boot."
|
|
694
|
-
},
|
|
695
|
-
id: {
|
|
696
|
-
type: "string",
|
|
697
|
-
description: "Stable drive id. The drive is created with this id on first boot and is not re-created on later boots."
|
|
698
|
-
},
|
|
699
|
-
name: { type: ["string", "null"] },
|
|
700
|
-
icon: { type: ["string", "null"] },
|
|
701
|
-
app: {
|
|
702
|
-
type: "string",
|
|
703
|
-
description: "Drive app (preferred editor) to open on the drive."
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
}] }
|
|
707
|
-
},
|
|
708
|
-
preserveStrategy: {
|
|
709
|
-
type: "string",
|
|
710
|
-
enum: ["preserve-all", "preserve-by-url-and-detach"],
|
|
711
|
-
description: "Strategy applied when defaultDrives change between deploys. 'preserve-all' keeps user-added drives untouched; 'preserve-by-url-and-detach' detaches removed default drives. No schema default — opt-in only."
|
|
712
|
-
},
|
|
713
|
-
sections: {
|
|
714
|
-
type: "object",
|
|
715
|
-
additionalProperties: false,
|
|
716
|
-
description: "Per-section visibility and affordance toggles. `remote` covers what was historically split into 'public' + 'cloud'; `local` is browser-local drives.",
|
|
717
|
-
properties: {
|
|
718
|
-
remote: driveSectionSchema,
|
|
719
|
-
local: driveSectionSchema
|
|
720
|
-
}
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
|
-
},
|
|
724
|
-
renown: {
|
|
725
|
-
type: "object",
|
|
726
|
-
additionalProperties: false,
|
|
727
|
-
description: "Renown identity / authentication coordinates.",
|
|
728
|
-
properties: {
|
|
729
|
-
url: {
|
|
730
|
-
type: "string",
|
|
731
|
-
description: "Renown auth service URL.",
|
|
732
|
-
default: "https://www.renown.id"
|
|
733
|
-
},
|
|
734
|
-
networkId: {
|
|
735
|
-
type: "string",
|
|
736
|
-
description: "CAIP-2 network namespace (e.g. 'eip155').",
|
|
737
|
-
default: "eip155"
|
|
738
|
-
},
|
|
739
|
-
chainId: {
|
|
740
|
-
type: "number",
|
|
741
|
-
description: "CAIP-2 chain reference within the network namespace.",
|
|
742
|
-
default: 1
|
|
743
|
-
},
|
|
744
|
-
namespace: {
|
|
745
|
-
type: "string",
|
|
746
|
-
description: "Renown localStorage namespace; share it across Connects to share login."
|
|
747
|
-
},
|
|
748
|
-
switchboardUrl: {
|
|
749
|
-
type: "string",
|
|
750
|
-
description: "Switchboard GraphQL URL. When set, Connect enables in-page (no-redirect) Renown sign-in; otherwise it falls back to the redirect flow via `url`."
|
|
751
|
-
},
|
|
752
|
-
adapters: {
|
|
753
|
-
type: "object",
|
|
754
|
-
additionalProperties: false,
|
|
755
|
-
description: "Per-adapter wallet config for in-page auth. Presence of an adapter key enables it; omit or leave empty for redirect-only behaviour.",
|
|
756
|
-
properties: {
|
|
757
|
-
rainbow: {
|
|
758
|
-
type: "object",
|
|
759
|
-
additionalProperties: false,
|
|
760
|
-
description: "wagmi + RainbowKit external-wallet adapter config.",
|
|
761
|
-
properties: {
|
|
762
|
-
walletConnectProjectId: {
|
|
763
|
-
type: "string",
|
|
764
|
-
description: "WalletConnect project id; required for this adapter to function."
|
|
765
|
-
},
|
|
766
|
-
infuraProjectId: {
|
|
767
|
-
type: "string",
|
|
768
|
-
description: "Optional Infura project id used to build RPC transports."
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
},
|
|
772
|
-
privy: {
|
|
773
|
-
type: "object",
|
|
774
|
-
additionalProperties: false,
|
|
775
|
-
description: "Privy embedded/social adapter config.",
|
|
776
|
-
properties: {
|
|
777
|
-
appId: {
|
|
778
|
-
type: "string",
|
|
779
|
-
description: "Privy application id; required for this adapter to function."
|
|
780
|
-
},
|
|
781
|
-
clientId: {
|
|
782
|
-
type: "string",
|
|
783
|
-
description: "Optional Privy client id."
|
|
784
|
-
},
|
|
785
|
-
methods: {
|
|
786
|
-
type: "array",
|
|
787
|
-
description: "Login methods this adapter offers; default per adapter when omitted.",
|
|
788
|
-
items: { type: "string" }
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
},
|
|
796
|
-
sentry: {
|
|
797
|
-
type: "object",
|
|
798
|
-
additionalProperties: false,
|
|
799
|
-
description: "Sentry error-tracking coordinates. Set `dsn` to enable Sentry; leave `dsn` null to disable. The Sentry release tag stays build-time (stamped via Vite's `define` from WORKSPACE_VERSION) so it always matches the sourcemaps uploaded by CI.",
|
|
800
|
-
properties: {
|
|
801
|
-
dsn: {
|
|
802
|
-
type: ["string", "null"],
|
|
803
|
-
description: "Sentry DSN URL. `null` disables Sentry entirely; the SPA never loads the Sentry SDK chunk.",
|
|
804
|
-
default: null
|
|
805
|
-
},
|
|
806
|
-
env: {
|
|
807
|
-
type: "string",
|
|
808
|
-
description: "Sentry environment label, surfaced as the `environment` tag on every event.",
|
|
809
|
-
default: "dev"
|
|
810
|
-
},
|
|
811
|
-
tracing: {
|
|
812
|
-
type: "boolean",
|
|
813
|
-
description: "Enable Sentry performance tracing.",
|
|
814
|
-
default: false
|
|
815
|
-
}
|
|
816
|
-
}
|
|
817
|
-
},
|
|
818
|
-
openPanel: {
|
|
819
|
-
type: "object",
|
|
820
|
-
additionalProperties: false,
|
|
821
|
-
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.",
|
|
822
|
-
properties: {
|
|
823
|
-
clientId: {
|
|
824
|
-
type: "string",
|
|
825
|
-
description: "OpenPanel client id. Empty string disables OpenPanel entirely.",
|
|
826
|
-
default: ""
|
|
827
|
-
},
|
|
828
|
-
apiUrl: {
|
|
829
|
-
type: "string",
|
|
830
|
-
description: "OpenPanel API URL for self-hosted instances (e.g. 'https://openpanel.example/api'). Omit to use OpenPanel's hosted API."
|
|
831
|
-
},
|
|
832
|
-
trackUiEvents: {
|
|
833
|
-
type: "boolean",
|
|
834
|
-
description: "Track UI events.",
|
|
835
|
-
default: true
|
|
836
|
-
},
|
|
837
|
-
trackOperations: {
|
|
838
|
-
type: "boolean",
|
|
839
|
-
description: "Track document operations.",
|
|
840
|
-
default: true
|
|
841
|
-
}
|
|
842
|
-
}
|
|
843
|
-
},
|
|
844
|
-
instance: {
|
|
845
|
-
type: "object",
|
|
846
|
-
additionalProperties: false,
|
|
847
|
-
required: ["namespace", "reactorWorker"],
|
|
848
|
-
description: "Per-instance identity. Lets one origin host multiple isolated Connect instances, each with its own storage + SharedWorker namespace.",
|
|
849
|
-
properties: {
|
|
850
|
-
namespace: {
|
|
851
|
-
type: ["string", "null"],
|
|
852
|
-
description: "Explicit storage/SharedWorker namespace for this instance. `null` derives it from the base path (and, later, the configured endpoint), so root deployments stay byte-identical.",
|
|
853
|
-
default: null
|
|
854
|
-
},
|
|
855
|
-
reactorWorker: {
|
|
856
|
-
type: "boolean",
|
|
857
|
-
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.",
|
|
858
|
-
default: false
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
},
|
|
862
|
-
reactor: {
|
|
863
|
-
type: "object",
|
|
864
|
-
additionalProperties: false,
|
|
865
|
-
description: "Settings for the reactor Connect runs in the browser, on the main thread or in the shared worker alike.",
|
|
866
|
-
properties: {
|
|
867
|
-
featureFlags: {
|
|
868
|
-
type: "object",
|
|
869
|
-
additionalProperties: false,
|
|
870
|
-
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.",
|
|
871
|
-
properties: {
|
|
872
|
-
documentDecisions: {
|
|
873
|
-
type: "boolean",
|
|
874
|
-
description: "Decide writes from the document stream rather than the document meta cache, so a backdated deletion denies the operations that sort after it.",
|
|
875
|
-
default: false
|
|
876
|
-
},
|
|
877
|
-
authEnforcement: {
|
|
878
|
-
type: "boolean",
|
|
879
|
-
description: "Enforce the auth scope's policy at admission, replay, and read. Requires documentDecisions.",
|
|
880
|
-
default: false
|
|
881
|
-
},
|
|
882
|
-
authGroups: {
|
|
883
|
-
type: "boolean",
|
|
884
|
-
description: "Let `{ group }` principals match against the rosters of the group documents a policy names. Requires authEnforcement.",
|
|
885
|
-
default: false
|
|
886
|
-
},
|
|
887
|
-
authConditions: {
|
|
888
|
-
type: "boolean",
|
|
889
|
-
description: "Evaluate `where` and `match` conditions on grants. Requires authGroups. Do not enable on a fleet `preflight:auth` reports as crossing a reducer version.",
|
|
890
|
-
default: false
|
|
891
|
-
}
|
|
892
|
-
}
|
|
893
|
-
},
|
|
894
|
-
createSignaturePolicy: {
|
|
895
|
-
type: "string",
|
|
896
|
-
enum: ["legacy", "v2-required"],
|
|
897
|
-
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.",
|
|
898
|
-
default: "v2-required"
|
|
899
|
-
},
|
|
900
|
-
unsupportedStoredDocuments: {
|
|
901
|
-
type: "string",
|
|
902
|
-
enum: ["refuse", "read-only"],
|
|
903
|
-
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.",
|
|
904
|
-
default: "refuse"
|
|
905
|
-
}
|
|
906
|
-
}
|
|
907
|
-
},
|
|
908
|
-
pwa: {
|
|
909
|
-
type: "object",
|
|
910
|
-
additionalProperties: false,
|
|
911
|
-
description: "Progressive-web-app / service-worker overrides, layered on Connect's built-in PWA defaults at build time. Scalar fields deep-merge (this layer wins); the array members (icons, file_handlers, globs, runtimeCaching and denylist patterns) are additive; maximumFileSizeToCacheInBytes takes the max across contributors. (categories is not set here — it is derived from the manifest's category field.) Only applied when connect.app.offline is true.",
|
|
912
|
-
properties: {
|
|
913
|
-
manifest: {
|
|
914
|
-
type: "object",
|
|
915
|
-
additionalProperties: false,
|
|
916
|
-
description: "Web-app-manifest field overrides.",
|
|
917
|
-
properties: {
|
|
918
|
-
name: { type: "string" },
|
|
919
|
-
short_name: { type: "string" },
|
|
920
|
-
description: { type: "string" },
|
|
921
|
-
theme_color: { type: "string" },
|
|
922
|
-
background_color: { type: "string" },
|
|
923
|
-
display: {
|
|
924
|
-
type: "string",
|
|
925
|
-
enum: [
|
|
926
|
-
"fullscreen",
|
|
927
|
-
"standalone",
|
|
928
|
-
"minimal-ui",
|
|
929
|
-
"browser"
|
|
930
|
-
]
|
|
931
|
-
},
|
|
932
|
-
start_url: { type: "string" },
|
|
933
|
-
scope: { type: "string" },
|
|
934
|
-
icons: {
|
|
935
|
-
type: "array",
|
|
936
|
-
description: "Icons appended to the built-in set and de-duplicated by (src, sizes, purpose).",
|
|
937
|
-
items: pwaIconSchema
|
|
938
|
-
},
|
|
939
|
-
file_handlers: {
|
|
940
|
-
type: "array",
|
|
941
|
-
description: "File associations appended after Connect's built-in .phd/.phdm handler and de-duplicated on the whole entry. Entries only declare accepted types; there is no action field, because opening the files requires Connect's own runtime handling, so every handler opens at the app root.",
|
|
942
|
-
items: {
|
|
943
|
-
type: "object",
|
|
944
|
-
additionalProperties: false,
|
|
945
|
-
required: ["accept"],
|
|
946
|
-
properties: {
|
|
947
|
-
accept: {
|
|
948
|
-
type: "object",
|
|
949
|
-
description: "MIME type → file extensions. Each extension must start with '.'; browsers ignore entries without it.",
|
|
950
|
-
additionalProperties: {
|
|
951
|
-
type: "array",
|
|
952
|
-
items: {
|
|
953
|
-
type: "string",
|
|
954
|
-
pattern: "^\\."
|
|
955
|
-
}
|
|
956
|
-
}
|
|
957
|
-
},
|
|
958
|
-
icons: {
|
|
959
|
-
type: "array",
|
|
960
|
-
description: "OS-level file-type icons.",
|
|
961
|
-
items: pwaIconSchema
|
|
962
|
-
},
|
|
963
|
-
launch_type: {
|
|
964
|
-
type: "string",
|
|
965
|
-
enum: ["single-client", "multiple-clients"]
|
|
966
|
-
}
|
|
967
|
-
}
|
|
968
|
-
}
|
|
969
|
-
},
|
|
970
|
-
launch_handler: {
|
|
971
|
-
type: "object",
|
|
972
|
-
additionalProperties: false,
|
|
973
|
-
required: ["client_mode"],
|
|
974
|
-
description: "How the OS launches the app for handled files/links. Connect defaults to focus-existing.",
|
|
975
|
-
properties: { client_mode: {
|
|
976
|
-
type: "string",
|
|
977
|
-
enum: [
|
|
978
|
-
"auto",
|
|
979
|
-
"focus-existing",
|
|
980
|
-
"navigate-existing",
|
|
981
|
-
"navigate-new"
|
|
982
|
-
]
|
|
983
|
-
} }
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
},
|
|
987
|
-
globPatterns: {
|
|
988
|
-
type: "array",
|
|
989
|
-
items: { type: "string" },
|
|
990
|
-
description: "Extra Workbox precache globs, unioned with the built-ins."
|
|
991
|
-
},
|
|
992
|
-
globIgnores: {
|
|
993
|
-
type: "array",
|
|
994
|
-
items: { type: "string" },
|
|
995
|
-
description: "Extra precache ignore globs, unioned with the built-ins."
|
|
996
|
-
},
|
|
997
|
-
maximumFileSizeToCacheInBytes: {
|
|
998
|
-
type: "number",
|
|
999
|
-
description: "Raise the precache file-size ceiling. The max across all contributors wins, so no contributor can shrink another's limit."
|
|
1000
|
-
},
|
|
1001
|
-
runtimeCaching: {
|
|
1002
|
-
type: "array",
|
|
1003
|
-
description: "Runtime-caching rules appended after the built-in rules. Workbox is first-match-wins, so these cannot override a built-in rule matching the same URL.",
|
|
1004
|
-
items: {
|
|
1005
|
-
type: "object",
|
|
1006
|
-
additionalProperties: false,
|
|
1007
|
-
required: ["urlPattern", "handler"],
|
|
1008
|
-
properties: {
|
|
1009
|
-
urlPattern: pwaUrlPatternSchema,
|
|
1010
|
-
handler: {
|
|
1011
|
-
type: "string",
|
|
1012
|
-
enum: [
|
|
1013
|
-
"CacheFirst",
|
|
1014
|
-
"CacheOnly",
|
|
1015
|
-
"NetworkFirst",
|
|
1016
|
-
"NetworkOnly",
|
|
1017
|
-
"StaleWhileRevalidate"
|
|
1018
|
-
]
|
|
1019
|
-
},
|
|
1020
|
-
method: {
|
|
1021
|
-
type: "string",
|
|
1022
|
-
enum: [
|
|
1023
|
-
"GET",
|
|
1024
|
-
"POST",
|
|
1025
|
-
"PUT",
|
|
1026
|
-
"DELETE",
|
|
1027
|
-
"HEAD",
|
|
1028
|
-
"PATCH"
|
|
1029
|
-
]
|
|
1030
|
-
},
|
|
1031
|
-
options: {
|
|
1032
|
-
type: "object",
|
|
1033
|
-
additionalProperties: false,
|
|
1034
|
-
properties: {
|
|
1035
|
-
cacheName: { type: "string" },
|
|
1036
|
-
networkTimeoutSeconds: {
|
|
1037
|
-
type: "number",
|
|
1038
|
-
description: "Seconds a NetworkFirst rule waits for the network before falling back to the cache."
|
|
1039
|
-
},
|
|
1040
|
-
expiration: {
|
|
1041
|
-
type: "object",
|
|
1042
|
-
additionalProperties: false,
|
|
1043
|
-
properties: {
|
|
1044
|
-
maxEntries: { type: "number" },
|
|
1045
|
-
maxAgeSeconds: { type: "number" }
|
|
1046
|
-
}
|
|
1047
|
-
},
|
|
1048
|
-
cacheableResponse: {
|
|
1049
|
-
type: "object",
|
|
1050
|
-
additionalProperties: false,
|
|
1051
|
-
properties: {
|
|
1052
|
-
statuses: {
|
|
1053
|
-
type: "array",
|
|
1054
|
-
items: { type: "number" }
|
|
1055
|
-
},
|
|
1056
|
-
headers: {
|
|
1057
|
-
type: "object",
|
|
1058
|
-
additionalProperties: { type: "string" }
|
|
1059
|
-
}
|
|
1060
|
-
}
|
|
1061
|
-
}
|
|
1062
|
-
}
|
|
1063
|
-
}
|
|
1064
|
-
}
|
|
1065
|
-
}
|
|
1066
|
-
},
|
|
1067
|
-
navigateFallbackDenylist: {
|
|
1068
|
-
type: "array",
|
|
1069
|
-
description: "Extra SPA navigate-fallback denylist patterns, unioned with the built-ins.",
|
|
1070
|
-
items: pwaUrlPatternSchema
|
|
1071
|
-
}
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
}
|
|
1075
|
-
};
|
|
695
|
+
/** Emits a zod schema as a draft-07 fragment: input shape, no `$schema`. */
|
|
696
|
+
function emitJsonSchemaFragment(schema) {
|
|
697
|
+
const { $schema: _, ...fragment } = toJSONSchema(schema, {
|
|
698
|
+
target: "draft-7",
|
|
699
|
+
io: "input",
|
|
700
|
+
unrepresentable: "throw"
|
|
701
|
+
});
|
|
702
|
+
return fragment;
|
|
703
|
+
}
|
|
704
|
+
/** `schema` or null, keeping its description on the outer node. */
|
|
705
|
+
function orNull(schema) {
|
|
706
|
+
const nullable = schema.nullable();
|
|
707
|
+
return schema.description ? nullable.describe(schema.description) : nullable;
|
|
708
|
+
}
|
|
709
|
+
/** One image of a decorated pane. */
|
|
710
|
+
const phBackgroundLayerSchema = /* @__PURE__ */ emitJsonSchemaFragment(connectBackgroundLayerSchema);
|
|
711
|
+
/** A pane's background: layers over a page colour, or one image. */
|
|
712
|
+
const phBackgroundSchema = /* @__PURE__ */ emitJsonSchemaFragment(/* @__PURE__ */ orNull(connectBackgroundSchema));
|
|
713
|
+
/** The drive explorer's icons (the generic plugin's). */
|
|
714
|
+
const phConnectExplorerIconsSchema = /* @__PURE__ */ emitJsonSchemaFragment(/* @__PURE__ */ orNull(connectExplorerIconsSchema));
|
|
715
|
+
/** `connect.branding`. */
|
|
716
|
+
const phConnectBrandingSchema = /* @__PURE__ */ emitJsonSchemaFragment(connectBrandingSchema);
|
|
717
|
+
/** `connect.home`. */
|
|
718
|
+
const phConnectHomeSchema = /* @__PURE__ */ emitJsonSchemaFragment(connectHomeSchema);
|
|
719
|
+
/** The authored `connect` block, as validated by Ajv. */
|
|
720
|
+
const phConnectRuntimeConfigSchema = /* @__PURE__ */ emitJsonSchemaFragment(connectConfigSchema);
|
|
1076
721
|
//#endregion
|
|
1077
722
|
//#region connect/shared-deps.ts
|
|
1078
723
|
/**
|
|
1079
724
|
* The dependency set Connect and loaded packages share via the import map.
|
|
1080
|
-
* `@powerhousedao/connect` is deliberately absent: it is the Connect app
|
|
1081
|
-
*
|
|
725
|
+
* `@powerhousedao/connect` is deliberately absent: it is the Connect app, not
|
|
726
|
+
* vendored (a host with routes compiles its files), so its exports are for a
|
|
727
|
+
* host's own routes and layout. Packages share `@powerhousedao/connect-core`.
|
|
1082
728
|
*/
|
|
1083
729
|
const SHARED_DEPS = [
|
|
1084
730
|
{
|
|
@@ -1108,6 +754,14 @@ const SHARED_DEPS = [
|
|
|
1108
754
|
{
|
|
1109
755
|
specifier: "zod",
|
|
1110
756
|
package: "zod"
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
specifier: "@powerhousedao/connect-core",
|
|
760
|
+
package: "@powerhousedao/connect-core"
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
specifier: "@tanstack/react-router",
|
|
764
|
+
package: "@tanstack/react-router"
|
|
1111
765
|
}
|
|
1112
766
|
];
|
|
1113
767
|
const SHARED_DEP_SPECIFIERS = SHARED_DEPS.map((d) => d.specifier);
|
|
@@ -1236,7 +890,16 @@ function checkSharedDeps(pkgJson, hostVersions) {
|
|
|
1236
890
|
function formatSharedDepWarnings(mismatches) {
|
|
1237
891
|
return mismatches.map((m) => `${m.package}: requires ${m.required}, Connect provides ${m.provided}`);
|
|
1238
892
|
}
|
|
893
|
+
/**
|
|
894
|
+
* Stable filename for a local package's worker model bundle under
|
|
895
|
+
* `__reactor_worker__/packages/`. Shared by the tab (URL computation via the
|
|
896
|
+
* manifest) and the production prebuild (emitted entry names), so the two can
|
|
897
|
+
* never drift. Scoped names flatten (`@scope/name` -> `scope__name`).
|
|
898
|
+
*/
|
|
899
|
+
function workerPackageFileName(packageName) {
|
|
900
|
+
return `${packageName.replace(/^@/, "").replace(/[^\w.-]+/g, "__")}.js`;
|
|
901
|
+
}
|
|
1239
902
|
//#endregion
|
|
1240
|
-
export { ConfigLoader, DEFAULT_CONNECT_CONFIG, DYNAMIC_BASE_PLACEHOLDER, EXTERNALIZABLE_SHARED_SPECIFIERS, JsonConfigAdapter, PWA_FILE_HANDLER_ACTION, PWA_IDB_KEY, PWA_IDB_NAME, PWA_IDB_STORE, PWA_IDB_VERSION, ROOT_STORAGE_NAMESPACE, SHARED_DEPS, SHARED_DEP_SPECIFIERS, SHARED_SUBPATHS, buildRuntimeConfig, checkSharedDeps, connectEnvSchema, dedupeFileHandlers, dedupeIcons, deepMerge, findSharedImports, formatSharedDepWarnings, getStorageNamespace, loadConnectEnv, loadRuntimeEnv, mergeManifest, mergePwaConfig, normalizeBasePath, parseDepSpec, phConnectRuntimeConfigSchema, powerhousePackageSchema, resolveSourceConnect, rewritePackageSource, runtimeEnvSchema, setConnectEnv, toRegExpOrString, unionStrings, withInferredCategory };
|
|
903
|
+
export { CONNECT_LAYER_ORDER, ConfigLoader, DEFAULT_CONNECT_CONFIG, DYNAMIC_BASE_PLACEHOLDER, EDGES, EXTERNALIZABLE_SHARED_SPECIFIERS, JsonConfigAdapter, PWA_FILE_HANDLER_ACTION, PWA_IDB_KEY, PWA_IDB_NAME, PWA_IDB_STORE, PWA_IDB_VERSION, ROOT_STORAGE_NAMESPACE, SHARED_DEPS, SHARED_DEP_SPECIFIERS, SHARED_SUBPATHS, buildRuntimeConfig, checkSharedDeps, colorVariants, connectAiSchema, connectAppSchema, connectBackgroundLayerSchema, connectBackgroundLayersSchema, connectBackgroundSchema, connectBrandingSchema, connectCollectionSchema, connectCompositionEntrySchema, connectConfigSchema, connectConfigSchemaWith, connectDefaultDriveLocalSchema, connectDefaultDriveRemoteSchema, connectDefaultDriveSchema, connectDrivePreserveStrategySchema, connectDriveSectionSchema, connectDriveSectionsSchema, connectDrivesSchema, connectEdgesSchema, connectEnvSchema, connectExplorerIconsSchema, connectHomeSchema, connectImageRefSchema, connectInstanceSchema, connectLengthSchema, connectLoaderSchema, connectOpenPanelSchema, connectPackagesSchema, connectPwaCacheStrategySchema, connectPwaFileHandlerSchema, connectPwaIconSchema, connectPwaManifestSchema, connectPwaRuntimeCachingSchema, connectPwaSchema, connectPwaUrlPatternSchema, connectReactorClientModeSchema, connectReactorFeatureFlagsSchema, connectReactorSchema, connectRemoteBackendSchema, connectRenownAdaptersSchema, connectRenownPrivyAdapterSchema, connectRenownRainbowAdapterSchema, connectRenownSchema, connectRouterSettingsSchema, connectRuntimeConfigSchema, connectRuntimeDefaultDriveRemoteSchema, connectRuntimeDefaultDriveSchema, connectRuntimeDrivesSchema, connectRuntimeInstanceSchema, connectRuntimePwaManifestSchema, connectRuntimePwaSchema, connectSchemedColorSchema, connectSchemedImageSchema, connectSentrySchema, cssLength, declaredConnectConfigSchema, dedupeFileHandlers, dedupeIcons, deepMerge, emitJsonSchemaFragment, findSharedImports, formatSharedDepWarnings, getStorageNamespace, imageVariants, isAppShellNavigation, layerDeclarations, layerStyle, layerStyleText, loadConnectEnv, loadRuntimeEnv, mapBackgroundImages, mergeManifest, mergePwaConfig, normalizeBackground, normalizeBasePath, parseDepSpec, phBackgroundLayerSchema, phBackgroundSchema, phConnectBrandingSchema, phConnectExplorerIconsSchema, phConnectHomeSchema, phConnectRuntimeConfigSchema, powerhousePackageSchema, resolveDynamicBaseUrl, resolveSourceConnect, rewritePackageSource, runtimeEnvSchema, setConnectEnv, toRegExpOrString, unionStrings, validateBackground, withInferredCategory, workerPackageFileName, workflowsSettingConflict };
|
|
1241
904
|
|
|
1242
905
|
//# sourceMappingURL=index.js.map
|