jazz-tools 2.0.0-alpha.7 → 2.0.0-alpha.70
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 +135 -7
- package/bin/jazz-tools.js +101 -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 +246 -0
- package/dist/_dev/inspector-cache-runtime.js.map +1 -0
- package/dist/_dev/inspector-client.d.ts +15 -0
- package/dist/_dev/inspector-client.d.ts.map +1 -0
- package/dist/_dev/inspector-client.js +134 -0
- package/dist/_dev/inspector-client.js.map +1 -0
- package/dist/_dev/native-account-session.d.ts +23 -0
- package/dist/_dev/native-account-session.d.ts.map +1 -0
- package/dist/_dev/native-account-session.js +61 -0
- package/dist/_dev/native-account-session.js.map +1 -0
- package/dist/_dev/native-binding-codec.d.ts +9 -0
- package/dist/_dev/native-binding-codec.d.ts.map +1 -0
- package/dist/_dev/native-binding-codec.js +9 -0
- package/dist/_dev/native-binding-codec.js.map +1 -0
- package/dist/accounts/account-manager-core.d.ts +34 -0
- package/dist/accounts/account-manager-core.d.ts.map +1 -0
- package/dist/accounts/account-manager-core.js +236 -0
- package/dist/accounts/account-manager-core.js.map +1 -0
- package/dist/accounts/browser-host.d.ts +8 -0
- package/dist/accounts/browser-host.d.ts.map +1 -0
- package/dist/accounts/browser-host.js +16 -0
- package/dist/accounts/browser-host.js.map +1 -0
- package/dist/accounts/config-capability.d.ts +26 -0
- package/dist/accounts/config-capability.d.ts.map +1 -0
- package/dist/accounts/config-capability.js +58 -0
- package/dist/accounts/config-capability.js.map +1 -0
- package/dist/accounts/context.d.ts +14 -0
- package/dist/accounts/context.d.ts.map +1 -0
- package/dist/accounts/context.js +214 -0
- package/dist/accounts/context.js.map +1 -0
- package/dist/accounts/create-account-manager.d.ts +57 -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 +95 -0
- package/dist/accounts/enrollment.d.ts.map +1 -0
- package/dist/accounts/enrollment.js +314 -0
- package/dist/accounts/enrollment.js.map +1 -0
- package/dist/accounts/exports.d.ts +3 -0
- package/dist/accounts/exports.d.ts.map +1 -0
- package/dist/accounts/exports.js +5 -0
- package/dist/accounts/exports.js.map +1 -0
- package/dist/accounts/local-first.d.ts +17 -0
- package/dist/accounts/local-first.d.ts.map +1 -0
- package/dist/accounts/local-first.js +62 -0
- package/dist/accounts/local-first.js.map +1 -0
- package/dist/accounts/persistence.d.ts +79 -0
- package/dist/accounts/persistence.d.ts.map +1 -0
- package/dist/accounts/persistence.js +533 -0
- package/dist/accounts/persistence.js.map +1 -0
- package/dist/accounts/process-store.d.ts +27 -0
- package/dist/accounts/process-store.d.ts.map +1 -0
- package/dist/accounts/process-store.js +49 -0
- package/dist/accounts/process-store.js.map +1 -0
- package/dist/accounts/registry-client.d.ts +79 -0
- package/dist/accounts/registry-client.d.ts.map +1 -0
- package/dist/accounts/registry-client.js +153 -0
- package/dist/accounts/registry-client.js.map +1 -0
- package/dist/accounts/state.d.ts +76 -0
- package/dist/accounts/state.d.ts.map +1 -0
- package/dist/accounts/state.js +172 -0
- package/dist/accounts/state.js.map +1 -0
- package/dist/app-file-enums.d.ts +9 -0
- package/dist/app-file-enums.d.ts.map +1 -0
- package/dist/app-file-enums.js +34 -0
- package/dist/app-file-enums.js.map +1 -0
- package/dist/authoring.d.ts +9 -0
- package/dist/authoring.d.ts.map +1 -0
- package/dist/authoring.js +9 -0
- package/dist/authoring.js.map +1 -0
- package/dist/backend/admission.d.ts +28 -0
- package/dist/backend/admission.d.ts.map +1 -0
- package/dist/backend/admission.js +146 -0
- package/dist/backend/admission.js.map +1 -0
- package/dist/backend/api.d.ts +13 -0
- package/dist/backend/api.d.ts.map +1 -0
- package/dist/backend/api.js +13 -0
- package/dist/backend/api.js.map +1 -0
- package/dist/backend/backend-clients.d.ts +76 -0
- package/dist/backend/backend-clients.d.ts.map +1 -0
- package/dist/backend/backend-clients.js +237 -0
- package/dist/backend/backend-clients.js.map +1 -0
- package/dist/backend/backend-issuer.d.ts +6 -0
- package/dist/backend/backend-issuer.d.ts.map +1 -0
- package/dist/backend/backend-issuer.js +6 -0
- package/dist/backend/backend-issuer.js.map +1 -0
- package/dist/backend/backend-native.d.ts +40 -0
- package/dist/backend/backend-native.d.ts.map +1 -0
- package/dist/backend/backend-native.js +37 -0
- package/dist/backend/backend-native.js.map +1 -0
- package/dist/backend/blobs.d.ts +130 -0
- package/dist/backend/blobs.d.ts.map +1 -0
- package/dist/backend/blobs.js +132 -0
- package/dist/backend/blobs.js.map +1 -0
- package/dist/backend/core-transport.d.ts +61 -0
- package/dist/backend/core-transport.d.ts.map +1 -0
- package/dist/backend/core-transport.js +106 -0
- package/dist/backend/core-transport.js.map +1 -0
- package/dist/backend/create-jazz-context.d.ts +123 -0
- package/dist/backend/create-jazz-context.d.ts.map +1 -0
- package/dist/backend/create-jazz-context.js +716 -0
- package/dist/backend/create-jazz-context.js.map +1 -0
- package/dist/backend/create-jazz-session.d.ts +125 -0
- package/dist/backend/create-jazz-session.d.ts.map +1 -0
- package/dist/backend/create-jazz-session.js +528 -0
- package/dist/backend/create-jazz-session.js.map +1 -0
- package/dist/backend/create-jazz.d.ts +683 -0
- package/dist/backend/create-jazz.d.ts.map +1 -0
- package/dist/backend/create-jazz.js +4076 -0
- package/dist/backend/create-jazz.js.map +1 -0
- package/dist/backend/early-db.d.ts +29 -0
- package/dist/backend/early-db.d.ts.map +1 -0
- package/dist/backend/early-db.js +203 -0
- package/dist/backend/early-db.js.map +1 -0
- package/dist/backend/external-jwt.d.ts +27 -0
- package/dist/backend/external-jwt.d.ts.map +1 -0
- package/dist/backend/external-jwt.js +404 -0
- package/dist/backend/external-jwt.js.map +1 -0
- package/dist/backend/from-jwt.d.ts +64 -0
- package/dist/backend/from-jwt.d.ts.map +1 -0
- package/dist/backend/from-jwt.js +104 -0
- package/dist/backend/from-jwt.js.map +1 -0
- package/dist/backend/index.d.ts +6 -1
- package/dist/backend/index.d.ts.map +1 -1
- package/dist/backend/index.js +18 -1
- package/dist/backend/index.js.map +1 -1
- package/dist/backend/inspect-ui.d.ts +14 -0
- package/dist/backend/inspect-ui.d.ts.map +1 -0
- package/dist/backend/inspect-ui.js +156 -0
- package/dist/backend/inspect-ui.js.map +1 -0
- package/dist/backend/inspect.d.ts +133 -0
- package/dist/backend/inspect.d.ts.map +1 -0
- package/dist/backend/inspect.js +1001 -0
- package/dist/backend/inspect.js.map +1 -0
- package/dist/backend/inspector-ui/0.js +2 -0
- package/dist/backend/inspector-ui/1.js +2 -0
- package/dist/backend/inspector-ui/10.js +2 -0
- package/dist/backend/inspector-ui/11.js +2 -0
- package/dist/backend/inspector-ui/12.js +2 -0
- package/dist/backend/inspector-ui/13.js +2 -0
- package/dist/backend/inspector-ui/14.js +2 -0
- package/dist/backend/inspector-ui/15.js +2 -0
- package/dist/backend/inspector-ui/16.js +2 -0
- package/dist/backend/inspector-ui/17.js +2 -0
- package/dist/backend/inspector-ui/18.js +2 -0
- package/dist/backend/inspector-ui/19.js +2 -0
- package/dist/backend/inspector-ui/2.js +2 -0
- package/dist/backend/inspector-ui/20.js +2 -0
- package/dist/backend/inspector-ui/21.js +2 -0
- package/dist/backend/inspector-ui/3.js +2 -0
- package/dist/backend/inspector-ui/4.js +2 -0
- package/dist/backend/inspector-ui/5.js +2 -0
- package/dist/backend/inspector-ui/6.js +2 -0
- package/dist/backend/inspector-ui/7.js +2 -0
- package/dist/backend/inspector-ui/8.js +2 -0
- package/dist/backend/inspector-ui/9.js +2 -0
- package/dist/backend/inspector-ui-files.d.ts +4 -0
- package/dist/backend/inspector-ui-files.d.ts.map +1 -0
- package/dist/backend/inspector-ui-files.js +26 -0
- package/dist/backend/no-account-error.d.ts +23 -0
- package/dist/backend/no-account-error.d.ts.map +1 -0
- package/dist/backend/no-account-error.js +30 -0
- package/dist/backend/no-account-error.js.map +1 -0
- package/dist/backend/node-native.d.ts +3 -0
- package/dist/backend/node-native.d.ts.map +1 -0
- package/dist/backend/node-native.js +19 -0
- package/dist/backend/node-native.js.map +1 -0
- package/dist/backend/node-peers.d.ts +10 -0
- package/dist/backend/node-peers.d.ts.map +1 -0
- package/dist/backend/node-peers.js +37 -0
- package/dist/backend/node-peers.js.map +1 -0
- package/dist/backend/optional-peer.d.ts +9 -0
- package/dist/backend/optional-peer.d.ts.map +1 -0
- package/dist/backend/optional-peer.js +24 -0
- package/dist/backend/optional-peer.js.map +1 -0
- package/dist/backend/request-auth.d.ts +69 -0
- package/dist/backend/request-auth.d.ts.map +1 -0
- package/dist/backend/request-auth.js +122 -0
- package/dist/backend/request-auth.js.map +1 -0
- package/dist/backend/session-expiry.d.ts +61 -0
- package/dist/backend/session-expiry.d.ts.map +1 -0
- package/dist/backend/session-expiry.js +102 -0
- package/dist/backend/session-expiry.js.map +1 -0
- package/dist/backend/signing-key.d.ts +32 -0
- package/dist/backend/signing-key.d.ts.map +1 -0
- package/dist/backend/signing-key.js +63 -0
- package/dist/backend/signing-key.js.map +1 -0
- package/dist/backend/socket-deadline.d.ts +23 -0
- package/dist/backend/socket-deadline.d.ts.map +1 -0
- package/dist/backend/socket-deadline.js +70 -0
- package/dist/backend/socket-deadline.js.map +1 -0
- package/dist/backend/store-log.d.ts +3 -0
- package/dist/backend/store-log.d.ts.map +1 -0
- package/dist/backend/store-log.js +16 -0
- package/dist/backend/store-log.js.map +1 -0
- package/dist/backend/thin-relay.d.ts +66 -0
- package/dist/backend/thin-relay.d.ts.map +1 -0
- package/dist/backend/thin-relay.js +204 -0
- package/dist/backend/thin-relay.js.map +1 -0
- package/dist/backend/thin-session-client.d.ts +23 -0
- package/dist/backend/thin-session-client.d.ts.map +1 -0
- package/dist/backend/thin-session-client.js +69 -0
- package/dist/backend/thin-session-client.js.map +1 -0
- package/dist/backend/upgrade-status.d.ts +19 -0
- package/dist/backend/upgrade-status.d.ts.map +1 -0
- package/dist/backend/upgrade-status.js +55 -0
- package/dist/backend/upgrade-status.js.map +1 -0
- package/dist/backend/vercel-store.d.ts +345 -0
- package/dist/backend/vercel-store.d.ts.map +1 -0
- package/dist/backend/vercel-store.js +1387 -0
- package/dist/backend/vercel-store.js.map +1 -0
- package/dist/backend/workerd-backend.d.ts +36 -0
- package/dist/backend/workerd-backend.d.ts.map +1 -0
- package/dist/backend/workerd-backend.js +97 -0
- package/dist/backend/workerd-backend.js.map +1 -0
- package/dist/backend/workerd.d.ts +3 -0
- package/dist/backend/workerd.d.ts.map +1 -0
- package/dist/backend/workerd.js +39 -0
- package/dist/backend/workerd.js.map +1 -0
- package/dist/backend/ws-peer.d.ts +32 -0
- package/dist/backend/ws-peer.d.ts.map +1 -0
- package/dist/backend/ws-peer.js +41 -0
- package/dist/backend/ws-peer.js.map +1 -0
- package/dist/better-auth-adapter/fixtures/app.d.ts +151 -0
- package/dist/better-auth-adapter/fixtures/app.d.ts.map +1 -0
- package/dist/better-auth-adapter/fixtures/app.js +13 -0
- package/dist/better-auth-adapter/fixtures/app.js.map +1 -0
- package/dist/better-auth-adapter/fixtures/issuer-upgrade.d.ts +20 -0
- package/dist/better-auth-adapter/fixtures/issuer-upgrade.d.ts.map +1 -0
- package/dist/better-auth-adapter/fixtures/issuer-upgrade.js +27 -0
- package/dist/better-auth-adapter/fixtures/issuer-upgrade.js.map +1 -0
- package/dist/better-auth-adapter/index.d.ts +13 -0
- package/dist/better-auth-adapter/index.d.ts.map +1 -0
- package/dist/better-auth-adapter/index.js +406 -0
- package/dist/better-auth-adapter/index.js.map +1 -0
- package/dist/better-auth-adapter/indexes.d.ts +9 -0
- package/dist/better-auth-adapter/indexes.d.ts.map +1 -0
- package/dist/better-auth-adapter/indexes.js +40 -0
- package/dist/better-auth-adapter/indexes.js.map +1 -0
- package/dist/better-auth-adapter/schema.d.ts +88 -0
- package/dist/better-auth-adapter/schema.d.ts.map +1 -0
- package/dist/better-auth-adapter/schema.js +332 -0
- package/dist/better-auth-adapter/schema.js.map +1 -0
- package/dist/better-auth-adapter/types.d.ts +13 -0
- package/dist/better-auth-adapter/types.d.ts.map +1 -0
- package/dist/better-auth-adapter/types.js +2 -0
- package/dist/better-auth-adapter/types.js.map +1 -0
- package/dist/better-auth-adapter/utils.d.ts +53 -0
- package/dist/better-auth-adapter/utils.d.ts.map +1 -0
- package/dist/better-auth-adapter/utils.js +126 -0
- package/dist/better-auth-adapter/utils.js.map +1 -0
- package/dist/browser-benchmark-mode.d.ts +6 -0
- package/dist/browser-benchmark-mode.d.ts.map +1 -0
- package/dist/browser-benchmark-mode.js +13 -0
- package/dist/browser-benchmark-mode.js.map +1 -0
- package/dist/classic-api.d.ts +59 -0
- package/dist/classic-api.d.ts.map +1 -0
- package/dist/classic-api.js +122 -0
- package/dist/classic-api.js.map +1 -0
- package/dist/cli.d.ts +39 -2
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +471 -265
- package/dist/cli.js.map +1 -1
- package/dist/client/index.d.ts +10 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +7 -0
- package/dist/client/index.js.map +1 -0
- package/dist/cloud/api.d.ts +11 -0
- package/dist/cloud/api.d.ts.map +1 -0
- package/dist/cloud/api.js +46 -0
- package/dist/cloud/api.js.map +1 -0
- package/dist/cloud/commands.d.ts +13 -0
- package/dist/cloud/commands.d.ts.map +1 -0
- package/dist/cloud/commands.js +425 -0
- package/dist/cloud/commands.js.map +1 -0
- package/dist/cloud/credentials.d.ts +49 -0
- package/dist/cloud/credentials.d.ts.map +1 -0
- package/dist/cloud/credentials.js +219 -0
- package/dist/cloud/credentials.js.map +1 -0
- package/dist/cloud/session.d.ts +57 -0
- package/dist/cloud/session.d.ts.map +1 -0
- package/dist/cloud/session.js +269 -0
- package/dist/cloud/session.js.map +1 -0
- package/dist/codegen/relation-analyzer.d.ts +5 -12
- package/dist/codegen/relation-analyzer.d.ts.map +1 -1
- package/dist/codegen/relation-analyzer.js +54 -65
- package/dist/codegen/relation-analyzer.js.map +1 -1
- package/dist/dev/app-files.d.ts +32 -0
- package/dist/dev/app-files.d.ts.map +1 -0
- package/dist/dev/app-files.js +72 -0
- package/dist/dev/app-files.js.map +1 -0
- package/dist/dev/catalogue-api.d.ts +147 -0
- package/dist/dev/catalogue-api.d.ts.map +1 -0
- package/dist/dev/catalogue-api.js +130 -0
- package/dist/dev/catalogue-api.js.map +1 -0
- package/dist/dev/catalogue.d.ts +69 -0
- package/dist/dev/catalogue.d.ts.map +1 -0
- package/dist/dev/catalogue.js +70 -0
- package/dist/dev/catalogue.js.map +1 -0
- package/dist/dev/codegen-napi.d.ts +139 -0
- package/dist/dev/codegen-napi.d.ts.map +1 -0
- package/dist/dev/codegen-napi.js +157 -0
- package/dist/dev/codegen-napi.js.map +1 -0
- package/dist/dev/dev-server.d.ts +62 -0
- package/dist/dev/dev-server.d.ts.map +1 -0
- package/dist/dev/dev-server.js +164 -0
- package/dist/dev/dev-server.js.map +1 -0
- package/dist/dev/index.d.ts +3 -0
- package/dist/dev/index.d.ts.map +1 -0
- package/dist/dev/index.js +3 -0
- package/dist/dev/index.js.map +1 -0
- package/dist/dev/inspector-overlay/browser-control-registry.d.ts +10 -0
- package/dist/dev/inspector-overlay/browser-control-registry.d.ts.map +1 -0
- package/dist/dev/inspector-overlay/browser-control-registry.js +188 -0
- package/dist/dev/inspector-overlay/browser-control-registry.js.map +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/ExportResult-C0ZojfNk.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/backend-0Idv0niF.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/backend-DHeT1LCS.css +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/create-legacy-browser-delegate-DeI8PAZ5.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/diag-api-3Z_Eel3W.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/esm-BB6DtWpZ.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/esm-B_xpsQL2.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/esm-CE7mSo95.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/esm-CcBEG-yV.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/esm-DZrCzNXM.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/esm-k373aadI.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/index-D3RK8wNj.js +5 -0
- package/dist/dev/inspector-overlay/embedded/assets/jazz-broker-worker-EyaWhBtz.js +5 -0
- package/dist/dev/inspector-overlay/embedded/assets/jazz_wasm-O10pptvY.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/jazz_wasm_bg-wI43fvvq.wasm +0 -0
- package/dist/dev/inspector-overlay/embedded/assets/node-foreground-node-lease.browser-2mfp13Qb.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/rolldown-runtime-XKyaHtl9.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/src-4JwhxZaW.js +16 -0
- package/dist/dev/inspector-overlay/embedded/assets/src-Cq8gSOLx.css +1 -0
- package/dist/dev/inspector-overlay/embedded/backend.html +17 -0
- package/dist/dev/inspector-overlay/embedded/embedded.html +15 -0
- package/dist/dev/inspector-overlay/embedded/favicon.ico +0 -0
- package/dist/dev/inspector-overlay/host-bridge.d.ts +8 -0
- package/dist/dev/inspector-overlay/host-bridge.d.ts.map +1 -0
- package/dist/dev/inspector-overlay/host-bridge.js +139 -0
- package/dist/dev/inspector-overlay/host-bridge.js.map +1 -0
- package/dist/dev/inspector-overlay/inspector-host-types.d.ts +35 -0
- package/dist/dev/inspector-overlay/inspector-host-types.d.ts.map +1 -0
- package/dist/dev/inspector-overlay/inspector-host-types.js +10 -0
- package/dist/dev/inspector-overlay/inspector-host-types.js.map +1 -0
- package/dist/dev/inspector-overlay/loader.d.ts +24 -0
- package/dist/dev/inspector-overlay/loader.d.ts.map +1 -0
- package/dist/dev/inspector-overlay/loader.js +533 -0
- package/dist/dev/inspector-overlay/loader.js.map +1 -0
- package/dist/dev/migration-graph.d.ts +32 -0
- package/dist/dev/migration-graph.d.ts.map +1 -0
- package/dist/dev/migration-graph.js +136 -0
- package/dist/dev/migration-graph.js.map +1 -0
- package/dist/dev/migrations.d.ts +145 -0
- package/dist/dev/migrations.d.ts.map +1 -0
- package/dist/dev/migrations.js +700 -0
- package/dist/dev/migrations.js.map +1 -0
- package/dist/dev/project.d.ts +65 -0
- package/dist/dev/project.d.ts.map +1 -0
- package/dist/dev/project.js +179 -0
- package/dist/dev/project.js.map +1 -0
- package/dist/dev/schema-utils.d.ts +8 -0
- package/dist/dev/schema-utils.d.ts.map +1 -0
- package/dist/dev/schema-utils.js +75 -0
- package/dist/dev/schema-utils.js.map +1 -0
- package/dist/dev/schema-validation.d.ts +5 -0
- package/dist/dev/schema-validation.d.ts.map +1 -0
- package/dist/dev/schema-validation.js +11 -0
- package/dist/dev/schema-validation.js.map +1 -0
- package/dist/dev/ts-project.d.ts +77 -0
- package/dist/dev/ts-project.d.ts.map +1 -0
- package/dist/dev/ts-project.js +190 -0
- package/dist/dev/ts-project.js.map +1 -0
- package/dist/drivers/index.d.ts +1 -1
- package/dist/drivers/index.d.ts.map +1 -1
- package/dist/drivers/index.js.map +1 -1
- package/dist/drivers/schema-wire.d.ts +21 -0
- package/dist/drivers/schema-wire.d.ts.map +1 -0
- package/dist/drivers/schema-wire.js +67 -0
- package/dist/drivers/schema-wire.js.map +1 -0
- package/dist/drivers/types.d.ts +315 -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 +276 -121
- package/dist/dsl.d.ts.map +1 -1
- package/dist/dsl.js +196 -160
- package/dist/dsl.js.map +1 -1
- package/dist/durable-object/index.d.ts +26 -0
- package/dist/durable-object/index.d.ts.map +1 -0
- package/dist/durable-object/index.js +26 -0
- package/dist/durable-object/index.js.map +1 -0
- package/dist/e2ee/SODIUM-LICENSE.txt +36 -0
- package/dist/e2ee/SODIUM-SOURCES.json +4 -0
- package/dist/e2ee/browser.d.ts +18 -0
- package/dist/e2ee/browser.d.ts.map +1 -0
- package/dist/e2ee/browser.js +111 -0
- package/dist/e2ee/browser.js.map +1 -0
- package/dist/e2ee/context.d.ts +23 -0
- package/dist/e2ee/context.d.ts.map +1 -0
- package/dist/e2ee/context.js +49 -0
- package/dist/e2ee/context.js.map +1 -0
- package/dist/e2ee/crypto.d.ts +10 -0
- package/dist/e2ee/crypto.d.ts.map +1 -0
- package/dist/e2ee/crypto.js +22 -0
- package/dist/e2ee/crypto.js.map +1 -0
- package/dist/e2ee/envelope.d.ts +22 -0
- package/dist/e2ee/envelope.d.ts.map +1 -0
- package/dist/e2ee/envelope.js +52 -0
- package/dist/e2ee/envelope.js.map +1 -0
- package/dist/e2ee/index.d.ts +14 -0
- package/dist/e2ee/index.d.ts.map +1 -0
- package/dist/e2ee/index.js +3 -0
- package/dist/e2ee/index.js.map +1 -0
- package/dist/e2ee/large-value.d.ts +20 -0
- package/dist/e2ee/large-value.d.ts.map +1 -0
- package/dist/e2ee/large-value.js +204 -0
- package/dist/e2ee/large-value.js.map +1 -0
- package/dist/e2ee/native.d.ts +18 -0
- package/dist/e2ee/native.d.ts.map +1 -0
- package/dist/e2ee/native.js +91 -0
- package/dist/e2ee/native.js.map +1 -0
- package/dist/e2ee/record-frame.d.ts +3 -0
- package/dist/e2ee/record-frame.d.ts.map +1 -0
- package/dist/e2ee/record-frame.js +18 -0
- package/dist/e2ee/record-frame.js.map +1 -0
- package/dist/e2ee/signer.d.ts +10 -0
- package/dist/e2ee/signer.d.ts.map +1 -0
- package/dist/e2ee/signer.js +54 -0
- package/dist/e2ee/signer.js.map +1 -0
- package/dist/e2ee/sodium-browser.d.ts +2 -0
- package/dist/e2ee/sodium-browser.d.ts.map +1 -0
- package/dist/e2ee/sodium-browser.js +3432 -0
- package/dist/e2ee/sodium.d.ts +20 -0
- package/dist/e2ee/sodium.d.ts.map +1 -0
- package/dist/e2ee/sodium.js +165 -0
- package/dist/e2ee/sodium.js.map +1 -0
- package/dist/e2ee/types.d.ts +92 -0
- package/dist/e2ee/types.d.ts.map +1 -0
- package/dist/e2ee/types.js +2 -0
- package/dist/e2ee/types.js.map +1 -0
- package/dist/effect/backend/index.d.ts +8 -0
- package/dist/effect/backend/index.d.ts.map +1 -0
- package/dist/effect/backend/index.js +8 -0
- package/dist/effect/backend/index.js.map +1 -0
- package/dist/effect/errors.d.ts +53 -0
- package/dist/effect/errors.d.ts.map +1 -0
- package/dist/effect/errors.js +61 -0
- package/dist/effect/errors.js.map +1 -0
- package/dist/effect/index.d.ts +9 -0
- package/dist/effect/index.d.ts.map +1 -0
- package/dist/effect/index.js +9 -0
- package/dist/effect/index.js.map +1 -0
- package/dist/effect/jazz-backend.d.ts +69 -0
- package/dist/effect/jazz-backend.d.ts.map +1 -0
- package/dist/effect/jazz-backend.js +95 -0
- package/dist/effect/jazz-backend.js.map +1 -0
- package/dist/effect/jazz.d.ts +129 -0
- package/dist/effect/jazz.d.ts.map +1 -0
- package/dist/effect/jazz.js +182 -0
- package/dist/effect/jazz.js.map +1 -0
- package/dist/expo/create-account-manager.d.ts +28 -0
- package/dist/expo/create-account-manager.d.ts.map +1 -0
- package/dist/expo/create-account-manager.js +35 -0
- package/dist/expo/create-account-manager.js.map +1 -0
- package/dist/expo/create-jazz-session.d.ts +66 -0
- package/dist/expo/create-jazz-session.d.ts.map +1 -0
- package/dist/expo/create-jazz-session.js +96 -0
- package/dist/expo/create-jazz-session.js.map +1 -0
- package/dist/expo/index.d.ts +13 -0
- package/dist/expo/index.d.ts.map +1 -0
- package/dist/expo/index.js +12 -0
- package/dist/expo/index.js.map +1 -0
- package/dist/expo/metro.d.ts +20 -0
- package/dist/expo/metro.d.ts.map +1 -0
- package/dist/expo/metro.js +58 -0
- package/dist/expo/metro.js.map +1 -0
- package/dist/expo/polyfills.d.ts +2 -0
- package/dist/expo/polyfills.d.ts.map +1 -0
- package/dist/expo/polyfills.js +5 -0
- package/dist/expo/polyfills.js.map +1 -0
- package/dist/expo/provider.d.ts +10 -0
- package/dist/expo/provider.d.ts.map +1 -0
- package/dist/expo/provider.js +11 -0
- package/dist/expo/provider.js.map +1 -0
- package/dist/index.d.ts +23 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -11
- package/dist/index.js.map +1 -1
- package/dist/inspect/cli.d.ts +12 -0
- package/dist/inspect/cli.d.ts.map +1 -0
- package/dist/inspect/cli.js +320 -0
- package/dist/inspect/cli.js.map +1 -0
- package/dist/inspect/client.d.ts +67 -0
- package/dist/inspect/client.d.ts.map +1 -0
- package/dist/inspect/client.js +254 -0
- package/dist/inspect/client.js.map +1 -0
- package/dist/inspect/mcp.d.ts +28 -0
- package/dist/inspect/mcp.d.ts.map +1 -0
- package/dist/inspect/mcp.js +441 -0
- package/dist/inspect/mcp.js.map +1 -0
- package/dist/inspect/protocol.d.ts +317 -0
- package/dist/inspect/protocol.d.ts.map +1 -0
- package/dist/inspect/protocol.js +544 -0
- package/dist/inspect/protocol.js.map +1 -0
- package/dist/inspector/index.d.ts +10 -0
- package/dist/inspector/index.d.ts.map +1 -0
- package/dist/inspector/index.js +27 -0
- package/dist/inspector/index.js.map +1 -0
- package/dist/internal/inspector-query.d.ts +6 -0
- package/dist/internal/inspector-query.d.ts.map +1 -0
- package/dist/internal/inspector-query.js +20 -0
- package/dist/internal/inspector-query.js.map +1 -0
- package/dist/ir.d.ts +143 -115
- package/dist/ir.d.ts.map +1 -1
- package/dist/ir.js +509 -1
- package/dist/ir.js.map +1 -1
- package/dist/json-value.d.ts +6 -0
- package/dist/json-value.d.ts.map +1 -0
- package/dist/json-value.js +2 -0
- package/dist/json-value.js.map +1 -0
- package/dist/local-first/index.d.ts +18 -0
- package/dist/local-first/index.d.ts.map +1 -0
- package/dist/local-first/index.js +17 -0
- package/dist/local-first/index.js.map +1 -0
- package/dist/local-first-auth/browser.d.ts +18 -0
- package/dist/local-first-auth/browser.d.ts.map +1 -0
- package/dist/local-first-auth/browser.js +26 -0
- package/dist/local-first-auth/browser.js.map +1 -0
- package/dist/local-first-auth/encoding.d.ts +10 -0
- package/dist/local-first-auth/encoding.d.ts.map +1 -0
- package/dist/local-first-auth/encoding.js +38 -0
- package/dist/local-first-auth/encoding.js.map +1 -0
- package/dist/local-first-auth/identity.d.ts +73 -0
- package/dist/local-first-auth/identity.d.ts.map +1 -0
- package/dist/local-first-auth/identity.js +258 -0
- package/dist/local-first-auth/identity.js.map +1 -0
- package/dist/local-first-auth/index.d.ts +6 -0
- package/dist/local-first-auth/index.d.ts.map +1 -0
- package/dist/local-first-auth/index.js +4 -0
- package/dist/local-first-auth/index.js.map +1 -0
- package/dist/local-first-auth/passkey.d.ts +22 -0
- package/dist/local-first-auth/passkey.d.ts.map +1 -0
- package/dist/local-first-auth/passkey.js +116 -0
- package/dist/local-first-auth/passkey.js.map +1 -0
- package/dist/local-first-auth/recovery-phrase.d.ts +10 -0
- package/dist/local-first-auth/recovery-phrase.d.ts.map +1 -0
- package/dist/local-first-auth/recovery-phrase.js +59 -0
- package/dist/local-first-auth/recovery-phrase.js.map +1 -0
- package/dist/local-first-auth/secret.d.ts +25 -0
- package/dist/local-first-auth/secret.d.ts.map +1 -0
- package/dist/local-first-auth/secret.js +68 -0
- package/dist/local-first-auth/secret.js.map +1 -0
- package/dist/local-first-auth/server.d.ts +13 -0
- package/dist/local-first-auth/server.d.ts.map +1 -0
- package/dist/local-first-auth/server.js +32 -0
- package/dist/local-first-auth/server.js.map +1 -0
- package/dist/local-first-auth/store.d.ts +51 -0
- package/dist/local-first-auth/store.d.ts.map +1 -0
- package/dist/local-first-auth/store.js +112 -0
- package/dist/local-first-auth/store.js.map +1 -0
- package/dist/magic-columns.d.ts +40 -0
- package/dist/magic-columns.d.ts.map +1 -0
- package/dist/magic-columns.js +110 -0
- package/dist/magic-columns.js.map +1 -0
- package/dist/migration-namespace.d.ts +12 -0
- package/dist/migration-namespace.d.ts.map +1 -0
- package/dist/migration-namespace.js +13 -0
- package/dist/migration-namespace.js.map +1 -0
- package/dist/migrations.d.ts +286 -0
- package/dist/migrations.d.ts.map +1 -0
- package/dist/migrations.js +188 -0
- package/dist/migrations.js.map +1 -0
- package/dist/module-interop.d.ts +17 -0
- package/dist/module-interop.d.ts.map +1 -0
- package/dist/module-interop.js +32 -0
- package/dist/module-interop.js.map +1 -0
- package/dist/observed-jazz-client.d.ts +15 -0
- package/dist/observed-jazz-client.d.ts.map +1 -0
- package/dist/observed-jazz-client.js +47 -0
- package/dist/observed-jazz-client.js.map +1 -0
- package/dist/passkey-backup.d.ts +3 -0
- package/dist/passkey-backup.d.ts.map +1 -0
- package/dist/passkey-backup.js +2 -0
- package/dist/passkey-backup.js.map +1 -0
- package/dist/passphrase.d.ts +2 -0
- package/dist/passphrase.d.ts.map +1 -0
- package/dist/passphrase.js +2 -0
- package/dist/passphrase.js.map +1 -0
- package/dist/permissions/__fixtures__/big-label-better-auth.d.ts +89 -0
- package/dist/permissions/__fixtures__/big-label-better-auth.d.ts.map +1 -0
- package/dist/permissions/__fixtures__/big-label-better-auth.js +62 -0
- package/dist/permissions/__fixtures__/big-label-better-auth.js.map +1 -0
- package/dist/permissions/__fixtures__/big-label.d.ts +332 -0
- package/dist/permissions/__fixtures__/big-label.d.ts.map +1 -0
- package/dist/permissions/__fixtures__/big-label.js +177 -0
- package/dist/permissions/__fixtures__/big-label.js.map +1 -0
- package/dist/permissions/__fixtures__/chat-react.d.ts +112 -0
- package/dist/permissions/__fixtures__/chat-react.d.ts.map +1 -0
- package/dist/permissions/__fixtures__/chat-react.js +51 -0
- package/dist/permissions/__fixtures__/chat-react.js.map +1 -0
- package/dist/permissions/compile.d.ts +182 -0
- package/dist/permissions/compile.d.ts.map +1 -0
- package/dist/permissions/compile.js +715 -0
- package/dist/permissions/compile.js.map +1 -0
- package/dist/permissions/dsl.d.ts +158 -0
- package/dist/permissions/dsl.d.ts.map +1 -0
- package/dist/permissions/dsl.js +391 -0
- package/dist/permissions/dsl.js.map +1 -0
- package/dist/permissions/index.d.ts +4 -145
- package/dist/permissions/index.d.ts.map +1 -1
- package/dist/permissions/index.js +10 -1185
- package/dist/permissions/index.js.map +1 -1
- package/dist/permissions/relation.d.ts +84 -0
- package/dist/permissions/relation.d.ts.map +1 -0
- package/dist/permissions/relation.js +150 -0
- package/dist/permissions/relation.js.map +1 -0
- package/dist/permissions/types.d.ts +357 -0
- package/dist/permissions/types.d.ts.map +1 -0
- package/dist/permissions/types.js +5 -0
- package/dist/permissions/types.js.map +1 -0
- package/dist/printer/app-json.d.ts +96 -0
- package/dist/printer/app-json.d.ts.map +1 -0
- package/dist/printer/app-json.js +18 -0
- package/dist/printer/app-json.js.map +1 -0
- package/dist/printer/cli.d.ts +15 -0
- package/dist/printer/cli.d.ts.map +1 -0
- package/dist/printer/cli.js +76 -0
- package/dist/printer/cli.js.map +1 -0
- package/dist/printer/defs.d.ts +11 -0
- package/dist/printer/defs.d.ts.map +1 -0
- package/dist/printer/defs.js +123 -0
- package/dist/printer/defs.js.map +1 -0
- package/dist/printer/expr.d.ts +281 -0
- package/dist/printer/expr.d.ts.map +1 -0
- package/dist/printer/expr.js +940 -0
- package/dist/printer/expr.js.map +1 -0
- package/dist/printer/format.d.ts +17 -0
- package/dist/printer/format.d.ts.map +1 -0
- package/dist/printer/format.js +315 -0
- package/dist/printer/format.js.map +1 -0
- package/dist/printer/index.d.ts +31 -0
- package/dist/printer/index.d.ts.map +1 -0
- package/dist/printer/index.js +48 -0
- package/dist/printer/index.js.map +1 -0
- package/dist/printer/migrations.d.ts +28 -0
- package/dist/printer/migrations.d.ts.map +1 -0
- package/dist/printer/migrations.js +179 -0
- package/dist/printer/migrations.js.map +1 -0
- package/dist/printer/names.d.ts +17 -0
- package/dist/printer/names.d.ts.map +1 -0
- package/dist/printer/names.js +124 -0
- package/dist/printer/names.js.map +1 -0
- package/dist/printer/permissions.d.ts +60 -0
- package/dist/printer/permissions.d.ts.map +1 -0
- package/dist/printer/permissions.js +1167 -0
- package/dist/printer/permissions.js.map +1 -0
- package/dist/printer/schema.d.ts +18 -0
- package/dist/printer/schema.d.ts.map +1 -0
- package/dist/printer/schema.js +132 -0
- package/dist/printer/schema.js.map +1 -0
- package/dist/prosemirror/anchors.d.ts +30 -0
- package/dist/prosemirror/anchors.d.ts.map +1 -0
- package/dist/prosemirror/anchors.js +28 -0
- package/dist/prosemirror/anchors.js.map +1 -0
- package/dist/prosemirror/index.d.ts +7 -0
- package/dist/prosemirror/index.d.ts.map +1 -0
- package/dist/prosemirror/index.js +7 -0
- package/dist/prosemirror/index.js.map +1 -0
- package/dist/prosemirror/markdown.d.ts +95 -0
- package/dist/prosemirror/markdown.d.ts.map +1 -0
- package/dist/prosemirror/markdown.js +428 -0
- package/dist/prosemirror/markdown.js.map +1 -0
- package/dist/prosemirror/overlays.d.ts +69 -0
- package/dist/prosemirror/overlays.d.ts.map +1 -0
- package/dist/prosemirror/overlays.js +143 -0
- package/dist/prosemirror/overlays.js.map +1 -0
- package/dist/prosemirror/presence.d.ts +39 -0
- package/dist/prosemirror/presence.d.ts.map +1 -0
- package/dist/prosemirror/presence.js +88 -0
- package/dist/prosemirror/presence.js.map +1 -0
- package/dist/prosemirror/sync.d.ts +60 -0
- package/dist/prosemirror/sync.d.ts.map +1 -0
- package/dist/prosemirror/sync.js +196 -0
- package/dist/prosemirror/sync.js.map +1 -0
- package/dist/prosemirror/text-map.d.ts +21 -0
- package/dist/prosemirror/text-map.d.ts.map +1 -0
- package/dist/prosemirror/text-map.js +85 -0
- package/dist/prosemirror/text-map.js.map +1 -0
- package/dist/react/create-jazz-client.d.ts +2 -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/index.d.ts +15 -6
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +10 -5
- package/dist/react/index.js.map +1 -1
- package/dist/react/provider-props.d.ts +7 -0
- package/dist/react/provider-props.d.ts.map +1 -0
- package/dist/react/provider-props.js +15 -0
- package/dist/react/provider-props.js.map +1 -0
- package/dist/react/provider.d.ts +19 -13
- package/dist/react/provider.d.ts.map +1 -1
- package/dist/react/provider.js +25 -4
- package/dist/react/provider.js.map +1 -1
- package/dist/react/use-all.d.ts +1 -1
- package/dist/react/use-all.d.ts.map +1 -1
- package/dist/react/use-all.js +1 -1
- package/dist/react/use-all.js.map +1 -1
- package/dist/react/use-one.d.ts +2 -0
- package/dist/react/use-one.d.ts.map +1 -0
- package/dist/react/use-one.js +2 -0
- package/dist/react/use-one.js.map +1 -0
- package/dist/react-core/index.d.ts +10 -4
- package/dist/react-core/index.d.ts.map +1 -1
- package/dist/react-core/index.js +12 -2
- package/dist/react-core/index.js.map +1 -1
- package/dist/react-core/provider.d.ts +56 -12
- package/dist/react-core/provider.d.ts.map +1 -1
- package/dist/react-core/provider.js +128 -11
- package/dist/react-core/provider.js.map +1 -1
- package/dist/react-core/session-context.d.ts +7 -0
- package/dist/react-core/session-context.d.ts.map +1 -0
- package/dist/react-core/session-context.js +8 -0
- package/dist/react-core/session-context.js.map +1 -0
- package/dist/react-core/session.d.ts +63 -0
- package/dist/react-core/session.d.ts.map +1 -0
- package/dist/react-core/session.js +97 -0
- package/dist/react-core/session.js.map +1 -0
- package/dist/react-core/use-all.d.ts +95 -3
- package/dist/react-core/use-all.d.ts.map +1 -1
- package/dist/react-core/use-all.js +126 -52
- package/dist/react-core/use-all.js.map +1 -1
- package/dist/react-core/use-auth-state.d.ts +13 -0
- package/dist/react-core/use-auth-state.d.ts.map +1 -0
- package/dist/react-core/use-auth-state.js +15 -0
- package/dist/react-core/use-auth-state.js.map +1 -0
- package/dist/react-core/use-one.d.ts +58 -0
- package/dist/react-core/use-one.d.ts.map +1 -0
- package/dist/react-core/use-one.js +19 -0
- package/dist/react-core/use-one.js.map +1 -0
- package/dist/react-core/use-sync-status.d.ts +8 -0
- package/dist/react-core/use-sync-status.d.ts.map +1 -0
- package/dist/react-core/use-sync-status.js +12 -0
- package/dist/react-core/use-sync-status.js.map +1 -0
- package/dist/react-native/abort-signal.d.ts +9 -0
- package/dist/react-native/abort-signal.d.ts.map +1 -0
- package/dist/react-native/abort-signal.js +51 -0
- package/dist/react-native/abort-signal.js.map +1 -0
- package/dist/react-native/account-session.d.ts +11 -0
- package/dist/react-native/account-session.d.ts.map +1 -0
- package/dist/react-native/account-session.js +59 -0
- package/dist/react-native/account-session.js.map +1 -0
- package/dist/react-native/create-account-manager.d.ts +28 -0
- package/dist/react-native/create-account-manager.d.ts.map +1 -0
- package/dist/react-native/create-account-manager.js +30 -0
- package/dist/react-native/create-account-manager.js.map +1 -0
- package/dist/react-native/create-db.d.ts +8 -0
- package/dist/react-native/create-db.d.ts.map +1 -0
- package/dist/react-native/create-db.js +9 -0
- package/dist/react-native/create-db.js.map +1 -0
- package/dist/react-native/create-jazz-client.d.ts +12 -10
- package/dist/react-native/create-jazz-client.d.ts.map +1 -1
- package/dist/react-native/create-jazz-client.js +6 -21
- package/dist/react-native/create-jazz-client.js.map +1 -1
- package/dist/react-native/create-jazz-session.d.ts +66 -0
- package/dist/react-native/create-jazz-session.d.ts.map +1 -0
- package/dist/react-native/create-jazz-session.js +96 -0
- package/dist/react-native/create-jazz-session.js.map +1 -0
- package/dist/react-native/errors.d.ts +6 -0
- package/dist/react-native/errors.d.ts.map +1 -0
- package/dist/react-native/errors.js +6 -0
- package/dist/react-native/errors.js.map +1 -0
- package/dist/react-native/index.d.ts +21 -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 +227 -0
- package/dist/react-native/native-foreground-db.d.ts.map +1 -0
- package/dist/react-native/native-foreground-db.js +905 -0
- package/dist/react-native/native-foreground-db.js.map +1 -0
- package/dist/react-native/native-relay.d.ts +7 -0
- package/dist/react-native/native-relay.d.ts.map +1 -0
- package/dist/react-native/native-relay.js +14 -0
- package/dist/react-native/native-relay.js.map +1 -0
- package/dist/react-native/provider.d.ts +20 -12
- package/dist/react-native/provider.d.ts.map +1 -1
- package/dist/react-native/provider.js +25 -4
- package/dist/react-native/provider.js.map +1 -1
- package/dist/react-native/runtime-source.d.ts +62 -0
- package/dist/react-native/runtime-source.d.ts.map +1 -0
- package/dist/react-native/runtime-source.js +314 -0
- package/dist/react-native/runtime-source.js.map +1 -0
- package/dist/react-native/use-all.d.ts +1 -1
- package/dist/react-native/use-all.d.ts.map +1 -1
- package/dist/react-native/use-all.js +1 -1
- package/dist/react-native/use-all.js.map +1 -1
- package/dist/react-native/use-one.d.ts +2 -0
- package/dist/react-native/use-one.d.ts.map +1 -0
- package/dist/react-native/use-one.js +2 -0
- package/dist/react-native/use-one.js.map +1 -0
- package/dist/reconcile-array.d.ts +45 -0
- package/dist/reconcile-array.d.ts.map +1 -0
- package/dist/reconcile-array.js +252 -0
- package/dist/reconcile-array.js.map +1 -0
- package/dist/relationships.d.ts +18 -0
- package/dist/relationships.d.ts.map +1 -0
- package/dist/relationships.js +28 -0
- package/dist/relationships.js.map +1 -0
- package/dist/removed-api.d.ts +87 -0
- package/dist/removed-api.d.ts.map +1 -0
- package/dist/removed-api.js +95 -0
- package/dist/removed-api.js.map +1 -0
- package/dist/removed-schema-api.d.ts +80 -0
- package/dist/removed-schema-api.d.ts.map +1 -0
- package/dist/removed-schema-api.js +128 -0
- package/dist/removed-schema-api.js.map +1 -0
- package/dist/runtime/auth-renewal-backoff.d.ts +14 -0
- package/dist/runtime/auth-renewal-backoff.d.ts.map +1 -0
- package/dist/runtime/auth-renewal-backoff.js +23 -0
- package/dist/runtime/auth-renewal-backoff.js.map +1 -0
- package/dist/runtime/auth-request-deadline.d.ts +3 -0
- package/dist/runtime/auth-request-deadline.d.ts.map +1 -0
- package/dist/runtime/auth-request-deadline.js +24 -0
- package/dist/runtime/auth-request-deadline.js.map +1 -0
- package/dist/runtime/auth-secret-codec.d.ts +21 -0
- package/dist/runtime/auth-secret-codec.d.ts.map +1 -0
- package/dist/runtime/auth-secret-codec.js +32 -0
- package/dist/runtime/auth-secret-codec.js.map +1 -0
- package/dist/runtime/auth-secret-store.d.ts +7 -0
- package/dist/runtime/auth-secret-store.d.ts.map +1 -0
- package/dist/runtime/auth-secret-store.js +12 -0
- package/dist/runtime/auth-secret-store.js.map +1 -0
- package/dist/runtime/auth-state.d.ts +47 -0
- package/dist/runtime/auth-state.d.ts.map +1 -0
- package/dist/runtime/auth-state.js +161 -0
- package/dist/runtime/auth-state.js.map +1 -0
- package/dist/runtime/author-id.d.ts +42 -0
- package/dist/runtime/author-id.d.ts.map +1 -0
- package/dist/runtime/author-id.js +172 -0
- package/dist/runtime/author-id.js.map +1 -0
- package/dist/runtime/authority-changed-error.d.ts +56 -0
- package/dist/runtime/authority-changed-error.d.ts.map +1 -0
- package/dist/runtime/authority-changed-error.js +74 -0
- package/dist/runtime/authority-changed-error.js.map +1 -0
- package/dist/runtime/backlog-rows.d.ts +3 -0
- package/dist/runtime/backlog-rows.d.ts.map +1 -0
- package/dist/runtime/backlog-rows.js +7 -0
- package/dist/runtime/backlog-rows.js.map +1 -0
- package/dist/runtime/browser-physical-database-epoch.d.ts +37 -0
- package/dist/runtime/browser-physical-database-epoch.d.ts.map +1 -0
- package/dist/runtime/browser-physical-database-epoch.js +89 -0
- package/dist/runtime/browser-physical-database-epoch.js.map +1 -0
- package/dist/runtime/browser-storage-invalidation.d.ts +8 -0
- package/dist/runtime/browser-storage-invalidation.d.ts.map +1 -0
- package/dist/runtime/browser-storage-invalidation.js +20 -0
- package/dist/runtime/browser-storage-invalidation.js.map +1 -0
- package/dist/runtime/browser-store-generation.d.ts +15 -0
- package/dist/runtime/browser-store-generation.d.ts.map +1 -0
- package/dist/runtime/browser-store-generation.js +48 -0
- package/dist/runtime/browser-store-generation.js.map +1 -0
- package/dist/runtime/browser-worker-assets.d.ts +31 -0
- package/dist/runtime/browser-worker-assets.d.ts.map +1 -0
- package/dist/runtime/browser-worker-assets.js +40 -0
- package/dist/runtime/browser-worker-assets.js.map +1 -0
- package/dist/runtime/browser-worker-assets.metro.d.ts +28 -0
- package/dist/runtime/browser-worker-assets.metro.d.ts.map +1 -0
- package/dist/runtime/browser-worker-assets.metro.js +52 -0
- package/dist/runtime/browser-worker-assets.metro.js.map +1 -0
- package/dist/runtime/browser-worker-assets.native.d.ts +7 -0
- package/dist/runtime/browser-worker-assets.native.d.ts.map +1 -0
- package/dist/runtime/browser-worker-assets.native.js +8 -0
- package/dist/runtime/browser-worker-assets.native.js.map +1 -0
- package/dist/runtime/browser-worker-config.d.ts +78 -0
- package/dist/runtime/browser-worker-config.d.ts.map +1 -0
- package/dist/runtime/browser-worker-config.js +299 -0
- package/dist/runtime/browser-worker-config.js.map +1 -0
- package/dist/runtime/client-config-key.d.ts +6 -0
- package/dist/runtime/client-config-key.d.ts.map +1 -0
- package/dist/runtime/client-config-key.js +83 -0
- package/dist/runtime/client-config-key.js.map +1 -0
- package/dist/runtime/client-migrations.d.ts +27 -0
- package/dist/runtime/client-migrations.d.ts.map +1 -0
- package/dist/runtime/client-migrations.js +25 -0
- package/dist/runtime/client-migrations.js.map +1 -0
- package/dist/runtime/client-registry.d.ts +21 -0
- package/dist/runtime/client-registry.d.ts.map +1 -0
- package/dist/runtime/client-registry.js +169 -0
- package/dist/runtime/client-registry.js.map +1 -0
- package/dist/runtime/client-scope.d.ts +38 -0
- package/dist/runtime/client-scope.d.ts.map +1 -0
- package/dist/runtime/client-scope.js +64 -0
- package/dist/runtime/client-scope.js.map +1 -0
- package/dist/runtime/client-session.d.ts +56 -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 +723 -190
- package/dist/runtime/client.d.ts.map +1 -1
- package/dist/runtime/client.js +1220 -416
- package/dist/runtime/client.js.map +1 -1
- package/dist/runtime/column-transforms.d.ts +26 -0
- package/dist/runtime/column-transforms.d.ts.map +1 -0
- package/dist/runtime/column-transforms.js +186 -0
- package/dist/runtime/column-transforms.js.map +1 -0
- package/dist/runtime/connection-manager/browser-connection-manager.d.ts +178 -0
- package/dist/runtime/connection-manager/browser-connection-manager.d.ts.map +1 -0
- package/dist/runtime/connection-manager/browser-connection-manager.js +1030 -0
- package/dist/runtime/connection-manager/browser-connection-manager.js.map +1 -0
- package/dist/runtime/connection-manager/direct-connection-manager.d.ts +28 -0
- package/dist/runtime/connection-manager/direct-connection-manager.d.ts.map +1 -0
- package/dist/runtime/connection-manager/direct-connection-manager.js +202 -0
- package/dist/runtime/connection-manager/direct-connection-manager.js.map +1 -0
- package/dist/runtime/connection-manager/index.d.ts +5 -0
- package/dist/runtime/connection-manager/index.d.ts.map +1 -0
- package/dist/runtime/connection-manager/index.js +4 -0
- package/dist/runtime/connection-manager/index.js.map +1 -0
- package/dist/runtime/connection-manager/types.d.ts +174 -0
- package/dist/runtime/connection-manager/types.d.ts.map +1 -0
- package/dist/runtime/connection-manager/types.js +396 -0
- package/dist/runtime/connection-manager/types.js.map +1 -0
- package/dist/runtime/context.d.ts +100 -30
- package/dist/runtime/context.d.ts.map +1 -1
- package/dist/runtime/context.js.map +1 -1
- package/dist/runtime/core-tick-failed-error.d.ts +31 -0
- package/dist/runtime/core-tick-failed-error.d.ts.map +1 -0
- package/dist/runtime/core-tick-failed-error.js +45 -0
- package/dist/runtime/core-tick-failed-error.js.map +1 -0
- package/dist/runtime/credentialed-transport.d.ts +42 -0
- package/dist/runtime/credentialed-transport.d.ts.map +1 -0
- package/dist/runtime/credentialed-transport.js +178 -0
- package/dist/runtime/credentialed-transport.js.map +1 -0
- package/dist/runtime/db-access-context.d.ts +14 -0
- package/dist/runtime/db-access-context.d.ts.map +1 -0
- package/dist/runtime/db-access-context.js +26 -0
- package/dist/runtime/db-access-context.js.map +1 -0
- package/dist/runtime/db-internal-session.d.ts +7 -0
- package/dist/runtime/db-internal-session.d.ts.map +1 -0
- package/dist/runtime/db-internal-session.js +21 -0
- package/dist/runtime/db-internal-session.js.map +1 -0
- package/dist/runtime/db-replaced-error.d.ts +21 -0
- package/dist/runtime/db-replaced-error.d.ts.map +1 -0
- package/dist/runtime/db-replaced-error.js +22 -0
- package/dist/runtime/db-replaced-error.js.map +1 -0
- package/dist/runtime/db.d.ts +869 -201
- package/dist/runtime/db.d.ts.map +1 -1
- package/dist/runtime/db.js +3491 -758
- package/dist/runtime/db.js.map +1 -1
- package/dist/runtime/default-create-db.d.ts +5 -0
- package/dist/runtime/default-create-db.d.ts.map +1 -0
- package/dist/runtime/default-create-db.js +7 -0
- package/dist/runtime/default-create-db.js.map +1 -0
- package/dist/runtime/default-runtime-source.d.ts +41 -0
- package/dist/runtime/default-runtime-source.d.ts.map +1 -0
- package/dist/runtime/default-runtime-source.js +326 -0
- package/dist/runtime/default-runtime-source.js.map +1 -0
- package/dist/runtime/delete-local-first-store.d.ts +12 -0
- package/dist/runtime/delete-local-first-store.d.ts.map +1 -0
- package/dist/runtime/delete-local-first-store.js +12 -0
- package/dist/runtime/delete-local-first-store.js.map +1 -0
- package/dist/runtime/deterministic-bytes.d.ts +6 -0
- package/dist/runtime/deterministic-bytes.d.ts.map +1 -0
- package/dist/runtime/deterministic-bytes.js +18 -0
- package/dist/runtime/deterministic-bytes.js.map +1 -0
- package/dist/runtime/graceful-shutdown-error.d.ts +17 -0
- package/dist/runtime/graceful-shutdown-error.d.ts.map +1 -0
- package/dist/runtime/graceful-shutdown-error.js +31 -0
- package/dist/runtime/graceful-shutdown-error.js.map +1 -0
- package/dist/runtime/hex.d.ts +21 -0
- package/dist/runtime/hex.d.ts.map +1 -0
- package/dist/runtime/hex.js +62 -0
- package/dist/runtime/hex.js.map +1 -0
- package/dist/runtime/history-relation.d.ts +8 -0
- package/dist/runtime/history-relation.d.ts.map +1 -0
- package/dist/runtime/history-relation.js +44 -0
- package/dist/runtime/history-relation.js.map +1 -0
- package/dist/runtime/in-process-transport.d.ts +18 -0
- package/dist/runtime/in-process-transport.d.ts.map +1 -0
- package/dist/runtime/in-process-transport.js +32 -0
- package/dist/runtime/in-process-transport.js.map +1 -0
- package/dist/runtime/index.d.ts +22 -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 +50 -0
- package/dist/runtime/json-schema-validator.d.ts.map +1 -0
- package/dist/runtime/json-schema-validator.js +404 -0
- package/dist/runtime/json-schema-validator.js.map +1 -0
- package/dist/runtime/json-text.js.map +1 -1
- package/dist/runtime/local-first-token.d.ts +11 -0
- package/dist/runtime/local-first-token.d.ts.map +1 -0
- package/dist/runtime/local-first-token.js +20 -0
- package/dist/runtime/local-first-token.js.map +1 -0
- package/dist/runtime/local-first-unavailable.d.ts +40 -0
- package/dist/runtime/local-first-unavailable.d.ts.map +1 -0
- package/dist/runtime/local-first-unavailable.js +81 -0
- package/dist/runtime/local-first-unavailable.js.map +1 -0
- package/dist/runtime/local-first-upgrade.d.ts +36 -0
- package/dist/runtime/local-first-upgrade.d.ts.map +1 -0
- package/dist/runtime/local-first-upgrade.js +31 -0
- package/dist/runtime/local-first-upgrade.js.map +1 -0
- package/dist/runtime/local-write-observer.d.ts +5 -0
- package/dist/runtime/local-write-observer.d.ts.map +1 -0
- package/dist/runtime/local-write-observer.js +31 -0
- package/dist/runtime/local-write-observer.js.map +1 -0
- package/dist/runtime/metro-setup-error.d.ts +20 -0
- package/dist/runtime/metro-setup-error.d.ts.map +1 -0
- package/dist/runtime/metro-setup-error.js +22 -0
- package/dist/runtime/metro-setup-error.js.map +1 -0
- package/dist/runtime/native-artifact-compatibility.d.ts +12 -0
- package/dist/runtime/native-artifact-compatibility.d.ts.map +1 -0
- package/dist/runtime/native-artifact-compatibility.js +26 -0
- package/dist/runtime/native-artifact-compatibility.js.map +1 -0
- package/dist/runtime/native-artifact-fingerprint-napi.d.ts +2 -0
- package/dist/runtime/native-artifact-fingerprint-napi.d.ts.map +1 -0
- package/dist/runtime/native-artifact-fingerprint-napi.js +3 -0
- package/dist/runtime/native-artifact-fingerprint-napi.js.map +1 -0
- package/dist/runtime/native-artifact-fingerprint-wasm.d.ts +2 -0
- package/dist/runtime/native-artifact-fingerprint-wasm.d.ts.map +1 -0
- package/dist/runtime/native-artifact-fingerprint-wasm.js +3 -0
- package/dist/runtime/native-artifact-fingerprint-wasm.js.map +1 -0
- package/dist/runtime/native-artifact-fingerprints.d.ts +5 -0
- package/dist/runtime/native-artifact-fingerprints.d.ts.map +1 -0
- package/dist/runtime/native-artifact-fingerprints.js +7 -0
- package/dist/runtime/native-artifact-fingerprints.js.map +1 -0
- package/dist/runtime/native-artifact-mismatch-error.d.ts +25 -0
- package/dist/runtime/native-artifact-mismatch-error.d.ts.map +1 -0
- package/dist/runtime/native-artifact-mismatch-error.js +34 -0
- package/dist/runtime/native-artifact-mismatch-error.js.map +1 -0
- package/dist/runtime/native-runtime/attached-browser-worker-connection.d.ts +23 -0
- package/dist/runtime/native-runtime/attached-browser-worker-connection.d.ts.map +1 -0
- package/dist/runtime/native-runtime/attached-browser-worker-connection.js +45 -0
- package/dist/runtime/native-runtime/attached-browser-worker-connection.js.map +1 -0
- package/dist/runtime/native-runtime/auxiliary-receive-deadline.d.ts +15 -0
- package/dist/runtime/native-runtime/auxiliary-receive-deadline.d.ts.map +1 -0
- package/dist/runtime/native-runtime/auxiliary-receive-deadline.js +64 -0
- package/dist/runtime/native-runtime/auxiliary-receive-deadline.js.map +1 -0
- package/dist/runtime/native-runtime/broker-worker-load-failure.d.ts +34 -0
- package/dist/runtime/native-runtime/broker-worker-load-failure.d.ts.map +1 -0
- package/dist/runtime/native-runtime/broker-worker-load-failure.js +61 -0
- package/dist/runtime/native-runtime/broker-worker-load-failure.js.map +1 -0
- package/dist/runtime/native-runtime/browser-follower-connection.d.ts +109 -0
- package/dist/runtime/native-runtime/browser-follower-connection.d.ts.map +1 -0
- package/dist/runtime/native-runtime/browser-follower-connection.js +558 -0
- package/dist/runtime/native-runtime/browser-follower-connection.js.map +1 -0
- package/dist/runtime/native-runtime/browser-shared-worker-connection.d.ts +130 -0
- package/dist/runtime/native-runtime/browser-shared-worker-connection.d.ts.map +1 -0
- package/dist/runtime/native-runtime/browser-shared-worker-connection.js +988 -0
- package/dist/runtime/native-runtime/browser-shared-worker-connection.js.map +1 -0
- package/dist/runtime/native-runtime/browser-worker-protocol.d.ts +527 -0
- package/dist/runtime/native-runtime/browser-worker-protocol.d.ts.map +1 -0
- package/dist/runtime/native-runtime/browser-worker-protocol.js +296 -0
- package/dist/runtime/native-runtime/browser-worker-protocol.js.map +1 -0
- package/dist/runtime/native-runtime/browser-worker-transport.d.ts +56 -0
- package/dist/runtime/native-runtime/browser-worker-transport.d.ts.map +1 -0
- package/dist/runtime/native-runtime/browser-worker-transport.js +305 -0
- package/dist/runtime/native-runtime/browser-worker-transport.js.map +1 -0
- package/dist/runtime/native-runtime/exact-integer.d.ts +7 -0
- package/dist/runtime/native-runtime/exact-integer.d.ts.map +1 -0
- package/dist/runtime/native-runtime/exact-integer.js +18 -0
- package/dist/runtime/native-runtime/exact-integer.js.map +1 -0
- package/dist/runtime/native-runtime/http-stream-socket.d.ts +103 -0
- package/dist/runtime/native-runtime/http-stream-socket.d.ts.map +1 -0
- package/dist/runtime/native-runtime/http-stream-socket.js +554 -0
- package/dist/runtime/native-runtime/http-stream-socket.js.map +1 -0
- package/dist/runtime/native-runtime/inspector-control-lifecycle.d.ts +4 -0
- package/dist/runtime/native-runtime/inspector-control-lifecycle.d.ts.map +1 -0
- package/dist/runtime/native-runtime/inspector-control-lifecycle.js +33 -0
- package/dist/runtime/native-runtime/inspector-control-lifecycle.js.map +1 -0
- package/dist/runtime/native-runtime/native-codec.d.ts +172 -0
- package/dist/runtime/native-runtime/native-codec.d.ts.map +1 -0
- package/dist/runtime/native-runtime/native-codec.js +629 -0
- package/dist/runtime/native-runtime/native-codec.js.map +1 -0
- package/dist/runtime/native-runtime/native-error-code.d.ts +39 -0
- package/dist/runtime/native-runtime/native-error-code.d.ts.map +1 -0
- package/dist/runtime/native-runtime/native-error-code.js +64 -0
- package/dist/runtime/native-runtime/native-error-code.js.map +1 -0
- package/dist/runtime/native-runtime/native-row-codec.d.ts +161 -0
- package/dist/runtime/native-runtime/native-row-codec.d.ts.map +1 -0
- package/dist/runtime/native-runtime/native-row-codec.js +903 -0
- package/dist/runtime/native-runtime/native-row-codec.js.map +1 -0
- package/dist/runtime/native-runtime/native-row-descriptor-key.d.ts +15 -0
- package/dist/runtime/native-runtime/native-row-descriptor-key.d.ts.map +1 -0
- package/dist/runtime/native-runtime/native-row-descriptor-key.js +25 -0
- package/dist/runtime/native-runtime/native-row-descriptor-key.js.map +1 -0
- package/dist/runtime/native-runtime/native-runtime-adapter.d.ts +913 -0
- package/dist/runtime/native-runtime/native-runtime-adapter.d.ts.map +1 -0
- package/dist/runtime/native-runtime/native-runtime-adapter.js +5999 -0
- package/dist/runtime/native-runtime/native-runtime-adapter.js.map +1 -0
- package/dist/runtime/native-runtime/node-foreground-node-lease.browser.d.ts +17 -0
- package/dist/runtime/native-runtime/node-foreground-node-lease.browser.d.ts.map +1 -0
- package/dist/runtime/native-runtime/node-foreground-node-lease.browser.js +4 -0
- package/dist/runtime/native-runtime/node-foreground-node-lease.browser.js.map +1 -0
- package/dist/runtime/native-runtime/node-foreground-node-lease.d.ts +19 -0
- package/dist/runtime/native-runtime/node-foreground-node-lease.d.ts.map +1 -0
- package/dist/runtime/native-runtime/node-foreground-node-lease.js +297 -0
- package/dist/runtime/native-runtime/node-foreground-node-lease.js.map +1 -0
- package/dist/runtime/native-runtime/row-values-transport.d.ts +2 -0
- package/dist/runtime/native-runtime/row-values-transport.d.ts.map +1 -0
- package/dist/runtime/native-runtime/row-values-transport.js +21 -0
- package/dist/runtime/native-runtime/row-values-transport.js.map +1 -0
- package/dist/runtime/native-runtime/schema-codec.d.ts +10 -0
- package/dist/runtime/native-runtime/schema-codec.d.ts.map +1 -0
- package/dist/runtime/native-runtime/schema-codec.js +13 -0
- package/dist/runtime/native-runtime/schema-codec.js.map +1 -0
- package/dist/runtime/native-runtime/session-renewal-wire.d.ts +48 -0
- package/dist/runtime/native-runtime/session-renewal-wire.d.ts.map +1 -0
- package/dist/runtime/native-runtime/session-renewal-wire.js +107 -0
- package/dist/runtime/native-runtime/session-renewal-wire.js.map +1 -0
- package/dist/runtime/native-runtime/stream-endpoint-memory.d.ts +34 -0
- package/dist/runtime/native-runtime/stream-endpoint-memory.d.ts.map +1 -0
- package/dist/runtime/native-runtime/stream-endpoint-memory.js +146 -0
- package/dist/runtime/native-runtime/stream-endpoint-memory.js.map +1 -0
- package/dist/runtime/native-runtime/websocket.d.ts +327 -0
- package/dist/runtime/native-runtime/websocket.d.ts.map +1 -0
- package/dist/runtime/native-runtime/websocket.js +1112 -0
- package/dist/runtime/native-runtime/websocket.js.map +1 -0
- package/dist/runtime/newer-build-reload.d.ts +30 -0
- package/dist/runtime/newer-build-reload.d.ts.map +1 -0
- package/dist/runtime/newer-build-reload.js +59 -0
- package/dist/runtime/newer-build-reload.js.map +1 -0
- package/dist/runtime/page-cache.d.ts +44 -0
- package/dist/runtime/page-cache.d.ts.map +1 -0
- package/dist/runtime/page-cache.js +104 -0
- package/dist/runtime/page-cache.js.map +1 -0
- package/dist/runtime/page-handle.d.ts +83 -0
- package/dist/runtime/page-handle.d.ts.map +1 -0
- package/dist/runtime/page-handle.js +151 -0
- package/dist/runtime/page-handle.js.map +1 -0
- package/dist/runtime/passkey-backup.d.ts +3 -0
- package/dist/runtime/passkey-backup.d.ts.map +1 -0
- package/dist/runtime/passkey-backup.js +2 -0
- package/dist/runtime/passkey-backup.js.map +1 -0
- package/dist/runtime/platform-url.d.ts +10 -0
- package/dist/runtime/platform-url.d.ts.map +1 -0
- package/dist/runtime/platform-url.js +3 -0
- package/dist/runtime/platform-url.js.map +1 -0
- package/dist/runtime/platform-url.native.d.ts +6 -0
- package/dist/runtime/platform-url.native.d.ts.map +1 -0
- package/dist/runtime/platform-url.native.js +38 -0
- package/dist/runtime/platform-url.native.js.map +1 -0
- package/dist/runtime/query-adapter.d.ts +7 -15
- package/dist/runtime/query-adapter.d.ts.map +1 -1
- package/dist/runtime/query-adapter.js +477 -185
- package/dist/runtime/query-adapter.js.map +1 -1
- package/dist/runtime/query-builder-shape.d.ts +75 -0
- package/dist/runtime/query-builder-shape.d.ts.map +1 -0
- package/dist/runtime/query-builder-shape.js +225 -0
- package/dist/runtime/query-builder-shape.js.map +1 -0
- package/dist/runtime/query-column-name.d.ts +3 -0
- package/dist/runtime/query-column-name.d.ts.map +1 -0
- package/dist/runtime/query-column-name.js +10 -0
- package/dist/runtime/query-column-name.js.map +1 -0
- package/dist/runtime/query-output-table.d.ts +5 -0
- package/dist/runtime/query-output-table.d.ts.map +1 -0
- package/dist/runtime/query-output-table.js +30 -0
- package/dist/runtime/query-output-table.js.map +1 -0
- package/dist/runtime/recovery-phrase.d.ts +3 -0
- package/dist/runtime/recovery-phrase.d.ts.map +1 -0
- package/dist/runtime/recovery-phrase.js +2 -0
- package/dist/runtime/recovery-phrase.js.map +1 -0
- package/dist/runtime/remote-link-state.d.ts +20 -0
- package/dist/runtime/remote-link-state.d.ts.map +1 -0
- package/dist/runtime/remote-link-state.js +5 -0
- package/dist/runtime/remote-link-state.js.map +1 -0
- package/dist/runtime/removed-provider-props.d.ts +17 -0
- package/dist/runtime/removed-provider-props.d.ts.map +1 -0
- package/dist/runtime/removed-provider-props.js +16 -0
- package/dist/runtime/removed-provider-props.js.map +1 -0
- package/dist/runtime/row-transformer.d.ts +17 -3
- package/dist/runtime/row-transformer.d.ts.map +1 -1
- package/dist/runtime/row-transformer.js +182 -39
- package/dist/runtime/row-transformer.js.map +1 -1
- package/dist/runtime/run-cleanup-steps.d.ts +5 -0
- package/dist/runtime/run-cleanup-steps.d.ts.map +1 -0
- package/dist/runtime/run-cleanup-steps.js +19 -0
- package/dist/runtime/run-cleanup-steps.js.map +1 -0
- package/dist/runtime/runtime-closed-error.d.ts +9 -0
- package/dist/runtime/runtime-closed-error.d.ts.map +1 -0
- package/dist/runtime/runtime-closed-error.js +12 -0
- package/dist/runtime/runtime-closed-error.js.map +1 -0
- package/dist/runtime/runtime-config.d.ts +13 -0
- package/dist/runtime/runtime-config.d.ts.map +1 -0
- package/dist/runtime/runtime-config.js +115 -0
- package/dist/runtime/runtime-config.js.map +1 -0
- package/dist/runtime/runtime-entropy.d.ts +14 -0
- package/dist/runtime/runtime-entropy.d.ts.map +1 -0
- package/dist/runtime/runtime-entropy.js +43 -0
- package/dist/runtime/runtime-entropy.js.map +1 -0
- package/dist/runtime/runtime-source.d.ts +206 -0
- package/dist/runtime/runtime-source.d.ts.map +1 -0
- package/dist/runtime/runtime-source.js +64 -0
- package/dist/runtime/runtime-source.js.map +1 -0
- package/dist/runtime/schema-metadata.d.ts +22 -0
- package/dist/runtime/schema-metadata.d.ts.map +1 -0
- package/dist/runtime/schema-metadata.js +70 -0
- package/dist/runtime/schema-metadata.js.map +1 -0
- package/dist/runtime/select-projection.d.ts +5 -0
- package/dist/runtime/select-projection.d.ts.map +1 -0
- package/dist/runtime/select-projection.js +47 -0
- package/dist/runtime/select-projection.js.map +1 -0
- package/dist/runtime/snapshot-ref.d.ts +24 -0
- package/dist/runtime/snapshot-ref.d.ts.map +1 -0
- package/dist/runtime/snapshot-ref.js +43 -0
- package/dist/runtime/snapshot-ref.js.map +1 -0
- package/dist/runtime/store-held-by-another-tab-error.d.ts +53 -0
- package/dist/runtime/store-held-by-another-tab-error.d.ts.map +1 -0
- package/dist/runtime/store-held-by-another-tab-error.js +55 -0
- package/dist/runtime/store-held-by-another-tab-error.js.map +1 -0
- package/dist/runtime/streaming-source.d.ts +4 -0
- package/dist/runtime/streaming-source.d.ts.map +1 -0
- package/dist/runtime/streaming-source.js +53 -0
- package/dist/runtime/streaming-source.js.map +1 -0
- package/dist/runtime/structural-values.d.ts +6 -0
- package/dist/runtime/structural-values.d.ts.map +1 -0
- package/dist/runtime/structural-values.js +51 -0
- package/dist/runtime/structural-values.js.map +1 -0
- package/dist/runtime/subscription-manager.d.ts +103 -14
- package/dist/runtime/subscription-manager.d.ts.map +1 -1
- package/dist/runtime/subscription-manager.js +1051 -25
- package/dist/runtime/subscription-manager.js.map +1 -1
- package/dist/runtime/sync-status.d.ts +178 -0
- package/dist/runtime/sync-status.d.ts.map +1 -0
- package/dist/runtime/sync-status.js +163 -0
- package/dist/runtime/sync-status.js.map +1 -0
- package/dist/runtime/sync-telemetry.d.ts +35 -0
- package/dist/runtime/sync-telemetry.d.ts.map +1 -0
- package/dist/runtime/sync-telemetry.js +354 -0
- package/dist/runtime/sync-telemetry.js.map +1 -0
- package/dist/runtime/system-identity.d.ts +5 -0
- package/dist/runtime/system-identity.d.ts.map +1 -0
- package/dist/runtime/system-identity.js +10 -0
- package/dist/runtime/system-identity.js.map +1 -0
- package/dist/runtime/telemetry-env.d.ts +2 -0
- package/dist/runtime/telemetry-env.d.ts.map +1 -0
- package/dist/runtime/telemetry-env.js +16 -0
- package/dist/runtime/telemetry-env.js.map +1 -0
- package/dist/runtime/telemetry-env.native.d.ts +3 -0
- package/dist/runtime/telemetry-env.native.d.ts.map +1 -0
- package/dist/runtime/telemetry-env.native.js +7 -0
- package/dist/runtime/telemetry-env.native.js.map +1 -0
- package/dist/runtime/text-anchors.d.ts +58 -0
- package/dist/runtime/text-anchors.d.ts.map +1 -0
- package/dist/runtime/text-anchors.js +9 -0
- package/dist/runtime/text-anchors.js.map +1 -0
- package/dist/runtime/unsupported-storage-codecs-error.d.ts +53 -0
- package/dist/runtime/unsupported-storage-codecs-error.d.ts.map +1 -0
- package/dist/runtime/unsupported-storage-codecs-error.js +74 -0
- package/dist/runtime/unsupported-storage-codecs-error.js.map +1 -0
- package/dist/runtime/url.d.ts +32 -0
- package/dist/runtime/url.d.ts.map +1 -0
- package/dist/runtime/url.js +96 -0
- package/dist/runtime/url.js.map +1 -0
- package/dist/runtime/utf8.d.ts +10 -0
- package/dist/runtime/utf8.d.ts.map +1 -0
- package/dist/runtime/utf8.js +93 -0
- package/dist/runtime/utf8.js.map +1 -0
- package/dist/runtime/util.d.ts +18 -0
- package/dist/runtime/util.d.ts.map +1 -0
- package/dist/runtime/util.js +59 -0
- package/dist/runtime/util.js.map +1 -0
- package/dist/runtime/value-converter.d.ts +9 -17
- package/dist/runtime/value-converter.d.ts.map +1 -1
- package/dist/runtime/value-converter.js +157 -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 +127 -0
- package/dist/runtime/wasm-loader.js.map +1 -0
- package/dist/runtime/write-preparation.d.ts +24 -0
- package/dist/runtime/write-preparation.d.ts.map +1 -0
- package/dist/runtime/write-preparation.js +63 -0
- package/dist/runtime/write-preparation.js.map +1 -0
- package/dist/runtime/write-row.d.ts +8 -0
- package/dist/runtime/write-row.d.ts.map +1 -0
- package/dist/runtime/write-row.js +17 -0
- package/dist/runtime/write-row.js.map +1 -0
- package/dist/schema-builders.d.ts +55 -0
- package/dist/schema-builders.d.ts.map +1 -0
- package/dist/schema-builders.js +33 -0
- package/dist/schema-builders.js.map +1 -0
- package/dist/schema-dsl/define-schema.d.ts +32 -0
- package/dist/schema-dsl/define-schema.d.ts.map +1 -0
- package/dist/schema-dsl/define-schema.js +80 -0
- package/dist/schema-dsl/define-schema.js.map +1 -0
- package/dist/schema-dsl/readable-app.d.ts +30 -0
- package/dist/schema-dsl/readable-app.d.ts.map +1 -0
- package/dist/schema-dsl/readable-app.js +139 -0
- package/dist/schema-dsl/readable-app.js.map +1 -0
- package/dist/schema-dsl/table.d.ts +101 -0
- package/dist/schema-dsl/table.d.ts.map +1 -0
- package/dist/schema-dsl/table.js +153 -0
- package/dist/schema-dsl/table.js.map +1 -0
- package/dist/schema-errors.d.ts +6 -0
- package/dist/schema-errors.d.ts.map +1 -0
- package/dist/schema-errors.js +6 -0
- package/dist/schema-errors.js.map +1 -0
- package/dist/schema-loader.d.ts +16 -0
- package/dist/schema-loader.d.ts.map +1 -0
- package/dist/schema-loader.js +108 -0
- package/dist/schema-loader.js.map +1 -0
- package/dist/schema-name.d.ts +2 -0
- package/dist/schema-name.d.ts.map +1 -0
- package/dist/schema-name.js +19 -0
- package/dist/schema-name.js.map +1 -0
- package/dist/schema-namespace.d.ts +7 -0
- package/dist/schema-namespace.d.ts.map +1 -0
- package/dist/schema-namespace.js +7 -0
- package/dist/schema-namespace.js.map +1 -0
- package/dist/schema-permissions.d.ts +12 -0
- package/dist/schema-permissions.d.ts.map +1 -0
- package/dist/schema-permissions.js +17 -0
- package/dist/schema-permissions.js.map +1 -0
- package/dist/schema-source.d.ts +11 -0
- package/dist/schema-source.d.ts.map +1 -0
- package/dist/schema-source.js +53 -0
- package/dist/schema-source.js.map +1 -0
- package/dist/schema.d.ts +95 -38
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +1 -16
- package/dist/schema.js.map +1 -1
- package/dist/session/backend-watch.d.ts +186 -0
- package/dist/session/backend-watch.d.ts.map +1 -0
- package/dist/session/backend-watch.js +698 -0
- package/dist/session/backend-watch.js.map +1 -0
- package/dist/session/config-options.d.ts +15 -0
- package/dist/session/config-options.d.ts.map +1 -0
- package/dist/session/config-options.js +55 -0
- package/dist/session/config-options.js.map +1 -0
- package/dist/session/consumer.d.ts +3 -0
- package/dist/session/consumer.d.ts.map +1 -0
- package/dist/session/consumer.js +3 -0
- package/dist/session/consumer.js.map +1 -0
- package/dist/session/create-jazz-session.d.ts +123 -0
- package/dist/session/create-jazz-session.d.ts.map +1 -0
- package/dist/session/create-jazz-session.js +542 -0
- package/dist/session/create-jazz-session.js.map +1 -0
- package/dist/session/deprecated-session-hook.d.ts +8 -0
- package/dist/session/deprecated-session-hook.d.ts.map +1 -0
- package/dist/session/deprecated-session-hook.js +28 -0
- package/dist/session/deprecated-session-hook.js.map +1 -0
- package/dist/session/follow-user.d.ts +72 -0
- package/dist/session/follow-user.d.ts.map +1 -0
- package/dist/session/follow-user.js +147 -0
- package/dist/session/follow-user.js.map +1 -0
- package/dist/session/jazz-session.d.ts +234 -0
- package/dist/session/jazz-session.d.ts.map +1 -0
- package/dist/session/jazz-session.js +528 -0
- package/dist/session/jazz-session.js.map +1 -0
- package/dist/session/native-backend-watch.d.ts +4 -0
- package/dist/session/native-backend-watch.d.ts.map +1 -0
- package/dist/session/native-backend-watch.js +14 -0
- package/dist/session/native-backend-watch.js.map +1 -0
- package/dist/session/no-kept-device-account-error.d.ts +6 -0
- package/dist/session/no-kept-device-account-error.d.ts.map +1 -0
- package/dist/session/no-kept-device-account-error.js +8 -0
- package/dist/session/no-kept-device-account-error.js.map +1 -0
- package/dist/session/replica-ledger.d.ts +164 -0
- package/dist/session/replica-ledger.d.ts.map +1 -0
- package/dist/session/replica-ledger.js +496 -0
- package/dist/session/replica-ledger.js.map +1 -0
- package/dist/session/state.d.ts +135 -0
- package/dist/session/state.d.ts.map +1 -0
- package/dist/session/state.js +535 -0
- package/dist/session/state.js.map +1 -0
- package/dist/shared/index.d.ts +20 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/index.js +17 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/solid/create-solid-jazz-client-internal.d.ts +13 -0
- package/dist/solid/create-solid-jazz-client-internal.d.ts.map +1 -0
- package/dist/solid/create-solid-jazz-client-internal.js +82 -0
- package/dist/solid/create-solid-jazz-client-internal.js.map +1 -0
- package/dist/solid/create-solid-jazz-client-internal.ssr.js +101 -0
- package/dist/solid/create-solid-jazz-client-internal.ssr.js.map +1 -0
- package/dist/solid/create-solid-jazz-client.d.ts +24 -0
- package/dist/solid/create-solid-jazz-client.d.ts.map +1 -0
- package/dist/solid/create-solid-jazz-client.js +42 -0
- package/dist/solid/create-solid-jazz-client.js.map +1 -0
- package/dist/solid/create-solid-jazz-client.ssr.js +45 -0
- package/dist/solid/create-solid-jazz-client.ssr.js.map +1 -0
- package/dist/solid/index.d.ts +14 -0
- package/dist/solid/index.d.ts.map +1 -0
- package/dist/solid/index.js +10 -0
- package/dist/solid/index.ssr.js +10 -0
- package/dist/solid/provider.d.ts +36 -0
- package/dist/solid/provider.d.ts.map +1 -0
- package/dist/solid/provider.js +54 -0
- package/dist/solid/provider.js.map +1 -0
- package/dist/solid/provider.ssr.js +58 -0
- package/dist/solid/provider.ssr.js.map +1 -0
- package/dist/solid/session-context.d.ts +14 -0
- package/dist/solid/session-context.d.ts.map +1 -0
- package/dist/solid/session-context.js +6 -0
- package/dist/solid/session-context.js.map +1 -0
- package/dist/solid/session-context.ssr.js +10 -0
- package/dist/solid/session-context.ssr.js.map +1 -0
- package/dist/solid/session.d.ts +55 -0
- package/dist/solid/session.d.ts.map +1 -0
- package/dist/solid/session.js +130 -0
- package/dist/solid/session.js.map +1 -0
- package/dist/solid/session.ssr.js +156 -0
- package/dist/solid/session.ssr.js.map +1 -0
- package/dist/solid/solid-jazz-client-store.d.ts +11 -0
- package/dist/solid/solid-jazz-client-store.d.ts.map +1 -0
- package/dist/solid/solid-jazz-client-store.js +38 -0
- package/dist/solid/solid-jazz-client-store.js.map +1 -0
- package/dist/solid/solid-jazz-client-store.ssr.js +39 -0
- package/dist/solid/solid-jazz-client-store.ssr.js.map +1 -0
- package/dist/solid/use-all.d.ts +18 -0
- package/dist/solid/use-all.d.ts.map +1 -0
- package/dist/solid/use-all.js +71 -0
- package/dist/solid/use-all.js.map +1 -0
- package/dist/solid/use-all.ssr.js +84 -0
- package/dist/solid/use-all.ssr.js.map +1 -0
- package/dist/solid/use-one.d.ts +18 -0
- package/dist/solid/use-one.d.ts.map +1 -0
- package/dist/solid/use-one.js +27 -0
- package/dist/solid/use-one.js.map +1 -0
- package/dist/solid/use-one.ssr.js +27 -0
- package/dist/solid/use-one.ssr.js.map +1 -0
- package/dist/solid/use-sync-status.d.ts +8 -0
- package/dist/solid/use-sync-status.d.ts.map +1 -0
- package/dist/solid/use-sync-status.js +13 -0
- package/dist/solid/use-sync-status.js.map +1 -0
- package/dist/solid/use-sync-status.ssr.js +20 -0
- package/dist/solid/use-sync-status.ssr.js.map +1 -0
- package/dist/subscription-store-internal.d.ts +11 -0
- package/dist/subscription-store-internal.d.ts.map +1 -0
- package/dist/subscription-store-internal.js +18 -0
- package/dist/subscription-store-internal.js.map +1 -0
- package/dist/subscriptions-orchestrator.d.ts +93 -13
- package/dist/subscriptions-orchestrator.d.ts.map +1 -1
- package/dist/subscriptions-orchestrator.js +392 -75
- package/dist/subscriptions-orchestrator.js.map +1 -1
- package/dist/svelte/JazzProvider.svelte +110 -0
- package/dist/svelte/JazzProvider.svelte.d.ts +24 -0
- package/dist/svelte/JazzProvider.svelte.d.ts.map +1 -0
- package/dist/svelte/JazzSvelteClientProvider.svelte +83 -0
- package/dist/svelte/JazzSvelteClientProvider.svelte.d.ts +15 -0
- package/dist/svelte/JazzSvelteClientProvider.svelte.d.ts.map +1 -0
- package/dist/svelte/JazzSvelteProvider.svelte +160 -28
- package/dist/svelte/JazzSvelteProvider.svelte.d.ts +4 -3
- package/dist/svelte/JazzSvelteProvider.svelte.d.ts.map +1 -1
- package/dist/svelte/context.svelte.d.ts +30 -3
- package/dist/svelte/context.svelte.d.ts.map +1 -1
- package/dist/svelte/context.svelte.js +37 -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 +14 -6
- package/dist/svelte/index.d.ts.map +1 -1
- package/dist/svelte/index.js +11 -6
- package/dist/svelte/query-subscription.svelte.d.ts +60 -0
- package/dist/svelte/query-subscription.svelte.d.ts.map +1 -0
- package/dist/svelte/query-subscription.svelte.js +135 -0
- package/dist/svelte/session-state.d.ts +27 -0
- package/dist/svelte/session-state.d.ts.map +1 -0
- package/dist/svelte/session-state.js +49 -0
- package/dist/svelte/sync-status.d.ts +11 -0
- package/dist/svelte/sync-status.d.ts.map +1 -0
- package/dist/svelte/sync-status.js +15 -0
- package/dist/testing/fixtures/with-bigint/schema.d.ts +18 -0
- package/dist/testing/fixtures/with-bigint/schema.d.ts.map +1 -0
- package/dist/testing/fixtures/with-bigint/schema.js +15 -0
- package/dist/testing/fixtures/with-bigint/schema.js.map +1 -0
- package/dist/testing/index.d.ts +6 -1
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +5 -1
- package/dist/testing/index.js.map +1 -1
- package/dist/testing/policy-test-app.d.ts +129 -0
- package/dist/testing/policy-test-app.d.ts.map +1 -0
- package/dist/testing/policy-test-app.js +229 -0
- package/dist/testing/policy-test-app.js.map +1 -0
- package/dist/testing/test-app.d.ts +272 -0
- package/dist/testing/test-app.d.ts.map +1 -0
- package/dist/testing/test-app.js +62 -0
- package/dist/testing/test-app.js.map +1 -0
- package/dist/testing/test-jazz.d.ts +119 -0
- package/dist/testing/test-jazz.d.ts.map +1 -0
- package/dist/testing/test-jazz.js +162 -0
- package/dist/testing/test-jazz.js.map +1 -0
- package/dist/testing/test-jwt-issuer.d.ts +19 -0
- package/dist/testing/test-jwt-issuer.d.ts.map +1 -0
- package/dist/testing/test-jwt-issuer.js +40 -0
- package/dist/testing/test-jwt-issuer.js.map +1 -0
- package/dist/text-field/index.d.ts +40 -0
- package/dist/text-field/index.d.ts.map +1 -0
- package/dist/text-field/index.js +129 -0
- package/dist/text-field/index.js.map +1 -0
- package/dist/thin/index.d.ts +81 -0
- package/dist/thin/index.d.ts.map +1 -0
- package/dist/thin/index.js +221 -0
- package/dist/thin/index.js.map +1 -0
- package/dist/thin/self-signed-token.d.ts +13 -0
- package/dist/thin/self-signed-token.d.ts.map +1 -0
- package/dist/thin/self-signed-token.js +100 -0
- package/dist/thin/self-signed-token.js.map +1 -0
- package/dist/thin/thin-runtime-source.d.ts +19 -0
- package/dist/thin/thin-runtime-source.d.ts.map +1 -0
- package/dist/thin/thin-runtime-source.js +66 -0
- package/dist/thin/thin-runtime-source.js.map +1 -0
- package/dist/thin/thin-runtime.d.ts +294 -0
- package/dist/thin/thin-runtime.d.ts.map +1 -0
- package/dist/thin/thin-runtime.js +1492 -0
- package/dist/thin/thin-runtime.js.map +1 -0
- package/dist/thin/wire.d.ts +160 -0
- package/dist/thin/wire.d.ts.map +1 -0
- package/dist/thin/wire.js +304 -0
- package/dist/thin/wire.js.map +1 -0
- package/dist/typed-app.d.ts +644 -0
- package/dist/typed-app.d.ts.map +1 -0
- package/dist/typed-app.js +549 -0
- package/dist/typed-app.js.map +1 -0
- package/dist/upgrade/aliases.d.ts +25 -0
- package/dist/upgrade/aliases.d.ts.map +1 -0
- package/dist/upgrade/aliases.js +80 -0
- package/dist/upgrade/aliases.js.map +1 -0
- package/dist/upgrade/app-json.d.ts +32 -0
- package/dist/upgrade/app-json.d.ts.map +1 -0
- package/dist/upgrade/app-json.js +145 -0
- package/dist/upgrade/app-json.js.map +1 -0
- package/dist/upgrade/constants.d.ts +25 -0
- package/dist/upgrade/constants.d.ts.map +1 -0
- package/dist/upgrade/constants.js +136 -0
- package/dist/upgrade/constants.js.map +1 -0
- package/dist/upgrade/edits.d.ts +10 -0
- package/dist/upgrade/edits.d.ts.map +1 -0
- package/dist/upgrade/edits.js +21 -0
- package/dist/upgrade/edits.js.map +1 -0
- package/dist/upgrade/errors.d.ts +12 -0
- package/dist/upgrade/errors.d.ts.map +1 -0
- package/dist/upgrade/errors.js +18 -0
- package/dist/upgrade/errors.js.map +1 -0
- package/dist/upgrade/extras.d.ts +42 -0
- package/dist/upgrade/extras.d.ts.map +1 -0
- package/dist/upgrade/extras.js +487 -0
- package/dist/upgrade/extras.js.map +1 -0
- package/dist/upgrade/fresh.d.ts +36 -0
- package/dist/upgrade/fresh.d.ts.map +1 -0
- package/dist/upgrade/fresh.js +154 -0
- package/dist/upgrade/fresh.js.map +1 -0
- package/dist/upgrade/index.d.ts +79 -0
- package/dist/upgrade/index.d.ts.map +1 -0
- package/dist/upgrade/index.js +806 -0
- package/dist/upgrade/index.js.map +1 -0
- package/dist/upgrade/json-only.d.ts +24 -0
- package/dist/upgrade/json-only.d.ts.map +1 -0
- package/dist/upgrade/json-only.js +124 -0
- package/dist/upgrade/json-only.js.map +1 -0
- package/dist/upgrade/names.d.ts +29 -0
- package/dist/upgrade/names.d.ts.map +1 -0
- package/dist/upgrade/names.js +105 -0
- package/dist/upgrade/names.js.map +1 -0
- package/dist/upgrade/payload-enums.d.ts +18 -0
- package/dist/upgrade/payload-enums.d.ts.map +1 -0
- package/dist/upgrade/payload-enums.js +52 -0
- package/dist/upgrade/payload-enums.js.map +1 -0
- package/dist/upgrade/permissions-check.d.ts +10 -0
- package/dist/upgrade/permissions-check.d.ts.map +1 -0
- package/dist/upgrade/permissions-check.js +85 -0
- package/dist/upgrade/permissions-check.js.map +1 -0
- package/dist/upgrade/program.d.ts +18 -0
- package/dist/upgrade/program.d.ts.map +1 -0
- package/dist/upgrade/program.js +56 -0
- package/dist/upgrade/program.js.map +1 -0
- package/dist/upgrade/project.d.ts +56 -0
- package/dist/upgrade/project.d.ts.map +1 -0
- package/dist/upgrade/project.js +254 -0
- package/dist/upgrade/project.js.map +1 -0
- package/dist/upgrade/rewrite.d.ts +34 -0
- package/dist/upgrade/rewrite.d.ts.map +1 -0
- package/dist/upgrade/rewrite.js +500 -0
- package/dist/upgrade/rewrite.js.map +1 -0
- package/dist/upgrade/schema-ts.d.ts +59 -0
- package/dist/upgrade/schema-ts.d.ts.map +1 -0
- package/dist/upgrade/schema-ts.js +582 -0
- package/dist/upgrade/schema-ts.js.map +1 -0
- package/dist/upgrade/snapshot.d.ts +11 -0
- package/dist/upgrade/snapshot.d.ts.map +1 -0
- package/dist/upgrade/snapshot.js +90 -0
- package/dist/upgrade/snapshot.js.map +1 -0
- package/dist/upgrade/upgrade-test-helpers.d.ts +12 -0
- package/dist/upgrade/upgrade-test-helpers.d.ts.map +1 -0
- package/dist/upgrade/upgrade-test-helpers.js +72 -0
- package/dist/upgrade/upgrade-test-helpers.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 +14 -0
- package/dist/vue/index.d.ts.map +1 -0
- package/dist/vue/index.js +11 -0
- package/dist/vue/index.js.map +1 -0
- package/dist/vue/provider.d.ts +83 -0
- package/dist/vue/provider.d.ts.map +1 -0
- package/dist/vue/provider.js +231 -0
- package/dist/vue/provider.js.map +1 -0
- package/dist/vue/session-key.d.ts +15 -0
- package/dist/vue/session-key.d.ts.map +1 -0
- package/dist/vue/session-key.js +7 -0
- package/dist/vue/session-key.js.map +1 -0
- package/dist/vue/session.d.ts +40 -0
- package/dist/vue/session.d.ts.map +1 -0
- package/dist/vue/session.js +112 -0
- package/dist/vue/session.js.map +1 -0
- package/dist/vue/use-all.d.ts +61 -0
- package/dist/vue/use-all.d.ts.map +1 -0
- package/dist/vue/use-all.js +104 -0
- package/dist/vue/use-all.js.map +1 -0
- package/dist/vue/use-one.d.ts +24 -0
- package/dist/vue/use-one.d.ts.map +1 -0
- package/dist/vue/use-one.js +17 -0
- package/dist/vue/use-one.js.map +1 -0
- package/dist/vue/use-sync-status.d.ts +9 -0
- package/dist/vue/use-sync-status.d.ts.map +1 -0
- package/dist/vue/use-sync-status.js +16 -0
- package/dist/vue/use-sync-status.js.map +1 -0
- package/dist/web/create-jazz-client.d.ts +12 -0
- package/dist/web/create-jazz-client.d.ts.map +1 -0
- package/dist/web/create-jazz-client.js +35 -0
- package/dist/web/create-jazz-client.js.map +1 -0
- package/dist/web/lazy-local-first.d.ts +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 +66 -0
- package/dist/where-operators.js.map +1 -0
- package/dist/window-client-storage.d.ts +7 -0
- package/dist/window-client-storage.d.ts.map +1 -0
- package/dist/window-client-storage.js +27 -0
- package/dist/window-client-storage.js.map +1 -0
- package/dist/worker/jazz-broker-worker-core.d.ts +34 -0
- package/dist/worker/jazz-broker-worker-core.d.ts.map +1 -0
- package/dist/worker/jazz-broker-worker-core.js +2241 -0
- package/dist/worker/jazz-broker-worker-core.js.map +1 -0
- package/dist/worker/jazz-broker-worker.d.ts +3 -0
- package/dist/worker/jazz-broker-worker.d.ts.map +1 -0
- package/dist/worker/jazz-broker-worker.js +5 -0
- package/dist/worker/jazz_wasm_bg.wasm +0 -0
- package/dist/worker/mutation-error-delivery.d.ts +8 -0
- package/dist/worker/mutation-error-delivery.d.ts.map +1 -0
- package/dist/worker/mutation-error-delivery.js +10 -0
- package/dist/worker/mutation-error-delivery.js.map +1 -0
- package/dist/worker/runtime-admission.d.ts +34 -0
- package/dist/worker/runtime-admission.d.ts.map +1 -0
- package/dist/worker/runtime-admission.js +60 -0
- package/dist/worker/runtime-admission.js.map +1 -0
- package/dist/worker/vite-dev-broker.d.ts +2 -0
- package/dist/worker/vite-dev-broker.d.ts.map +1 -0
- package/dist/worker/vite-dev-broker.js +8 -0
- package/dist/worker/vite-dev-broker.js.map +1 -0
- package/package.json +301 -35
- 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 -925
- package/dist/codegen/codegen.test.js.map +0 -1
- package/dist/codegen/index.d.ts +0 -18
- package/dist/codegen/index.d.ts.map +0 -1
- package/dist/codegen/index.js +0 -22
- package/dist/codegen/index.js.map +0 -1
- package/dist/codegen/query-builder-generator.d.ts +0 -26
- package/dist/codegen/query-builder-generator.d.ts.map +0 -1
- package/dist/codegen/query-builder-generator.js +0 -334
- package/dist/codegen/query-builder-generator.js.map +0 -1
- package/dist/codegen/schema-reader.d.ts +0 -12
- package/dist/codegen/schema-reader.d.ts.map +0 -1
- package/dist/codegen/schema-reader.js +0 -195
- package/dist/codegen/schema-reader.js.map +0 -1
- package/dist/codegen/type-generator.d.ts +0 -29
- package/dist/codegen/type-generator.d.ts.map +0 -1
- package/dist/codegen/type-generator.js +0 -296
- package/dist/codegen/type-generator.js.map +0 -1
- package/dist/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 -1276
- 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 -389
- 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 -226
- 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,1030 @@
|
|
|
1
|
+
import { copyAccountConfigAdmission } from "../../accounts/config-capability.js";
|
|
2
|
+
import { reportCredentialRefusal } from "../client.js";
|
|
3
|
+
import { resolveClientInternalSessionSync } from "../client-session.js";
|
|
4
|
+
import { getTrustedReservedSession, setTrustedReservedSession } from "../db-internal-session.js";
|
|
5
|
+
import { CONNECTED, CONNECTING, offlineLink } from "../sync-status.js";
|
|
6
|
+
import { reloadAfterStorageInvalidation } from "../browser-storage-invalidation.js";
|
|
7
|
+
import { runCleanupSteps } from "../run-cleanup-steps.js";
|
|
8
|
+
import { BrowserWorkerUnresponsiveError } from "../native-runtime/browser-worker-protocol.js";
|
|
9
|
+
import { StoreHeldByAnotherTabError } from "../store-held-by-another-tab-error.js";
|
|
10
|
+
import { ConnectionManager, } from "./types.js";
|
|
11
|
+
import { registerBrowserInspectorControl } from "../../dev/inspector-overlay/browser-control-registry.js";
|
|
12
|
+
import { assertBrowserStorageOwnerUnchanged } from "../browser-worker-config.js";
|
|
13
|
+
import { waitForInspectorOpening } from "../native-runtime/inspector-control-lifecycle.js";
|
|
14
|
+
import { toError } from "../util.js";
|
|
15
|
+
import { holdAcrossPageCache } from "../page-cache.js";
|
|
16
|
+
import { browserBuildId, newerBuildReloadAllowed, reloadForNewerBuild, } from "../newer-build-reload.js";
|
|
17
|
+
/**
|
|
18
|
+
* Every persistent browser tab is an in-memory client of one SharedWorker
|
|
19
|
+
* runtime. There are no tab roles, elections, or follower handoffs. SharedWorker
|
|
20
|
+
* identity supplies the normal namespace-wide singleton, while a physical-root
|
|
21
|
+
* Web Lock fences retry generations and separately loaded worker assets.
|
|
22
|
+
*/
|
|
23
|
+
export class BrowserConnectionManager extends ConnectionManager {
|
|
24
|
+
earlyLease;
|
|
25
|
+
connection = null;
|
|
26
|
+
connectionReady = null;
|
|
27
|
+
initialExplicitOfflineStateKnown = false;
|
|
28
|
+
connectionError = null;
|
|
29
|
+
disconnected = false;
|
|
30
|
+
/** Reported by the worker that owns the upstream socket. */
|
|
31
|
+
workerRemoteLink = "connecting";
|
|
32
|
+
/** The worker's link status; absent from an older worker. */
|
|
33
|
+
workerLinkStatus = null;
|
|
34
|
+
workerRemoteLinkListeners = new Set();
|
|
35
|
+
reconnectWaiters = new Set();
|
|
36
|
+
transportTransition = Promise.resolve();
|
|
37
|
+
storageReset = null;
|
|
38
|
+
storageResetError = null;
|
|
39
|
+
connectionScope = null;
|
|
40
|
+
unregisterInspectorControl = null;
|
|
41
|
+
browserConnectionInput = null;
|
|
42
|
+
/** A failed follower owns no recoverable port; reconnect must mint a new one. */
|
|
43
|
+
recoverableConnectionFailure = false;
|
|
44
|
+
workerRecoveryTimer = null;
|
|
45
|
+
workerRecoveryDelayMs = 250;
|
|
46
|
+
observedConfigurationAdmissionFailure = null;
|
|
47
|
+
configurationAdmissionRetry = null;
|
|
48
|
+
readinessByConnection = new WeakMap();
|
|
49
|
+
/** Waiting for a refused connection's replacement (see `admissionRefused`). */
|
|
50
|
+
replacementWaiters = new Set();
|
|
51
|
+
/** Runs out how long a refused tab waits quietly (see `admissionRefused`). */
|
|
52
|
+
heldPatienceTimer = null;
|
|
53
|
+
/** The other tab has held the store past that patience: report it. */
|
|
54
|
+
heldTooLong = false;
|
|
55
|
+
/**
|
|
56
|
+
* The page is in the back/forward cache: it let go of its connection (and
|
|
57
|
+
* its page lock) and opens a new one when it returns (see `page-cache`).
|
|
58
|
+
* What needs the connection meanwhile waits for that one.
|
|
59
|
+
*/
|
|
60
|
+
pageAway = null;
|
|
61
|
+
stopHoldingAcrossPageCache = null;
|
|
62
|
+
/** This tab yields the store to a newer build of the app (see `yieldToNewerBuild`). */
|
|
63
|
+
olderBuildError = null;
|
|
64
|
+
shutdownStarted = false;
|
|
65
|
+
shutdownFailure = null;
|
|
66
|
+
constructor(host,
|
|
67
|
+
/** A lease whose acquisition already started the worker, in parallel with runtime loading. */
|
|
68
|
+
earlyLease) {
|
|
69
|
+
super(host);
|
|
70
|
+
this.earlyLease = earlyLease;
|
|
71
|
+
}
|
|
72
|
+
async start() {
|
|
73
|
+
// This resolves before public Db construction returns, preserving the
|
|
74
|
+
// synchronous application mutation API while leasing the TxId node before
|
|
75
|
+
// the foreground runtime can exist or mint a transaction.
|
|
76
|
+
this.foregroundNodeLease = await (this.earlyLease ??
|
|
77
|
+
this.host.runtimeSource.acquireBrowserForegroundNodeLease(this.host.config));
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* The Db takes no new work: it drains for a graceful shutdown, or its
|
|
81
|
+
* teardown started. Waits for readiness end early then.
|
|
82
|
+
*/
|
|
83
|
+
get dbStopping() {
|
|
84
|
+
return this.host.phase !== "open" || this.host.draining;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The Db's teardown started: final (see `DbPhase`). Only then does this
|
|
88
|
+
* manager stop recovering its worker connection. While the Db merely
|
|
89
|
+
* drains, the connection keeps recovering: the drain's upload needs it,
|
|
90
|
+
* and a failed drain leaves the Db open with a working connection.
|
|
91
|
+
*/
|
|
92
|
+
get dbClosing() {
|
|
93
|
+
return this.host.phase !== "open";
|
|
94
|
+
}
|
|
95
|
+
getClient(schema) {
|
|
96
|
+
if (this.olderBuildError)
|
|
97
|
+
throw this.olderBuildError;
|
|
98
|
+
if (this.shutdownStarted)
|
|
99
|
+
throw new Error("Browser connection manager is shut down");
|
|
100
|
+
if (this.storageResetError)
|
|
101
|
+
throw this.storageResetError;
|
|
102
|
+
if (this.storageReset)
|
|
103
|
+
throw new Error("Browser storage reset is still in progress");
|
|
104
|
+
return super.getClient(schema);
|
|
105
|
+
}
|
|
106
|
+
onClientCreated(input) {
|
|
107
|
+
this.browserConnectionInput = input;
|
|
108
|
+
this.openBrowserWorkerConnection();
|
|
109
|
+
this.stopHoldingAcrossPageCache ??= holdAcrossPageCache({
|
|
110
|
+
leave: () => this.leaveForPageCache(),
|
|
111
|
+
return: () => this.returnFromPageCache(),
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Let go of the worker connection, and with it this tab's liveness lock,
|
|
116
|
+
* while the page is in the back/forward cache: the worker would count a
|
|
117
|
+
* cached page as a live tab (see `page-cache`).
|
|
118
|
+
* Only a connected, idle connection leaves (see `leaveForPageCache` on the
|
|
119
|
+
* connection); any other stays, and the page stays as it was.
|
|
120
|
+
*/
|
|
121
|
+
leaveForPageCache() {
|
|
122
|
+
const connection = this.connection;
|
|
123
|
+
if (!connection ||
|
|
124
|
+
this.pageAway ||
|
|
125
|
+
this.shutdownStarted ||
|
|
126
|
+
this.dbStopping ||
|
|
127
|
+
this.storageReset ||
|
|
128
|
+
this.recoverableConnectionFailure ||
|
|
129
|
+
this.configurationAdmissionRetry ||
|
|
130
|
+
// A tab the inspector attached reconnects only when asked.
|
|
131
|
+
this.connectionScope?.inspectorAttachment ||
|
|
132
|
+
!connection.leaveForPageCache?.())
|
|
133
|
+
return;
|
|
134
|
+
let reopen;
|
|
135
|
+
const reopened = new Promise((resolve) => (reopen = resolve));
|
|
136
|
+
this.pageAway = { left: connection, reopened, reopen };
|
|
137
|
+
this.clearWorkerRecoveryTimer();
|
|
138
|
+
this.unregisterInspectorControl?.();
|
|
139
|
+
this.unregisterInspectorControl = null;
|
|
140
|
+
this.host.clearAuthenticatedInspectorLocalReads();
|
|
141
|
+
this.connection = null;
|
|
142
|
+
this.connectionReady = null;
|
|
143
|
+
this.initialExplicitOfflineStateKnown = false;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Back from the back/forward cache: open a new connection to the worker.
|
|
147
|
+
* The runtime kept its writes and transaction identities; the new
|
|
148
|
+
* connection replays what the worker hasn't seen, as after a worker
|
|
149
|
+
* failure. Unless the store was deleted, reset or invalidated meanwhile
|
|
150
|
+
* (the worker told only the tabs attached then): this page's runtime
|
|
151
|
+
* shows what is gone, so it reloads, as an attached tab does.
|
|
152
|
+
*/
|
|
153
|
+
returnFromPageCache() {
|
|
154
|
+
const away = this.pageAway;
|
|
155
|
+
if (!away)
|
|
156
|
+
return;
|
|
157
|
+
this.pageAway = null;
|
|
158
|
+
if (this.shutdownStarted || this.dbClosing || !this.browserConnectionInput) {
|
|
159
|
+
away.reopen(null);
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
if (away.left.storeChangedSinceLeaving?.()) {
|
|
163
|
+
// Never reconnected, even when the reload guard refuses (a second
|
|
164
|
+
// invalidation within its window): what needs the worker fails instead.
|
|
165
|
+
this.connectionError = new Error("This page's store was reset while the page was in the back/forward cache: reload the page");
|
|
166
|
+
reloadAfterStorageInvalidation();
|
|
167
|
+
away.reopen(null);
|
|
168
|
+
return "stop";
|
|
169
|
+
}
|
|
170
|
+
try {
|
|
171
|
+
away.reopen(this.openBrowserWorkerConnection());
|
|
172
|
+
}
|
|
173
|
+
catch (error) {
|
|
174
|
+
away.reopen(null);
|
|
175
|
+
throw error;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
openBrowserWorkerConnection() {
|
|
179
|
+
if (this.shutdownStarted)
|
|
180
|
+
throw new Error("Browser connection manager is shut down");
|
|
181
|
+
const input = this.browserConnectionInput;
|
|
182
|
+
if (!input)
|
|
183
|
+
throw new Error("Browser worker connection requires an initialized client");
|
|
184
|
+
// An Inspector receipt authenticates one worker connection, not a durable
|
|
185
|
+
// database coordinate. Replacing a failed follower must therefore revoke
|
|
186
|
+
// the old receipt before the new generation can begin serving reads.
|
|
187
|
+
this.host.clearAuthenticatedInspectorLocalReads();
|
|
188
|
+
const workerConfig = { ...this.host.config };
|
|
189
|
+
copyAccountConfigAdmission(this.host.config, workerConfig);
|
|
190
|
+
setTrustedReservedSession(workerConfig, getTrustedReservedSession(this.host.config));
|
|
191
|
+
let scope;
|
|
192
|
+
const connection = this.host.runtimeSource.createBrowserWorkerConnection({
|
|
193
|
+
config: workerConfig,
|
|
194
|
+
schema: input.schema,
|
|
195
|
+
client: input.client,
|
|
196
|
+
onAuthFailure: (reason) => {
|
|
197
|
+
// A tab hears of a refusal from its worker, not from its own runtime.
|
|
198
|
+
reportCredentialRefusal(input.client, reason);
|
|
199
|
+
this.host.markUnauthenticated(reason);
|
|
200
|
+
},
|
|
201
|
+
onAuthRestored: () => this.host.clearAuthError(),
|
|
202
|
+
onExplicitOfflineChange: (offline) => this.setExplicitOffline(connection, offline),
|
|
203
|
+
onRemoteLinkChange: (state, link) => this.setWorkerRemoteLink(connection, state, link),
|
|
204
|
+
onFailure: (error) => this.observeConnectionFailure(connection, toError(error)),
|
|
205
|
+
onStorageReset: (resetId) => this.beginStorageReset(scope, resetId),
|
|
206
|
+
onStorageInvalidated: () => this.reloadAfterStorageInvalidation(connection),
|
|
207
|
+
onNewerBuild: () => this.yieldToNewerBuild(connection),
|
|
208
|
+
});
|
|
209
|
+
scope = {
|
|
210
|
+
connection,
|
|
211
|
+
lease: this.foregroundNodeLease,
|
|
212
|
+
inspectorAttachment: workerConfig.runtimeSources?.inspectorBinding !== undefined,
|
|
213
|
+
resetReason: null,
|
|
214
|
+
leaseWorkerReplaced: false,
|
|
215
|
+
};
|
|
216
|
+
this.connectionScope = scope;
|
|
217
|
+
this.connection = connection;
|
|
218
|
+
this.wakeReplacementWaiters();
|
|
219
|
+
this.setWorkerRemoteLink(connection, "connecting");
|
|
220
|
+
this.observedConfigurationAdmissionFailure = null;
|
|
221
|
+
this.unregisterInspectorControl?.();
|
|
222
|
+
this.unregisterInspectorControl = registerBrowserInspectorControl((signal) => connection.openInspectorControlPort(signal), () => this.host.config);
|
|
223
|
+
this.initialExplicitOfflineStateKnown = false;
|
|
224
|
+
const readiness = connection.ready();
|
|
225
|
+
this.readinessByConnection.set(connection, readiness);
|
|
226
|
+
this.connectionReady = readiness.then(() => {
|
|
227
|
+
// Shutdown may already own this scope while follower init finishes.
|
|
228
|
+
// Keep its lease-owner evidence even after the manager detaches it.
|
|
229
|
+
const realm = connection.getWorkerRealmId?.();
|
|
230
|
+
scope.leaseWorkerReplaced =
|
|
231
|
+
realm !== undefined &&
|
|
232
|
+
scope.lease?.workerRealmId !== undefined &&
|
|
233
|
+
realm !== scope.lease.workerRealmId;
|
|
234
|
+
if (this.connection !== connection)
|
|
235
|
+
return;
|
|
236
|
+
const inspectorPhysicalDbName = connection.getAuthenticatedInspectorAttachmentPhysicalDbName?.();
|
|
237
|
+
if (inspectorPhysicalDbName) {
|
|
238
|
+
this.host.enableAuthenticatedInspectorLocalReads(inspectorPhysicalDbName);
|
|
239
|
+
}
|
|
240
|
+
// The worker sends an initial transport-state event before resolving
|
|
241
|
+
// follower init. Once this resolves, this manager has an authoritative
|
|
242
|
+
// namespace-wide explicit-offline snapshot.
|
|
243
|
+
this.initialExplicitOfflineStateKnown = true;
|
|
244
|
+
this.connectionError = null;
|
|
245
|
+
this.recoverableConnectionFailure = false;
|
|
246
|
+
this.clearWorkerRecoveryTimer();
|
|
247
|
+
this.workerRecoveryDelayMs = 250;
|
|
248
|
+
this.clearHeldPatience();
|
|
249
|
+
}, (error) => {
|
|
250
|
+
this.observeConnectionFailure(connection, toError(error));
|
|
251
|
+
if (this.connection !== connection)
|
|
252
|
+
return;
|
|
253
|
+
// `connectionReady` is also observed by passive readiness consumers
|
|
254
|
+
// (for example the initial offline-state probe). Keep it a settled
|
|
255
|
+
// notification, not a detached rejected promise. Public operations
|
|
256
|
+
// call ensureReady(), which rethrows this stored error below.
|
|
257
|
+
});
|
|
258
|
+
if (this.disconnected) {
|
|
259
|
+
const ready = this.connectionReady;
|
|
260
|
+
void this.enqueueTransportTransition(async () => {
|
|
261
|
+
await ready;
|
|
262
|
+
await connection.disconnect();
|
|
263
|
+
}).catch(() => undefined);
|
|
264
|
+
}
|
|
265
|
+
return connection;
|
|
266
|
+
}
|
|
267
|
+
observeConnectionFailure(connection, error) {
|
|
268
|
+
if (this.shutdownFailure?.connection === connection) {
|
|
269
|
+
if (error instanceof BrowserWorkerUnresponsiveError)
|
|
270
|
+
this.shutdownFailure.abandon(error);
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
if (this.connection !== connection)
|
|
274
|
+
return;
|
|
275
|
+
this.connectionError = error;
|
|
276
|
+
this.recoverableConnectionFailure = true;
|
|
277
|
+
this.rejectReconnectWaiters(error);
|
|
278
|
+
this.notifyWorkerRemoteLink();
|
|
279
|
+
// A newer build has the store: this tab reloads to run it too (unless it
|
|
280
|
+
// already reloaded away from this build in its session and loaded it
|
|
281
|
+
// again: then it waits, as below, on every later refusal too).
|
|
282
|
+
if (connection.isOlderThanStore?.())
|
|
283
|
+
this.yieldToNewerBuild(connection);
|
|
284
|
+
const refused = this.admissionRefused(connection);
|
|
285
|
+
// A refusal for another reason (an older deploy's schema) means the other
|
|
286
|
+
// tab no longer holds the store: report that refusal. A retry that hit an
|
|
287
|
+
// unresponsive worker says nothing about the other tab, so the held state
|
|
288
|
+
// and its patience stand.
|
|
289
|
+
if (refused)
|
|
290
|
+
this.startHeldPatience();
|
|
291
|
+
else if (!(error instanceof BrowserWorkerUnresponsiveError))
|
|
292
|
+
this.clearHeldPatience();
|
|
293
|
+
// Close the failed connection's port and release its page lock now, so
|
|
294
|
+
// the worker detaches it instead of counting it as a live tab until the
|
|
295
|
+
// page goes away, whether or not this tab ever reconnects. Its follower
|
|
296
|
+
// already failed, so this sends no request and doesn't wait for the
|
|
297
|
+
// worker. A refused admission let go of both already, and the retry
|
|
298
|
+
// shuts it down itself.
|
|
299
|
+
if (!refused && !connection.canRetryInitialConfigurationAdmission?.())
|
|
300
|
+
void connection.shutdown().catch(() => undefined);
|
|
301
|
+
if (error instanceof BrowserWorkerUnresponsiveError || refused)
|
|
302
|
+
this.scheduleWorkerRecovery(connection);
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Wait quietly for the other tab to let go for this long: following a
|
|
306
|
+
* sign-up takes it moments, and an abruptly closed tab is noticed by the
|
|
307
|
+
* worker as soon as the browser drops the page.
|
|
308
|
+
*/
|
|
309
|
+
static HELD_BY_ANOTHER_TAB_PATIENCE_MS = 30_000;
|
|
310
|
+
startHeldPatience() {
|
|
311
|
+
if (this.heldPatienceTimer !== null || this.heldTooLong)
|
|
312
|
+
return;
|
|
313
|
+
this.heldPatienceTimer = setTimeout(() => {
|
|
314
|
+
this.heldPatienceTimer = null;
|
|
315
|
+
if (this.shutdownStarted || this.dbClosing)
|
|
316
|
+
return;
|
|
317
|
+
// Still waiting: the other tab is frozen in the background, or never
|
|
318
|
+
// follows (another build). Say so, and fail what waits, so the app can
|
|
319
|
+
// ask the user to close it; the retries go on.
|
|
320
|
+
this.heldTooLong = true;
|
|
321
|
+
this.wakeReplacementWaiters();
|
|
322
|
+
this.notifyWorkerRemoteLink();
|
|
323
|
+
}, BrowserConnectionManager.HELD_BY_ANOTHER_TAB_PATIENCE_MS);
|
|
324
|
+
}
|
|
325
|
+
clearHeldPatience() {
|
|
326
|
+
if (this.heldPatienceTimer !== null)
|
|
327
|
+
clearTimeout(this.heldPatienceTimer);
|
|
328
|
+
this.heldPatienceTimer = null;
|
|
329
|
+
if (!this.heldTooLong)
|
|
330
|
+
return;
|
|
331
|
+
this.heldTooLong = false;
|
|
332
|
+
this.notifyWorkerRemoteLink();
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* The worker refused this tab because another tab holds this account's
|
|
336
|
+
* store:
|
|
337
|
+
* - under another sign-in: a guest who just signed up here, while another
|
|
338
|
+
* tab is still the guest. That tab follows the sign-up, or closes.
|
|
339
|
+
* - with another build's schema: another tab still runs the build this
|
|
340
|
+
* one replaced (or the one that replaced it). That tab reloads, or
|
|
341
|
+
* closes.
|
|
342
|
+
* The worker watches each tab's page lock, so this tab tries again on its
|
|
343
|
+
* own, meanwhile connecting rather than stopped: its writes wait for the
|
|
344
|
+
* worker in this tab, and its queries and waits go on once it joins. Past
|
|
345
|
+
* `HELD_BY_ANOTHER_TAB_PATIENCE_MS` it reports `held-by-another-tab` and
|
|
346
|
+
* fails those waits with a `StoreHeldByAnotherTabError`, still trying in
|
|
347
|
+
* the background. Any other refused configuration (another worker asset,
|
|
348
|
+
* protocol or storage format) still fails visibly.
|
|
349
|
+
*/
|
|
350
|
+
admissionRefused(connection) {
|
|
351
|
+
return !!connection?.waitsForAnotherTab?.();
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* A newer build of the app wants the store (the worker said so), or has it
|
|
355
|
+
* open (it refused this tab as older): this tab stops taking writes (they
|
|
356
|
+
* fail with `olderBuildError` until it reloads), makes those it took
|
|
357
|
+
* durable, closes its connection so the worker can hand the store over,
|
|
358
|
+
* then reloads, through the app's `onNewerBuild` if it has one. A tab
|
|
359
|
+
* that already reloaded away from this very build in its session, and
|
|
360
|
+
* loaded it again (a CDN still serving it, or a rollback to it), doesn't:
|
|
361
|
+
* it waits, as for a build it can't order, for the rest of the session.
|
|
362
|
+
*/
|
|
363
|
+
yieldToNewerBuild(connection) {
|
|
364
|
+
if (this.olderBuildError || this.shutdownStarted || this.dbStopping)
|
|
365
|
+
return;
|
|
366
|
+
const input = this.browserConnectionInput;
|
|
367
|
+
if (this.connection !== connection || !input)
|
|
368
|
+
return;
|
|
369
|
+
const buildId = browserBuildId(input.schema);
|
|
370
|
+
if (!newerBuildReloadAllowed(buildId))
|
|
371
|
+
return;
|
|
372
|
+
this.olderBuildError = new Error("This tab runs an older build of this app than another tab, which has its local store now: reload this tab");
|
|
373
|
+
// A transaction opened before commits through its client, not the Db.
|
|
374
|
+
this.getCurrentClient()?.refuseWrites?.(this.olderBuildError);
|
|
375
|
+
this.wakeReplacementWaiters();
|
|
376
|
+
void (async () => {
|
|
377
|
+
// Writes already taken reach the store before the worker hands it over.
|
|
378
|
+
await connection.flushLocal().catch(() => undefined);
|
|
379
|
+
await connection.shutdown().catch(() => undefined);
|
|
380
|
+
})().then(() => reloadForNewerBuild(buildId));
|
|
381
|
+
}
|
|
382
|
+
/** The error that waits fail with past the patience, saying which other tab to reload. */
|
|
383
|
+
heldByAnotherTabError(connection, cause) {
|
|
384
|
+
return connection.waitsForAnotherTab?.() === "build"
|
|
385
|
+
? new StoreHeldByAnotherTabError("Another tab runs another build of this app (another schema) and holds this account's local store: reload the tab that runs the older build, which may be this one (reloading picks up the newest build), or close it. This tab joins once the other lets go; reloading this tab loses its unsynced writes", { cause })
|
|
386
|
+
: new StoreHeldByAnotherTabError(undefined, { cause });
|
|
387
|
+
}
|
|
388
|
+
/** Resolves once `failed` is no longer this tab's connection, it shuts down, or `signal` aborts. */
|
|
389
|
+
replacementOf(failed, signal) {
|
|
390
|
+
return new Promise((resolve) => {
|
|
391
|
+
const check = () => {
|
|
392
|
+
if (this.connection === failed &&
|
|
393
|
+
!this.olderBuildError &&
|
|
394
|
+
!this.heldTooLong &&
|
|
395
|
+
!this.shutdownStarted &&
|
|
396
|
+
!this.dbStopping &&
|
|
397
|
+
!signal?.aborted)
|
|
398
|
+
return;
|
|
399
|
+
this.replacementWaiters.delete(check);
|
|
400
|
+
signal?.removeEventListener("abort", check);
|
|
401
|
+
resolve();
|
|
402
|
+
};
|
|
403
|
+
this.replacementWaiters.add(check);
|
|
404
|
+
signal?.addEventListener("abort", check, { once: true });
|
|
405
|
+
check();
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
wakeReplacementWaiters() {
|
|
409
|
+
for (const check of [...this.replacementWaiters])
|
|
410
|
+
check();
|
|
411
|
+
}
|
|
412
|
+
scheduleWorkerRecovery(failed) {
|
|
413
|
+
if (this.workerRecoveryTimer !== null ||
|
|
414
|
+
this.shutdownStarted ||
|
|
415
|
+
this.dbClosing ||
|
|
416
|
+
this.storageReset ||
|
|
417
|
+
// A tab the inspector attached recovers only on an explicit call, but
|
|
418
|
+
// waiting for another tab's sign-in is no failure of its own.
|
|
419
|
+
(this.connectionScope?.inspectorAttachment && !this.admissionRefused(failed)))
|
|
420
|
+
return;
|
|
421
|
+
const delay = this.workerRecoveryDelayMs;
|
|
422
|
+
this.workerRecoveryDelayMs = Math.min(delay * 2, 30_000);
|
|
423
|
+
this.workerRecoveryTimer = setTimeout(() => {
|
|
424
|
+
this.workerRecoveryTimer = null;
|
|
425
|
+
void this.enqueueTransportTransition(async () => {
|
|
426
|
+
if (this.connection !== failed ||
|
|
427
|
+
this.shutdownStarted ||
|
|
428
|
+
this.dbClosing ||
|
|
429
|
+
this.storageReset)
|
|
430
|
+
return;
|
|
431
|
+
if (this.admissionRefused(failed)) {
|
|
432
|
+
await this.retryConfigurationAdmission(failed);
|
|
433
|
+
await this.connectionReady;
|
|
434
|
+
return;
|
|
435
|
+
}
|
|
436
|
+
if (!(this.connectionError instanceof BrowserWorkerUnresponsiveError))
|
|
437
|
+
return;
|
|
438
|
+
// Preserve the in-memory runtime, its transaction identities, and its
|
|
439
|
+
// pending durability waiters. Native transport replacement replays the
|
|
440
|
+
// retained outbox through the normal sync and permission path.
|
|
441
|
+
// Worker readiness is sufficient here: recovery also works offline.
|
|
442
|
+
this.reopenFailedFollower();
|
|
443
|
+
await this.connectionReady;
|
|
444
|
+
}).catch((error) => {
|
|
445
|
+
this.connectionError ??= toError(error);
|
|
446
|
+
this.notifyWorkerRemoteLink();
|
|
447
|
+
});
|
|
448
|
+
}, delay);
|
|
449
|
+
}
|
|
450
|
+
clearWorkerRecoveryTimer() {
|
|
451
|
+
if (this.workerRecoveryTimer !== null)
|
|
452
|
+
clearTimeout(this.workerRecoveryTimer);
|
|
453
|
+
this.workerRecoveryTimer = null;
|
|
454
|
+
}
|
|
455
|
+
async ensureReady(requirement, signal) {
|
|
456
|
+
if (this.olderBuildError)
|
|
457
|
+
throw this.olderBuildError;
|
|
458
|
+
if (this.dbStopping || signal?.aborted)
|
|
459
|
+
return;
|
|
460
|
+
const reset = this.storageReset;
|
|
461
|
+
// Capture before yielding: callers already waiting on a rejected attempt
|
|
462
|
+
// must see that rejection, even if a later API call starts a replacement.
|
|
463
|
+
let connection = reset ? null : this.connection;
|
|
464
|
+
const retry = connection !== null && this.observedConfigurationAdmissionFailure === connection;
|
|
465
|
+
await reset;
|
|
466
|
+
if (this.storageResetError)
|
|
467
|
+
throw this.storageResetError;
|
|
468
|
+
if (this.dbStopping || signal?.aborted)
|
|
469
|
+
return;
|
|
470
|
+
// Between a retry's shutdown of the refused connection and its
|
|
471
|
+
// replacement there is none: wait for the replacement.
|
|
472
|
+
connection ??=
|
|
473
|
+
this.connection ??
|
|
474
|
+
(await this.pageAway?.reopened) ??
|
|
475
|
+
(await this.configurationAdmissionRetry);
|
|
476
|
+
if (retry && connection)
|
|
477
|
+
connection = await this.retryConfigurationAdmission(connection);
|
|
478
|
+
if (this.dbStopping || signal?.aborted)
|
|
479
|
+
return;
|
|
480
|
+
for (;;) {
|
|
481
|
+
try {
|
|
482
|
+
await (connection ? this.readinessByConnection.get(connection) : this.connectionReady);
|
|
483
|
+
break;
|
|
484
|
+
}
|
|
485
|
+
catch (error) {
|
|
486
|
+
// A refused tab tries again by itself (see `admissionRefused`): wait
|
|
487
|
+
// for the attempt that joins, as for a reconnect.
|
|
488
|
+
if (connection && this.admissionRefused(connection) && !signal?.aborted) {
|
|
489
|
+
if (this.heldTooLong)
|
|
490
|
+
throw this.heldByAnotherTabError(connection, error);
|
|
491
|
+
await this.replacementOf(connection, signal);
|
|
492
|
+
// This tab yielded to a newer build meanwhile: it reloads.
|
|
493
|
+
if (this.olderBuildError)
|
|
494
|
+
throw this.olderBuildError;
|
|
495
|
+
if (this.dbStopping || this.shutdownStarted || signal?.aborted)
|
|
496
|
+
return;
|
|
497
|
+
connection = this.connection ?? (await this.configurationAdmissionRetry);
|
|
498
|
+
continue;
|
|
499
|
+
}
|
|
500
|
+
if (connection === this.connection &&
|
|
501
|
+
connection?.canRetryInitialConfigurationAdmission?.()) {
|
|
502
|
+
this.observedConfigurationAdmissionFailure = connection;
|
|
503
|
+
}
|
|
504
|
+
throw error;
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
await this.connectionReady;
|
|
508
|
+
if (this.dbStopping)
|
|
509
|
+
return;
|
|
510
|
+
if (this.connectionError)
|
|
511
|
+
throw this.connectionError;
|
|
512
|
+
if (requirement !== "runtime") {
|
|
513
|
+
for (;;) {
|
|
514
|
+
while (this.disconnected) {
|
|
515
|
+
await this.waitForReconnect(signal);
|
|
516
|
+
if (this.dbStopping || signal?.aborted)
|
|
517
|
+
return;
|
|
518
|
+
}
|
|
519
|
+
await this.transportTransition;
|
|
520
|
+
if (!this.disconnected || this.dbStopping || signal?.aborted)
|
|
521
|
+
break;
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
if (this.host.config.serverUrl && requirement === "server") {
|
|
525
|
+
await this.connection?.waitForServerConnection();
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
retryConfigurationAdmission(failed) {
|
|
529
|
+
if (this.configurationAdmissionRetry)
|
|
530
|
+
return this.configurationAdmissionRetry;
|
|
531
|
+
if (failed !== this.connection)
|
|
532
|
+
return Promise.resolve(this.connection);
|
|
533
|
+
const retry = (async () => {
|
|
534
|
+
await failed.shutdown();
|
|
535
|
+
if (this.dbClosing || failed !== this.connection)
|
|
536
|
+
return null;
|
|
537
|
+
this.connection = null;
|
|
538
|
+
this.connectionReady = null;
|
|
539
|
+
this.connectionError = null;
|
|
540
|
+
this.observedConfigurationAdmissionFailure = null;
|
|
541
|
+
return this.openBrowserWorkerConnection();
|
|
542
|
+
})();
|
|
543
|
+
this.configurationAdmissionRetry = retry;
|
|
544
|
+
void retry
|
|
545
|
+
.finally(() => {
|
|
546
|
+
if (this.configurationAdmissionRetry === retry)
|
|
547
|
+
this.configurationAdmissionRetry = null;
|
|
548
|
+
})
|
|
549
|
+
.catch(() => undefined);
|
|
550
|
+
return retry;
|
|
551
|
+
}
|
|
552
|
+
shouldDeferSubscriptionStart(requirement) {
|
|
553
|
+
return requirement === "server";
|
|
554
|
+
}
|
|
555
|
+
isExplicitlyOffline() {
|
|
556
|
+
return this.disconnected;
|
|
557
|
+
}
|
|
558
|
+
initialExplicitOfflineState() {
|
|
559
|
+
return this.initialExplicitOfflineStateKnown ? null : this.connectionReady;
|
|
560
|
+
}
|
|
561
|
+
async waitForReconnect(signal) {
|
|
562
|
+
if (signal?.aborted)
|
|
563
|
+
return;
|
|
564
|
+
if (!this.disconnected) {
|
|
565
|
+
await this.transportTransition;
|
|
566
|
+
if (this.connectionError)
|
|
567
|
+
throw this.connectionError;
|
|
568
|
+
if (!this.disconnected)
|
|
569
|
+
return;
|
|
570
|
+
}
|
|
571
|
+
await new Promise((resolve, reject) => {
|
|
572
|
+
let settled = false;
|
|
573
|
+
const finish = (error) => {
|
|
574
|
+
if (settled)
|
|
575
|
+
return;
|
|
576
|
+
settled = true;
|
|
577
|
+
this.reconnectWaiters.delete(finish);
|
|
578
|
+
signal?.removeEventListener("abort", onAbort);
|
|
579
|
+
if (error)
|
|
580
|
+
reject(error);
|
|
581
|
+
else
|
|
582
|
+
resolve();
|
|
583
|
+
};
|
|
584
|
+
const onAbort = () => finish();
|
|
585
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
586
|
+
this.reconnectWaiters.add(finish);
|
|
587
|
+
if (signal?.aborted)
|
|
588
|
+
finish();
|
|
589
|
+
else if (this.connectionError)
|
|
590
|
+
finish(this.connectionError);
|
|
591
|
+
});
|
|
592
|
+
}
|
|
593
|
+
async disconnect() {
|
|
594
|
+
if (!this.host.config.serverUrl) {
|
|
595
|
+
throw new Error("Db.disconnect() requires a configured serverUrl.");
|
|
596
|
+
}
|
|
597
|
+
await this.enqueueTransportTransition(async () => {
|
|
598
|
+
await this.connectionReady;
|
|
599
|
+
await this.connection?.disconnect();
|
|
600
|
+
// Report explicit offline only after the worker confirms disconnect.
|
|
601
|
+
this.disconnected = true;
|
|
602
|
+
this.publishExplicitOfflineState();
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
async reconnect() {
|
|
606
|
+
if (!this.host.config.serverUrl) {
|
|
607
|
+
throw new Error("Db.reconnect() requires a configured serverUrl.");
|
|
608
|
+
}
|
|
609
|
+
await this.enqueueTransportTransition(async () => {
|
|
610
|
+
if (this.shutdownStarted)
|
|
611
|
+
throw new Error("Browser connection manager is shut down");
|
|
612
|
+
if (this.pageAway)
|
|
613
|
+
await this.pageAway.reopened;
|
|
614
|
+
if (this.recoverableConnectionFailure)
|
|
615
|
+
this.reopenFailedFollower();
|
|
616
|
+
await this.connectionReady;
|
|
617
|
+
if (this.connectionError)
|
|
618
|
+
throw this.connectionError;
|
|
619
|
+
const connection = this.connection;
|
|
620
|
+
if (!connection)
|
|
621
|
+
throw new Error("Browser worker connection is unavailable");
|
|
622
|
+
await connection.reconnect(JSON.stringify(runtimeAuth(this.host.config)), runtimeSessionClaims(this.host.config));
|
|
623
|
+
this.disconnected = false;
|
|
624
|
+
this.publishExplicitOfflineState();
|
|
625
|
+
});
|
|
626
|
+
if (!this.disconnected)
|
|
627
|
+
this.resolveReconnectWaiters();
|
|
628
|
+
}
|
|
629
|
+
updateAuth(auth) {
|
|
630
|
+
// The persistent root belongs to the principal that opened it. Check
|
|
631
|
+
// before mutating Db config or forwarding anything to the worker, so a
|
|
632
|
+
// rejected Alice -> Bob switch cannot expose Alice's local rows to Bob.
|
|
633
|
+
const nextConfig = {
|
|
634
|
+
...this.host.config,
|
|
635
|
+
...(auth.mode === "bearer"
|
|
636
|
+
? { jwtToken: auth.jwtToken, cookieSession: undefined }
|
|
637
|
+
: { jwtToken: undefined, cookieSession: auth.cookieSession }),
|
|
638
|
+
};
|
|
639
|
+
setTrustedReservedSession(nextConfig, auth.mode === "bearer" ? auth.trustedReservedSession : undefined);
|
|
640
|
+
assertBrowserStorageOwnerUnchanged(this.host.config, nextConfig);
|
|
641
|
+
super.updateAuth(auth);
|
|
642
|
+
const connection = this.connection;
|
|
643
|
+
if (!connection)
|
|
644
|
+
return;
|
|
645
|
+
void connection
|
|
646
|
+
.updateAuth(JSON.stringify(runtimeAuth(nextConfig)), runtimeSessionClaims(nextConfig))
|
|
647
|
+
.catch((error) => {
|
|
648
|
+
this.observeConnectionFailure(connection, toError(error));
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
async deleteClientStorage() {
|
|
652
|
+
// A reset already in progress (e.g. another tab deleted the shared
|
|
653
|
+
// storage) has detached this Db's client and connection; it is the
|
|
654
|
+
// delete, so wait for it rather than reopening mid-reset.
|
|
655
|
+
if (this.storageReset)
|
|
656
|
+
return this.storageReset;
|
|
657
|
+
// A Db that hasn't read or written yet has no worker connection, and
|
|
658
|
+
// without one there would be nothing to delete through: open it, as the
|
|
659
|
+
// direct manager opens its client, so the delete reaches the storage.
|
|
660
|
+
if (!this.connection && !this.getCurrentClient())
|
|
661
|
+
this.getClient({});
|
|
662
|
+
// Another tab may hold this account's store under another sign-in (a
|
|
663
|
+
// guest signed up here and now signs out, while another tab is still the
|
|
664
|
+
// guest). Wait for it to let go, as reads and writes do: it follows the
|
|
665
|
+
// sign-up and sign-out, or closes. Past the patience this fails with a
|
|
666
|
+
// `StoreHeldByAnotherTabError`, and the delete can be tried again: a
|
|
667
|
+
// delete asked for past the patience tries to join at once, rather than
|
|
668
|
+
// at the next background attempt, and fails at once if still held.
|
|
669
|
+
const held = this.connection;
|
|
670
|
+
if (held && this.heldTooLong && this.admissionRefused(held))
|
|
671
|
+
await this.retryConfigurationAdmission(held);
|
|
672
|
+
await this.ensureReady("runtime");
|
|
673
|
+
if (this.storageReset)
|
|
674
|
+
return this.storageReset;
|
|
675
|
+
if (!this.connection)
|
|
676
|
+
throw new Error("deleteClientStorage(): the browser worker is not connected");
|
|
677
|
+
const deletion = await this.connection.deleteStorage();
|
|
678
|
+
await this.storageReset;
|
|
679
|
+
return deletion;
|
|
680
|
+
}
|
|
681
|
+
async storePendingUploads() {
|
|
682
|
+
if (!this.connection || this.storageReset)
|
|
683
|
+
return undefined;
|
|
684
|
+
return (await this.connection.storePendingUploads?.().catch(() => undefined)) ?? undefined;
|
|
685
|
+
}
|
|
686
|
+
isUsable() {
|
|
687
|
+
return !this.shutdownStarted && !this.storageReset && !this.storageResetError;
|
|
688
|
+
}
|
|
689
|
+
async openInspectorControlPort(signal) {
|
|
690
|
+
await waitForInspectorOpening(this.connectionReady ?? Promise.resolve(), signal);
|
|
691
|
+
if (!this.connection)
|
|
692
|
+
throw new Error("Shared browser runtime is not connected");
|
|
693
|
+
return this.connection.openInspectorControlPort(signal);
|
|
694
|
+
}
|
|
695
|
+
beginStorageReset(scope, resetId) {
|
|
696
|
+
if (scope.resetReason ||
|
|
697
|
+
(this.connectionScope !== scope && this.shutdownFailure?.scope !== scope))
|
|
698
|
+
return;
|
|
699
|
+
scope.resetReason = new Error(`Browser foreground lease released after storage reset ${resetId}`);
|
|
700
|
+
this.clearWorkerRecoveryTimer();
|
|
701
|
+
this.host.clearAuthenticatedInspectorLocalReads();
|
|
702
|
+
this.connection = null;
|
|
703
|
+
this.connectionReady = null;
|
|
704
|
+
this.foregroundNodeLease = undefined;
|
|
705
|
+
this.initialExplicitOfflineStateKnown = false;
|
|
706
|
+
const client = this.detachClient();
|
|
707
|
+
const reset = runCleanupSteps([
|
|
708
|
+
() => client?.discard(),
|
|
709
|
+
() => scope.lease?.releaseAfterStorageReset(scope.resetReason),
|
|
710
|
+
() => {
|
|
711
|
+
if (this.shutdownFailure?.scope === scope)
|
|
712
|
+
this.shutdownFailure.reset();
|
|
713
|
+
},
|
|
714
|
+
() => scope.connection.shutdown(),
|
|
715
|
+
async () => {
|
|
716
|
+
if (this.shutdownStarted || this.connectionScope !== scope)
|
|
717
|
+
return;
|
|
718
|
+
if (scope.inspectorAttachment) {
|
|
719
|
+
this.storageResetError = new Error("Inspector storage was reset; a new attachment is required");
|
|
720
|
+
return;
|
|
721
|
+
}
|
|
722
|
+
const successor = await this.host.runtimeSource.acquireBrowserForegroundNodeLease(this.host.config);
|
|
723
|
+
if (this.shutdownStarted || this.connectionScope !== scope)
|
|
724
|
+
await successor.retire();
|
|
725
|
+
else
|
|
726
|
+
this.foregroundNodeLease = successor;
|
|
727
|
+
},
|
|
728
|
+
]).finally(() => {
|
|
729
|
+
if (this.storageReset !== reset)
|
|
730
|
+
return;
|
|
731
|
+
this.storageReset = null;
|
|
732
|
+
if (this.connectionScope === scope)
|
|
733
|
+
this.connectionScope = null;
|
|
734
|
+
});
|
|
735
|
+
this.storageReset = reset;
|
|
736
|
+
// A reset received by another tab has no direct promise consumer yet.
|
|
737
|
+
// Retain its failure for subsequent synchronous client access/readiness.
|
|
738
|
+
void reset.catch((error) => {
|
|
739
|
+
this.storageResetError ??= toError(error);
|
|
740
|
+
});
|
|
741
|
+
}
|
|
742
|
+
/**
|
|
743
|
+
* A follower transport failure closes its MessagePort by design. Reusing the
|
|
744
|
+
* old wrapper would only repeat its stored failure, so explicit reconnect
|
|
745
|
+
* acquires a new follower against the same durable SharedWorker namespace.
|
|
746
|
+
*/
|
|
747
|
+
reopenFailedFollower() {
|
|
748
|
+
if (!this.recoverableConnectionFailure)
|
|
749
|
+
return;
|
|
750
|
+
this.clearWorkerRecoveryTimer();
|
|
751
|
+
this.host.clearAuthenticatedInspectorLocalReads();
|
|
752
|
+
// The failed connection was shut down when its failure was observed.
|
|
753
|
+
this.connection = null;
|
|
754
|
+
this.connectionReady = null;
|
|
755
|
+
this.connectionError = null;
|
|
756
|
+
this.initialExplicitOfflineStateKnown = false;
|
|
757
|
+
this.recoverableConnectionFailure = false;
|
|
758
|
+
this.openBrowserWorkerConnection();
|
|
759
|
+
}
|
|
760
|
+
reloadAfterStorageInvalidation(connection) {
|
|
761
|
+
if (this.connection !== connection)
|
|
762
|
+
return;
|
|
763
|
+
this.connectionError = new Error("IndexedDB storage was externally invalidated");
|
|
764
|
+
reloadAfterStorageInvalidation();
|
|
765
|
+
}
|
|
766
|
+
async waitForPendingWrites() {
|
|
767
|
+
const connection = this.connection ?? (await this.pageAway?.reopened);
|
|
768
|
+
await connection?.waitForPendingWrites();
|
|
769
|
+
}
|
|
770
|
+
async shutdown() {
|
|
771
|
+
if (this.shutdownStarted)
|
|
772
|
+
return;
|
|
773
|
+
this.shutdownStarted = true;
|
|
774
|
+
this.clearWorkerRecoveryTimer();
|
|
775
|
+
this.stopHoldingAcrossPageCache?.();
|
|
776
|
+
this.stopHoldingAcrossPageCache = null;
|
|
777
|
+
this.pageAway?.reopen(null);
|
|
778
|
+
this.pageAway = null;
|
|
779
|
+
if (this.heldPatienceTimer !== null)
|
|
780
|
+
clearTimeout(this.heldPatienceTimer);
|
|
781
|
+
this.heldPatienceTimer = null;
|
|
782
|
+
this.wakeReplacementWaiters();
|
|
783
|
+
const connection = this.connection;
|
|
784
|
+
const scope = this.connectionScope;
|
|
785
|
+
const admissionError = this.connectionError;
|
|
786
|
+
this.connection = null;
|
|
787
|
+
this.connectionReady = null;
|
|
788
|
+
this.browserConnectionInput = null;
|
|
789
|
+
this.initialExplicitOfflineStateKnown = false;
|
|
790
|
+
this.resolveReconnectWaiters();
|
|
791
|
+
const unregisterInspectorControl = this.unregisterInspectorControl;
|
|
792
|
+
this.unregisterInspectorControl = null;
|
|
793
|
+
const lease = this.foregroundNodeLease;
|
|
794
|
+
this.foregroundNodeLease = undefined;
|
|
795
|
+
const client = this.getCurrentClient();
|
|
796
|
+
let workerFailure = null;
|
|
797
|
+
let flushFailed = false;
|
|
798
|
+
let notifyAbandoned;
|
|
799
|
+
const abandoned = new Promise((resolve) => {
|
|
800
|
+
notifyAbandoned = resolve;
|
|
801
|
+
});
|
|
802
|
+
const abandon = (error) => {
|
|
803
|
+
if (workerFailure)
|
|
804
|
+
return;
|
|
805
|
+
workerFailure = error;
|
|
806
|
+
// Shutdown owns this lifetime now. Disable minting before even a best-effort
|
|
807
|
+
// retirement can transfer ownership; a mere reconnect never reaches here.
|
|
808
|
+
try {
|
|
809
|
+
this.detachClient()?.discard();
|
|
810
|
+
}
|
|
811
|
+
catch {
|
|
812
|
+
// The causal worker failure remains first even if local disposal fails.
|
|
813
|
+
}
|
|
814
|
+
finally {
|
|
815
|
+
lease?.abandonAfterWorkerFailure(error);
|
|
816
|
+
notifyAbandoned();
|
|
817
|
+
}
|
|
818
|
+
};
|
|
819
|
+
this.shutdownFailure = { connection, scope, abandon, reset: notifyAbandoned };
|
|
820
|
+
if (admissionError instanceof BrowserWorkerUnresponsiveError)
|
|
821
|
+
abandon(admissionError);
|
|
822
|
+
try {
|
|
823
|
+
await runCleanupSteps([
|
|
824
|
+
() => {
|
|
825
|
+
if (workerFailure)
|
|
826
|
+
throw workerFailure;
|
|
827
|
+
},
|
|
828
|
+
() => unregisterInspectorControl?.(),
|
|
829
|
+
() => this.storageReset ?? undefined,
|
|
830
|
+
async () => {
|
|
831
|
+
if (workerFailure)
|
|
832
|
+
throw workerFailure;
|
|
833
|
+
if (scope?.resetReason)
|
|
834
|
+
return;
|
|
835
|
+
// Configuration rejection is not a dead realm: skip the absent follower
|
|
836
|
+
// flush, but retain the lease's ordinary clean-return semantics.
|
|
837
|
+
if (admissionError)
|
|
838
|
+
return;
|
|
839
|
+
try {
|
|
840
|
+
await Promise.race([
|
|
841
|
+
connection?.flushLocal(),
|
|
842
|
+
abandoned.then(() => {
|
|
843
|
+
if (workerFailure)
|
|
844
|
+
throw workerFailure;
|
|
845
|
+
}),
|
|
846
|
+
]);
|
|
847
|
+
}
|
|
848
|
+
catch (error) {
|
|
849
|
+
flushFailed = true;
|
|
850
|
+
if (workerFailure)
|
|
851
|
+
throw workerFailure;
|
|
852
|
+
if (error instanceof BrowserWorkerUnresponsiveError)
|
|
853
|
+
abandon(error);
|
|
854
|
+
throw error;
|
|
855
|
+
}
|
|
856
|
+
},
|
|
857
|
+
async () => {
|
|
858
|
+
if (workerFailure)
|
|
859
|
+
throw workerFailure;
|
|
860
|
+
if (scope?.resetReason)
|
|
861
|
+
return;
|
|
862
|
+
if (!lease)
|
|
863
|
+
return;
|
|
864
|
+
let finishFailed = false;
|
|
865
|
+
let finishError;
|
|
866
|
+
const finish = async () => {
|
|
867
|
+
try {
|
|
868
|
+
const runtime = client?.getRuntime();
|
|
869
|
+
if (!runtime) {
|
|
870
|
+
if (flushFailed)
|
|
871
|
+
await lease.retire();
|
|
872
|
+
else
|
|
873
|
+
await lease.returnWithHighWater(lease.confirmedTxTime);
|
|
874
|
+
}
|
|
875
|
+
else if (!runtime.quiesceForegroundTxTimeHighWater) {
|
|
876
|
+
await lease.retire();
|
|
877
|
+
}
|
|
878
|
+
else {
|
|
879
|
+
// Even after an ordinary flush failure, close mutation admission
|
|
880
|
+
// and drain started writes before releasing this identity. A
|
|
881
|
+
// failed flush cannot establish a clean durable handoff.
|
|
882
|
+
const highWater = await runtime.quiesceForegroundTxTimeHighWater();
|
|
883
|
+
if (scope?.resetReason)
|
|
884
|
+
return;
|
|
885
|
+
if (scope?.leaseWorkerReplaced && lease.releaseAfterWorkerReplacement) {
|
|
886
|
+
lease.releaseAfterWorkerReplacement(new Error("Foreground lease owner was replaced"));
|
|
887
|
+
}
|
|
888
|
+
else if (flushFailed)
|
|
889
|
+
await lease.retire();
|
|
890
|
+
else
|
|
891
|
+
await lease.returnWithHighWater(highWater);
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
catch (error) {
|
|
895
|
+
if (error === scope?.resetReason)
|
|
896
|
+
return;
|
|
897
|
+
finishFailed = true;
|
|
898
|
+
finishError = workerFailure ?? error;
|
|
899
|
+
// Abandonment rejects this fallback too; never replace the first
|
|
900
|
+
// failure or retry an unknown clean return.
|
|
901
|
+
await lease.retire().catch(() => undefined);
|
|
902
|
+
throw finishError;
|
|
903
|
+
}
|
|
904
|
+
};
|
|
905
|
+
// A causal failure may arrive while high-water capture or lease finish
|
|
906
|
+
// is already in flight. Its background work cannot hold shutdown open.
|
|
907
|
+
await Promise.race([
|
|
908
|
+
finish(),
|
|
909
|
+
abandoned.then(() => {
|
|
910
|
+
if (finishFailed)
|
|
911
|
+
throw finishError;
|
|
912
|
+
if (workerFailure)
|
|
913
|
+
throw workerFailure;
|
|
914
|
+
}),
|
|
915
|
+
]);
|
|
916
|
+
},
|
|
917
|
+
() => {
|
|
918
|
+
// The tab view is non-durable; only its worker owns persistence shutdown.
|
|
919
|
+
this.detachClient()?.discard();
|
|
920
|
+
},
|
|
921
|
+
() => super.shutdown(),
|
|
922
|
+
() => (scope?.resetReason ? undefined : connection?.shutdown()),
|
|
923
|
+
() => this.storageReset ?? undefined,
|
|
924
|
+
() => {
|
|
925
|
+
if (workerFailure)
|
|
926
|
+
throw workerFailure;
|
|
927
|
+
},
|
|
928
|
+
]);
|
|
929
|
+
}
|
|
930
|
+
finally {
|
|
931
|
+
this.shutdownFailure = null;
|
|
932
|
+
if (this.connectionScope === scope)
|
|
933
|
+
this.connectionScope = null;
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
resolveReconnectWaiters() {
|
|
937
|
+
const waiters = [...this.reconnectWaiters];
|
|
938
|
+
this.reconnectWaiters.clear();
|
|
939
|
+
for (const settle of waiters)
|
|
940
|
+
settle();
|
|
941
|
+
}
|
|
942
|
+
rejectReconnectWaiters(error) {
|
|
943
|
+
const waiters = [...this.reconnectWaiters];
|
|
944
|
+
this.reconnectWaiters.clear();
|
|
945
|
+
for (const settle of waiters)
|
|
946
|
+
settle(error);
|
|
947
|
+
}
|
|
948
|
+
/**
|
|
949
|
+
* A persistent browser namespace has one worker-owned upstream connection.
|
|
950
|
+
* The initiating tab receives the RPC result too, but every attached tab
|
|
951
|
+
* must make the same explicit-offline choice for its reads.
|
|
952
|
+
*/
|
|
953
|
+
setExplicitOffline(connection, offline) {
|
|
954
|
+
if (this.connection !== connection)
|
|
955
|
+
return;
|
|
956
|
+
this.disconnected = offline;
|
|
957
|
+
this.publishExplicitOfflineState();
|
|
958
|
+
if (!offline)
|
|
959
|
+
this.resolveReconnectWaiters();
|
|
960
|
+
}
|
|
961
|
+
transportLinkState() {
|
|
962
|
+
// A failed follower cannot receive the worker's answer.
|
|
963
|
+
if (this.heldTooLong)
|
|
964
|
+
return "unavailable";
|
|
965
|
+
if (this.connectionError && this.admissionRefused(this.connection))
|
|
966
|
+
return "connecting";
|
|
967
|
+
return this.connectionError ? "unavailable" : this.workerRemoteLink;
|
|
968
|
+
}
|
|
969
|
+
onTransportLinkStateChange(listener, signal) {
|
|
970
|
+
if (signal.aborted)
|
|
971
|
+
return;
|
|
972
|
+
this.workerRemoteLinkListeners.add(listener);
|
|
973
|
+
signal.addEventListener("abort", () => this.workerRemoteLinkListeners.delete(listener), {
|
|
974
|
+
once: true,
|
|
975
|
+
});
|
|
976
|
+
}
|
|
977
|
+
transportLinkStatus() {
|
|
978
|
+
// A failed follower cannot receive the worker's answer.
|
|
979
|
+
if (this.heldTooLong)
|
|
980
|
+
return offlineLink("held-by-another-tab", true);
|
|
981
|
+
if (this.connectionError && this.admissionRefused(this.connection))
|
|
982
|
+
return CONNECTING;
|
|
983
|
+
if (this.connectionError)
|
|
984
|
+
return offlineLink("stopped");
|
|
985
|
+
// This Db has a server configured, so a worker that has not dialled yet
|
|
986
|
+
// (it may still wait for a credential) is about to connect, not local-only.
|
|
987
|
+
if (this.workerLinkStatus) {
|
|
988
|
+
return this.workerLinkStatus.state === "local-only" ? CONNECTING : this.workerLinkStatus;
|
|
989
|
+
}
|
|
990
|
+
switch (this.workerRemoteLink) {
|
|
991
|
+
case "connected":
|
|
992
|
+
return CONNECTED;
|
|
993
|
+
case "unavailable":
|
|
994
|
+
return offlineLink("network");
|
|
995
|
+
default:
|
|
996
|
+
return CONNECTING;
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
setWorkerRemoteLink(connection, state, link = null) {
|
|
1000
|
+
if (this.connection !== connection)
|
|
1001
|
+
return;
|
|
1002
|
+
this.workerRemoteLink = state;
|
|
1003
|
+
this.workerLinkStatus = link;
|
|
1004
|
+
this.notifyWorkerRemoteLink();
|
|
1005
|
+
}
|
|
1006
|
+
notifyWorkerRemoteLink() {
|
|
1007
|
+
for (const listener of [...this.workerRemoteLinkListeners])
|
|
1008
|
+
listener();
|
|
1009
|
+
this.notifySyncStatus();
|
|
1010
|
+
}
|
|
1011
|
+
enqueueTransportTransition(run) {
|
|
1012
|
+
const transition = this.transportTransition.then(run, run);
|
|
1013
|
+
this.transportTransition = transition.catch(() => undefined);
|
|
1014
|
+
return transition;
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
function runtimeAuth(config) {
|
|
1018
|
+
return {
|
|
1019
|
+
jwt_token: config.jwtToken ?? null,
|
|
1020
|
+
...(config.adminSecret ? { admin_secret: config.adminSecret } : {}),
|
|
1021
|
+
...(config.cookieSession ? { backend_session: config.cookieSession } : {}),
|
|
1022
|
+
};
|
|
1023
|
+
}
|
|
1024
|
+
function runtimeSessionClaims(config) {
|
|
1025
|
+
return (resolveClientInternalSessionSync({
|
|
1026
|
+
...config,
|
|
1027
|
+
trustedReservedSession: getTrustedReservedSession(config),
|
|
1028
|
+
})?.claims ?? {});
|
|
1029
|
+
}
|
|
1030
|
+
//# sourceMappingURL=browser-connection-manager.js.map
|