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,780 @@
|
|
|
1
|
+
import { createBrowserWorkerAssetScope, resolveBrowserWorkerRuntimeSources, resolveBrowserWorkerUrl, } from "../browser-worker-config.js";
|
|
2
|
+
import { BrowserWorkerUnresponsiveError, deserializeBrowserRelayError, BROWSER_STORE_HELD_BY_ANOTHER_SIGN_IN, } from "./browser-worker-protocol.js";
|
|
3
|
+
import { MessagePortBrowserFollowerConnection } from "./browser-follower-connection.js";
|
|
4
|
+
import { waitForInspectorOpening } from "./inspector-control-lifecycle.js";
|
|
5
|
+
import { toError } from "../util.js";
|
|
6
|
+
/**
|
|
7
|
+
* The only place the broker SharedWorker is constructed.
|
|
8
|
+
*
|
|
9
|
+
* The foreground lease and the runtime connection must attach to the same
|
|
10
|
+
* SharedWorker realm, and a realm is keyed by script URL plus name. webpack 5
|
|
11
|
+
* emits a separate worker chunk (with a distinct URL) for every
|
|
12
|
+
* `new SharedWorker(new URL(..., import.meta.url))` expression it finds, so
|
|
13
|
+
* two such expressions put the lease and the runtime in different realms and
|
|
14
|
+
* the runtime never starts. Keep exactly one statically analyzable
|
|
15
|
+
* construction here so every bundler emits a single broker worker chunk.
|
|
16
|
+
*/
|
|
17
|
+
function createBrokerSharedWorker(runtimeSources, name) {
|
|
18
|
+
if (runtimeSources?.brokerWorkerUrl || runtimeSources?.baseUrl || runtimeSources?.wasmVersion) {
|
|
19
|
+
return new SharedWorker(resolveBrowserWorkerUrl(runtimeSources), { type: "module", name });
|
|
20
|
+
}
|
|
21
|
+
return new SharedWorker(new URL("../../worker/jazz-broker-worker.js", import.meta.url), {
|
|
22
|
+
type: "module",
|
|
23
|
+
name,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
// Acquiring a lease is deliberately the first operation on a persistent
|
|
27
|
+
// browser root. On a cold browser profile that means starting the worker,
|
|
28
|
+
// acquiring the Web Lock, opening IndexedDB, checking the durable owner, and
|
|
29
|
+
// committing the lease receipt. This is I/O admission, not a heartbeat. Keep
|
|
30
|
+
// the complete probe-and-admission operation bounded so a genuinely wedged
|
|
31
|
+
// worker still fails visibly, but do not guess that a busy realm is dead from
|
|
32
|
+
// a shorter probe timeout. A realm that accepted termination explicitly says
|
|
33
|
+
// it is closing so the client can safely advance to another generation.
|
|
34
|
+
const FOREGROUND_NODE_LEASE_ADMISSION_TIMEOUT_MS = 10_000;
|
|
35
|
+
const MAX_SHARED_WORKER_GENERATION_ATTEMPTS = 8;
|
|
36
|
+
const MAX_FOREGROUND_NODE_LEASE_BUSY_ATTEMPTS = 8;
|
|
37
|
+
const FOREGROUND_NODE_LEASE_RETRY_INITIAL_DELAY_MS = 25;
|
|
38
|
+
const FOREGROUND_NODE_LEASE_RETRY_MAX_DELAY_MS = 250;
|
|
39
|
+
const RUNTIME_STARTUP_TIMEOUT_MS = 5 * 60_000;
|
|
40
|
+
const RUNTIME_STARTUP_CLOCK_INTERVAL_MS = 1_000;
|
|
41
|
+
/**
|
|
42
|
+
* A timed-out admission must keep its port alive until the worker retires a
|
|
43
|
+
* possible late lease. Coalesce that background cleanup per physical worker
|
|
44
|
+
* root so callers retrying a wedged open do not retain unbounded ports.
|
|
45
|
+
*/
|
|
46
|
+
const pendingForegroundLeaseCleanups = new Map();
|
|
47
|
+
/**
|
|
48
|
+
* Ask a newly started worker to fetch, compile and instantiate its WASM while the lease,
|
|
49
|
+
* IndexedDB admission and the page's own setup run. Only URL-addressed assets
|
|
50
|
+
* are prefetched: in-memory modules are never cloned twice.
|
|
51
|
+
*/
|
|
52
|
+
function workerWasmPrefetch(runtimeSources) {
|
|
53
|
+
if (runtimeSources?.wasmModule || runtimeSources?.wasmSource)
|
|
54
|
+
return undefined;
|
|
55
|
+
return { runtimeSources };
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The one physical SharedWorker realm that may own a browser persistence root.
|
|
59
|
+
*
|
|
60
|
+
* Authentication is intentionally not a part of this name. An explicitly
|
|
61
|
+
* named IndexedDB root is durably bound to its owner at open time; putting the
|
|
62
|
+
* owner in the worker name would instead make two workers race to own the same
|
|
63
|
+
* root. Foreground lease acquisition happens before the complete runtime
|
|
64
|
+
* configuration exists, so it must use precisely this same name.
|
|
65
|
+
*/
|
|
66
|
+
export function createBrowserSharedWorkerBaseName(runtimeSources, dbName) {
|
|
67
|
+
return ["jazz-runtime", dbName, createBrowserWorkerAssetScope(runtimeSources)].join(":");
|
|
68
|
+
}
|
|
69
|
+
function foregroundLeaseCleanupKey(workerName, storageOwner) {
|
|
70
|
+
return `${workerName}\u0000${storageOwner}`;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Lease-only worker connection established before a foreground schema/runtime
|
|
74
|
+
* exists. Its port stays open as the durable owner's liveness witness until
|
|
75
|
+
* explicit clean return or retirement.
|
|
76
|
+
*/
|
|
77
|
+
export class SharedBrowserForegroundNodeLease {
|
|
78
|
+
node;
|
|
79
|
+
confirmedTxTime;
|
|
80
|
+
leaseId;
|
|
81
|
+
workerRealmId;
|
|
82
|
+
worker = null;
|
|
83
|
+
port = null;
|
|
84
|
+
closed = false;
|
|
85
|
+
terminalError = null;
|
|
86
|
+
finishPromise = null;
|
|
87
|
+
finishWaiter = null;
|
|
88
|
+
listeningForFinish = false;
|
|
89
|
+
terminalRequestSent = false;
|
|
90
|
+
constructor(node, confirmedTxTime, leaseId, workerRealmId) {
|
|
91
|
+
this.node = node;
|
|
92
|
+
this.confirmedTxTime = confirmedTxTime;
|
|
93
|
+
this.leaseId = leaseId;
|
|
94
|
+
this.workerRealmId = workerRealmId;
|
|
95
|
+
}
|
|
96
|
+
static async acquire(options) {
|
|
97
|
+
const runtimeSources = resolveBrowserWorkerRuntimeSources(options.runtimeSources);
|
|
98
|
+
const workerName = createBrowserSharedWorkerBaseName(runtimeSources, options.dbName);
|
|
99
|
+
const cleanupKey = foregroundLeaseCleanupKey(workerName, options.storageOwner);
|
|
100
|
+
if (pendingForegroundLeaseCleanups.has(cleanupKey)) {
|
|
101
|
+
throw new Error("Shared browser foreground lease cancellation cleanup is still pending for this database; wait for the previous worker admission to finish");
|
|
102
|
+
}
|
|
103
|
+
const createWorker = (name) => createBrokerSharedWorker(runtimeSources, name);
|
|
104
|
+
// A named SharedWorker constructor can still attach to a realm after that
|
|
105
|
+
// realm has acknowledged termination but before the browser has finished
|
|
106
|
+
// destroying it. Probe before sending an allocation request so a realm
|
|
107
|
+
// that explicitly reports it is closing can be skipped without creating
|
|
108
|
+
// an orphan-risking durable operation in it.
|
|
109
|
+
const admissionDeadline = Date.now() + FOREGROUND_NODE_LEASE_ADMISSION_TIMEOUT_MS;
|
|
110
|
+
let generation = readWorkerGeneration(workerName);
|
|
111
|
+
let busyAttempt = 0;
|
|
112
|
+
let lastBusyMessage = null;
|
|
113
|
+
for (let generationAttempt = 0; generationAttempt < MAX_SHARED_WORKER_GENERATION_ATTEMPTS; generationAttempt += 1) {
|
|
114
|
+
while (true) {
|
|
115
|
+
const remainingAdmissionMs = admissionDeadline - Date.now();
|
|
116
|
+
if (remainingAdmissionMs <= 0) {
|
|
117
|
+
throw new Error(lastBusyMessage ?? "Shared browser runtime did not issue a foreground node lease");
|
|
118
|
+
}
|
|
119
|
+
const worker = createWorker(`${workerName}:generation-${generation}`);
|
|
120
|
+
const outcome = await this.acquireFromWorkerGeneration(worker, options, cleanupKey, crypto.randomUUID(), remainingAdmissionMs, workerWasmPrefetch(runtimeSources));
|
|
121
|
+
if (outcome.type === "ready")
|
|
122
|
+
return outcome.lease;
|
|
123
|
+
if (outcome.type === "worker-closing") {
|
|
124
|
+
// Only an explicitly terminating realm sends this receipt. Idle
|
|
125
|
+
// close is still cancelable by its bootstrap reservation and never
|
|
126
|
+
// forces a generation jump.
|
|
127
|
+
generation = advanceWorkerGeneration(workerName, generation);
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
lastBusyMessage = outcome.message;
|
|
131
|
+
busyAttempt += 1;
|
|
132
|
+
if (busyAttempt >= MAX_FOREGROUND_NODE_LEASE_BUSY_ATTEMPTS) {
|
|
133
|
+
throw new Error(lastBusyMessage);
|
|
134
|
+
}
|
|
135
|
+
const retryDelayMs = Math.min(FOREGROUND_NODE_LEASE_RETRY_INITIAL_DELAY_MS * 2 ** (busyAttempt - 1), FOREGROUND_NODE_LEASE_RETRY_MAX_DELAY_MS, Math.max(0, admissionDeadline - Date.now()));
|
|
136
|
+
if (retryDelayMs <= 0)
|
|
137
|
+
throw new Error(lastBusyMessage);
|
|
138
|
+
await new Promise((resolve) => setTimeout(resolve, retryDelayMs));
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
throw new Error(lastBusyMessage ?? "Shared browser foreground lease worker did not answer after closing");
|
|
142
|
+
}
|
|
143
|
+
/** @internal A context-scoped lease port minted by Inspector control. */
|
|
144
|
+
static async acquireFromPort(port, options) {
|
|
145
|
+
const outcome = await this.acquireFromWorkerGeneration({ port }, options, `inspector:${options.dbName}:${options.storageOwner}`, crypto.randomUUID(), FOREGROUND_NODE_LEASE_ADMISSION_TIMEOUT_MS);
|
|
146
|
+
if (outcome.type !== "ready")
|
|
147
|
+
throw new Error("Inspector worker is no longer available");
|
|
148
|
+
return outcome.lease;
|
|
149
|
+
}
|
|
150
|
+
static acquireFromWorkerGeneration(worker, options, cleanupKey, attemptId, timeoutMs, wasmPrefetch) {
|
|
151
|
+
const port = worker.port;
|
|
152
|
+
return new Promise((resolve, reject) => {
|
|
153
|
+
let cancellationRequested = false;
|
|
154
|
+
let publicResultSettled = false;
|
|
155
|
+
let cleanupToken = null;
|
|
156
|
+
let admissionTimeout = null;
|
|
157
|
+
const timeoutError = new Error("Shared browser runtime did not issue a foreground node lease");
|
|
158
|
+
const rejectPublic = (error) => {
|
|
159
|
+
if (publicResultSettled)
|
|
160
|
+
return;
|
|
161
|
+
publicResultSettled = true;
|
|
162
|
+
reject(error);
|
|
163
|
+
};
|
|
164
|
+
const beginAdmissionTimeout = () => setTimeout(() => {
|
|
165
|
+
// Do not close the port immediately. The worker might be between the
|
|
166
|
+
// durable allocation and its ready reply; it must observe this cancel
|
|
167
|
+
// and retire such a lease before this acquire rejects. Otherwise a
|
|
168
|
+
// merely slow cold open would burn one node identity per timeout.
|
|
169
|
+
cancellationRequested = true;
|
|
170
|
+
cleanupToken = Symbol("foreground-lease-cleanup");
|
|
171
|
+
pendingForegroundLeaseCleanups.set(cleanupKey, cleanupToken);
|
|
172
|
+
port.postMessage({ type: "cancel-foreground-node-lease" });
|
|
173
|
+
// Public startup remains bounded. The open port and listeners stay
|
|
174
|
+
// alive in the background until the worker observes cancellation and
|
|
175
|
+
// retires any late lease; closing them here would recreate the orphan
|
|
176
|
+
// race this cancellation protocol exists to prevent.
|
|
177
|
+
rejectPublic(timeoutError);
|
|
178
|
+
}, timeoutMs);
|
|
179
|
+
const cleanup = () => {
|
|
180
|
+
if (admissionTimeout)
|
|
181
|
+
clearTimeout(admissionTimeout);
|
|
182
|
+
admissionTimeout = null;
|
|
183
|
+
// A successful concurrent admission never owned this retained cleanup.
|
|
184
|
+
// Only its timeout owner may clear the shared key; otherwise it could
|
|
185
|
+
// let a third caller accumulate another orphan-risking port.
|
|
186
|
+
if (cleanupToken !== null &&
|
|
187
|
+
pendingForegroundLeaseCleanups.get(cleanupKey) === cleanupToken) {
|
|
188
|
+
pendingForegroundLeaseCleanups.delete(cleanupKey);
|
|
189
|
+
}
|
|
190
|
+
port.removeEventListener("message", onMessage);
|
|
191
|
+
port.removeEventListener("messageerror", onMessageError);
|
|
192
|
+
};
|
|
193
|
+
const onMessage = (event) => {
|
|
194
|
+
const message = event.data;
|
|
195
|
+
if (message?.type === "foreground-node-lease-worker-alive") {
|
|
196
|
+
if (message.attemptId !== attemptId || admissionTimeout === null)
|
|
197
|
+
return;
|
|
198
|
+
port.postMessage({
|
|
199
|
+
type: "acquire-foreground-node-lease",
|
|
200
|
+
attemptId,
|
|
201
|
+
dbName: options.dbName,
|
|
202
|
+
storageOwner: options.storageOwner,
|
|
203
|
+
});
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
if (message?.type === "foreground-node-lease-worker-closing") {
|
|
207
|
+
if (message.attemptId !== attemptId)
|
|
208
|
+
return;
|
|
209
|
+
cleanup();
|
|
210
|
+
port.close();
|
|
211
|
+
publicResultSettled = true;
|
|
212
|
+
resolve({ type: "worker-closing" });
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
if (message?.type === "foreground-node-lease-busy") {
|
|
216
|
+
cleanup();
|
|
217
|
+
port.close();
|
|
218
|
+
publicResultSettled = true;
|
|
219
|
+
resolve({ type: "busy", message: message.message });
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
if (message?.type === "foreground-node-lease-error") {
|
|
223
|
+
cleanup();
|
|
224
|
+
port.close();
|
|
225
|
+
rejectPublic(deserializeBrowserRelayError(message.error));
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
if (message?.type === "foreground-node-lease-cancelled") {
|
|
229
|
+
cleanup();
|
|
230
|
+
port.close();
|
|
231
|
+
rejectPublic(message.error ? deserializeBrowserRelayError(message.error) : timeoutError);
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
if (message?.type !== "foreground-node-lease-ready")
|
|
235
|
+
return;
|
|
236
|
+
// A cancel can race the ready message. Leave the port open until the
|
|
237
|
+
// worker confirms it has retired this just-issued lease.
|
|
238
|
+
if (cancellationRequested)
|
|
239
|
+
return;
|
|
240
|
+
if (!/^(0|[1-9][0-9]*)$/.test(message.confirmedTxTime)) {
|
|
241
|
+
cleanup();
|
|
242
|
+
rejectPublic(new Error("Shared browser runtime returned an invalid foreground lease high-water"));
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
cleanup();
|
|
246
|
+
const lease = new SharedBrowserForegroundNodeLease(message.node.slice(), BigInt(message.confirmedTxTime), message.leaseId, message.workerRealmId);
|
|
247
|
+
lease.worker = worker;
|
|
248
|
+
lease.port = port;
|
|
249
|
+
publicResultSettled = true;
|
|
250
|
+
resolve({ type: "ready", lease });
|
|
251
|
+
};
|
|
252
|
+
const onMessageError = () => {
|
|
253
|
+
cleanup();
|
|
254
|
+
port.close();
|
|
255
|
+
rejectPublic(new Error("Shared browser foreground lease port message error"));
|
|
256
|
+
};
|
|
257
|
+
port.addEventListener("message", onMessage);
|
|
258
|
+
port.addEventListener("messageerror", onMessageError);
|
|
259
|
+
port.start();
|
|
260
|
+
admissionTimeout = beginAdmissionTimeout();
|
|
261
|
+
port.postMessage({
|
|
262
|
+
type: "probe-foreground-node-lease-worker",
|
|
263
|
+
attemptId,
|
|
264
|
+
...(wasmPrefetch ? { wasmPrefetch } : {}),
|
|
265
|
+
});
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
async returnWithHighWater(highWater) {
|
|
269
|
+
if (this.terminalError)
|
|
270
|
+
throw this.terminalError;
|
|
271
|
+
if (highWater < 0n)
|
|
272
|
+
throw new Error("Invalid foreground transaction high-water");
|
|
273
|
+
await this.finish({
|
|
274
|
+
type: "return-foreground-node-lease",
|
|
275
|
+
confirmedTxTime: highWater.toString(),
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
async retire() {
|
|
279
|
+
if (this.terminalError)
|
|
280
|
+
throw this.terminalError;
|
|
281
|
+
if (this.closed)
|
|
282
|
+
return;
|
|
283
|
+
await this.finish({ type: "retire-foreground-node-lease" });
|
|
284
|
+
}
|
|
285
|
+
abandonAfterWorkerFailure(error) {
|
|
286
|
+
if (this.terminalError)
|
|
287
|
+
return;
|
|
288
|
+
this.terminalError = error;
|
|
289
|
+
this.finishWaiter?.reject(error);
|
|
290
|
+
this.finishWaiter = null;
|
|
291
|
+
if (this.closed || !this.port)
|
|
292
|
+
return;
|
|
293
|
+
this.listenForFinish();
|
|
294
|
+
// A quiesced return may already have committed. Retain its one outcome;
|
|
295
|
+
// another command cannot retrospectively retire an identity already reused.
|
|
296
|
+
if (this.terminalRequestSent)
|
|
297
|
+
return;
|
|
298
|
+
this.terminalRequestSent = true;
|
|
299
|
+
try {
|
|
300
|
+
this.port.postMessage({ type: "retire-foreground-node-lease" });
|
|
301
|
+
}
|
|
302
|
+
catch {
|
|
303
|
+
this.closeFinishPort();
|
|
304
|
+
}
|
|
305
|
+
// Do not close after posting: WebKit can discard a queued retirement.
|
|
306
|
+
// The late result only releases this background witness, not durable success.
|
|
307
|
+
}
|
|
308
|
+
releaseAfterStorageReset(reason) {
|
|
309
|
+
this.failFinish(reason);
|
|
310
|
+
}
|
|
311
|
+
releaseAfterWorkerReplacement(reason) {
|
|
312
|
+
// The foreground has quiesced and the fenced successor owns persistence.
|
|
313
|
+
// Never return this identity as reusable through a dead predecessor port.
|
|
314
|
+
this.failFinish(reason);
|
|
315
|
+
}
|
|
316
|
+
failFinish(error) {
|
|
317
|
+
this.terminalError ??= error;
|
|
318
|
+
this.finishWaiter?.reject(this.terminalError);
|
|
319
|
+
this.closeFinishPort();
|
|
320
|
+
}
|
|
321
|
+
finish(message) {
|
|
322
|
+
if (this.terminalError)
|
|
323
|
+
return Promise.reject(this.terminalError);
|
|
324
|
+
if (this.closed)
|
|
325
|
+
return Promise.reject(new Error("Shared browser foreground lease is already closed"));
|
|
326
|
+
if (this.finishPromise)
|
|
327
|
+
return this.finishPromise;
|
|
328
|
+
const port = this.port;
|
|
329
|
+
if (!port)
|
|
330
|
+
return Promise.reject(new Error("Shared browser foreground lease port is unavailable"));
|
|
331
|
+
this.listenForFinish();
|
|
332
|
+
this.finishPromise = new Promise((resolve, reject) => {
|
|
333
|
+
this.finishWaiter = { resolve, reject };
|
|
334
|
+
});
|
|
335
|
+
this.terminalRequestSent = true;
|
|
336
|
+
try {
|
|
337
|
+
port.postMessage(message);
|
|
338
|
+
}
|
|
339
|
+
catch (error) {
|
|
340
|
+
this.failFinish(toError(error));
|
|
341
|
+
}
|
|
342
|
+
return this.finishPromise;
|
|
343
|
+
}
|
|
344
|
+
listenForFinish() {
|
|
345
|
+
if (this.listeningForFinish)
|
|
346
|
+
return;
|
|
347
|
+
this.listeningForFinish = true;
|
|
348
|
+
this.port?.addEventListener("message", this.onFinishResult);
|
|
349
|
+
this.port?.addEventListener("messageerror", this.onFinishError);
|
|
350
|
+
}
|
|
351
|
+
onFinishResult = (event) => {
|
|
352
|
+
const result = event.data;
|
|
353
|
+
if (result?.type !== "foreground-node-lease-result")
|
|
354
|
+
return;
|
|
355
|
+
if (result.error)
|
|
356
|
+
this.failFinish(deserializeBrowserRelayError(result.error));
|
|
357
|
+
else {
|
|
358
|
+
this.finishWaiter?.resolve();
|
|
359
|
+
this.closeFinishPort();
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
onFinishError = () => {
|
|
363
|
+
this.failFinish(new Error("Shared browser foreground lease port message error"));
|
|
364
|
+
};
|
|
365
|
+
closeFinishPort() {
|
|
366
|
+
this.finishWaiter = null;
|
|
367
|
+
this.closed = true;
|
|
368
|
+
this.port?.removeEventListener("message", this.onFinishResult);
|
|
369
|
+
this.port?.removeEventListener("messageerror", this.onFinishError);
|
|
370
|
+
this.worker?.port.close();
|
|
371
|
+
this.port = null;
|
|
372
|
+
this.worker = null;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
export class SharedBrowserWorkerConnection {
|
|
376
|
+
callbacks;
|
|
377
|
+
worker = null;
|
|
378
|
+
readyPromise;
|
|
379
|
+
initialConfigurationAdmissionRejected = false;
|
|
380
|
+
heldByAnotherSignIn = false;
|
|
381
|
+
readyError = null;
|
|
382
|
+
connection = null;
|
|
383
|
+
closed = false;
|
|
384
|
+
workerName;
|
|
385
|
+
connectedGeneration = null;
|
|
386
|
+
cancelBootstrap = null;
|
|
387
|
+
/** Lets go of this connection's liveness lock (see `holdLivenessLock`). */
|
|
388
|
+
releaseLivenessLock = null;
|
|
389
|
+
constructor(runtime, options, fingerprint, callbacks) {
|
|
390
|
+
this.callbacks = callbacks;
|
|
391
|
+
// A physical database namespace has exactly one broker realm for a given
|
|
392
|
+
// worker asset. The physical namespace already includes the complete
|
|
393
|
+
// app/environment/auth scope, so different accounts intentionally reach
|
|
394
|
+
// separate workers and caches while same-scope tabs share one realm.
|
|
395
|
+
const runtimeSources = resolveBrowserWorkerRuntimeSources(options.runtimeSources);
|
|
396
|
+
const workerName = createBrowserSharedWorkerBaseName(runtimeSources, options.dbName);
|
|
397
|
+
this.workerName = workerName;
|
|
398
|
+
const createWorker = (name) => createBrokerSharedWorker(runtimeSources, name);
|
|
399
|
+
// Retain admission failures as state rather than leaving a process-wide
|
|
400
|
+
// bootstrap promise rejected. The manager converts this state back into
|
|
401
|
+
// the caller's `all()`/`wait()` rejection at its operation boundary; a
|
|
402
|
+
// tab which has not yet installed one must never produce an ambient
|
|
403
|
+
// unhandled-rejection event merely because its durable root is owned by
|
|
404
|
+
// another account.
|
|
405
|
+
this.readyPromise = this.connect(runtime, { ...options, runtimeSources }, fingerprint, workerName, createWorker).then(() => undefined, (error) => {
|
|
406
|
+
this.readyError = toError(error);
|
|
407
|
+
this.releaseLivenessLock?.();
|
|
408
|
+
callbacks.onFailure(this.readyError);
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* Hold a Web Lock for as long as this page lives, and name it to the
|
|
413
|
+
* worker: the browser releases it when the page goes away without a word
|
|
414
|
+
* (closed, crashed, discarded), and the worker then detaches this tab, so
|
|
415
|
+
* a tab waiting for this store under another sign-in gets in.
|
|
416
|
+
*
|
|
417
|
+
* Connecting doesn't wait for the grant, and the tab names the lock to the
|
|
418
|
+
* worker only once it holds it (`announceLivenessLock`): a worker that
|
|
419
|
+
* asked for it first would be granted it at once and drop a live tab.
|
|
420
|
+
*/
|
|
421
|
+
holdLivenessLock() {
|
|
422
|
+
const locks = globalThis.navigator?.locks;
|
|
423
|
+
if (!locks)
|
|
424
|
+
return undefined;
|
|
425
|
+
const name = `jazz-tab-alive:${crypto.randomUUID()}`;
|
|
426
|
+
let release;
|
|
427
|
+
const released = new Promise((resolve) => (release = resolve));
|
|
428
|
+
this.releaseLivenessLock = release;
|
|
429
|
+
const granted = new Promise((resolve, reject) => {
|
|
430
|
+
locks
|
|
431
|
+
.request(name, () => {
|
|
432
|
+
resolve();
|
|
433
|
+
return released;
|
|
434
|
+
})
|
|
435
|
+
.catch(reject);
|
|
436
|
+
});
|
|
437
|
+
granted.catch(() => undefined);
|
|
438
|
+
return { name, granted };
|
|
439
|
+
}
|
|
440
|
+
/** Name the held liveness lock to the worker that admitted this tab on `port`. */
|
|
441
|
+
announceLivenessLock(lock, port) {
|
|
442
|
+
void lock.granted.then(() => {
|
|
443
|
+
if (this.closed || this.worker?.port !== port)
|
|
444
|
+
return;
|
|
445
|
+
port.postMessage({
|
|
446
|
+
type: "liveness-lock",
|
|
447
|
+
name: lock.name,
|
|
448
|
+
});
|
|
449
|
+
}, () => undefined);
|
|
450
|
+
}
|
|
451
|
+
async connect(runtime, options, fingerprint, workerName, createWorker) {
|
|
452
|
+
const livenessLock = this.holdLivenessLock();
|
|
453
|
+
let generation = readWorkerGeneration(workerName);
|
|
454
|
+
for (let attempt = 0; attempt < MAX_SHARED_WORKER_GENERATION_ATTEMPTS; attempt += 1) {
|
|
455
|
+
if (this.closed)
|
|
456
|
+
return;
|
|
457
|
+
const generationName = `${workerName}:generation-${generation}`;
|
|
458
|
+
const outcome = await this.connectOnce(runtime, options, fingerprint, generationName, createWorker);
|
|
459
|
+
if (outcome.error)
|
|
460
|
+
throw outcome.error;
|
|
461
|
+
if (this.closed)
|
|
462
|
+
return;
|
|
463
|
+
if (outcome.connected) {
|
|
464
|
+
this.connectedGeneration = generation;
|
|
465
|
+
if (livenessLock && this.worker)
|
|
466
|
+
this.announceLivenessLock(livenessLock, this.worker.port);
|
|
467
|
+
return;
|
|
468
|
+
}
|
|
469
|
+
generation = advanceWorkerGeneration(workerName, generation);
|
|
470
|
+
}
|
|
471
|
+
throw new Error("Shared browser runtime did not answer after its previous realm closed");
|
|
472
|
+
}
|
|
473
|
+
connectOnce(runtime, options, fingerprint, workerName, createWorker) {
|
|
474
|
+
const worker = createWorker(workerName);
|
|
475
|
+
this.worker = worker;
|
|
476
|
+
const port = worker.port;
|
|
477
|
+
port.start();
|
|
478
|
+
return new Promise((resolve) => {
|
|
479
|
+
let settled = false;
|
|
480
|
+
let cancelled = false;
|
|
481
|
+
let closingLatePeer = false;
|
|
482
|
+
let lastTick = Date.now();
|
|
483
|
+
// A delayed alive reply is not evidence that this realm released its
|
|
484
|
+
// physical database lock. Only worker-closing authorizes a generation
|
|
485
|
+
// change; apply the bounded startup grace even before the first reply.
|
|
486
|
+
let deadline = lastTick + RUNTIME_STARTUP_TIMEOUT_MS;
|
|
487
|
+
let suspended = typeof document !== "undefined" && document.hidden;
|
|
488
|
+
let bootstrapTimer;
|
|
489
|
+
const settle = (outcome) => {
|
|
490
|
+
if (settled)
|
|
491
|
+
return;
|
|
492
|
+
settled = true;
|
|
493
|
+
stopClock();
|
|
494
|
+
if (this.cancelBootstrap === cancelForShutdown)
|
|
495
|
+
this.cancelBootstrap = null;
|
|
496
|
+
resolve(outcome);
|
|
497
|
+
};
|
|
498
|
+
const cancel = (outcome) => {
|
|
499
|
+
if (settled)
|
|
500
|
+
return;
|
|
501
|
+
cancelled = true;
|
|
502
|
+
settle(outcome);
|
|
503
|
+
// Keep the listener until the worker fences admission or publishes a
|
|
504
|
+
// late peer. Public readiness/shutdown must not await this cleanup.
|
|
505
|
+
if (this.worker === worker)
|
|
506
|
+
this.worker = null;
|
|
507
|
+
try {
|
|
508
|
+
port.postMessage({
|
|
509
|
+
type: "cancel-runtime-bootstrap",
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
catch {
|
|
513
|
+
cleanup();
|
|
514
|
+
port.close();
|
|
515
|
+
}
|
|
516
|
+
};
|
|
517
|
+
const cancelForShutdown = () => cancel({
|
|
518
|
+
connected: false,
|
|
519
|
+
error: new Error("Shared browser runtime connection is closed"),
|
|
520
|
+
});
|
|
521
|
+
this.cancelBootstrap = cancelForShutdown;
|
|
522
|
+
const refreshGrace = () => {
|
|
523
|
+
lastTick = Date.now();
|
|
524
|
+
deadline = lastTick + RUNTIME_STARTUP_TIMEOUT_MS;
|
|
525
|
+
};
|
|
526
|
+
const onVisibilityChange = () => {
|
|
527
|
+
const hidden = typeof document !== "undefined" && document.hidden;
|
|
528
|
+
if (suspended && !hidden)
|
|
529
|
+
refreshGrace();
|
|
530
|
+
suspended = hidden;
|
|
531
|
+
};
|
|
532
|
+
const onPageShow = () => refreshGrace();
|
|
533
|
+
const tick = () => {
|
|
534
|
+
const now = Date.now();
|
|
535
|
+
// A delayed task cannot distinguish a dead worker from a suspended
|
|
536
|
+
// page. Give a resumed page one fresh complete admission grace.
|
|
537
|
+
if (suspended || now - lastTick > RUNTIME_STARTUP_CLOCK_INTERVAL_MS * 2)
|
|
538
|
+
refreshGrace();
|
|
539
|
+
lastTick = now;
|
|
540
|
+
if (now >= deadline) {
|
|
541
|
+
cancel({
|
|
542
|
+
connected: false,
|
|
543
|
+
error: new BrowserWorkerUnresponsiveError("Shared browser runtime did not finish initialization within five minutes"),
|
|
544
|
+
});
|
|
545
|
+
return;
|
|
546
|
+
}
|
|
547
|
+
bootstrapTimer = setTimeout(tick, Math.min(RUNTIME_STARTUP_CLOCK_INTERVAL_MS, deadline - now));
|
|
548
|
+
};
|
|
549
|
+
const stopClock = () => {
|
|
550
|
+
clearTimeout(bootstrapTimer);
|
|
551
|
+
bootstrapTimer = undefined;
|
|
552
|
+
if (typeof document !== "undefined")
|
|
553
|
+
document.removeEventListener("visibilitychange", onVisibilityChange);
|
|
554
|
+
if (typeof window !== "undefined")
|
|
555
|
+
window.removeEventListener("pageshow", onPageShow);
|
|
556
|
+
};
|
|
557
|
+
const onMessage = (event) => {
|
|
558
|
+
if (cancelled) {
|
|
559
|
+
if (event.data?.type === "runtime-ready") {
|
|
560
|
+
if (closingLatePeer)
|
|
561
|
+
return;
|
|
562
|
+
closingLatePeer = true;
|
|
563
|
+
port.postMessage({
|
|
564
|
+
type: "close",
|
|
565
|
+
id: 0,
|
|
566
|
+
releaseContext: true,
|
|
567
|
+
});
|
|
568
|
+
return;
|
|
569
|
+
}
|
|
570
|
+
else if (event.data?.type !== "runtime-bootstrap-cancelled" &&
|
|
571
|
+
event.data?.type !== "runtime-error" &&
|
|
572
|
+
event.data?.type !== "worker-closing" &&
|
|
573
|
+
!(event.data?.type === "result" && event.data.id === 0))
|
|
574
|
+
return;
|
|
575
|
+
cleanup();
|
|
576
|
+
port.close();
|
|
577
|
+
return;
|
|
578
|
+
}
|
|
579
|
+
// Liveness is not completed initialization. A first or repeated
|
|
580
|
+
// alive reply must not restart the single startup budget.
|
|
581
|
+
if (event.data?.type === "worker-alive")
|
|
582
|
+
return;
|
|
583
|
+
if (event.data?.type === "runtime-error") {
|
|
584
|
+
cleanup();
|
|
585
|
+
port.close();
|
|
586
|
+
if (this.worker === worker)
|
|
587
|
+
this.worker = null;
|
|
588
|
+
const error = deserializeBrowserRelayError(event.data.error);
|
|
589
|
+
this.heldByAnotherSignIn = error.message === BROWSER_STORE_HELD_BY_ANOTHER_SIGN_IN;
|
|
590
|
+
this.initialConfigurationAdmissionRejected =
|
|
591
|
+
error.message === "incompatible persistent browser configuration" ||
|
|
592
|
+
this.heldByAnotherSignIn;
|
|
593
|
+
settle({ connected: false, error });
|
|
594
|
+
return;
|
|
595
|
+
}
|
|
596
|
+
if (event.data?.type === "worker-closing") {
|
|
597
|
+
cleanup();
|
|
598
|
+
port.close();
|
|
599
|
+
if (this.worker === worker)
|
|
600
|
+
this.worker = null;
|
|
601
|
+
settle({ connected: false });
|
|
602
|
+
return;
|
|
603
|
+
}
|
|
604
|
+
if (event.data?.type !== "runtime-ready")
|
|
605
|
+
return;
|
|
606
|
+
cleanup();
|
|
607
|
+
// The installed follower owns liveness from this synchronous handoff.
|
|
608
|
+
if (this.cancelBootstrap === cancelForShutdown)
|
|
609
|
+
this.cancelBootstrap = null;
|
|
610
|
+
const connection = new MessagePortBrowserFollowerConnection(runtime, port, options.sessionClaims, options.dbName, {
|
|
611
|
+
onAuthFailure: this.callbacks.onAuthFailure,
|
|
612
|
+
onAuthRestored: this.callbacks.onAuthRestored,
|
|
613
|
+
onExplicitOfflineChange: this.callbacks.onExplicitOfflineChange,
|
|
614
|
+
onRemoteLinkChange: this.callbacks.onRemoteLinkChange,
|
|
615
|
+
onFailure: this.callbacks.onFailure,
|
|
616
|
+
onStorageReset: this.callbacks.onStorageReset,
|
|
617
|
+
onStorageInvalidated: this.callbacks.onStorageInvalidated,
|
|
618
|
+
}, options.logLevel === "trace");
|
|
619
|
+
this.connection = connection;
|
|
620
|
+
void connection.ready().then(() => settle({ connected: true }), (error) => {
|
|
621
|
+
port.close();
|
|
622
|
+
if (this.connection === connection)
|
|
623
|
+
this.connection = null;
|
|
624
|
+
if (this.worker === worker)
|
|
625
|
+
this.worker = null;
|
|
626
|
+
settle({
|
|
627
|
+
connected: false,
|
|
628
|
+
error: toError(error),
|
|
629
|
+
});
|
|
630
|
+
});
|
|
631
|
+
};
|
|
632
|
+
const onMessageError = () => {
|
|
633
|
+
cleanup();
|
|
634
|
+
port.close();
|
|
635
|
+
if (this.worker === worker)
|
|
636
|
+
this.worker = null;
|
|
637
|
+
settle({
|
|
638
|
+
connected: false,
|
|
639
|
+
error: new Error("Shared browser runtime port message error"),
|
|
640
|
+
});
|
|
641
|
+
};
|
|
642
|
+
const cleanup = () => {
|
|
643
|
+
stopClock();
|
|
644
|
+
port.removeEventListener("message", onMessage);
|
|
645
|
+
port.removeEventListener("messageerror", onMessageError);
|
|
646
|
+
};
|
|
647
|
+
port.addEventListener("message", onMessage);
|
|
648
|
+
port.addEventListener("messageerror", onMessageError);
|
|
649
|
+
if (typeof document !== "undefined")
|
|
650
|
+
document.addEventListener("visibilitychange", onVisibilityChange);
|
|
651
|
+
if (typeof window !== "undefined")
|
|
652
|
+
window.addEventListener("pageshow", onPageShow);
|
|
653
|
+
bootstrapTimer = setTimeout(tick, 1_000);
|
|
654
|
+
try {
|
|
655
|
+
port.postMessage({
|
|
656
|
+
type: "connect-runtime",
|
|
657
|
+
tabId: crypto.randomUUID(),
|
|
658
|
+
fingerprint,
|
|
659
|
+
options,
|
|
660
|
+
});
|
|
661
|
+
}
|
|
662
|
+
catch (error) {
|
|
663
|
+
cleanup();
|
|
664
|
+
port.close();
|
|
665
|
+
if (this.worker === worker)
|
|
666
|
+
this.worker = null;
|
|
667
|
+
settle({
|
|
668
|
+
connected: false,
|
|
669
|
+
error: toError(error),
|
|
670
|
+
});
|
|
671
|
+
}
|
|
672
|
+
});
|
|
673
|
+
}
|
|
674
|
+
getWorkerRealmId() {
|
|
675
|
+
return this.connection?.getWorkerRealmId();
|
|
676
|
+
}
|
|
677
|
+
ready() {
|
|
678
|
+
// The constructor-owned promise always settles successfully; this is the
|
|
679
|
+
// operation boundary that turns its retained admission failure back into
|
|
680
|
+
// a normal caller-visible rejection.
|
|
681
|
+
return this.readyPromise.then(() => {
|
|
682
|
+
if (this.readyError)
|
|
683
|
+
throw this.readyError;
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
async waitForServerConnection() {
|
|
687
|
+
await this.ready();
|
|
688
|
+
await this.connection?.waitForServerConnection();
|
|
689
|
+
}
|
|
690
|
+
async updateAuth(authJson, sessionClaims) {
|
|
691
|
+
await this.ready();
|
|
692
|
+
this.connection?.updateAuth(authJson, sessionClaims);
|
|
693
|
+
}
|
|
694
|
+
async disconnect() {
|
|
695
|
+
await this.ready();
|
|
696
|
+
await this.connection?.disconnect();
|
|
697
|
+
}
|
|
698
|
+
async reconnect(authJson, sessionClaims) {
|
|
699
|
+
await this.ready();
|
|
700
|
+
await this.connection?.reconnect(authJson, sessionClaims);
|
|
701
|
+
}
|
|
702
|
+
canRetryInitialConfigurationAdmission() {
|
|
703
|
+
return this.initialConfigurationAdmissionRejected;
|
|
704
|
+
}
|
|
705
|
+
waitsForAnotherSignIn() {
|
|
706
|
+
return this.heldByAnotherSignIn;
|
|
707
|
+
}
|
|
708
|
+
async shutdown() {
|
|
709
|
+
if (this.closed)
|
|
710
|
+
return;
|
|
711
|
+
this.closed = true;
|
|
712
|
+
this.cancelBootstrap?.();
|
|
713
|
+
try {
|
|
714
|
+
await this.connection?.shutdown(true);
|
|
715
|
+
}
|
|
716
|
+
finally {
|
|
717
|
+
this.connection = null;
|
|
718
|
+
this.worker?.port.close();
|
|
719
|
+
this.worker = null;
|
|
720
|
+
this.releaseLivenessLock?.();
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
async waitForPendingWrites() {
|
|
724
|
+
await this.ready();
|
|
725
|
+
await this.connection?.waitForPendingWrites();
|
|
726
|
+
}
|
|
727
|
+
async flushLocal() {
|
|
728
|
+
await this.ready();
|
|
729
|
+
await this.connection?.flushLocal();
|
|
730
|
+
}
|
|
731
|
+
async deleteStorage() {
|
|
732
|
+
await this.ready();
|
|
733
|
+
await this.connection?.deleteStorage();
|
|
734
|
+
}
|
|
735
|
+
async openInspectorControlPort(signal) {
|
|
736
|
+
await waitForInspectorOpening(this.ready(), signal);
|
|
737
|
+
if (!this.connection)
|
|
738
|
+
throw new Error("Shared browser runtime is not connected");
|
|
739
|
+
const port = await this.connection.openInspectorControlPort(signal);
|
|
740
|
+
const generation = this.connectedGeneration;
|
|
741
|
+
if (generation !== null) {
|
|
742
|
+
installWorkerTerminationGenerationHandoff(port, this.workerName, generation);
|
|
743
|
+
}
|
|
744
|
+
return port;
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
/** @internal Keeps an acknowledged inspector restart out of its closing realm. */
|
|
748
|
+
export function installWorkerTerminationGenerationHandoff(port, workerName, generation) {
|
|
749
|
+
port.addEventListener("message", (event) => {
|
|
750
|
+
if (event.data?.type !== "result" || event.data.workerTerminated !== true)
|
|
751
|
+
return;
|
|
752
|
+
advanceWorkerGeneration(workerName, generation);
|
|
753
|
+
});
|
|
754
|
+
}
|
|
755
|
+
function readWorkerGeneration(workerName) {
|
|
756
|
+
try {
|
|
757
|
+
const generation = Number.parseInt(localStorage.getItem(workerGenerationKey(workerName)) ?? "0", 10);
|
|
758
|
+
return Number.isSafeInteger(generation) && generation >= 0 ? generation : 0;
|
|
759
|
+
}
|
|
760
|
+
catch {
|
|
761
|
+
return 0;
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
function advanceWorkerGeneration(workerName, failedGeneration) {
|
|
765
|
+
try {
|
|
766
|
+
const key = workerGenerationKey(workerName);
|
|
767
|
+
const current = readWorkerGeneration(workerName);
|
|
768
|
+
if (current === failedGeneration) {
|
|
769
|
+
localStorage.setItem(key, String(failedGeneration + 1));
|
|
770
|
+
}
|
|
771
|
+
return readWorkerGeneration(workerName);
|
|
772
|
+
}
|
|
773
|
+
catch {
|
|
774
|
+
return failedGeneration + 1;
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
function workerGenerationKey(workerName) {
|
|
778
|
+
return `jazz:shared-worker-generation:${workerName}`;
|
|
779
|
+
}
|
|
780
|
+
//# sourceMappingURL=browser-shared-worker-connection.js.map
|