jazz-tools 2.0.0-alpha.9 → 2.0.0-beta.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/LICENSE +21 -0
- package/README.md +134 -7
- package/bin/jazz-tools.js +95 -68
- package/dist/_dev/inspector-cache-runtime.d.ts +8 -0
- package/dist/_dev/inspector-cache-runtime.d.ts.map +1 -0
- package/dist/_dev/inspector-cache-runtime.js +246 -0
- package/dist/_dev/inspector-cache-runtime.js.map +1 -0
- package/dist/_dev/inspector-client.d.ts +15 -0
- package/dist/_dev/inspector-client.d.ts.map +1 -0
- package/dist/_dev/inspector-client.js +134 -0
- package/dist/_dev/inspector-client.js.map +1 -0
- package/dist/_dev/native-account-session.d.ts +23 -0
- package/dist/_dev/native-account-session.d.ts.map +1 -0
- package/dist/_dev/native-account-session.js +61 -0
- package/dist/_dev/native-account-session.js.map +1 -0
- package/dist/_dev/native-binding-codec.d.ts +9 -0
- package/dist/_dev/native-binding-codec.d.ts.map +1 -0
- package/dist/_dev/native-binding-codec.js +9 -0
- package/dist/_dev/native-binding-codec.js.map +1 -0
- package/dist/accounts/account-manager-core.d.ts +87 -0
- package/dist/accounts/account-manager-core.d.ts.map +1 -0
- package/dist/accounts/account-manager-core.js +236 -0
- package/dist/accounts/account-manager-core.js.map +1 -0
- package/dist/accounts/browser-host.d.ts +8 -0
- package/dist/accounts/browser-host.d.ts.map +1 -0
- package/dist/accounts/browser-host.js +16 -0
- package/dist/accounts/browser-host.js.map +1 -0
- package/dist/accounts/config-capability.d.ts +26 -0
- package/dist/accounts/config-capability.d.ts.map +1 -0
- package/dist/accounts/config-capability.js +58 -0
- package/dist/accounts/config-capability.js.map +1 -0
- package/dist/accounts/context.d.ts +14 -0
- package/dist/accounts/context.d.ts.map +1 -0
- package/dist/accounts/context.js +214 -0
- package/dist/accounts/context.js.map +1 -0
- package/dist/accounts/enrollment.d.ts +95 -0
- package/dist/accounts/enrollment.d.ts.map +1 -0
- package/dist/accounts/enrollment.js +314 -0
- package/dist/accounts/enrollment.js.map +1 -0
- package/dist/accounts/exports.d.ts +3 -0
- package/dist/accounts/exports.d.ts.map +1 -0
- package/dist/accounts/exports.js +5 -0
- package/dist/accounts/exports.js.map +1 -0
- package/dist/accounts/local-first.d.ts +17 -0
- package/dist/accounts/local-first.d.ts.map +1 -0
- package/dist/accounts/local-first.js +62 -0
- package/dist/accounts/local-first.js.map +1 -0
- package/dist/accounts/persistence.d.ts +79 -0
- package/dist/accounts/persistence.d.ts.map +1 -0
- package/dist/accounts/persistence.js +533 -0
- package/dist/accounts/persistence.js.map +1 -0
- package/dist/accounts/process-store.d.ts +27 -0
- package/dist/accounts/process-store.d.ts.map +1 -0
- package/dist/accounts/process-store.js +49 -0
- package/dist/accounts/process-store.js.map +1 -0
- package/dist/accounts/registry-client.d.ts +79 -0
- package/dist/accounts/registry-client.d.ts.map +1 -0
- package/dist/accounts/registry-client.js +153 -0
- package/dist/accounts/registry-client.js.map +1 -0
- package/dist/accounts/state.d.ts +76 -0
- package/dist/accounts/state.d.ts.map +1 -0
- package/dist/accounts/state.js +172 -0
- package/dist/accounts/state.js.map +1 -0
- package/dist/app-file-enums.d.ts +9 -0
- package/dist/app-file-enums.d.ts.map +1 -0
- package/dist/app-file-enums.js +34 -0
- package/dist/app-file-enums.js.map +1 -0
- package/dist/authoring.d.ts +9 -0
- package/dist/authoring.d.ts.map +1 -0
- package/dist/authoring.js +9 -0
- package/dist/authoring.js.map +1 -0
- package/dist/backend/admission.d.ts +28 -0
- package/dist/backend/admission.d.ts.map +1 -0
- package/dist/backend/admission.js +146 -0
- package/dist/backend/admission.js.map +1 -0
- package/dist/backend/api.d.ts +12 -0
- package/dist/backend/api.d.ts.map +1 -0
- package/dist/backend/api.js +11 -0
- package/dist/backend/api.js.map +1 -0
- package/dist/backend/backend-clients.d.ts +76 -0
- package/dist/backend/backend-clients.d.ts.map +1 -0
- package/dist/backend/backend-clients.js +237 -0
- package/dist/backend/backend-clients.js.map +1 -0
- package/dist/backend/backend-issuer.d.ts +6 -0
- package/dist/backend/backend-issuer.d.ts.map +1 -0
- package/dist/backend/backend-issuer.js +6 -0
- package/dist/backend/backend-issuer.js.map +1 -0
- package/dist/backend/backend-native.d.ts +40 -0
- package/dist/backend/backend-native.d.ts.map +1 -0
- package/dist/backend/backend-native.js +37 -0
- package/dist/backend/backend-native.js.map +1 -0
- package/dist/backend/blobs.d.ts +130 -0
- package/dist/backend/blobs.d.ts.map +1 -0
- package/dist/backend/blobs.js +132 -0
- package/dist/backend/blobs.js.map +1 -0
- package/dist/backend/core-transport.d.ts +61 -0
- package/dist/backend/core-transport.d.ts.map +1 -0
- package/dist/backend/core-transport.js +106 -0
- package/dist/backend/core-transport.js.map +1 -0
- package/dist/backend/create-jazz-context.d.ts +94 -28
- package/dist/backend/create-jazz-context.d.ts.map +1 -1
- package/dist/backend/create-jazz-context.js +661 -67
- package/dist/backend/create-jazz-context.js.map +1 -1
- package/dist/backend/create-jazz-session.d.ts +125 -0
- package/dist/backend/create-jazz-session.d.ts.map +1 -0
- package/dist/backend/create-jazz-session.js +528 -0
- package/dist/backend/create-jazz-session.js.map +1 -0
- package/dist/backend/create-jazz.d.ts +677 -0
- package/dist/backend/create-jazz.d.ts.map +1 -0
- package/dist/backend/create-jazz.js +4076 -0
- package/dist/backend/create-jazz.js.map +1 -0
- package/dist/backend/early-db.d.ts +29 -0
- package/dist/backend/early-db.d.ts.map +1 -0
- package/dist/backend/early-db.js +203 -0
- package/dist/backend/early-db.js.map +1 -0
- package/dist/backend/external-jwt.d.ts +27 -0
- package/dist/backend/external-jwt.d.ts.map +1 -0
- package/dist/backend/external-jwt.js +404 -0
- package/dist/backend/external-jwt.js.map +1 -0
- package/dist/backend/from-jwt.d.ts +64 -0
- package/dist/backend/from-jwt.d.ts.map +1 -0
- package/dist/backend/from-jwt.js +104 -0
- package/dist/backend/from-jwt.js.map +1 -0
- package/dist/backend/index.d.ts +6 -3
- package/dist/backend/index.d.ts.map +1 -1
- package/dist/backend/index.js +18 -2
- package/dist/backend/index.js.map +1 -1
- package/dist/backend/inspect-ui.d.ts +14 -0
- package/dist/backend/inspect-ui.d.ts.map +1 -0
- package/dist/backend/inspect-ui.js +156 -0
- package/dist/backend/inspect-ui.js.map +1 -0
- package/dist/backend/inspect.d.ts +133 -0
- package/dist/backend/inspect.d.ts.map +1 -0
- package/dist/backend/inspect.js +1001 -0
- package/dist/backend/inspect.js.map +1 -0
- package/dist/backend/inspector-ui/0.js +2 -0
- package/dist/backend/inspector-ui/1.js +2 -0
- package/dist/backend/inspector-ui/10.js +2 -0
- package/dist/backend/inspector-ui/11.js +2 -0
- package/dist/backend/inspector-ui/12.js +2 -0
- package/dist/backend/inspector-ui/13.js +2 -0
- package/dist/backend/inspector-ui/14.js +2 -0
- package/dist/backend/inspector-ui/15.js +2 -0
- package/dist/backend/inspector-ui/16.js +2 -0
- package/dist/backend/inspector-ui/17.js +2 -0
- package/dist/backend/inspector-ui/18.js +2 -0
- package/dist/backend/inspector-ui/19.js +2 -0
- package/dist/backend/inspector-ui/2.js +2 -0
- package/dist/backend/inspector-ui/20.js +2 -0
- package/dist/backend/inspector-ui/21.js +2 -0
- package/dist/backend/inspector-ui/3.js +2 -0
- package/dist/backend/inspector-ui/4.js +2 -0
- package/dist/backend/inspector-ui/5.js +2 -0
- package/dist/backend/inspector-ui/6.js +2 -0
- package/dist/backend/inspector-ui/7.js +2 -0
- package/dist/backend/inspector-ui/8.js +2 -0
- package/dist/backend/inspector-ui/9.js +2 -0
- package/dist/backend/inspector-ui-files.d.ts +4 -0
- package/dist/backend/inspector-ui-files.d.ts.map +1 -0
- package/dist/backend/inspector-ui-files.js +26 -0
- package/dist/backend/no-account-error.d.ts +23 -0
- package/dist/backend/no-account-error.d.ts.map +1 -0
- package/dist/backend/no-account-error.js +30 -0
- package/dist/backend/no-account-error.js.map +1 -0
- package/dist/backend/node-native.d.ts +3 -0
- package/dist/backend/node-native.d.ts.map +1 -0
- package/dist/backend/node-native.js +19 -0
- package/dist/backend/node-native.js.map +1 -0
- package/dist/backend/node-peers.d.ts +10 -0
- package/dist/backend/node-peers.d.ts.map +1 -0
- package/dist/backend/node-peers.js +37 -0
- package/dist/backend/node-peers.js.map +1 -0
- package/dist/backend/optional-peer.d.ts +9 -0
- package/dist/backend/optional-peer.d.ts.map +1 -0
- package/dist/backend/optional-peer.js +24 -0
- package/dist/backend/optional-peer.js.map +1 -0
- package/dist/backend/request-auth.d.ts +69 -0
- package/dist/backend/request-auth.d.ts.map +1 -0
- package/dist/backend/request-auth.js +122 -0
- package/dist/backend/request-auth.js.map +1 -0
- package/dist/backend/session-expiry.d.ts +61 -0
- package/dist/backend/session-expiry.d.ts.map +1 -0
- package/dist/backend/session-expiry.js +102 -0
- package/dist/backend/session-expiry.js.map +1 -0
- package/dist/backend/signing-key.d.ts +32 -0
- package/dist/backend/signing-key.d.ts.map +1 -0
- package/dist/backend/signing-key.js +63 -0
- package/dist/backend/signing-key.js.map +1 -0
- package/dist/backend/socket-deadline.d.ts +23 -0
- package/dist/backend/socket-deadline.d.ts.map +1 -0
- package/dist/backend/socket-deadline.js +70 -0
- package/dist/backend/socket-deadline.js.map +1 -0
- package/dist/backend/store-log.d.ts +3 -0
- package/dist/backend/store-log.d.ts.map +1 -0
- package/dist/backend/store-log.js +16 -0
- package/dist/backend/store-log.js.map +1 -0
- package/dist/backend/thin-relay.d.ts +66 -0
- package/dist/backend/thin-relay.d.ts.map +1 -0
- package/dist/backend/thin-relay.js +204 -0
- package/dist/backend/thin-relay.js.map +1 -0
- package/dist/backend/thin-session-client.d.ts +23 -0
- package/dist/backend/thin-session-client.d.ts.map +1 -0
- package/dist/backend/thin-session-client.js +69 -0
- package/dist/backend/thin-session-client.js.map +1 -0
- package/dist/backend/upgrade-status.d.ts +19 -0
- package/dist/backend/upgrade-status.d.ts.map +1 -0
- package/dist/backend/upgrade-status.js +55 -0
- package/dist/backend/upgrade-status.js.map +1 -0
- package/dist/backend/vercel-store.d.ts +345 -0
- package/dist/backend/vercel-store.d.ts.map +1 -0
- package/dist/backend/vercel-store.js +1387 -0
- package/dist/backend/vercel-store.js.map +1 -0
- package/dist/backend/workerd-backend.d.ts +36 -0
- package/dist/backend/workerd-backend.d.ts.map +1 -0
- package/dist/backend/workerd-backend.js +97 -0
- package/dist/backend/workerd-backend.js.map +1 -0
- package/dist/backend/workerd.d.ts +3 -0
- package/dist/backend/workerd.d.ts.map +1 -0
- package/dist/backend/workerd.js +39 -0
- package/dist/backend/workerd.js.map +1 -0
- package/dist/backend/ws-peer.d.ts +32 -0
- package/dist/backend/ws-peer.d.ts.map +1 -0
- package/dist/backend/ws-peer.js +41 -0
- package/dist/backend/ws-peer.js.map +1 -0
- package/dist/better-auth-adapter/fixtures/app.d.ts +151 -0
- package/dist/better-auth-adapter/fixtures/app.d.ts.map +1 -0
- package/dist/better-auth-adapter/fixtures/app.js +13 -0
- package/dist/better-auth-adapter/fixtures/app.js.map +1 -0
- package/dist/better-auth-adapter/fixtures/issuer-upgrade.d.ts +20 -0
- package/dist/better-auth-adapter/fixtures/issuer-upgrade.d.ts.map +1 -0
- package/dist/better-auth-adapter/fixtures/issuer-upgrade.js +27 -0
- package/dist/better-auth-adapter/fixtures/issuer-upgrade.js.map +1 -0
- package/dist/better-auth-adapter/index.d.ts +13 -0
- package/dist/better-auth-adapter/index.d.ts.map +1 -0
- package/dist/better-auth-adapter/index.js +406 -0
- package/dist/better-auth-adapter/index.js.map +1 -0
- package/dist/better-auth-adapter/indexes.d.ts +9 -0
- package/dist/better-auth-adapter/indexes.d.ts.map +1 -0
- package/dist/better-auth-adapter/indexes.js +40 -0
- package/dist/better-auth-adapter/indexes.js.map +1 -0
- package/dist/better-auth-adapter/schema.d.ts +88 -0
- package/dist/better-auth-adapter/schema.d.ts.map +1 -0
- package/dist/better-auth-adapter/schema.js +332 -0
- package/dist/better-auth-adapter/schema.js.map +1 -0
- package/dist/better-auth-adapter/types.d.ts +13 -0
- package/dist/better-auth-adapter/types.d.ts.map +1 -0
- package/dist/better-auth-adapter/types.js +2 -0
- package/dist/better-auth-adapter/types.js.map +1 -0
- package/dist/better-auth-adapter/utils.d.ts +53 -0
- package/dist/better-auth-adapter/utils.d.ts.map +1 -0
- package/dist/better-auth-adapter/utils.js +126 -0
- package/dist/better-auth-adapter/utils.js.map +1 -0
- package/dist/browser-benchmark-mode.d.ts +6 -0
- package/dist/browser-benchmark-mode.d.ts.map +1 -0
- package/dist/browser-benchmark-mode.js +13 -0
- package/dist/browser-benchmark-mode.js.map +1 -0
- package/dist/classic-api.d.ts +59 -0
- package/dist/classic-api.d.ts.map +1 -0
- package/dist/classic-api.js +122 -0
- package/dist/classic-api.js.map +1 -0
- package/dist/cli.d.ts +38 -2
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +457 -265
- package/dist/cli.js.map +1 -1
- package/dist/client/index.d.ts +9 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +5 -0
- package/dist/client/index.js.map +1 -0
- package/dist/cloud/api.d.ts +11 -0
- package/dist/cloud/api.d.ts.map +1 -0
- package/dist/cloud/api.js +46 -0
- package/dist/cloud/api.js.map +1 -0
- package/dist/cloud/commands.d.ts +13 -0
- package/dist/cloud/commands.d.ts.map +1 -0
- package/dist/cloud/commands.js +425 -0
- package/dist/cloud/commands.js.map +1 -0
- package/dist/cloud/credentials.d.ts +49 -0
- package/dist/cloud/credentials.d.ts.map +1 -0
- package/dist/cloud/credentials.js +219 -0
- package/dist/cloud/credentials.js.map +1 -0
- package/dist/cloud/session.d.ts +57 -0
- package/dist/cloud/session.d.ts.map +1 -0
- package/dist/cloud/session.js +269 -0
- package/dist/cloud/session.js.map +1 -0
- package/dist/codegen/relation-analyzer.d.ts +5 -12
- package/dist/codegen/relation-analyzer.d.ts.map +1 -1
- package/dist/codegen/relation-analyzer.js +53 -64
- package/dist/codegen/relation-analyzer.js.map +1 -1
- package/dist/dev/app-files.d.ts +32 -0
- package/dist/dev/app-files.d.ts.map +1 -0
- package/dist/dev/app-files.js +72 -0
- package/dist/dev/app-files.js.map +1 -0
- package/dist/dev/catalogue-api.d.ts +147 -0
- package/dist/dev/catalogue-api.d.ts.map +1 -0
- package/dist/dev/catalogue-api.js +127 -0
- package/dist/dev/catalogue-api.js.map +1 -0
- package/dist/dev/catalogue.d.ts +69 -0
- package/dist/dev/catalogue.d.ts.map +1 -0
- package/dist/dev/catalogue.js +70 -0
- package/dist/dev/catalogue.js.map +1 -0
- package/dist/dev/codegen-napi.d.ts +139 -0
- package/dist/dev/codegen-napi.d.ts.map +1 -0
- package/dist/dev/codegen-napi.js +157 -0
- package/dist/dev/codegen-napi.js.map +1 -0
- package/dist/dev/dev-server.d.ts +62 -0
- package/dist/dev/dev-server.d.ts.map +1 -0
- package/dist/dev/dev-server.js +164 -0
- package/dist/dev/dev-server.js.map +1 -0
- package/dist/dev/index.d.ts +3 -0
- package/dist/dev/index.d.ts.map +1 -0
- package/dist/dev/index.js +3 -0
- package/dist/dev/index.js.map +1 -0
- package/dist/dev/inspector-overlay/browser-control-registry.d.ts +10 -0
- package/dist/dev/inspector-overlay/browser-control-registry.d.ts.map +1 -0
- package/dist/dev/inspector-overlay/browser-control-registry.js +188 -0
- package/dist/dev/inspector-overlay/browser-control-registry.js.map +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/ExportResult-C0ZojfNk.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/backend-0Idv0niF.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/backend-DHeT1LCS.css +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/create-legacy-browser-delegate-DeI8PAZ5.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/diag-api-3Z_Eel3W.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/esm-BB6DtWpZ.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/esm-B_xpsQL2.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/esm-CE7mSo95.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/esm-CcBEG-yV.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/esm-DZrCzNXM.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/esm-k373aadI.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/index-DUKUt96e.js +5 -0
- package/dist/dev/inspector-overlay/embedded/assets/jazz-broker-worker-C_mr9Omd.js +5 -0
- package/dist/dev/inspector-overlay/embedded/assets/jazz_wasm-BOvbCHn3.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/jazz_wasm_bg-BG8gazqt.wasm +0 -0
- package/dist/dev/inspector-overlay/embedded/assets/node-foreground-node-lease.browser-2mfp13Qb.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/rolldown-runtime-XKyaHtl9.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/src-4JwhxZaW.js +16 -0
- package/dist/dev/inspector-overlay/embedded/assets/src-Cq8gSOLx.css +1 -0
- package/dist/dev/inspector-overlay/embedded/backend.html +17 -0
- package/dist/dev/inspector-overlay/embedded/embedded.html +15 -0
- package/dist/dev/inspector-overlay/embedded/favicon.ico +0 -0
- package/dist/dev/inspector-overlay/host-bridge.d.ts +8 -0
- package/dist/dev/inspector-overlay/host-bridge.d.ts.map +1 -0
- package/dist/dev/inspector-overlay/host-bridge.js +139 -0
- package/dist/dev/inspector-overlay/host-bridge.js.map +1 -0
- package/dist/dev/inspector-overlay/inspector-host-types.d.ts +35 -0
- package/dist/dev/inspector-overlay/inspector-host-types.d.ts.map +1 -0
- package/dist/dev/inspector-overlay/inspector-host-types.js +10 -0
- package/dist/dev/inspector-overlay/inspector-host-types.js.map +1 -0
- package/dist/dev/inspector-overlay/loader.d.ts +24 -0
- package/dist/dev/inspector-overlay/loader.d.ts.map +1 -0
- package/dist/dev/inspector-overlay/loader.js +533 -0
- package/dist/dev/inspector-overlay/loader.js.map +1 -0
- package/dist/dev/migration-graph.d.ts +32 -0
- package/dist/dev/migration-graph.d.ts.map +1 -0
- package/dist/dev/migration-graph.js +136 -0
- package/dist/dev/migration-graph.js.map +1 -0
- package/dist/dev/migrations.d.ts +145 -0
- package/dist/dev/migrations.d.ts.map +1 -0
- package/dist/dev/migrations.js +700 -0
- package/dist/dev/migrations.js.map +1 -0
- package/dist/dev/project.d.ts +65 -0
- package/dist/dev/project.d.ts.map +1 -0
- package/dist/dev/project.js +179 -0
- package/dist/dev/project.js.map +1 -0
- package/dist/dev/schema-utils.d.ts +8 -0
- package/dist/dev/schema-utils.d.ts.map +1 -0
- package/dist/dev/schema-utils.js +75 -0
- package/dist/dev/schema-utils.js.map +1 -0
- package/dist/dev/schema-validation.d.ts +5 -0
- package/dist/dev/schema-validation.d.ts.map +1 -0
- package/dist/dev/schema-validation.js +11 -0
- package/dist/dev/schema-validation.js.map +1 -0
- package/dist/dev/ts-project.d.ts +77 -0
- package/dist/dev/ts-project.d.ts.map +1 -0
- package/dist/dev/ts-project.js +191 -0
- package/dist/dev/ts-project.js.map +1 -0
- package/dist/drivers/index.d.ts +1 -1
- package/dist/drivers/index.d.ts.map +1 -1
- package/dist/drivers/index.js.map +1 -1
- package/dist/drivers/schema-wire.d.ts +19 -3
- package/dist/drivers/schema-wire.d.ts.map +1 -1
- package/dist/drivers/schema-wire.js +61 -11
- package/dist/drivers/schema-wire.js.map +1 -1
- package/dist/drivers/types.d.ts +166 -29
- package/dist/drivers/types.d.ts.map +1 -1
- package/dist/drivers/types.js +5 -2
- package/dist/drivers/types.js.map +1 -1
- package/dist/dsl.d.ts +276 -121
- package/dist/dsl.d.ts.map +1 -1
- package/dist/dsl.js +196 -160
- package/dist/dsl.js.map +1 -1
- package/dist/durable-object/index.d.ts +26 -0
- package/dist/durable-object/index.d.ts.map +1 -0
- package/dist/durable-object/index.js +26 -0
- package/dist/durable-object/index.js.map +1 -0
- package/dist/e2ee/SODIUM-LICENSE.txt +36 -0
- package/dist/e2ee/SODIUM-SOURCES.json +4 -0
- package/dist/e2ee/browser.d.ts +18 -0
- package/dist/e2ee/browser.d.ts.map +1 -0
- package/dist/e2ee/browser.js +111 -0
- package/dist/e2ee/browser.js.map +1 -0
- package/dist/e2ee/context.d.ts +23 -0
- package/dist/e2ee/context.d.ts.map +1 -0
- package/dist/e2ee/context.js +49 -0
- package/dist/e2ee/context.js.map +1 -0
- package/dist/e2ee/crypto.d.ts +10 -0
- package/dist/e2ee/crypto.d.ts.map +1 -0
- package/dist/e2ee/crypto.js +22 -0
- package/dist/e2ee/crypto.js.map +1 -0
- package/dist/e2ee/envelope.d.ts +22 -0
- package/dist/e2ee/envelope.d.ts.map +1 -0
- package/dist/e2ee/envelope.js +52 -0
- package/dist/e2ee/envelope.js.map +1 -0
- package/dist/e2ee/index.d.ts +14 -0
- package/dist/e2ee/index.d.ts.map +1 -0
- package/dist/e2ee/index.js +3 -0
- package/dist/e2ee/index.js.map +1 -0
- package/dist/e2ee/large-value.d.ts +20 -0
- package/dist/e2ee/large-value.d.ts.map +1 -0
- package/dist/e2ee/large-value.js +204 -0
- package/dist/e2ee/large-value.js.map +1 -0
- package/dist/e2ee/native.d.ts +18 -0
- package/dist/e2ee/native.d.ts.map +1 -0
- package/dist/e2ee/native.js +91 -0
- package/dist/e2ee/native.js.map +1 -0
- package/dist/e2ee/record-frame.d.ts +3 -0
- package/dist/e2ee/record-frame.d.ts.map +1 -0
- package/dist/e2ee/record-frame.js +18 -0
- package/dist/e2ee/record-frame.js.map +1 -0
- package/dist/e2ee/signer.d.ts +10 -0
- package/dist/e2ee/signer.d.ts.map +1 -0
- package/dist/e2ee/signer.js +54 -0
- package/dist/e2ee/signer.js.map +1 -0
- package/dist/e2ee/sodium-browser.d.ts +2 -0
- package/dist/e2ee/sodium-browser.d.ts.map +1 -0
- package/dist/e2ee/sodium-browser.js +3432 -0
- package/dist/e2ee/sodium.d.ts +20 -0
- package/dist/e2ee/sodium.d.ts.map +1 -0
- package/dist/e2ee/sodium.js +165 -0
- package/dist/e2ee/sodium.js.map +1 -0
- package/dist/e2ee/types.d.ts +92 -0
- package/dist/e2ee/types.d.ts.map +1 -0
- package/dist/e2ee/types.js +2 -0
- package/dist/e2ee/types.js.map +1 -0
- package/dist/effect/backend/index.d.ts +8 -0
- package/dist/effect/backend/index.d.ts.map +1 -0
- package/dist/effect/backend/index.js +8 -0
- package/dist/effect/backend/index.js.map +1 -0
- package/dist/effect/errors.d.ts +53 -0
- package/dist/effect/errors.d.ts.map +1 -0
- package/dist/effect/errors.js +61 -0
- package/dist/effect/errors.js.map +1 -0
- package/dist/effect/index.d.ts +9 -0
- package/dist/effect/index.d.ts.map +1 -0
- package/dist/effect/index.js +9 -0
- package/dist/effect/index.js.map +1 -0
- package/dist/effect/jazz-backend.d.ts +69 -0
- package/dist/effect/jazz-backend.d.ts.map +1 -0
- package/dist/effect/jazz-backend.js +95 -0
- package/dist/effect/jazz-backend.js.map +1 -0
- package/dist/effect/jazz.d.ts +129 -0
- package/dist/effect/jazz.d.ts.map +1 -0
- package/dist/effect/jazz.js +182 -0
- package/dist/effect/jazz.js.map +1 -0
- package/dist/expo/create-account-manager.d.ts +28 -0
- package/dist/expo/create-account-manager.d.ts.map +1 -0
- package/dist/expo/create-account-manager.js +35 -0
- package/dist/expo/create-account-manager.js.map +1 -0
- package/dist/expo/create-jazz-session.d.ts +66 -0
- package/dist/expo/create-jazz-session.d.ts.map +1 -0
- package/dist/expo/create-jazz-session.js +96 -0
- package/dist/expo/create-jazz-session.js.map +1 -0
- package/dist/expo/index.d.ts +12 -0
- package/dist/expo/index.d.ts.map +1 -0
- package/dist/expo/index.js +10 -0
- package/dist/expo/index.js.map +1 -0
- package/dist/expo/metro.d.ts +20 -0
- package/dist/expo/metro.d.ts.map +1 -0
- package/dist/expo/metro.js +58 -0
- package/dist/expo/metro.js.map +1 -0
- package/dist/expo/polyfills.d.ts +2 -0
- package/dist/expo/polyfills.d.ts.map +1 -0
- package/dist/expo/polyfills.js +5 -0
- package/dist/expo/polyfills.js.map +1 -0
- package/dist/expo/provider.d.ts +10 -0
- package/dist/expo/provider.d.ts.map +1 -0
- package/dist/expo/provider.js +11 -0
- package/dist/expo/provider.js.map +1 -0
- package/dist/index.d.ts +21 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -12
- package/dist/index.js.map +1 -1
- package/dist/inspect/cli.d.ts +12 -0
- package/dist/inspect/cli.d.ts.map +1 -0
- package/dist/inspect/cli.js +320 -0
- package/dist/inspect/cli.js.map +1 -0
- package/dist/inspect/client.d.ts +67 -0
- package/dist/inspect/client.d.ts.map +1 -0
- package/dist/inspect/client.js +254 -0
- package/dist/inspect/client.js.map +1 -0
- package/dist/inspect/mcp.d.ts +28 -0
- package/dist/inspect/mcp.d.ts.map +1 -0
- package/dist/inspect/mcp.js +441 -0
- package/dist/inspect/mcp.js.map +1 -0
- package/dist/inspect/protocol.d.ts +317 -0
- package/dist/inspect/protocol.d.ts.map +1 -0
- package/dist/inspect/protocol.js +544 -0
- package/dist/inspect/protocol.js.map +1 -0
- package/dist/inspector/index.d.ts +10 -0
- package/dist/inspector/index.d.ts.map +1 -0
- package/dist/inspector/index.js +27 -0
- package/dist/inspector/index.js.map +1 -0
- package/dist/internal/inspector-query.d.ts +6 -0
- package/dist/internal/inspector-query.d.ts.map +1 -0
- package/dist/internal/inspector-query.js +20 -0
- package/dist/internal/inspector-query.js.map +1 -0
- package/dist/ir.d.ts +43 -7
- package/dist/ir.d.ts.map +1 -1
- package/dist/ir.js +509 -1
- package/dist/ir.js.map +1 -1
- package/dist/json-value.d.ts +6 -0
- package/dist/json-value.d.ts.map +1 -0
- package/dist/json-value.js +2 -0
- package/dist/json-value.js.map +1 -0
- package/dist/local-first/index.d.ts +18 -0
- package/dist/local-first/index.d.ts.map +1 -0
- package/dist/local-first/index.js +17 -0
- package/dist/local-first/index.js.map +1 -0
- package/dist/local-first-auth/browser.d.ts +18 -0
- package/dist/local-first-auth/browser.d.ts.map +1 -0
- package/dist/local-first-auth/browser.js +26 -0
- package/dist/local-first-auth/browser.js.map +1 -0
- package/dist/local-first-auth/encoding.d.ts +10 -0
- package/dist/local-first-auth/encoding.d.ts.map +1 -0
- package/dist/local-first-auth/encoding.js +38 -0
- package/dist/local-first-auth/encoding.js.map +1 -0
- package/dist/local-first-auth/identity.d.ts +73 -0
- package/dist/local-first-auth/identity.d.ts.map +1 -0
- package/dist/local-first-auth/identity.js +258 -0
- package/dist/local-first-auth/identity.js.map +1 -0
- package/dist/local-first-auth/index.d.ts +6 -0
- package/dist/local-first-auth/index.d.ts.map +1 -0
- package/dist/local-first-auth/index.js +4 -0
- package/dist/local-first-auth/index.js.map +1 -0
- package/dist/local-first-auth/passkey.d.ts +22 -0
- package/dist/local-first-auth/passkey.d.ts.map +1 -0
- package/dist/local-first-auth/passkey.js +116 -0
- package/dist/local-first-auth/passkey.js.map +1 -0
- package/dist/local-first-auth/recovery-phrase.d.ts +10 -0
- package/dist/local-first-auth/recovery-phrase.d.ts.map +1 -0
- package/dist/local-first-auth/recovery-phrase.js +59 -0
- package/dist/local-first-auth/recovery-phrase.js.map +1 -0
- package/dist/local-first-auth/secret.d.ts +25 -0
- package/dist/local-first-auth/secret.d.ts.map +1 -0
- package/dist/local-first-auth/secret.js +68 -0
- package/dist/local-first-auth/secret.js.map +1 -0
- package/dist/local-first-auth/server.d.ts +13 -0
- package/dist/local-first-auth/server.d.ts.map +1 -0
- package/dist/local-first-auth/server.js +32 -0
- package/dist/local-first-auth/server.js.map +1 -0
- package/dist/local-first-auth/store.d.ts +51 -0
- package/dist/local-first-auth/store.d.ts.map +1 -0
- package/dist/local-first-auth/store.js +112 -0
- package/dist/local-first-auth/store.js.map +1 -0
- package/dist/magic-columns.d.ts +40 -0
- package/dist/magic-columns.d.ts.map +1 -0
- package/dist/magic-columns.js +110 -0
- package/dist/magic-columns.js.map +1 -0
- package/dist/migration-namespace.d.ts +12 -0
- package/dist/migration-namespace.d.ts.map +1 -0
- package/dist/migration-namespace.js +13 -0
- package/dist/migration-namespace.js.map +1 -0
- package/dist/migrations.d.ts +286 -0
- package/dist/migrations.d.ts.map +1 -0
- package/dist/migrations.js +188 -0
- package/dist/migrations.js.map +1 -0
- package/dist/module-interop.d.ts +17 -0
- package/dist/module-interop.d.ts.map +1 -0
- package/dist/module-interop.js +32 -0
- package/dist/module-interop.js.map +1 -0
- package/dist/observed-jazz-client.d.ts +15 -0
- package/dist/observed-jazz-client.d.ts.map +1 -0
- package/dist/observed-jazz-client.js +47 -0
- package/dist/observed-jazz-client.js.map +1 -0
- package/dist/passkey-backup.d.ts +3 -0
- package/dist/passkey-backup.d.ts.map +1 -0
- package/dist/passkey-backup.js +2 -0
- package/dist/passkey-backup.js.map +1 -0
- package/dist/passphrase.d.ts +2 -0
- package/dist/passphrase.d.ts.map +1 -0
- package/dist/passphrase.js +2 -0
- package/dist/passphrase.js.map +1 -0
- package/dist/permissions/__fixtures__/big-label-better-auth.d.ts +89 -0
- package/dist/permissions/__fixtures__/big-label-better-auth.d.ts.map +1 -0
- package/dist/permissions/__fixtures__/big-label-better-auth.js +62 -0
- package/dist/permissions/__fixtures__/big-label-better-auth.js.map +1 -0
- package/dist/permissions/__fixtures__/big-label.d.ts +332 -0
- package/dist/permissions/__fixtures__/big-label.d.ts.map +1 -0
- package/dist/permissions/__fixtures__/big-label.js +177 -0
- package/dist/permissions/__fixtures__/big-label.js.map +1 -0
- package/dist/permissions/__fixtures__/chat-react.d.ts +112 -0
- package/dist/permissions/__fixtures__/chat-react.d.ts.map +1 -0
- package/dist/permissions/__fixtures__/chat-react.js +51 -0
- package/dist/permissions/__fixtures__/chat-react.js.map +1 -0
- package/dist/permissions/compile.d.ts +182 -0
- package/dist/permissions/compile.d.ts.map +1 -0
- package/dist/permissions/compile.js +715 -0
- package/dist/permissions/compile.js.map +1 -0
- package/dist/permissions/dsl.d.ts +158 -0
- package/dist/permissions/dsl.d.ts.map +1 -0
- package/dist/permissions/dsl.js +391 -0
- package/dist/permissions/dsl.js.map +1 -0
- package/dist/permissions/relation.d.ts +84 -0
- package/dist/permissions/relation.d.ts.map +1 -0
- package/dist/permissions/relation.js +150 -0
- package/dist/permissions/relation.js.map +1 -0
- package/dist/permissions/types.d.ts +357 -0
- package/dist/permissions/types.d.ts.map +1 -0
- package/dist/permissions/types.js +5 -0
- package/dist/permissions/types.js.map +1 -0
- package/dist/printer/app-json.d.ts +96 -0
- package/dist/printer/app-json.d.ts.map +1 -0
- package/dist/printer/app-json.js +18 -0
- package/dist/printer/app-json.js.map +1 -0
- package/dist/printer/cli.d.ts +15 -0
- package/dist/printer/cli.d.ts.map +1 -0
- package/dist/printer/cli.js +76 -0
- package/dist/printer/cli.js.map +1 -0
- package/dist/printer/defs.d.ts +11 -0
- package/dist/printer/defs.d.ts.map +1 -0
- package/dist/printer/defs.js +123 -0
- package/dist/printer/defs.js.map +1 -0
- package/dist/printer/expr.d.ts +281 -0
- package/dist/printer/expr.d.ts.map +1 -0
- package/dist/printer/expr.js +940 -0
- package/dist/printer/expr.js.map +1 -0
- package/dist/printer/format.d.ts +17 -0
- package/dist/printer/format.d.ts.map +1 -0
- package/dist/printer/format.js +315 -0
- package/dist/printer/format.js.map +1 -0
- package/dist/printer/index.d.ts +31 -0
- package/dist/printer/index.d.ts.map +1 -0
- package/dist/printer/index.js +51 -0
- package/dist/printer/index.js.map +1 -0
- package/dist/printer/migrations.d.ts +28 -0
- package/dist/printer/migrations.d.ts.map +1 -0
- package/dist/printer/migrations.js +179 -0
- package/dist/printer/migrations.js.map +1 -0
- package/dist/printer/names.d.ts +17 -0
- package/dist/printer/names.d.ts.map +1 -0
- package/dist/printer/names.js +124 -0
- package/dist/printer/names.js.map +1 -0
- package/dist/printer/permissions.d.ts +60 -0
- package/dist/printer/permissions.d.ts.map +1 -0
- package/dist/printer/permissions.js +1167 -0
- package/dist/printer/permissions.js.map +1 -0
- package/dist/printer/schema.d.ts +18 -0
- package/dist/printer/schema.d.ts.map +1 -0
- package/dist/printer/schema.js +132 -0
- package/dist/printer/schema.js.map +1 -0
- package/dist/prosemirror/anchors.d.ts +30 -0
- package/dist/prosemirror/anchors.d.ts.map +1 -0
- package/dist/prosemirror/anchors.js +28 -0
- package/dist/prosemirror/anchors.js.map +1 -0
- package/dist/prosemirror/index.d.ts +7 -0
- package/dist/prosemirror/index.d.ts.map +1 -0
- package/dist/prosemirror/index.js +7 -0
- package/dist/prosemirror/index.js.map +1 -0
- package/dist/prosemirror/markdown.d.ts +95 -0
- package/dist/prosemirror/markdown.d.ts.map +1 -0
- package/dist/prosemirror/markdown.js +428 -0
- package/dist/prosemirror/markdown.js.map +1 -0
- package/dist/prosemirror/overlays.d.ts +69 -0
- package/dist/prosemirror/overlays.d.ts.map +1 -0
- package/dist/prosemirror/overlays.js +143 -0
- package/dist/prosemirror/overlays.js.map +1 -0
- package/dist/prosemirror/presence.d.ts +39 -0
- package/dist/prosemirror/presence.d.ts.map +1 -0
- package/dist/prosemirror/presence.js +88 -0
- package/dist/prosemirror/presence.js.map +1 -0
- package/dist/prosemirror/sync.d.ts +60 -0
- package/dist/prosemirror/sync.d.ts.map +1 -0
- package/dist/prosemirror/sync.js +196 -0
- package/dist/prosemirror/sync.js.map +1 -0
- package/dist/prosemirror/text-map.d.ts +21 -0
- package/dist/prosemirror/text-map.d.ts.map +1 -0
- package/dist/prosemirror/text-map.js +85 -0
- package/dist/prosemirror/text-map.js.map +1 -0
- package/dist/react/create-jazz-client.d.ts +2 -11
- package/dist/react/create-jazz-client.d.ts.map +1 -1
- package/dist/react/create-jazz-client.js +1 -47
- package/dist/react/create-jazz-client.js.map +1 -1
- package/dist/react/index.d.ts +14 -7
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +8 -6
- package/dist/react/index.js.map +1 -1
- package/dist/react/provider-props.d.ts +7 -0
- package/dist/react/provider-props.d.ts.map +1 -0
- package/dist/react/provider-props.js +15 -0
- package/dist/react/provider-props.js.map +1 -0
- package/dist/react/provider.d.ts +19 -15
- package/dist/react/provider.d.ts.map +1 -1
- package/dist/react/provider.js +25 -5
- package/dist/react/provider.js.map +1 -1
- package/dist/react/use-all.d.ts +1 -1
- package/dist/react/use-all.d.ts.map +1 -1
- package/dist/react/use-all.js +1 -1
- package/dist/react/use-all.js.map +1 -1
- package/dist/react/use-one.d.ts +2 -0
- package/dist/react/use-one.d.ts.map +1 -0
- package/dist/react/use-one.js +2 -0
- package/dist/react/use-one.js.map +1 -0
- package/dist/react-core/index.d.ts +9 -4
- package/dist/react-core/index.d.ts.map +1 -1
- package/dist/react-core/index.js +10 -2
- package/dist/react-core/index.js.map +1 -1
- package/dist/react-core/provider.d.ts +48 -12
- package/dist/react-core/provider.d.ts.map +1 -1
- package/dist/react-core/provider.js +117 -13
- package/dist/react-core/provider.js.map +1 -1
- package/dist/react-core/session-context.d.ts +7 -0
- package/dist/react-core/session-context.d.ts.map +1 -0
- package/dist/react-core/session-context.js +8 -0
- package/dist/react-core/session-context.js.map +1 -0
- package/dist/react-core/session.d.ts +63 -0
- package/dist/react-core/session.d.ts.map +1 -0
- package/dist/react-core/session.js +97 -0
- package/dist/react-core/session.js.map +1 -0
- package/dist/react-core/use-all.d.ts +95 -3
- package/dist/react-core/use-all.d.ts.map +1 -1
- package/dist/react-core/use-all.js +126 -52
- package/dist/react-core/use-all.js.map +1 -1
- package/dist/react-core/use-auth-state.d.ts +13 -0
- package/dist/react-core/use-auth-state.d.ts.map +1 -0
- package/dist/react-core/use-auth-state.js +15 -0
- package/dist/react-core/use-auth-state.js.map +1 -0
- package/dist/react-core/use-one.d.ts +58 -0
- package/dist/react-core/use-one.d.ts.map +1 -0
- package/dist/react-core/use-one.js +19 -0
- package/dist/react-core/use-one.js.map +1 -0
- package/dist/react-core/use-sync-status.d.ts +8 -0
- package/dist/react-core/use-sync-status.d.ts.map +1 -0
- package/dist/react-core/use-sync-status.js +12 -0
- package/dist/react-core/use-sync-status.js.map +1 -0
- package/dist/react-native/abort-signal.d.ts +9 -0
- package/dist/react-native/abort-signal.d.ts.map +1 -0
- package/dist/react-native/abort-signal.js +51 -0
- package/dist/react-native/abort-signal.js.map +1 -0
- package/dist/react-native/account-session.d.ts +11 -0
- package/dist/react-native/account-session.d.ts.map +1 -0
- package/dist/react-native/account-session.js +59 -0
- package/dist/react-native/account-session.js.map +1 -0
- package/dist/react-native/create-account-manager.d.ts +28 -0
- package/dist/react-native/create-account-manager.d.ts.map +1 -0
- package/dist/react-native/create-account-manager.js +30 -0
- package/dist/react-native/create-account-manager.js.map +1 -0
- package/dist/react-native/create-db.d.ts +8 -0
- package/dist/react-native/create-db.d.ts.map +1 -0
- package/dist/react-native/create-db.js +9 -0
- package/dist/react-native/create-db.js.map +1 -0
- package/dist/react-native/create-jazz-client.d.ts +12 -10
- package/dist/react-native/create-jazz-client.d.ts.map +1 -1
- package/dist/react-native/create-jazz-client.js +6 -21
- package/dist/react-native/create-jazz-client.js.map +1 -1
- package/dist/react-native/create-jazz-session.d.ts +66 -0
- package/dist/react-native/create-jazz-session.d.ts.map +1 -0
- package/dist/react-native/create-jazz-session.js +96 -0
- package/dist/react-native/create-jazz-session.js.map +1 -0
- package/dist/react-native/errors.d.ts +6 -0
- package/dist/react-native/errors.d.ts.map +1 -0
- package/dist/react-native/errors.js +6 -0
- package/dist/react-native/errors.js.map +1 -0
- package/dist/react-native/index.d.ts +19 -9
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/react-native/index.js +13 -7
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/native-foreground-db.d.ts +227 -0
- package/dist/react-native/native-foreground-db.d.ts.map +1 -0
- package/dist/react-native/native-foreground-db.js +905 -0
- package/dist/react-native/native-foreground-db.js.map +1 -0
- package/dist/react-native/native-relay.d.ts +7 -0
- package/dist/react-native/native-relay.d.ts.map +1 -0
- package/dist/react-native/native-relay.js +14 -0
- package/dist/react-native/native-relay.js.map +1 -0
- package/dist/react-native/provider.d.ts +19 -13
- package/dist/react-native/provider.d.ts.map +1 -1
- package/dist/react-native/provider.js +25 -5
- package/dist/react-native/provider.js.map +1 -1
- package/dist/react-native/runtime-source.d.ts +62 -0
- package/dist/react-native/runtime-source.d.ts.map +1 -0
- package/dist/react-native/runtime-source.js +314 -0
- package/dist/react-native/runtime-source.js.map +1 -0
- package/dist/react-native/use-all.d.ts +1 -1
- package/dist/react-native/use-all.d.ts.map +1 -1
- package/dist/react-native/use-all.js +1 -1
- package/dist/react-native/use-all.js.map +1 -1
- package/dist/react-native/use-one.d.ts +2 -0
- package/dist/react-native/use-one.d.ts.map +1 -0
- package/dist/react-native/use-one.js +2 -0
- package/dist/react-native/use-one.js.map +1 -0
- package/dist/reconcile-array.d.ts +45 -0
- package/dist/reconcile-array.d.ts.map +1 -0
- package/dist/reconcile-array.js +252 -0
- package/dist/reconcile-array.js.map +1 -0
- package/dist/relationships.d.ts +18 -0
- package/dist/relationships.d.ts.map +1 -0
- package/dist/relationships.js +28 -0
- package/dist/relationships.js.map +1 -0
- package/dist/runtime/auth-renewal-backoff.d.ts +14 -0
- package/dist/runtime/auth-renewal-backoff.d.ts.map +1 -0
- package/dist/runtime/auth-renewal-backoff.js +23 -0
- package/dist/runtime/auth-renewal-backoff.js.map +1 -0
- package/dist/runtime/auth-request-deadline.d.ts +3 -0
- package/dist/runtime/auth-request-deadline.d.ts.map +1 -0
- package/dist/runtime/auth-request-deadline.js +24 -0
- package/dist/runtime/auth-request-deadline.js.map +1 -0
- package/dist/runtime/auth-secret-codec.d.ts +21 -0
- package/dist/runtime/auth-secret-codec.d.ts.map +1 -0
- package/dist/runtime/auth-secret-codec.js +32 -0
- package/dist/runtime/auth-secret-codec.js.map +1 -0
- package/dist/runtime/auth-secret-store.d.ts +7 -0
- package/dist/runtime/auth-secret-store.d.ts.map +1 -0
- package/dist/runtime/auth-secret-store.js +12 -0
- package/dist/runtime/auth-secret-store.js.map +1 -0
- package/dist/runtime/auth-state.d.ts +47 -0
- package/dist/runtime/auth-state.d.ts.map +1 -0
- package/dist/runtime/auth-state.js +161 -0
- package/dist/runtime/auth-state.js.map +1 -0
- package/dist/runtime/author-id.d.ts +42 -0
- package/dist/runtime/author-id.d.ts.map +1 -0
- package/dist/runtime/author-id.js +172 -0
- package/dist/runtime/author-id.js.map +1 -0
- package/dist/runtime/authority-changed-error.d.ts +56 -0
- package/dist/runtime/authority-changed-error.d.ts.map +1 -0
- package/dist/runtime/authority-changed-error.js +74 -0
- package/dist/runtime/authority-changed-error.js.map +1 -0
- package/dist/runtime/backlog-rows.d.ts +3 -0
- package/dist/runtime/backlog-rows.d.ts.map +1 -0
- package/dist/runtime/backlog-rows.js +7 -0
- package/dist/runtime/backlog-rows.js.map +1 -0
- package/dist/runtime/browser-physical-database-epoch.d.ts +37 -0
- package/dist/runtime/browser-physical-database-epoch.d.ts.map +1 -0
- package/dist/runtime/browser-physical-database-epoch.js +89 -0
- package/dist/runtime/browser-physical-database-epoch.js.map +1 -0
- package/dist/runtime/browser-storage-invalidation.d.ts +8 -0
- package/dist/runtime/browser-storage-invalidation.d.ts.map +1 -0
- package/dist/runtime/browser-storage-invalidation.js +20 -0
- package/dist/runtime/browser-storage-invalidation.js.map +1 -0
- package/dist/runtime/browser-store-generation.d.ts +15 -0
- package/dist/runtime/browser-store-generation.d.ts.map +1 -0
- package/dist/runtime/browser-store-generation.js +48 -0
- package/dist/runtime/browser-store-generation.js.map +1 -0
- package/dist/runtime/browser-worker-assets.d.ts +31 -0
- package/dist/runtime/browser-worker-assets.d.ts.map +1 -0
- package/dist/runtime/browser-worker-assets.js +40 -0
- package/dist/runtime/browser-worker-assets.js.map +1 -0
- package/dist/runtime/browser-worker-assets.metro.d.ts +28 -0
- package/dist/runtime/browser-worker-assets.metro.d.ts.map +1 -0
- package/dist/runtime/browser-worker-assets.metro.js +52 -0
- package/dist/runtime/browser-worker-assets.metro.js.map +1 -0
- package/dist/runtime/browser-worker-assets.native.d.ts +7 -0
- package/dist/runtime/browser-worker-assets.native.d.ts.map +1 -0
- package/dist/runtime/browser-worker-assets.native.js +8 -0
- package/dist/runtime/browser-worker-assets.native.js.map +1 -0
- package/dist/runtime/browser-worker-config.d.ts +78 -0
- package/dist/runtime/browser-worker-config.d.ts.map +1 -0
- package/dist/runtime/browser-worker-config.js +299 -0
- package/dist/runtime/browser-worker-config.js.map +1 -0
- package/dist/runtime/client-config-key.d.ts +6 -0
- package/dist/runtime/client-config-key.d.ts.map +1 -0
- package/dist/runtime/client-config-key.js +83 -0
- package/dist/runtime/client-config-key.js.map +1 -0
- package/dist/runtime/client-migrations.d.ts +27 -0
- package/dist/runtime/client-migrations.d.ts.map +1 -0
- package/dist/runtime/client-migrations.js +25 -0
- package/dist/runtime/client-migrations.js.map +1 -0
- package/dist/runtime/client-registry.d.ts +21 -0
- package/dist/runtime/client-registry.d.ts.map +1 -0
- package/dist/runtime/client-registry.js +169 -0
- package/dist/runtime/client-registry.js.map +1 -0
- package/dist/runtime/client-scope.d.ts +38 -0
- package/dist/runtime/client-scope.d.ts.map +1 -0
- package/dist/runtime/client-scope.js +64 -0
- package/dist/runtime/client-scope.js.map +1 -0
- package/dist/runtime/client-session.d.ts +56 -14
- package/dist/runtime/client-session.d.ts.map +1 -1
- package/dist/runtime/client-session.js +211 -195
- package/dist/runtime/client-session.js.map +1 -1
- package/dist/runtime/client.d.ts +721 -194
- package/dist/runtime/client.d.ts.map +1 -1
- package/dist/runtime/client.js +1213 -434
- package/dist/runtime/client.js.map +1 -1
- package/dist/runtime/column-transforms.d.ts +26 -0
- package/dist/runtime/column-transforms.d.ts.map +1 -0
- package/dist/runtime/column-transforms.js +186 -0
- package/dist/runtime/column-transforms.js.map +1 -0
- package/dist/runtime/connection-manager/browser-connection-manager.d.ts +178 -0
- package/dist/runtime/connection-manager/browser-connection-manager.d.ts.map +1 -0
- package/dist/runtime/connection-manager/browser-connection-manager.js +1030 -0
- package/dist/runtime/connection-manager/browser-connection-manager.js.map +1 -0
- package/dist/runtime/connection-manager/direct-connection-manager.d.ts +28 -0
- package/dist/runtime/connection-manager/direct-connection-manager.d.ts.map +1 -0
- package/dist/runtime/connection-manager/direct-connection-manager.js +202 -0
- package/dist/runtime/connection-manager/direct-connection-manager.js.map +1 -0
- package/dist/runtime/connection-manager/index.d.ts +5 -0
- package/dist/runtime/connection-manager/index.d.ts.map +1 -0
- package/dist/runtime/connection-manager/index.js +4 -0
- package/dist/runtime/connection-manager/index.js.map +1 -0
- package/dist/runtime/connection-manager/types.d.ts +174 -0
- package/dist/runtime/connection-manager/types.d.ts.map +1 -0
- package/dist/runtime/connection-manager/types.js +396 -0
- package/dist/runtime/connection-manager/types.js.map +1 -0
- package/dist/runtime/context.d.ts +100 -30
- package/dist/runtime/context.d.ts.map +1 -1
- package/dist/runtime/context.js.map +1 -1
- package/dist/runtime/core-tick-failed-error.d.ts +31 -0
- package/dist/runtime/core-tick-failed-error.d.ts.map +1 -0
- package/dist/runtime/core-tick-failed-error.js +45 -0
- package/dist/runtime/core-tick-failed-error.js.map +1 -0
- package/dist/runtime/credentialed-transport.d.ts +42 -0
- package/dist/runtime/credentialed-transport.d.ts.map +1 -0
- package/dist/runtime/credentialed-transport.js +178 -0
- package/dist/runtime/credentialed-transport.js.map +1 -0
- package/dist/runtime/db-access-context.d.ts +14 -0
- package/dist/runtime/db-access-context.d.ts.map +1 -0
- package/dist/runtime/db-access-context.js +26 -0
- package/dist/runtime/db-access-context.js.map +1 -0
- package/dist/runtime/db-internal-session.d.ts +7 -0
- package/dist/runtime/db-internal-session.d.ts.map +1 -0
- package/dist/runtime/db-internal-session.js +21 -0
- package/dist/runtime/db-internal-session.js.map +1 -0
- package/dist/runtime/db-replaced-error.d.ts +21 -0
- package/dist/runtime/db-replaced-error.d.ts.map +1 -0
- package/dist/runtime/db-replaced-error.js +22 -0
- package/dist/runtime/db-replaced-error.js.map +1 -0
- package/dist/runtime/db.d.ts +857 -215
- package/dist/runtime/db.d.ts.map +1 -1
- package/dist/runtime/db.js +3474 -834
- package/dist/runtime/db.js.map +1 -1
- package/dist/runtime/default-create-db.d.ts +5 -0
- package/dist/runtime/default-create-db.d.ts.map +1 -0
- package/dist/runtime/default-create-db.js +7 -0
- package/dist/runtime/default-create-db.js.map +1 -0
- package/dist/runtime/default-runtime-source.d.ts +41 -0
- package/dist/runtime/default-runtime-source.d.ts.map +1 -0
- package/dist/runtime/default-runtime-source.js +326 -0
- package/dist/runtime/default-runtime-source.js.map +1 -0
- package/dist/runtime/delete-local-first-store.d.ts +12 -0
- package/dist/runtime/delete-local-first-store.d.ts.map +1 -0
- package/dist/runtime/delete-local-first-store.js +12 -0
- package/dist/runtime/delete-local-first-store.js.map +1 -0
- package/dist/runtime/deterministic-bytes.d.ts +6 -0
- package/dist/runtime/deterministic-bytes.d.ts.map +1 -0
- package/dist/runtime/deterministic-bytes.js +18 -0
- package/dist/runtime/deterministic-bytes.js.map +1 -0
- package/dist/runtime/graceful-shutdown-error.d.ts +17 -0
- package/dist/runtime/graceful-shutdown-error.d.ts.map +1 -0
- package/dist/runtime/graceful-shutdown-error.js +31 -0
- package/dist/runtime/graceful-shutdown-error.js.map +1 -0
- package/dist/runtime/hex.d.ts +21 -0
- package/dist/runtime/hex.d.ts.map +1 -0
- package/dist/runtime/hex.js +62 -0
- package/dist/runtime/hex.js.map +1 -0
- package/dist/runtime/history-relation.d.ts +8 -0
- package/dist/runtime/history-relation.d.ts.map +1 -0
- package/dist/runtime/history-relation.js +44 -0
- package/dist/runtime/history-relation.js.map +1 -0
- package/dist/runtime/in-process-transport.d.ts +18 -0
- package/dist/runtime/in-process-transport.d.ts.map +1 -0
- package/dist/runtime/in-process-transport.js +32 -0
- package/dist/runtime/in-process-transport.js.map +1 -0
- package/dist/runtime/index.d.ts +22 -13
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +14 -12
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/indexeddb-page-store.d.ts +214 -0
- package/dist/runtime/indexeddb-page-store.d.ts.map +1 -0
- package/dist/runtime/indexeddb-page-store.js +848 -0
- package/dist/runtime/indexeddb-page-store.js.map +1 -0
- package/dist/runtime/introspection-fetch.d.ts +18 -0
- package/dist/runtime/introspection-fetch.d.ts.map +1 -0
- package/dist/runtime/introspection-fetch.js +12 -0
- package/dist/runtime/introspection-fetch.js.map +1 -0
- package/dist/runtime/json-schema-evaluate.d.ts +55 -0
- package/dist/runtime/json-schema-evaluate.d.ts.map +1 -0
- package/dist/runtime/json-schema-evaluate.js +946 -0
- package/dist/runtime/json-schema-evaluate.js.map +1 -0
- package/dist/runtime/json-schema-formats.d.ts +14 -0
- package/dist/runtime/json-schema-formats.d.ts.map +1 -0
- package/dist/runtime/json-schema-formats.js +555 -0
- package/dist/runtime/json-schema-formats.js.map +1 -0
- package/dist/runtime/json-schema-json.d.ts +41 -0
- package/dist/runtime/json-schema-json.d.ts.map +1 -0
- package/dist/runtime/json-schema-json.js +309 -0
- package/dist/runtime/json-schema-json.js.map +1 -0
- package/dist/runtime/json-schema-metaschemas.d.ts +1403 -0
- package/dist/runtime/json-schema-metaschemas.d.ts.map +1 -0
- package/dist/runtime/json-schema-metaschemas.js +64 -0
- package/dist/runtime/json-schema-metaschemas.js.map +1 -0
- package/dist/runtime/json-schema-regex.d.ts +32 -0
- package/dist/runtime/json-schema-regex.d.ts.map +1 -0
- package/dist/runtime/json-schema-regex.js +895 -0
- package/dist/runtime/json-schema-regex.js.map +1 -0
- package/dist/runtime/json-schema-validator.d.ts +50 -0
- package/dist/runtime/json-schema-validator.d.ts.map +1 -0
- package/dist/runtime/json-schema-validator.js +404 -0
- package/dist/runtime/json-schema-validator.js.map +1 -0
- package/dist/runtime/json-text.js.map +1 -1
- package/dist/runtime/local-first-token.d.ts +11 -0
- package/dist/runtime/local-first-token.d.ts.map +1 -0
- package/dist/runtime/local-first-token.js +20 -0
- package/dist/runtime/local-first-token.js.map +1 -0
- package/dist/runtime/local-first-unavailable.d.ts +40 -0
- package/dist/runtime/local-first-unavailable.d.ts.map +1 -0
- package/dist/runtime/local-first-unavailable.js +81 -0
- package/dist/runtime/local-first-unavailable.js.map +1 -0
- package/dist/runtime/local-first-upgrade.d.ts +36 -0
- package/dist/runtime/local-first-upgrade.d.ts.map +1 -0
- package/dist/runtime/local-first-upgrade.js +31 -0
- package/dist/runtime/local-first-upgrade.js.map +1 -0
- package/dist/runtime/local-write-observer.d.ts +5 -0
- package/dist/runtime/local-write-observer.d.ts.map +1 -0
- package/dist/runtime/local-write-observer.js +31 -0
- package/dist/runtime/local-write-observer.js.map +1 -0
- package/dist/runtime/metro-setup-error.d.ts +20 -0
- package/dist/runtime/metro-setup-error.d.ts.map +1 -0
- package/dist/runtime/metro-setup-error.js +22 -0
- package/dist/runtime/metro-setup-error.js.map +1 -0
- package/dist/runtime/native-artifact-compatibility.d.ts +12 -0
- package/dist/runtime/native-artifact-compatibility.d.ts.map +1 -0
- package/dist/runtime/native-artifact-compatibility.js +26 -0
- package/dist/runtime/native-artifact-compatibility.js.map +1 -0
- package/dist/runtime/native-artifact-fingerprint-napi.d.ts +2 -0
- package/dist/runtime/native-artifact-fingerprint-napi.d.ts.map +1 -0
- package/dist/runtime/native-artifact-fingerprint-napi.js +3 -0
- package/dist/runtime/native-artifact-fingerprint-napi.js.map +1 -0
- package/dist/runtime/native-artifact-fingerprint-wasm.d.ts +2 -0
- package/dist/runtime/native-artifact-fingerprint-wasm.d.ts.map +1 -0
- package/dist/runtime/native-artifact-fingerprint-wasm.js +3 -0
- package/dist/runtime/native-artifact-fingerprint-wasm.js.map +1 -0
- package/dist/runtime/native-artifact-fingerprints.d.ts +5 -0
- package/dist/runtime/native-artifact-fingerprints.d.ts.map +1 -0
- package/dist/runtime/native-artifact-fingerprints.js +7 -0
- package/dist/runtime/native-artifact-fingerprints.js.map +1 -0
- package/dist/runtime/native-artifact-mismatch-error.d.ts +25 -0
- package/dist/runtime/native-artifact-mismatch-error.d.ts.map +1 -0
- package/dist/runtime/native-artifact-mismatch-error.js +34 -0
- package/dist/runtime/native-artifact-mismatch-error.js.map +1 -0
- package/dist/runtime/native-runtime/attached-browser-worker-connection.d.ts +23 -0
- package/dist/runtime/native-runtime/attached-browser-worker-connection.d.ts.map +1 -0
- package/dist/runtime/native-runtime/attached-browser-worker-connection.js +45 -0
- package/dist/runtime/native-runtime/attached-browser-worker-connection.js.map +1 -0
- package/dist/runtime/native-runtime/auxiliary-receive-deadline.d.ts +15 -0
- package/dist/runtime/native-runtime/auxiliary-receive-deadline.d.ts.map +1 -0
- package/dist/runtime/native-runtime/auxiliary-receive-deadline.js +64 -0
- package/dist/runtime/native-runtime/auxiliary-receive-deadline.js.map +1 -0
- package/dist/runtime/native-runtime/broker-worker-load-failure.d.ts +34 -0
- package/dist/runtime/native-runtime/broker-worker-load-failure.d.ts.map +1 -0
- package/dist/runtime/native-runtime/broker-worker-load-failure.js +61 -0
- package/dist/runtime/native-runtime/broker-worker-load-failure.js.map +1 -0
- package/dist/runtime/native-runtime/browser-follower-connection.d.ts +109 -0
- package/dist/runtime/native-runtime/browser-follower-connection.d.ts.map +1 -0
- package/dist/runtime/native-runtime/browser-follower-connection.js +558 -0
- package/dist/runtime/native-runtime/browser-follower-connection.js.map +1 -0
- package/dist/runtime/native-runtime/browser-shared-worker-connection.d.ts +130 -0
- package/dist/runtime/native-runtime/browser-shared-worker-connection.d.ts.map +1 -0
- package/dist/runtime/native-runtime/browser-shared-worker-connection.js +988 -0
- package/dist/runtime/native-runtime/browser-shared-worker-connection.js.map +1 -0
- package/dist/runtime/native-runtime/browser-worker-protocol.d.ts +527 -0
- package/dist/runtime/native-runtime/browser-worker-protocol.d.ts.map +1 -0
- package/dist/runtime/native-runtime/browser-worker-protocol.js +296 -0
- package/dist/runtime/native-runtime/browser-worker-protocol.js.map +1 -0
- package/dist/runtime/native-runtime/browser-worker-transport.d.ts +56 -0
- package/dist/runtime/native-runtime/browser-worker-transport.d.ts.map +1 -0
- package/dist/runtime/native-runtime/browser-worker-transport.js +305 -0
- package/dist/runtime/native-runtime/browser-worker-transport.js.map +1 -0
- package/dist/runtime/native-runtime/exact-integer.d.ts +7 -0
- package/dist/runtime/native-runtime/exact-integer.d.ts.map +1 -0
- package/dist/runtime/native-runtime/exact-integer.js +18 -0
- package/dist/runtime/native-runtime/exact-integer.js.map +1 -0
- package/dist/runtime/native-runtime/http-stream-socket.d.ts +103 -0
- package/dist/runtime/native-runtime/http-stream-socket.d.ts.map +1 -0
- package/dist/runtime/native-runtime/http-stream-socket.js +554 -0
- package/dist/runtime/native-runtime/http-stream-socket.js.map +1 -0
- package/dist/runtime/native-runtime/inspector-control-lifecycle.d.ts +4 -0
- package/dist/runtime/native-runtime/inspector-control-lifecycle.d.ts.map +1 -0
- package/dist/runtime/native-runtime/inspector-control-lifecycle.js +33 -0
- package/dist/runtime/native-runtime/inspector-control-lifecycle.js.map +1 -0
- package/dist/runtime/native-runtime/native-codec.d.ts +172 -0
- package/dist/runtime/native-runtime/native-codec.d.ts.map +1 -0
- package/dist/runtime/native-runtime/native-codec.js +629 -0
- package/dist/runtime/native-runtime/native-codec.js.map +1 -0
- package/dist/runtime/native-runtime/native-error-code.d.ts +39 -0
- package/dist/runtime/native-runtime/native-error-code.d.ts.map +1 -0
- package/dist/runtime/native-runtime/native-error-code.js +64 -0
- package/dist/runtime/native-runtime/native-error-code.js.map +1 -0
- package/dist/runtime/native-runtime/native-row-codec.d.ts +161 -0
- package/dist/runtime/native-runtime/native-row-codec.d.ts.map +1 -0
- package/dist/runtime/native-runtime/native-row-codec.js +903 -0
- package/dist/runtime/native-runtime/native-row-codec.js.map +1 -0
- package/dist/runtime/native-runtime/native-row-descriptor-key.d.ts +15 -0
- package/dist/runtime/native-runtime/native-row-descriptor-key.d.ts.map +1 -0
- package/dist/runtime/native-runtime/native-row-descriptor-key.js +25 -0
- package/dist/runtime/native-runtime/native-row-descriptor-key.js.map +1 -0
- package/dist/runtime/native-runtime/native-runtime-adapter.d.ts +913 -0
- package/dist/runtime/native-runtime/native-runtime-adapter.d.ts.map +1 -0
- package/dist/runtime/native-runtime/native-runtime-adapter.js +5999 -0
- package/dist/runtime/native-runtime/native-runtime-adapter.js.map +1 -0
- package/dist/runtime/native-runtime/node-foreground-node-lease.browser.d.ts +17 -0
- package/dist/runtime/native-runtime/node-foreground-node-lease.browser.d.ts.map +1 -0
- package/dist/runtime/native-runtime/node-foreground-node-lease.browser.js +4 -0
- package/dist/runtime/native-runtime/node-foreground-node-lease.browser.js.map +1 -0
- package/dist/runtime/native-runtime/node-foreground-node-lease.d.ts +19 -0
- package/dist/runtime/native-runtime/node-foreground-node-lease.d.ts.map +1 -0
- package/dist/runtime/native-runtime/node-foreground-node-lease.js +297 -0
- package/dist/runtime/native-runtime/node-foreground-node-lease.js.map +1 -0
- package/dist/runtime/native-runtime/row-values-transport.d.ts +2 -0
- package/dist/runtime/native-runtime/row-values-transport.d.ts.map +1 -0
- package/dist/runtime/native-runtime/row-values-transport.js +21 -0
- package/dist/runtime/native-runtime/row-values-transport.js.map +1 -0
- package/dist/runtime/native-runtime/schema-codec.d.ts +10 -0
- package/dist/runtime/native-runtime/schema-codec.d.ts.map +1 -0
- package/dist/runtime/native-runtime/schema-codec.js +13 -0
- package/dist/runtime/native-runtime/schema-codec.js.map +1 -0
- package/dist/runtime/native-runtime/session-renewal-wire.d.ts +48 -0
- package/dist/runtime/native-runtime/session-renewal-wire.d.ts.map +1 -0
- package/dist/runtime/native-runtime/session-renewal-wire.js +107 -0
- package/dist/runtime/native-runtime/session-renewal-wire.js.map +1 -0
- package/dist/runtime/native-runtime/stream-endpoint-memory.d.ts +34 -0
- package/dist/runtime/native-runtime/stream-endpoint-memory.d.ts.map +1 -0
- package/dist/runtime/native-runtime/stream-endpoint-memory.js +146 -0
- package/dist/runtime/native-runtime/stream-endpoint-memory.js.map +1 -0
- package/dist/runtime/native-runtime/websocket.d.ts +327 -0
- package/dist/runtime/native-runtime/websocket.d.ts.map +1 -0
- package/dist/runtime/native-runtime/websocket.js +1112 -0
- package/dist/runtime/native-runtime/websocket.js.map +1 -0
- package/dist/runtime/newer-build-reload.d.ts +30 -0
- package/dist/runtime/newer-build-reload.d.ts.map +1 -0
- package/dist/runtime/newer-build-reload.js +59 -0
- package/dist/runtime/newer-build-reload.js.map +1 -0
- package/dist/runtime/page-cache.d.ts +44 -0
- package/dist/runtime/page-cache.d.ts.map +1 -0
- package/dist/runtime/page-cache.js +104 -0
- package/dist/runtime/page-cache.js.map +1 -0
- package/dist/runtime/page-handle.d.ts +83 -0
- package/dist/runtime/page-handle.d.ts.map +1 -0
- package/dist/runtime/page-handle.js +151 -0
- package/dist/runtime/page-handle.js.map +1 -0
- package/dist/runtime/passkey-backup.d.ts +3 -0
- package/dist/runtime/passkey-backup.d.ts.map +1 -0
- package/dist/runtime/passkey-backup.js +2 -0
- package/dist/runtime/passkey-backup.js.map +1 -0
- package/dist/runtime/platform-url.d.ts +10 -0
- package/dist/runtime/platform-url.d.ts.map +1 -0
- package/dist/runtime/platform-url.js +3 -0
- package/dist/runtime/platform-url.js.map +1 -0
- package/dist/runtime/platform-url.native.d.ts +6 -0
- package/dist/runtime/platform-url.native.d.ts.map +1 -0
- package/dist/runtime/platform-url.native.js +38 -0
- package/dist/runtime/platform-url.native.js.map +1 -0
- package/dist/runtime/query-adapter.d.ts +7 -15
- package/dist/runtime/query-adapter.d.ts.map +1 -1
- package/dist/runtime/query-adapter.js +390 -110
- package/dist/runtime/query-adapter.js.map +1 -1
- package/dist/runtime/query-builder-shape.d.ts +75 -0
- package/dist/runtime/query-builder-shape.d.ts.map +1 -0
- package/dist/runtime/query-builder-shape.js +225 -0
- package/dist/runtime/query-builder-shape.js.map +1 -0
- package/dist/runtime/query-column-name.d.ts +3 -0
- package/dist/runtime/query-column-name.d.ts.map +1 -0
- package/dist/runtime/query-column-name.js +10 -0
- package/dist/runtime/query-column-name.js.map +1 -0
- package/dist/runtime/query-output-table.d.ts +5 -0
- package/dist/runtime/query-output-table.d.ts.map +1 -0
- package/dist/runtime/query-output-table.js +30 -0
- package/dist/runtime/query-output-table.js.map +1 -0
- package/dist/runtime/recovery-phrase.d.ts +3 -0
- package/dist/runtime/recovery-phrase.d.ts.map +1 -0
- package/dist/runtime/recovery-phrase.js +2 -0
- package/dist/runtime/recovery-phrase.js.map +1 -0
- package/dist/runtime/remote-link-state.d.ts +20 -0
- package/dist/runtime/remote-link-state.d.ts.map +1 -0
- package/dist/runtime/remote-link-state.js +5 -0
- package/dist/runtime/remote-link-state.js.map +1 -0
- package/dist/runtime/removed-provider-props.d.ts +17 -0
- package/dist/runtime/removed-provider-props.d.ts.map +1 -0
- package/dist/runtime/removed-provider-props.js +16 -0
- package/dist/runtime/removed-provider-props.js.map +1 -0
- package/dist/runtime/row-transformer.d.ts +17 -3
- package/dist/runtime/row-transformer.d.ts.map +1 -1
- package/dist/runtime/row-transformer.js +163 -38
- package/dist/runtime/row-transformer.js.map +1 -1
- package/dist/runtime/run-cleanup-steps.d.ts +5 -0
- package/dist/runtime/run-cleanup-steps.d.ts.map +1 -0
- package/dist/runtime/run-cleanup-steps.js +19 -0
- package/dist/runtime/run-cleanup-steps.js.map +1 -0
- package/dist/runtime/runtime-closed-error.d.ts +9 -0
- package/dist/runtime/runtime-closed-error.d.ts.map +1 -0
- package/dist/runtime/runtime-closed-error.js +12 -0
- package/dist/runtime/runtime-closed-error.js.map +1 -0
- package/dist/runtime/runtime-config.d.ts +13 -0
- package/dist/runtime/runtime-config.d.ts.map +1 -0
- package/dist/runtime/runtime-config.js +115 -0
- package/dist/runtime/runtime-config.js.map +1 -0
- package/dist/runtime/runtime-entropy.d.ts +14 -0
- package/dist/runtime/runtime-entropy.d.ts.map +1 -0
- package/dist/runtime/runtime-entropy.js +43 -0
- package/dist/runtime/runtime-entropy.js.map +1 -0
- package/dist/runtime/runtime-source.d.ts +206 -0
- package/dist/runtime/runtime-source.d.ts.map +1 -0
- package/dist/runtime/runtime-source.js +64 -0
- package/dist/runtime/runtime-source.js.map +1 -0
- package/dist/runtime/schema-metadata.d.ts +22 -0
- package/dist/runtime/schema-metadata.d.ts.map +1 -0
- package/dist/runtime/schema-metadata.js +70 -0
- package/dist/runtime/schema-metadata.js.map +1 -0
- package/dist/runtime/select-projection.d.ts +5 -0
- package/dist/runtime/select-projection.d.ts.map +1 -0
- package/dist/runtime/select-projection.js +47 -0
- package/dist/runtime/select-projection.js.map +1 -0
- package/dist/runtime/snapshot-ref.d.ts +24 -0
- package/dist/runtime/snapshot-ref.d.ts.map +1 -0
- package/dist/runtime/snapshot-ref.js +43 -0
- package/dist/runtime/snapshot-ref.js.map +1 -0
- package/dist/runtime/store-held-by-another-tab-error.d.ts +53 -0
- package/dist/runtime/store-held-by-another-tab-error.d.ts.map +1 -0
- package/dist/runtime/store-held-by-another-tab-error.js +55 -0
- package/dist/runtime/store-held-by-another-tab-error.js.map +1 -0
- package/dist/runtime/streaming-source.d.ts +4 -0
- package/dist/runtime/streaming-source.d.ts.map +1 -0
- package/dist/runtime/streaming-source.js +53 -0
- package/dist/runtime/streaming-source.js.map +1 -0
- package/dist/runtime/structural-values.d.ts +6 -0
- package/dist/runtime/structural-values.d.ts.map +1 -0
- package/dist/runtime/structural-values.js +51 -0
- package/dist/runtime/structural-values.js.map +1 -0
- package/dist/runtime/subscription-manager.d.ts +103 -14
- package/dist/runtime/subscription-manager.d.ts.map +1 -1
- package/dist/runtime/subscription-manager.js +1051 -25
- package/dist/runtime/subscription-manager.js.map +1 -1
- package/dist/runtime/sync-status.d.ts +178 -0
- package/dist/runtime/sync-status.d.ts.map +1 -0
- package/dist/runtime/sync-status.js +163 -0
- package/dist/runtime/sync-status.js.map +1 -0
- package/dist/runtime/sync-telemetry.d.ts +35 -0
- package/dist/runtime/sync-telemetry.d.ts.map +1 -0
- package/dist/runtime/sync-telemetry.js +354 -0
- package/dist/runtime/sync-telemetry.js.map +1 -0
- package/dist/runtime/system-identity.d.ts +5 -0
- package/dist/runtime/system-identity.d.ts.map +1 -0
- package/dist/runtime/system-identity.js +10 -0
- package/dist/runtime/system-identity.js.map +1 -0
- package/dist/runtime/telemetry-env.d.ts +2 -0
- package/dist/runtime/telemetry-env.d.ts.map +1 -0
- package/dist/runtime/telemetry-env.js +16 -0
- package/dist/runtime/telemetry-env.js.map +1 -0
- package/dist/runtime/telemetry-env.native.d.ts +3 -0
- package/dist/runtime/telemetry-env.native.d.ts.map +1 -0
- package/dist/runtime/telemetry-env.native.js +7 -0
- package/dist/runtime/telemetry-env.native.js.map +1 -0
- package/dist/runtime/text-anchors.d.ts +58 -0
- package/dist/runtime/text-anchors.d.ts.map +1 -0
- package/dist/runtime/text-anchors.js +9 -0
- package/dist/runtime/text-anchors.js.map +1 -0
- package/dist/runtime/unsupported-storage-codecs-error.d.ts +53 -0
- package/dist/runtime/unsupported-storage-codecs-error.d.ts.map +1 -0
- package/dist/runtime/unsupported-storage-codecs-error.js +74 -0
- package/dist/runtime/unsupported-storage-codecs-error.js.map +1 -0
- package/dist/runtime/url.d.ts +32 -0
- package/dist/runtime/url.d.ts.map +1 -0
- package/dist/runtime/url.js +96 -0
- package/dist/runtime/url.js.map +1 -0
- package/dist/runtime/utf8.d.ts +10 -0
- package/dist/runtime/utf8.d.ts.map +1 -0
- package/dist/runtime/utf8.js +93 -0
- package/dist/runtime/utf8.js.map +1 -0
- package/dist/runtime/util.d.ts +18 -0
- package/dist/runtime/util.d.ts.map +1 -0
- package/dist/runtime/util.js +59 -0
- package/dist/runtime/util.js.map +1 -0
- package/dist/runtime/value-converter.d.ts +9 -17
- package/dist/runtime/value-converter.d.ts.map +1 -1
- package/dist/runtime/value-converter.js +156 -42
- package/dist/runtime/value-converter.js.map +1 -1
- package/dist/runtime/wasm-loader.d.ts +6 -0
- package/dist/runtime/wasm-loader.d.ts.map +1 -0
- package/dist/runtime/wasm-loader.js +127 -0
- package/dist/runtime/wasm-loader.js.map +1 -0
- package/dist/runtime/write-preparation.d.ts +24 -0
- package/dist/runtime/write-preparation.d.ts.map +1 -0
- package/dist/runtime/write-preparation.js +63 -0
- package/dist/runtime/write-preparation.js.map +1 -0
- package/dist/runtime/write-row.d.ts +8 -0
- package/dist/runtime/write-row.d.ts.map +1 -0
- package/dist/runtime/write-row.js +17 -0
- package/dist/runtime/write-row.js.map +1 -0
- package/dist/schema-builders.d.ts +48 -0
- package/dist/schema-builders.d.ts.map +1 -0
- package/dist/schema-builders.js +26 -0
- package/dist/schema-builders.js.map +1 -0
- package/dist/schema-dsl/define-schema.d.ts +32 -0
- package/dist/schema-dsl/define-schema.d.ts.map +1 -0
- package/dist/schema-dsl/define-schema.js +80 -0
- package/dist/schema-dsl/define-schema.js.map +1 -0
- package/dist/schema-dsl/readable-app.d.ts +30 -0
- package/dist/schema-dsl/readable-app.d.ts.map +1 -0
- package/dist/schema-dsl/readable-app.js +139 -0
- package/dist/schema-dsl/readable-app.js.map +1 -0
- package/dist/schema-dsl/table.d.ts +101 -0
- package/dist/schema-dsl/table.d.ts.map +1 -0
- package/dist/schema-dsl/table.js +153 -0
- package/dist/schema-dsl/table.js.map +1 -0
- package/dist/schema-errors.d.ts +6 -0
- package/dist/schema-errors.d.ts.map +1 -0
- package/dist/schema-errors.js +6 -0
- package/dist/schema-errors.js.map +1 -0
- package/dist/schema-loader.d.ts +16 -0
- package/dist/schema-loader.d.ts.map +1 -0
- package/dist/schema-loader.js +108 -0
- package/dist/schema-loader.js.map +1 -0
- package/dist/schema-name.d.ts +2 -0
- package/dist/schema-name.d.ts.map +1 -0
- package/dist/schema-name.js +19 -0
- package/dist/schema-name.js.map +1 -0
- package/dist/schema-namespace.d.ts +7 -0
- package/dist/schema-namespace.d.ts.map +1 -0
- package/dist/schema-namespace.js +7 -0
- package/dist/schema-namespace.js.map +1 -0
- package/dist/schema-permissions.d.ts +12 -0
- package/dist/schema-permissions.d.ts.map +1 -0
- package/dist/schema-permissions.js +17 -0
- package/dist/schema-permissions.js.map +1 -0
- package/dist/schema-source.d.ts +11 -0
- package/dist/schema-source.d.ts.map +1 -0
- package/dist/schema-source.js +53 -0
- package/dist/schema-source.js.map +1 -0
- package/dist/schema.d.ts +95 -38
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +1 -16
- package/dist/schema.js.map +1 -1
- package/dist/session/backend-watch.d.ts +186 -0
- package/dist/session/backend-watch.d.ts.map +1 -0
- package/dist/session/backend-watch.js +698 -0
- package/dist/session/backend-watch.js.map +1 -0
- package/dist/session/config-options.d.ts +15 -0
- package/dist/session/config-options.d.ts.map +1 -0
- package/dist/session/config-options.js +55 -0
- package/dist/session/config-options.js.map +1 -0
- package/dist/session/consumer.d.ts +3 -0
- package/dist/session/consumer.d.ts.map +1 -0
- package/dist/session/consumer.js +3 -0
- package/dist/session/consumer.js.map +1 -0
- package/dist/session/create-jazz-session.d.ts +123 -0
- package/dist/session/create-jazz-session.d.ts.map +1 -0
- package/dist/session/create-jazz-session.js +542 -0
- package/dist/session/create-jazz-session.js.map +1 -0
- package/dist/session/follow-user.d.ts +72 -0
- package/dist/session/follow-user.d.ts.map +1 -0
- package/dist/session/follow-user.js +147 -0
- package/dist/session/follow-user.js.map +1 -0
- package/dist/session/jazz-session.d.ts +234 -0
- package/dist/session/jazz-session.d.ts.map +1 -0
- package/dist/session/jazz-session.js +528 -0
- package/dist/session/jazz-session.js.map +1 -0
- package/dist/session/native-backend-watch.d.ts +4 -0
- package/dist/session/native-backend-watch.d.ts.map +1 -0
- package/dist/session/native-backend-watch.js +14 -0
- package/dist/session/native-backend-watch.js.map +1 -0
- package/dist/session/no-kept-device-account-error.d.ts +6 -0
- package/dist/session/no-kept-device-account-error.d.ts.map +1 -0
- package/dist/session/no-kept-device-account-error.js +8 -0
- package/dist/session/no-kept-device-account-error.js.map +1 -0
- package/dist/session/replica-ledger.d.ts +164 -0
- package/dist/session/replica-ledger.d.ts.map +1 -0
- package/dist/session/replica-ledger.js +496 -0
- package/dist/session/replica-ledger.js.map +1 -0
- package/dist/session/state.d.ts +135 -0
- package/dist/session/state.d.ts.map +1 -0
- package/dist/session/state.js +535 -0
- package/dist/session/state.js.map +1 -0
- package/dist/shared/index.d.ts +20 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/index.js +17 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/solid/create-solid-jazz-client-internal.d.ts +13 -0
- package/dist/solid/create-solid-jazz-client-internal.d.ts.map +1 -0
- package/dist/solid/create-solid-jazz-client-internal.js +82 -0
- package/dist/solid/create-solid-jazz-client-internal.js.map +1 -0
- package/dist/solid/create-solid-jazz-client-internal.ssr.js +101 -0
- package/dist/solid/create-solid-jazz-client-internal.ssr.js.map +1 -0
- package/dist/solid/create-solid-jazz-client.d.ts +24 -0
- package/dist/solid/create-solid-jazz-client.d.ts.map +1 -0
- package/dist/solid/create-solid-jazz-client.js +42 -0
- package/dist/solid/create-solid-jazz-client.js.map +1 -0
- package/dist/solid/create-solid-jazz-client.ssr.js +45 -0
- package/dist/solid/create-solid-jazz-client.ssr.js.map +1 -0
- package/dist/solid/index.d.ts +13 -0
- package/dist/solid/index.d.ts.map +1 -0
- package/dist/solid/index.js +9 -0
- package/dist/solid/index.ssr.js +9 -0
- package/dist/solid/provider.d.ts +25 -0
- package/dist/solid/provider.d.ts.map +1 -0
- package/dist/solid/provider.js +48 -0
- package/dist/solid/provider.js.map +1 -0
- package/dist/solid/provider.ssr.js +48 -0
- package/dist/solid/provider.ssr.js.map +1 -0
- package/dist/solid/session-context.d.ts +14 -0
- package/dist/solid/session-context.d.ts.map +1 -0
- package/dist/solid/session-context.js +6 -0
- package/dist/solid/session-context.js.map +1 -0
- package/dist/solid/session-context.ssr.js +10 -0
- package/dist/solid/session-context.ssr.js.map +1 -0
- package/dist/solid/session.d.ts +55 -0
- package/dist/solid/session.d.ts.map +1 -0
- package/dist/solid/session.js +130 -0
- package/dist/solid/session.js.map +1 -0
- package/dist/solid/session.ssr.js +156 -0
- package/dist/solid/session.ssr.js.map +1 -0
- package/dist/solid/solid-jazz-client-store.d.ts +11 -0
- package/dist/solid/solid-jazz-client-store.d.ts.map +1 -0
- package/dist/solid/solid-jazz-client-store.js +38 -0
- package/dist/solid/solid-jazz-client-store.js.map +1 -0
- package/dist/solid/solid-jazz-client-store.ssr.js +39 -0
- package/dist/solid/solid-jazz-client-store.ssr.js.map +1 -0
- package/dist/solid/use-all.d.ts +18 -0
- package/dist/solid/use-all.d.ts.map +1 -0
- package/dist/solid/use-all.js +71 -0
- package/dist/solid/use-all.js.map +1 -0
- package/dist/solid/use-all.ssr.js +84 -0
- package/dist/solid/use-all.ssr.js.map +1 -0
- package/dist/solid/use-one.d.ts +18 -0
- package/dist/solid/use-one.d.ts.map +1 -0
- package/dist/solid/use-one.js +27 -0
- package/dist/solid/use-one.js.map +1 -0
- package/dist/solid/use-one.ssr.js +27 -0
- package/dist/solid/use-one.ssr.js.map +1 -0
- package/dist/solid/use-sync-status.d.ts +8 -0
- package/dist/solid/use-sync-status.d.ts.map +1 -0
- package/dist/solid/use-sync-status.js +13 -0
- package/dist/solid/use-sync-status.js.map +1 -0
- package/dist/solid/use-sync-status.ssr.js +20 -0
- package/dist/solid/use-sync-status.ssr.js.map +1 -0
- package/dist/subscription-store-internal.d.ts +11 -0
- package/dist/subscription-store-internal.d.ts.map +1 -0
- package/dist/subscription-store-internal.js +18 -0
- package/dist/subscription-store-internal.js.map +1 -0
- package/dist/subscriptions-orchestrator.d.ts +92 -14
- package/dist/subscriptions-orchestrator.d.ts.map +1 -1
- package/dist/subscriptions-orchestrator.js +390 -75
- package/dist/subscriptions-orchestrator.js.map +1 -1
- package/dist/svelte/JazzProvider.svelte +110 -0
- package/dist/svelte/JazzProvider.svelte.d.ts +24 -0
- package/dist/svelte/JazzProvider.svelte.d.ts.map +1 -0
- package/dist/svelte/JazzSvelteClientProvider.svelte +83 -0
- package/dist/svelte/JazzSvelteClientProvider.svelte.d.ts +15 -0
- package/dist/svelte/JazzSvelteClientProvider.svelte.d.ts.map +1 -0
- package/dist/svelte/context.svelte.d.ts +19 -3
- package/dist/svelte/context.svelte.d.ts.map +1 -1
- package/dist/svelte/context.svelte.js +21 -5
- package/dist/svelte/create-jazz-client.d.ts +2 -8
- package/dist/svelte/create-jazz-client.d.ts.map +1 -1
- package/dist/svelte/create-jazz-client.js +1 -17
- package/dist/svelte/index.d.ts +14 -7
- package/dist/svelte/index.d.ts.map +1 -1
- package/dist/svelte/index.js +10 -7
- package/dist/svelte/query-subscription.svelte.d.ts +60 -0
- package/dist/svelte/query-subscription.svelte.d.ts.map +1 -0
- package/dist/svelte/query-subscription.svelte.js +135 -0
- package/dist/svelte/session-state.d.ts +27 -0
- package/dist/svelte/session-state.d.ts.map +1 -0
- package/dist/svelte/session-state.js +49 -0
- package/dist/svelte/sync-status.d.ts +11 -0
- package/dist/svelte/sync-status.d.ts.map +1 -0
- package/dist/svelte/sync-status.js +15 -0
- package/dist/testing/fixtures/with-bigint/schema.d.ts +18 -0
- package/dist/testing/fixtures/with-bigint/schema.d.ts.map +1 -0
- package/dist/testing/fixtures/with-bigint/schema.js +15 -0
- package/dist/testing/fixtures/with-bigint/schema.js.map +1 -0
- package/dist/testing/index.d.ts +6 -1
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +5 -1
- package/dist/testing/index.js.map +1 -1
- package/dist/testing/policy-test-app.d.ts +129 -0
- package/dist/testing/policy-test-app.d.ts.map +1 -0
- package/dist/testing/policy-test-app.js +229 -0
- package/dist/testing/policy-test-app.js.map +1 -0
- package/dist/testing/test-app.d.ts +272 -0
- package/dist/testing/test-app.d.ts.map +1 -0
- package/dist/testing/test-app.js +62 -0
- package/dist/testing/test-app.js.map +1 -0
- package/dist/testing/test-jazz.d.ts +119 -0
- package/dist/testing/test-jazz.d.ts.map +1 -0
- package/dist/testing/test-jazz.js +162 -0
- package/dist/testing/test-jazz.js.map +1 -0
- package/dist/testing/test-jwt-issuer.d.ts +19 -0
- package/dist/testing/test-jwt-issuer.d.ts.map +1 -0
- package/dist/testing/test-jwt-issuer.js +40 -0
- package/dist/testing/test-jwt-issuer.js.map +1 -0
- package/dist/text-field/index.d.ts +40 -0
- package/dist/text-field/index.d.ts.map +1 -0
- package/dist/text-field/index.js +129 -0
- package/dist/text-field/index.js.map +1 -0
- package/dist/thin/index.d.ts +80 -0
- package/dist/thin/index.d.ts.map +1 -0
- package/dist/thin/index.js +219 -0
- package/dist/thin/index.js.map +1 -0
- package/dist/thin/self-signed-token.d.ts +13 -0
- package/dist/thin/self-signed-token.d.ts.map +1 -0
- package/dist/thin/self-signed-token.js +100 -0
- package/dist/thin/self-signed-token.js.map +1 -0
- package/dist/thin/thin-runtime-source.d.ts +19 -0
- package/dist/thin/thin-runtime-source.d.ts.map +1 -0
- package/dist/thin/thin-runtime-source.js +66 -0
- package/dist/thin/thin-runtime-source.js.map +1 -0
- package/dist/thin/thin-runtime.d.ts +294 -0
- package/dist/thin/thin-runtime.d.ts.map +1 -0
- package/dist/thin/thin-runtime.js +1492 -0
- package/dist/thin/thin-runtime.js.map +1 -0
- package/dist/thin/wire.d.ts +160 -0
- package/dist/thin/wire.d.ts.map +1 -0
- package/dist/thin/wire.js +304 -0
- package/dist/thin/wire.js.map +1 -0
- package/dist/typed-app.d.ts +644 -0
- package/dist/typed-app.d.ts.map +1 -0
- package/dist/typed-app.js +549 -0
- package/dist/typed-app.js.map +1 -0
- package/dist/vue/create-jazz-client.d.ts +3 -0
- package/dist/vue/create-jazz-client.d.ts.map +1 -0
- package/dist/vue/create-jazz-client.js +2 -0
- package/dist/vue/create-jazz-client.js.map +1 -0
- package/dist/vue/index.d.ts +13 -0
- package/dist/vue/index.d.ts.map +1 -0
- package/dist/vue/index.js +9 -0
- package/dist/vue/index.js.map +1 -0
- package/dist/vue/provider.d.ts +50 -0
- package/dist/vue/provider.d.ts.map +1 -0
- package/dist/vue/provider.js +97 -0
- package/dist/vue/provider.js.map +1 -0
- package/dist/vue/session-key.d.ts +15 -0
- package/dist/vue/session-key.d.ts.map +1 -0
- package/dist/vue/session-key.js +7 -0
- package/dist/vue/session-key.js.map +1 -0
- package/dist/vue/session.d.ts +40 -0
- package/dist/vue/session.d.ts.map +1 -0
- package/dist/vue/session.js +112 -0
- package/dist/vue/session.js.map +1 -0
- package/dist/vue/use-all.d.ts +61 -0
- package/dist/vue/use-all.d.ts.map +1 -0
- package/dist/vue/use-all.js +104 -0
- package/dist/vue/use-all.js.map +1 -0
- package/dist/vue/use-one.d.ts +24 -0
- package/dist/vue/use-one.d.ts.map +1 -0
- package/dist/vue/use-one.js +17 -0
- package/dist/vue/use-one.js.map +1 -0
- package/dist/vue/use-sync-status.d.ts +9 -0
- package/dist/vue/use-sync-status.d.ts.map +1 -0
- package/dist/vue/use-sync-status.js +16 -0
- package/dist/vue/use-sync-status.js.map +1 -0
- package/dist/web/create-jazz-client.d.ts +12 -0
- package/dist/web/create-jazz-client.d.ts.map +1 -0
- package/dist/web/create-jazz-client.js +35 -0
- package/dist/web/create-jazz-client.js.map +1 -0
- package/dist/web/lazy-local-first.d.ts +5 -0
- package/dist/web/lazy-local-first.d.ts.map +1 -0
- package/dist/web/lazy-local-first.js +8 -0
- package/dist/web/lazy-local-first.js.map +1 -0
- package/dist/web/registered-jazz-client.d.ts +15 -0
- package/dist/web/registered-jazz-client.d.ts.map +1 -0
- package/dist/web/registered-jazz-client.js +35 -0
- package/dist/web/registered-jazz-client.js.map +1 -0
- package/dist/where-operators.d.ts +13 -0
- package/dist/where-operators.d.ts.map +1 -0
- package/dist/where-operators.js +66 -0
- package/dist/where-operators.js.map +1 -0
- package/dist/window-client-storage.d.ts +7 -0
- package/dist/window-client-storage.d.ts.map +1 -0
- package/dist/window-client-storage.js +27 -0
- package/dist/window-client-storage.js.map +1 -0
- package/dist/worker/jazz-broker-worker-core.d.ts +34 -0
- package/dist/worker/jazz-broker-worker-core.d.ts.map +1 -0
- package/dist/worker/jazz-broker-worker-core.js +2241 -0
- package/dist/worker/jazz-broker-worker-core.js.map +1 -0
- package/dist/worker/jazz-broker-worker.d.ts +3 -0
- package/dist/worker/jazz-broker-worker.d.ts.map +1 -0
- package/dist/worker/jazz-broker-worker.js +5 -0
- package/dist/worker/jazz_wasm_bg.wasm +0 -0
- package/dist/worker/mutation-error-delivery.d.ts +8 -0
- package/dist/worker/mutation-error-delivery.d.ts.map +1 -0
- package/dist/worker/mutation-error-delivery.js +10 -0
- package/dist/worker/mutation-error-delivery.js.map +1 -0
- package/dist/worker/runtime-admission.d.ts +34 -0
- package/dist/worker/runtime-admission.d.ts.map +1 -0
- package/dist/worker/runtime-admission.js +60 -0
- package/dist/worker/runtime-admission.js.map +1 -0
- package/dist/worker/vite-dev-broker.d.ts +2 -0
- package/dist/worker/vite-dev-broker.d.ts.map +1 -0
- package/dist/worker/vite-dev-broker.js +8 -0
- package/dist/worker/vite-dev-broker.js.map +1 -0
- package/package.json +299 -37
- package/bin/native/.gitkeep +0 -0
- package/bin/native/jazz-tools-darwin-arm64 +0 -0
- package/bin/native/jazz-tools-darwin-x64 +0 -0
- package/bin/native/jazz-tools-linux-arm64 +0 -0
- package/bin/native/jazz-tools-linux-x64 +0 -0
- package/bin/native/jazz-tools-windows-x64.exe +0 -0
- package/dist/backend/create-jazz-context.test.d.ts +0 -2
- package/dist/backend/create-jazz-context.test.d.ts.map +0 -1
- package/dist/backend/create-jazz-context.test.js +0 -141
- package/dist/backend/create-jazz-context.test.js.map +0 -1
- package/dist/cli.test.d.ts +0 -2
- package/dist/cli.test.d.ts.map +0 -1
- package/dist/cli.test.js +0 -154
- package/dist/cli.test.js.map +0 -1
- package/dist/codegen/codegen.test.d.ts +0 -2
- package/dist/codegen/codegen.test.d.ts.map +0 -1
- package/dist/codegen/codegen.test.js +0 -914
- package/dist/codegen/codegen.test.js.map +0 -1
- package/dist/codegen/index.d.ts +0 -18
- package/dist/codegen/index.d.ts.map +0 -1
- package/dist/codegen/index.js +0 -22
- package/dist/codegen/index.js.map +0 -1
- package/dist/codegen/query-builder-generator.d.ts +0 -26
- package/dist/codegen/query-builder-generator.d.ts.map +0 -1
- package/dist/codegen/query-builder-generator.js +0 -342
- package/dist/codegen/query-builder-generator.js.map +0 -1
- package/dist/codegen/schema-reader.d.ts +0 -12
- package/dist/codegen/schema-reader.d.ts.map +0 -1
- package/dist/codegen/schema-reader.js +0 -180
- package/dist/codegen/schema-reader.js.map +0 -1
- package/dist/codegen/type-generator.d.ts +0 -29
- package/dist/codegen/type-generator.d.ts.map +0 -1
- package/dist/codegen/type-generator.js +0 -296
- package/dist/codegen/type-generator.js.map +0 -1
- package/dist/dev-tools/dev-tools.d.ts +0 -15
- package/dist/dev-tools/dev-tools.d.ts.map +0 -1
- package/dist/dev-tools/dev-tools.js +0 -297
- package/dist/dev-tools/dev-tools.js.map +0 -1
- package/dist/dev-tools/extension-panel.d.ts +0 -19
- package/dist/dev-tools/extension-panel.d.ts.map +0 -1
- package/dist/dev-tools/extension-panel.js +0 -419
- package/dist/dev-tools/extension-panel.js.map +0 -1
- package/dist/dev-tools/index.d.ts +0 -3
- package/dist/dev-tools/index.d.ts.map +0 -1
- package/dist/dev-tools/index.js +0 -3
- package/dist/dev-tools/index.js.map +0 -1
- package/dist/dev-tools/protocol.d.ts +0 -49
- package/dist/dev-tools/protocol.d.ts.map +0 -1
- package/dist/dev-tools/protocol.js +0 -40
- package/dist/dev-tools/protocol.js.map +0 -1
- package/dist/dsl.test.d.ts +0 -2
- package/dist/dsl.test.d.ts.map +0 -1
- package/dist/dsl.test.js +0 -51
- package/dist/dsl.test.js.map +0 -1
- package/dist/permissions/index.d.ts +0 -146
- package/dist/permissions/index.d.ts.map +0 -1
- package/dist/permissions/index.js +0 -1211
- package/dist/permissions/index.js.map +0 -1
- package/dist/permissions/index.test.d.ts +0 -2
- package/dist/permissions/index.test.d.ts.map +0 -1
- package/dist/permissions/index.test.js +0 -830
- package/dist/permissions/index.test.js.map +0 -1
- package/dist/permissions/type-inference.test.d.ts +0 -2
- package/dist/permissions/type-inference.test.d.ts.map +0 -1
- package/dist/permissions/type-inference.test.js +0 -149
- package/dist/permissions/type-inference.test.js.map +0 -1
- package/dist/react/create-jazz-client.integration.test.d.ts +0 -2
- package/dist/react/create-jazz-client.integration.test.d.ts.map +0 -1
- package/dist/react/create-jazz-client.integration.test.js +0 -82
- package/dist/react/create-jazz-client.integration.test.js.map +0 -1
- package/dist/react/create-jazz-client.test.d.ts +0 -2
- package/dist/react/create-jazz-client.test.d.ts.map +0 -1
- package/dist/react/create-jazz-client.test.js +0 -135
- package/dist/react/create-jazz-client.test.js.map +0 -1
- package/dist/react/synthetic-user-switcher.d.ts +0 -9
- package/dist/react/synthetic-user-switcher.d.ts.map +0 -1
- package/dist/react/synthetic-user-switcher.js +0 -65
- package/dist/react/synthetic-user-switcher.js.map +0 -1
- package/dist/react/synthetic-users.d.ts +0 -2
- package/dist/react/synthetic-users.d.ts.map +0 -1
- package/dist/react/synthetic-users.js +0 -2
- package/dist/react/synthetic-users.js.map +0 -1
- package/dist/react/synthetic-users.test.d.ts +0 -2
- package/dist/react/synthetic-users.test.d.ts.map +0 -1
- package/dist/react/synthetic-users.test.js +0 -43
- package/dist/react/synthetic-users.test.js.map +0 -1
- package/dist/react/use-link-external-identity.d.ts +0 -25
- package/dist/react/use-link-external-identity.d.ts.map +0 -1
- package/dist/react/use-link-external-identity.js +0 -45
- package/dist/react/use-link-external-identity.js.map +0 -1
- package/dist/react-native/create-jazz-client.test.d.ts +0 -2
- package/dist/react-native/create-jazz-client.test.d.ts.map +0 -1
- package/dist/react-native/create-jazz-client.test.js +0 -162
- package/dist/react-native/create-jazz-client.test.js.map +0 -1
- package/dist/react-native/create-jazz-rn-runtime.d.ts +0 -13
- package/dist/react-native/create-jazz-rn-runtime.d.ts.map +0 -1
- package/dist/react-native/create-jazz-rn-runtime.js +0 -7
- package/dist/react-native/create-jazz-rn-runtime.js.map +0 -1
- package/dist/react-native/db.d.ts +0 -16
- package/dist/react-native/db.d.ts.map +0 -1
- package/dist/react-native/db.js +0 -50
- package/dist/react-native/db.js.map +0 -1
- package/dist/react-native/db.test.d.ts +0 -2
- package/dist/react-native/db.test.d.ts.map +0 -1
- package/dist/react-native/db.test.js +0 -148
- package/dist/react-native/db.test.js.map +0 -1
- package/dist/react-native/jazz-rn-runtime-adapter.d.ts +0 -56
- package/dist/react-native/jazz-rn-runtime-adapter.d.ts.map +0 -1
- package/dist/react-native/jazz-rn-runtime-adapter.js +0 -192
- package/dist/react-native/jazz-rn-runtime-adapter.js.map +0 -1
- package/dist/react-native/jazz-rn-runtime-adapter.test.d.ts +0 -2
- package/dist/react-native/jazz-rn-runtime-adapter.test.d.ts.map +0 -1
- package/dist/react-native/jazz-rn-runtime-adapter.test.js +0 -165
- package/dist/react-native/jazz-rn-runtime-adapter.test.js.map +0 -1
- package/dist/runtime/client-session.test.d.ts +0 -2
- package/dist/runtime/client-session.test.d.ts.map +0 -1
- package/dist/runtime/client-session.test.js +0 -84
- package/dist/runtime/client-session.test.js.map +0 -1
- package/dist/runtime/client.for-request.test.d.ts +0 -2
- package/dist/runtime/client.for-request.test.d.ts.map +0 -1
- package/dist/runtime/client.for-request.test.js +0 -191
- package/dist/runtime/client.for-request.test.js.map +0 -1
- package/dist/runtime/cloud-server.integration.test.d.ts +0 -2
- package/dist/runtime/cloud-server.integration.test.d.ts.map +0 -1
- package/dist/runtime/cloud-server.integration.test.js +0 -1210
- package/dist/runtime/cloud-server.integration.test.js.map +0 -1
- package/dist/runtime/dynamic-query.d.ts +0 -10
- package/dist/runtime/dynamic-query.d.ts.map +0 -1
- package/dist/runtime/dynamic-query.js +0 -11
- package/dist/runtime/dynamic-query.js.map +0 -1
- package/dist/runtime/leader-lock.d.ts +0 -15
- package/dist/runtime/leader-lock.d.ts.map +0 -1
- package/dist/runtime/leader-lock.js +0 -49
- package/dist/runtime/leader-lock.js.map +0 -1
- package/dist/runtime/local-auth.d.ts +0 -32
- package/dist/runtime/local-auth.d.ts.map +0 -1
- package/dist/runtime/local-auth.js +0 -93
- package/dist/runtime/local-auth.js.map +0 -1
- package/dist/runtime/local-auth.test.d.ts +0 -2
- package/dist/runtime/local-auth.test.d.ts.map +0 -1
- package/dist/runtime/local-auth.test.js +0 -50
- package/dist/runtime/local-auth.test.js.map +0 -1
- package/dist/runtime/query-adapter.test.d.ts +0 -5
- package/dist/runtime/query-adapter.test.d.ts.map +0 -1
- package/dist/runtime/query-adapter.test.js +0 -1249
- package/dist/runtime/query-adapter.test.js.map +0 -1
- package/dist/runtime/row-transformer.test.d.ts +0 -5
- package/dist/runtime/row-transformer.test.d.ts.map +0 -1
- package/dist/runtime/row-transformer.test.js +0 -385
- package/dist/runtime/row-transformer.test.js.map +0 -1
- package/dist/runtime/schema-fetch.d.ts +0 -17
- package/dist/runtime/schema-fetch.d.ts.map +0 -1
- package/dist/runtime/schema-fetch.js +0 -33
- package/dist/runtime/schema-fetch.js.map +0 -1
- package/dist/runtime/schema-fetch.test.d.ts +0 -2
- package/dist/runtime/schema-fetch.test.d.ts.map +0 -1
- package/dist/runtime/schema-fetch.test.js +0 -87
- package/dist/runtime/schema-fetch.test.js.map +0 -1
- package/dist/runtime/subscription-manager.test.d.ts +0 -5
- package/dist/runtime/subscription-manager.test.d.ts.map +0 -1
- package/dist/runtime/subscription-manager.test.js +0 -120
- package/dist/runtime/subscription-manager.test.js.map +0 -1
- package/dist/runtime/sync-transport.d.ts +0 -163
- package/dist/runtime/sync-transport.d.ts.map +0 -1
- package/dist/runtime/sync-transport.js +0 -477
- package/dist/runtime/sync-transport.js.map +0 -1
- package/dist/runtime/sync-transport.test.d.ts +0 -2
- package/dist/runtime/sync-transport.test.d.ts.map +0 -1
- package/dist/runtime/sync-transport.test.js +0 -310
- package/dist/runtime/sync-transport.test.js.map +0 -1
- package/dist/runtime/tab-leader-election.d.ts +0 -97
- package/dist/runtime/tab-leader-election.d.ts.map +0 -1
- package/dist/runtime/tab-leader-election.js +0 -339
- package/dist/runtime/tab-leader-election.js.map +0 -1
- package/dist/runtime/tab-leader-election.test.d.ts +0 -2
- package/dist/runtime/tab-leader-election.test.d.ts.map +0 -1
- package/dist/runtime/tab-leader-election.test.js +0 -278
- package/dist/runtime/tab-leader-election.test.js.map +0 -1
- package/dist/runtime/testing/wasm-runtime-test-utils.d.ts +0 -13
- package/dist/runtime/testing/wasm-runtime-test-utils.d.ts.map +0 -1
- package/dist/runtime/testing/wasm-runtime-test-utils.js +0 -76
- package/dist/runtime/testing/wasm-runtime-test-utils.js.map +0 -1
- package/dist/runtime/utils.d.ts +0 -2
- package/dist/runtime/utils.d.ts.map +0 -1
- package/dist/runtime/utils.js +0 -16
- package/dist/runtime/utils.js.map +0 -1
- package/dist/runtime/value-converter.test.d.ts +0 -5
- package/dist/runtime/value-converter.test.d.ts.map +0 -1
- package/dist/runtime/value-converter.test.js +0 -222
- package/dist/runtime/value-converter.test.js.map +0 -1
- package/dist/runtime/worker-bridge.d.ts +0 -82
- package/dist/runtime/worker-bridge.d.ts.map +0 -1
- package/dist/runtime/worker-bridge.js +0 -308
- package/dist/runtime/worker-bridge.js.map +0 -1
- package/dist/runtime/worker-bridge.race-harness.test.d.ts +0 -2
- package/dist/runtime/worker-bridge.race-harness.test.d.ts.map +0 -1
- package/dist/runtime/worker-bridge.race-harness.test.js +0 -284
- package/dist/runtime/worker-bridge.race-harness.test.js.map +0 -1
- package/dist/runtime/worker-bridge.test.d.ts +0 -2
- package/dist/runtime/worker-bridge.test.d.ts.map +0 -1
- package/dist/runtime/worker-bridge.test.js +0 -233
- package/dist/runtime/worker-bridge.test.js.map +0 -1
- package/dist/sql-gen.d.ts +0 -4
- package/dist/sql-gen.d.ts.map +0 -1
- package/dist/sql-gen.js +0 -163
- package/dist/sql-gen.js.map +0 -1
- package/dist/sql-gen.test.d.ts +0 -2
- package/dist/sql-gen.test.d.ts.map +0 -1
- package/dist/sql-gen.test.js +0 -412
- package/dist/sql-gen.test.js.map +0 -1
- package/dist/subscriptions-orchestrator.integration.test.d.ts +0 -2
- package/dist/subscriptions-orchestrator.integration.test.d.ts.map +0 -1
- package/dist/subscriptions-orchestrator.integration.test.js +0 -192
- package/dist/subscriptions-orchestrator.integration.test.js.map +0 -1
- package/dist/subscriptions-orchestrator.test.d.ts +0 -2
- package/dist/subscriptions-orchestrator.test.d.ts.map +0 -1
- package/dist/subscriptions-orchestrator.test.js +0 -367
- package/dist/subscriptions-orchestrator.test.js.map +0 -1
- package/dist/svelte/JazzSvelteProvider.svelte +0 -49
- package/dist/svelte/JazzSvelteProvider.svelte.d.ts +0 -13
- package/dist/svelte/JazzSvelteProvider.svelte.d.ts.map +0 -1
- package/dist/svelte/SyntheticUserSwitcher.svelte +0 -121
- package/dist/svelte/SyntheticUserSwitcher.svelte.d.ts +0 -11
- package/dist/svelte/SyntheticUserSwitcher.svelte.d.ts.map +0 -1
- package/dist/svelte/context.test.d.ts +0 -2
- package/dist/svelte/context.test.d.ts.map +0 -1
- package/dist/svelte/context.test.js +0 -55
- package/dist/svelte/create-jazz-client.test.d.ts +0 -2
- package/dist/svelte/create-jazz-client.test.d.ts.map +0 -1
- package/dist/svelte/create-jazz-client.test.js +0 -50
- package/dist/svelte/use-all.svelte.d.ts +0 -32
- package/dist/svelte/use-all.svelte.d.ts.map +0 -1
- package/dist/svelte/use-all.svelte.js +0 -61
- package/dist/svelte/use-all.test.d.ts +0 -2
- package/dist/svelte/use-all.test.d.ts.map +0 -1
- package/dist/svelte/use-all.test.js +0 -158
- package/dist/svelte/use-link-external-identity.d.ts +0 -25
- package/dist/svelte/use-link-external-identity.d.ts.map +0 -1
- package/dist/svelte/use-link-external-identity.js +0 -33
- package/dist/svelte/use-link-external-identity.test.d.ts +0 -2
- package/dist/svelte/use-link-external-identity.test.d.ts.map +0 -1
- package/dist/svelte/use-link-external-identity.test.js +0 -97
- package/dist/synthetic-user-switcher.d.ts +0 -16
- package/dist/synthetic-user-switcher.d.ts.map +0 -1
- package/dist/synthetic-user-switcher.js +0 -134
- package/dist/synthetic-user-switcher.js.map +0 -1
- package/dist/synthetic-users.d.ts +0 -32
- package/dist/synthetic-users.d.ts.map +0 -1
- package/dist/synthetic-users.js +0 -124
- package/dist/synthetic-users.js.map +0 -1
- package/dist/testing/fixtures/basic/app.d.ts +0 -55
- package/dist/testing/fixtures/basic/app.d.ts.map +0 -1
- package/dist/testing/fixtures/basic/app.js +0 -174
- package/dist/testing/fixtures/basic/app.js.map +0 -1
- package/dist/testing/fixtures/basic/current.d.ts +0 -2
- package/dist/testing/fixtures/basic/current.d.ts.map +0 -1
- package/dist/testing/fixtures/basic/current.js +0 -6
- package/dist/testing/fixtures/basic/current.js.map +0 -1
- package/dist/testing/index.test.d.ts +0 -2
- package/dist/testing/index.test.d.ts.map +0 -1
- package/dist/testing/index.test.js +0 -234
- package/dist/testing/index.test.js.map +0 -1
- package/dist/testing/local-jazz-server.d.ts +0 -34
- package/dist/testing/local-jazz-server.d.ts.map +0 -1
- package/dist/testing/local-jazz-server.js +0 -313
- package/dist/testing/local-jazz-server.js.map +0 -1
- package/dist/testing/relation-ir-test-helpers.d.ts +0 -3
- package/dist/testing/relation-ir-test-helpers.d.ts.map +0 -1
- package/dist/testing/relation-ir-test-helpers.js +0 -258
- package/dist/testing/relation-ir-test-helpers.js.map +0 -1
- package/dist/worker/jazz-worker.d.ts +0 -9
- package/dist/worker/jazz-worker.d.ts.map +0 -1
- package/dist/worker/jazz-worker.js +0 -555
- package/dist/worker/jazz-worker.js.map +0 -1
- package/dist/worker/jazz-worker.ts +0 -630
- package/dist/worker/worker-protocol.d.ts +0 -136
- package/dist/worker/worker-protocol.d.ts.map +0 -1
- package/dist/worker/worker-protocol.js +0 -7
- package/dist/worker/worker-protocol.js.map +0 -1
|
@@ -1,1211 +0,0 @@
|
|
|
1
|
-
import { analyzeRelations } from "../codegen/relation-analyzer.js";
|
|
2
|
-
const OUTER_ROW_SESSION_PREFIX = "__jazz_outer_row";
|
|
3
|
-
const RECURSIVE_POLICY_MAX_DEPTH_DEFAULT = 10;
|
|
4
|
-
const RECURSIVE_POLICY_MAX_DEPTH_HARD_CAP = 64;
|
|
5
|
-
class PermissionRelationBuilder {
|
|
6
|
-
state;
|
|
7
|
-
relations;
|
|
8
|
-
constructor(state, relations) {
|
|
9
|
-
this.state = state;
|
|
10
|
-
this.relations = relations;
|
|
11
|
-
}
|
|
12
|
-
where(input) {
|
|
13
|
-
const where = resolveRelationWhereInput(input);
|
|
14
|
-
const filters = [...this.state.filters, ...extractRelationFilters(where)];
|
|
15
|
-
return new PermissionRelationBuilder({
|
|
16
|
-
...this.state,
|
|
17
|
-
filters,
|
|
18
|
-
}, this.relations);
|
|
19
|
-
}
|
|
20
|
-
join(target, on) {
|
|
21
|
-
const table = relationJoinTargetToTable(target);
|
|
22
|
-
const joins = [
|
|
23
|
-
...this.state.joins,
|
|
24
|
-
{
|
|
25
|
-
table,
|
|
26
|
-
left: on.left,
|
|
27
|
-
right: on.right,
|
|
28
|
-
},
|
|
29
|
-
];
|
|
30
|
-
return new PermissionRelationBuilder({
|
|
31
|
-
...this.state,
|
|
32
|
-
joins,
|
|
33
|
-
}, this.relations);
|
|
34
|
-
}
|
|
35
|
-
select(columns) {
|
|
36
|
-
return new PermissionRelationBuilder({
|
|
37
|
-
...this.state,
|
|
38
|
-
selectMap: normalizeRelationSelectMap(columns),
|
|
39
|
-
}, this.relations);
|
|
40
|
-
}
|
|
41
|
-
hopTo(relation) {
|
|
42
|
-
const relationName = relation.trim();
|
|
43
|
-
if (!relationName) {
|
|
44
|
-
throw new Error("hopTo(...) requires a non-empty relation name.");
|
|
45
|
-
}
|
|
46
|
-
if (this.state.kind === "table") {
|
|
47
|
-
if (this.state.joins.length > 0) {
|
|
48
|
-
throw new Error("hopTo(...) currently supports a single hop per relation in MVP.");
|
|
49
|
-
}
|
|
50
|
-
if (this.state.selectMap && Object.keys(this.state.selectMap).length > 0) {
|
|
51
|
-
throw new Error("hopTo(...) cannot be composed after select(...).");
|
|
52
|
-
}
|
|
53
|
-
const rel = resolveNamedRelation(this.relations, this.state.outputTable, relationName);
|
|
54
|
-
const join = rel.type === "forward"
|
|
55
|
-
? {
|
|
56
|
-
table: rel.toTable,
|
|
57
|
-
left: rel.fromColumn,
|
|
58
|
-
right: "id",
|
|
59
|
-
viaHop: true,
|
|
60
|
-
}
|
|
61
|
-
: {
|
|
62
|
-
table: rel.toTable,
|
|
63
|
-
left: "id",
|
|
64
|
-
right: rel.toColumn,
|
|
65
|
-
viaHop: true,
|
|
66
|
-
};
|
|
67
|
-
return new PermissionRelationBuilder({
|
|
68
|
-
...this.state,
|
|
69
|
-
joins: [...this.state.joins, join],
|
|
70
|
-
}, this.relations);
|
|
71
|
-
}
|
|
72
|
-
// Recursive relation hop: anchored against the recursive row identity.
|
|
73
|
-
if (this.state.joins.length > 0) {
|
|
74
|
-
throw new Error("hopTo(...) currently supports a single hop per relation in MVP.");
|
|
75
|
-
}
|
|
76
|
-
const rel = resolveNamedRelation(this.relations, this.state.outputTable, relationName);
|
|
77
|
-
if (rel.type !== "reverse") {
|
|
78
|
-
throw new Error(`Recursive hopTo("${relationName}") currently requires a reverse relation from "${this.state.outputTable}".`);
|
|
79
|
-
}
|
|
80
|
-
return new PermissionRelationBuilder({
|
|
81
|
-
...this.state,
|
|
82
|
-
joins: [
|
|
83
|
-
...this.state.joins,
|
|
84
|
-
{
|
|
85
|
-
table: rel.toTable,
|
|
86
|
-
left: "id",
|
|
87
|
-
right: rel.toColumn,
|
|
88
|
-
viaHop: true,
|
|
89
|
-
},
|
|
90
|
-
],
|
|
91
|
-
}, this.relations);
|
|
92
|
-
}
|
|
93
|
-
gather(options) {
|
|
94
|
-
if (this.state.kind !== "table") {
|
|
95
|
-
throw new Error("gather(...) must start from policy.<table>.");
|
|
96
|
-
}
|
|
97
|
-
if (this.state.joins.length > 0) {
|
|
98
|
-
throw new Error("gather(...) does not support pre-joined start relations in MVP.");
|
|
99
|
-
}
|
|
100
|
-
if (typeof options.step !== "function") {
|
|
101
|
-
throw new Error("gather(...) requires a step callback.");
|
|
102
|
-
}
|
|
103
|
-
const startWhere = resolveRelationWhereInput(options.start);
|
|
104
|
-
const startFilters = [...this.state.filters, ...extractRelationFilters(startWhere)];
|
|
105
|
-
const currentToken = {
|
|
106
|
-
__jazzPermissionKind: "recursive-current",
|
|
107
|
-
};
|
|
108
|
-
const stepState = getRelationState(options.step({ current: currentToken }));
|
|
109
|
-
if (stepState.kind !== "table") {
|
|
110
|
-
throw new Error("gather(...) step must return a relation built from policy.<table>.");
|
|
111
|
-
}
|
|
112
|
-
if (stepState.joins.length !== 1 || !stepState.joins[0]?.viaHop) {
|
|
113
|
-
throw new Error("gather(...) step must include exactly one hopTo(...).");
|
|
114
|
-
}
|
|
115
|
-
if (stepState.selectMap && Object.keys(stepState.selectMap).length > 0) {
|
|
116
|
-
throw new Error("gather(...) step does not support select(...).");
|
|
117
|
-
}
|
|
118
|
-
const currentFilters = stepState.filters.filter((filter) => isRecursiveCurrentFilter(filter.raw, currentToken));
|
|
119
|
-
if (currentFilters.length !== 1) {
|
|
120
|
-
throw new Error("gather(...) step must include exactly one where condition bound to current.");
|
|
121
|
-
}
|
|
122
|
-
const currentFilter = currentFilters[0];
|
|
123
|
-
const stepFilters = stepState.filters.filter((filter) => filter !== currentFilter);
|
|
124
|
-
const stepJoin = stepState.joins[0];
|
|
125
|
-
if (stepJoin.table !== this.state.outputTable || stripQualifier(stepJoin.right) !== "id") {
|
|
126
|
-
throw new Error(`gather(...) step must hop back to "${this.state.outputTable}" rows via hopTo(...).`);
|
|
127
|
-
}
|
|
128
|
-
const seedPredicates = startFilters.flatMap((filter) => relationFilterToPredicates(filter, this.state.initialScope));
|
|
129
|
-
const seed = applyRelFilter(this.state.base, seedPredicates);
|
|
130
|
-
const stepPredicates = [
|
|
131
|
-
...stepFilters.flatMap((filter) => relationFilterToPredicates(filter, stepState.outputTable)),
|
|
132
|
-
{
|
|
133
|
-
Cmp: {
|
|
134
|
-
left: {
|
|
135
|
-
scope: stepState.outputTable,
|
|
136
|
-
column: stripQualifier(currentFilter.column),
|
|
137
|
-
},
|
|
138
|
-
op: "Eq",
|
|
139
|
-
right: {
|
|
140
|
-
RowId: "Frontier",
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
},
|
|
144
|
-
];
|
|
145
|
-
const stepFiltered = applyRelFilter(stepState.base, stepPredicates);
|
|
146
|
-
const recursiveHopScope = "__recursive_hop_0";
|
|
147
|
-
const stepProjected = {
|
|
148
|
-
Project: {
|
|
149
|
-
input: {
|
|
150
|
-
Join: {
|
|
151
|
-
left: stepFiltered,
|
|
152
|
-
right: {
|
|
153
|
-
TableScan: {
|
|
154
|
-
table: this.state.outputTable,
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
on: [
|
|
158
|
-
{
|
|
159
|
-
left: {
|
|
160
|
-
scope: stepState.outputTable,
|
|
161
|
-
column: stripQualifier(stepJoin.left),
|
|
162
|
-
},
|
|
163
|
-
right: { scope: recursiveHopScope, column: "id" },
|
|
164
|
-
},
|
|
165
|
-
],
|
|
166
|
-
join_kind: "Inner",
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
columns: projectHopResult(recursiveHopScope),
|
|
170
|
-
},
|
|
171
|
-
};
|
|
172
|
-
const maxDepth = normalizeRecursiveRelationDepth(options.maxDepth);
|
|
173
|
-
return new PermissionRelationBuilder({
|
|
174
|
-
kind: "recursive",
|
|
175
|
-
outputTable: this.state.outputTable,
|
|
176
|
-
base: {
|
|
177
|
-
Gather: {
|
|
178
|
-
seed,
|
|
179
|
-
step: stepProjected,
|
|
180
|
-
frontier_key: { RowId: "Current" },
|
|
181
|
-
max_depth: maxDepth,
|
|
182
|
-
dedupe_key: [{ RowId: "Current" }],
|
|
183
|
-
},
|
|
184
|
-
},
|
|
185
|
-
initialScope: this.state.outputTable,
|
|
186
|
-
filters: [],
|
|
187
|
-
joins: [],
|
|
188
|
-
selectMap: undefined,
|
|
189
|
-
}, this.relations);
|
|
190
|
-
}
|
|
191
|
-
toState() {
|
|
192
|
-
return this.state;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
class UpdateRuleBuilder {
|
|
196
|
-
table;
|
|
197
|
-
registerRule;
|
|
198
|
-
oldCondition;
|
|
199
|
-
newCondition;
|
|
200
|
-
isRegistered = false;
|
|
201
|
-
constructor(table, registerRule) {
|
|
202
|
-
this.table = table;
|
|
203
|
-
this.registerRule = registerRule;
|
|
204
|
-
}
|
|
205
|
-
where(input) {
|
|
206
|
-
const condition = resolveWhereInput(input);
|
|
207
|
-
const rule = {
|
|
208
|
-
table: this.table,
|
|
209
|
-
action: "update",
|
|
210
|
-
using: condition,
|
|
211
|
-
withCheck: condition,
|
|
212
|
-
};
|
|
213
|
-
this.registerRule?.(rule);
|
|
214
|
-
return rule;
|
|
215
|
-
}
|
|
216
|
-
whereOld(input) {
|
|
217
|
-
this.oldCondition = resolveWhereInput(input);
|
|
218
|
-
this.registerBuilder();
|
|
219
|
-
return this;
|
|
220
|
-
}
|
|
221
|
-
whereNew(input) {
|
|
222
|
-
this.newCondition = resolveWhereInput(input);
|
|
223
|
-
this.registerBuilder();
|
|
224
|
-
return this;
|
|
225
|
-
}
|
|
226
|
-
registerBuilder() {
|
|
227
|
-
if (this.isRegistered) {
|
|
228
|
-
return;
|
|
229
|
-
}
|
|
230
|
-
this.isRegistered = true;
|
|
231
|
-
this.registerRule?.(this);
|
|
232
|
-
}
|
|
233
|
-
toRule() {
|
|
234
|
-
if (!this.oldCondition && !this.newCondition) {
|
|
235
|
-
throw new Error(`Missing update policy conditions for table "${this.table}"`);
|
|
236
|
-
}
|
|
237
|
-
return {
|
|
238
|
-
table: this.table,
|
|
239
|
-
action: "update",
|
|
240
|
-
using: this.oldCondition ?? this.newCondition,
|
|
241
|
-
withCheck: this.newCondition ?? this.oldCondition,
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
export function definePermissions(app, factory) {
|
|
246
|
-
const fkReferencesByTable = collectFkReferencesByTable(app);
|
|
247
|
-
const relationsByTable = collectRelationsByTable(app);
|
|
248
|
-
const tableNames = Object.keys(app).filter((key) => key !== "wasmSchema");
|
|
249
|
-
const rules = [];
|
|
250
|
-
const seenRules = new Set();
|
|
251
|
-
const collectRule = (ruleLike) => {
|
|
252
|
-
if (seenRules.has(ruleLike)) {
|
|
253
|
-
return;
|
|
254
|
-
}
|
|
255
|
-
seenRules.add(ruleLike);
|
|
256
|
-
rules.push(ruleLike);
|
|
257
|
-
};
|
|
258
|
-
const ctx = {
|
|
259
|
-
policy: buildPolicyContext(tableNames, relationsByTable, collectRule),
|
|
260
|
-
anyOf,
|
|
261
|
-
allOf,
|
|
262
|
-
allowedTo: createAllowedToContext(),
|
|
263
|
-
session: createSessionContext(),
|
|
264
|
-
};
|
|
265
|
-
factory(ctx);
|
|
266
|
-
return compileRules(rules, fkReferencesByTable);
|
|
267
|
-
}
|
|
268
|
-
function collectFkReferencesByTable(app) {
|
|
269
|
-
const result = new Map();
|
|
270
|
-
const schema = app.wasmSchema;
|
|
271
|
-
if (!schema || typeof schema !== "object") {
|
|
272
|
-
return result;
|
|
273
|
-
}
|
|
274
|
-
const typedSchema = schema;
|
|
275
|
-
for (const [tableName, table] of Object.entries(typedSchema)) {
|
|
276
|
-
if (!table || typeof table !== "object" || !Array.isArray(table.columns)) {
|
|
277
|
-
continue;
|
|
278
|
-
}
|
|
279
|
-
const fkColumns = new Map();
|
|
280
|
-
for (const column of table.columns) {
|
|
281
|
-
if (column.references) {
|
|
282
|
-
fkColumns.set(column.name, column.references);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
result.set(tableName, fkColumns);
|
|
286
|
-
}
|
|
287
|
-
return result;
|
|
288
|
-
}
|
|
289
|
-
function collectRelationsByTable(app) {
|
|
290
|
-
const schema = app.wasmSchema;
|
|
291
|
-
if (!schema || typeof schema !== "object") {
|
|
292
|
-
return new Map();
|
|
293
|
-
}
|
|
294
|
-
const typedSchema = schema;
|
|
295
|
-
try {
|
|
296
|
-
return analyzeRelations(typedSchema);
|
|
297
|
-
}
|
|
298
|
-
catch {
|
|
299
|
-
// Keep permissive behavior for partially-specified schemas used in tests/tooling.
|
|
300
|
-
// hopTo/gather callers still receive explicit unknown-relation errors.
|
|
301
|
-
return new Map();
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
function buildPolicyContext(tableNames, relationsByTable, collectRule) {
|
|
305
|
-
const context = {};
|
|
306
|
-
for (const table of tableNames) {
|
|
307
|
-
context[table] = buildTablePolicyBuilder(table, relationsByTable, collectRule);
|
|
308
|
-
}
|
|
309
|
-
context.exists = (relation) => ({
|
|
310
|
-
__jazzPermissionKind: "exists-relation",
|
|
311
|
-
relation,
|
|
312
|
-
});
|
|
313
|
-
return context;
|
|
314
|
-
}
|
|
315
|
-
function buildTablePolicyBuilder(table, relationsByTable, collectRule) {
|
|
316
|
-
const registerRule = (rule) => {
|
|
317
|
-
collectRule(rule);
|
|
318
|
-
return rule;
|
|
319
|
-
};
|
|
320
|
-
const read = {
|
|
321
|
-
where: (input) => registerRule({ table, action: "read", using: resolveWhereInput(input) }),
|
|
322
|
-
};
|
|
323
|
-
const insert = {
|
|
324
|
-
where: (input) => registerRule({ table, action: "insert", withCheck: resolveWhereInput(input) }),
|
|
325
|
-
};
|
|
326
|
-
const del = {
|
|
327
|
-
where: (input) => registerRule({ table, action: "delete", using: resolveWhereInput(input) }),
|
|
328
|
-
};
|
|
329
|
-
const updateFactory = () => new UpdateRuleBuilder(table, collectRule);
|
|
330
|
-
const exists = {
|
|
331
|
-
where: (input) => ({
|
|
332
|
-
__jazzPermissionKind: "exists",
|
|
333
|
-
table,
|
|
334
|
-
where: normalizeWhereObject(input),
|
|
335
|
-
}),
|
|
336
|
-
};
|
|
337
|
-
return {
|
|
338
|
-
__jazzPermissionKind: "table-builder",
|
|
339
|
-
__jazzPermissionTable: table,
|
|
340
|
-
allowRead: read,
|
|
341
|
-
allowReads: read,
|
|
342
|
-
allowInsert: insert,
|
|
343
|
-
allowInserts: insert,
|
|
344
|
-
allowDelete: del,
|
|
345
|
-
allowDeletes: del,
|
|
346
|
-
get allowUpdate() {
|
|
347
|
-
return updateFactory();
|
|
348
|
-
},
|
|
349
|
-
get allowUpdates() {
|
|
350
|
-
return updateFactory();
|
|
351
|
-
},
|
|
352
|
-
exists,
|
|
353
|
-
where(input) {
|
|
354
|
-
return createTableRelation(table, relationsByTable).where(input);
|
|
355
|
-
},
|
|
356
|
-
select(columns) {
|
|
357
|
-
return createTableRelation(table, relationsByTable).select(columns);
|
|
358
|
-
},
|
|
359
|
-
hopTo(relation) {
|
|
360
|
-
return createTableRelation(table, relationsByTable).hopTo(relation);
|
|
361
|
-
},
|
|
362
|
-
gather(options) {
|
|
363
|
-
return createTableRelation(table, relationsByTable).gather(options);
|
|
364
|
-
},
|
|
365
|
-
};
|
|
366
|
-
}
|
|
367
|
-
function createTableRelation(table, relationsByTable) {
|
|
368
|
-
return new PermissionRelationBuilder({
|
|
369
|
-
kind: "table",
|
|
370
|
-
outputTable: table,
|
|
371
|
-
base: {
|
|
372
|
-
TableScan: {
|
|
373
|
-
table,
|
|
374
|
-
},
|
|
375
|
-
},
|
|
376
|
-
initialScope: table,
|
|
377
|
-
filters: [],
|
|
378
|
-
joins: [],
|
|
379
|
-
selectMap: undefined,
|
|
380
|
-
}, relationsByTable);
|
|
381
|
-
}
|
|
382
|
-
function relationJoinTargetToTable(target) {
|
|
383
|
-
if (typeof target === "string") {
|
|
384
|
-
return target;
|
|
385
|
-
}
|
|
386
|
-
if (isPlainObject(target) &&
|
|
387
|
-
target.__jazzPermissionKind === "table-builder" &&
|
|
388
|
-
typeof target.__jazzPermissionTable === "string") {
|
|
389
|
-
return target.__jazzPermissionTable;
|
|
390
|
-
}
|
|
391
|
-
throw new Error("join(...) expects a table builder (policy.<table>) or table name string.");
|
|
392
|
-
}
|
|
393
|
-
function resolveNamedRelation(relationsByTable, table, relationName) {
|
|
394
|
-
const relations = relationsByTable.get(table) ?? [];
|
|
395
|
-
const relation = relations.find((candidate) => candidate.name === relationName);
|
|
396
|
-
if (!relation) {
|
|
397
|
-
throw new Error(`Unknown relation "${relationName}" on table "${table}".`);
|
|
398
|
-
}
|
|
399
|
-
return relation;
|
|
400
|
-
}
|
|
401
|
-
function isRecursiveCurrentFilter(raw, token) {
|
|
402
|
-
if (raw === token) {
|
|
403
|
-
return true;
|
|
404
|
-
}
|
|
405
|
-
if (!isPlainObject(raw)) {
|
|
406
|
-
return false;
|
|
407
|
-
}
|
|
408
|
-
const keys = Object.keys(raw).filter((key) => raw[key] !== undefined);
|
|
409
|
-
return keys.length === 1 && keys[0] === "eq" && raw.eq === token;
|
|
410
|
-
}
|
|
411
|
-
function resolveRelationWhereInput(input) {
|
|
412
|
-
if (typeof input === "function") {
|
|
413
|
-
return resolveRelationWhereInput(input(createRowContext()));
|
|
414
|
-
}
|
|
415
|
-
return normalizeWhereObject(input);
|
|
416
|
-
}
|
|
417
|
-
function extractRelationFilters(where) {
|
|
418
|
-
const filters = [];
|
|
419
|
-
for (const [column, raw] of Object.entries(where)) {
|
|
420
|
-
if (raw === undefined) {
|
|
421
|
-
continue;
|
|
422
|
-
}
|
|
423
|
-
filters.push({ column, raw });
|
|
424
|
-
}
|
|
425
|
-
return filters;
|
|
426
|
-
}
|
|
427
|
-
function normalizeRelationSelectMap(columns) {
|
|
428
|
-
if (!isPlainObject(columns)) {
|
|
429
|
-
throw new Error("select(...) expects an object map: { alias: column }.");
|
|
430
|
-
}
|
|
431
|
-
const entries = Object.entries(columns);
|
|
432
|
-
if (entries.length === 0) {
|
|
433
|
-
throw new Error("select(...) requires at least one projected column.");
|
|
434
|
-
}
|
|
435
|
-
const selectMap = {};
|
|
436
|
-
for (const [alias, column] of entries) {
|
|
437
|
-
const normalizedAlias = alias.trim();
|
|
438
|
-
if (!normalizedAlias) {
|
|
439
|
-
throw new Error("select(...) alias names must be non-empty strings.");
|
|
440
|
-
}
|
|
441
|
-
if (typeof column !== "string" || !column.trim()) {
|
|
442
|
-
throw new Error(`select(...) column for alias "${alias}" must be a non-empty string.`);
|
|
443
|
-
}
|
|
444
|
-
selectMap[normalizedAlias] = stripQualifier(column);
|
|
445
|
-
}
|
|
446
|
-
return selectMap;
|
|
447
|
-
}
|
|
448
|
-
function normalizeRecursiveRelationDepth(maxDepth) {
|
|
449
|
-
if (maxDepth === undefined) {
|
|
450
|
-
return RECURSIVE_POLICY_MAX_DEPTH_DEFAULT;
|
|
451
|
-
}
|
|
452
|
-
if (!Number.isInteger(maxDepth) || maxDepth <= 0) {
|
|
453
|
-
throw new Error("gather(...) maxDepth must be a positive integer.");
|
|
454
|
-
}
|
|
455
|
-
if (maxDepth > RECURSIVE_POLICY_MAX_DEPTH_HARD_CAP) {
|
|
456
|
-
throw new Error(`gather(...) maxDepth ${maxDepth} exceeds hard cap ${RECURSIVE_POLICY_MAX_DEPTH_HARD_CAP}.`);
|
|
457
|
-
}
|
|
458
|
-
return maxDepth;
|
|
459
|
-
}
|
|
460
|
-
function getRelationState(relation) {
|
|
461
|
-
if (relation instanceof PermissionRelationBuilder) {
|
|
462
|
-
return relation.toState();
|
|
463
|
-
}
|
|
464
|
-
throw new Error("Expected a relation built from policy.<table> with where/join/hopTo/gather.");
|
|
465
|
-
}
|
|
466
|
-
function relationColumnRef(column, defaultScope) {
|
|
467
|
-
const [prefix, bare] = splitQualifiedColumn(column);
|
|
468
|
-
if (prefix) {
|
|
469
|
-
return { scope: prefix, column: bare };
|
|
470
|
-
}
|
|
471
|
-
return { scope: defaultScope, column: bare };
|
|
472
|
-
}
|
|
473
|
-
function toRelValueRef(value, options) {
|
|
474
|
-
if (isSessionRefValue(value)) {
|
|
475
|
-
return { SessionRef: value.path };
|
|
476
|
-
}
|
|
477
|
-
if (isRowRefValue(value)) {
|
|
478
|
-
if (!options.allowRowRefs) {
|
|
479
|
-
throw new Error("Row references are only valid inside exists() clauses.");
|
|
480
|
-
}
|
|
481
|
-
return {
|
|
482
|
-
OuterColumn: { column: value.column },
|
|
483
|
-
};
|
|
484
|
-
}
|
|
485
|
-
return { Literal: value };
|
|
486
|
-
}
|
|
487
|
-
function relationFilterToPredicates(filter, defaultScope) {
|
|
488
|
-
const left = relationColumnRef(filter.column, defaultScope);
|
|
489
|
-
const raw = filter.raw;
|
|
490
|
-
if (raw === null) {
|
|
491
|
-
return [{ IsNull: { column: left } }];
|
|
492
|
-
}
|
|
493
|
-
if (isSessionRefValue(raw) || isRowRefValue(raw)) {
|
|
494
|
-
return [
|
|
495
|
-
{
|
|
496
|
-
Cmp: {
|
|
497
|
-
left,
|
|
498
|
-
op: "Eq",
|
|
499
|
-
right: toRelValueRef(raw, { allowRowRefs: true }),
|
|
500
|
-
},
|
|
501
|
-
},
|
|
502
|
-
];
|
|
503
|
-
}
|
|
504
|
-
if (!isPlainObject(raw)) {
|
|
505
|
-
return [
|
|
506
|
-
{
|
|
507
|
-
Cmp: {
|
|
508
|
-
left,
|
|
509
|
-
op: "Eq",
|
|
510
|
-
right: { Literal: raw },
|
|
511
|
-
},
|
|
512
|
-
},
|
|
513
|
-
];
|
|
514
|
-
}
|
|
515
|
-
const predicates = [];
|
|
516
|
-
for (const [op, value] of Object.entries(raw)) {
|
|
517
|
-
if (value === undefined) {
|
|
518
|
-
continue;
|
|
519
|
-
}
|
|
520
|
-
switch (op) {
|
|
521
|
-
case "eq":
|
|
522
|
-
if (value === null) {
|
|
523
|
-
predicates.push({ IsNull: { column: left } });
|
|
524
|
-
}
|
|
525
|
-
else {
|
|
526
|
-
predicates.push({
|
|
527
|
-
Cmp: {
|
|
528
|
-
left,
|
|
529
|
-
op: "Eq",
|
|
530
|
-
right: toRelValueRef(value, { allowRowRefs: true }),
|
|
531
|
-
},
|
|
532
|
-
});
|
|
533
|
-
}
|
|
534
|
-
break;
|
|
535
|
-
case "ne":
|
|
536
|
-
if (value === null) {
|
|
537
|
-
predicates.push({ IsNotNull: { column: left } });
|
|
538
|
-
}
|
|
539
|
-
else {
|
|
540
|
-
predicates.push({
|
|
541
|
-
Cmp: {
|
|
542
|
-
left,
|
|
543
|
-
op: "Ne",
|
|
544
|
-
right: toRelValueRef(value, { allowRowRefs: true }),
|
|
545
|
-
},
|
|
546
|
-
});
|
|
547
|
-
}
|
|
548
|
-
break;
|
|
549
|
-
case "gt":
|
|
550
|
-
predicates.push({
|
|
551
|
-
Cmp: {
|
|
552
|
-
left,
|
|
553
|
-
op: "Gt",
|
|
554
|
-
right: toRelValueRef(value, { allowRowRefs: true }),
|
|
555
|
-
},
|
|
556
|
-
});
|
|
557
|
-
break;
|
|
558
|
-
case "gte":
|
|
559
|
-
predicates.push({
|
|
560
|
-
Cmp: {
|
|
561
|
-
left,
|
|
562
|
-
op: "Ge",
|
|
563
|
-
right: toRelValueRef(value, { allowRowRefs: true }),
|
|
564
|
-
},
|
|
565
|
-
});
|
|
566
|
-
break;
|
|
567
|
-
case "lt":
|
|
568
|
-
predicates.push({
|
|
569
|
-
Cmp: {
|
|
570
|
-
left,
|
|
571
|
-
op: "Lt",
|
|
572
|
-
right: toRelValueRef(value, { allowRowRefs: true }),
|
|
573
|
-
},
|
|
574
|
-
});
|
|
575
|
-
break;
|
|
576
|
-
case "lte":
|
|
577
|
-
predicates.push({
|
|
578
|
-
Cmp: {
|
|
579
|
-
left,
|
|
580
|
-
op: "Le",
|
|
581
|
-
right: toRelValueRef(value, { allowRowRefs: true }),
|
|
582
|
-
},
|
|
583
|
-
});
|
|
584
|
-
break;
|
|
585
|
-
case "isNull":
|
|
586
|
-
if (typeof value !== "boolean") {
|
|
587
|
-
throw new Error(`"${filter.column}.isNull" expects a boolean value.`);
|
|
588
|
-
}
|
|
589
|
-
predicates.push(value ? { IsNull: { column: left } } : { IsNotNull: { column: left } });
|
|
590
|
-
break;
|
|
591
|
-
case "in":
|
|
592
|
-
if (!Array.isArray(value)) {
|
|
593
|
-
throw new Error(`"${filter.column}.in" expects an array value.`);
|
|
594
|
-
}
|
|
595
|
-
predicates.push({
|
|
596
|
-
In: {
|
|
597
|
-
left,
|
|
598
|
-
values: value.map((entry) => toRelValueRef(entry, { allowRowRefs: true })),
|
|
599
|
-
},
|
|
600
|
-
});
|
|
601
|
-
break;
|
|
602
|
-
case "contains":
|
|
603
|
-
predicates.push({
|
|
604
|
-
Contains: {
|
|
605
|
-
left,
|
|
606
|
-
right: toRelValueRef(value, { allowRowRefs: true }),
|
|
607
|
-
},
|
|
608
|
-
});
|
|
609
|
-
break;
|
|
610
|
-
default:
|
|
611
|
-
throw new Error(`Unsupported where operator "${op}" in relation IR lowering.`);
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
return predicates.length > 0 ? predicates : ["True"];
|
|
615
|
-
}
|
|
616
|
-
function andRelPredicates(predicates) {
|
|
617
|
-
if (predicates.length === 0) {
|
|
618
|
-
return "True";
|
|
619
|
-
}
|
|
620
|
-
if (predicates.length === 1) {
|
|
621
|
-
return predicates[0];
|
|
622
|
-
}
|
|
623
|
-
return { And: predicates };
|
|
624
|
-
}
|
|
625
|
-
function applyRelFilter(input, predicates) {
|
|
626
|
-
const predicate = andRelPredicates(predicates);
|
|
627
|
-
if (predicate === "True") {
|
|
628
|
-
return input;
|
|
629
|
-
}
|
|
630
|
-
return {
|
|
631
|
-
Filter: {
|
|
632
|
-
input,
|
|
633
|
-
predicate,
|
|
634
|
-
},
|
|
635
|
-
};
|
|
636
|
-
}
|
|
637
|
-
function joinConditionFromSpec(join, leftScope, rightScope) {
|
|
638
|
-
return {
|
|
639
|
-
left: relationColumnRef(join.left, leftScope),
|
|
640
|
-
right: relationColumnRef(join.right, rightScope),
|
|
641
|
-
};
|
|
642
|
-
}
|
|
643
|
-
function projectHopResult(scope) {
|
|
644
|
-
return [
|
|
645
|
-
{
|
|
646
|
-
alias: "id",
|
|
647
|
-
expr: {
|
|
648
|
-
Column: { scope, column: "id" },
|
|
649
|
-
},
|
|
650
|
-
},
|
|
651
|
-
];
|
|
652
|
-
}
|
|
653
|
-
function applyRelationTail(options) {
|
|
654
|
-
let relation = options.base;
|
|
655
|
-
let defaultScope = options.initialScope;
|
|
656
|
-
let hasHopJoin = false;
|
|
657
|
-
for (let i = 0; i < options.joins.length; i += 1) {
|
|
658
|
-
const join = options.joins[i];
|
|
659
|
-
const rightScope = options.joinAlias(join, i);
|
|
660
|
-
relation = {
|
|
661
|
-
Join: {
|
|
662
|
-
left: relation,
|
|
663
|
-
right: {
|
|
664
|
-
TableScan: {
|
|
665
|
-
table: join.table,
|
|
666
|
-
},
|
|
667
|
-
},
|
|
668
|
-
on: [joinConditionFromSpec(join, defaultScope, rightScope)],
|
|
669
|
-
join_kind: "Inner",
|
|
670
|
-
},
|
|
671
|
-
};
|
|
672
|
-
defaultScope = rightScope;
|
|
673
|
-
hasHopJoin ||= Boolean(join.viaHop);
|
|
674
|
-
}
|
|
675
|
-
const predicates = options.filters.flatMap((filter) => relationFilterToPredicates(filter, defaultScope));
|
|
676
|
-
relation = applyRelFilter(relation, predicates);
|
|
677
|
-
if (options.selectMap && Object.keys(options.selectMap).length > 0) {
|
|
678
|
-
const columns = Object.entries(options.selectMap).map(([alias, column]) => ({
|
|
679
|
-
alias,
|
|
680
|
-
expr: {
|
|
681
|
-
Column: relationColumnRef(column, defaultScope),
|
|
682
|
-
},
|
|
683
|
-
}));
|
|
684
|
-
relation = {
|
|
685
|
-
Project: {
|
|
686
|
-
input: relation,
|
|
687
|
-
columns,
|
|
688
|
-
},
|
|
689
|
-
};
|
|
690
|
-
}
|
|
691
|
-
else if (hasHopJoin) {
|
|
692
|
-
relation = {
|
|
693
|
-
Project: {
|
|
694
|
-
input: relation,
|
|
695
|
-
columns: projectHopResult(defaultScope),
|
|
696
|
-
},
|
|
697
|
-
};
|
|
698
|
-
}
|
|
699
|
-
return relation;
|
|
700
|
-
}
|
|
701
|
-
function relationStateToRelExpr(state) {
|
|
702
|
-
return applyRelationTail({
|
|
703
|
-
base: state.base,
|
|
704
|
-
initialScope: state.initialScope,
|
|
705
|
-
joins: state.joins,
|
|
706
|
-
filters: state.filters,
|
|
707
|
-
selectMap: state.selectMap,
|
|
708
|
-
joinAlias: (join, index) => state.kind === "recursive"
|
|
709
|
-
? `__recursive_join_${index}`
|
|
710
|
-
: join.viaHop
|
|
711
|
-
? `__hop_${index}`
|
|
712
|
-
: `__join_${index}`,
|
|
713
|
-
});
|
|
714
|
-
}
|
|
715
|
-
export function relationToIr(relation) {
|
|
716
|
-
return relationStateToRelExpr(getRelationState(relation));
|
|
717
|
-
}
|
|
718
|
-
export function relationExistsToPolicy(relation) {
|
|
719
|
-
return {
|
|
720
|
-
type: "ExistsRel",
|
|
721
|
-
rel: relationToIr(relation),
|
|
722
|
-
};
|
|
723
|
-
}
|
|
724
|
-
function splitQualifiedColumn(column) {
|
|
725
|
-
const dotIndex = column.indexOf(".");
|
|
726
|
-
if (dotIndex < 0) {
|
|
727
|
-
return [undefined, column];
|
|
728
|
-
}
|
|
729
|
-
return [column.slice(0, dotIndex), column.slice(dotIndex + 1)];
|
|
730
|
-
}
|
|
731
|
-
function stripQualifier(column) {
|
|
732
|
-
const [, bare] = splitQualifiedColumn(column);
|
|
733
|
-
return bare;
|
|
734
|
-
}
|
|
735
|
-
function createSessionContext() {
|
|
736
|
-
const claimRef = (path) => ({
|
|
737
|
-
__jazzPermissionKind: "session-ref",
|
|
738
|
-
path: normalizeSessionPath(path),
|
|
739
|
-
});
|
|
740
|
-
return new Proxy({}, {
|
|
741
|
-
get(_target, prop, _receiver) {
|
|
742
|
-
if (typeof prop === "string") {
|
|
743
|
-
return claimRef(prop);
|
|
744
|
-
}
|
|
745
|
-
return undefined;
|
|
746
|
-
},
|
|
747
|
-
});
|
|
748
|
-
}
|
|
749
|
-
function createAllowedToContext() {
|
|
750
|
-
const inheritsExpr = (operation, fkColumn, options) => {
|
|
751
|
-
const maxDepth = options?.maxDepth;
|
|
752
|
-
if (maxDepth !== undefined) {
|
|
753
|
-
if (!Number.isInteger(maxDepth) || maxDepth <= 0) {
|
|
754
|
-
throw new Error(`allowedTo.*("${fkColumn}") maxDepth must be a positive integer.`);
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
const expr = {
|
|
758
|
-
type: "Inherits",
|
|
759
|
-
operation,
|
|
760
|
-
via_column: fkColumn,
|
|
761
|
-
};
|
|
762
|
-
if (maxDepth !== undefined) {
|
|
763
|
-
expr.max_depth = maxDepth;
|
|
764
|
-
}
|
|
765
|
-
return expr;
|
|
766
|
-
};
|
|
767
|
-
const inheritsReferencingExpr = (operation, sourceTable, fkColumn, options) => {
|
|
768
|
-
const maxDepth = options?.maxDepth;
|
|
769
|
-
if (maxDepth !== undefined) {
|
|
770
|
-
if (!Number.isInteger(maxDepth) || maxDepth <= 0) {
|
|
771
|
-
throw new Error(`allowedTo.*Referencing(..., "${fkColumn}") maxDepth must be a positive integer.`);
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
const expr = {
|
|
775
|
-
type: "InheritsReferencing",
|
|
776
|
-
operation,
|
|
777
|
-
source_table: relationJoinTargetToTable(sourceTable),
|
|
778
|
-
via_column: fkColumn,
|
|
779
|
-
};
|
|
780
|
-
if (maxDepth !== undefined) {
|
|
781
|
-
expr.max_depth = maxDepth;
|
|
782
|
-
}
|
|
783
|
-
return expr;
|
|
784
|
-
};
|
|
785
|
-
return {
|
|
786
|
-
read(fkColumn, options) {
|
|
787
|
-
return inheritsExpr("Select", fkColumn, options);
|
|
788
|
-
},
|
|
789
|
-
insert(fkColumn, options) {
|
|
790
|
-
return inheritsExpr("Insert", fkColumn, options);
|
|
791
|
-
},
|
|
792
|
-
update(fkColumn, options) {
|
|
793
|
-
return inheritsExpr("Update", fkColumn, options);
|
|
794
|
-
},
|
|
795
|
-
delete(fkColumn, options) {
|
|
796
|
-
return inheritsExpr("Delete", fkColumn, options);
|
|
797
|
-
},
|
|
798
|
-
readReferencing(sourceTable, fkColumn, options) {
|
|
799
|
-
return inheritsReferencingExpr("Select", sourceTable, fkColumn, options);
|
|
800
|
-
},
|
|
801
|
-
insertReferencing(sourceTable, fkColumn, options) {
|
|
802
|
-
return inheritsReferencingExpr("Insert", sourceTable, fkColumn, options);
|
|
803
|
-
},
|
|
804
|
-
updateReferencing(sourceTable, fkColumn, options) {
|
|
805
|
-
return inheritsReferencingExpr("Update", sourceTable, fkColumn, options);
|
|
806
|
-
},
|
|
807
|
-
deleteReferencing(sourceTable, fkColumn, options) {
|
|
808
|
-
return inheritsReferencingExpr("Delete", sourceTable, fkColumn, options);
|
|
809
|
-
},
|
|
810
|
-
};
|
|
811
|
-
}
|
|
812
|
-
function normalizeSessionPath(path) {
|
|
813
|
-
const parts = Array.isArray(path) ? path : path.split(".");
|
|
814
|
-
return parts.map((part) => part.trim()).filter((part) => part.length > 0);
|
|
815
|
-
}
|
|
816
|
-
function createRowContext() {
|
|
817
|
-
return new Proxy({}, {
|
|
818
|
-
get(_target, prop) {
|
|
819
|
-
if (typeof prop === "string") {
|
|
820
|
-
return {
|
|
821
|
-
__jazzPermissionKind: "row-ref",
|
|
822
|
-
column: prop,
|
|
823
|
-
};
|
|
824
|
-
}
|
|
825
|
-
return undefined;
|
|
826
|
-
},
|
|
827
|
-
});
|
|
828
|
-
}
|
|
829
|
-
function normalizeWhereObject(input) {
|
|
830
|
-
if (!isPlainObject(input)) {
|
|
831
|
-
throw new Error("Expected a where-object condition.");
|
|
832
|
-
}
|
|
833
|
-
return input;
|
|
834
|
-
}
|
|
835
|
-
function resolveWhereInput(input) {
|
|
836
|
-
if (typeof input === "function") {
|
|
837
|
-
const result = input(createRowContext());
|
|
838
|
-
return resolveWhereInput(result);
|
|
839
|
-
}
|
|
840
|
-
if (isExistsCondition(input)) {
|
|
841
|
-
return input;
|
|
842
|
-
}
|
|
843
|
-
if (isExistsRelationCondition(input)) {
|
|
844
|
-
return input;
|
|
845
|
-
}
|
|
846
|
-
if (isCompoundCondition(input)) {
|
|
847
|
-
return input;
|
|
848
|
-
}
|
|
849
|
-
if (isPolicyExpr(input)) {
|
|
850
|
-
return input;
|
|
851
|
-
}
|
|
852
|
-
if (isPlainObject(input)) {
|
|
853
|
-
return whereObjectToCondition(input, { allowRowRefs: false });
|
|
854
|
-
}
|
|
855
|
-
throw new Error("Unsupported permission condition input.");
|
|
856
|
-
}
|
|
857
|
-
function whereObjectToCondition(where, options) {
|
|
858
|
-
const exprs = [];
|
|
859
|
-
for (const [column, raw] of Object.entries(where)) {
|
|
860
|
-
if (raw === undefined) {
|
|
861
|
-
continue;
|
|
862
|
-
}
|
|
863
|
-
exprs.push(...columnFilterToExprs(column, raw, options));
|
|
864
|
-
}
|
|
865
|
-
return andExpr(exprs);
|
|
866
|
-
}
|
|
867
|
-
function columnFilterToExprs(column, raw, options) {
|
|
868
|
-
if (raw === null) {
|
|
869
|
-
return [{ type: "IsNull", column }];
|
|
870
|
-
}
|
|
871
|
-
if (isSessionRefValue(raw)) {
|
|
872
|
-
return [cmpExpr(column, "Eq", raw, options)];
|
|
873
|
-
}
|
|
874
|
-
if (isRowRefValue(raw)) {
|
|
875
|
-
if (!options.allowRowRefs) {
|
|
876
|
-
throw new Error("Row references are only valid inside exists() clauses.");
|
|
877
|
-
}
|
|
878
|
-
return [cmpExpr(column, "Eq", raw, options)];
|
|
879
|
-
}
|
|
880
|
-
if (isPlainObject(raw)) {
|
|
881
|
-
const exprs = [];
|
|
882
|
-
for (const [op, value] of Object.entries(raw)) {
|
|
883
|
-
if (value === undefined) {
|
|
884
|
-
continue;
|
|
885
|
-
}
|
|
886
|
-
switch (op) {
|
|
887
|
-
case "eq":
|
|
888
|
-
if (value === null) {
|
|
889
|
-
exprs.push({ type: "IsNull", column });
|
|
890
|
-
}
|
|
891
|
-
else {
|
|
892
|
-
exprs.push(cmpExpr(column, "Eq", value, options));
|
|
893
|
-
}
|
|
894
|
-
break;
|
|
895
|
-
case "ne":
|
|
896
|
-
if (value === null) {
|
|
897
|
-
exprs.push({ type: "IsNotNull", column });
|
|
898
|
-
}
|
|
899
|
-
else {
|
|
900
|
-
exprs.push(cmpExpr(column, "Ne", value, options));
|
|
901
|
-
}
|
|
902
|
-
break;
|
|
903
|
-
case "gt":
|
|
904
|
-
exprs.push(cmpExpr(column, "Gt", value, options));
|
|
905
|
-
break;
|
|
906
|
-
case "gte":
|
|
907
|
-
exprs.push(cmpExpr(column, "Ge", value, options));
|
|
908
|
-
break;
|
|
909
|
-
case "lt":
|
|
910
|
-
exprs.push(cmpExpr(column, "Lt", value, options));
|
|
911
|
-
break;
|
|
912
|
-
case "lte":
|
|
913
|
-
exprs.push(cmpExpr(column, "Le", value, options));
|
|
914
|
-
break;
|
|
915
|
-
case "isNull":
|
|
916
|
-
if (typeof value !== "boolean") {
|
|
917
|
-
throw new Error(`"${column}.isNull" expects a boolean value.`);
|
|
918
|
-
}
|
|
919
|
-
exprs.push(value ? { type: "IsNull", column } : { type: "IsNotNull", column });
|
|
920
|
-
break;
|
|
921
|
-
case "contains":
|
|
922
|
-
exprs.push({
|
|
923
|
-
type: "Contains",
|
|
924
|
-
column,
|
|
925
|
-
value: toPolicyValue(value, options),
|
|
926
|
-
});
|
|
927
|
-
break;
|
|
928
|
-
case "in":
|
|
929
|
-
if (isSessionRefValue(value)) {
|
|
930
|
-
exprs.push({
|
|
931
|
-
type: "In",
|
|
932
|
-
column,
|
|
933
|
-
session_path: value.path,
|
|
934
|
-
});
|
|
935
|
-
break;
|
|
936
|
-
}
|
|
937
|
-
if (!Array.isArray(value)) {
|
|
938
|
-
throw new Error(`"${column}.in" expects an array or session reference.`);
|
|
939
|
-
}
|
|
940
|
-
if (value.length === 0) {
|
|
941
|
-
exprs.push({ type: "False" });
|
|
942
|
-
break;
|
|
943
|
-
}
|
|
944
|
-
exprs.push({
|
|
945
|
-
type: "InList",
|
|
946
|
-
column,
|
|
947
|
-
values: value.map((entry) => toPolicyValue(entry, options)),
|
|
948
|
-
});
|
|
949
|
-
break;
|
|
950
|
-
default:
|
|
951
|
-
throw new Error(`Unsupported where operator "${op}" in permissions DSL.`);
|
|
952
|
-
}
|
|
953
|
-
}
|
|
954
|
-
return exprs.length === 0 ? [{ type: "True" }] : exprs;
|
|
955
|
-
}
|
|
956
|
-
return [cmpExpr(column, "Eq", raw, options)];
|
|
957
|
-
}
|
|
958
|
-
function cmpExpr(column, op, value, options) {
|
|
959
|
-
return {
|
|
960
|
-
type: "Cmp",
|
|
961
|
-
column,
|
|
962
|
-
op,
|
|
963
|
-
value: toPolicyValue(value, options),
|
|
964
|
-
};
|
|
965
|
-
}
|
|
966
|
-
function toPolicyValue(value, options) {
|
|
967
|
-
if (isSessionRefValue(value)) {
|
|
968
|
-
return { type: "SessionRef", path: value.path };
|
|
969
|
-
}
|
|
970
|
-
if (isRowRefValue(value)) {
|
|
971
|
-
if (!options.allowRowRefs) {
|
|
972
|
-
throw new Error("Row references are only valid inside exists() clauses.");
|
|
973
|
-
}
|
|
974
|
-
return {
|
|
975
|
-
type: "SessionRef",
|
|
976
|
-
path: [OUTER_ROW_SESSION_PREFIX, value.column],
|
|
977
|
-
};
|
|
978
|
-
}
|
|
979
|
-
return { type: "Literal", value };
|
|
980
|
-
}
|
|
981
|
-
function andExpr(exprs) {
|
|
982
|
-
if (exprs.length === 0) {
|
|
983
|
-
return { type: "True" };
|
|
984
|
-
}
|
|
985
|
-
if (exprs.length === 1) {
|
|
986
|
-
return exprs[0];
|
|
987
|
-
}
|
|
988
|
-
return { type: "And", exprs };
|
|
989
|
-
}
|
|
990
|
-
export function anyOf(conditions) {
|
|
991
|
-
return compoundCondition("Or", conditions);
|
|
992
|
-
}
|
|
993
|
-
export function allOf(conditions) {
|
|
994
|
-
return compoundCondition("And", conditions);
|
|
995
|
-
}
|
|
996
|
-
function compoundCondition(op, inputs) {
|
|
997
|
-
if (!Array.isArray(inputs)) {
|
|
998
|
-
const fnName = op === "And" ? "allOf" : "anyOf";
|
|
999
|
-
throw new Error(`"${fnName}(...)" expects an array of conditions.`);
|
|
1000
|
-
}
|
|
1001
|
-
return {
|
|
1002
|
-
__jazzPermissionKind: "compound",
|
|
1003
|
-
op,
|
|
1004
|
-
conditions: inputs.map((input) => resolveWhereInput(input)),
|
|
1005
|
-
};
|
|
1006
|
-
}
|
|
1007
|
-
function compileRules(rules, fkReferencesByTable) {
|
|
1008
|
-
const compiled = {};
|
|
1009
|
-
for (const ruleLike of rules) {
|
|
1010
|
-
const rule = isUpdateRuleBuilder(ruleLike) ? ruleLike.toRule() : ruleLike;
|
|
1011
|
-
if (!compiled[rule.table]) {
|
|
1012
|
-
compiled[rule.table] = emptyTablePolicies();
|
|
1013
|
-
}
|
|
1014
|
-
const tablePolicies = compiled[rule.table];
|
|
1015
|
-
switch (rule.action) {
|
|
1016
|
-
case "read":
|
|
1017
|
-
tablePolicies.select = mergeOperationPolicy(tablePolicies.select, {
|
|
1018
|
-
using: compileCondition(rule.using, rule.table, fkReferencesByTable),
|
|
1019
|
-
});
|
|
1020
|
-
break;
|
|
1021
|
-
case "insert":
|
|
1022
|
-
tablePolicies.insert = mergeOperationPolicy(tablePolicies.insert, {
|
|
1023
|
-
with_check: compileCondition(rule.withCheck, rule.table, fkReferencesByTable),
|
|
1024
|
-
});
|
|
1025
|
-
break;
|
|
1026
|
-
case "update":
|
|
1027
|
-
tablePolicies.update = mergeOperationPolicy(tablePolicies.update, {
|
|
1028
|
-
using: compileCondition(rule.using, rule.table, fkReferencesByTable),
|
|
1029
|
-
with_check: compileCondition(rule.withCheck, rule.table, fkReferencesByTable),
|
|
1030
|
-
});
|
|
1031
|
-
break;
|
|
1032
|
-
case "delete":
|
|
1033
|
-
tablePolicies.delete = mergeOperationPolicy(tablePolicies.delete, {
|
|
1034
|
-
using: compileCondition(rule.using, rule.table, fkReferencesByTable),
|
|
1035
|
-
});
|
|
1036
|
-
break;
|
|
1037
|
-
default:
|
|
1038
|
-
throw new Error(`Unsupported action ${rule.action}`);
|
|
1039
|
-
}
|
|
1040
|
-
}
|
|
1041
|
-
return compiled;
|
|
1042
|
-
}
|
|
1043
|
-
function emptyOperationPolicy() {
|
|
1044
|
-
return {};
|
|
1045
|
-
}
|
|
1046
|
-
function emptyTablePolicies() {
|
|
1047
|
-
return {
|
|
1048
|
-
select: emptyOperationPolicy(),
|
|
1049
|
-
insert: emptyOperationPolicy(),
|
|
1050
|
-
update: emptyOperationPolicy(),
|
|
1051
|
-
delete: emptyOperationPolicy(),
|
|
1052
|
-
};
|
|
1053
|
-
}
|
|
1054
|
-
function mergeOperationPolicy(existing, incoming) {
|
|
1055
|
-
return {
|
|
1056
|
-
using: mergeExprWithOr(existing?.using, incoming.using),
|
|
1057
|
-
with_check: mergeExprWithOr(existing?.with_check, incoming.with_check),
|
|
1058
|
-
};
|
|
1059
|
-
}
|
|
1060
|
-
function mergeExprWithOr(left, right) {
|
|
1061
|
-
if (!left) {
|
|
1062
|
-
return right;
|
|
1063
|
-
}
|
|
1064
|
-
if (!right) {
|
|
1065
|
-
return left;
|
|
1066
|
-
}
|
|
1067
|
-
const exprs = [];
|
|
1068
|
-
if (left.type === "Or") {
|
|
1069
|
-
exprs.push(...left.exprs);
|
|
1070
|
-
}
|
|
1071
|
-
else {
|
|
1072
|
-
exprs.push(left);
|
|
1073
|
-
}
|
|
1074
|
-
if (right.type === "Or") {
|
|
1075
|
-
exprs.push(...right.exprs);
|
|
1076
|
-
}
|
|
1077
|
-
else {
|
|
1078
|
-
exprs.push(right);
|
|
1079
|
-
}
|
|
1080
|
-
return { type: "Or", exprs };
|
|
1081
|
-
}
|
|
1082
|
-
function compileCondition(condition, table, fkReferencesByTable) {
|
|
1083
|
-
if (!condition) {
|
|
1084
|
-
return undefined;
|
|
1085
|
-
}
|
|
1086
|
-
if (isPolicyExpr(condition)) {
|
|
1087
|
-
assertInheritsColumns(condition, table, fkReferencesByTable);
|
|
1088
|
-
return condition;
|
|
1089
|
-
}
|
|
1090
|
-
if (isExistsRelationCondition(condition)) {
|
|
1091
|
-
return {
|
|
1092
|
-
type: "ExistsRel",
|
|
1093
|
-
rel: relationToIr(condition.relation),
|
|
1094
|
-
};
|
|
1095
|
-
}
|
|
1096
|
-
if (isExistsCondition(condition)) {
|
|
1097
|
-
const compiledCondition = whereObjectToCondition(condition.where, { allowRowRefs: true });
|
|
1098
|
-
assertInheritsColumns(compiledCondition, table, fkReferencesByTable);
|
|
1099
|
-
if (!compiledCondition) {
|
|
1100
|
-
throw new Error(`Failed to compile exists(...) condition for table "${condition.table}" in permissions.ts`);
|
|
1101
|
-
}
|
|
1102
|
-
return {
|
|
1103
|
-
type: "Exists",
|
|
1104
|
-
table: condition.table,
|
|
1105
|
-
condition: compiledCondition,
|
|
1106
|
-
};
|
|
1107
|
-
}
|
|
1108
|
-
if (isCompoundCondition(condition)) {
|
|
1109
|
-
const compiledChildren = condition.conditions.map((child) => compileCondition(child, table, fkReferencesByTable));
|
|
1110
|
-
const exprs = compiledChildren.filter((expr) => Boolean(expr));
|
|
1111
|
-
if (exprs.length === 0) {
|
|
1112
|
-
return condition.op === "And" ? { type: "True" } : { type: "False" };
|
|
1113
|
-
}
|
|
1114
|
-
if (exprs.length === 1) {
|
|
1115
|
-
return exprs[0];
|
|
1116
|
-
}
|
|
1117
|
-
return condition.op === "And" ? { type: "And", exprs } : { type: "Or", exprs };
|
|
1118
|
-
}
|
|
1119
|
-
throw new Error("Unsupported condition in permissions compiler.");
|
|
1120
|
-
}
|
|
1121
|
-
function assertInheritsColumns(expr, table, fkReferencesByTable) {
|
|
1122
|
-
const check = (node, currentTable) => {
|
|
1123
|
-
switch (node.type) {
|
|
1124
|
-
case "Inherits": {
|
|
1125
|
-
const fkColumns = fkReferencesByTable.get(currentTable);
|
|
1126
|
-
if (!fkColumns) {
|
|
1127
|
-
throw new Error(`allowedTo.${node.operation.toLowerCase()}("${node.via_column}") is invalid for table "${currentTable}": ` +
|
|
1128
|
-
`table metadata is missing in app.wasmSchema.`);
|
|
1129
|
-
}
|
|
1130
|
-
if (!fkColumns.has(node.via_column)) {
|
|
1131
|
-
const fkList = [...fkColumns.keys()].sort();
|
|
1132
|
-
const available = fkList.length > 0 ? fkList.join(", ") : "(none)";
|
|
1133
|
-
throw new Error(`allowedTo.${node.operation.toLowerCase()}("${node.via_column}") is invalid for table "${currentTable}": ` +
|
|
1134
|
-
`column is not a foreign key reference. Available FK columns: ${available}.`);
|
|
1135
|
-
}
|
|
1136
|
-
break;
|
|
1137
|
-
}
|
|
1138
|
-
case "InheritsReferencing": {
|
|
1139
|
-
const sourceFks = fkReferencesByTable.get(node.source_table);
|
|
1140
|
-
if (!sourceFks) {
|
|
1141
|
-
throw new Error(`allowedTo.${node.operation.toLowerCase()}Referencing(policy.${node.source_table}, "${node.via_column}") is invalid for table "${currentTable}": ` +
|
|
1142
|
-
`source table metadata is missing in app.wasmSchema.`);
|
|
1143
|
-
}
|
|
1144
|
-
const referenced = sourceFks.get(node.via_column);
|
|
1145
|
-
if (!referenced) {
|
|
1146
|
-
const fkList = [...sourceFks.keys()].sort();
|
|
1147
|
-
const available = fkList.length > 0 ? fkList.join(", ") : "(none)";
|
|
1148
|
-
throw new Error(`allowedTo.${node.operation.toLowerCase()}Referencing(policy.${node.source_table}, "${node.via_column}") is invalid for table "${currentTable}": ` +
|
|
1149
|
-
`column is not a foreign key reference on source table. Available FK columns: ${available}.`);
|
|
1150
|
-
}
|
|
1151
|
-
if (referenced !== currentTable) {
|
|
1152
|
-
throw new Error(`allowedTo.${node.operation.toLowerCase()}Referencing(policy.${node.source_table}, "${node.via_column}") is invalid for table "${currentTable}": ` +
|
|
1153
|
-
`source FK references "${referenced}" but this rule is for "${currentTable}".`);
|
|
1154
|
-
}
|
|
1155
|
-
break;
|
|
1156
|
-
}
|
|
1157
|
-
case "And":
|
|
1158
|
-
case "Or":
|
|
1159
|
-
for (const child of node.exprs) {
|
|
1160
|
-
check(child, currentTable);
|
|
1161
|
-
}
|
|
1162
|
-
break;
|
|
1163
|
-
case "Not":
|
|
1164
|
-
check(node.expr, currentTable);
|
|
1165
|
-
break;
|
|
1166
|
-
case "Exists":
|
|
1167
|
-
check(node.condition, node.table);
|
|
1168
|
-
break;
|
|
1169
|
-
default:
|
|
1170
|
-
break;
|
|
1171
|
-
}
|
|
1172
|
-
};
|
|
1173
|
-
check(expr, table);
|
|
1174
|
-
}
|
|
1175
|
-
function isPlainObject(value) {
|
|
1176
|
-
return Object.prototype.toString.call(value) === "[object Object]";
|
|
1177
|
-
}
|
|
1178
|
-
function isPolicyExpr(input) {
|
|
1179
|
-
return isPlainObject(input) && typeof input.type === "string";
|
|
1180
|
-
}
|
|
1181
|
-
function isSessionRefValue(input) {
|
|
1182
|
-
return (isPlainObject(input) &&
|
|
1183
|
-
input.__jazzPermissionKind === "session-ref" &&
|
|
1184
|
-
Array.isArray(input.path));
|
|
1185
|
-
}
|
|
1186
|
-
function isRowRefValue(input) {
|
|
1187
|
-
return (isPlainObject(input) &&
|
|
1188
|
-
input.__jazzPermissionKind === "row-ref" &&
|
|
1189
|
-
typeof input.column === "string");
|
|
1190
|
-
}
|
|
1191
|
-
function isExistsCondition(input) {
|
|
1192
|
-
return (isPlainObject(input) &&
|
|
1193
|
-
input.__jazzPermissionKind === "exists" &&
|
|
1194
|
-
typeof input.table === "string" &&
|
|
1195
|
-
isPlainObject(input.where));
|
|
1196
|
-
}
|
|
1197
|
-
function isExistsRelationCondition(input) {
|
|
1198
|
-
return (isPlainObject(input) &&
|
|
1199
|
-
input.__jazzPermissionKind === "exists-relation" &&
|
|
1200
|
-
isPlainObject(input.relation));
|
|
1201
|
-
}
|
|
1202
|
-
function isCompoundCondition(input) {
|
|
1203
|
-
return (isPlainObject(input) &&
|
|
1204
|
-
input.__jazzPermissionKind === "compound" &&
|
|
1205
|
-
(input.op === "And" || input.op === "Or") &&
|
|
1206
|
-
Array.isArray(input.conditions));
|
|
1207
|
-
}
|
|
1208
|
-
function isUpdateRuleBuilder(input) {
|
|
1209
|
-
return isPlainObject(input) && typeof input.toRule === "function";
|
|
1210
|
-
}
|
|
1211
|
-
//# sourceMappingURL=index.js.map
|