jazz-tools 2.0.0-alpha.6 → 2.0.0-alpha.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +178 -2
- package/bin/jazz-tools.js +91 -45
- 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 +237 -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 +16 -0
- package/dist/_dev/native-account-session.d.ts.map +1 -0
- package/dist/_dev/native-account-session.js +51 -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 +28 -0
- package/dist/accounts/account-manager-core.d.ts.map +1 -0
- package/dist/accounts/account-manager-core.js +179 -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/create-account-manager.d.ts +52 -0
- package/dist/accounts/create-account-manager.d.ts.map +1 -0
- package/dist/accounts/create-account-manager.js +17 -0
- package/dist/accounts/create-account-manager.js.map +1 -0
- package/dist/accounts/enrollment.d.ts +87 -0
- package/dist/accounts/enrollment.d.ts.map +1 -0
- package/dist/accounts/enrollment.js +305 -0
- package/dist/accounts/enrollment.js.map +1 -0
- package/dist/accounts/exports.d.ts +4 -0
- package/dist/accounts/exports.d.ts.map +1 -0
- package/dist/accounts/exports.js +2 -0
- package/dist/accounts/exports.js.map +1 -0
- package/dist/accounts/local-first.d.ts +14 -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 +34 -0
- package/dist/accounts/persistence.d.ts.map +1 -0
- package/dist/accounts/persistence.js +299 -0
- package/dist/accounts/persistence.js.map +1 -0
- package/dist/accounts/registry-client.d.ts +50 -0
- package/dist/accounts/registry-client.d.ts.map +1 -0
- package/dist/accounts/registry-client.js +108 -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 +171 -0
- package/dist/accounts/state.js.map +1 -0
- package/dist/backend/admission.d.ts +18 -0
- package/dist/backend/admission.d.ts.map +1 -0
- package/dist/backend/admission.js +139 -0
- package/dist/backend/admission.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/blobs.d.ts +121 -0
- package/dist/backend/blobs.d.ts.map +1 -0
- package/dist/backend/blobs.js +123 -0
- package/dist/backend/blobs.js.map +1 -0
- package/dist/backend/create-jazz-context.d.ts +116 -0
- package/dist/backend/create-jazz-context.d.ts.map +1 -0
- package/dist/backend/create-jazz-context.js +607 -0
- package/dist/backend/create-jazz-context.js.map +1 -0
- package/dist/backend/create-jazz-session.d.ts +105 -0
- package/dist/backend/create-jazz-session.d.ts.map +1 -0
- package/dist/backend/create-jazz-session.js +467 -0
- package/dist/backend/create-jazz-session.js.map +1 -0
- package/dist/backend/create-jazz.d.ts +405 -0
- package/dist/backend/create-jazz.d.ts.map +1 -0
- package/dist/backend/create-jazz.js +2731 -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 +202 -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 +380 -0
- package/dist/backend/external-jwt.js.map +1 -0
- package/dist/backend/from-jwt.d.ts +62 -0
- package/dist/backend/from-jwt.d.ts.map +1 -0
- package/dist/backend/from-jwt.js +96 -0
- package/dist/backend/from-jwt.js.map +1 -0
- package/dist/backend/index.d.ts +11 -1
- package/dist/backend/index.d.ts.map +1 -1
- package/dist/backend/index.js +8 -1
- package/dist/backend/index.js.map +1 -1
- 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/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 +39 -0
- package/dist/backend/request-auth.d.ts.map +1 -0
- package/dist/backend/request-auth.js +77 -0
- package/dist/backend/request-auth.js.map +1 -0
- package/dist/backend/session-recheck.d.ts +18 -0
- package/dist/backend/session-recheck.d.ts.map +1 -0
- package/dist/backend/session-recheck.js +57 -0
- package/dist/backend/session-recheck.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/vercel-store.d.ts +223 -0
- package/dist/backend/vercel-store.d.ts.map +1 -0
- package/dist/backend/vercel-store.js +932 -0
- package/dist/backend/vercel-store.js.map +1 -0
- package/dist/better-auth-adapter/fixtures/permissions.d.ts +2 -0
- package/dist/better-auth-adapter/fixtures/permissions.d.ts.map +1 -0
- package/dist/better-auth-adapter/fixtures/permissions.js +2 -0
- package/dist/better-auth-adapter/fixtures/permissions.js.map +1 -0
- package/dist/better-auth-adapter/fixtures/schema.d.ts +69 -0
- package/dist/better-auth-adapter/fixtures/schema.d.ts.map +1 -0
- package/dist/better-auth-adapter/fixtures/schema.js +84 -0
- package/dist/better-auth-adapter/fixtures/schema.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 +366 -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 +49 -0
- package/dist/better-auth-adapter/schema.d.ts.map +1 -0
- package/dist/better-auth-adapter/schema.js +300 -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 +27 -0
- package/dist/better-auth-adapter/utils.d.ts.map +1 -0
- package/dist/better-auth-adapter/utils.js +189 -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 +86 -0
- package/dist/classic-api.js.map +1 -0
- package/dist/cli.d.ts +29 -2
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +358 -268
- package/dist/cli.js.map +1 -1
- package/dist/client/index.d.ts +14 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +8 -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 +413 -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 +54 -65
- package/dist/codegen/relation-analyzer.js.map +1 -1
- package/dist/codegen/schema-reader.d.ts +6 -2
- package/dist/codegen/schema-reader.d.ts.map +1 -1
- package/dist/codegen/schema-reader.js +129 -98
- package/dist/codegen/schema-reader.js.map +1 -1
- package/dist/dev/catalogue-api.d.ts +157 -0
- package/dist/dev/catalogue-api.d.ts.map +1 -0
- package/dist/dev/catalogue-api.js +145 -0
- package/dist/dev/catalogue-api.js.map +1 -0
- package/dist/dev/catalogue-project.d.ts +150 -0
- package/dist/dev/catalogue-project.d.ts.map +1 -0
- package/dist/dev/catalogue-project.js +1466 -0
- package/dist/dev/catalogue-project.js.map +1 -0
- package/dist/dev/catalogue.d.ts +72 -0
- package/dist/dev/catalogue.d.ts.map +1 -0
- package/dist/dev/catalogue.js +279 -0
- package/dist/dev/catalogue.js.map +1 -0
- package/dist/dev/dev-server.d.ts +57 -0
- package/dist/dev/dev-server.d.ts.map +1 -0
- package/dist/dev/dev-server.js +122 -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/create-legacy-browser-delegate-X_T_QKCN.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/esm-7mP3GQX4.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/esm-BX6IY2Mv.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/esm-CH5eVyQQ.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/esm-aRzpnC3u.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/esm-ezD5H765.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/esm-k3rsq4Gn.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/index-C-btvLcw.js +20 -0
- package/dist/dev/inspector-overlay/embedded/assets/index-C78Pprka.css +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/jazz-broker-worker-CAMcDeUa.js +3 -0
- package/dist/dev/inspector-overlay/embedded/assets/jazz-broker-worker-XRRxJUcx.js +23997 -0
- package/dist/dev/inspector-overlay/embedded/assets/jazz_wasm-Cc71x_6y.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/jazz_wasm_bg-KR7h3v27.wasm +0 -0
- package/dist/dev/inspector-overlay/embedded/assets/node-foreground-node-lease.browser-Bm3gYjlT.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/trace-api-B5CaetI0.js +1 -0
- package/dist/dev/inspector-overlay/embedded/embedded.html +13 -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 +136 -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 +13 -0
- package/dist/dev/inspector-overlay/loader.d.ts.map +1 -0
- package/dist/dev/inspector-overlay/loader.js +506 -0
- package/dist/dev/inspector-overlay/loader.js.map +1 -0
- package/dist/dev/inspector-overlay/serve.d.ts +46 -0
- package/dist/dev/inspector-overlay/serve.d.ts.map +1 -0
- package/dist/dev/inspector-overlay/serve.js +131 -0
- package/dist/dev/inspector-overlay/serve.js.map +1 -0
- package/dist/dev/legacy-schema-hash.d.ts +4 -0
- package/dist/dev/legacy-schema-hash.d.ts.map +1 -0
- package/dist/dev/legacy-schema-hash.js +12 -0
- package/dist/dev/legacy-schema-hash.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 +14 -0
- package/dist/dev/migrations.d.ts.map +1 -0
- package/dist/dev/migrations.js +441 -0
- package/dist/dev/migrations.js.map +1 -0
- package/dist/dev/schema-utils.d.ts +18 -0
- package/dist/dev/schema-utils.d.ts.map +1 -0
- package/dist/dev/schema-utils.js +365 -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-tools/auto-attach.d.ts +11 -0
- package/dist/dev-tools/auto-attach.d.ts.map +1 -0
- package/dist/dev-tools/auto-attach.js +26 -0
- package/dist/dev-tools/auto-attach.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 +18 -0
- package/dist/drivers/schema-wire.d.ts.map +1 -0
- package/dist/drivers/schema-wire.js +66 -0
- package/dist/drivers/schema-wire.js.map +1 -0
- package/dist/drivers/types.d.ts +322 -45
- package/dist/drivers/types.d.ts.map +1 -1
- package/dist/drivers/types.js +5 -4
- package/dist/drivers/types.js.map +1 -1
- package/dist/dsl.d.ts +291 -101
- package/dist/dsl.d.ts.map +1 -1
- package/dist/dsl.js +244 -113
- package/dist/dsl.js.map +1 -1
- 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 +92 -0
- package/dist/effect/jazz-backend.js.map +1 -0
- package/dist/effect/jazz.d.ts +122 -0
- package/dist/effect/jazz.d.ts.map +1 -0
- package/dist/effect/jazz.js +159 -0
- package/dist/effect/jazz.js.map +1 -0
- package/dist/expo/auth-secret-store.d.ts +37 -0
- package/dist/expo/auth-secret-store.d.ts.map +1 -0
- package/dist/expo/auth-secret-store.js +139 -0
- package/dist/expo/auth-secret-store.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 +35 -0
- package/dist/expo/create-jazz-session.d.ts.map +1 -0
- package/dist/expo/create-jazz-session.js +39 -0
- package/dist/expo/create-jazz-session.js.map +1 -0
- package/dist/expo/index.d.ts +16 -0
- package/dist/expo/index.d.ts.map +1 -0
- package/dist/expo/index.js +14 -0
- package/dist/expo/index.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 +7 -0
- package/dist/expo/provider.d.ts.map +1 -0
- package/dist/expo/provider.js +10 -0
- package/dist/expo/provider.js.map +1 -0
- package/dist/expo/session.d.ts +10 -0
- package/dist/expo/session.d.ts.map +1 -0
- package/dist/expo/session.js +5 -0
- package/dist/expo/session.js.map +1 -0
- package/dist/expo/use-local-first-auth.d.ts +12 -0
- package/dist/expo/use-local-first-auth.d.ts.map +1 -0
- package/dist/expo/use-local-first-auth.js +13 -0
- package/dist/expo/use-local-first-auth.js.map +1 -0
- package/dist/index.d.ts +24 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -8
- package/dist/index.js.map +1 -1
- 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 +139 -115
- package/dist/ir.d.ts.map +1 -1
- package/dist/ir.js +496 -1
- package/dist/ir.js.map +1 -1
- package/dist/local-first/index.d.ts +16 -0
- package/dist/local-first/index.d.ts.map +1 -0
- package/dist/local-first/index.js +15 -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 +34 -0
- package/dist/magic-columns.d.ts.map +1 -0
- package/dist/magic-columns.js +86 -0
- package/dist/magic-columns.js.map +1 -0
- package/dist/migration-namespace.d.ts +8 -0
- package/dist/migration-namespace.d.ts.map +1 -0
- package/dist/migration-namespace.js +9 -0
- package/dist/migration-namespace.js.map +1 -0
- package/dist/migrations.d.ts +229 -0
- package/dist/migrations.d.ts.map +1 -0
- package/dist/migrations.js +383 -0
- package/dist/migrations.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 +38 -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/index.d.ts +149 -41
- package/dist/permissions/index.d.ts.map +1 -1
- package/dist/permissions/index.js +1209 -423
- package/dist/permissions/index.js.map +1 -1
- package/dist/policy-expr-map.d.ts +15 -0
- package/dist/policy-expr-map.d.ts.map +1 -0
- package/dist/policy-expr-map.js +45 -0
- package/dist/policy-expr-map.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 +174 -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/provenance-guidance.d.ts +3 -0
- package/dist/provenance-guidance.d.ts.map +1 -0
- package/dist/provenance-guidance.js +19 -0
- package/dist/provenance-guidance.js.map +1 -0
- package/dist/react/create-jazz-client.d.ts +2 -10
- package/dist/react/create-jazz-client.d.ts.map +1 -1
- package/dist/react/create-jazz-client.js +1 -25
- package/dist/react/create-jazz-client.js.map +1 -1
- package/dist/react/devtools-auto-attach.d.ts +2 -0
- package/dist/react/devtools-auto-attach.d.ts.map +1 -0
- package/dist/react/devtools-auto-attach.js +11 -0
- package/dist/react/devtools-auto-attach.js.map +1 -0
- package/dist/react/index.d.ts +20 -6
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +12 -5
- package/dist/react/index.js.map +1 -1
- package/dist/react/provider.d.ts +23 -11
- package/dist/react/provider.d.ts.map +1 -1
- package/dist/react/provider.js +43 -3
- package/dist/react/provider.js.map +1 -1
- package/dist/react/session.d.ts +18 -0
- package/dist/react/session.d.ts.map +1 -0
- package/dist/react/session.js +28 -0
- package/dist/react/session.js.map +1 -0
- 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-local-first-auth.d.ts +11 -0
- package/dist/react/use-local-first-auth.d.ts.map +1 -0
- package/dist/react/use-local-first-auth.js +13 -0
- package/dist/react/use-local-first-auth.js.map +1 -0
- 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/app.d.ts +31 -0
- package/dist/react-core/app.d.ts.map +1 -0
- package/dist/react-core/app.js +65 -0
- package/dist/react-core/app.js.map +1 -0
- package/dist/react-core/index.d.ts +11 -4
- package/dist/react-core/index.d.ts.map +1 -1
- package/dist/react-core/index.js +8 -2
- package/dist/react-core/index.js.map +1 -1
- package/dist/react-core/provider.d.ts +44 -12
- package/dist/react-core/provider.d.ts.map +1 -1
- package/dist/react-core/provider.js +110 -10
- package/dist/react-core/provider.js.map +1 -1
- package/dist/react-core/session.d.ts +45 -0
- package/dist/react-core/session.d.ts.map +1 -0
- package/dist/react-core/session.js +130 -0
- package/dist/react-core/session.js.map +1 -0
- package/dist/react-core/use-account-state.d.ts +4 -0
- package/dist/react-core/use-account-state.d.ts.map +1 -0
- package/dist/react-core/use-account-state.js +6 -0
- package/dist/react-core/use-account-state.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-local-first-auth.d.ts +12 -0
- package/dist/react-core/use-local-first-auth.d.ts.map +1 -0
- package/dist/react-core/use-local-first-auth.js +14 -0
- package/dist/react-core/use-local-first-auth.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 +35 -0
- package/dist/react-native/create-jazz-session.d.ts.map +1 -0
- package/dist/react-native/create-jazz-session.js +39 -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 +25 -9
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/react-native/index.js +17 -7
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/native-foreground-db.d.ts +192 -0
- package/dist/react-native/native-foreground-db.d.ts.map +1 -0
- package/dist/react-native/native-foreground-db.js +801 -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 +23 -10
- package/dist/react-native/provider.d.ts.map +1 -1
- package/dist/react-native/provider.js +23 -3
- package/dist/react-native/provider.js.map +1 -1
- package/dist/react-native/runtime-source.d.ts +40 -0
- package/dist/react-native/runtime-source.d.ts.map +1 -0
- package/dist/react-native/runtime-source.js +250 -0
- package/dist/react-native/runtime-source.js.map +1 -0
- package/dist/react-native/session.d.ts +10 -0
- package/dist/react-native/session.d.ts.map +1 -0
- package/dist/react-native/session.js +5 -0
- package/dist/react-native/session.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-local-first-auth.d.ts +15 -0
- package/dist/react-native/use-local-first-auth.d.ts.map +1 -0
- package/dist/react-native/use-local-first-auth.js +14 -0
- package/dist/react-native/use-local-first-auth.js.map +1 -0
- 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/anonymous-write-denied-error.d.ts +13 -0
- package/dist/runtime/anonymous-write-denied-error.d.ts.map +1 -0
- package/dist/runtime/anonymous-write-denied-error.js +58 -0
- package/dist/runtime/anonymous-write-denied-error.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 +51 -0
- package/dist/runtime/auth-secret-store.d.ts.map +1 -0
- package/dist/runtime/auth-secret-store.js +114 -0
- package/dist/runtime/auth-secret-store.js.map +1 -0
- package/dist/runtime/auth-state.d.ts +40 -0
- package/dist/runtime/auth-state.d.ts.map +1 -0
- package/dist/runtime/auth-state.js +145 -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 +54 -0
- package/dist/runtime/authority-changed-error.d.ts.map +1 -0
- package/dist/runtime/authority-changed-error.js +72 -0
- package/dist/runtime/authority-changed-error.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-worker-assets.d.ts +4 -0
- package/dist/runtime/browser-worker-assets.d.ts.map +1 -0
- package/dist/runtime/browser-worker-assets.js +8 -0
- package/dist/runtime/browser-worker-assets.js.map +1 -0
- package/dist/runtime/browser-worker-assets.native.d.ts +5 -0
- package/dist/runtime/browser-worker-assets.native.d.ts.map +1 -0
- package/dist/runtime/browser-worker-assets.native.js +6 -0
- package/dist/runtime/browser-worker-assets.native.js.map +1 -0
- package/dist/runtime/browser-worker-config.d.ts +55 -0
- package/dist/runtime/browser-worker-config.d.ts.map +1 -0
- package/dist/runtime/browser-worker-config.js +222 -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 +33 -0
- package/dist/runtime/client-migrations.d.ts.map +1 -0
- package/dist/runtime/client-migrations.js +30 -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 -13
- package/dist/runtime/client-session.d.ts.map +1 -1
- package/dist/runtime/client-session.js +212 -196
- package/dist/runtime/client-session.js.map +1 -1
- package/dist/runtime/client.d.ts +624 -191
- package/dist/runtime/client.d.ts.map +1 -1
- package/dist/runtime/client.js +1105 -425
- package/dist/runtime/client.js.map +1 -1
- package/dist/runtime/column-transforms.d.ts +40 -0
- package/dist/runtime/column-transforms.d.ts.map +1 -0
- package/dist/runtime/column-transforms.js +279 -0
- package/dist/runtime/column-transforms.js.map +1 -0
- package/dist/runtime/connection-manager/browser-connection-manager.d.ts +119 -0
- package/dist/runtime/connection-manager/browser-connection-manager.d.ts.map +1 -0
- package/dist/runtime/connection-manager/browser-connection-manager.js +836 -0
- package/dist/runtime/connection-manager/browser-connection-manager.js.map +1 -0
- package/dist/runtime/connection-manager/direct-connection-manager.d.ts +26 -0
- package/dist/runtime/connection-manager/direct-connection-manager.d.ts.map +1 -0
- package/dist/runtime/connection-manager/direct-connection-manager.js +198 -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 +136 -0
- package/dist/runtime/connection-manager/types.d.ts.map +1 -0
- package/dist/runtime/connection-manager/types.js +340 -0
- package/dist/runtime/connection-manager/types.js.map +1 -0
- package/dist/runtime/context.d.ts +90 -30
- package/dist/runtime/context.d.ts.map +1 -1
- package/dist/runtime/context.js.map +1 -1
- package/dist/runtime/credentialed-transport.d.ts +27 -0
- package/dist/runtime/credentialed-transport.d.ts.map +1 -0
- package/dist/runtime/credentialed-transport.js +155 -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 +19 -0
- package/dist/runtime/db-replaced-error.d.ts.map +1 -0
- package/dist/runtime/db-replaced-error.js +20 -0
- package/dist/runtime/db-replaced-error.js.map +1 -0
- package/dist/runtime/db.d.ts +735 -201
- package/dist/runtime/db.d.ts.map +1 -1
- package/dist/runtime/db.js +3287 -727
- 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 +315 -0
- package/dist/runtime/default-runtime-source.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 +9 -0
- package/dist/runtime/graceful-shutdown-error.d.ts.map +1 -0
- package/dist/runtime/graceful-shutdown-error.js +17 -0
- package/dist/runtime/graceful-shutdown-error.js.map +1 -0
- package/dist/runtime/hex.d.ts +17 -0
- package/dist/runtime/hex.d.ts.map +1 -0
- package/dist/runtime/hex.js +56 -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 -11
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +14 -10
- 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 +47 -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.d.ts +2 -0
- package/dist/runtime/json-text.d.ts.map +1 -0
- package/dist/runtime/json-text.js +17 -0
- package/dist/runtime/json-text.js.map +1 -0
- package/dist/runtime/local-first-auth-controller.d.ts +29 -0
- package/dist/runtime/local-first-auth-controller.d.ts.map +1 -0
- package/dist/runtime/local-first-auth-controller.js +101 -0
- package/dist/runtime/local-first-auth-controller.js.map +1 -0
- 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-upgrade.d.ts +27 -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/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 +24 -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-runtime/attached-browser-worker-connection.d.ts +20 -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 +42 -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/browser-follower-connection.d.ts +78 -0
- package/dist/runtime/native-runtime/browser-follower-connection.d.ts.map +1 -0
- package/dist/runtime/native-runtime/browser-follower-connection.js +494 -0
- package/dist/runtime/native-runtime/browser-follower-connection.js.map +1 -0
- package/dist/runtime/native-runtime/browser-shared-worker-connection.d.ts +96 -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 +780 -0
- package/dist/runtime/native-runtime/browser-shared-worker-connection.js.map +1 -0
- package/dist/runtime/native-runtime/browser-worker-protocol.d.ts +455 -0
- package/dist/runtime/native-runtime/browser-worker-protocol.d.ts.map +1 -0
- package/dist/runtime/native-runtime/browser-worker-protocol.js +281 -0
- package/dist/runtime/native-runtime/browser-worker-protocol.js.map +1 -0
- package/dist/runtime/native-runtime/browser-worker-transport.d.ts +53 -0
- package/dist/runtime/native-runtime/browser-worker-transport.d.ts.map +1 -0
- package/dist/runtime/native-runtime/browser-worker-transport.js +252 -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 +85 -0
- package/dist/runtime/native-runtime/http-stream-socket.d.ts.map +1 -0
- package/dist/runtime/native-runtime/http-stream-socket.js +433 -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 +177 -0
- package/dist/runtime/native-runtime/native-codec.d.ts.map +1 -0
- package/dist/runtime/native-runtime/native-codec.js +627 -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 +62 -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 +942 -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 +728 -0
- package/dist/runtime/native-runtime/native-runtime-adapter.d.ts.map +1 -0
- package/dist/runtime/native-runtime/native-runtime-adapter.js +5705 -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/websocket.d.ts +165 -0
- package/dist/runtime/native-runtime/websocket.d.ts.map +1 -0
- package/dist/runtime/native-runtime/websocket.js +713 -0
- package/dist/runtime/native-runtime/websocket.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 +37 -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 +554 -167
- 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/row-transformer.d.ts +18 -6
- package/dist/runtime/row-transformer.d.ts.map +1 -1
- package/dist/runtime/row-transformer.js +195 -41
- 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 +9 -0
- package/dist/runtime/runtime-config.d.ts.map +1 -0
- package/dist/runtime/runtime-config.js +111 -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 +167 -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 +5 -0
- package/dist/runtime/schema-metadata.d.ts.map +1 -0
- package/dist/runtime/schema-metadata.js +34 -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 +36 -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 +38 -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 +55 -0
- package/dist/runtime/structural-values.js.map +1 -0
- package/dist/runtime/subscription-manager.d.ts +98 -14
- package/dist/runtime/subscription-manager.d.ts.map +1 -1
- package/dist/runtime/subscription-manager.js +1049 -25
- package/dist/runtime/subscription-manager.js.map +1 -1
- package/dist/runtime/sync-status.d.ts +98 -0
- package/dist/runtime/sync-status.d.ts.map +1 -0
- package/dist/runtime/sync-status.js +93 -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 +196 -43
- 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 +120 -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-hash.d.ts +3 -0
- package/dist/schema-hash.d.ts.map +1 -0
- package/dist/schema-hash.js +5 -0
- package/dist/schema-hash.js.map +1 -0
- package/dist/schema-loader.d.ts +31 -0
- package/dist/schema-loader.d.ts.map +1 -0
- package/dist/schema-loader.js +501 -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 +35 -0
- package/dist/schema-namespace.d.ts.map +1 -0
- package/dist/schema-namespace.js +17 -0
- package/dist/schema-namespace.js.map +1 -0
- package/dist/schema-permissions.d.ts +16 -0
- package/dist/schema-permissions.d.ts.map +1 -0
- package/dist/schema-permissions.js +405 -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 +39 -0
- package/dist/schema-source.js.map +1 -0
- package/dist/schema.d.ts +108 -36
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +1 -10
- package/dist/schema.js.map +1 -1
- package/dist/session/app.d.ts +58 -0
- package/dist/session/app.d.ts.map +1 -0
- package/dist/session/app.js +325 -0
- package/dist/session/app.js.map +1 -0
- package/dist/session/backend-watch.d.ts +138 -0
- package/dist/session/backend-watch.d.ts.map +1 -0
- package/dist/session/backend-watch.js +576 -0
- package/dist/session/backend-watch.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-app.d.ts +11 -0
- package/dist/session/create-jazz-app.d.ts.map +1 -0
- package/dist/session/create-jazz-app.js +11 -0
- package/dist/session/create-jazz-app.js.map +1 -0
- package/dist/session/create-jazz-session.d.ts +68 -0
- package/dist/session/create-jazz-session.d.ts.map +1 -0
- package/dist/session/create-jazz-session.js +448 -0
- package/dist/session/create-jazz-session.js.map +1 -0
- package/dist/session/follow-user.d.ts +53 -0
- package/dist/session/follow-user.d.ts.map +1 -0
- package/dist/session/follow-user.js +107 -0
- package/dist/session/follow-user.js.map +1 -0
- package/dist/session/left-behind-replicas.d.ts +62 -0
- package/dist/session/left-behind-replicas.d.ts.map +1 -0
- package/dist/session/left-behind-replicas.js +146 -0
- package/dist/session/left-behind-replicas.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/state.d.ts +93 -0
- package/dist/session/state.d.ts.map +1 -0
- package/dist/session/state.js +383 -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/app.d.ts +30 -0
- package/dist/solid/app.d.ts.map +1 -0
- package/dist/solid/app.js +95 -0
- package/dist/solid/app.js.map +1 -0
- package/dist/solid/app.ssr.js +109 -0
- package/dist/solid/app.ssr.js.map +1 -0
- package/dist/solid/create-account-state.d.ts +4 -0
- package/dist/solid/create-account-state.d.ts.map +1 -0
- package/dist/solid/create-account-state.js +10 -0
- package/dist/solid/create-account-state.js.map +1 -0
- package/dist/solid/create-account-state.ssr.js +12 -0
- package/dist/solid/create-account-state.ssr.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 +83 -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 +43 -0
- package/dist/solid/create-solid-jazz-client.js.map +1 -0
- package/dist/solid/create-solid-jazz-client.ssr.js +46 -0
- package/dist/solid/create-solid-jazz-client.ssr.js.map +1 -0
- package/dist/solid/index.d.ts +20 -0
- package/dist/solid/index.d.ts.map +1 -0
- package/dist/solid/index.js +13 -0
- package/dist/solid/index.ssr.js +13 -0
- package/dist/solid/provider.d.ts +32 -0
- package/dist/solid/provider.d.ts.map +1 -0
- package/dist/solid/provider.js +63 -0
- package/dist/solid/provider.js.map +1 -0
- package/dist/solid/provider.ssr.js +64 -0
- package/dist/solid/provider.ssr.js.map +1 -0
- package/dist/solid/session.d.ts +22 -0
- package/dist/solid/session.d.ts.map +1 -0
- package/dist/solid/session.js +76 -0
- package/dist/solid/session.js.map +1 -0
- package/dist/solid/session.ssr.js +85 -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 +37 -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 +73 -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-local-first-auth.d.ts +11 -0
- package/dist/solid/use-local-first-auth.d.ts.map +1 -0
- package/dist/solid/use-local-first-auth.js +30 -0
- package/dist/solid/use-local-first-auth.js.map +1 -0
- package/dist/solid/use-local-first-auth.ssr.js +31 -0
- package/dist/solid/use-local-first-auth.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 +28 -0
- package/dist/solid/use-one.js.map +1 -0
- package/dist/solid/use-one.ssr.js +28 -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 +14 -0
- package/dist/solid/use-sync-status.js.map +1 -0
- package/dist/solid/use-sync-status.ssr.js +21 -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 +53 -13
- package/dist/subscriptions-orchestrator.d.ts.map +1 -1
- package/dist/subscriptions-orchestrator.js +295 -74
- package/dist/subscriptions-orchestrator.js.map +1 -1
- package/dist/svelte/JazzProvider.svelte +62 -0
- package/dist/svelte/JazzProvider.svelte.d.ts +13 -0
- package/dist/svelte/JazzProvider.svelte.d.ts.map +1 -0
- package/dist/svelte/JazzSessionClientProvider.svelte +42 -0
- package/dist/svelte/JazzSessionClientProvider.svelte.d.ts +13 -0
- package/dist/svelte/JazzSessionClientProvider.svelte.d.ts.map +1 -0
- package/dist/svelte/JazzSessionProvider.svelte +68 -0
- package/dist/svelte/JazzSessionProvider.svelte.d.ts +19 -0
- package/dist/svelte/JazzSessionProvider.svelte.d.ts.map +1 -0
- package/dist/svelte/JazzSvelteClientProvider.svelte +79 -0
- package/dist/svelte/JazzSvelteClientProvider.svelte.d.ts +14 -0
- package/dist/svelte/JazzSvelteClientProvider.svelte.d.ts.map +1 -0
- package/dist/svelte/JazzSvelteProvider.svelte +158 -27
- package/dist/svelte/JazzSvelteProvider.svelte.d.ts +3 -2
- package/dist/svelte/JazzSvelteProvider.svelte.d.ts.map +1 -1
- package/dist/svelte/account-state.d.ts +5 -0
- package/dist/svelte/account-state.d.ts.map +1 -0
- package/dist/svelte/account-state.js +9 -0
- package/dist/svelte/auth-state.d.ts +23 -0
- package/dist/svelte/auth-state.d.ts.map +1 -0
- package/dist/svelte/auth-state.js +16 -0
- package/dist/svelte/context.svelte.d.ts +23 -3
- package/dist/svelte/context.svelte.d.ts.map +1 -1
- package/dist/svelte/context.svelte.js +23 -3
- 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 +21 -5
- package/dist/svelte/index.d.ts.map +1 -1
- package/dist/svelte/index.js +14 -5
- package/dist/svelte/local-first-auth.svelte.d.ts +50 -0
- package/dist/svelte/local-first-auth.svelte.d.ts.map +1 -0
- package/dist/svelte/local-first-auth.svelte.js +58 -0
- 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 +11 -0
- package/dist/svelte/session-state.d.ts.map +1 -0
- package/dist/svelte/session-state.js +23 -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/client-migrations.d.ts +29 -0
- package/dist/testing/client-migrations.d.ts.map +1 -0
- package/dist/testing/client-migrations.js +34 -0
- package/dist/testing/client-migrations.js.map +1 -0
- package/dist/testing/fixtures/basic/schema.d.ts +11 -0
- package/dist/testing/fixtures/basic/schema.d.ts.map +1 -0
- package/dist/testing/fixtures/basic/schema.js +10 -0
- package/dist/testing/fixtures/basic/schema.js.map +1 -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/fixtures/with-defaults/schema.d.ts +385 -0
- package/dist/testing/fixtures/with-defaults/schema.d.ts.map +1 -0
- package/dist/testing/fixtures/with-defaults/schema.js +15 -0
- package/dist/testing/fixtures/with-defaults/schema.js.map +1 -0
- package/dist/testing/fixtures/with-enum-payload-defaults/schema.d.ts +4 -0
- package/dist/testing/fixtures/with-enum-payload-defaults/schema.d.ts.map +1 -0
- package/dist/testing/fixtures/with-enum-payload-defaults/schema.js +22 -0
- package/dist/testing/fixtures/with-enum-payload-defaults/schema.js.map +1 -0
- package/dist/testing/fixtures/with-enum-payload-required-null/schema.d.ts +4 -0
- package/dist/testing/fixtures/with-enum-payload-required-null/schema.d.ts.map +1 -0
- package/dist/testing/fixtures/with-enum-payload-required-null/schema.js +14 -0
- package/dist/testing/fixtures/with-enum-payload-required-null/schema.js.map +1 -0
- package/dist/testing/fixtures/with-enum-payload-wrong-tag/schema.d.ts +4 -0
- package/dist/testing/fixtures/with-enum-payload-wrong-tag/schema.d.ts.map +1 -0
- package/dist/testing/fixtures/with-enum-payload-wrong-tag/schema.js +14 -0
- package/dist/testing/fixtures/with-enum-payload-wrong-tag/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 +123 -0
- package/dist/testing/policy-test-app.d.ts.map +1 -0
- package/dist/testing/policy-test-app.js +215 -0
- package/dist/testing/policy-test-app.js.map +1 -0
- package/dist/testing/test-jazz.d.ts +106 -0
- package/dist/testing/test-jazz.d.ts.map +1 -0
- package/dist/testing/test-jazz.js +154 -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 +84 -0
- package/dist/thin/index.d.ts.map +1 -0
- package/dist/thin/index.js +204 -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 +84 -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 +224 -0
- package/dist/thin/thin-runtime.d.ts.map +1 -0
- package/dist/thin/thin-runtime.js +1190 -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 +729 -0
- package/dist/typed-app.d.ts.map +1 -0
- package/dist/typed-app.js +789 -0
- package/dist/typed-app.js.map +1 -0
- package/dist/vue/app.d.ts +76 -0
- package/dist/vue/app.d.ts.map +1 -0
- package/dist/vue/app.js +100 -0
- package/dist/vue/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 +19 -0
- package/dist/vue/index.d.ts.map +1 -0
- package/dist/vue/index.js +13 -0
- package/dist/vue/index.js.map +1 -0
- package/dist/vue/provider.d.ts +87 -0
- package/dist/vue/provider.d.ts.map +1 -0
- package/dist/vue/provider.js +225 -0
- package/dist/vue/provider.js.map +1 -0
- package/dist/vue/session.d.ts +39 -0
- package/dist/vue/session.d.ts.map +1 -0
- package/dist/vue/session.js +42 -0
- package/dist/vue/session.js.map +1 -0
- package/dist/vue/use-account-state.d.ts +5 -0
- package/dist/vue/use-account-state.d.ts.map +1 -0
- package/dist/vue/use-account-state.js +10 -0
- package/dist/vue/use-account-state.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-local-first-auth.d.ts +53 -0
- package/dist/vue/use-local-first-auth.d.ts.map +1 -0
- package/dist/vue/use-local-first-auth.js +67 -0
- package/dist/vue/use-local-first-auth.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 +8 -0
- package/dist/web/create-jazz-client.d.ts.map +1 -0
- package/dist/web/create-jazz-client.js +8 -0
- package/dist/web/create-jazz-client.js.map +1 -0
- package/dist/web/lazy-local-first.d.ts +8 -0
- package/dist/web/lazy-local-first.d.ts.map +1 -0
- package/dist/web/lazy-local-first.js +13 -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 +70 -0
- package/dist/where-operators.js.map +1 -0
- package/dist/window-client-storage.d.ts +33 -0
- package/dist/window-client-storage.d.ts.map +1 -0
- package/dist/window-client-storage.js +88 -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 +2033 -0
- package/dist/worker/jazz-broker-worker-core.js.map +1 -0
- package/dist/worker/jazz-broker-worker.d.ts +2 -0
- package/dist/worker/jazz-broker-worker.d.ts.map +1 -0
- package/dist/worker/jazz-broker-worker.js +23997 -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/package.json +248 -30
- 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/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 -844
- 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 -23
- package/dist/codegen/query-builder-generator.d.ts.map +0 -1
- package/dist/codegen/query-builder-generator.js +0 -325
- package/dist/codegen/query-builder-generator.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 -226
- package/dist/codegen/type-generator.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.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 -151
- 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 -84
- 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 -133
- 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 -150
- 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 -171
- 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 -985
- package/dist/runtime/cloud-server.integration.test.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 -1209
- 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 -364
- package/dist/runtime/row-transformer.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 -75
- 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 -212
- package/dist/runtime/value-converter.test.js.map +0 -1
- package/dist/runtime/worker-bridge.d.ts +0 -86
- package/dist/runtime/worker-bridge.d.ts.map +0 -1
- package/dist/runtime/worker-bridge.js +0 -250
- 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 -265
- 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 -194
- 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/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 -51
- 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 -154
- 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 -176
- 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/worker/jazz-worker.d.ts +0 -9
- package/dist/worker/jazz-worker.d.ts.map +0 -1
- package/dist/worker/jazz-worker.js +0 -516
- package/dist/worker/jazz-worker.js.map +0 -1
- package/dist/worker/jazz-worker.ts +0 -581
- 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
|
@@ -0,0 +1,789 @@
|
|
|
1
|
+
import { historyTableName, resolveQueryTable } from "./runtime/history-relation.js";
|
|
2
|
+
import { assertRelationshipDeclaration } from "./relationships.js";
|
|
3
|
+
import { resolveQueryOutputTable } from "./runtime/query-output-table.js";
|
|
4
|
+
import { columnTransformDependencies, validateTransformDependencies, } from "./runtime/column-transforms.js";
|
|
5
|
+
import { sha256 } from "@noble/hashes/sha2.js";
|
|
6
|
+
import { bytesToHex } from "@noble/hashes/utils.js";
|
|
7
|
+
import { hasExternalProvenanceNameAllowance, isComputedColumn } from "./dsl.js";
|
|
8
|
+
import { schemaToWasm } from "./codegen/schema-reader.js";
|
|
9
|
+
import { shipMigrations } from "./runtime/client-migrations.js";
|
|
10
|
+
import { magicColumnType, assertUserTableColumnNameAllowed, } from "./magic-columns.js";
|
|
11
|
+
import { assertSchemaNameAllowed } from "./schema-name.js";
|
|
12
|
+
import { WHERE_OPERATORS } from "./where-operators.js";
|
|
13
|
+
// Wrap table columns so we can hang chained modifiers like .indexOnly(...) off tables
|
|
14
|
+
// without changing the column-level schema representation the runtime uses today.
|
|
15
|
+
export class DefinedTable {
|
|
16
|
+
columns;
|
|
17
|
+
relations;
|
|
18
|
+
indexedColumns;
|
|
19
|
+
branchColumns;
|
|
20
|
+
compositeIndexes;
|
|
21
|
+
historyRetention;
|
|
22
|
+
__jazzTableDefinition = true;
|
|
23
|
+
constructor(columns, relations, indexedColumns, branchColumns, compositeIndexes, historyRetention) {
|
|
24
|
+
this.columns = columns;
|
|
25
|
+
this.relations = relations;
|
|
26
|
+
this.indexedColumns = indexedColumns;
|
|
27
|
+
this.branchColumns = branchColumns;
|
|
28
|
+
this.compositeIndexes = compositeIndexes;
|
|
29
|
+
this.historyRetention = historyRetention;
|
|
30
|
+
validateTransformDependencies(columns);
|
|
31
|
+
for (const column of Object.keys(columns))
|
|
32
|
+
assertUserTableColumnNameAllowed(column);
|
|
33
|
+
}
|
|
34
|
+
indexOnly(columns) {
|
|
35
|
+
const normalizedColumns = [...columns];
|
|
36
|
+
for (const column of normalizedColumns) {
|
|
37
|
+
if (!(column in this.columns) || isComputedColumn(this.columns[column])) {
|
|
38
|
+
throw new Error(`table.indexOnly(...) references unknown column "${column}".`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return new DefinedTable(this.columns, this.relations, normalizedColumns, this.branchColumns, this.compositeIndexes, this.historyRetention);
|
|
42
|
+
}
|
|
43
|
+
compositeIndex(columns) {
|
|
44
|
+
if (new Set(columns).size !== columns.length ||
|
|
45
|
+
columns.some((column) => !(column in this.columns) || isComputedColumn(this.columns[column]))) {
|
|
46
|
+
throw new Error("table.compositeIndex(...) requires distinct declared columns.");
|
|
47
|
+
}
|
|
48
|
+
const key = JSON.stringify(columns);
|
|
49
|
+
if ((this.compositeIndexes ?? []).some((existing) => JSON.stringify(existing) === key)) {
|
|
50
|
+
throw new Error("table.compositeIndex(...) declares the same index twice.");
|
|
51
|
+
}
|
|
52
|
+
return new DefinedTable(this.columns, this.relations, this.indexedColumns, this.branchColumns, [...(this.compositeIndexes ?? []), [...columns]], this.historyRetention);
|
|
53
|
+
}
|
|
54
|
+
branchBy(columns) {
|
|
55
|
+
const normalizedColumns = (Array.isArray(columns) ? [...columns] : [columns]);
|
|
56
|
+
for (const column of normalizedColumns) {
|
|
57
|
+
if (!(column in this.columns) || isComputedColumn(this.columns[column])) {
|
|
58
|
+
throw new Error(`table.branchBy(...) references unknown column "${column}".`);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return new DefinedTable(this.columns, this.relations, this.indexedColumns, normalizedColumns, this.compositeIndexes, this.historyRetention);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Keep only each row's latest version, for state that is overwritten
|
|
65
|
+
* often, like cursors and presence. Older versions are dropped, so the
|
|
66
|
+
* table cannot be read through history, snapshots or branches, and it
|
|
67
|
+
* cannot have text-merging columns.
|
|
68
|
+
*/
|
|
69
|
+
history(retention) {
|
|
70
|
+
if (retention !== "latest") {
|
|
71
|
+
throw new Error(`table.history(...) supports only "latest", not ${JSON.stringify(retention)}.`);
|
|
72
|
+
}
|
|
73
|
+
return new DefinedTable(this.columns, this.relations, this.indexedColumns, this.branchColumns, this.compositeIndexes, retention);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
export function defineTable(columns, fields, ..._validation) {
|
|
77
|
+
if (!fields || typeof fields !== "object" || Array.isArray(fields))
|
|
78
|
+
throw new Error("s.table(columns, fields) requires a relationship map, optionally containing computed fields; use {} for no fields.");
|
|
79
|
+
let completeColumns = columns;
|
|
80
|
+
const relations = {};
|
|
81
|
+
const targets = new Map();
|
|
82
|
+
for (const [name, relation] of Object.entries(fields)) {
|
|
83
|
+
const computed = relation && typeof relation === "object" && "_computed" in relation;
|
|
84
|
+
if (!name ||
|
|
85
|
+
["__proto__", "constructor", "prototype"].includes(name) ||
|
|
86
|
+
name.startsWith("$") ||
|
|
87
|
+
name === "id" ||
|
|
88
|
+
Object.hasOwn(columns, name))
|
|
89
|
+
throw new Error(`${computed ? "Computed field" : "Relationship"} "${name}" collides with a column.`);
|
|
90
|
+
if (computed) {
|
|
91
|
+
assertUserTableColumnNameAllowed(name);
|
|
92
|
+
if (completeColumns === columns)
|
|
93
|
+
completeColumns = { ...columns };
|
|
94
|
+
completeColumns[name] = {
|
|
95
|
+
_computed: {
|
|
96
|
+
...relation._computed,
|
|
97
|
+
rowColumns: Object.freeze(["id", ...Object.keys(columns)]),
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
assertRelationshipDeclaration(relation, name);
|
|
103
|
+
relations[name] = relation;
|
|
104
|
+
if (relation.kind === "forward") {
|
|
105
|
+
const previous = targets.get(relation.column);
|
|
106
|
+
if (previous && previous !== relation.table)
|
|
107
|
+
throw new Error(`Conflicting relationship targets for column "${relation.column}".`);
|
|
108
|
+
targets.set(relation.column, relation.table);
|
|
109
|
+
const builder = columns[relation.column];
|
|
110
|
+
const column = Object.hasOwn(columns, relation.column) && builder && !isComputedColumn(builder)
|
|
111
|
+
? builder._build(relation.column)
|
|
112
|
+
: undefined;
|
|
113
|
+
if (!column)
|
|
114
|
+
throw new Error(`Relationship "${name}" references unknown column "${relation.column}".`);
|
|
115
|
+
if (typeof column.sqlType === "object" &&
|
|
116
|
+
column.sqlType.kind === "ARRAY" &&
|
|
117
|
+
typeof column.sqlType.element === "object" &&
|
|
118
|
+
column.sqlType.element.kind === "ARRAY")
|
|
119
|
+
throw new Error(`Relationship "${name}" cannot use a nested reference array column; "${relation.column}" must be a UUID or UUID[] column.`);
|
|
120
|
+
if (column.sqlType !== "UUID" &&
|
|
121
|
+
!(typeof column.sqlType === "object" &&
|
|
122
|
+
column.sqlType.kind === "ARRAY" &&
|
|
123
|
+
column.sqlType.element === "UUID"))
|
|
124
|
+
throw new Error(`Relationship "${name}" requires a UUID or UUID[] column; "${relation.column}" is not one.`);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return new DefinedTable(completeColumns, relations);
|
|
128
|
+
}
|
|
129
|
+
/** Declare a virtual, read-only field in s.table's second argument. */
|
|
130
|
+
export function defineComputed(compute) {
|
|
131
|
+
if (typeof compute !== "function")
|
|
132
|
+
throw new TypeError("s.computed(...) requires a synchronous callback.");
|
|
133
|
+
return Object.freeze({ _computed: Object.freeze({ compute }) });
|
|
134
|
+
}
|
|
135
|
+
function cloneBuiltCondition(condition) {
|
|
136
|
+
return { ...condition };
|
|
137
|
+
}
|
|
138
|
+
function queryBuilderJsonReplacer(_key, value) {
|
|
139
|
+
if (value instanceof Uint8Array)
|
|
140
|
+
return [...value];
|
|
141
|
+
return typeof value === "bigint" ? value.toString() : value;
|
|
142
|
+
}
|
|
143
|
+
function cloneBuiltRelation(relation) {
|
|
144
|
+
return {
|
|
145
|
+
...(relation.table ? { table: relation.table } : {}),
|
|
146
|
+
...(relation.conditions ? { conditions: relation.conditions.map(cloneBuiltCondition) } : {}),
|
|
147
|
+
...(relation.hops ? { hops: [...relation.hops] } : {}),
|
|
148
|
+
...(relation.orderBy
|
|
149
|
+
? {
|
|
150
|
+
orderBy: relation.orderBy.map(([key, direction]) => [key, direction]),
|
|
151
|
+
}
|
|
152
|
+
: {}),
|
|
153
|
+
...(relation.limit !== undefined ? { limit: relation.limit } : {}),
|
|
154
|
+
...(relation.offset !== undefined ? { offset: relation.offset } : {}),
|
|
155
|
+
...(relation.gather ? { gather: cloneBuiltGather(relation.gather) } : {}),
|
|
156
|
+
...(relation.union
|
|
157
|
+
? {
|
|
158
|
+
union: {
|
|
159
|
+
inputs: relation.union.inputs.map((arm) => ({
|
|
160
|
+
label: arm.label,
|
|
161
|
+
input: cloneBuiltRelation(arm.input),
|
|
162
|
+
})),
|
|
163
|
+
},
|
|
164
|
+
}
|
|
165
|
+
: {}),
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
function cloneBuiltGather(gather) {
|
|
169
|
+
return {
|
|
170
|
+
...(gather.seed ? { seed: cloneBuiltRelation(gather.seed) } : {}),
|
|
171
|
+
max_depth: gather.max_depth,
|
|
172
|
+
step_table: gather.step_table,
|
|
173
|
+
step_current_column: gather.step_current_column,
|
|
174
|
+
step_conditions: gather.step_conditions.map(cloneBuiltCondition),
|
|
175
|
+
step_hops: [...gather.step_hops],
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
export class TypedTableQueryBuilder {
|
|
179
|
+
_table;
|
|
180
|
+
_schema;
|
|
181
|
+
_conditions = [];
|
|
182
|
+
_includes = {};
|
|
183
|
+
_requireIncludes = false;
|
|
184
|
+
_select;
|
|
185
|
+
_partialSelect;
|
|
186
|
+
_orderBys = [];
|
|
187
|
+
_limitVal;
|
|
188
|
+
_offsetVal;
|
|
189
|
+
_includeDeleted = false;
|
|
190
|
+
_hops = [];
|
|
191
|
+
_gatherVal;
|
|
192
|
+
_unionVal;
|
|
193
|
+
_columnTransforms;
|
|
194
|
+
_columnTransformsByTable;
|
|
195
|
+
constructor(table, schema, columnTransforms, columnTransformsByTable) {
|
|
196
|
+
this._table = table;
|
|
197
|
+
this._schema = schema;
|
|
198
|
+
this._columnTransforms = columnTransforms;
|
|
199
|
+
this._columnTransformsByTable =
|
|
200
|
+
columnTransformsByTable ?? (columnTransforms ? { [table]: columnTransforms } : undefined);
|
|
201
|
+
}
|
|
202
|
+
where(conditions) {
|
|
203
|
+
if (this._unionVal) {
|
|
204
|
+
throw new Error("union(...) currently only supports gather(...) in MVP.");
|
|
205
|
+
}
|
|
206
|
+
const clone = this._clone();
|
|
207
|
+
clone._conditions.push(...this._whereConditions(conditions));
|
|
208
|
+
return clone;
|
|
209
|
+
}
|
|
210
|
+
select(...selection) {
|
|
211
|
+
this._rejectUnsupportedUnionModifier("select(...)");
|
|
212
|
+
const clone = this._clone();
|
|
213
|
+
const first = selection[0];
|
|
214
|
+
if (typeof first === "object" && first !== null) {
|
|
215
|
+
const transforms = this._outputColumnTransforms();
|
|
216
|
+
for (const column of Object.keys(first))
|
|
217
|
+
if (transforms?.[column]?.computed)
|
|
218
|
+
throw new TypeError(`Computed field "${column}" cannot have a stored partial selection.`);
|
|
219
|
+
}
|
|
220
|
+
clone._select =
|
|
221
|
+
typeof first === "object" && first !== null
|
|
222
|
+
? selection.length > 1
|
|
223
|
+
? [...Object.keys(first), ...selection.slice(1).map(String)]
|
|
224
|
+
: { ...first }
|
|
225
|
+
: selection.map((column) => String(column));
|
|
226
|
+
clone._partialSelect =
|
|
227
|
+
typeof first === "object" && first !== null && selection.length > 1
|
|
228
|
+
? { ...first }
|
|
229
|
+
: undefined;
|
|
230
|
+
return clone;
|
|
231
|
+
}
|
|
232
|
+
include(relations) {
|
|
233
|
+
this._rejectUnsupportedUnionModifier("include(...)");
|
|
234
|
+
const clone = this._clone();
|
|
235
|
+
clone._includes = { ...this._includes, ...relations };
|
|
236
|
+
return clone;
|
|
237
|
+
}
|
|
238
|
+
requireIncludes() {
|
|
239
|
+
this._rejectUnsupportedUnionModifier("requireIncludes()");
|
|
240
|
+
const clone = this._clone();
|
|
241
|
+
clone._requireIncludes = true;
|
|
242
|
+
return clone;
|
|
243
|
+
}
|
|
244
|
+
orderBy(column, direction = "asc") {
|
|
245
|
+
if (this._outputColumnTransforms()?.[column]?.computed)
|
|
246
|
+
throw new TypeError(`Computed field "${String(column)}" cannot be ordered in a stored query.`);
|
|
247
|
+
const clone = this._clone();
|
|
248
|
+
clone._orderBys.push([column, direction]);
|
|
249
|
+
return clone;
|
|
250
|
+
}
|
|
251
|
+
limit(n) {
|
|
252
|
+
const clone = this._clone();
|
|
253
|
+
clone._limitVal = n;
|
|
254
|
+
return clone;
|
|
255
|
+
}
|
|
256
|
+
offset(n) {
|
|
257
|
+
const clone = this._clone();
|
|
258
|
+
clone._offsetVal = n;
|
|
259
|
+
return clone;
|
|
260
|
+
}
|
|
261
|
+
includeDeleted() {
|
|
262
|
+
this._rejectUnsupportedUnionModifier("includeDeleted()");
|
|
263
|
+
const clone = this._clone();
|
|
264
|
+
clone._includeDeleted = true;
|
|
265
|
+
return clone;
|
|
266
|
+
}
|
|
267
|
+
hopTo(relation) {
|
|
268
|
+
if (this._unionVal) {
|
|
269
|
+
throw new Error("union(...) currently only supports gather(...) in MVP.");
|
|
270
|
+
}
|
|
271
|
+
const clone = this._clone();
|
|
272
|
+
clone._hops.push(relation);
|
|
273
|
+
// The type now represents the destination table while `_table` at runtime
|
|
274
|
+
// is still the source — the destination is encoded in `_hops` and resolved
|
|
275
|
+
// by the query adapter. Aligning runtime `_table` with the type is a
|
|
276
|
+
// separate change (it touches `_build()` and hop lowering) and is out of
|
|
277
|
+
// scope here; `_table` is internal and not part of the public surface.
|
|
278
|
+
return clone;
|
|
279
|
+
}
|
|
280
|
+
gather(options) {
|
|
281
|
+
if (typeof options.step !== "function") {
|
|
282
|
+
throw new Error("gather(...) requires step callback.");
|
|
283
|
+
}
|
|
284
|
+
const maxDepth = options.maxDepth ?? 10;
|
|
285
|
+
if (!Number.isInteger(maxDepth) || maxDepth < 0) {
|
|
286
|
+
throw new Error("gather(...) maxDepth must be a non-negative integer.");
|
|
287
|
+
}
|
|
288
|
+
if (Object.keys(this._includes).length > 0) {
|
|
289
|
+
throw new Error("gather(...) does not support include(...) in MVP.");
|
|
290
|
+
}
|
|
291
|
+
if (options.start && this._unionVal) {
|
|
292
|
+
throw new Error("gather(...) start does not support union(...) seeds in MVP.");
|
|
293
|
+
}
|
|
294
|
+
const currentToken = "__jazz_gather_current__";
|
|
295
|
+
const stepOutput = options.step({ current: currentToken });
|
|
296
|
+
if (!stepOutput ||
|
|
297
|
+
typeof stepOutput !== "object" ||
|
|
298
|
+
typeof stepOutput._build !== "function") {
|
|
299
|
+
throw new Error("gather(...) step must return a query expression built from app.<table>.");
|
|
300
|
+
}
|
|
301
|
+
const stepBuilt = JSON.parse(stepOutput._build());
|
|
302
|
+
if (typeof stepBuilt.table !== "string" || !stepBuilt.table) {
|
|
303
|
+
throw new Error("gather(...) step query is missing table metadata.");
|
|
304
|
+
}
|
|
305
|
+
if (!Array.isArray(stepBuilt.conditions)) {
|
|
306
|
+
throw new Error("gather(...) step query is missing condition metadata.");
|
|
307
|
+
}
|
|
308
|
+
const stepHops = Array.isArray(stepBuilt.hops)
|
|
309
|
+
? stepBuilt.hops.filter((hop) => typeof hop === "string")
|
|
310
|
+
: [];
|
|
311
|
+
if (stepHops.length !== 1) {
|
|
312
|
+
throw new Error("gather(...) step must include exactly one hopTo(...).");
|
|
313
|
+
}
|
|
314
|
+
const currentConditions = stepBuilt.conditions.filter((condition) => condition.op === "eq" && condition.value === currentToken);
|
|
315
|
+
if (currentConditions.length !== 1) {
|
|
316
|
+
throw new Error("gather(...) step must include exactly one where condition bound to current.");
|
|
317
|
+
}
|
|
318
|
+
const currentCondition = currentConditions[0];
|
|
319
|
+
const stepConditions = stepBuilt.conditions.filter((condition) => !(condition.op === "eq" && condition.value === currentToken));
|
|
320
|
+
const seedSource = options.start === undefined ? this : this.where(options.start);
|
|
321
|
+
// The seed's own filters travel in an explicit seed: the gather's
|
|
322
|
+
// top-level conditions filter its output.
|
|
323
|
+
const needsExplicitSeed = this._unionVal !== undefined ||
|
|
324
|
+
this._hops.length > 0 ||
|
|
325
|
+
this._gatherVal !== undefined ||
|
|
326
|
+
seedSource._conditions.length > 0;
|
|
327
|
+
const clone = needsExplicitSeed
|
|
328
|
+
? this._clone()
|
|
329
|
+
: seedSource._clone();
|
|
330
|
+
clone._conditions = [];
|
|
331
|
+
clone._hops = [];
|
|
332
|
+
const seed = needsExplicitSeed ? seedSource._serializeRelation() : undefined;
|
|
333
|
+
if (seed) {
|
|
334
|
+
// These modifiers remain on the gathered result. Keep only windows
|
|
335
|
+
// nested inside the seed (such as individual UNION arms).
|
|
336
|
+
delete seed.orderBy;
|
|
337
|
+
delete seed.limit;
|
|
338
|
+
delete seed.offset;
|
|
339
|
+
}
|
|
340
|
+
clone._gatherVal = {
|
|
341
|
+
...(seed ? { seed } : {}),
|
|
342
|
+
max_depth: maxDepth,
|
|
343
|
+
step_table: stepBuilt.table,
|
|
344
|
+
step_current_column: currentCondition.column,
|
|
345
|
+
step_conditions: stepConditions,
|
|
346
|
+
step_hops: stepHops,
|
|
347
|
+
};
|
|
348
|
+
clone._unionVal = undefined;
|
|
349
|
+
return clone;
|
|
350
|
+
}
|
|
351
|
+
_build() {
|
|
352
|
+
return JSON.stringify({
|
|
353
|
+
table: this._table,
|
|
354
|
+
conditions: this._conditions,
|
|
355
|
+
includes: this._includes,
|
|
356
|
+
__jazz_requireIncludes: this._requireIncludes || undefined,
|
|
357
|
+
select: this._select,
|
|
358
|
+
...(this._partialSelect ? { partialSelect: this._partialSelect } : {}),
|
|
359
|
+
orderBy: this._orderBys,
|
|
360
|
+
limit: this._limitVal,
|
|
361
|
+
offset: this._offsetVal,
|
|
362
|
+
includeDeleted: this._includeDeleted || undefined,
|
|
363
|
+
hops: this._hops,
|
|
364
|
+
gather: this._gatherVal,
|
|
365
|
+
...(this._unionVal ? { union: cloneBuiltRelation(this._unionVal).union } : {}),
|
|
366
|
+
}, queryBuilderJsonReplacer);
|
|
367
|
+
}
|
|
368
|
+
toJSON() {
|
|
369
|
+
return JSON.parse(this._build());
|
|
370
|
+
}
|
|
371
|
+
_clone() {
|
|
372
|
+
const clone = new TypedTableQueryBuilder(this._table, this._schema, this._columnTransforms, this._columnTransformsByTable);
|
|
373
|
+
clone._conditions = [...this._conditions];
|
|
374
|
+
clone._includes = { ...this._includes };
|
|
375
|
+
clone._requireIncludes = this._requireIncludes;
|
|
376
|
+
clone._select = Array.isArray(this._select)
|
|
377
|
+
? [...this._select]
|
|
378
|
+
: this._select
|
|
379
|
+
? { ...this._select }
|
|
380
|
+
: undefined;
|
|
381
|
+
clone._orderBys = [...this._orderBys];
|
|
382
|
+
clone._partialSelect = this._partialSelect ? { ...this._partialSelect } : undefined;
|
|
383
|
+
clone._limitVal = this._limitVal;
|
|
384
|
+
clone._offsetVal = this._offsetVal;
|
|
385
|
+
clone._includeDeleted = this._includeDeleted;
|
|
386
|
+
clone._hops = [...this._hops];
|
|
387
|
+
clone._gatherVal = this._gatherVal ? cloneBuiltGather(this._gatherVal) : undefined;
|
|
388
|
+
clone._unionVal = this._unionVal ? cloneBuiltRelation(this._unionVal) : undefined;
|
|
389
|
+
return clone;
|
|
390
|
+
}
|
|
391
|
+
_outputColumnTransforms() {
|
|
392
|
+
if (!this._columnTransformsByTable)
|
|
393
|
+
return this._columnTransforms;
|
|
394
|
+
if (!this._hops.length && !this._gatherVal?.seed && !this._unionVal)
|
|
395
|
+
return this._columnTransforms;
|
|
396
|
+
return this._columnTransformsByTable[resolveQueryOutputTable(this._schema, this._serializeRelation())];
|
|
397
|
+
}
|
|
398
|
+
_whereConditions(conditions) {
|
|
399
|
+
const built = [];
|
|
400
|
+
const tableSchema = resolveQueryTable(this._schema, this._table);
|
|
401
|
+
const transforms = this._outputColumnTransforms();
|
|
402
|
+
for (const [key, value] of Object.entries(conditions)) {
|
|
403
|
+
if (transforms?.[key]?.computed)
|
|
404
|
+
throw new TypeError(`Computed field "${key}" cannot be filtered in a stored query.`);
|
|
405
|
+
if (value === undefined)
|
|
406
|
+
continue;
|
|
407
|
+
const declaredColumn = tableSchema?.columns.find((column) => column.name === key);
|
|
408
|
+
const columnType = key === "id" ? { type: "Uuid" } : (magicColumnType(key) ?? declaredColumn?.column_type);
|
|
409
|
+
const isObjectValue = typeof value === "object" && value !== null && !Array.isArray(value);
|
|
410
|
+
const hasRecognizedOperator = isObjectValue
|
|
411
|
+
? Object.keys(value).some((op) => WHERE_OPERATORS.includes(op))
|
|
412
|
+
: false;
|
|
413
|
+
const isDirectObjectValue = isObjectValue &&
|
|
414
|
+
((columnType?.type === "Json" && !hasRecognizedOperator) ||
|
|
415
|
+
(columnType?.type === "Timestamp" && value instanceof Date) ||
|
|
416
|
+
(columnType?.type === "Bytea" && value instanceof Uint8Array) ||
|
|
417
|
+
(columnType?.type === "Row" &&
|
|
418
|
+
columnType.columns.some((column) => Object.hasOwn(value, column.name))));
|
|
419
|
+
if (isObjectValue && !isDirectObjectValue) {
|
|
420
|
+
for (const [op, opValue] of Object.entries(value)) {
|
|
421
|
+
if (opValue !== undefined) {
|
|
422
|
+
built.push({ column: key, op, value: opValue });
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
else {
|
|
427
|
+
built.push({ column: key, op: "eq", value });
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
return built;
|
|
431
|
+
}
|
|
432
|
+
_rejectUnsupportedUnionModifier(modifier) {
|
|
433
|
+
if (this._unionVal) {
|
|
434
|
+
throw new Error(`union(...) currently supports only orderBy(...), offset(...), limit(...), and gather(...); ${modifier} is not supported.`);
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
_serializeRelation() {
|
|
438
|
+
const output = {
|
|
439
|
+
...(this._orderBys.length
|
|
440
|
+
? {
|
|
441
|
+
orderBy: this._orderBys.map(([key, direction]) => [key, direction]),
|
|
442
|
+
}
|
|
443
|
+
: {}),
|
|
444
|
+
...(this._limitVal !== undefined ? { limit: this._limitVal } : {}),
|
|
445
|
+
...(this._offsetVal !== undefined ? { offset: this._offsetVal } : {}),
|
|
446
|
+
};
|
|
447
|
+
if (this._unionVal) {
|
|
448
|
+
return { ...cloneBuiltRelation(this._unionVal), ...output };
|
|
449
|
+
}
|
|
450
|
+
return {
|
|
451
|
+
table: this._table,
|
|
452
|
+
conditions: this._conditions.map(cloneBuiltCondition),
|
|
453
|
+
hops: [...this._hops],
|
|
454
|
+
...(this._gatherVal ? { gather: cloneBuiltGather(this._gatherVal) } : {}),
|
|
455
|
+
...output,
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
export function unwrapTableDefinition(definition) {
|
|
460
|
+
if (definition instanceof DefinedTable) {
|
|
461
|
+
return definition.columns;
|
|
462
|
+
}
|
|
463
|
+
if (typeof definition === "object" && definition !== null) {
|
|
464
|
+
const maybeDefinedTable = definition;
|
|
465
|
+
if (maybeDefinedTable.__jazzTableDefinition === true && maybeDefinedTable.columns) {
|
|
466
|
+
return maybeDefinedTable.columns;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
return definition;
|
|
470
|
+
}
|
|
471
|
+
function tableIndexedColumns(definition) {
|
|
472
|
+
if (definition instanceof DefinedTable) {
|
|
473
|
+
return definition.indexedColumns ? [...definition.indexedColumns] : undefined;
|
|
474
|
+
}
|
|
475
|
+
if (typeof definition === "object" && definition !== null) {
|
|
476
|
+
const maybeDefinedTable = definition;
|
|
477
|
+
if (maybeDefinedTable.__jazzTableDefinition === true) {
|
|
478
|
+
return maybeDefinedTable.indexedColumns ? [...maybeDefinedTable.indexedColumns] : undefined;
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
return undefined;
|
|
482
|
+
}
|
|
483
|
+
function tableCompositeIndexes(definition) {
|
|
484
|
+
if (typeof definition === "object" &&
|
|
485
|
+
definition !== null &&
|
|
486
|
+
definition.__jazzTableDefinition === true) {
|
|
487
|
+
const indexes = definition.compositeIndexes;
|
|
488
|
+
return indexes?.map((columns) => [...columns]);
|
|
489
|
+
}
|
|
490
|
+
return undefined;
|
|
491
|
+
}
|
|
492
|
+
function tableBranchColumns(definition) {
|
|
493
|
+
if (definition instanceof DefinedTable) {
|
|
494
|
+
return definition.branchColumns ? [...definition.branchColumns] : undefined;
|
|
495
|
+
}
|
|
496
|
+
if (typeof definition === "object" && definition !== null) {
|
|
497
|
+
const maybeDefinedTable = definition;
|
|
498
|
+
if (maybeDefinedTable.__jazzTableDefinition === true) {
|
|
499
|
+
return maybeDefinedTable.branchColumns ? [...maybeDefinedTable.branchColumns] : undefined;
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
return undefined;
|
|
503
|
+
}
|
|
504
|
+
function tableHistory(definition) {
|
|
505
|
+
if (typeof definition === "object" && definition !== null) {
|
|
506
|
+
const maybeDefinedTable = definition;
|
|
507
|
+
if (maybeDefinedTable.__jazzTableDefinition === true) {
|
|
508
|
+
return maybeDefinedTable.historyRetention;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
return undefined;
|
|
512
|
+
}
|
|
513
|
+
function tableRelationships(definition) {
|
|
514
|
+
if (typeof definition === "object" &&
|
|
515
|
+
definition !== null &&
|
|
516
|
+
definition.__jazzTableDefinition === true) {
|
|
517
|
+
const relations = definition.relations;
|
|
518
|
+
if (!relations || typeof relations !== "object" || Array.isArray(relations))
|
|
519
|
+
throw new Error("s.table(columns, relations) requires a relationship map; use {} for no relationships.");
|
|
520
|
+
return relations;
|
|
521
|
+
}
|
|
522
|
+
return {};
|
|
523
|
+
}
|
|
524
|
+
function definitionToColumns(definition) {
|
|
525
|
+
const columnsDefinition = unwrapTableDefinition(definition);
|
|
526
|
+
const columns = [];
|
|
527
|
+
for (const [columnName, builder] of Object.entries(columnsDefinition)) {
|
|
528
|
+
assertUserTableColumnNameAllowed(columnName);
|
|
529
|
+
if (isComputedColumn(builder))
|
|
530
|
+
continue;
|
|
531
|
+
const column = builder._build(columnName);
|
|
532
|
+
if (hasExternalProvenanceNameAllowance(builder))
|
|
533
|
+
column.allowExternalProvenanceName = true;
|
|
534
|
+
columns.push(column);
|
|
535
|
+
}
|
|
536
|
+
for (const [name, relation] of Object.entries(tableRelationships(definition))) {
|
|
537
|
+
if (relation.kind !== "forward")
|
|
538
|
+
continue;
|
|
539
|
+
const column = columns.find((candidate) => candidate.name === relation.column);
|
|
540
|
+
if (!column)
|
|
541
|
+
throw new Error(`Relationship "${name}" references unknown column "${relation.column}".`);
|
|
542
|
+
if (column.references && column.references !== relation.table)
|
|
543
|
+
throw new Error(`Conflicting relationship targets for column "${relation.column}".`);
|
|
544
|
+
column.references = relation.table;
|
|
545
|
+
}
|
|
546
|
+
return columns;
|
|
547
|
+
}
|
|
548
|
+
function columnTransformsForTable(definition) {
|
|
549
|
+
if (!definition) {
|
|
550
|
+
return undefined;
|
|
551
|
+
}
|
|
552
|
+
const columnsDefinition = unwrapTableDefinition(definition);
|
|
553
|
+
const transforms = Object.create(null);
|
|
554
|
+
validateTransformDependencies(columnsDefinition);
|
|
555
|
+
for (const [columnName, builder] of Object.entries(columnsDefinition)) {
|
|
556
|
+
if (isComputedColumn(builder)) {
|
|
557
|
+
transforms[columnName] = {
|
|
558
|
+
computed: true,
|
|
559
|
+
rowColumns: builder._computed.rowColumns,
|
|
560
|
+
from: (_value, dependencies) => builder._computed.compute(dependencies),
|
|
561
|
+
to: () => {
|
|
562
|
+
throw new TypeError(`Computed field "${columnName}" is read-only.`);
|
|
563
|
+
},
|
|
564
|
+
};
|
|
565
|
+
}
|
|
566
|
+
else if (builder._transform) {
|
|
567
|
+
transforms[columnName] = {
|
|
568
|
+
...builder._transform,
|
|
569
|
+
...(builder._transform.dependsOn
|
|
570
|
+
? { dependsOn: Object.freeze([...builder._transform.dependsOn]) }
|
|
571
|
+
: {}),
|
|
572
|
+
};
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
if (Object.keys(transforms).length === 0)
|
|
576
|
+
return undefined;
|
|
577
|
+
columnTransformDependencies(transforms);
|
|
578
|
+
return transforms;
|
|
579
|
+
}
|
|
580
|
+
function columnTransformsForSchema(definition) {
|
|
581
|
+
let registry;
|
|
582
|
+
for (const [tableName, tableDefinition] of Object.entries(definition)) {
|
|
583
|
+
const transforms = columnTransformsForTable(tableDefinition);
|
|
584
|
+
if (transforms)
|
|
585
|
+
(registry ??= Object.create(null))[tableName] = transforms;
|
|
586
|
+
}
|
|
587
|
+
return registry;
|
|
588
|
+
}
|
|
589
|
+
export function definitionToSchema(definition) {
|
|
590
|
+
return {
|
|
591
|
+
tables: Object.entries(definition).map(([tableName, tableDefinition]) => {
|
|
592
|
+
assertSchemaNameAllowed(tableName);
|
|
593
|
+
const indexedColumns = tableIndexedColumns(tableDefinition);
|
|
594
|
+
const compositeIndexes = tableCompositeIndexes(tableDefinition);
|
|
595
|
+
const branchColumns = tableBranchColumns(tableDefinition);
|
|
596
|
+
const history = tableHistory(tableDefinition);
|
|
597
|
+
return {
|
|
598
|
+
name: tableName,
|
|
599
|
+
columns: definitionToColumns(tableDefinition),
|
|
600
|
+
relations: tableRelationships(tableDefinition),
|
|
601
|
+
...(indexedColumns ? { indexedColumns } : {}),
|
|
602
|
+
...(compositeIndexes ? { compositeIndexes } : {}),
|
|
603
|
+
...(branchColumns ? { branchBy: branchColumns } : {}),
|
|
604
|
+
...(history ? { history } : {}),
|
|
605
|
+
};
|
|
606
|
+
}),
|
|
607
|
+
};
|
|
608
|
+
}
|
|
609
|
+
export function defineSchema(definition) {
|
|
610
|
+
for (const [tableName, tableDefinition] of Object.entries(definition)) {
|
|
611
|
+
assertSchemaNameAllowed(tableName);
|
|
612
|
+
for (const column of Object.keys(unwrapTableDefinition(tableDefinition))) {
|
|
613
|
+
assertUserTableColumnNameAllowed(column);
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
schemaToWasm(definitionToSchema(definition));
|
|
617
|
+
return definition;
|
|
618
|
+
}
|
|
619
|
+
export function defineApp(definition, options) {
|
|
620
|
+
const normalizedDefinition = definition;
|
|
621
|
+
const schema = definitionToSchema(normalizedDefinition);
|
|
622
|
+
const wasmSchema = schemaToWasm(schema);
|
|
623
|
+
shipMigrations(wasmSchema, options?.migrations);
|
|
624
|
+
return createAppForTables(Object.keys(normalizedDefinition), wasmSchema, normalizedDefinition, schema);
|
|
625
|
+
}
|
|
626
|
+
export function defineSliceableApp(definition, options) {
|
|
627
|
+
const normalizedDefinition = definition;
|
|
628
|
+
const schema = definitionToSchema(normalizedDefinition);
|
|
629
|
+
const wasmSchema = schemaToWasm(schema);
|
|
630
|
+
shipMigrations(wasmSchema, options?.migrations);
|
|
631
|
+
return {
|
|
632
|
+
wasmSchema,
|
|
633
|
+
slice(...tableNames) {
|
|
634
|
+
if (tableNames.length === 0) {
|
|
635
|
+
throw new Error("slice(...) requires at least one table name.");
|
|
636
|
+
}
|
|
637
|
+
for (const tableName of tableNames) {
|
|
638
|
+
assertSchemaNameAllowed(tableName);
|
|
639
|
+
if (!(tableName in normalizedDefinition)) {
|
|
640
|
+
throw new Error(`slice(...) references unknown table "${tableName}".`);
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
return createAppForTables(tableNames, wasmSchema, normalizedDefinition);
|
|
644
|
+
},
|
|
645
|
+
};
|
|
646
|
+
}
|
|
647
|
+
// The statically-registered app schema: the inspector host handle falls back to
|
|
648
|
+
// it before any client exists (e.g. a write-only page with no query yet). Set
|
|
649
|
+
// at defineApp time, so it does not depend on a connection being established.
|
|
650
|
+
// Last-defineApp-wins by design: a dev-only fallback, not a multi-app registry —
|
|
651
|
+
// pages defining several apps get the most recent one until a client exists.
|
|
652
|
+
let registeredWasmSchema;
|
|
653
|
+
/** The most recently defined app's WasmSchema, if any (used by the inspector). */
|
|
654
|
+
export function getRegisteredWasmSchema() {
|
|
655
|
+
return registeredWasmSchema;
|
|
656
|
+
}
|
|
657
|
+
function createAppForTables(tableNames, wasmSchema, definition, schemaAst) {
|
|
658
|
+
registeredWasmSchema = wasmSchema;
|
|
659
|
+
const columnTransformsByTable = definition ? columnTransformsForSchema(definition) : undefined;
|
|
660
|
+
const tables = {};
|
|
661
|
+
const history = {};
|
|
662
|
+
for (const tableName of tableNames) {
|
|
663
|
+
assertSchemaNameAllowed(tableName);
|
|
664
|
+
tables[tableName] = new TypedTableQueryBuilder(tableName, wasmSchema, columnTransformsByTable?.[tableName], columnTransformsByTable);
|
|
665
|
+
Object.defineProperty(history, tableName, {
|
|
666
|
+
enumerable: true,
|
|
667
|
+
get: () => new TypedTableQueryBuilder(historyTableName(tableName), wasmSchema, columnTransformsByTable?.[tableName], columnTransformsByTable),
|
|
668
|
+
});
|
|
669
|
+
}
|
|
670
|
+
return {
|
|
671
|
+
...tables,
|
|
672
|
+
$history: history,
|
|
673
|
+
union(relations) {
|
|
674
|
+
const arms = Array.isArray(relations)
|
|
675
|
+
? relations.map((relation) => ({
|
|
676
|
+
relation,
|
|
677
|
+
label: derivedUnionArmLabel(relation._serializeRelation()),
|
|
678
|
+
}))
|
|
679
|
+
: Object.entries(relations).map(([label, relation]) => ({ label, relation }));
|
|
680
|
+
if (arms.length === 0) {
|
|
681
|
+
throw new Error("union(...) requires at least one relation.");
|
|
682
|
+
}
|
|
683
|
+
const labels = new Set();
|
|
684
|
+
for (const { label } of arms) {
|
|
685
|
+
if (!label || utf8ByteLength(label) > 4096 || label.includes("\0") || labels.has(label)) {
|
|
686
|
+
throw new Error("union(...) arm labels must be 1..=4096 bytes, NUL-free, and unique; use named arms for duplicate relations.");
|
|
687
|
+
}
|
|
688
|
+
labels.add(label);
|
|
689
|
+
}
|
|
690
|
+
const first = arms[0].relation;
|
|
691
|
+
const builder = new TypedTableQueryBuilder(first._table, wasmSchema, first._columnTransforms, first._columnTransformsByTable);
|
|
692
|
+
builder._unionVal = {
|
|
693
|
+
union: {
|
|
694
|
+
inputs: arms.map(({ label, relation }) => ({
|
|
695
|
+
label,
|
|
696
|
+
input: relation._serializeRelation(),
|
|
697
|
+
})),
|
|
698
|
+
},
|
|
699
|
+
};
|
|
700
|
+
return builder;
|
|
701
|
+
},
|
|
702
|
+
wasmSchema,
|
|
703
|
+
schemaAst,
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
const utf8 = new TextEncoder();
|
|
707
|
+
function utf8ByteLength(value) {
|
|
708
|
+
return utf8.encode(value).byteLength;
|
|
709
|
+
}
|
|
710
|
+
function compareUtf8(left, right) {
|
|
711
|
+
const leftBytes = utf8.encode(left);
|
|
712
|
+
const rightBytes = utf8.encode(right);
|
|
713
|
+
const sharedLength = Math.min(leftBytes.length, rightBytes.length);
|
|
714
|
+
for (let index = 0; index < sharedLength; index += 1) {
|
|
715
|
+
const difference = leftBytes[index] - rightBytes[index];
|
|
716
|
+
if (difference !== 0)
|
|
717
|
+
return difference;
|
|
718
|
+
}
|
|
719
|
+
return leftBytes.length - rightBytes.length;
|
|
720
|
+
}
|
|
721
|
+
function derivedUnionArmLabel(relation) {
|
|
722
|
+
// Labels are public durable input and therefore have a fixed small bound.
|
|
723
|
+
// Hash the typed canonical relation instead of embedding JSON: Date, bigint
|
|
724
|
+
// and byte values have non-JSON semantics, and a large literal must not turn
|
|
725
|
+
// a valid array union into an overlong inferred label.
|
|
726
|
+
return `derived:${bytesToHex(sha256(utf8.encode(canonicalUnionRelation(relation))))}`;
|
|
727
|
+
}
|
|
728
|
+
function canonicalUnionRelation(relation) {
|
|
729
|
+
// jazz.sdk.union-arm-output.v1 extends only seeds with output modifiers.
|
|
730
|
+
// Existing unmodified seeds retain their exact canonical bytes and labels.
|
|
731
|
+
const output = {
|
|
732
|
+
...(relation.orderBy ? { orderBy: relation.orderBy } : {}),
|
|
733
|
+
...(relation.limit !== undefined ? { limit: relation.limit } : {}),
|
|
734
|
+
...(relation.offset !== undefined ? { offset: relation.offset } : {}),
|
|
735
|
+
};
|
|
736
|
+
const normalized = {
|
|
737
|
+
...(relation.table ? { table: relation.table } : {}),
|
|
738
|
+
conditions: [...(relation.conditions ?? [])]
|
|
739
|
+
.map((condition) => canonicalJson(condition))
|
|
740
|
+
.sort(),
|
|
741
|
+
hops: relation.hops ?? [],
|
|
742
|
+
...(Object.keys(output).length ? { output_v1: output } : {}),
|
|
743
|
+
...(relation.gather ? { gather: relation.gather } : {}),
|
|
744
|
+
...(relation.union
|
|
745
|
+
? {
|
|
746
|
+
union: relation.union.inputs
|
|
747
|
+
.map((arm) => ({ label: arm.label, input: canonicalUnionRelation(arm.input) }))
|
|
748
|
+
.sort((left, right) => compareUtf8(left.label, right.label)),
|
|
749
|
+
}
|
|
750
|
+
: {}),
|
|
751
|
+
};
|
|
752
|
+
return canonicalJson(normalized);
|
|
753
|
+
}
|
|
754
|
+
function canonicalJson(value) {
|
|
755
|
+
if (value === null)
|
|
756
|
+
return "null";
|
|
757
|
+
if (value === undefined)
|
|
758
|
+
return "undefined";
|
|
759
|
+
if (typeof value === "string")
|
|
760
|
+
return `string:${JSON.stringify(value)}`;
|
|
761
|
+
if (typeof value === "boolean")
|
|
762
|
+
return `bool:${value}`;
|
|
763
|
+
if (typeof value === "bigint")
|
|
764
|
+
return `bigint:${value}`;
|
|
765
|
+
if (typeof value === "number") {
|
|
766
|
+
return Number.isFinite(value) ? `number:${value}` : `number:${String(value)}`;
|
|
767
|
+
}
|
|
768
|
+
if (value instanceof Date) {
|
|
769
|
+
return Number.isNaN(value.getTime()) ? "date:invalid" : `date:${value.toISOString()}`;
|
|
770
|
+
}
|
|
771
|
+
if (value instanceof Uint8Array)
|
|
772
|
+
return `bytes:${bytesToHex(value)}`;
|
|
773
|
+
if (value instanceof ArrayBuffer)
|
|
774
|
+
return `bytes:${bytesToHex(new Uint8Array(value))}`;
|
|
775
|
+
if (ArrayBuffer.isView(value)) {
|
|
776
|
+
return `typed:${value.constructor.name}:${bytesToHex(new Uint8Array(value.buffer, value.byteOffset, value.byteLength))}`;
|
|
777
|
+
}
|
|
778
|
+
if (Array.isArray(value))
|
|
779
|
+
return `[${value.map(canonicalJson).join(",")}]`;
|
|
780
|
+
if (value && typeof value === "object") {
|
|
781
|
+
const record = value;
|
|
782
|
+
return `{${Object.keys(record)
|
|
783
|
+
.sort()
|
|
784
|
+
.map((key) => `${JSON.stringify(key)}:${canonicalJson(record[key])}`)
|
|
785
|
+
.join(",")}}`;
|
|
786
|
+
}
|
|
787
|
+
return `unknown:${String(value)}`;
|
|
788
|
+
}
|
|
789
|
+
//# sourceMappingURL=typed-app.js.map
|