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,1190 @@
|
|
|
1
|
+
import { parseSnapshotRef } from "../runtime/snapshot-ref.js";
|
|
2
|
+
import { CONNECTED, CONNECTING, offlineLink } from "../runtime/sync-status.js";
|
|
3
|
+
import { streamingChunks } from "../runtime/streaming-source.js";
|
|
4
|
+
import { runtimeRandomBytes } from "../runtime/runtime-entropy.js";
|
|
5
|
+
import { writeRow } from "../runtime/write-row.js";
|
|
6
|
+
import { bytesToHex, formatUuid } from "../runtime/hex.js";
|
|
7
|
+
import { RuntimeClosedError } from "../runtime/runtime-closed-error.js";
|
|
8
|
+
import { canonicalAuthorSubject } from "../runtime/author-id.js";
|
|
9
|
+
import { PostcardReader, readNativeSubscriptionDelta, } from "../runtime/native-runtime/native-codec.js";
|
|
10
|
+
import { addNestedOuterColumns, assertNoUnsupportedPermissionIntrospection, assertSupportedReadOptions, branchViewFromWriteContext, decodeSubscriptionDelta, effectiveUpdatedAtMs, encodeCellsForPatch, encodeCellsForRow, encodeCellsForStreamingPatch, encodeCellsForStreamingRow, encodeQueryJson, openTransactionIdFromOptions, parseUuid, queryHasArraySubqueries, queryIncludesDeleted, readOptions, readRelationSnapshot, readRowBatches, rowsFromBatches, rowsFromRelationSnapshot, subscriptionOutputColumns, txIdFromContext, } from "../runtime/native-runtime/native-runtime-adapter.js";
|
|
11
|
+
import { encodeSchema } from "../runtime/native-runtime/schema-codec.js";
|
|
12
|
+
import { WebSocketCarrier, peerIdentityForWebSocketAuth, wireAuthFailureReason, } from "../runtime/native-runtime/websocket.js";
|
|
13
|
+
import { FEATURE_THIN_RESULTS, decodeThinResponse, encodeThinRequest, MAX_THIN_MESSAGE_BYTES, ThinAssembler, thinWireFrames, isThinResponse, } from "./wire.js";
|
|
14
|
+
/** A request failed on the server. `code` is the engine's stable error code. */
|
|
15
|
+
export class ThinRemoteError extends Error {
|
|
16
|
+
code;
|
|
17
|
+
constructor(code, message) {
|
|
18
|
+
super(message);
|
|
19
|
+
this.code = code;
|
|
20
|
+
this.name = "ThinRemoteError";
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/** The connection ended before the server answered. A write may or may not have committed. */
|
|
24
|
+
export class ThinConnectionLostError extends Error {
|
|
25
|
+
constructor(message = "the connection to the Jazz server ended before it answered", options) {
|
|
26
|
+
super(message, options);
|
|
27
|
+
this.name = "ThinConnectionLostError";
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The request never reached the server: a write didn't commit. The thin
|
|
32
|
+
* runtime ended it before a connection could carry it (it closed, or its Db
|
|
33
|
+
* handed over to the local-first one).
|
|
34
|
+
*/
|
|
35
|
+
export class ThinRequestNotSentError extends Error {
|
|
36
|
+
constructor(message = "the request never reached the Jazz server", options) {
|
|
37
|
+
super(message, options);
|
|
38
|
+
this.name = "ThinRequestNotSentError";
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The server ends a thin connection's open transactions with it (on a
|
|
43
|
+
* reconnect, including the one a credential renewal takes): their staged
|
|
44
|
+
* writes are gone, and the transaction can only be started again.
|
|
45
|
+
*/
|
|
46
|
+
export class ThinTransactionLostError extends Error {
|
|
47
|
+
constructor(id) {
|
|
48
|
+
super(`transaction ${id} was lost with the connection to the Jazz server; its staged writes were discarded, so start it again`);
|
|
49
|
+
this.name = "ThinTransactionLostError";
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
const DEFAULT_RECONNECT_DELAYS_MS = [250, 500, 1_000, 2_000, 5_000];
|
|
53
|
+
/** Standalone writes the server dedups by their `writeKey` (SPEC 8 §8.14). */
|
|
54
|
+
const RESENDABLE_WRITES = new Set([
|
|
55
|
+
"insert",
|
|
56
|
+
"update",
|
|
57
|
+
"upsert",
|
|
58
|
+
"delete",
|
|
59
|
+
"restore",
|
|
60
|
+
]);
|
|
61
|
+
/**
|
|
62
|
+
* How long the connection may keep failing before the link reports an
|
|
63
|
+
* outage, as the core link does: a short blip never shows as offline.
|
|
64
|
+
*/
|
|
65
|
+
const OUTAGE_REPORT_MS = 7_500;
|
|
66
|
+
/** Committed writes kept for later waits on them. */
|
|
67
|
+
const RETAINED_WRITES = 1024;
|
|
68
|
+
export class ThinRuntime {
|
|
69
|
+
schema;
|
|
70
|
+
schemaBytes;
|
|
71
|
+
WebSocketImpl;
|
|
72
|
+
reconnectDelaysMs;
|
|
73
|
+
author;
|
|
74
|
+
carrier;
|
|
75
|
+
/** Joins the current connection's split responses. */
|
|
76
|
+
parts = new ThinAssembler();
|
|
77
|
+
url;
|
|
78
|
+
authJson;
|
|
79
|
+
/** Requests and live queries go out only once the schema is bound. */
|
|
80
|
+
bound = false;
|
|
81
|
+
wanted = false;
|
|
82
|
+
closed = false;
|
|
83
|
+
attempt = 0;
|
|
84
|
+
/** Why this runtime stopped for good (a server that can't serve it). */
|
|
85
|
+
failure;
|
|
86
|
+
reconnectTimer;
|
|
87
|
+
/** The server refused the credential: nothing reconnects until `updateAuth`. */
|
|
88
|
+
refused = false;
|
|
89
|
+
/** The connection ended for good (`fatal`, `close`). */
|
|
90
|
+
stopped = false;
|
|
91
|
+
/** When connecting started failing; cleared once connected or refused. */
|
|
92
|
+
failingSince;
|
|
93
|
+
outagePublished = false;
|
|
94
|
+
outageReportMs;
|
|
95
|
+
nextRequestId = 1;
|
|
96
|
+
oneShots = new Map();
|
|
97
|
+
nextHandle = 1;
|
|
98
|
+
liveQueries = new Map();
|
|
99
|
+
liveByRequest = new Map();
|
|
100
|
+
writes = new Map();
|
|
101
|
+
/** This runtime's writer node: with {@link nextWriteSeq}, each write's
|
|
102
|
+
* `writeKey`. The server commits the write under a node it derives from
|
|
103
|
+
* this one and the session's author, so one node serves every identity
|
|
104
|
+
* the runtime writes as. */
|
|
105
|
+
writerNode = bytesToHex(runtimeRandomBytes(16));
|
|
106
|
+
nextWriteSeq = 1;
|
|
107
|
+
/** Writes the server has not answered yet. */
|
|
108
|
+
unanswered = 0;
|
|
109
|
+
syncStatusListeners = new Set();
|
|
110
|
+
transactions = new Map();
|
|
111
|
+
mutationErrorCallback;
|
|
112
|
+
authFailureCallback;
|
|
113
|
+
constructor(schema, options = {}) {
|
|
114
|
+
this.schema = schema;
|
|
115
|
+
this.schemaBytes = encodeSchema(schema);
|
|
116
|
+
this.WebSocketImpl = options.WebSocket;
|
|
117
|
+
this.reconnectDelaysMs = options.reconnectDelaysMs ?? DEFAULT_RECONNECT_DELAYS_MS;
|
|
118
|
+
this.outageReportMs = options.outageReportMs ?? OUTAGE_REPORT_MS;
|
|
119
|
+
this.author = options.author;
|
|
120
|
+
}
|
|
121
|
+
// ---- connection -------------------------------------------------------
|
|
122
|
+
connect(url, authJson) {
|
|
123
|
+
const changed = (this.url !== undefined && url !== this.url) ||
|
|
124
|
+
(this.authJson !== undefined && authJson !== this.authJson);
|
|
125
|
+
this.url = url;
|
|
126
|
+
this.authJson = authJson;
|
|
127
|
+
this.wanted = true;
|
|
128
|
+
// Another server or credential, as for `updateAuth`: the connection
|
|
129
|
+
// bound to the old one goes, and a sent write waiting to go out again
|
|
130
|
+
// ends with its fate unknown instead of being made as someone else.
|
|
131
|
+
if (changed)
|
|
132
|
+
this.dropConnection(new ThinConnectionLostError());
|
|
133
|
+
// An explicit connect (a reconnect after a refusal or a terminal error)
|
|
134
|
+
// starts over, as the core link does.
|
|
135
|
+
if (!this.closed)
|
|
136
|
+
this.stopped = false;
|
|
137
|
+
this.failure = undefined;
|
|
138
|
+
this.setRefused(false);
|
|
139
|
+
this.open();
|
|
140
|
+
}
|
|
141
|
+
async disconnect(options) {
|
|
142
|
+
this.wanted = false;
|
|
143
|
+
this.clearOutage();
|
|
144
|
+
this.dropConnection(options?.rejectWaiters === false ? undefined : new ThinConnectionLostError());
|
|
145
|
+
}
|
|
146
|
+
updateAuth(authJson) {
|
|
147
|
+
this.authJson = authJson;
|
|
148
|
+
this.setRefused(false);
|
|
149
|
+
// The new credential may name another user (a cookie session names
|
|
150
|
+
// none here), as whom a sent write must not be made: one that may have
|
|
151
|
+
// been made ends with its fate unknown, as it did before resends.
|
|
152
|
+
this.dropConnection(new ThinConnectionLostError());
|
|
153
|
+
if (!this.wanted)
|
|
154
|
+
return;
|
|
155
|
+
// The server binds a connection to the credential it opened with: a new
|
|
156
|
+
// one takes a new connection.
|
|
157
|
+
this.open();
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* The client's own session: calls naming it are served as this
|
|
161
|
+
* connection, calls naming any other are refused. Set before the client
|
|
162
|
+
* connects and again as its auth changes.
|
|
163
|
+
*/
|
|
164
|
+
useSession(session) {
|
|
165
|
+
this.author = session
|
|
166
|
+
? canonicalAuthorSubject(session.issuer, session.user_id, session.account_id)
|
|
167
|
+
: undefined;
|
|
168
|
+
}
|
|
169
|
+
onAuthFailure(callback) {
|
|
170
|
+
this.authFailureCallback = callback;
|
|
171
|
+
}
|
|
172
|
+
onMutationError(callback) {
|
|
173
|
+
this.mutationErrorCallback = callback;
|
|
174
|
+
}
|
|
175
|
+
close() {
|
|
176
|
+
this.closed = true;
|
|
177
|
+
this.wanted = false;
|
|
178
|
+
this.stop();
|
|
179
|
+
const closed = new ThinConnectionLostError("the thin runtime is closed", {
|
|
180
|
+
cause: new RuntimeClosedError("the thin runtime is closed"),
|
|
181
|
+
});
|
|
182
|
+
this.dropConnection(closed);
|
|
183
|
+
// Nothing connects again: a request not sent yet ends too (a write
|
|
184
|
+
// waiting to go out again with its fate unknown), so a read the app made
|
|
185
|
+
// while the server was down asks the Db's successor instead.
|
|
186
|
+
this.endWaitingRequests(closed, new ThinRequestNotSentError("the thin runtime closed before sending the request", {
|
|
187
|
+
cause: closed.cause,
|
|
188
|
+
}));
|
|
189
|
+
for (const live of this.liveQueries.values())
|
|
190
|
+
live.callback = undefined;
|
|
191
|
+
this.liveQueries.clear();
|
|
192
|
+
}
|
|
193
|
+
open() {
|
|
194
|
+
if (this.closed || !this.url || this.authJson === undefined || this.carrier)
|
|
195
|
+
return;
|
|
196
|
+
clearTimeout(this.reconnectTimer);
|
|
197
|
+
this.failingSince ??= Date.now();
|
|
198
|
+
this.parts.reset();
|
|
199
|
+
const carrier = new WebSocketCarrier({
|
|
200
|
+
endpointUrl: this.url,
|
|
201
|
+
peerIdentity: peerIdentityForWebSocketAuth(this.authJson, this.author === undefined ? runtimeRandomBytes(16) : new TextEncoder().encode(this.author)),
|
|
202
|
+
features: FEATURE_THIN_RESULTS,
|
|
203
|
+
authJson: this.authJson,
|
|
204
|
+
WebSocket: this.WebSocketImpl,
|
|
205
|
+
onFrame: (frame) => this.receive(carrier, frame),
|
|
206
|
+
onTerminal: (error) => this.lost(carrier, error),
|
|
207
|
+
});
|
|
208
|
+
this.carrier = carrier;
|
|
209
|
+
void carrier.ready().then((negotiation) => {
|
|
210
|
+
if (this.carrier !== carrier)
|
|
211
|
+
return;
|
|
212
|
+
if ((negotiation.features & FEATURE_THIN_RESULTS) === 0) {
|
|
213
|
+
this.fatal(new Error("this Jazz server does not serve thin clients"));
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
this.bindSchema(carrier);
|
|
217
|
+
}, () => {
|
|
218
|
+
// `onTerminal` reports why.
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
bindSchema(carrier) {
|
|
222
|
+
const id = this.nextRequestId++;
|
|
223
|
+
this.oneShots.set(id, {
|
|
224
|
+
op: { type: "schema", schema: this.schemaBytes },
|
|
225
|
+
sent: true,
|
|
226
|
+
resolve: (body) => {
|
|
227
|
+
if (this.carrier !== carrier)
|
|
228
|
+
return;
|
|
229
|
+
if (body.type === "error") {
|
|
230
|
+
this.fatal(new ThinRemoteError(body.code, body.message));
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
this.attempt = 0;
|
|
234
|
+
this.bound = true;
|
|
235
|
+
this.refused = false;
|
|
236
|
+
this.stopped = false;
|
|
237
|
+
this.clearOutage();
|
|
238
|
+
this.notifySyncStatus();
|
|
239
|
+
for (const live of this.liveQueries.values())
|
|
240
|
+
if (live.callback)
|
|
241
|
+
this.openLive(live);
|
|
242
|
+
for (const [requestId, oneShot] of this.oneShots) {
|
|
243
|
+
if (!oneShot.sent)
|
|
244
|
+
this.transmit(requestId, oneShot);
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
// A connection that ends before the answer is retried as a whole.
|
|
248
|
+
reject: () => undefined,
|
|
249
|
+
});
|
|
250
|
+
this.sendFrame(carrier, encodeThinRequest(id, { type: "schema", schema: this.schemaBytes }), (bytes) => {
|
|
251
|
+
this.oneShots.delete(id);
|
|
252
|
+
this.fatal(tooLarge("schema", bytes));
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
/** Send `frame`, in parts when it is over a wire frame; `tooLarge`
|
|
256
|
+
* instead past what one request takes. */
|
|
257
|
+
sendFrame(carrier, frame, refused) {
|
|
258
|
+
const frames = thinWireFrames(frame);
|
|
259
|
+
if (frames === null) {
|
|
260
|
+
refused(frame.byteLength);
|
|
261
|
+
return false;
|
|
262
|
+
}
|
|
263
|
+
// Parts of one frame go back to back.
|
|
264
|
+
void carrier?.sendBatch(frames);
|
|
265
|
+
return true;
|
|
266
|
+
}
|
|
267
|
+
lost(carrier, error) {
|
|
268
|
+
if (this.carrier !== carrier)
|
|
269
|
+
return;
|
|
270
|
+
const lostError = new ThinConnectionLostError(`${error.code}: ${error.message}`);
|
|
271
|
+
const authFailure = wireAuthFailureReason(error);
|
|
272
|
+
if (authFailure) {
|
|
273
|
+
// Refused before the drop publishes, so the link never reads
|
|
274
|
+
// "connecting" in between.
|
|
275
|
+
this.clearOutage();
|
|
276
|
+
this.refused = true;
|
|
277
|
+
// Writes left unanswered wait for the renewed credential's connection.
|
|
278
|
+
this.dropConnection(lostError, this.wanted && !this.closed && error.retry !== "never");
|
|
279
|
+
this.notifySyncStatus();
|
|
280
|
+
// Nothing reconnects until the credential is renewed (`updateAuth`).
|
|
281
|
+
this.authFailureCallback?.(authFailure);
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
if (error.retry === "never") {
|
|
285
|
+
// Stopped for good, as `fatal`: only an explicit connect starts over,
|
|
286
|
+
// and requests waiting for a connection end now.
|
|
287
|
+
this.fatal(lostError);
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
this.dropConnection(lostError, this.wanted && !this.closed);
|
|
291
|
+
// An attempt that fails past the window reports the outage.
|
|
292
|
+
if (!this.stopped &&
|
|
293
|
+
!this.outagePublished &&
|
|
294
|
+
this.failingSince !== undefined &&
|
|
295
|
+
Date.now() - this.failingSince >= this.outageReportMs) {
|
|
296
|
+
this.outagePublished = true;
|
|
297
|
+
}
|
|
298
|
+
this.notifySyncStatus();
|
|
299
|
+
if (!this.wanted || this.closed || error.retry === "never")
|
|
300
|
+
return;
|
|
301
|
+
const delays = this.reconnectDelaysMs;
|
|
302
|
+
const delay = delays[Math.min(this.attempt, delays.length - 1)] ?? 1_000;
|
|
303
|
+
this.attempt += 1;
|
|
304
|
+
this.reconnectTimer = setTimeout(() => this.open(), delay);
|
|
305
|
+
}
|
|
306
|
+
/** Close the connection; requests already sent fail with `error`, live queries reopen later.
|
|
307
|
+
* With `resend`, a write under a `writeKey` the connection left unanswered
|
|
308
|
+
* waits for the next connection instead, and goes out again in order. */
|
|
309
|
+
dropConnection(error, resend = false,
|
|
310
|
+
/** What a sent write ends with, when not `error`: it may have committed. */
|
|
311
|
+
sentWriteError = error) {
|
|
312
|
+
clearTimeout(this.reconnectTimer);
|
|
313
|
+
const carrier = this.carrier;
|
|
314
|
+
this.carrier = undefined;
|
|
315
|
+
if (this.bound) {
|
|
316
|
+
this.bound = false;
|
|
317
|
+
this.notifySyncStatus();
|
|
318
|
+
}
|
|
319
|
+
carrier?.close();
|
|
320
|
+
for (const live of this.liveQueries.values()) {
|
|
321
|
+
if (live.requestId !== undefined)
|
|
322
|
+
this.liveByRequest.delete(live.requestId);
|
|
323
|
+
live.requestId = undefined;
|
|
324
|
+
if (live.delivered)
|
|
325
|
+
live.resetNext = true;
|
|
326
|
+
}
|
|
327
|
+
// The server abandoned every transaction begun on this connection.
|
|
328
|
+
const lost = new Set();
|
|
329
|
+
for (const [id, transaction] of this.transactions) {
|
|
330
|
+
if (transaction.begin.sent && !transaction.lost) {
|
|
331
|
+
// Kept, so its handle's commit says it was lost, but without its
|
|
332
|
+
// staged writes' answers.
|
|
333
|
+
transaction.lost = true;
|
|
334
|
+
transaction.requests = [];
|
|
335
|
+
lost.add(id);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
for (const [id, oneShot] of this.oneShots) {
|
|
339
|
+
const transaction = transactionOf(oneShot.op);
|
|
340
|
+
if (transaction !== undefined && lost.has(transaction)) {
|
|
341
|
+
this.oneShots.delete(id);
|
|
342
|
+
oneShot.reject(new ThinTransactionLostError(transaction));
|
|
343
|
+
continue;
|
|
344
|
+
}
|
|
345
|
+
// Requests not sent yet wait for the next connection, and so does a
|
|
346
|
+
// write sent once, unless this drop ends its resends.
|
|
347
|
+
if (!oneShot.sent && !(oneShot.resending && !resend))
|
|
348
|
+
continue;
|
|
349
|
+
if (oneShot.sent && resend && oneShot.resendable) {
|
|
350
|
+
oneShot.sent = false;
|
|
351
|
+
oneShot.resending = true;
|
|
352
|
+
continue;
|
|
353
|
+
}
|
|
354
|
+
this.oneShots.delete(id);
|
|
355
|
+
if (error)
|
|
356
|
+
oneShot.reject(oneShot.write ? (sentWriteError ?? error) : error);
|
|
357
|
+
// A sent write is never sent again after an explicit disconnect: it may
|
|
358
|
+
// have committed, so it ends with its fate unknown. (A sent read is
|
|
359
|
+
// dropped unanswered, as before.)
|
|
360
|
+
else if (oneShot.write)
|
|
361
|
+
oneShot.reject(new ThinConnectionLostError());
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
fatal(error) {
|
|
365
|
+
this.wanted = false;
|
|
366
|
+
this.failure = error;
|
|
367
|
+
this.stop();
|
|
368
|
+
// A write the server may have taken ends with its fate unknown, not as
|
|
369
|
+
// the server's rejection of it.
|
|
370
|
+
this.dropConnection(error, false, unknownOutcome(error));
|
|
371
|
+
// Requests not sent yet would wait for a connection that never comes.
|
|
372
|
+
this.endWaitingRequests(error);
|
|
373
|
+
for (const live of this.liveQueries.values())
|
|
374
|
+
live.callback?.(error);
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* End every request still waiting for a connection. A write sent once and
|
|
378
|
+
* waiting to go out again ends with its fate unknown, as it may have
|
|
379
|
+
* committed; one never sent with {@link ThinRequestNotSentError}, as it
|
|
380
|
+
* certainly didn't. Any other request ends with `notSent`.
|
|
381
|
+
*/
|
|
382
|
+
endWaitingRequests(error, notSent = error) {
|
|
383
|
+
for (const [id, oneShot] of this.oneShots) {
|
|
384
|
+
this.oneShots.delete(id);
|
|
385
|
+
if (oneShot.resending)
|
|
386
|
+
oneShot.reject(unknownOutcome(error));
|
|
387
|
+
else if (oneShot.write && !(notSent instanceof ThinRequestNotSentError))
|
|
388
|
+
oneShot.reject(new ThinRequestNotSentError(`the request never reached the server: ${error.message}`, {
|
|
389
|
+
cause: error,
|
|
390
|
+
}));
|
|
391
|
+
else
|
|
392
|
+
oneShot.reject(notSent);
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* @internal Its Db handed over to a successor: end the reads (outside a
|
|
397
|
+
* transaction) not sent yet, and any made from now on, with
|
|
398
|
+
* {@link RuntimeClosedError} as their cause,
|
|
399
|
+
* so each asks the successor instead of waiting for this runtime's server.
|
|
400
|
+
* Writes stay, to upload once it answers.
|
|
401
|
+
*/
|
|
402
|
+
endUnsentReads() {
|
|
403
|
+
// A read that reaches this runtime later (it was still on its way when
|
|
404
|
+
// the Db handed over) ends the same way.
|
|
405
|
+
this.handedOver = true;
|
|
406
|
+
for (const [id, oneShot] of this.oneShots) {
|
|
407
|
+
if (oneShot.sent || !endsAtHandOver(oneShot.op))
|
|
408
|
+
continue;
|
|
409
|
+
this.oneShots.delete(id);
|
|
410
|
+
oneShot.reject(handedOver());
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
/** Set by {@link endUnsentReads}. */
|
|
414
|
+
handedOver = false;
|
|
415
|
+
// ---- requests ---------------------------------------------------------
|
|
416
|
+
request(op, id = this.nextRequestId++) {
|
|
417
|
+
return this.requestWith(op, id).answer;
|
|
418
|
+
}
|
|
419
|
+
/** {@link request}, with the request's own record. */
|
|
420
|
+
requestWith(op, id = this.nextRequestId++) {
|
|
421
|
+
if (this.closed)
|
|
422
|
+
return {
|
|
423
|
+
answer: Promise.reject(new RuntimeClosedError("the thin runtime is closed")),
|
|
424
|
+
};
|
|
425
|
+
// Handed over first: the successor serves a read even after a failure here.
|
|
426
|
+
if (this.handedOver && endsAtHandOver(op))
|
|
427
|
+
return { answer: Promise.reject(handedOver()) };
|
|
428
|
+
if (this.failure)
|
|
429
|
+
return { answer: Promise.reject(this.failure) };
|
|
430
|
+
let oneShot;
|
|
431
|
+
const answer = new Promise((resolve, reject) => {
|
|
432
|
+
oneShot = { op, resolve, reject, sent: false };
|
|
433
|
+
this.oneShots.set(id, oneShot);
|
|
434
|
+
if (this.bound)
|
|
435
|
+
this.transmit(id, oneShot);
|
|
436
|
+
}).then((body) => {
|
|
437
|
+
if (body.type === "error")
|
|
438
|
+
throw new ThinRemoteError(body.code, body.message);
|
|
439
|
+
return body;
|
|
440
|
+
});
|
|
441
|
+
return { answer, oneShot };
|
|
442
|
+
}
|
|
443
|
+
transmit(id, oneShot) {
|
|
444
|
+
const sent = this.sendFrame(this.carrier, encodeThinRequest(id, oneShot.op), (bytes) => {
|
|
445
|
+
// Refused here: the server would refuse it.
|
|
446
|
+
this.oneShots.delete(id);
|
|
447
|
+
oneShot.reject(tooLarge(oneShot.op.type, bytes));
|
|
448
|
+
});
|
|
449
|
+
if (sent)
|
|
450
|
+
oneShot.sent = true;
|
|
451
|
+
}
|
|
452
|
+
receive(carrier, piece) {
|
|
453
|
+
if (this.carrier !== carrier)
|
|
454
|
+
return;
|
|
455
|
+
let response;
|
|
456
|
+
try {
|
|
457
|
+
let frame = piece;
|
|
458
|
+
if (ThinAssembler.isPart(piece)) {
|
|
459
|
+
const joined = this.parts.push(piece);
|
|
460
|
+
if (joined === undefined)
|
|
461
|
+
return;
|
|
462
|
+
frame = joined;
|
|
463
|
+
}
|
|
464
|
+
else if (this.parts.joining) {
|
|
465
|
+
throw new Error("a thin frame arrived inside a split one");
|
|
466
|
+
}
|
|
467
|
+
if (!isThinResponse(frame))
|
|
468
|
+
return;
|
|
469
|
+
response = decodeThinResponse(frame);
|
|
470
|
+
}
|
|
471
|
+
catch (error) {
|
|
472
|
+
// The server broke the framing: start over on a new connection.
|
|
473
|
+
this.parts.reset();
|
|
474
|
+
this.lost(carrier, {
|
|
475
|
+
code: "MalformedFrame",
|
|
476
|
+
retry: "later",
|
|
477
|
+
message: error instanceof Error ? error.message : String(error),
|
|
478
|
+
});
|
|
479
|
+
return;
|
|
480
|
+
}
|
|
481
|
+
const { id, body } = response;
|
|
482
|
+
const handle = this.liveByRequest.get(id);
|
|
483
|
+
if (handle !== undefined) {
|
|
484
|
+
this.receiveLive(handle, id, body);
|
|
485
|
+
return;
|
|
486
|
+
}
|
|
487
|
+
const oneShot = this.oneShots.get(id);
|
|
488
|
+
if (!oneShot)
|
|
489
|
+
return;
|
|
490
|
+
this.oneShots.delete(id);
|
|
491
|
+
oneShot.resolve(body);
|
|
492
|
+
}
|
|
493
|
+
// ---- reads ------------------------------------------------------------
|
|
494
|
+
/**
|
|
495
|
+
* Every read and write runs as this connection's session. The client
|
|
496
|
+
* names its own session with each call; another one (a trusted backend
|
|
497
|
+
* acting for a user, `db.forSession(other)`) is refused rather than
|
|
498
|
+
* silently served as this one. A connection that does not know its
|
|
499
|
+
* author (a cookie session) refuses any session named explicitly.
|
|
500
|
+
*/
|
|
501
|
+
refuseOtherSession(sessionJson, operation) {
|
|
502
|
+
if (sessionJson == null)
|
|
503
|
+
return;
|
|
504
|
+
// A session, or a write context naming one.
|
|
505
|
+
const parsed = JSON.parse(sessionJson);
|
|
506
|
+
if (parsed.attribution != null) {
|
|
507
|
+
throw new Error(`${operation} failed: attributed writes are not supported in thin mode`);
|
|
508
|
+
}
|
|
509
|
+
const session = parsed.session ?? parsed;
|
|
510
|
+
if (session.user_id === undefined)
|
|
511
|
+
return;
|
|
512
|
+
const author = session.issuer
|
|
513
|
+
? canonicalAuthorSubject(session.issuer, session.user_id, session.account_id)
|
|
514
|
+
: undefined;
|
|
515
|
+
if (this.author === undefined || author !== this.author) {
|
|
516
|
+
throw new Error(`${operation} failed: reading or writing as another session is not supported in thin mode`);
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
/** What a write context asks of a thin write. Its session is the connection's. */
|
|
520
|
+
writeTarget(writeContext, operation) {
|
|
521
|
+
this.refuseOtherSession(writeContext, operation);
|
|
522
|
+
return {
|
|
523
|
+
operation,
|
|
524
|
+
transaction: txIdFromContext(writeContext),
|
|
525
|
+
branchView: branchViewFromWriteContext(writeContext),
|
|
526
|
+
updatedAtMs: effectiveUpdatedAtMs(writeContext) ?? Date.now(),
|
|
527
|
+
};
|
|
528
|
+
}
|
|
529
|
+
async query(queryJson, sessionJson, tier, optionsJson) {
|
|
530
|
+
this.refuseOtherSession(sessionJson, "Query");
|
|
531
|
+
assertSupportedReadOptions(tier, optionsJson);
|
|
532
|
+
assertNoUnsupportedPermissionIntrospection(queryJson);
|
|
533
|
+
const coreQueryJson = addNestedOuterColumns(queryJson);
|
|
534
|
+
const transaction = openTransactionIdFromOptions(optionsJson);
|
|
535
|
+
if (transaction)
|
|
536
|
+
this.openTransaction(transaction, "Query setup");
|
|
537
|
+
const body = await this.request({
|
|
538
|
+
type: "query",
|
|
539
|
+
query: encodeQueryJson(coreQueryJson, this.schema),
|
|
540
|
+
options: readOptions(tier, queryIncludesDeleted(coreQueryJson), optionsJson),
|
|
541
|
+
transaction,
|
|
542
|
+
});
|
|
543
|
+
if (body.type !== "rows")
|
|
544
|
+
throw new Error(`unexpected answer to a query: ${body.type}`);
|
|
545
|
+
const projected = subscriptionOutputColumns(coreQueryJson, this.schema).rootColumns;
|
|
546
|
+
return queryHasArraySubqueries(coreQueryJson) || body.relation
|
|
547
|
+
? rowsFromRelationSnapshot(readRelationSnapshot(body.rows), this.schema, projected)
|
|
548
|
+
: rowsFromBatches(readRowBatches(body.rows), this.schema, projected);
|
|
549
|
+
}
|
|
550
|
+
createSubscription(queryJson, sessionJson, tier, optionsJson) {
|
|
551
|
+
this.refuseOtherSession(sessionJson, "Subscription");
|
|
552
|
+
assertSupportedReadOptions(tier, optionsJson);
|
|
553
|
+
assertNoUnsupportedPermissionIntrospection(queryJson);
|
|
554
|
+
const handle = this.nextHandle++;
|
|
555
|
+
this.liveQueries.set(handle, {
|
|
556
|
+
queryJson,
|
|
557
|
+
query: encodeQueryJson(queryJson, this.schema),
|
|
558
|
+
options: readOptions(tier, queryIncludesDeleted(queryJson), optionsJson),
|
|
559
|
+
outputColumns: subscriptionOutputColumns(queryJson, this.schema),
|
|
560
|
+
delivered: false,
|
|
561
|
+
resetNext: false,
|
|
562
|
+
});
|
|
563
|
+
return handle;
|
|
564
|
+
}
|
|
565
|
+
executeSubscription(handle, onUpdate) {
|
|
566
|
+
const live = this.liveQueries.get(handle);
|
|
567
|
+
if (!live)
|
|
568
|
+
return;
|
|
569
|
+
if (live.callback)
|
|
570
|
+
throw new Error("Subscription has already been activated");
|
|
571
|
+
live.callback = onUpdate;
|
|
572
|
+
if (this.bound)
|
|
573
|
+
this.openLive(live);
|
|
574
|
+
}
|
|
575
|
+
/** @internal The runtime queries the app is subscribed to now, for an upgrade to warm. */
|
|
576
|
+
liveQueryJsons() {
|
|
577
|
+
return [...this.liveQueries.values()]
|
|
578
|
+
.filter((live) => live.callback !== undefined)
|
|
579
|
+
.map((live) => live.queryJson);
|
|
580
|
+
}
|
|
581
|
+
unsubscribe(handle) {
|
|
582
|
+
const live = this.liveQueries.get(handle);
|
|
583
|
+
if (!live)
|
|
584
|
+
return;
|
|
585
|
+
this.liveQueries.delete(handle);
|
|
586
|
+
live.callback = undefined;
|
|
587
|
+
if (live.requestId === undefined)
|
|
588
|
+
return;
|
|
589
|
+
this.liveByRequest.delete(live.requestId);
|
|
590
|
+
if (this.bound) {
|
|
591
|
+
void this.request({
|
|
592
|
+
type: "unsubscribe",
|
|
593
|
+
subscription: live.requestId,
|
|
594
|
+
}).catch(() => {
|
|
595
|
+
// The connection ended: the server closed the live query with it.
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
openLive(live) {
|
|
600
|
+
const id = this.nextRequestId++;
|
|
601
|
+
const handle = [...this.liveQueries].find(([, candidate]) => candidate === live)?.[0];
|
|
602
|
+
if (handle === undefined)
|
|
603
|
+
return;
|
|
604
|
+
live.requestId = id;
|
|
605
|
+
this.liveByRequest.set(id, handle);
|
|
606
|
+
this.sendFrame(this.carrier, encodeThinRequest(id, { type: "subscribe", query: live.query, options: live.options }), (bytes) => {
|
|
607
|
+
this.liveByRequest.delete(id);
|
|
608
|
+
live.requestId = undefined;
|
|
609
|
+
this.receiveLive(handle, id, {
|
|
610
|
+
type: "error",
|
|
611
|
+
code: "TooLarge",
|
|
612
|
+
message: tooLarge("subscribe", bytes).message,
|
|
613
|
+
});
|
|
614
|
+
});
|
|
615
|
+
}
|
|
616
|
+
receiveLive(handle, requestId, body) {
|
|
617
|
+
const live = this.liveQueries.get(handle);
|
|
618
|
+
if (!live?.callback)
|
|
619
|
+
return;
|
|
620
|
+
if (body.type === "event") {
|
|
621
|
+
const reset = body.reset || live.resetNext;
|
|
622
|
+
live.resetNext = false;
|
|
623
|
+
live.delivered = true;
|
|
624
|
+
const delta = decodeSubscriptionDelta(readNativeSubscriptionDelta(new PostcardReader(body.delta)), this.schema, reset, live.outputColumns);
|
|
625
|
+
live.callback(delta);
|
|
626
|
+
return;
|
|
627
|
+
}
|
|
628
|
+
// Anything else ends the live query on the server. The app still wants
|
|
629
|
+
// it (an unsubscribe forgets the request first), so it hears why.
|
|
630
|
+
this.liveByRequest.delete(requestId);
|
|
631
|
+
live.requestId = undefined;
|
|
632
|
+
const callback = live.callback;
|
|
633
|
+
this.liveQueries.delete(handle);
|
|
634
|
+
live.callback = undefined;
|
|
635
|
+
callback(body.type === "error"
|
|
636
|
+
? new ThinRemoteError(body.code, body.message)
|
|
637
|
+
: new ThinRemoteError("Closed", "the Jazz server ended this live query"));
|
|
638
|
+
}
|
|
639
|
+
// ---- writes -----------------------------------------------------------
|
|
640
|
+
insert(table, values, writeContext, objectId) {
|
|
641
|
+
const context = this.writeTarget(writeContext, "Insert");
|
|
642
|
+
const definition = this.definition(table);
|
|
643
|
+
const id = objectId ?? formatUuid(uuidv7());
|
|
644
|
+
const cells = encodeCellsForRow(definition, values, table);
|
|
645
|
+
const receipt = this.mutate(context, {
|
|
646
|
+
type: "insert",
|
|
647
|
+
table,
|
|
648
|
+
cells,
|
|
649
|
+
options: {
|
|
650
|
+
rowId: parseUuid(id),
|
|
651
|
+
branch: context.branchView?.head,
|
|
652
|
+
updatedAtMs: context.updatedAtMs,
|
|
653
|
+
},
|
|
654
|
+
});
|
|
655
|
+
const row = writeRow(table, id, definition.columns, values);
|
|
656
|
+
return { id: row.id, values: row.values, ...receipt };
|
|
657
|
+
}
|
|
658
|
+
update(table, objectId, values, writeContext) {
|
|
659
|
+
const context = this.writeTarget(writeContext, "Update");
|
|
660
|
+
return this.mutate(context, {
|
|
661
|
+
type: "update",
|
|
662
|
+
table,
|
|
663
|
+
row: parseUuid(objectId),
|
|
664
|
+
patch: encodeCellsForPatch(this.definition(table), values),
|
|
665
|
+
options: viewOptions(context),
|
|
666
|
+
});
|
|
667
|
+
}
|
|
668
|
+
upsert(table, objectId, values, writeContext) {
|
|
669
|
+
const context = this.writeTarget(writeContext, "Upsert");
|
|
670
|
+
return this.mutate(context, {
|
|
671
|
+
type: "upsert",
|
|
672
|
+
table,
|
|
673
|
+
row: parseUuid(objectId),
|
|
674
|
+
cells: encodeCellsForPatch(this.definition(table), values),
|
|
675
|
+
options: viewOptions(context),
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
delete(table, objectId, writeContext) {
|
|
679
|
+
const context = this.writeTarget(writeContext, "Delete");
|
|
680
|
+
this.definition(table);
|
|
681
|
+
return this.mutate(context, {
|
|
682
|
+
type: "delete",
|
|
683
|
+
table,
|
|
684
|
+
row: parseUuid(objectId),
|
|
685
|
+
options: viewOptions(context),
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
restore(table, objectId, values, writeContext) {
|
|
689
|
+
const context = this.writeTarget(writeContext, "Restore");
|
|
690
|
+
const definition = this.definition(table);
|
|
691
|
+
const receipt = this.mutate(context, {
|
|
692
|
+
type: "restore",
|
|
693
|
+
table,
|
|
694
|
+
row: parseUuid(objectId),
|
|
695
|
+
cells: encodeCellsForRow(definition, values, table),
|
|
696
|
+
options: {
|
|
697
|
+
branch: context.branchView?.head,
|
|
698
|
+
updatedAtMs: context.updatedAtMs,
|
|
699
|
+
},
|
|
700
|
+
});
|
|
701
|
+
const row = writeRow(table, objectId, definition.columns, values);
|
|
702
|
+
return { id: row.id, values: row.values, ...receipt };
|
|
703
|
+
}
|
|
704
|
+
updateLargeValues(table, objectId, values, descriptors, writeContext) {
|
|
705
|
+
const context = this.writeTarget(writeContext, "Update");
|
|
706
|
+
// Branch views have no partial-value coordinate space yet (#2087).
|
|
707
|
+
if (context.branchView) {
|
|
708
|
+
throw new Error("Partial-value updates (applyDiffs, editedFrom) are not yet supported in branch views.");
|
|
709
|
+
}
|
|
710
|
+
return this.mutate(context, {
|
|
711
|
+
type: "updateLargeValues",
|
|
712
|
+
table,
|
|
713
|
+
row: parseUuid(objectId),
|
|
714
|
+
patch: encodeCellsForPatch(this.definition(table), values),
|
|
715
|
+
mutations: descriptors,
|
|
716
|
+
updatedAtMs: context.updatedAtMs,
|
|
717
|
+
});
|
|
718
|
+
}
|
|
719
|
+
async streamingMutation(mutation, table, values, column, source, writeContext, objectId) {
|
|
720
|
+
const operation = mutation === "insert" ? "Insert" : mutation === "update" ? "Update" : "Upsert";
|
|
721
|
+
const context = this.writeTarget(writeContext, operation);
|
|
722
|
+
const transaction = context.transaction
|
|
723
|
+
? this.openTransaction(context.transaction, operation)
|
|
724
|
+
: undefined;
|
|
725
|
+
const definition = this.definition(table);
|
|
726
|
+
const kind = definition.columns.find((candidate) => candidate.name === column)?.column_type
|
|
727
|
+
.type;
|
|
728
|
+
if (kind !== "Text" && kind !== "Json" && kind !== "Bytea") {
|
|
729
|
+
throw new Error(`Streaming insert requires a Text, Json, or Bytea column: ${table}.${column}`);
|
|
730
|
+
}
|
|
731
|
+
const row = objectId ? parseUuid(objectId) : uuidv7();
|
|
732
|
+
const stream = this.nextRequestId++;
|
|
733
|
+
const begun = this.request({
|
|
734
|
+
type: "beginStream",
|
|
735
|
+
table,
|
|
736
|
+
row,
|
|
737
|
+
cells: mutation === "insert"
|
|
738
|
+
? encodeCellsForStreamingRow(definition, values, column, table)
|
|
739
|
+
: encodeCellsForStreamingPatch(definition, values, column),
|
|
740
|
+
column,
|
|
741
|
+
mutation,
|
|
742
|
+
options: viewOptions(context),
|
|
743
|
+
transaction: context.transaction ?? undefined,
|
|
744
|
+
}, stream);
|
|
745
|
+
// Chunks go one window at a time: each waits for the server to apply
|
|
746
|
+
// the one before, which bounds what a slow server buffers.
|
|
747
|
+
const push = async (bytes) => {
|
|
748
|
+
const windowBytes = 64 * 1024;
|
|
749
|
+
for (let offset = 0; offset < bytes.byteLength; offset += windowBytes) {
|
|
750
|
+
await this.request({
|
|
751
|
+
type: "streamChunk",
|
|
752
|
+
stream,
|
|
753
|
+
chunk: bytes.subarray(offset, offset + windowBytes),
|
|
754
|
+
});
|
|
755
|
+
}
|
|
756
|
+
};
|
|
757
|
+
const encoder = new TextEncoder();
|
|
758
|
+
let pendingHighSurrogate = "";
|
|
759
|
+
try {
|
|
760
|
+
await begun;
|
|
761
|
+
for await (const chunk of streamingChunks(source)) {
|
|
762
|
+
if (typeof chunk === "string") {
|
|
763
|
+
if (kind === "Bytea")
|
|
764
|
+
throw new Error("Bytea streams require Uint8Array chunks");
|
|
765
|
+
let text = pendingHighSurrogate + chunk;
|
|
766
|
+
pendingHighSurrogate = "";
|
|
767
|
+
const trailing = text.charCodeAt(text.length - 1);
|
|
768
|
+
if (trailing >= 0xd800 && trailing <= 0xdbff) {
|
|
769
|
+
pendingHighSurrogate = text.slice(-1);
|
|
770
|
+
text = text.slice(0, -1);
|
|
771
|
+
}
|
|
772
|
+
if (text.length > 0)
|
|
773
|
+
await push(encoder.encode(text));
|
|
774
|
+
}
|
|
775
|
+
else if (chunk instanceof Uint8Array) {
|
|
776
|
+
if (pendingHighSurrogate) {
|
|
777
|
+
await push(encoder.encode(pendingHighSurrogate));
|
|
778
|
+
pendingHighSurrogate = "";
|
|
779
|
+
}
|
|
780
|
+
await push(chunk);
|
|
781
|
+
}
|
|
782
|
+
else {
|
|
783
|
+
throw new Error("Streaming insert chunks must be strings or Uint8Array values");
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
if (pendingHighSurrogate)
|
|
787
|
+
await push(encoder.encode(pendingHighSurrogate));
|
|
788
|
+
}
|
|
789
|
+
catch (error) {
|
|
790
|
+
void this.request({ type: "abortStream", stream }).catch(() => undefined);
|
|
791
|
+
throw error;
|
|
792
|
+
}
|
|
793
|
+
const written = context.branchView ? [] : [{ table, id: formatUuid(row) }];
|
|
794
|
+
if (transaction) {
|
|
795
|
+
// The value is staged in the transaction; its commit reports a
|
|
796
|
+
// refusal of the row write.
|
|
797
|
+
transaction.rows.push(...written);
|
|
798
|
+
const staged = this.request({ type: "finishStream", stream });
|
|
799
|
+
transaction.requests.push(staged);
|
|
800
|
+
transaction.staged = true;
|
|
801
|
+
await staged;
|
|
802
|
+
return {
|
|
803
|
+
id: formatUuid(row),
|
|
804
|
+
kind: "staged",
|
|
805
|
+
openTransactionId: context.transaction,
|
|
806
|
+
};
|
|
807
|
+
}
|
|
808
|
+
return {
|
|
809
|
+
id: formatUuid(row),
|
|
810
|
+
kind: "committed",
|
|
811
|
+
txId: this.write({ type: "finishStream", stream }, written),
|
|
812
|
+
};
|
|
813
|
+
}
|
|
814
|
+
// ---- transactions -----------------------------------------------------
|
|
815
|
+
beginTransaction(kind, id, sessionJson) {
|
|
816
|
+
this.refuseOtherSession(sessionJson, "Begin transaction");
|
|
817
|
+
if (this.closed)
|
|
818
|
+
throw new Error("Begin transaction failed: the thin runtime is closed");
|
|
819
|
+
if (this.transactions.has(id)) {
|
|
820
|
+
throw new Error(`Begin transaction failed: transaction ${id} has already been opened`);
|
|
821
|
+
}
|
|
822
|
+
// The server binds the transaction to this connection's session.
|
|
823
|
+
const { answer: begun, oneShot: begin } = this.requestWith({
|
|
824
|
+
type: "begin",
|
|
825
|
+
transaction: id,
|
|
826
|
+
kind,
|
|
827
|
+
});
|
|
828
|
+
begun.catch(() => undefined);
|
|
829
|
+
this.transactions.set(id, {
|
|
830
|
+
kind,
|
|
831
|
+
requests: [begun],
|
|
832
|
+
staged: false,
|
|
833
|
+
begin: begin,
|
|
834
|
+
lost: false,
|
|
835
|
+
rows: [],
|
|
836
|
+
});
|
|
837
|
+
return id;
|
|
838
|
+
}
|
|
839
|
+
commitTransaction(id) {
|
|
840
|
+
const transaction = this.transactions.get(id);
|
|
841
|
+
if (!transaction) {
|
|
842
|
+
throw new Error(`Commit transaction failed: Write error: open transaction ${id} has already been completed or was never opened`);
|
|
843
|
+
}
|
|
844
|
+
if (!transaction.staged && transaction.kind === "mergeable") {
|
|
845
|
+
throw new Error("Commit transaction failed: empty mergeable transaction has no committed unit; roll it back instead");
|
|
846
|
+
}
|
|
847
|
+
this.transactions.delete(id);
|
|
848
|
+
if (transaction.lost)
|
|
849
|
+
return Promise.reject(new ThinTransactionLostError(id));
|
|
850
|
+
// A staged write the server refused outright fails the commit; one its
|
|
851
|
+
// row's state refused is the commit's own rejection, from the server.
|
|
852
|
+
return Promise.all(transaction.requests).then(() => this.write({ type: "commit", transaction: id }, transaction.rows), (error) => {
|
|
853
|
+
void this.request({ type: "rollback", transaction: id }).catch(() => undefined);
|
|
854
|
+
throw error;
|
|
855
|
+
});
|
|
856
|
+
}
|
|
857
|
+
async rollbackTransaction(id) {
|
|
858
|
+
const transaction = this.transactions.get(id);
|
|
859
|
+
if (!transaction) {
|
|
860
|
+
throw new Error(`Rollback transaction failed: Write error: open transaction ${id} has already been completed or was never opened`);
|
|
861
|
+
}
|
|
862
|
+
this.transactions.delete(id);
|
|
863
|
+
// The server already abandoned a lost transaction.
|
|
864
|
+
if (transaction.lost)
|
|
865
|
+
return true;
|
|
866
|
+
await this.request({ type: "rollback", transaction: id });
|
|
867
|
+
return true;
|
|
868
|
+
}
|
|
869
|
+
async captureSnapshot() {
|
|
870
|
+
const body = await this.request({ type: "captureSnapshot" });
|
|
871
|
+
if (body.type !== "snapshot") {
|
|
872
|
+
throw new Error(`unexpected answer to a snapshot capture: ${body.type}`);
|
|
873
|
+
}
|
|
874
|
+
return parseSnapshotRef(new TextDecoder().decode(body.snapshot));
|
|
875
|
+
}
|
|
876
|
+
openTransaction(id, operation) {
|
|
877
|
+
const transaction = this.transactions.get(id);
|
|
878
|
+
if (!transaction) {
|
|
879
|
+
throw new Error(`${operation} failed: Write error: open transaction ${id} has already been completed or was never opened`);
|
|
880
|
+
}
|
|
881
|
+
if (transaction.lost)
|
|
882
|
+
throw new ThinTransactionLostError(id);
|
|
883
|
+
return transaction;
|
|
884
|
+
}
|
|
885
|
+
/** A write, staged in its transaction or committed on its own. */
|
|
886
|
+
mutate(context, op) {
|
|
887
|
+
const id = context.transaction;
|
|
888
|
+
const row = writtenRow(context, op);
|
|
889
|
+
if (!id)
|
|
890
|
+
return { kind: "committed", txId: this.write(op, row ? [row] : []) };
|
|
891
|
+
const transaction = this.openTransaction(id, context.operation);
|
|
892
|
+
if (row)
|
|
893
|
+
transaction.rows.push(row);
|
|
894
|
+
const staged = this.request({ ...op, transaction: id });
|
|
895
|
+
staged.catch(() => undefined);
|
|
896
|
+
transaction.requests.push(staged);
|
|
897
|
+
transaction.staged = true;
|
|
898
|
+
return { kind: "staged", openTransactionId: id };
|
|
899
|
+
}
|
|
900
|
+
async waitForTransaction(txId, _tier, options) {
|
|
901
|
+
const id = await txId;
|
|
902
|
+
const write = this.writes.get(id);
|
|
903
|
+
if (!write) {
|
|
904
|
+
// Forgotten once committed (see pruneWrites); ids are this runtime's own.
|
|
905
|
+
if (typeof id === "string" && id.startsWith("thin:"))
|
|
906
|
+
return;
|
|
907
|
+
throw new Error(`unknown thin write ${String(id)}`);
|
|
908
|
+
}
|
|
909
|
+
// The server confirms a thin write only once it committed on the
|
|
910
|
+
// authority, which meets every durability tier.
|
|
911
|
+
if (!options?.observeOnly)
|
|
912
|
+
write.observed = true;
|
|
913
|
+
if (!options?.signal)
|
|
914
|
+
return write.done;
|
|
915
|
+
const signal = options.signal;
|
|
916
|
+
signal.throwIfAborted();
|
|
917
|
+
return Promise.race([
|
|
918
|
+
write.done,
|
|
919
|
+
new Promise((_, reject) => signal.addEventListener("abort", () => reject(signal.reason), {
|
|
920
|
+
once: true,
|
|
921
|
+
})),
|
|
922
|
+
]);
|
|
923
|
+
}
|
|
924
|
+
writtenRowsReader;
|
|
925
|
+
/**
|
|
926
|
+
* @internal Hand the rows this runtime writes to `read`, which reads them
|
|
927
|
+
* into the local-first client taking over: from now on each write's rows
|
|
928
|
+
* once the server confirms it, before that write's waits resolve. `read`
|
|
929
|
+
* must give up on its own (offline, a timeout); a failure is ignored.
|
|
930
|
+
* Returns the rows of the writes the server already confirmed, for the
|
|
931
|
+
* caller to read.
|
|
932
|
+
*/
|
|
933
|
+
handOffWrittenRows(read) {
|
|
934
|
+
this.writtenRowsReader = read;
|
|
935
|
+
return [...this.writes.values()]
|
|
936
|
+
.filter((write) => write.confirmed)
|
|
937
|
+
.flatMap((write) => write.rows);
|
|
938
|
+
}
|
|
939
|
+
/** The upstream link as the app sees it (see `linkStatusFromUpstream`). */
|
|
940
|
+
upstreamLinkStatus() {
|
|
941
|
+
if (this.stopped)
|
|
942
|
+
return offlineLink("stopped");
|
|
943
|
+
if (this.refused)
|
|
944
|
+
return offlineLink("auth");
|
|
945
|
+
if (this.bound)
|
|
946
|
+
return CONNECTED;
|
|
947
|
+
return this.outagePublished ? offlineLink("network") : CONNECTING;
|
|
948
|
+
}
|
|
949
|
+
setRefused(refused) {
|
|
950
|
+
if (this.refused === refused)
|
|
951
|
+
return;
|
|
952
|
+
this.refused = refused;
|
|
953
|
+
this.notifySyncStatus();
|
|
954
|
+
}
|
|
955
|
+
clearOutage() {
|
|
956
|
+
this.failingSince = undefined;
|
|
957
|
+
this.outagePublished = false;
|
|
958
|
+
}
|
|
959
|
+
stop() {
|
|
960
|
+
this.clearOutage();
|
|
961
|
+
if (this.stopped)
|
|
962
|
+
return;
|
|
963
|
+
this.stopped = true;
|
|
964
|
+
this.notifySyncStatus();
|
|
965
|
+
}
|
|
966
|
+
/** @internal Stop handing rows to `read` (its upgrade failed), unless another reader took over. */
|
|
967
|
+
stopHandingOffWrittenRows(read) {
|
|
968
|
+
if (this.writtenRowsReader === read)
|
|
969
|
+
this.writtenRowsReader = undefined;
|
|
970
|
+
}
|
|
971
|
+
/** How many writes still wait for the server's answer. */
|
|
972
|
+
pendingUploadCount() {
|
|
973
|
+
return this.unanswered;
|
|
974
|
+
}
|
|
975
|
+
/** Observe changes of {@link pendingUploadCount} and {@link upstreamLinkStatus}. */
|
|
976
|
+
onSyncStatusChange(listener, signal) {
|
|
977
|
+
if (signal.aborted)
|
|
978
|
+
return;
|
|
979
|
+
this.syncStatusListeners.add(listener);
|
|
980
|
+
signal.addEventListener("abort", () => this.syncStatusListeners.delete(listener), {
|
|
981
|
+
once: true,
|
|
982
|
+
});
|
|
983
|
+
}
|
|
984
|
+
notifySyncStatus() {
|
|
985
|
+
for (const listener of [...this.syncStatusListeners])
|
|
986
|
+
listener();
|
|
987
|
+
}
|
|
988
|
+
/** Every write made so far has been answered. Every write is global once answered. */
|
|
989
|
+
async waitForPendingWrites(_tier, options = {}) {
|
|
990
|
+
// Only writes still waiting for their answer, like a local-first client:
|
|
991
|
+
// a rejection the app already had doesn't fail every later wait.
|
|
992
|
+
const dones = [...this.writes.values()]
|
|
993
|
+
.filter((write) => !write.answered)
|
|
994
|
+
.map((write) => write.done);
|
|
995
|
+
// Waiting for sync fails on the server's rejection. A write whose
|
|
996
|
+
// connection ended unanswered is not rejected, and the shutdown drain
|
|
997
|
+
// only waits for every write to be answered.
|
|
998
|
+
const answered = options.throughOutage
|
|
999
|
+
? Promise.all(dones.map((done) => done.catch((error) => {
|
|
1000
|
+
if (error instanceof ThinRemoteError)
|
|
1001
|
+
throw error;
|
|
1002
|
+
})))
|
|
1003
|
+
: Promise.allSettled(dones);
|
|
1004
|
+
const signal = options.signal;
|
|
1005
|
+
if (!signal) {
|
|
1006
|
+
await answered;
|
|
1007
|
+
return;
|
|
1008
|
+
}
|
|
1009
|
+
signal.throwIfAborted();
|
|
1010
|
+
await Promise.race([
|
|
1011
|
+
answered,
|
|
1012
|
+
new Promise((_, reject) => signal.addEventListener("abort", () => reject(signal.reason), {
|
|
1013
|
+
once: true,
|
|
1014
|
+
})),
|
|
1015
|
+
]);
|
|
1016
|
+
}
|
|
1017
|
+
write(op, rows = []) {
|
|
1018
|
+
const txId = `thin:${this.nextRequestId}`;
|
|
1019
|
+
const write = {
|
|
1020
|
+
observed: false,
|
|
1021
|
+
committed: false,
|
|
1022
|
+
answered: false,
|
|
1023
|
+
confirmed: false,
|
|
1024
|
+
rows,
|
|
1025
|
+
done: Promise.resolve(),
|
|
1026
|
+
};
|
|
1027
|
+
// A standalone write goes under this runtime's next write id, so it can
|
|
1028
|
+
// be sent again after a lost answer. Ids follow the order writes are
|
|
1029
|
+
// made in, which is the order they reach the server, resent or not.
|
|
1030
|
+
const resendable = RESENDABLE_WRITES.has(op.type) && "options" in op;
|
|
1031
|
+
const sent = resendable
|
|
1032
|
+
? {
|
|
1033
|
+
...op,
|
|
1034
|
+
options: { ...op.options, writeKey: { node: this.writerNode, seq: this.nextWriteSeq++ } },
|
|
1035
|
+
}
|
|
1036
|
+
: op;
|
|
1037
|
+
const { answer, oneShot } = this.requestWith(sent);
|
|
1038
|
+
if (oneShot) {
|
|
1039
|
+
oneShot.write = true;
|
|
1040
|
+
oneShot.resendable = resendable;
|
|
1041
|
+
}
|
|
1042
|
+
write.done = answer.then(async (body) => {
|
|
1043
|
+
if (body.type !== "written")
|
|
1044
|
+
throw new Error(`unexpected answer to a write: ${body.type}`);
|
|
1045
|
+
write.confirmed = true;
|
|
1046
|
+
// Once handed off, a committed write's rows reach the local-first
|
|
1047
|
+
// client before its waits resolve, so its local reads show them.
|
|
1048
|
+
const read = this.writtenRowsReader;
|
|
1049
|
+
if (read && rows.length > 0)
|
|
1050
|
+
await read(rows).catch(() => undefined);
|
|
1051
|
+
}, (error) => {
|
|
1052
|
+
const failure = error instanceof Error ? error : new Error(String(error));
|
|
1053
|
+
// A failure no wait observes is reported once, like a local-first
|
|
1054
|
+
// client's rejected write.
|
|
1055
|
+
queueMicrotask(() => {
|
|
1056
|
+
if (write.observed)
|
|
1057
|
+
return;
|
|
1058
|
+
// Only the server's answer is a rejection. A write whose
|
|
1059
|
+
// connection ended unanswered may have committed: its fate is
|
|
1060
|
+
// unknown, not rejected.
|
|
1061
|
+
const rejected = failure instanceof ThinRemoteError;
|
|
1062
|
+
// Never sent: it certainly didn't commit.
|
|
1063
|
+
const code = rejected
|
|
1064
|
+
? failure.code
|
|
1065
|
+
: failure instanceof ThinRequestNotSentError
|
|
1066
|
+
? "not_sent"
|
|
1067
|
+
: "outcome_unknown";
|
|
1068
|
+
this.mutationErrorCallback?.({
|
|
1069
|
+
code,
|
|
1070
|
+
reason: failure.message,
|
|
1071
|
+
transaction: {
|
|
1072
|
+
transactionId: txId,
|
|
1073
|
+
kind: "mergeable",
|
|
1074
|
+
sealed: true,
|
|
1075
|
+
latestSettlement: rejected
|
|
1076
|
+
? {
|
|
1077
|
+
kind: "rejected",
|
|
1078
|
+
transactionId: txId,
|
|
1079
|
+
code,
|
|
1080
|
+
reason: failure.message,
|
|
1081
|
+
}
|
|
1082
|
+
: { kind: "missing", transactionId: txId },
|
|
1083
|
+
},
|
|
1084
|
+
});
|
|
1085
|
+
});
|
|
1086
|
+
throw failure;
|
|
1087
|
+
});
|
|
1088
|
+
// An unobserved failure is reported above, not as an unhandled rejection.
|
|
1089
|
+
write.done.catch(() => undefined);
|
|
1090
|
+
this.unanswered++;
|
|
1091
|
+
this.notifySyncStatus();
|
|
1092
|
+
void write.done
|
|
1093
|
+
.catch(() => undefined)
|
|
1094
|
+
.then(() => {
|
|
1095
|
+
write.answered = true;
|
|
1096
|
+
this.unanswered--;
|
|
1097
|
+
this.notifySyncStatus();
|
|
1098
|
+
});
|
|
1099
|
+
write.done.then(() => (write.committed = true), () => undefined);
|
|
1100
|
+
this.writes.set(txId, write);
|
|
1101
|
+
this.pruneWrites();
|
|
1102
|
+
return txId;
|
|
1103
|
+
}
|
|
1104
|
+
/**
|
|
1105
|
+
* Forget the oldest committed writes beyond {@link RETAINED_WRITES}: a
|
|
1106
|
+
* long session makes unboundedly many. A wait on a forgotten write
|
|
1107
|
+
* resolves, as every forgotten write committed.
|
|
1108
|
+
*/
|
|
1109
|
+
pruneWrites() {
|
|
1110
|
+
if (this.writes.size <= RETAINED_WRITES)
|
|
1111
|
+
return;
|
|
1112
|
+
for (const [txId, write] of this.writes) {
|
|
1113
|
+
if (this.writes.size <= RETAINED_WRITES)
|
|
1114
|
+
break;
|
|
1115
|
+
if (write.committed)
|
|
1116
|
+
this.writes.delete(txId);
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
definition(table) {
|
|
1120
|
+
const definition = this.schema[table];
|
|
1121
|
+
if (!definition)
|
|
1122
|
+
throw new Error(`unknown table ${table}`);
|
|
1123
|
+
return definition;
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
/**
|
|
1127
|
+
* The main-branch row `op` writes, if any, to hand off. Not a delete: a read
|
|
1128
|
+
* of a deleted row brings nothing back.
|
|
1129
|
+
*/
|
|
1130
|
+
function writtenRow(context, op) {
|
|
1131
|
+
if (context.branchView || op.type === "delete")
|
|
1132
|
+
return undefined;
|
|
1133
|
+
if (op.type === "insert") {
|
|
1134
|
+
const rowId = op.options.rowId;
|
|
1135
|
+
return rowId ? { table: op.table, id: formatUuid(rowId) } : undefined;
|
|
1136
|
+
}
|
|
1137
|
+
return "row" in op && op.row ? { table: op.table, id: formatUuid(op.row) } : undefined;
|
|
1138
|
+
}
|
|
1139
|
+
/** Write options for a write through a branch view. */
|
|
1140
|
+
function viewOptions(context) {
|
|
1141
|
+
return {
|
|
1142
|
+
head: context.branchView?.head,
|
|
1143
|
+
base: context.branchView?.base,
|
|
1144
|
+
updatedAtMs: context.updatedAtMs,
|
|
1145
|
+
};
|
|
1146
|
+
}
|
|
1147
|
+
/** A UUIDv7: a millisecond timestamp, then random bits. */
|
|
1148
|
+
function uuidv7() {
|
|
1149
|
+
const bytes = runtimeRandomBytes(16);
|
|
1150
|
+
const now = Date.now();
|
|
1151
|
+
bytes[0] = Math.floor(now / 2 ** 40) & 0xff;
|
|
1152
|
+
bytes[1] = Math.floor(now / 2 ** 32) & 0xff;
|
|
1153
|
+
bytes[2] = Math.floor(now / 2 ** 24) & 0xff;
|
|
1154
|
+
bytes[3] = Math.floor(now / 2 ** 16) & 0xff;
|
|
1155
|
+
bytes[4] = Math.floor(now / 2 ** 8) & 0xff;
|
|
1156
|
+
bytes[5] = now & 0xff;
|
|
1157
|
+
bytes[6] = (bytes[6] & 0x0f) | 0x70;
|
|
1158
|
+
bytes[8] = (bytes[8] & 0x3f) | 0x80;
|
|
1159
|
+
return bytes;
|
|
1160
|
+
}
|
|
1161
|
+
/** The open transaction a request belongs to, if any. */
|
|
1162
|
+
function transactionOf(op) {
|
|
1163
|
+
const transaction = op.transaction;
|
|
1164
|
+
return typeof transaction === "string" ? transaction : undefined;
|
|
1165
|
+
}
|
|
1166
|
+
/** The local refusal of a request past what one takes. */
|
|
1167
|
+
function tooLarge(op, bytes) {
|
|
1168
|
+
return new ThinRemoteError("TooLarge", `this ${op} is ${bytes} bytes, more than the ${MAX_THIN_MESSAGE_BYTES} a thin client ` +
|
|
1169
|
+
`sends in one request: write values that large with insertStreaming or updateStreaming`);
|
|
1170
|
+
}
|
|
1171
|
+
/**
|
|
1172
|
+
* A request its Db's successor serves instead once the Db hands over: a read
|
|
1173
|
+
* outside a transaction (`Db.all` asks the successor again). Writes stay, to
|
|
1174
|
+
* upload, and so does a snapshot capture, which has no such retry.
|
|
1175
|
+
*/
|
|
1176
|
+
function endsAtHandOver(op) {
|
|
1177
|
+
return op.type === "query" && transactionOf(op) === undefined;
|
|
1178
|
+
}
|
|
1179
|
+
function handedOver() {
|
|
1180
|
+
return new ThinRequestNotSentError("the Db handed over to its local-first successor", {
|
|
1181
|
+
cause: new RuntimeClosedError("the thin runtime handed over"),
|
|
1182
|
+
});
|
|
1183
|
+
}
|
|
1184
|
+
/** The error for a write that may have committed before `cause` ended it. */
|
|
1185
|
+
function unknownOutcome(cause) {
|
|
1186
|
+
return cause instanceof ThinConnectionLostError
|
|
1187
|
+
? cause
|
|
1188
|
+
: new ThinConnectionLostError(`the connection ended before the server answered: ${cause.message}`, { cause });
|
|
1189
|
+
}
|
|
1190
|
+
//# sourceMappingURL=thin-runtime.js.map
|