@powerhousedao/shared 6.2.3-dev.9 → 6.2.3-staging.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics/index.d.ts +4 -4
- package/dist/analytics/index.d.ts.map +1 -1
- package/dist/analytics/index.js +25 -24
- package/dist/analytics/index.js.map +1 -1
- package/dist/clis/args/{access-token-To5LaIfL.mjs → access-token-3Hqv_U8I.mjs} +2 -2
- package/dist/clis/args/{access-token-To5LaIfL.mjs.map → access-token-3Hqv_U8I.mjs.map} +1 -1
- package/dist/clis/args/access-token-C5sKsH2O.d.mts +16 -0
- package/dist/clis/args/access-token-C5sKsH2O.d.mts.map +1 -0
- package/dist/clis/args/access-token.d.mts +3 -2
- package/dist/clis/args/access-token.mjs +1 -1
- package/dist/clis/args/{common-CcYbXrBx.mjs → common-BXabdhiO.mjs} +30 -7
- package/dist/clis/args/common-BXabdhiO.mjs.map +1 -0
- package/dist/clis/args/common-Bnm859xU.d.mts +186 -0
- package/dist/clis/args/common-Bnm859xU.d.mts.map +1 -0
- package/dist/clis/args/common.d.mts +3 -2
- package/dist/clis/args/common.mjs +1 -1
- package/dist/clis/args/{connect-BVVvCmL9.mjs → connect-BG3HkYBk.mjs} +8 -3
- package/dist/clis/args/connect-BG3HkYBk.mjs.map +1 -0
- package/dist/clis/args/connect-DjeiqXus.d.mts +450 -0
- package/dist/clis/args/connect-DjeiqXus.d.mts.map +1 -0
- package/dist/clis/args/connect.d.mts +3 -2
- package/dist/clis/args/connect.mjs +1 -1
- package/dist/clis/args/{generate-CA916Fvj.mjs → generate-BOItUNvP.mjs} +40 -2
- package/dist/clis/args/generate-BOItUNvP.mjs.map +1 -0
- package/dist/clis/args/generate-BPBBLeUD.d.mts +103 -0
- package/dist/clis/args/generate-BPBBLeUD.d.mts.map +1 -0
- package/dist/clis/args/generate.d.mts +3 -2
- package/dist/clis/args/generate.mjs +1 -1
- package/dist/clis/args/{help-Bqbgbalu.mjs → help-DS1NlcJQ.mjs} +15 -15
- package/dist/clis/args/{help-Bqbgbalu.mjs.map → help-DS1NlcJQ.mjs.map} +1 -1
- package/dist/clis/args/help-DVPTARGn.d.mts +190 -0
- package/dist/clis/args/help-DVPTARGn.d.mts.map +1 -0
- package/dist/clis/args/help.d.mts +3 -2
- package/dist/clis/args/help.mjs +1 -1
- package/dist/clis/args/index.d.mts +20 -19
- package/dist/clis/args/index.mjs +18 -18
- package/dist/clis/args/init-CFeTq4Cq.d.mts +52 -0
- package/dist/clis/args/init-CFeTq4Cq.d.mts.map +1 -0
- package/dist/clis/args/{init-rz9Ei7nq.mjs → init-Dvb42Y87.mjs} +2 -2
- package/dist/clis/args/{init-rz9Ei7nq.mjs.map → init-Dvb42Y87.mjs.map} +1 -1
- package/dist/clis/args/init.d.mts +3 -2
- package/dist/clis/args/init.mjs +1 -1
- package/dist/clis/args/inspect-BjRmtB86.d.mts +13 -0
- package/dist/clis/args/inspect-BjRmtB86.d.mts.map +1 -0
- package/dist/clis/args/{inspect-tckH8mSw.mjs → inspect-UNQgtuR0.mjs} +2 -2
- package/dist/clis/args/{inspect-tckH8mSw.mjs.map → inspect-UNQgtuR0.mjs.map} +1 -1
- package/dist/clis/args/inspect.d.mts +3 -2
- package/dist/clis/args/inspect.mjs +1 -1
- package/dist/clis/args/install-B0tMyUMw.d.mts +37 -0
- package/dist/clis/args/install-B0tMyUMw.d.mts.map +1 -0
- package/dist/clis/args/{install-Sz2DlCHh.mjs → install-F-27kF6m.mjs} +2 -2
- package/dist/clis/args/{install-Sz2DlCHh.mjs.map → install-F-27kF6m.mjs.map} +1 -1
- package/dist/clis/args/install.d.mts +3 -2
- package/dist/clis/args/install.mjs +1 -1
- package/dist/clis/args/{list-DM2d6f1m.mjs → list-Bkfn8Yuo.mjs} +2 -2
- package/dist/clis/args/{list-DM2d6f1m.mjs.map → list-Bkfn8Yuo.mjs.map} +1 -1
- package/dist/clis/args/list-DrbxA7JJ.d.mts +10 -0
- package/dist/clis/args/list-DrbxA7JJ.d.mts.map +1 -0
- package/dist/clis/args/list.d.mts +3 -2
- package/dist/clis/args/list.mjs +1 -1
- package/dist/clis/args/{login-DiKT5Jfu.mjs → login-CIFkQExi.mjs} +2 -2
- package/dist/clis/args/{login-DiKT5Jfu.mjs.map → login-CIFkQExi.mjs.map} +1 -1
- package/dist/clis/args/login-CXRJXg71.d.mts +25 -0
- package/dist/clis/args/login-CXRJXg71.d.mts.map +1 -0
- package/dist/clis/args/login.d.mts +3 -2
- package/dist/clis/args/login.mjs +1 -1
- package/dist/clis/args/{magic-string.es-h_0HDQBQ.mjs → magic-string.es-BWtG0AyA.mjs} +33 -27
- package/dist/clis/args/magic-string.es-BWtG0AyA.mjs.map +1 -0
- package/dist/clis/args/migrate-DkCQRL2D.d.mts +19 -0
- package/dist/clis/args/migrate-DkCQRL2D.d.mts.map +1 -0
- package/dist/clis/args/{migrate-CG_gWc4k.mjs → migrate-DwJGhc2d.mjs} +2 -2
- package/dist/clis/args/{migrate-CG_gWc4k.mjs.map → migrate-DwJGhc2d.mjs.map} +1 -1
- package/dist/clis/args/migrate.d.mts +3 -2
- package/dist/clis/args/migrate.mjs +1 -1
- package/dist/clis/args/publish-CeW4bOrl.d.mts +16 -0
- package/dist/clis/args/publish-CeW4bOrl.d.mts.map +1 -0
- package/dist/clis/args/{publish-DDZYsUfV.mjs → publish-DHqlGWmL.mjs} +2 -2
- package/dist/clis/args/{publish-DDZYsUfV.mjs.map → publish-DHqlGWmL.mjs.map} +1 -1
- package/dist/clis/args/publish.d.mts +3 -2
- package/dist/clis/args/publish.mjs +1 -1
- package/dist/clis/args/{registry-C_OVFQmI.mjs → registry-DIwES3l2.mjs} +2 -2
- package/dist/clis/args/{registry-C_OVFQmI.mjs.map → registry-DIwES3l2.mjs.map} +1 -1
- package/dist/clis/args/registry-DNH8xuaE.d.mts +17 -0
- package/dist/clis/args/registry-DNH8xuaE.d.mts.map +1 -0
- package/dist/clis/args/registry.d.mts +3 -2
- package/dist/clis/args/registry.mjs +1 -1
- package/dist/clis/args/service-BBx5GDTc.d.mts +27 -0
- package/dist/clis/args/service-BBx5GDTc.d.mts.map +1 -0
- package/dist/clis/args/{service-CHOOr0Gg.mjs → service-Cpjlyeu5.mjs} +2 -2
- package/dist/clis/args/{service-CHOOr0Gg.mjs.map → service-Cpjlyeu5.mjs.map} +1 -1
- package/dist/clis/args/service.d.mts +3 -2
- package/dist/clis/args/service.mjs +1 -1
- package/dist/clis/args/{switchboard-Dsp7nosi.mjs → switchboard-CCaAtU56.mjs} +2 -2
- package/dist/clis/args/{switchboard-Dsp7nosi.mjs.map → switchboard-CCaAtU56.mjs.map} +1 -1
- package/dist/clis/args/switchboard-RrNb1fUH.d.mts +70 -0
- package/dist/clis/args/switchboard-RrNb1fUH.d.mts.map +1 -0
- package/dist/clis/args/switchboard.d.mts +3 -2
- package/dist/clis/args/switchboard.mjs +1 -1
- package/dist/clis/args/{uninstall-CTwTX0u_.mjs → uninstall-3U0B8g5c.mjs} +2 -2
- package/dist/clis/args/{uninstall-CTwTX0u_.mjs.map → uninstall-3U0B8g5c.mjs.map} +1 -1
- package/dist/clis/args/uninstall-CDx7lwxn.d.mts +28 -0
- package/dist/clis/args/uninstall-CDx7lwxn.d.mts.map +1 -0
- package/dist/clis/args/uninstall.d.mts +3 -2
- package/dist/clis/args/uninstall.mjs +1 -1
- package/dist/clis/args/unpublish-CEDsk6uv.d.mts +22 -0
- package/dist/clis/args/unpublish-CEDsk6uv.d.mts.map +1 -0
- package/dist/clis/args/{unpublish-BPMkGEg5.mjs → unpublish-s9zUh6Gw.mjs} +2 -2
- package/dist/clis/args/{unpublish-BPMkGEg5.mjs.map → unpublish-s9zUh6Gw.mjs.map} +1 -1
- package/dist/clis/args/unpublish.d.mts +3 -2
- package/dist/clis/args/unpublish.mjs +1 -1
- package/dist/clis/args/{vetra-b4KUu1Ax.mjs → vetra-BUNlAAPp.mjs} +2 -2
- package/dist/clis/args/{vetra-b4KUu1Ax.mjs.map → vetra-BUNlAAPp.mjs.map} +1 -1
- package/dist/clis/args/vetra-DkDaWFPi.d.mts +111 -0
- package/dist/clis/args/vetra-DkDaWFPi.d.mts.map +1 -0
- package/dist/clis/args/vetra-ports.test.d.mts +2 -1
- package/dist/clis/args/vetra-ports.test.mjs +285 -180
- package/dist/clis/args/vetra-ports.test.mjs.map +1 -1
- package/dist/clis/args/vetra.d.mts +3 -2
- package/dist/clis/args/vetra.mjs +1 -1
- package/dist/clis/build-config-CmdMi_wu.mjs +230 -0
- package/dist/clis/build-config-CmdMi_wu.mjs.map +1 -0
- package/dist/clis/build-config.d.mts +44 -10614
- package/dist/clis/build-config.d.mts.map +1 -1
- package/dist/clis/build-config.mjs +2 -93
- package/dist/clis/build-pieces.d.mts +100 -0
- package/dist/clis/build-pieces.d.mts.map +1 -0
- package/dist/clis/build-pieces.mjs +371 -0
- package/dist/clis/build-pieces.mjs.map +1 -0
- package/dist/clis/command-names.d.mts +2 -2
- package/dist/clis/command-names.d.mts.map +1 -1
- package/dist/clis/command-names.mjs.map +1 -1
- package/dist/clis/constants.d.mts +3 -475
- package/dist/clis/constants.mjs +17 -8
- package/dist/clis/constants.mjs.map +1 -1
- package/dist/clis/index-6CZwrmQi.d.mts +11154 -0
- package/dist/clis/index-6CZwrmQi.d.mts.map +1 -0
- package/dist/clis/index.d.mts +1368 -1221
- package/dist/clis/index.d.mts.map +1 -1
- package/dist/clis/index.mjs +209 -65
- package/dist/clis/index.mjs.map +1 -1
- package/dist/clis/project-env.d.mts +4 -4
- package/dist/clis/project-env.d.mts.map +1 -1
- package/dist/clis/project-env.mjs.map +1 -1
- package/dist/clis/project-ports.d.mts +5 -5
- package/dist/clis/project-ports.d.mts.map +1 -1
- package/dist/clis/project-ports.mjs +1 -1
- package/dist/clis/project-ports.mjs.map +1 -1
- package/dist/clis/services/telemetry.d.mts +7 -7
- package/dist/clis/services/telemetry.d.mts.map +1 -1
- package/dist/clis/services/telemetry.mjs.map +1 -1
- package/dist/clis/types-nzer4WIr.d.mts +541 -0
- package/dist/clis/types-nzer4WIr.d.mts.map +1 -0
- package/dist/clis/utils.d.mts +4 -4
- package/dist/clis/utils.d.mts.map +1 -1
- package/dist/clis/utils.mjs.map +1 -1
- package/dist/{config-loader-B845Hidf.js → config-loader-C6dZB_iX.js} +28 -8
- package/dist/config-loader-C6dZB_iX.js.map +1 -0
- package/dist/connect/config-loader.d.ts +14 -8
- package/dist/connect/config-loader.d.ts.map +1 -1
- package/dist/connect/config-loader.js +2 -2
- package/dist/connect/index.d.ts +190 -56
- package/dist/connect/index.d.ts.map +1 -1
- package/dist/connect/index.js +303 -30
- package/dist/connect/index.js.map +1 -1
- package/dist/connect/json-adapter.d.ts +3 -4
- package/dist/connect/json-adapter.d.ts.map +1 -1
- package/dist/connect/json-adapter.js.map +1 -1
- package/dist/{constants-BP_gjn8g.d.ts → constants-DO4IYxuR.d.ts} +2 -1
- package/dist/constants-DO4IYxuR.d.ts.map +1 -0
- package/dist/constants.d.ts +3 -2
- package/dist/constants.js.map +1 -1
- package/dist/document-drive/index.d.ts +104 -101
- package/dist/document-drive/index.d.ts.map +1 -1
- package/dist/document-drive/index.js +39 -19
- package/dist/document-drive/index.js.map +1 -1
- package/dist/document-model/index.d.ts +5 -4
- package/dist/document-model/index.js +605 -228
- package/dist/document-model/index.js.map +1 -1
- package/dist/document-model/mock.d.ts +2 -3
- package/dist/document-model/mock.d.ts.map +1 -1
- package/dist/document-model/mock.js +2 -1
- package/dist/document-model/mock.js.map +1 -1
- package/dist/document-model/utils.d.ts +3 -2
- package/dist/document-model/utils.js +1 -1
- package/dist/index-5gwOhPG5.d.ts +36 -0
- package/dist/index-5gwOhPG5.d.ts.map +1 -0
- package/dist/{index-DP3QgHTq.d.ts → index-D6833Siv.d.ts} +131 -28
- package/dist/index-D6833Siv.d.ts.map +1 -0
- package/dist/index.d.ts +7 -6
- package/dist/index.js.map +1 -1
- package/dist/processors/index.d.ts +3 -2
- package/dist/processors/index.js +5 -1
- package/dist/processors/index.js.map +1 -1
- package/dist/registry/index.d.ts +15 -15
- package/dist/registry/index.d.ts.map +1 -1
- package/dist/registry/index.js +14 -5
- package/dist/registry/index.js.map +1 -1
- package/dist/registry/manifest-slim.d.ts +4 -3
- package/dist/registry/manifest-slim.d.ts.map +1 -1
- package/dist/registry/manifest-slim.js +22 -2
- package/dist/registry/manifest-slim.js.map +1 -1
- package/dist/registry/updates.d.ts +3 -3
- package/dist/registry/updates.d.ts.map +1 -1
- package/dist/registry/updates.js.map +1 -1
- package/dist/registry/urls.d.ts +2 -2
- package/dist/registry/urls.d.ts.map +1 -1
- package/dist/registry/urls.js.map +1 -1
- package/dist/{types-C1in4fl3.d.ts → types-Bsp8VL2y.d.ts} +2 -2
- package/dist/types-Bsp8VL2y.d.ts.map +1 -0
- package/dist/{types-DDpRvBK_.d.ts → types-CI3ren9F.d.ts} +23 -35
- package/dist/types-CI3ren9F.d.ts.map +1 -0
- package/dist/{types-BIoOWpOT.d.ts → types-CmeoQg_J.d.ts} +602 -437
- package/dist/types-CmeoQg_J.d.ts.map +1 -0
- package/dist/{utils-DP122OSS.d.ts → utils-BrKxCmKx.d.ts} +2 -2
- package/dist/utils-BrKxCmKx.d.ts.map +1 -0
- package/dist/{utils-aaTmfxFW.js → utils-CSF716ux.js} +10 -3
- package/dist/utils-CSF716ux.js.map +1 -0
- package/package.json +10 -5
- package/dist/clis/args/access-token--9H57y8J.d.mts +0 -18
- package/dist/clis/args/access-token--9H57y8J.d.mts.map +0 -1
- package/dist/clis/args/common-CcYbXrBx.mjs.map +0 -1
- package/dist/clis/args/common-Dsf1vpHV.d.mts +0 -183
- package/dist/clis/args/common-Dsf1vpHV.d.mts.map +0 -1
- package/dist/clis/args/connect-BVVvCmL9.mjs.map +0 -1
- package/dist/clis/args/connect-DetTnI8g.d.mts +0 -443
- package/dist/clis/args/connect-DetTnI8g.d.mts.map +0 -1
- package/dist/clis/args/generate-CA916Fvj.mjs.map +0 -1
- package/dist/clis/args/generate-DnV-bfXt.d.mts +0 -87
- package/dist/clis/args/generate-DnV-bfXt.d.mts.map +0 -1
- package/dist/clis/args/help-CjAsudUn.d.mts +0 -193
- package/dist/clis/args/help-CjAsudUn.d.mts.map +0 -1
- package/dist/clis/args/init-CUXyfquF.d.mts +0 -55
- package/dist/clis/args/init-CUXyfquF.d.mts.map +0 -1
- package/dist/clis/args/inspect-DtZeoA5c.d.mts +0 -15
- package/dist/clis/args/inspect-DtZeoA5c.d.mts.map +0 -1
- package/dist/clis/args/install-CkP8zcHb.d.mts +0 -40
- package/dist/clis/args/install-CkP8zcHb.d.mts.map +0 -1
- package/dist/clis/args/list-BGf8s_gj.d.mts +0 -12
- package/dist/clis/args/list-BGf8s_gj.d.mts.map +0 -1
- package/dist/clis/args/login-DNsHwvqk.d.mts +0 -27
- package/dist/clis/args/login-DNsHwvqk.d.mts.map +0 -1
- package/dist/clis/args/magic-string.es-h_0HDQBQ.mjs.map +0 -1
- package/dist/clis/args/migrate-sixkWhxm.d.mts +0 -21
- package/dist/clis/args/migrate-sixkWhxm.d.mts.map +0 -1
- package/dist/clis/args/publish-Dqe5DUst.d.mts +0 -18
- package/dist/clis/args/publish-Dqe5DUst.d.mts.map +0 -1
- package/dist/clis/args/registry-C_RfTsKB.d.mts +0 -19
- package/dist/clis/args/registry-C_RfTsKB.d.mts.map +0 -1
- package/dist/clis/args/service-DhIkf8-O.d.mts +0 -22
- package/dist/clis/args/service-DhIkf8-O.d.mts.map +0 -1
- package/dist/clis/args/switchboard-BlPaq2at.d.mts +0 -72
- package/dist/clis/args/switchboard-BlPaq2at.d.mts.map +0 -1
- package/dist/clis/args/uninstall-BpA3YYbw.d.mts +0 -31
- package/dist/clis/args/uninstall-BpA3YYbw.d.mts.map +0 -1
- package/dist/clis/args/unpublish-CvwaIimG.d.mts +0 -24
- package/dist/clis/args/unpublish-CvwaIimG.d.mts.map +0 -1
- package/dist/clis/args/vetra-DLQ6lhLl.d.mts +0 -113
- package/dist/clis/args/vetra-DLQ6lhLl.d.mts.map +0 -1
- package/dist/clis/build-config.mjs.map +0 -1
- package/dist/clis/constants.d.mts.map +0 -1
- package/dist/config-loader-B845Hidf.js.map +0 -1
- package/dist/constants-BP_gjn8g.d.ts.map +0 -1
- package/dist/index-C_iVZe7f.d.ts +0 -7
- package/dist/index-C_iVZe7f.d.ts.map +0 -1
- package/dist/index-DP3QgHTq.d.ts.map +0 -1
- package/dist/types-BIoOWpOT.d.ts.map +0 -1
- package/dist/types-C1in4fl3.d.ts.map +0 -1
- package/dist/types-DDpRvBK_.d.ts.map +0 -1
- package/dist/utils-DP122OSS.d.ts.map +0 -1
- package/dist/utils-aaTmfxFW.js.map +0 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
3
2
|
//#region document-model/mock.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Builds a mock value for a schema, with `overrides` taking precedence.
|
|
@@ -16,7 +15,7 @@ import { z } from "zod";
|
|
|
16
15
|
* override still throws, which is correct: there is no way to invent a value
|
|
17
16
|
* for it, and the caller needs to say what it should be.
|
|
18
17
|
*/
|
|
19
|
-
declare function generateMock<TSchema extends z.ZodType>(schema: TSchema, overrides?: Partial<z.infer<TSchema>>): z.infer<TSchema>;
|
|
18
|
+
export declare function generateMock<TSchema extends z.ZodType>(schema: TSchema, overrides?: Partial<z.infer<TSchema>>): z.infer<TSchema>;
|
|
20
19
|
//#endregion
|
|
21
|
-
export {
|
|
20
|
+
export {};
|
|
22
21
|
//# sourceMappingURL=mock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock.d.ts","names":[],"sources":["../../document-model/mock.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"mock.d.ts","names":[],"sources":["../../document-model/mock.ts"],"mappings":";;;;;;;;;;;;;;;;;wBA0BgB,aAAa,gBAAgB,EAAE,SAC7C,QAAQ,SACR,YAAY,QAAQ,EAAE,MAAM,YAC3B,EAAE,MAAM"}
|
|
@@ -32,8 +32,9 @@ function generateMock(schema, overrides) {
|
|
|
32
32
|
};
|
|
33
33
|
const omittable = overriddenKeys.filter((key) => key in schema.shape);
|
|
34
34
|
const mask = Object.fromEntries(omittable.map((key) => [key, true]));
|
|
35
|
+
const schemaToGenerate = omittable.length ? schema.omit(mask) : schema;
|
|
35
36
|
return {
|
|
36
|
-
...zocker(
|
|
37
|
+
...zocker(schemaToGenerate).generate(),
|
|
37
38
|
...overrides
|
|
38
39
|
};
|
|
39
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock.js","names":[],"sources":["../../document-model/mock.ts"],"sourcesContent":["import { zocker } from \"zocker\";\nimport { z } from \"zod\";\n\n/**\n * Narrows to an object schema whose shape we can omit keys from. Callers may\n * pass any `ZodType`, so this has to be checked rather than assumed.\n */\nfunction isObjectSchema(schema: z.ZodType): schema is z.ZodObject {\n return schema instanceof z.ZodObject;\n}\n\n/**\n * Builds a mock value for a schema, with `overrides` taking precedence.\n *\n * Overridden fields are removed from the schema *before* generation rather than\n * being overwritten afterwards. That ordering is what makes overrides usable as\n * an escape hatch: some scalars compile to `z.custom(...)` (`AttachmentRef`,\n * `Address`), and zocker cannot synthesise a value satisfying an arbitrary\n * predicate — it throws. Generating first meant the throw happened before the\n * caller's value was ever applied, so an override could not rescue the field it\n * was written for.\n *\n * Only the overridden keys are skipped. A `z.custom(...)` field with no\n * override still throws, which is correct: there is no way to invent a value\n * for it, and the caller needs to say what it should be.\n */\nexport function generateMock<TSchema extends z.ZodType>(\n schema: TSchema,\n overrides?: Partial<z.infer<TSchema>>,\n): z.infer<TSchema> {\n if (!overrides) return zocker(schema).generate() as z.infer<TSchema>;\n\n const overriddenKeys = Object.keys(overrides);\n if (overriddenKeys.length === 0 || !isObjectSchema(schema)) {\n // Nothing to skip, or a schema with no shape to omit from: generate the\n // whole value and let the overrides win by merge, as before.\n const generated = zocker(schema).generate() as z.infer<TSchema>;\n return { ...(generated as object), ...overrides } as z.infer<TSchema>;\n }\n\n // Omitting a key the shape does not have is an error in zod, and an override\n // for an unknown key should still pass through to the result.\n const omittable = overriddenKeys.filter((key) => key in schema.shape);\n // `omit` is typed against the shape's literal keys; ours are only known at\n // runtime, so the mask has to be asserted into that parameter type.\n const mask = Object.fromEntries(\n omittable.map((key) => [key, true]),\n ) as Parameters<typeof schema.omit>[0];\n const schemaToGenerate = omittable.length ? schema.omit(mask) : schema;\n\n const generated = zocker(schemaToGenerate).generate() as object;\n return { ...generated, ...overrides } as z.infer<TSchema>;\n}\n"],"mappings":";;;;;;;AAOA,SAAS,eAAe,QAA0C;
|
|
1
|
+
{"version":3,"file":"mock.js","names":[],"sources":["../../document-model/mock.ts"],"sourcesContent":["import { zocker } from \"zocker\";\nimport { z } from \"zod\";\n\n/**\n * Narrows to an object schema whose shape we can omit keys from. Callers may\n * pass any `ZodType`, so this has to be checked rather than assumed.\n */\nfunction isObjectSchema(schema: z.ZodType): schema is z.ZodObject {\n return schema instanceof z.ZodObject;\n}\n\n/**\n * Builds a mock value for a schema, with `overrides` taking precedence.\n *\n * Overridden fields are removed from the schema *before* generation rather than\n * being overwritten afterwards. That ordering is what makes overrides usable as\n * an escape hatch: some scalars compile to `z.custom(...)` (`AttachmentRef`,\n * `Address`), and zocker cannot synthesise a value satisfying an arbitrary\n * predicate — it throws. Generating first meant the throw happened before the\n * caller's value was ever applied, so an override could not rescue the field it\n * was written for.\n *\n * Only the overridden keys are skipped. A `z.custom(...)` field with no\n * override still throws, which is correct: there is no way to invent a value\n * for it, and the caller needs to say what it should be.\n */\nexport function generateMock<TSchema extends z.ZodType>(\n schema: TSchema,\n overrides?: Partial<z.infer<TSchema>>,\n): z.infer<TSchema> {\n if (!overrides) return zocker(schema).generate() as z.infer<TSchema>;\n\n const overriddenKeys = Object.keys(overrides);\n if (overriddenKeys.length === 0 || !isObjectSchema(schema)) {\n // Nothing to skip, or a schema with no shape to omit from: generate the\n // whole value and let the overrides win by merge, as before.\n const generated = zocker(schema).generate() as z.infer<TSchema>;\n return { ...(generated as object), ...overrides } as z.infer<TSchema>;\n }\n\n // Omitting a key the shape does not have is an error in zod, and an override\n // for an unknown key should still pass through to the result.\n const omittable = overriddenKeys.filter((key) => key in schema.shape);\n // `omit` is typed against the shape's literal keys; ours are only known at\n // runtime, so the mask has to be asserted into that parameter type.\n const mask = Object.fromEntries(\n omittable.map((key) => [key, true]),\n ) as Parameters<typeof schema.omit>[0];\n const schemaToGenerate = omittable.length ? schema.omit(mask) : schema;\n\n const generated = zocker(schemaToGenerate).generate() as object;\n return { ...generated, ...overrides } as z.infer<TSchema>;\n}\n"],"mappings":";;;;;;;AAOA,SAAS,eAAe,QAA0C;CAChE,OAAO,kBAAkB,EAAE;AAC7B;;;;;;;;;;;;;;;;AAiBA,SAAgB,aACd,QACA,WACkB;CAClB,IAAI,CAAC,WAAW,OAAO,OAAO,MAAM,CAAC,CAAC,SAAS;CAE/C,MAAM,iBAAiB,OAAO,KAAK,SAAS;CAC5C,IAAI,eAAe,WAAW,KAAK,CAAC,eAAe,MAAM,GAIvD,OAAO;EAAE,GADS,OAAO,MAAM,CAAC,CAAC,SACZ;EAAc,GAAG;CAAU;CAKlD,MAAM,YAAY,eAAe,QAAQ,QAAQ,OAAO,OAAO,KAAK;CAGpE,MAAM,OAAO,OAAO,YAClB,UAAU,KAAK,QAAQ,CAAC,KAAK,IAAI,CAAC,CACpC;CACA,MAAM,mBAAmB,UAAU,SAAS,OAAO,KAAK,IAAI,IAAI;CAGhE,OAAO;EAAE,GADS,OAAO,gBAAgB,CAAC,CAAC,SACvB;EAAG,GAAG;CAAU;AACtC"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { n as generateId, r as generateMock, t as deriveOperationId } from "../utils-
|
|
2
|
-
export { deriveOperationId, generateId, generateMock };
|
|
1
|
+
import { n as generateId, r as generateMock, t as deriveOperationId } from "../utils-BrKxCmKx.js";
|
|
2
|
+
export { deriveOperationId, generateId, generateMock };
|
|
3
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as generateId, r as generateMock, t as deriveOperationId } from "../utils-
|
|
1
|
+
import { n as generateId, r as generateMock, t as deriveOperationId } from "../utils-CSF716ux.js";
|
|
2
2
|
export { deriveOperationId, generateId, generateMock };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import "./types-CI3ren9F.js";
|
|
2
|
+
import { SignaturePolicy } from "@powerhousedao/shared/document-model";
|
|
3
|
+
import { DocumentDriveLocalState, Node } from "@powerhousedao/shared/document-drive";
|
|
4
|
+
//#region document-drive/src/types.d.ts
|
|
5
|
+
type GenerateNodesCopySrc = {
|
|
6
|
+
srcId: Node["id"];
|
|
7
|
+
targetName?: Node["name"];
|
|
8
|
+
targetParentFolder?: Node["parentFolder"];
|
|
9
|
+
};
|
|
10
|
+
type GenerateNodesCopyIdGenerator = (nodeToCopy: Node) => Node["id"];
|
|
11
|
+
type DriveInput = {
|
|
12
|
+
global: {
|
|
13
|
+
name: string;
|
|
14
|
+
icon?: string | null;
|
|
15
|
+
};
|
|
16
|
+
id?: string;
|
|
17
|
+
slug?: string;
|
|
18
|
+
preferredEditor?: string;
|
|
19
|
+
local?: Partial<DocumentDriveLocalState>;
|
|
20
|
+
/** Merged over the drive's defaults; `signature: 2` makes it v2-required. */
|
|
21
|
+
protocolVersions?: {
|
|
22
|
+
[protocol: string]: number;
|
|
23
|
+
};
|
|
24
|
+
/** Overrides the client's creation default for this drive. */
|
|
25
|
+
signaturePolicy?: SignaturePolicy;
|
|
26
|
+
};
|
|
27
|
+
type SharingType = "LOCAL" | "CLOUD" | "PUBLIC";
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region git.d.ts
|
|
30
|
+
declare const GITHUB_REPO_URL = "https://github.com/powerhouse-inc/powerhouse";
|
|
31
|
+
declare function buildTreeUrl(sha: string): string | null;
|
|
32
|
+
declare function shortGitSha(sha: string): string;
|
|
33
|
+
//#endregion
|
|
34
|
+
export { GenerateNodesCopyIdGenerator as a, DriveInput as i, buildTreeUrl as n, GenerateNodesCopySrc as o, shortGitSha as r, SharingType as s, GITHUB_REPO_URL as t };
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=index-5gwOhPG5.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-5gwOhPG5.d.ts","names":[],"sources":["../document-drive/src/types.ts","../git.ts"],"mappings":";;;;KAMY;EACV,OAAO;EACP,aAAa;EACb,qBAAqB;;KAGX,gCAAgC,YAAY,SAAS;KAErD;EACV;IACE;IACA;;EAEF;EACA;EACA;EACA,QAAQ,QAAQ;;EAEhB;KAAsB;;;EAEtB,kBAAkB;;KAGR;;;cC7BC;iBAEG,aAAa;iBAKb,YAAY"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Bu as PHBaseState, Ca as SkipHeaderOperations, Cn as ISigner, Ha as ValidationError, In as MinimalBackupData, Iu as Condition, Jr as ReducerOptions, Kl as PHDocument, Kt as DocumentModelLocalState, Ln as ModuleSpecification, Lu as Grant, Mr as OperationErrorSpecification, Pc as Action, Pr as OperationSpecification, Pu as AuthGroups, Qt as DocumentModelOperationErrorOperations, Ta as StateReducer, U as ActionSignatureContext, Ua as UpgradeManifest, Ut as DocumentModelHeaderOperations, Vt as DocumentModelGlobalState, Yt as DocumentModelModuleOperations, _d as Operation, ad as ProtocolVersions, cd as SignaturePolicy, en as DocumentModelOperationExampleOperations, ga as SignalDispatch, gd as DocumentOperations, hn as FileInput, in as DocumentModelStateOperations, kn as LoadFromInput, ln as DocumentSpecification, lt as Author, nn as DocumentModelPHState, pi as SaveToFileHandle, ql as PHDocumentHeader, qr as Reducer, sn as DocumentModelVersioningOperations, tn as DocumentModelOperationOperations, ui as ReplayDocumentOptions, ut as CodeExample, vd as OperationContext, xa as SigningParameters, zt as DocumentModelDocument, zu as PHAuthState } from "./types-CmeoQg_J.js";
|
|
2
|
+
import "./utils-BrKxCmKx.js";
|
|
2
3
|
import { ZodIssue, z } from "zod";
|
|
3
|
-
|
|
4
4
|
//#region document-model/action-transport.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* An action's signer, as the wire declares it: signatures joined into strings,
|
|
@@ -67,7 +67,8 @@ type RemoveGrantActionInput = {
|
|
|
67
67
|
id: string;
|
|
68
68
|
};
|
|
69
69
|
type MoveGrantActionInput = {
|
|
70
|
-
id: string;
|
|
70
|
+
id: string;
|
|
71
|
+
/** Target index in the grant list; clamped to the valid range. */
|
|
71
72
|
index: number;
|
|
72
73
|
};
|
|
73
74
|
type InitializeAuthAction = Action & {
|
|
@@ -157,12 +158,12 @@ declare function assertAuthPreservedOnDuplicate(documentId: string, source: PHAu
|
|
|
157
158
|
* The auth scope a state snapshot may install, given the policy already there.
|
|
158
159
|
*
|
|
159
160
|
* `applyAuthAction` is the validated door onto `state.auth`, but a whole-state
|
|
160
|
-
* snapshot (UPGRADE_DOCUMENT's `initialState
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
161
|
+
* snapshot (UPGRADE_DOCUMENT's `initialState`) replaces the scope wholesale and
|
|
162
|
+
* is authorized as a `document`-scope write. Without this, a subject holding
|
|
163
|
+
* `execute` on `document` and no auth grant at all can install a policy of its
|
|
164
|
+
* choosing, name itself `creator` (which exempts the policy from the retention
|
|
165
|
+
* rule for good), or wipe an existing policy by carrying the default
|
|
166
|
+
* uninitialized one.
|
|
166
167
|
*
|
|
167
168
|
* Three cases:
|
|
168
169
|
*
|
|
@@ -176,16 +177,19 @@ declare function assertAuthPreservedOnDuplicate(documentId: string, source: PHAu
|
|
|
176
177
|
* an attempt to replace one policy with another.
|
|
177
178
|
*/
|
|
178
179
|
declare function resolveSnapshotAuth(documentId: string, documentType: string, current: PHAuthState | undefined, incoming: PHAuthState | undefined): PHAuthState;
|
|
179
|
-
/** UNDO
|
|
180
|
+
/** UNDO and REDO are rejected on the auth scope. */
|
|
180
181
|
declare function assertAuthScopeActionAllowed(action: Action): void;
|
|
181
182
|
type AuthVerb = "read" | "execute";
|
|
182
183
|
type AuthRequest = {
|
|
183
184
|
verb: AuthVerb;
|
|
184
|
-
scope: string;
|
|
185
|
+
scope: string;
|
|
186
|
+
/** For execute: the operation (action type) being attempted. Omitted for reads. */
|
|
185
187
|
operation?: string;
|
|
186
188
|
};
|
|
187
189
|
type AuthSubject = {
|
|
188
|
-
/** Verified signer address; undefined for an anonymous subject. */
|
|
190
|
+
/** Verified signer address; undefined for an anonymous subject. */
|
|
191
|
+
address?: string;
|
|
192
|
+
/** The signer's app key (a did:key), used to match the document creator. */
|
|
189
193
|
key?: string;
|
|
190
194
|
};
|
|
191
195
|
/**
|
|
@@ -194,7 +198,9 @@ type AuthSubject = {
|
|
|
194
198
|
* carrying `where` or a { match } principal never applies.
|
|
195
199
|
*/
|
|
196
200
|
type ConditionContext = {
|
|
197
|
-
/** The executing scope's own state, for `doc.<scope>.*` paths. */
|
|
201
|
+
/** The executing scope's own state, for `doc.<scope>.*` paths. */
|
|
202
|
+
scopeState: unknown;
|
|
203
|
+
/** The action's input, for `action.input.*` paths. Absent for reads. */
|
|
198
204
|
actionInput?: unknown;
|
|
199
205
|
};
|
|
200
206
|
type AuthDecision = "allow" | "deny";
|
|
@@ -345,12 +351,7 @@ declare const HASH_ENCODING_HEX = "hex";
|
|
|
345
351
|
//#region document-model/crypto.d.ts
|
|
346
352
|
declare const hashBrowser: (data: string | Uint8Array | ArrayBufferView | DataView, algorithm?: string, encoding?: string, _params?: Record<string, unknown>) => string;
|
|
347
353
|
declare function getUnixTimestamp(date: Date | string): string;
|
|
348
|
-
declare function buildOperationSignatureParams({
|
|
349
|
-
documentId,
|
|
350
|
-
signer,
|
|
351
|
-
action,
|
|
352
|
-
previousStateHash
|
|
353
|
-
}: ActionSignatureContext): [string, string, string, string];
|
|
354
|
+
declare function buildOperationSignatureParams({ documentId, signer, action, previousStateHash }: ActionSignatureContext): [string, string, string, string];
|
|
354
355
|
declare function buildOperationSignatureMessage(params: [string, string, string, string]): Uint8Array;
|
|
355
356
|
declare function ab2hex(ab: ArrayBuffer | ArrayBufferView): string;
|
|
356
357
|
declare function hex2ab(hex: string): Uint8Array<ArrayBuffer>;
|
|
@@ -359,6 +360,8 @@ declare function hex2ab(hex: string): Uint8Array<ArrayBuffer>;
|
|
|
359
360
|
* any character outside the alphabet.
|
|
360
361
|
*/
|
|
361
362
|
declare function base58Decode(input: string): Uint8Array | null;
|
|
363
|
+
/** Encodes bytes as unpadded base64url. */
|
|
364
|
+
declare function bytesToBase64Url(bytes: Uint8Array): string;
|
|
362
365
|
/** Decodes a base64url string to bytes (portable across node, browsers, workers). */
|
|
363
366
|
declare function base64UrlToBytes(input: string): Uint8Array;
|
|
364
367
|
//#endregion
|
|
@@ -513,7 +516,7 @@ declare class GrantNotFoundError extends Error {
|
|
|
513
516
|
constructor(grantId: string);
|
|
514
517
|
}
|
|
515
518
|
/**
|
|
516
|
-
* Thrown when a disallowed action (UNDO, REDO
|
|
519
|
+
* Thrown when a disallowed action (UNDO, REDO) targets the auth scope.
|
|
517
520
|
*/
|
|
518
521
|
declare class AuthActionNotAllowedError extends Error {
|
|
519
522
|
readonly actionType: string;
|
|
@@ -580,7 +583,8 @@ declare function baseSaveToFileHandle(document: PHDocument, input: FileSystemFil
|
|
|
580
583
|
declare function baseLoadFromInput<TState extends PHBaseState>(input: FileInput, reducer: Reducer<TState>, options?: ReplayDocumentOptions): Promise<PHDocument<TState>>;
|
|
581
584
|
declare function baseLoadFromInputVersioned<TState extends PHBaseState>(input: FileInput, config: VersionedReplayConfig, options?: ReplayDocumentOptions): Promise<PHDocument<TState>>;
|
|
582
585
|
type BulkArchiveEntry = {
|
|
583
|
-
/** "/"-separated zip path of a file entry (no trailing slash). */
|
|
586
|
+
/** "/"-separated zip path of a file entry (no trailing slash). */
|
|
587
|
+
path: string;
|
|
584
588
|
data: Uint8Array;
|
|
585
589
|
};
|
|
586
590
|
/**
|
|
@@ -647,9 +651,20 @@ declare const validateHeader: (header: PHDocumentHeader) => Promise<void>;
|
|
|
647
651
|
* Creates a header that has yet to be signed. This header is not valid, but
|
|
648
652
|
* can be input into {@link createSignedHeader} to create a signed header.
|
|
649
653
|
*
|
|
654
|
+
* With `protocolVersions` requiring v2 signatures the header takes a random
|
|
655
|
+
* nonce and the id {@link deriveDocumentId} gives, so `id` must be omitted.
|
|
656
|
+
*
|
|
650
657
|
* @returns An unsigned header for a document.
|
|
651
658
|
*/
|
|
652
|
-
declare const createPresignedHeader: (id?: string, documentType?: string) => PHDocumentHeader;
|
|
659
|
+
declare const createPresignedHeader: (id?: string, documentType?: string, protocolVersions?: ProtocolVersions) => PHDocumentHeader;
|
|
660
|
+
/**
|
|
661
|
+
* A header for a copy of a document headed `source`. A copy is v2-required
|
|
662
|
+
* when its source is or when `policy` asks for it, and then takes a derived id;
|
|
663
|
+
* otherwise it takes `id`. It keeps the source's other protocol versions.
|
|
664
|
+
*/
|
|
665
|
+
declare function createCopyHeader(source: Pick<PHDocumentHeader, "documentType" | "protocolVersions">, id?: string, policy?: SignaturePolicy): PHDocumentHeader;
|
|
666
|
+
/** Whether a v2-required `header` carries the id its params derive. */
|
|
667
|
+
declare function hasDerivedDocumentId(header: PHDocumentHeader): boolean;
|
|
653
668
|
/**
|
|
654
669
|
* Creates a new, signed header for a document. This will replace the id of the
|
|
655
670
|
* document.
|
|
@@ -673,6 +688,95 @@ declare const createSignedHeader: (unsignedHeader: PHDocumentHeader, documentTyp
|
|
|
673
688
|
*/
|
|
674
689
|
declare const createSignedHeaderForSigner: (documentType: string, signer: ISigner) => Promise<PHDocumentHeader>;
|
|
675
690
|
//#endregion
|
|
691
|
+
//#region document-model/peer-agreement.d.ts
|
|
692
|
+
/** The reactor feature flags a capability's support is a function of. */
|
|
693
|
+
type PeerCapabilityFlags = {
|
|
694
|
+
readonly [flag: string]: boolean | undefined;
|
|
695
|
+
};
|
|
696
|
+
/** A document protocol, named by its `protocolVersions` key. */
|
|
697
|
+
type ProtocolCapability = {
|
|
698
|
+
kind: "protocol";
|
|
699
|
+
name: string;
|
|
700
|
+
/** What a peer that announces nothing is assumed to support. */
|
|
701
|
+
baseline: readonly number[];
|
|
702
|
+
supported(flags: PeerCapabilityFlags): readonly number[];
|
|
703
|
+
/** The version new documents take when peers agree. Absent: not negotiated. */
|
|
704
|
+
preferred?(flags: PeerCapabilityFlags): number;
|
|
705
|
+
/** A header may omit the key. */
|
|
706
|
+
optional: boolean;
|
|
707
|
+
};
|
|
708
|
+
/** A feature that changes what a peer sends or expects on the wire. */
|
|
709
|
+
type FeatureCapability = {
|
|
710
|
+
kind: "feature";
|
|
711
|
+
name: string;
|
|
712
|
+
baseline: readonly number[];
|
|
713
|
+
supported(flags: PeerCapabilityFlags): readonly number[];
|
|
714
|
+
};
|
|
715
|
+
type PeerCapability = ProtocolCapability | FeatureCapability;
|
|
716
|
+
declare const PEER_CAPABILITIES: readonly PeerCapability[];
|
|
717
|
+
/** `base` plus `extra`; an extra replaces a base entry of the same name. */
|
|
718
|
+
declare function mergePeerCapabilities(base: readonly PeerCapability[], extra: readonly PeerCapability[]): PeerCapability[];
|
|
719
|
+
declare const PEER_MANIFEST_FORMAT = 1;
|
|
720
|
+
type Supports = {
|
|
721
|
+
protocols: {
|
|
722
|
+
[protocol: string]: readonly number[];
|
|
723
|
+
};
|
|
724
|
+
features: {
|
|
725
|
+
[feature: string]: readonly number[];
|
|
726
|
+
};
|
|
727
|
+
};
|
|
728
|
+
type PeerManifest = Supports & {
|
|
729
|
+
format: 1;
|
|
730
|
+
/** The signer's did:key, when configured; informational. */
|
|
731
|
+
appKey?: string;
|
|
732
|
+
/** Grows with every start of the reactor; a peer ignores an older one. */
|
|
733
|
+
sequence: number;
|
|
734
|
+
/** base64url(sha256(canonicalJson(Supports & { sequence }))) */
|
|
735
|
+
revision: string;
|
|
736
|
+
};
|
|
737
|
+
/** What this reactor supports, for every capability it registers. */
|
|
738
|
+
declare function localSupports(capabilities: readonly PeerCapability[], flags: PeerCapabilityFlags): Supports;
|
|
739
|
+
/** What a peer that announces nothing supports. */
|
|
740
|
+
declare function legacySupports(capabilities: readonly PeerCapability[]): Supports;
|
|
741
|
+
declare function manifestRevision(supports: Supports, sequence?: number): string;
|
|
742
|
+
declare function localPeerManifest(capabilities: readonly PeerCapability[], flags: PeerCapabilityFlags, appKey?: string, sequence?: number): PeerManifest;
|
|
743
|
+
/** A manifest sent before the one already held; silence carries no sequence. */
|
|
744
|
+
declare function isOlderManifest(next: PeerManifest | null, held: PeerManifest | null | undefined): boolean;
|
|
745
|
+
/** A peer's manifest, or the baselines for a peer that announced none. */
|
|
746
|
+
declare function peerSupports(manifest: PeerManifest | null, capabilities: readonly PeerCapability[]): Supports;
|
|
747
|
+
/**
|
|
748
|
+
* A manifest as received from a peer, or null when it is not one. Formats only
|
|
749
|
+
* add fields, so one of an unknown format is read as its two maps.
|
|
750
|
+
*/
|
|
751
|
+
declare function readPeerManifest(value: unknown): PeerManifest | null;
|
|
752
|
+
/** Why a document may not go to a peer. */
|
|
753
|
+
type HoldReason = {
|
|
754
|
+
protocol: string;
|
|
755
|
+
version: number;
|
|
756
|
+
peerSupports: readonly number[];
|
|
757
|
+
};
|
|
758
|
+
/** Only keys this reactor registers are judged; an absent key agrees. */
|
|
759
|
+
declare function holdReason(peer: Supports, versions: {
|
|
760
|
+
readonly [protocol: string]: number;
|
|
761
|
+
}, capabilities: readonly PeerCapability[]): HoldReason | undefined;
|
|
762
|
+
/** Whether a peer runs every version this reactor does, so nothing is held. */
|
|
763
|
+
declare function coversLocal(peer: Supports, local: Supports, capabilities: readonly PeerCapability[]): boolean;
|
|
764
|
+
/**
|
|
765
|
+
* protocolVersions for a new document: per negotiated protocol, the highest
|
|
766
|
+
* version up to the local preference that every member supports, else the
|
|
767
|
+
* lowest local one. `requested` wins over what is selected.
|
|
768
|
+
*/
|
|
769
|
+
declare function selectProtocolVersions(input: {
|
|
770
|
+
capabilities: readonly PeerCapability[];
|
|
771
|
+
flags: PeerCapabilityFlags;
|
|
772
|
+
members: Iterable<Supports>;
|
|
773
|
+
requested?: {
|
|
774
|
+
readonly [protocol: string]: number;
|
|
775
|
+
};
|
|
776
|
+
}): {
|
|
777
|
+
[protocol: string]: number;
|
|
778
|
+
};
|
|
779
|
+
//#endregion
|
|
676
780
|
//#region document-model/reducer.d.ts
|
|
677
781
|
declare function replayOperations<TState extends PHBaseState = PHBaseState>(initialState: TState, clearedOperations: DocumentOperations, stateReducer: StateReducer<TState>, header: PHDocumentHeader, dispatch?: SignalDispatch, documentReducer?: typeof baseReducer, skipHeaderOperations?: SkipHeaderOperations, options?: ReplayDocumentOptions): PHDocument<TState>;
|
|
678
782
|
/**
|
|
@@ -702,7 +806,7 @@ declare function processUndoRedo<TState extends PHBaseState = PHBaseState>(docum
|
|
|
702
806
|
};
|
|
703
807
|
/**
|
|
704
808
|
* Base document reducer that wraps a custom document reducer and handles
|
|
705
|
-
* document-level actions such as undo, redo,
|
|
809
|
+
* document-level actions such as undo, redo, and set name.
|
|
706
810
|
*
|
|
707
811
|
* @template TGlobalState - The type of the state of the custom reducer.
|
|
708
812
|
* @template TAction - The type of the actions of the custom reducer.
|
|
@@ -722,7 +826,6 @@ declare function baseReducer<TState extends PHBaseState = PHBaseState>(document:
|
|
|
722
826
|
* - `SET_NAME`
|
|
723
827
|
* - `UNDO`
|
|
724
828
|
* - `REDO`
|
|
725
|
-
* - `PRUNE`
|
|
726
829
|
*
|
|
727
830
|
* It also updates the document-related attributes on every operation.
|
|
728
831
|
*
|
|
@@ -732,7 +835,6 @@ declare function baseReducer<TState extends PHBaseState = PHBaseState>(document:
|
|
|
732
835
|
* @returns The new reducer.
|
|
733
836
|
*/
|
|
734
837
|
declare function createReducer<TState extends PHBaseState = PHBaseState>(stateReducer: StateReducer<TState>, documentReducer?: typeof baseReducer): Reducer<TState>;
|
|
735
|
-
declare function pruneOperation<TState extends PHBaseState = PHBaseState>(document: PHDocument<TState>, input: PruneActionInput, wrappedReducer: StateReducer<TState>): PHDocument<TState>;
|
|
736
838
|
//#endregion
|
|
737
839
|
//#region document-model/reducers.d.ts
|
|
738
840
|
declare const documentModelHeaderReducer: DocumentModelHeaderOperations;
|
|
@@ -750,7 +852,7 @@ declare const documentModelReducer: Reducer<DocumentModelPHState>;
|
|
|
750
852
|
* Reserved operation names from base reducer (core/actions.ts).
|
|
751
853
|
* These names cannot be used for custom operations.
|
|
752
854
|
*/
|
|
753
|
-
declare const RESERVED_OPERATION_NAMES: readonly ["UNDO", "REDO", "
|
|
855
|
+
declare const RESERVED_OPERATION_NAMES: readonly ["UNDO", "REDO", "SET_NAME", "SET_PREFERRED_EDITOR", "NOOP"];
|
|
754
856
|
type ReservedOperationName = (typeof RESERVED_OPERATION_NAMES)[number];
|
|
755
857
|
/**
|
|
756
858
|
* Operation names become the literal action `type` string at runtime and the
|
|
@@ -832,5 +934,6 @@ declare function assertOperationErrorIdUnique(state: DocumentModelGlobalState, i
|
|
|
832
934
|
declare function assertOperationExampleIdUnique(state: DocumentModelGlobalState, id: string): void;
|
|
833
935
|
declare function validateOperations(operations: DocumentOperations): ValidationError[];
|
|
834
936
|
//#endregion
|
|
835
|
-
export {
|
|
836
|
-
|
|
937
|
+
export { peerSupports as $, MAX_SUPPORTED_AUTH_VERSION as $n, AUTH_DENIED_BY_GRANT_REASON as $t, documentModelVersioningReducer as A, MAX_CONDITION_NODES as An, AuthAlreadyInitializedError as At, PeerCapability as B, referencedGroupIds as Bn, UnsupportedDocumentModelVersionError as Bt, documentModelModuleReducer as C, AuthAdministrationMissingError as Cn, removeGrant as Cr, readFileBrowser as Ct, documentModelReducer as D, MAX_AUTH_GRANTS as Dn, TransportActionContext as Dr, VersionedReplayConfig as Dt, documentModelOperationReducer as E, InvalidGrantError as En, TransportAction as Er, VersionedReducers as Et, updateDocument as F, evaluateCondition as Fn, GrantNotFoundError as Ft, coversLocal as G, AuthRefusal as Gn, BaseDocumentStateSchema as Gt, PeerManifest as H, AuthAction as Hn, groupDocumentType as Ht, FeatureCapability as I, evaluateGrantStack as In, HashMismatchError as It, legacySupports as J, AuthVerb as Jn, DocumentModelSchema as Jt, holdReason as K, AuthRequest as Kn, DocumentModelHeaderSchema as Kt, HoldReason as L, evaluateGrants as Ln, InvalidActionInputError as Lt, createReducer as M, assertValidGrant as Mn, AuthPolicyNotPreservedError as Mt, processUndoRedo as N, assertValidGrantUpsert as Nn, DowngradeNotSupportedError as Nt, documentModelStateReducer as O, MAX_CAPABILITY_OPERATIONS as On, TransportSigner as Or, replayDocumentVersioned as Ot, replayOperations as P, assertValidInitialGrants as Pn, FileSystemError as Pt, mergePeerCapabilities as Q, InitializeAuthActionInputSchema as Qn, isDocumentModelState as Qt, PEER_CAPABILITIES as R, grantProblem as Rn, InvalidActionInputZodError as Rt, documentModelHeaderReducer as S, AuthAdministrationLockoutError as Sn, moveGrant as Sr, parseBulkArchive as St, documentModelOperationExampleReducer as T, GroupPrincipalNotAllowedError as Tn, setGrant as Tr, zipEntries as Tt, ProtocolCapability as U, AuthDecision as Un, groupMembershipActionTypes as Ut, PeerCapabilityFlags as V, AUTH_ACTION_TYPES as Vn, documentModelDocumentType as Vt, Supports as W, AuthEvaluation as Wn, BaseDocumentHeaderSchema as Wt, localSupports as X, InitializeAuthAction as Xn, assertIsDocumentModelState as Xt, localPeerManifest as Y, ConditionContext as Yn, assertIsDocumentModelDocument as Yt, manifestRevision as Z, InitializeAuthActionInput as Zn, isDocumentModelDocument as Zt, validateModuleOperation as _, HASH_ENCODING_HEX as _n, evaluate as _r, documentModelLoadFromInput as _t, assertOperationErrorIdUnique as a, base58Decode as an, RemoveGrantActionInputSchema as ar, createSignedHeaderForSigner as at, validateOperations as b, documentModelInitialGlobalState as bn, isDocumentCreator as br, getFileBrowser as bt, findModuleOrThrow as c, buildOperationSignatureParams as cn, SetGrantActionInputSchema as cr, sign as ct, findOperationOrThrow as d, hashBrowser as dn, applyMoveGrantAction as dr, BulkArchiveEntry as dt, AUTH_NO_GRANT_REASON as en, MoveGrantAction as er, readPeerManifest as et, getAllOperationNames as f, hex2ab as fn, applyRemoveGrantAction as fr, baseLoadFromInput as ft, validateModule as g, HASH_ENCODING_BASE64 as gn, decide as gr, createZip as gt, validateInitialState as h, HASH_ALGORITHM_SHA512 as hn, assertAuthScopeActionAllowed as hr, createMinimalZip as ht, assertModuleIdUnique as i, ab2hex as in, RemoveGrantActionInput as ir, createSignedHeader as it, baseReducer as j, assertAuthAdministrationRetained as jn, AuthInitializerNotCreatorError as jt, documentModelStateSchemaReducer as k, MAX_CONDITION_DEPTH as kn, toTransportAction as kr, AuthActionNotAllowedError as kt, findOperationErrorOrThrow as l, bytesToBase64Url as ln, applyAuthAction as lr, validateHeader as lt, isValidOperationNameFormat as m, HASH_ALGORITHM_SHA256 as mn, assertAuthPreservedOnDuplicate as mr, baseSaveToFileHandle as mt, RESERVED_OPERATION_NAMES as n, DOCUMENT_DELETED_REASON as nn, MoveGrantActionInputSchema as nr, createCopyHeader as nt, assertOperationExampleIdUnique as o, base64UrlToBytes as on, SetGrantAction as or, createVerificationSigner as ot, isReservedOperationName as p, HASH_ALGORITHM_SHA1 as pn, applySetGrantAction as pr, baseLoadFromInputVersioned as pt, isOlderManifest as q, AuthSubject as qn, DocumentModelPHStateSchema as qt, ReservedOperationName as r, isDenied as rn, RemoveGrantAction as rr, createPresignedHeader as rt, assertOperationIdUnique as s, buildOperationSignatureMessage as sn, SetGrantActionInput as sr, hasDerivedDocumentId as st, OPERATION_NAME_PATTERN as t, AUTH_VERSION_UNSUPPORTED_REASON as tn, MoveGrantActionInput as tr, selectProtocolVersions as tt, findOperationExampleOrThrow as u, getUnixTimestamp as un, applyInitializeAuthAction as ur, verify as ut, validateModules as v, documentModelFileExtension as vn, initializeAuth as vr, documentModelSaveToFileHandle as vt, documentModelOperationErrorReducer as w, GrantSchema as wn, resolveSnapshotAuth as wr, writeFileBrowser as wt, validateStateSchemaName as x, documentModelInitialLocalState as xn, mentionedGroupIds as xr, isDocumentZip as xt, validateOperationName as y, documentModelGlobalState as yn, isAuthAction as yr, fetchFileBrowser as yt, PEER_MANIFEST_FORMAT as z, isPlainValue as zn, InvalidAuthVersionError as zt };
|
|
938
|
+
export {};
|
|
939
|
+
//# sourceMappingURL=index-D6833Siv.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-D6833Siv.d.ts","names":[],"sources":["../document-model/action-transport.ts","../document-model/auth.ts","../document-model/auth-v1.ts","../document-model/constants.ts","../document-model/crypto.ts","../document-model/denied.ts","../document-model/document-schema.ts","../document-model/document-type.ts","../document-model/errors.ts","../document-model/versioned-replay.ts","../document-model/files.ts","../document-model/header.ts","../document-model/peer-agreement.ts","../document-model/reducer.ts","../document-model/reducers.ts","../document-model/validation.ts"],"mappings":";;;;;;;;KAWY;EACV;IAAS;IAAiB;IAAmB;;EAC7C;IAAQ;IAAc;;EACtB;;;KAIU;EACV;EACA;EACA;EACA,SAAS;;;KAIC;EACV;EACA;EACA;;;;;;;EAOA,OAAO;EACP;EACA,UAAU;;;;;;;;;;;;;;;iBAgBI,kBAAkB,QAAQ,SAAS;;;KCrBvC;EACV;EACA,QAAQ;;KAGE;EACV,OAAO;;KAGG;EACV;;KAGU;EACV;;EAEA;;KAGU,uBAAuB;EACjC;EACA,OAAO;;KAGG,iBAAiB;EAC3B;EACA,OAAO;;KAGG,oBAAoB;EAC9B;EACA,OAAO;;KAGG,kBAAkB;EAC5B;EACA,OAAO;;KAGG,aACR,uBACA,iBACA,oBACA;cAES;iBAOG,aAAa,QAAQ,SAAS,UAAU;;cAO3C;cAIA,uCAA+B,EAAA;;;GAIxC,EAAA,KAAA;cAES,iCAAyB,EAAA;;GAGlC,EAAA,KAAA;cAES,oCAA4B,EAAA;;GAGrC,EAAA,KAAA;cAES,kCAA0B,EAAA;;;GAInC,EAAA,KAAA;cAIS,iBAAc,OAAW,8BAAyB;cASlD,WAAQ,OAAW,wBAAmB;cAStC,cAAW,OAAW,2BAAsB;cAS5C,YAAS,OAAW,yBAAoB;;;;;;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P,oBACC;;;;;;iBA0Ba,qBACd,OAAO,0BACP;;;;;iBAcc,wBACd,OAAO,0BACP;;;;;;iBAkBc,6BACd,OAAO,0BACP;;;;;;iBAkBc,+BACd,OAAO,0BACP;iBAac,mBAAmB,YAAY,qBAAkB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { a as AnalyticsSeriesInput, c as CompoundAnalyticsExpression, d as ConversionMetric, f as IAnalyticsStore, i as AnalyticsSeries, l as CompoundAnalyticsInputs, n as AnalyticsOperand, o as AnalyticsSeriesQuery, p as MultiCurrencyConversion, r as AnalyticsQuery, s as AnalyticsUpdateCallback, t as AnalyticsDimension, u as CompoundAnalyticsQuery } from "./types-
|
|
2
|
-
import { $ as
|
|
3
|
-
import { i as PACKAGES_DEPENDENCIES, n as APPS_DEPENDENCIES, r as CLIS_DEPENDENCIES, t as ALL_POWERHOUSE_DEPENDENCIES } from "./constants-
|
|
4
|
-
import { $ as
|
|
5
|
-
import { n as buildTreeUrl, r as shortGitSha, t as GITHUB_REPO_URL } from "./index-
|
|
6
|
-
export { ALL_POWERHOUSE_DEPENDENCIES, APPS_DEPENDENCIES, ActionErrorCallback, ActionSignatureContext, ActionSigningHandler, ActionVerificationHandler, Actions, AddChangeLogItemAction, AddChangeLogItemInput, AddFileAction, AddFileInput, AddFolderAction, AddFolderInput, AddListenerAction, AddListenerInput, AddModuleAction, AddModuleInput, AddOperationAction, AddOperationErrorAction, AddOperationErrorInput, AddOperationExampleAction, AddOperationExampleInput, AddOperationInput, AddRelationshipAction, AddRelationshipActionInput, AddStateExampleAction, AddStateExampleInput, AddTriggerAction, AddTriggerInput, AnalyticsDimension, AnalyticsOperand, AnalyticsQuery, AnalyticsSeries, AnalyticsSeriesInput, AnalyticsSeriesQuery, AnalyticsUpdateCallback, AssertIsDocumentOfType, AssertIsStateOfType, Author, CLIS_DEPENDENCIES, CodeExample, CompoundAnalyticsExpression, CompoundAnalyticsInputs, CompoundAnalyticsQuery, ConfigEntry, ConfigEntryType, ConversionMetric, CopyChildDocumentInput, CopyChildDocumentSignal, CopyNodeAction, CopyNodeInput, CreateChildDocumentInput, CreateChildDocumentSignal, CreateDocument, CreateDocumentAction, CreateDocumentActionInput, CreateState, DeleteChangeLogItemAction, DeleteChangeLogItemInput, DeleteChildDocumentInput, DeleteChildDocumentSignal, DeleteDocumentAction, DeleteDocumentActionInput, DeleteModuleAction, DeleteModuleInput, DeleteNodeAction, DeleteNodeInput, DeleteOperationAction, DeleteOperationErrorAction, DeleteOperationErrorInput, DeleteOperationExampleAction, DeleteOperationExampleInput, DeleteOperationInput, DeleteStateExampleAction, DeleteStateExampleInput, DocumentAction, DocumentDriveAction, DocumentDriveDocument, DocumentDriveDriveAction, DocumentDriveDriveOperations, DocumentDriveGlobalState, DocumentDriveLocalState, DocumentDriveNodeAction, DocumentDriveNodeOperations, DocumentDrivePHState, DocumentModelAction, DocumentModelDocument, DocumentModelDocumentModelModule, DocumentModelGlobalState, DocumentModelHeaderAction, DocumentModelHeaderOperations, DocumentModelInput, DocumentModelLib, DocumentModelLocalState, DocumentModelModule, DocumentModelModuleAction, DocumentModelModuleOperations, DocumentModelOperationAction, DocumentModelOperationErrorAction, DocumentModelOperationErrorOperations, DocumentModelOperationExampleAction, DocumentModelOperationExampleOperations, DocumentModelOperationOperations, DocumentModelPHState, DocumentModelStateAction, DocumentModelStateOperations, DocumentModelUtils, DocumentModelVersioningAction, DocumentModelVersioningOperations, DocumentOperationsIgnoreMap, DocumentSpecification, DriveDocumentModelModule, DriveInput, DrivePreserveStrategies, DrivePreserveStrategy, ENSInfo, EditorDispatch, EditorModule, EditorProps, Exact, FileInput, FileNode, FolderNode, GITHUB_REPO_URL, GenerateNodesCopyIdGenerator, GenerateNodesCopySrc, GetDocumentOptions, IAction, IAnalyticsStore, ID, IDocument, IOperation, IProcessor, IProcessorDispatch, IProcessorHostModuleBase, IProcessorManager, ISignal, ISignalResult, ISigner, Incremental, InputMaybe, IsDocumentOfType, IsStateOfType, LegacyAddFileAction, LegacyAddFileInput, LegacySynchronizationUnit, Listener, ListenerCallInfo, ListenerCallInfoInput, ListenerFilter, ListenerFilterInput, ListenerInput, LoadFromFile, LoadFromInput, LoadStateAction, LoadStateActionInput, LoadStateActionStateInput, Load_State, LogLevel, LogLevels, MakeEmpty, MakeMaybe, MakeOptional, Manifest, MappedOperation, Maybe, MinimalBackupData, ModuleSpecification, MoveNodeAction, MoveNodeInput, MoveOperationAction, MoveOperationInput, MultiCurrencyConversion, Mutation, MutationAddChangeLogItemInputArgs, MutationAddModuleArgs, MutationAddOperationArgs, MutationAddOperationErrorArgs, MutationAddOperationExampleArgs, MutationAddStateExampleArgs, MutationDeleteChangeLogItemInputArgs, MutationDeleteModuleArgs, MutationDeleteOperationArgs, MutationDeleteOperationErrorArgs, MutationDeleteOperationExampleArgs, MutationDeleteStateExampleArgs, MutationLoadStateArgs, MutationMoveOperationArgs, MutationPruneArgs, MutationRedoArgs, MutationReorderChangeLogItemsInputArgs, MutationReorderModuleOperationsArgs, MutationReorderModulesArgs, MutationReorderOperationErrorsArgs, MutationReorderOperationExamplesArgs, MutationReorderStateExamplesArgs, MutationSetAuthorNameArgs, MutationSetAuthorWebsiteArgs, MutationSetInitialStateArgs, MutationSetModelDescriptionArgs, MutationSetModelExtensionArgs, MutationSetModelIdArgs, MutationSetModelNameArgs, MutationSetModuleDescriptionArgs, MutationSetModuleNameArgs, MutationSetNameArgs, MutationSetOperationDescriptionArgs, MutationSetOperationErrorCodeArgs, MutationSetOperationErrorDescriptionArgs, MutationSetOperationErrorNameArgs, MutationSetOperationErrorTemplateArgs, MutationSetOperationNameArgs, MutationSetOperationReducerArgs, MutationSetOperationSchemaArgs, MutationSetOperationTemplateArgs, MutationSetStateSchemaArgs, MutationUndoArgs, MutationUpdateChangeLogItemInputArgs, MutationUpdateOperationExampleArgs, MutationUpdateStateExampleArgs, NOOPAction, Node, OperationErrorSpecification, OperationIndex, OperationSpecification, OperationsByScope, PACKAGES_DEPENDENCIES, PHConnectAi, PHConnectApp, PHConnectBranding, PHConnectDefaultDrive, PHConnectDefaultDriveLocal, PHConnectDefaultDriveRemote, PHConnectDriveSection, PHConnectDriveSections, PHConnectDrives, PHConnectInstance, PHConnectPackages, PHConnectPwa, PHConnectPwaCacheStrategy, PHConnectPwaFileHandler, PHConnectPwaIcon, PHConnectPwaManifest, PHConnectPwaRuntimeCaching, PHConnectPwaUrlPattern, PHConnectReactor, PHConnectReactorFeatureFlags, PHConnectRenown, PHConnectRenownAdapters, PHConnectRuntimeConfig, PHConnectSentry, PHPackageProvider, PHReactorRenown, PHRenownPrivyAdapterConfig, PHRenownRainbowAdapterConfig, PackageInfo, PackageListItem, PackageManagerArgs, PackagePage, ParsedCmdResult, PartialRecord, PartialState, PathValidation, PhAiToolAnnotations, PhAiToolDescriptor, PowerhouseConfig, PowerhouseModule, PowerhousePackage, ProcessorApp, ProcessorApps, ProcessorDispatchResult, ProcessorFactory, ProcessorFactoryBuilder, ProcessorFilter, ProcessorRecord, ProcessorStatus, Prune, PruneAction, PruneActionInput, Publisher, PullResponderTriggerData, PullResponderTriggerDataInput, Query, Redo, RedoAction, RedoActionInput, Reducer, ReducerOptions, RegistryPackage, RegistryPackageList, RegistryPackageMap, RegistryPackageSource, RegistryPackageStatus, ReleaseNewVersionAction, RemoveListenerAction, RemoveListenerInput, RemoveRelationshipAction, RemoveRelationshipActionInput, RemoveTriggerAction, RemoveTriggerInput, ReorderChangeLogItemsAction, ReorderChangeLogItemsInput, ReorderModuleOperationsAction, ReorderModuleOperationsInput, ReorderModulesAction, ReorderModulesInput, ReorderOperationErrorsAction, ReorderOperationErrorsInput, ReorderOperationExamplesAction, ReorderOperationExamplesInput, ReorderStateExamplesAction, ReorderStateExamplesInput, ReplayDocumentOptions, RevisionsFilter, SaveToFile, SaveToFileHandle, Scalars, SchemaLoadStateAction, SchemaNOOPAction, SchemaPruneAction, SchemaRedoAction, SchemaSetNameAction, SchemaSetPreferredEditorAction, SchemaUndoAction, ScopeState, ServiceAction, ServiceActions, SetAuthorNameAction, SetAuthorNameInput, SetAuthorWebsiteAction, SetAuthorWebsiteInput, SetAvailableOfflineAction, SetAvailableOfflineInput, SetDriveIconAction, SetDriveIconInput, SetDriveNameAction, SetDriveNameInput, SetInitialStateAction, SetInitialStateInput, SetModelDescriptionAction, SetModelDescriptionInput, SetModelExtensionAction, SetModelExtensionInput, SetModelIdAction, SetModelIdInput, SetModelNameAction, SetModelNameInput, SetModuleDescriptionAction, SetModuleDescriptionInput, SetModuleNameAction, SetModuleNameInput, SetNameAction, SetNameActionInput, SetNameOperation, SetOperationDescriptionAction, SetOperationDescriptionInput, SetOperationErrorCodeAction, SetOperationErrorCodeInput, SetOperationErrorDescriptionAction, SetOperationErrorDescriptionInput, SetOperationErrorNameAction, SetOperationErrorNameInput, SetOperationErrorTemplateAction, SetOperationErrorTemplateInput, SetOperationNameAction, SetOperationNameInput, SetOperationReducerAction, SetOperationReducerInput, SetOperationSchemaAction, SetOperationSchemaInput, SetOperationScopeAction, SetOperationScopeInput, SetOperationTemplateAction, SetOperationTemplateInput, SetPreferredEditorAction, SetPreferredEditorActionInput, SetPreferredEditorOperation, SetSharingTypeAction, SetSharingTypeInput, SetStateSchemaAction, SetStateSchemaInput, Set_Name, Set_PreferredEditor, SharingType, Signal, SignalDispatch, SignalResult, SignalResults, SignalType, SignatureVerificationHandler, SigningParameters, SkipHeaderOperationIndex, SkipHeaderOperations, State, StateReducer, SubgraphModule, TrackedProcessor, TransmitterType, Trigger, TriggerData, TriggerInput, TriggerType, Undo, UndoAction, UndoActionInput, UndoRedoAction, UpdateChangeLogItemAction, UpdateChangeLogItemInput, UpdateFileAction, UpdateFileInput, UpdateNodeAction, UpdateNodeInput, UpdateOperationExampleAction, UpdateOperationExampleInput, UpdateRelationshipAction, UpdateRelationshipActionInput, UpdateStateExampleAction, UpdateStateExampleInput, UpgradeDocumentAction, UpgradeDocumentActionInput, User, ValidationError, buildTreeUrl, shortGitSha };
|
|
1
|
+
import { a as AnalyticsSeriesInput, c as CompoundAnalyticsExpression, d as ConversionMetric, f as IAnalyticsStore, i as AnalyticsSeries, l as CompoundAnalyticsInputs, n as AnalyticsOperand, o as AnalyticsSeriesQuery, p as MultiCurrencyConversion, r as AnalyticsQuery, s as AnalyticsUpdateCallback, t as AnalyticsDimension, u as CompoundAnalyticsQuery } from "./types-Bsp8VL2y.js";
|
|
2
|
+
import { $ as AddOperationErrorInput, $i as SetOperationNameInput, $n as MutationMoveOperationArgs, $r as ReorderChangeLogItemsInput, $s as ProcessorApps, $t as DocumentModelOperationExampleAction, A as PHPackageProvider, Aa as UndoRedoAction, Ai as SetModelExtensionInput, An as MakeEmpty, Ar as MutationUpdateStateExampleArgs, At as DeleteOperationErrorAction, B as ServiceActions, Ba as UpgradeDocumentActionInput, Bi as SetNameActionInput, Bn as Mutation, Br as PieceModule, Bt as DocumentModelDocumentModelModule, C as PHConnectPwaUrlPattern, Ca as SkipHeaderOperations, Ci as SetAuthorWebsiteAction, Cn as ISigner, Cr as MutationSetOperationReducerArgs, Ct as DeleteChildDocumentInput, D as PHConnectRenownAdapters, Da as Undo, Di as SetModelDescriptionAction, Dn as IsStateOfType, Dr as MutationUndoArgs, Dt as DeleteModuleAction, E as PHConnectRenown, Ea as SubgraphModule, Ei as SetInitialStateInput, En as IsDocumentOfType, Er as MutationSetStateSchemaArgs, Et as DeleteDocumentActionInput, F as ParsedCmdResult, Fa as UpdateRelationshipAction, Fi as SetModuleDescriptionAction, Fn as Maybe, Fr as OperationsByScope, Ft as DeleteStateExampleAction, G as ActionVerificationHandler, Gi as SetOperationErrorCodeInput, Gn as MutationAddOperationExampleArgs, Gr as RedoAction, Gt as DocumentModelLib, H as ActionErrorCallback, Ha as ValidationError, Hi as SetOperationDescriptionAction, Hn as MutationAddModuleArgs, Hr as Publisher, Ht as DocumentModelHeaderAction, I as PathValidation, Ia as UpdateRelationshipActionInput, Ii as SetModuleDescriptionInput, In as MinimalBackupData, Ir as PartialRecord, It as DeleteStateExampleInput, J as AddChangeLogItemInput, Ji as SetOperationErrorNameAction, Jn as MutationDeleteModuleArgs, Jr as ReducerOptions, Js as IProcessor, Jt as DocumentModelModuleAction, K as Actions, Ki as SetOperationErrorDescriptionAction, Kn as MutationAddStateExampleArgs, Kr as RedoActionInput, Kt as DocumentModelLocalState, L as PowerhouseConfig, La as UpdateStateExampleAction, Li as SetModuleNameAction, Ln as ModuleSpecification, Lr as PartialState, Lt as DocumentAction, M as PHRenownPrivyAdapterConfig, Ma as UpdateChangeLogItemInput, Mi as SetModelIdInput, Mn as MakeOptional, Mr as OperationErrorSpecification, Mt as DeleteOperationExampleAction, N as PHRenownRainbowAdapterConfig, Na as UpdateOperationExampleAction, Ni as SetModelNameAction, Nn as Manifest, Nr as OperationIndex, Nt as DeleteOperationExampleInput, O as PHConnectRuntimeConfig, Oa as UndoAction, Oi as SetModelDescriptionInput, On as LoadFromFile, Or as MutationUpdateChangeLogItemInputArgs, Ot as DeleteModuleInput, P as PackageManagerArgs, Pa as UpdateOperationExampleInput, Pi as SetModelNameInput, Pn as MappedOperation, Pr as OperationSpecification, Pt as DeleteOperationInput, Q as AddOperationErrorAction, Qi as SetOperationNameAction, Qn as MutationDeleteStateExampleArgs, Qr as ReorderChangeLogItemsAction, Qs as ProcessorApp, Qt as DocumentModelOperationErrorOperations, R as PowerhousePackage, Ra as UpdateStateExampleInput, Ri as SetModuleNameInput, Rn as MoveOperationAction, Rr as PhAiToolAnnotations, Rt as DocumentModelAction, S as PHConnectPwaRuntimeCaching, Sa as SkipHeaderOperationIndex, Si as SetAuthorNameInput, Sn as ISignalResult, Sr as MutationSetOperationNameArgs, St as DeleteChangeLogItemInput, T as PHConnectReactorFeatureFlags, Ta as StateReducer, Ti as SetInitialStateAction, Tn as InputMaybe, Tr as MutationSetOperationTemplateArgs, Tt as DeleteDocumentAction, U as ActionSignatureContext, Ui as SetOperationDescriptionInput, Un as MutationAddOperationArgs, Ur as Query, Ut as DocumentModelHeaderOperations, Va as User, Vi as SetNameOperation, Vn as MutationAddChangeLogItemInputArgs, Vr as PowerhouseModule, Vt as DocumentModelGlobalState, W as ActionSigningHandler, Wi as SetOperationErrorCodeAction, Wn as MutationAddOperationErrorArgs, Wr as Redo, Wt as DocumentModelInput, X as AddModuleInput, Xi as SetOperationErrorTemplateAction, Xn as MutationDeleteOperationErrorArgs, Xr as RemoveRelationshipAction, Xs as IProcessorHostModuleBase, Xt as DocumentModelOperationAction, Y as AddModuleAction, Yi as SetOperationErrorNameInput, Yn as MutationDeleteOperationArgs, Yr as ReleaseNewVersionAction, Ys as IProcessorDispatch, Yt as DocumentModelModuleOperations, Z as AddOperationAction, Zi as SetOperationErrorTemplateInput, Zn as MutationDeleteOperationExampleArgs, Zr as RemoveRelationshipActionInput, Zs as IProcessorManager, Zt as DocumentModelOperationErrorAction, _ as PHConnectPwa, _a as SignalResult, _i as SchemaSetNameAction, _n as IAction, _r as MutationSetOperationDescriptionArgs, _t as CreateDocument, a as PHConnectAi, aa as SetOperationScopeInput, ac as ProcessorStatus, ai as ReorderOperationErrorsInput, an as DocumentModelUtils, ar as MutationReorderOperationExamplesArgs, at as AddStateExampleAction, b as PHConnectPwaIcon, ba as SignatureVerificationHandler, bi as ScopeState, bn as IOperation, br as MutationSetOperationErrorNameArgs, bt as CreateState, c as PHConnectDefaultDrive, ca as SetPreferredEditorAction, ci as ReorderStateExamplesAction, cn as DocumentOperationsIgnoreMap, cr as MutationSetAuthorWebsiteArgs, ct as AssertIsStateOfType, d as PHConnectDriveSection, da as SetStateSchemaAction, di as RevisionsFilter, dn as EditorDispatch, dr as MutationSetModelExtensionArgs, dt as ConfigEntry, ea as SetOperationReducerAction, ec as ProcessorDispatchResult, ei as ReorderModuleOperationsAction, en as DocumentModelOperationExampleOperations, er as MutationRedoArgs, et as AddOperationExampleAction, f as PHConnectDriveSections, fa as SetStateSchemaInput, fi as SaveToFile, fn as EditorModule, fr as MutationSetModelIdArgs, ft as ConfigEntryType, g as PHConnectPackages, ga as SignalDispatch, gi as SchemaRedoAction, gn as GetDocumentOptions, gr as MutationSetNameArgs, gt as CreateChildDocumentSignal, h as PHConnectOpenPanel, ha as Signal, hi as SchemaNOOPAction, hn as FileInput, hr as MutationSetModuleNameArgs, ht as CreateChildDocumentInput, i as LogLevels, ia as SetOperationScopeAction, ic as ProcessorRecord, ii as ReorderOperationErrorsAction, in as DocumentModelStateOperations, ir as MutationReorderOperationErrorsArgs, it as AddRelationshipActionInput, j as PHReactorRenown, ja as UpdateChangeLogItemAction, ji as SetModelIdAction, jn as MakeMaybe, jr as NOOPAction, jt as DeleteOperationErrorInput, k as PHConnectSentry, ka as UndoActionInput, ki as SetModelExtensionAction, kn as LoadFromInput, kr as MutationUpdateOperationExampleArgs, kt as DeleteOperationAction, l as PHConnectDefaultDriveLocal, la as SetPreferredEditorActionInput, li as ReorderStateExamplesInput, ln as DocumentSpecification, lr as MutationSetInitialStateArgs, lt as Author, m as PHConnectInstance, ma as Set_PreferredEditor, mi as Scalars, mn as Exact, mr as MutationSetModuleDescriptionArgs, mt as CopyChildDocumentSignal, n as DrivePreserveStrategy, na as SetOperationSchemaAction, nc as ProcessorFactoryBuilder, ni as ReorderModulesAction, nn as DocumentModelPHState, nr as MutationReorderModuleOperationsArgs, nt as AddOperationInput, o as PHConnectApp, oa as SetOperationTemplateAction, oc as TrackedProcessor, oi as ReorderOperationExamplesAction, on as DocumentModelVersioningAction, or as MutationReorderStateExamplesArgs, ot as AddStateExampleInput, p as PHConnectDrives, pa as Set_Name, pi as SaveToFileHandle, pn as EditorProps, pr as MutationSetModelNameArgs, pt as CopyChildDocumentInput, q as AddChangeLogItemAction, qi as SetOperationErrorDescriptionInput, qn as MutationDeleteChangeLogItemInputArgs, qr as Reducer, qt as DocumentModelModule, r as LogLevel, ra as SetOperationSchemaInput, rc as ProcessorFilter, ri as ReorderModulesInput, rn as DocumentModelStateAction, rr as MutationReorderModulesArgs, rt as AddRelationshipAction, s as PHConnectBranding, sa as SetOperationTemplateInput, si as ReorderOperationExamplesInput, sn as DocumentModelVersioningOperations, sr as MutationSetAuthorNameArgs, st as AssertIsDocumentOfType, t as DrivePreserveStrategies, ta as SetOperationReducerInput, tc as ProcessorFactory, ti as ReorderModuleOperationsInput, tn as DocumentModelOperationOperations, tr as MutationReorderChangeLogItemsInputArgs, tt as AddOperationExampleInput, u as PHConnectDefaultDriveRemote, ua as SetPreferredEditorOperation, ui as ReplayDocumentOptions, un as ENSInfo, ur as MutationSetModelDescriptionArgs, ut as CodeExample, v as PHConnectPwaCacheStrategy, va as SignalResults, vi as SchemaSetPreferredEditorAction, vn as ID, vr as MutationSetOperationErrorCodeArgs, vt as CreateDocumentAction, w as PHConnectReactor, wa as State, wi as SetAuthorWebsiteInput, wn as Incremental, wr as MutationSetOperationSchemaArgs, wt as DeleteChildDocumentSignal, x as PHConnectPwaManifest, xa as SigningParameters, xi as SetAuthorNameAction, xn as ISignal, xr as MutationSetOperationErrorTemplateArgs, xt as DeleteChangeLogItemAction, y as PHConnectPwaFileHandler, ya as SignalType, yi as SchemaUndoAction, yn as IDocument, yr as MutationSetOperationErrorDescriptionArgs, yt as CreateDocumentActionInput, z as ServiceAction, za as UpgradeDocumentAction, zi as SetNameAction, zn as MoveOperationInput, zr as PhAiToolDescriptor, zt as DocumentModelDocument } from "./types-CmeoQg_J.js";
|
|
3
|
+
import { i as PACKAGES_DEPENDENCIES, n as APPS_DEPENDENCIES, r as CLIS_DEPENDENCIES, t as ALL_POWERHOUSE_DEPENDENCIES } from "./constants-DO4IYxuR.js";
|
|
4
|
+
import { $ as DeleteNodeAction, A as TriggerData, B as RegistryPackageMap, C as RemoveTriggerInput, D as SetSharingTypeInput, E as SetDriveNameInput, F as PackageInfo, G as DocumentDriveAction, H as RegistryPackageStatus, I as PackageListItem, J as LegacyAddFileInput, K as DocumentDriveDocument, L as PackagePage, M as TriggerType, N as UpdateFileInput, O as TransmitterType, P as UpdateNodeInput, Q as CopyNodeAction, R as RegistryPackage, S as RemoveListenerInput, T as SetDriveIconInput, U as DocumentDrivePHState, V as RegistryPackageSource, W as DriveDocumentModelModule, X as AddFileAction, Y as LegacySynchronizationUnit, Z as AddFolderAction, _ as ListenerInput, a as CopyNodeInput, at as AddListenerAction, b as PullResponderTriggerData, c as DocumentDriveLocalState, ct as DocumentDriveDriveOperations, d as FolderNode, dt as SetAvailableOfflineAction, et as DocumentDriveNodeAction, f as Listener, ft as SetDriveIconAction, g as ListenerFilterInput, h as ListenerFilter, i as AddTriggerInput, it as UpdateNodeAction, j as TriggerInput, k as Trigger, lt as RemoveListenerAction, m as ListenerCallInfoInput, mt as SetSharingTypeAction, n as AddFolderInput, nt as MoveNodeAction, o as DeleteNodeInput, ot as AddTriggerAction, p as ListenerCallInfo, pt as SetDriveNameAction, q as LegacyAddFileAction, r as AddListenerInput, rt as UpdateFileAction, s as DocumentDriveGlobalState, st as DocumentDriveDriveAction, t as AddFileInput, tt as DocumentDriveNodeOperations, u as FileNode, ut as RemoveTriggerAction, v as MoveNodeInput, w as SetAvailableOfflineInput, x as PullResponderTriggerDataInput, y as Node, z as RegistryPackageList } from "./types-CI3ren9F.js";
|
|
5
|
+
import { a as GenerateNodesCopyIdGenerator, i as DriveInput, n as buildTreeUrl, o as GenerateNodesCopySrc, r as shortGitSha, s as SharingType, t as GITHUB_REPO_URL } from "./index-5gwOhPG5.js";
|
|
6
|
+
export { ALL_POWERHOUSE_DEPENDENCIES, APPS_DEPENDENCIES, type ActionErrorCallback, type ActionSignatureContext, type ActionSigningHandler, type ActionVerificationHandler, type Actions, type AddChangeLogItemAction, type AddChangeLogItemInput, type AddFileAction, type AddFileInput, type AddFolderAction, type AddFolderInput, type AddListenerAction, type AddListenerInput, type AddModuleAction, type AddModuleInput, type AddOperationAction, type AddOperationErrorAction, type AddOperationErrorInput, type AddOperationExampleAction, type AddOperationExampleInput, type AddOperationInput, type AddRelationshipAction, type AddRelationshipActionInput, type AddStateExampleAction, type AddStateExampleInput, type AddTriggerAction, type AddTriggerInput, type AnalyticsDimension, type AnalyticsOperand, type AnalyticsQuery, type AnalyticsSeries, type AnalyticsSeriesInput, type AnalyticsSeriesQuery, type AnalyticsUpdateCallback, type AssertIsDocumentOfType, type AssertIsStateOfType, type Author, CLIS_DEPENDENCIES, type CodeExample, type CompoundAnalyticsExpression, type CompoundAnalyticsInputs, type CompoundAnalyticsQuery, type ConfigEntry, type ConfigEntryType, type ConversionMetric, type CopyChildDocumentInput, type CopyChildDocumentSignal, type CopyNodeAction, type CopyNodeInput, type CreateChildDocumentInput, type CreateChildDocumentSignal, type CreateDocument, type CreateDocumentAction, type CreateDocumentActionInput, type CreateState, type DeleteChangeLogItemAction, type DeleteChangeLogItemInput, type DeleteChildDocumentInput, type DeleteChildDocumentSignal, type DeleteDocumentAction, type DeleteDocumentActionInput, type DeleteModuleAction, type DeleteModuleInput, type DeleteNodeAction, type DeleteNodeInput, type DeleteOperationAction, type DeleteOperationErrorAction, type DeleteOperationErrorInput, type DeleteOperationExampleAction, type DeleteOperationExampleInput, type DeleteOperationInput, type DeleteStateExampleAction, type DeleteStateExampleInput, type DocumentAction, type DocumentDriveAction, type DocumentDriveDocument, type DocumentDriveDriveAction, type DocumentDriveDriveOperations, type DocumentDriveGlobalState, type DocumentDriveLocalState, type DocumentDriveNodeAction, type DocumentDriveNodeOperations, type DocumentDrivePHState, type DocumentModelAction, type DocumentModelDocument, type DocumentModelDocumentModelModule, type DocumentModelGlobalState, type DocumentModelHeaderAction, type DocumentModelHeaderOperations, type DocumentModelInput, type DocumentModelLib, type DocumentModelLocalState, type DocumentModelModule, type DocumentModelModuleAction, type DocumentModelModuleOperations, type DocumentModelOperationAction, type DocumentModelOperationErrorAction, type DocumentModelOperationErrorOperations, type DocumentModelOperationExampleAction, type DocumentModelOperationExampleOperations, type DocumentModelOperationOperations, type DocumentModelPHState, type DocumentModelStateAction, type DocumentModelStateOperations, type DocumentModelUtils, type DocumentModelVersioningAction, type DocumentModelVersioningOperations, type DocumentOperationsIgnoreMap, type DocumentSpecification, type DriveDocumentModelModule, type DriveInput, type DrivePreserveStrategies, type DrivePreserveStrategy, type ENSInfo, type EditorDispatch, type EditorModule, type EditorProps, type Exact, type FileInput, type FileNode, type FolderNode, GITHUB_REPO_URL, type GenerateNodesCopyIdGenerator, type GenerateNodesCopySrc, type GetDocumentOptions, type IAction, type IAnalyticsStore, type ID, type IDocument, type IOperation, type IProcessor, type IProcessorDispatch, type IProcessorHostModuleBase, type IProcessorManager, type ISignal, type ISignalResult, type ISigner, type Incremental, type InputMaybe, type IsDocumentOfType, type IsStateOfType, type LegacyAddFileAction, type LegacyAddFileInput, type LegacySynchronizationUnit, type Listener, type ListenerCallInfo, type ListenerCallInfoInput, type ListenerFilter, type ListenerFilterInput, type ListenerInput, type LoadFromFile, type LoadFromInput, type LogLevel, type LogLevels, type MakeEmpty, type MakeMaybe, type MakeOptional, type Manifest, type MappedOperation, type Maybe, type MinimalBackupData, type ModuleSpecification, type MoveNodeAction, type MoveNodeInput, type MoveOperationAction, type MoveOperationInput, type MultiCurrencyConversion, type Mutation, type MutationAddChangeLogItemInputArgs, type MutationAddModuleArgs, type MutationAddOperationArgs, type MutationAddOperationErrorArgs, type MutationAddOperationExampleArgs, type MutationAddStateExampleArgs, type MutationDeleteChangeLogItemInputArgs, type MutationDeleteModuleArgs, type MutationDeleteOperationArgs, type MutationDeleteOperationErrorArgs, type MutationDeleteOperationExampleArgs, type MutationDeleteStateExampleArgs, type MutationMoveOperationArgs, type MutationRedoArgs, type MutationReorderChangeLogItemsInputArgs, type MutationReorderModuleOperationsArgs, type MutationReorderModulesArgs, type MutationReorderOperationErrorsArgs, type MutationReorderOperationExamplesArgs, type MutationReorderStateExamplesArgs, type MutationSetAuthorNameArgs, type MutationSetAuthorWebsiteArgs, type MutationSetInitialStateArgs, type MutationSetModelDescriptionArgs, type MutationSetModelExtensionArgs, type MutationSetModelIdArgs, type MutationSetModelNameArgs, type MutationSetModuleDescriptionArgs, type MutationSetModuleNameArgs, type MutationSetNameArgs, type MutationSetOperationDescriptionArgs, type MutationSetOperationErrorCodeArgs, type MutationSetOperationErrorDescriptionArgs, type MutationSetOperationErrorNameArgs, type MutationSetOperationErrorTemplateArgs, type MutationSetOperationNameArgs, type MutationSetOperationReducerArgs, type MutationSetOperationSchemaArgs, type MutationSetOperationTemplateArgs, type MutationSetStateSchemaArgs, type MutationUndoArgs, type MutationUpdateChangeLogItemInputArgs, type MutationUpdateOperationExampleArgs, type MutationUpdateStateExampleArgs, type NOOPAction, type Node, type OperationErrorSpecification, type OperationIndex, type OperationSpecification, type OperationsByScope, PACKAGES_DEPENDENCIES, type PHConnectAi, type PHConnectApp, type PHConnectBranding, type PHConnectDefaultDrive, type PHConnectDefaultDriveLocal, type PHConnectDefaultDriveRemote, type PHConnectDriveSection, type PHConnectDriveSections, type PHConnectDrives, type PHConnectInstance, type PHConnectOpenPanel, type PHConnectPackages, type PHConnectPwa, type PHConnectPwaCacheStrategy, type PHConnectPwaFileHandler, type PHConnectPwaIcon, type PHConnectPwaManifest, type PHConnectPwaRuntimeCaching, type PHConnectPwaUrlPattern, type PHConnectReactor, type PHConnectReactorFeatureFlags, type PHConnectRenown, type PHConnectRenownAdapters, type PHConnectRuntimeConfig, type PHConnectSentry, type PHPackageProvider, type PHReactorRenown, type PHRenownPrivyAdapterConfig, type PHRenownRainbowAdapterConfig, type PackageInfo, type PackageListItem, type PackageManagerArgs, type PackagePage, type ParsedCmdResult, type PartialRecord, type PartialState, type PathValidation, type PhAiToolAnnotations, type PhAiToolDescriptor, type PieceModule, type PowerhouseConfig, type PowerhouseModule, type PowerhousePackage, type ProcessorApp, type ProcessorApps, type ProcessorDispatchResult, type ProcessorFactory, type ProcessorFactoryBuilder, type ProcessorFilter, type ProcessorRecord, type ProcessorStatus, type Publisher, type PullResponderTriggerData, type PullResponderTriggerDataInput, type Query, type Redo, type RedoAction, type RedoActionInput, type Reducer, type ReducerOptions, type RegistryPackage, type RegistryPackageList, type RegistryPackageMap, type RegistryPackageSource, type RegistryPackageStatus, type ReleaseNewVersionAction, type RemoveListenerAction, type RemoveListenerInput, type RemoveRelationshipAction, type RemoveRelationshipActionInput, type RemoveTriggerAction, type RemoveTriggerInput, type ReorderChangeLogItemsAction, type ReorderChangeLogItemsInput, type ReorderModuleOperationsAction, type ReorderModuleOperationsInput, type ReorderModulesAction, type ReorderModulesInput, type ReorderOperationErrorsAction, type ReorderOperationErrorsInput, type ReorderOperationExamplesAction, type ReorderOperationExamplesInput, type ReorderStateExamplesAction, type ReorderStateExamplesInput, type ReplayDocumentOptions, type RevisionsFilter, type SaveToFile, type SaveToFileHandle, type Scalars, type SchemaNOOPAction, type SchemaRedoAction, type SchemaSetNameAction, type SchemaSetPreferredEditorAction, type SchemaUndoAction, type ScopeState, type ServiceAction, type ServiceActions, type SetAuthorNameAction, type SetAuthorNameInput, type SetAuthorWebsiteAction, type SetAuthorWebsiteInput, type SetAvailableOfflineAction, type SetAvailableOfflineInput, type SetDriveIconAction, type SetDriveIconInput, type SetDriveNameAction, type SetDriveNameInput, type SetInitialStateAction, type SetInitialStateInput, type SetModelDescriptionAction, type SetModelDescriptionInput, type SetModelExtensionAction, type SetModelExtensionInput, type SetModelIdAction, type SetModelIdInput, type SetModelNameAction, type SetModelNameInput, type SetModuleDescriptionAction, type SetModuleDescriptionInput, type SetModuleNameAction, type SetModuleNameInput, type SetNameAction, type SetNameActionInput, type SetNameOperation, type SetOperationDescriptionAction, type SetOperationDescriptionInput, type SetOperationErrorCodeAction, type SetOperationErrorCodeInput, type SetOperationErrorDescriptionAction, type SetOperationErrorDescriptionInput, type SetOperationErrorNameAction, type SetOperationErrorNameInput, type SetOperationErrorTemplateAction, type SetOperationErrorTemplateInput, type SetOperationNameAction, type SetOperationNameInput, type SetOperationReducerAction, type SetOperationReducerInput, type SetOperationSchemaAction, type SetOperationSchemaInput, type SetOperationScopeAction, type SetOperationScopeInput, type SetOperationTemplateAction, type SetOperationTemplateInput, type SetPreferredEditorAction, type SetPreferredEditorActionInput, type SetPreferredEditorOperation, type SetSharingTypeAction, type SetSharingTypeInput, type SetStateSchemaAction, type SetStateSchemaInput, type Set_Name, type Set_PreferredEditor, type SharingType, type Signal, type SignalDispatch, type SignalResult, type SignalResults, type SignalType, type SignatureVerificationHandler, type SigningParameters, type SkipHeaderOperationIndex, type SkipHeaderOperations, type State, type StateReducer, type SubgraphModule, type TrackedProcessor, type TransmitterType, type Trigger, type TriggerData, type TriggerInput, type TriggerType, type Undo, type UndoAction, type UndoActionInput, type UndoRedoAction, type UpdateChangeLogItemAction, type UpdateChangeLogItemInput, type UpdateFileAction, type UpdateFileInput, type UpdateNodeAction, type UpdateNodeInput, type UpdateOperationExampleAction, type UpdateOperationExampleInput, type UpdateRelationshipAction, type UpdateRelationshipActionInput, type UpdateStateExampleAction, type UpdateStateExampleInput, type UpgradeDocumentAction, type UpgradeDocumentActionInput, type User, type ValidationError, buildTreeUrl, shortGitSha };
|
|
7
|
+
export {};
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../git.ts"],"sourcesContent":["export const GITHUB_REPO_URL = \"https://github.com/powerhouse-inc/powerhouse\";\n\nexport function buildTreeUrl(sha: string): string | null {\n if (!sha || sha === \"unknown\") return null;\n return `${GITHUB_REPO_URL}/tree/${sha}`;\n}\n\nexport function shortGitSha(sha: string): string {\n return sha === \"unknown\" ? sha : sha.slice(0, 7);\n}\n"],"mappings":";;AAAA,MAAa,kBAAkB;AAE/B,SAAgB,aAAa,KAA4B;
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../git.ts"],"sourcesContent":["export const GITHUB_REPO_URL = \"https://github.com/powerhouse-inc/powerhouse\";\n\nexport function buildTreeUrl(sha: string): string | null {\n if (!sha || sha === \"unknown\") return null;\n return `${GITHUB_REPO_URL}/tree/${sha}`;\n}\n\nexport function shortGitSha(sha: string): string {\n return sha === \"unknown\" ? sha : sha.slice(0, 7);\n}\n"],"mappings":";;AAAA,MAAa,kBAAkB;AAE/B,SAAgB,aAAa,KAA4B;CACvD,IAAI,CAAC,OAAO,QAAQ,WAAW,OAAO;CACtC,OAAO,GAAG,gBAAgB,QAAQ;AACpC;AAEA,SAAgB,YAAY,KAAqB;CAC/C,OAAO,QAAQ,YAAY,MAAM,IAAI,MAAM,GAAG,CAAC;AACjD"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { $s as
|
|
2
|
-
export { AuthorizerResult, DEFAULT_ANALYTICS_PROCESSOR_DB_NAME, DEFAULT_RELATIONAL_PROCESSOR_DB_NAME, ExtractProcessorSchemaOrSelf, HashAlgorithms, IBaseRelationalDb, IHttpScope, IProcessor, IProcessorDispatch, IProcessorHostModuleBase, IProcessorManager, IRelationalDb, IRelationalDbProcessor, IRelationalQueryBuilder, IRelationalQueryMethods, IWebhookEndpoints, IWebhookScope, NodeRouteSpec, PROCESSOR_APPS, ProcessorApp, ProcessorApps, ProcessorDispatchResult, ProcessorFactory, ProcessorFactoryBuilder, ProcessorFilter, ProcessorRecord, ProcessorStatus, RelationalDbProcessor, RelationalDbProcessorClass, RouteActor, RouteAuth, RouteAuthorizer, RouteBody, RouteContext, RouteHandler, RouteMethod, RouteOptions, RouteSpec, RouteTransport, RouteUser, ScopedRouteHandle, TrackedProcessor, WebhookEndpointInfo, WebhookField, WebhookHashAlgorithm, WebhookPolicy, WebhookReply, WebhookRequest, WebhookScheme, WebhookSignatureEncoding, WebhookSpec, WebhookVerification, createNamespacedDb, createNamespacedQueryBuilder, createRelationalDb, hashNamespace, relationalDbToQueryBuilder };
|
|
1
|
+
import { $s as ProcessorApps, Ac as WebhookScheme, Bs as HashAlgorithms, Cc as ScopedRouteHandle, Dc as WebhookPolicy, Ec as WebhookHashAlgorithm, Fd as DEFAULT_ANALYTICS_PROCESSOR_DB_NAME, Fs as createNamespacedQueryBuilder, Gs as IRelationalQueryMethods, Hs as IRelationalDb, Id as DEFAULT_RELATIONAL_PROCESSOR_DB_NAME, Is as createRelationalDb, Js as IProcessor, Ks as RelationalDbProcessor, Ld as PROCESSOR_APPS, Ls as hashNamespace, Mc as WebhookSpec, Nc as WebhookVerification, Oc as WebhookReply, Ps as createNamespacedDb, Qs as ProcessorApp, Rs as relationalDbToQueryBuilder, Sc as RouteUser, Tc as WebhookField, Us as IRelationalDbProcessor, Vs as IBaseRelationalDb, Ws as IRelationalQueryBuilder, Xs as IProcessorHostModuleBase, Ys as IProcessorDispatch, Zs as IProcessorManager, _c as RouteHandler, ac as ProcessorStatus, bc as RouteSpec, cc as IHttpScope, dc as NodeRouteSpec, ec as ProcessorDispatchResult, fc as RouteActor, gc as RouteContext, hc as RouteBody, ic as ProcessorRecord, jc as WebhookSignatureEncoding, kc as WebhookRequest, lc as IWebhookEndpoints, mc as RouteAuthorizer, nc as ProcessorFactoryBuilder, oc as TrackedProcessor, pc as RouteAuth, qs as RelationalDbProcessorClass, rc as ProcessorFilter, sc as AuthorizerResult, tc as ProcessorFactory, uc as IWebhookScope, vc as RouteMethod, wc as WebhookEndpointInfo, xc as RouteTransport, yc as RouteOptions, zs as ExtractProcessorSchemaOrSelf } from "../types-CmeoQg_J.js";
|
|
2
|
+
export { type AuthorizerResult, DEFAULT_ANALYTICS_PROCESSOR_DB_NAME, DEFAULT_RELATIONAL_PROCESSOR_DB_NAME, ExtractProcessorSchemaOrSelf, HashAlgorithms, IBaseRelationalDb, type IHttpScope, type IProcessor, type IProcessorDispatch, type IProcessorHostModuleBase, type IProcessorManager, IRelationalDb, IRelationalDbProcessor, IRelationalQueryBuilder, IRelationalQueryMethods, type IWebhookEndpoints, type IWebhookScope, type NodeRouteSpec, PROCESSOR_APPS, type ProcessorApp, type ProcessorApps, type ProcessorDispatchResult, type ProcessorFactory, type ProcessorFactoryBuilder, type ProcessorFilter, type ProcessorRecord, type ProcessorStatus, RelationalDbProcessor, RelationalDbProcessorClass, type RouteActor, type RouteAuth, type RouteAuthorizer, type RouteBody, type RouteContext, type RouteHandler, type RouteMethod, type RouteOptions, type RouteSpec, type RouteTransport, type RouteUser, type ScopedRouteHandle, type TrackedProcessor, type WebhookEndpointInfo, type WebhookField, type WebhookHashAlgorithm, type WebhookPolicy, type WebhookReply, type WebhookRequest, type WebhookScheme, type WebhookSignatureEncoding, type WebhookSpec, type WebhookVerification, createNamespacedDb, createNamespacedQueryBuilder, createRelationalDb, hashNamespace, relationalDbToQueryBuilder };
|
|
3
|
+
export {};
|
package/dist/processors/index.js
CHANGED
|
@@ -23,7 +23,8 @@ const LOG2_26 = Math.log2(26);
|
|
|
23
23
|
*/
|
|
24
24
|
function hashNamespace(str, length = 10) {
|
|
25
25
|
const requiredBits = Math.ceil(length * LOG2_26);
|
|
26
|
-
|
|
26
|
+
const bitSize = SUPPORTED_SIZES.find((size) => size && size >= requiredBits) ?? 1024;
|
|
27
|
+
return toBase26(fnv1a(str, { size: bitSize }), length);
|
|
27
28
|
}
|
|
28
29
|
function toBase26(num, length = 10) {
|
|
29
30
|
const alphabet = "abcdefghijklmnopqrstuvwxyz";
|
|
@@ -78,6 +79,9 @@ const IS_RELATIONAL_DB_PROCESSOR = Symbol.for("ph.IS_RELATIONAL_DB_PROCESSOR");
|
|
|
78
79
|
* allowing derived classes to focus on business logic.
|
|
79
80
|
*/
|
|
80
81
|
var RelationalDbProcessor = class {
|
|
82
|
+
_namespace;
|
|
83
|
+
_filter;
|
|
84
|
+
relationalDb;
|
|
81
85
|
constructor(_namespace, _filter, relationalDb) {
|
|
82
86
|
this._namespace = _namespace;
|
|
83
87
|
this._filter = _filter;
|