jazz-tools 2.0.0-alpha.9 → 2.0.0-beta.1
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 +136 -9
- package/bin/jazz-tools.js +95 -68
- package/dist/_dev/inspector-cache-runtime.d.ts +8 -0
- package/dist/_dev/inspector-cache-runtime.d.ts.map +1 -0
- package/dist/_dev/inspector-cache-runtime.js +246 -0
- package/dist/_dev/inspector-cache-runtime.js.map +1 -0
- package/dist/_dev/inspector-client.d.ts +15 -0
- package/dist/_dev/inspector-client.d.ts.map +1 -0
- package/dist/_dev/inspector-client.js +134 -0
- package/dist/_dev/inspector-client.js.map +1 -0
- package/dist/_dev/native-account-session.d.ts +23 -0
- package/dist/_dev/native-account-session.d.ts.map +1 -0
- package/dist/_dev/native-account-session.js +61 -0
- package/dist/_dev/native-account-session.js.map +1 -0
- package/dist/_dev/native-binding-codec.d.ts +9 -0
- package/dist/_dev/native-binding-codec.d.ts.map +1 -0
- package/dist/_dev/native-binding-codec.js +9 -0
- package/dist/_dev/native-binding-codec.js.map +1 -0
- package/dist/accounts/account-manager-core.d.ts +87 -0
- package/dist/accounts/account-manager-core.d.ts.map +1 -0
- package/dist/accounts/account-manager-core.js +236 -0
- package/dist/accounts/account-manager-core.js.map +1 -0
- package/dist/accounts/browser-host.d.ts +8 -0
- package/dist/accounts/browser-host.d.ts.map +1 -0
- package/dist/accounts/browser-host.js +16 -0
- package/dist/accounts/browser-host.js.map +1 -0
- package/dist/accounts/config-capability.d.ts +26 -0
- package/dist/accounts/config-capability.d.ts.map +1 -0
- package/dist/accounts/config-capability.js +58 -0
- package/dist/accounts/config-capability.js.map +1 -0
- package/dist/accounts/context.d.ts +14 -0
- package/dist/accounts/context.d.ts.map +1 -0
- package/dist/accounts/context.js +214 -0
- package/dist/accounts/context.js.map +1 -0
- package/dist/accounts/enrollment.d.ts +95 -0
- package/dist/accounts/enrollment.d.ts.map +1 -0
- package/dist/accounts/enrollment.js +314 -0
- package/dist/accounts/enrollment.js.map +1 -0
- package/dist/accounts/exports.d.ts +3 -0
- package/dist/accounts/exports.d.ts.map +1 -0
- package/dist/accounts/exports.js +5 -0
- package/dist/accounts/exports.js.map +1 -0
- package/dist/accounts/local-first.d.ts +17 -0
- package/dist/accounts/local-first.d.ts.map +1 -0
- package/dist/accounts/local-first.js +62 -0
- package/dist/accounts/local-first.js.map +1 -0
- package/dist/accounts/persistence.d.ts +79 -0
- package/dist/accounts/persistence.d.ts.map +1 -0
- package/dist/accounts/persistence.js +533 -0
- package/dist/accounts/persistence.js.map +1 -0
- package/dist/accounts/process-store.d.ts +27 -0
- package/dist/accounts/process-store.d.ts.map +1 -0
- package/dist/accounts/process-store.js +49 -0
- package/dist/accounts/process-store.js.map +1 -0
- package/dist/accounts/registry-client.d.ts +79 -0
- package/dist/accounts/registry-client.d.ts.map +1 -0
- package/dist/accounts/registry-client.js +153 -0
- package/dist/accounts/registry-client.js.map +1 -0
- package/dist/accounts/state.d.ts +76 -0
- package/dist/accounts/state.d.ts.map +1 -0
- package/dist/accounts/state.js +172 -0
- package/dist/accounts/state.js.map +1 -0
- package/dist/app-file-enums.d.ts +9 -0
- package/dist/app-file-enums.d.ts.map +1 -0
- package/dist/app-file-enums.js +34 -0
- package/dist/app-file-enums.js.map +1 -0
- package/dist/authoring.d.ts +9 -0
- package/dist/authoring.d.ts.map +1 -0
- package/dist/authoring.js +9 -0
- package/dist/authoring.js.map +1 -0
- package/dist/backend/admission.d.ts +28 -0
- package/dist/backend/admission.d.ts.map +1 -0
- package/dist/backend/admission.js +146 -0
- package/dist/backend/admission.js.map +1 -0
- package/dist/backend/api.d.ts +12 -0
- package/dist/backend/api.d.ts.map +1 -0
- package/dist/backend/api.js +11 -0
- package/dist/backend/api.js.map +1 -0
- package/dist/backend/backend-clients.d.ts +76 -0
- package/dist/backend/backend-clients.d.ts.map +1 -0
- package/dist/backend/backend-clients.js +237 -0
- package/dist/backend/backend-clients.js.map +1 -0
- package/dist/backend/backend-issuer.d.ts +6 -0
- package/dist/backend/backend-issuer.d.ts.map +1 -0
- package/dist/backend/backend-issuer.js +6 -0
- package/dist/backend/backend-issuer.js.map +1 -0
- package/dist/backend/backend-native.d.ts +40 -0
- package/dist/backend/backend-native.d.ts.map +1 -0
- package/dist/backend/backend-native.js +37 -0
- package/dist/backend/backend-native.js.map +1 -0
- package/dist/backend/blobs.d.ts +130 -0
- package/dist/backend/blobs.d.ts.map +1 -0
- package/dist/backend/blobs.js +132 -0
- package/dist/backend/blobs.js.map +1 -0
- package/dist/backend/core-transport.d.ts +61 -0
- package/dist/backend/core-transport.d.ts.map +1 -0
- package/dist/backend/core-transport.js +106 -0
- package/dist/backend/core-transport.js.map +1 -0
- package/dist/backend/create-jazz-context.d.ts +94 -28
- package/dist/backend/create-jazz-context.d.ts.map +1 -1
- package/dist/backend/create-jazz-context.js +661 -67
- package/dist/backend/create-jazz-context.js.map +1 -1
- package/dist/backend/create-jazz-session.d.ts +125 -0
- package/dist/backend/create-jazz-session.d.ts.map +1 -0
- package/dist/backend/create-jazz-session.js +528 -0
- package/dist/backend/create-jazz-session.js.map +1 -0
- package/dist/backend/create-jazz.d.ts +677 -0
- package/dist/backend/create-jazz.d.ts.map +1 -0
- package/dist/backend/create-jazz.js +4076 -0
- package/dist/backend/create-jazz.js.map +1 -0
- package/dist/backend/early-db.d.ts +29 -0
- package/dist/backend/early-db.d.ts.map +1 -0
- package/dist/backend/early-db.js +203 -0
- package/dist/backend/early-db.js.map +1 -0
- package/dist/backend/external-jwt.d.ts +27 -0
- package/dist/backend/external-jwt.d.ts.map +1 -0
- package/dist/backend/external-jwt.js +404 -0
- package/dist/backend/external-jwt.js.map +1 -0
- package/dist/backend/from-jwt.d.ts +64 -0
- package/dist/backend/from-jwt.d.ts.map +1 -0
- package/dist/backend/from-jwt.js +104 -0
- package/dist/backend/from-jwt.js.map +1 -0
- package/dist/backend/index.d.ts +6 -3
- package/dist/backend/index.d.ts.map +1 -1
- package/dist/backend/index.js +18 -2
- package/dist/backend/index.js.map +1 -1
- package/dist/backend/inspect-ui.d.ts +14 -0
- package/dist/backend/inspect-ui.d.ts.map +1 -0
- package/dist/backend/inspect-ui.js +156 -0
- package/dist/backend/inspect-ui.js.map +1 -0
- package/dist/backend/inspect.d.ts +133 -0
- package/dist/backend/inspect.d.ts.map +1 -0
- package/dist/backend/inspect.js +1001 -0
- package/dist/backend/inspect.js.map +1 -0
- package/dist/backend/inspector-ui/0.js +2 -0
- package/dist/backend/inspector-ui/1.js +2 -0
- package/dist/backend/inspector-ui/10.js +2 -0
- package/dist/backend/inspector-ui/11.js +2 -0
- package/dist/backend/inspector-ui/12.js +2 -0
- package/dist/backend/inspector-ui/13.js +2 -0
- package/dist/backend/inspector-ui/14.js +2 -0
- package/dist/backend/inspector-ui/15.js +2 -0
- package/dist/backend/inspector-ui/16.js +2 -0
- package/dist/backend/inspector-ui/17.js +2 -0
- package/dist/backend/inspector-ui/18.js +2 -0
- package/dist/backend/inspector-ui/19.js +2 -0
- package/dist/backend/inspector-ui/2.js +2 -0
- package/dist/backend/inspector-ui/20.js +2 -0
- package/dist/backend/inspector-ui/21.js +2 -0
- package/dist/backend/inspector-ui/3.js +2 -0
- package/dist/backend/inspector-ui/4.js +2 -0
- package/dist/backend/inspector-ui/5.js +2 -0
- package/dist/backend/inspector-ui/6.js +2 -0
- package/dist/backend/inspector-ui/7.js +2 -0
- package/dist/backend/inspector-ui/8.js +2 -0
- package/dist/backend/inspector-ui/9.js +2 -0
- package/dist/backend/inspector-ui-files.d.ts +4 -0
- package/dist/backend/inspector-ui-files.d.ts.map +1 -0
- package/dist/backend/inspector-ui-files.js +26 -0
- package/dist/backend/no-account-error.d.ts +23 -0
- package/dist/backend/no-account-error.d.ts.map +1 -0
- package/dist/backend/no-account-error.js +30 -0
- package/dist/backend/no-account-error.js.map +1 -0
- package/dist/backend/node-native.d.ts +3 -0
- package/dist/backend/node-native.d.ts.map +1 -0
- package/dist/backend/node-native.js +19 -0
- package/dist/backend/node-native.js.map +1 -0
- package/dist/backend/node-peers.d.ts +10 -0
- package/dist/backend/node-peers.d.ts.map +1 -0
- package/dist/backend/node-peers.js +37 -0
- package/dist/backend/node-peers.js.map +1 -0
- package/dist/backend/optional-peer.d.ts +9 -0
- package/dist/backend/optional-peer.d.ts.map +1 -0
- package/dist/backend/optional-peer.js +24 -0
- package/dist/backend/optional-peer.js.map +1 -0
- package/dist/backend/request-auth.d.ts +69 -0
- package/dist/backend/request-auth.d.ts.map +1 -0
- package/dist/backend/request-auth.js +122 -0
- package/dist/backend/request-auth.js.map +1 -0
- package/dist/backend/session-expiry.d.ts +61 -0
- package/dist/backend/session-expiry.d.ts.map +1 -0
- package/dist/backend/session-expiry.js +102 -0
- package/dist/backend/session-expiry.js.map +1 -0
- package/dist/backend/signing-key.d.ts +32 -0
- package/dist/backend/signing-key.d.ts.map +1 -0
- package/dist/backend/signing-key.js +63 -0
- package/dist/backend/signing-key.js.map +1 -0
- package/dist/backend/socket-deadline.d.ts +23 -0
- package/dist/backend/socket-deadline.d.ts.map +1 -0
- package/dist/backend/socket-deadline.js +70 -0
- package/dist/backend/socket-deadline.js.map +1 -0
- package/dist/backend/store-log.d.ts +3 -0
- package/dist/backend/store-log.d.ts.map +1 -0
- package/dist/backend/store-log.js +16 -0
- package/dist/backend/store-log.js.map +1 -0
- package/dist/backend/thin-relay.d.ts +66 -0
- package/dist/backend/thin-relay.d.ts.map +1 -0
- package/dist/backend/thin-relay.js +204 -0
- package/dist/backend/thin-relay.js.map +1 -0
- package/dist/backend/thin-session-client.d.ts +23 -0
- package/dist/backend/thin-session-client.d.ts.map +1 -0
- package/dist/backend/thin-session-client.js +69 -0
- package/dist/backend/thin-session-client.js.map +1 -0
- package/dist/backend/upgrade-status.d.ts +19 -0
- package/dist/backend/upgrade-status.d.ts.map +1 -0
- package/dist/backend/upgrade-status.js +55 -0
- package/dist/backend/upgrade-status.js.map +1 -0
- package/dist/backend/vercel-store.d.ts +345 -0
- package/dist/backend/vercel-store.d.ts.map +1 -0
- package/dist/backend/vercel-store.js +1388 -0
- package/dist/backend/vercel-store.js.map +1 -0
- package/dist/backend/workerd-backend.d.ts +36 -0
- package/dist/backend/workerd-backend.d.ts.map +1 -0
- package/dist/backend/workerd-backend.js +97 -0
- package/dist/backend/workerd-backend.js.map +1 -0
- package/dist/backend/workerd.d.ts +3 -0
- package/dist/backend/workerd.d.ts.map +1 -0
- package/dist/backend/workerd.js +39 -0
- package/dist/backend/workerd.js.map +1 -0
- package/dist/backend/ws-peer.d.ts +32 -0
- package/dist/backend/ws-peer.d.ts.map +1 -0
- package/dist/backend/ws-peer.js +41 -0
- package/dist/backend/ws-peer.js.map +1 -0
- package/dist/better-auth-adapter/fixtures/app.d.ts +151 -0
- package/dist/better-auth-adapter/fixtures/app.d.ts.map +1 -0
- package/dist/better-auth-adapter/fixtures/app.js +13 -0
- package/dist/better-auth-adapter/fixtures/app.js.map +1 -0
- package/dist/better-auth-adapter/fixtures/issuer-upgrade.d.ts +20 -0
- package/dist/better-auth-adapter/fixtures/issuer-upgrade.d.ts.map +1 -0
- package/dist/better-auth-adapter/fixtures/issuer-upgrade.js +27 -0
- package/dist/better-auth-adapter/fixtures/issuer-upgrade.js.map +1 -0
- package/dist/better-auth-adapter/index.d.ts +13 -0
- package/dist/better-auth-adapter/index.d.ts.map +1 -0
- package/dist/better-auth-adapter/index.js +406 -0
- package/dist/better-auth-adapter/index.js.map +1 -0
- package/dist/better-auth-adapter/indexes.d.ts +9 -0
- package/dist/better-auth-adapter/indexes.d.ts.map +1 -0
- package/dist/better-auth-adapter/indexes.js +40 -0
- package/dist/better-auth-adapter/indexes.js.map +1 -0
- package/dist/better-auth-adapter/schema.d.ts +88 -0
- package/dist/better-auth-adapter/schema.d.ts.map +1 -0
- package/dist/better-auth-adapter/schema.js +332 -0
- package/dist/better-auth-adapter/schema.js.map +1 -0
- package/dist/better-auth-adapter/types.d.ts +13 -0
- package/dist/better-auth-adapter/types.d.ts.map +1 -0
- package/dist/better-auth-adapter/types.js +2 -0
- package/dist/better-auth-adapter/types.js.map +1 -0
- package/dist/better-auth-adapter/utils.d.ts +53 -0
- package/dist/better-auth-adapter/utils.d.ts.map +1 -0
- package/dist/better-auth-adapter/utils.js +126 -0
- package/dist/better-auth-adapter/utils.js.map +1 -0
- package/dist/browser-benchmark-mode.d.ts +6 -0
- package/dist/browser-benchmark-mode.d.ts.map +1 -0
- package/dist/browser-benchmark-mode.js +13 -0
- package/dist/browser-benchmark-mode.js.map +1 -0
- package/dist/classic-api.d.ts +59 -0
- package/dist/classic-api.d.ts.map +1 -0
- package/dist/classic-api.js +122 -0
- package/dist/classic-api.js.map +1 -0
- package/dist/cli.d.ts +38 -2
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +457 -265
- package/dist/cli.js.map +1 -1
- package/dist/client/index.d.ts +9 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +5 -0
- package/dist/client/index.js.map +1 -0
- package/dist/cloud/api.d.ts +11 -0
- package/dist/cloud/api.d.ts.map +1 -0
- package/dist/cloud/api.js +46 -0
- package/dist/cloud/api.js.map +1 -0
- package/dist/cloud/commands.d.ts +13 -0
- package/dist/cloud/commands.d.ts.map +1 -0
- package/dist/cloud/commands.js +425 -0
- package/dist/cloud/commands.js.map +1 -0
- package/dist/cloud/credentials.d.ts +49 -0
- package/dist/cloud/credentials.d.ts.map +1 -0
- package/dist/cloud/credentials.js +219 -0
- package/dist/cloud/credentials.js.map +1 -0
- package/dist/cloud/session.d.ts +57 -0
- package/dist/cloud/session.d.ts.map +1 -0
- package/dist/cloud/session.js +269 -0
- package/dist/cloud/session.js.map +1 -0
- package/dist/codegen/relation-analyzer.d.ts +5 -12
- package/dist/codegen/relation-analyzer.d.ts.map +1 -1
- package/dist/codegen/relation-analyzer.js +53 -64
- package/dist/codegen/relation-analyzer.js.map +1 -1
- package/dist/dev/app-files.d.ts +32 -0
- package/dist/dev/app-files.d.ts.map +1 -0
- package/dist/dev/app-files.js +72 -0
- package/dist/dev/app-files.js.map +1 -0
- package/dist/dev/catalogue-api.d.ts +147 -0
- package/dist/dev/catalogue-api.d.ts.map +1 -0
- package/dist/dev/catalogue-api.js +127 -0
- package/dist/dev/catalogue-api.js.map +1 -0
- package/dist/dev/catalogue.d.ts +69 -0
- package/dist/dev/catalogue.d.ts.map +1 -0
- package/dist/dev/catalogue.js +70 -0
- package/dist/dev/catalogue.js.map +1 -0
- package/dist/dev/codegen-napi.d.ts +139 -0
- package/dist/dev/codegen-napi.d.ts.map +1 -0
- package/dist/dev/codegen-napi.js +157 -0
- package/dist/dev/codegen-napi.js.map +1 -0
- package/dist/dev/dev-server.d.ts +62 -0
- package/dist/dev/dev-server.d.ts.map +1 -0
- package/dist/dev/dev-server.js +164 -0
- package/dist/dev/dev-server.js.map +1 -0
- package/dist/dev/index.d.ts +3 -0
- package/dist/dev/index.d.ts.map +1 -0
- package/dist/dev/index.js +3 -0
- package/dist/dev/index.js.map +1 -0
- package/dist/dev/inspector-overlay/browser-control-registry.d.ts +10 -0
- package/dist/dev/inspector-overlay/browser-control-registry.d.ts.map +1 -0
- package/dist/dev/inspector-overlay/browser-control-registry.js +188 -0
- package/dist/dev/inspector-overlay/browser-control-registry.js.map +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/ExportResult-C0ZojfNk.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/backend-0Idv0niF.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/backend-DHeT1LCS.css +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/create-legacy-browser-delegate-DeI8PAZ5.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/diag-api-3Z_Eel3W.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/esm-BB6DtWpZ.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/esm-B_xpsQL2.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/esm-CE7mSo95.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/esm-CcBEG-yV.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/esm-DZrCzNXM.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/esm-k373aadI.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/index-hYDvY1xo.js +5 -0
- package/dist/dev/inspector-overlay/embedded/assets/jazz-broker-worker-Ul47m6zU.js +5 -0
- package/dist/dev/inspector-overlay/embedded/assets/jazz_wasm-zkCtl8wp.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/jazz_wasm_bg-xKxGDG9o.wasm +0 -0
- package/dist/dev/inspector-overlay/embedded/assets/node-foreground-node-lease.browser-2mfp13Qb.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/rolldown-runtime-XKyaHtl9.js +1 -0
- package/dist/dev/inspector-overlay/embedded/assets/src-4JwhxZaW.js +16 -0
- package/dist/dev/inspector-overlay/embedded/assets/src-Cq8gSOLx.css +1 -0
- package/dist/dev/inspector-overlay/embedded/backend.html +17 -0
- package/dist/dev/inspector-overlay/embedded/embedded.html +15 -0
- package/dist/dev/inspector-overlay/embedded/favicon.ico +0 -0
- package/dist/dev/inspector-overlay/host-bridge.d.ts +8 -0
- package/dist/dev/inspector-overlay/host-bridge.d.ts.map +1 -0
- package/dist/dev/inspector-overlay/host-bridge.js +139 -0
- package/dist/dev/inspector-overlay/host-bridge.js.map +1 -0
- package/dist/dev/inspector-overlay/inspector-host-types.d.ts +35 -0
- package/dist/dev/inspector-overlay/inspector-host-types.d.ts.map +1 -0
- package/dist/dev/inspector-overlay/inspector-host-types.js +10 -0
- package/dist/dev/inspector-overlay/inspector-host-types.js.map +1 -0
- package/dist/dev/inspector-overlay/loader.d.ts +24 -0
- package/dist/dev/inspector-overlay/loader.d.ts.map +1 -0
- package/dist/dev/inspector-overlay/loader.js +533 -0
- package/dist/dev/inspector-overlay/loader.js.map +1 -0
- package/dist/dev/migration-graph.d.ts +32 -0
- package/dist/dev/migration-graph.d.ts.map +1 -0
- package/dist/dev/migration-graph.js +136 -0
- package/dist/dev/migration-graph.js.map +1 -0
- package/dist/dev/migrations.d.ts +145 -0
- package/dist/dev/migrations.d.ts.map +1 -0
- package/dist/dev/migrations.js +700 -0
- package/dist/dev/migrations.js.map +1 -0
- package/dist/dev/project.d.ts +65 -0
- package/dist/dev/project.d.ts.map +1 -0
- package/dist/dev/project.js +179 -0
- package/dist/dev/project.js.map +1 -0
- package/dist/dev/schema-utils.d.ts +8 -0
- package/dist/dev/schema-utils.d.ts.map +1 -0
- package/dist/dev/schema-utils.js +75 -0
- package/dist/dev/schema-utils.js.map +1 -0
- package/dist/dev/schema-validation.d.ts +5 -0
- package/dist/dev/schema-validation.d.ts.map +1 -0
- package/dist/dev/schema-validation.js +11 -0
- package/dist/dev/schema-validation.js.map +1 -0
- package/dist/dev/ts-project.d.ts +77 -0
- package/dist/dev/ts-project.d.ts.map +1 -0
- package/dist/dev/ts-project.js +191 -0
- package/dist/dev/ts-project.js.map +1 -0
- package/dist/drivers/index.d.ts +1 -1
- package/dist/drivers/index.d.ts.map +1 -1
- package/dist/drivers/index.js.map +1 -1
- package/dist/drivers/schema-wire.d.ts +19 -3
- package/dist/drivers/schema-wire.d.ts.map +1 -1
- package/dist/drivers/schema-wire.js +61 -11
- package/dist/drivers/schema-wire.js.map +1 -1
- package/dist/drivers/types.d.ts +166 -29
- package/dist/drivers/types.d.ts.map +1 -1
- package/dist/drivers/types.js +5 -2
- package/dist/drivers/types.js.map +1 -1
- package/dist/dsl.d.ts +276 -121
- package/dist/dsl.d.ts.map +1 -1
- package/dist/dsl.js +196 -160
- package/dist/dsl.js.map +1 -1
- package/dist/durable-object/index.d.ts +26 -0
- package/dist/durable-object/index.d.ts.map +1 -0
- package/dist/durable-object/index.js +26 -0
- package/dist/durable-object/index.js.map +1 -0
- package/dist/e2ee/SODIUM-LICENSE.txt +36 -0
- package/dist/e2ee/SODIUM-SOURCES.json +4 -0
- package/dist/e2ee/browser.d.ts +18 -0
- package/dist/e2ee/browser.d.ts.map +1 -0
- package/dist/e2ee/browser.js +111 -0
- package/dist/e2ee/browser.js.map +1 -0
- package/dist/e2ee/context.d.ts +23 -0
- package/dist/e2ee/context.d.ts.map +1 -0
- package/dist/e2ee/context.js +49 -0
- package/dist/e2ee/context.js.map +1 -0
- package/dist/e2ee/crypto.d.ts +10 -0
- package/dist/e2ee/crypto.d.ts.map +1 -0
- package/dist/e2ee/crypto.js +22 -0
- package/dist/e2ee/crypto.js.map +1 -0
- package/dist/e2ee/envelope.d.ts +22 -0
- package/dist/e2ee/envelope.d.ts.map +1 -0
- package/dist/e2ee/envelope.js +52 -0
- package/dist/e2ee/envelope.js.map +1 -0
- package/dist/e2ee/index.d.ts +14 -0
- package/dist/e2ee/index.d.ts.map +1 -0
- package/dist/e2ee/index.js +3 -0
- package/dist/e2ee/index.js.map +1 -0
- package/dist/e2ee/large-value.d.ts +20 -0
- package/dist/e2ee/large-value.d.ts.map +1 -0
- package/dist/e2ee/large-value.js +204 -0
- package/dist/e2ee/large-value.js.map +1 -0
- package/dist/e2ee/native.d.ts +18 -0
- package/dist/e2ee/native.d.ts.map +1 -0
- package/dist/e2ee/native.js +91 -0
- package/dist/e2ee/native.js.map +1 -0
- package/dist/e2ee/record-frame.d.ts +3 -0
- package/dist/e2ee/record-frame.d.ts.map +1 -0
- package/dist/e2ee/record-frame.js +18 -0
- package/dist/e2ee/record-frame.js.map +1 -0
- package/dist/e2ee/signer.d.ts +10 -0
- package/dist/e2ee/signer.d.ts.map +1 -0
- package/dist/e2ee/signer.js +54 -0
- package/dist/e2ee/signer.js.map +1 -0
- package/dist/e2ee/sodium-browser.d.ts +2 -0
- package/dist/e2ee/sodium-browser.d.ts.map +1 -0
- package/dist/e2ee/sodium-browser.js +3432 -0
- package/dist/e2ee/sodium.d.ts +20 -0
- package/dist/e2ee/sodium.d.ts.map +1 -0
- package/dist/e2ee/sodium.js +165 -0
- package/dist/e2ee/sodium.js.map +1 -0
- package/dist/e2ee/types.d.ts +92 -0
- package/dist/e2ee/types.d.ts.map +1 -0
- package/dist/e2ee/types.js +2 -0
- package/dist/e2ee/types.js.map +1 -0
- package/dist/effect/backend/index.d.ts +8 -0
- package/dist/effect/backend/index.d.ts.map +1 -0
- package/dist/effect/backend/index.js +8 -0
- package/dist/effect/backend/index.js.map +1 -0
- package/dist/effect/errors.d.ts +53 -0
- package/dist/effect/errors.d.ts.map +1 -0
- package/dist/effect/errors.js +61 -0
- package/dist/effect/errors.js.map +1 -0
- package/dist/effect/index.d.ts +9 -0
- package/dist/effect/index.d.ts.map +1 -0
- package/dist/effect/index.js +9 -0
- package/dist/effect/index.js.map +1 -0
- package/dist/effect/jazz-backend.d.ts +69 -0
- package/dist/effect/jazz-backend.d.ts.map +1 -0
- package/dist/effect/jazz-backend.js +95 -0
- package/dist/effect/jazz-backend.js.map +1 -0
- package/dist/effect/jazz.d.ts +129 -0
- package/dist/effect/jazz.d.ts.map +1 -0
- package/dist/effect/jazz.js +182 -0
- package/dist/effect/jazz.js.map +1 -0
- package/dist/expo/create-account-manager.d.ts +28 -0
- package/dist/expo/create-account-manager.d.ts.map +1 -0
- package/dist/expo/create-account-manager.js +35 -0
- package/dist/expo/create-account-manager.js.map +1 -0
- package/dist/expo/create-jazz-session.d.ts +66 -0
- package/dist/expo/create-jazz-session.d.ts.map +1 -0
- package/dist/expo/create-jazz-session.js +96 -0
- package/dist/expo/create-jazz-session.js.map +1 -0
- package/dist/expo/index.d.ts +12 -0
- package/dist/expo/index.d.ts.map +1 -0
- package/dist/expo/index.js +10 -0
- package/dist/expo/index.js.map +1 -0
- package/dist/expo/metro.d.ts +20 -0
- package/dist/expo/metro.d.ts.map +1 -0
- package/dist/expo/metro.js +58 -0
- package/dist/expo/metro.js.map +1 -0
- package/dist/expo/polyfills.d.ts +2 -0
- package/dist/expo/polyfills.d.ts.map +1 -0
- package/dist/expo/polyfills.js +5 -0
- package/dist/expo/polyfills.js.map +1 -0
- package/dist/expo/provider.d.ts +10 -0
- package/dist/expo/provider.d.ts.map +1 -0
- package/dist/expo/provider.js +11 -0
- package/dist/expo/provider.js.map +1 -0
- package/dist/index.d.ts +21 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -12
- package/dist/index.js.map +1 -1
- package/dist/inspect/cli.d.ts +12 -0
- package/dist/inspect/cli.d.ts.map +1 -0
- package/dist/inspect/cli.js +320 -0
- package/dist/inspect/cli.js.map +1 -0
- package/dist/inspect/client.d.ts +67 -0
- package/dist/inspect/client.d.ts.map +1 -0
- package/dist/inspect/client.js +254 -0
- package/dist/inspect/client.js.map +1 -0
- package/dist/inspect/mcp.d.ts +28 -0
- package/dist/inspect/mcp.d.ts.map +1 -0
- package/dist/inspect/mcp.js +441 -0
- package/dist/inspect/mcp.js.map +1 -0
- package/dist/inspect/protocol.d.ts +317 -0
- package/dist/inspect/protocol.d.ts.map +1 -0
- package/dist/inspect/protocol.js +544 -0
- package/dist/inspect/protocol.js.map +1 -0
- package/dist/inspector/index.d.ts +10 -0
- package/dist/inspector/index.d.ts.map +1 -0
- package/dist/inspector/index.js +27 -0
- package/dist/inspector/index.js.map +1 -0
- package/dist/internal/inspector-query.d.ts +6 -0
- package/dist/internal/inspector-query.d.ts.map +1 -0
- package/dist/internal/inspector-query.js +20 -0
- package/dist/internal/inspector-query.js.map +1 -0
- package/dist/ir.d.ts +43 -7
- package/dist/ir.d.ts.map +1 -1
- package/dist/ir.js +509 -1
- package/dist/ir.js.map +1 -1
- package/dist/json-value.d.ts +6 -0
- package/dist/json-value.d.ts.map +1 -0
- package/dist/json-value.js +2 -0
- package/dist/json-value.js.map +1 -0
- package/dist/local-first/index.d.ts +18 -0
- package/dist/local-first/index.d.ts.map +1 -0
- package/dist/local-first/index.js +17 -0
- package/dist/local-first/index.js.map +1 -0
- package/dist/local-first-auth/browser.d.ts +18 -0
- package/dist/local-first-auth/browser.d.ts.map +1 -0
- package/dist/local-first-auth/browser.js +26 -0
- package/dist/local-first-auth/browser.js.map +1 -0
- package/dist/local-first-auth/encoding.d.ts +10 -0
- package/dist/local-first-auth/encoding.d.ts.map +1 -0
- package/dist/local-first-auth/encoding.js +38 -0
- package/dist/local-first-auth/encoding.js.map +1 -0
- package/dist/local-first-auth/identity.d.ts +73 -0
- package/dist/local-first-auth/identity.d.ts.map +1 -0
- package/dist/local-first-auth/identity.js +258 -0
- package/dist/local-first-auth/identity.js.map +1 -0
- package/dist/local-first-auth/index.d.ts +6 -0
- package/dist/local-first-auth/index.d.ts.map +1 -0
- package/dist/local-first-auth/index.js +4 -0
- package/dist/local-first-auth/index.js.map +1 -0
- package/dist/local-first-auth/passkey.d.ts +22 -0
- package/dist/local-first-auth/passkey.d.ts.map +1 -0
- package/dist/local-first-auth/passkey.js +116 -0
- package/dist/local-first-auth/passkey.js.map +1 -0
- package/dist/local-first-auth/recovery-phrase.d.ts +10 -0
- package/dist/local-first-auth/recovery-phrase.d.ts.map +1 -0
- package/dist/local-first-auth/recovery-phrase.js +59 -0
- package/dist/local-first-auth/recovery-phrase.js.map +1 -0
- package/dist/local-first-auth/secret.d.ts +25 -0
- package/dist/local-first-auth/secret.d.ts.map +1 -0
- package/dist/local-first-auth/secret.js +68 -0
- package/dist/local-first-auth/secret.js.map +1 -0
- package/dist/local-first-auth/server.d.ts +13 -0
- package/dist/local-first-auth/server.d.ts.map +1 -0
- package/dist/local-first-auth/server.js +32 -0
- package/dist/local-first-auth/server.js.map +1 -0
- package/dist/local-first-auth/store.d.ts +51 -0
- package/dist/local-first-auth/store.d.ts.map +1 -0
- package/dist/local-first-auth/store.js +112 -0
- package/dist/local-first-auth/store.js.map +1 -0
- package/dist/magic-columns.d.ts +40 -0
- package/dist/magic-columns.d.ts.map +1 -0
- package/dist/magic-columns.js +110 -0
- package/dist/magic-columns.js.map +1 -0
- package/dist/migration-namespace.d.ts +12 -0
- package/dist/migration-namespace.d.ts.map +1 -0
- package/dist/migration-namespace.js +13 -0
- package/dist/migration-namespace.js.map +1 -0
- package/dist/migrations.d.ts +286 -0
- package/dist/migrations.d.ts.map +1 -0
- package/dist/migrations.js +188 -0
- package/dist/migrations.js.map +1 -0
- package/dist/module-interop.d.ts +17 -0
- package/dist/module-interop.d.ts.map +1 -0
- package/dist/module-interop.js +32 -0
- package/dist/module-interop.js.map +1 -0
- package/dist/observed-jazz-client.d.ts +15 -0
- package/dist/observed-jazz-client.d.ts.map +1 -0
- package/dist/observed-jazz-client.js +47 -0
- package/dist/observed-jazz-client.js.map +1 -0
- package/dist/passkey-backup.d.ts +3 -0
- package/dist/passkey-backup.d.ts.map +1 -0
- package/dist/passkey-backup.js +2 -0
- package/dist/passkey-backup.js.map +1 -0
- package/dist/passphrase.d.ts +2 -0
- package/dist/passphrase.d.ts.map +1 -0
- package/dist/passphrase.js +2 -0
- package/dist/passphrase.js.map +1 -0
- package/dist/permissions/__fixtures__/big-label-better-auth.d.ts +89 -0
- package/dist/permissions/__fixtures__/big-label-better-auth.d.ts.map +1 -0
- package/dist/permissions/__fixtures__/big-label-better-auth.js +62 -0
- package/dist/permissions/__fixtures__/big-label-better-auth.js.map +1 -0
- package/dist/permissions/__fixtures__/big-label.d.ts +332 -0
- package/dist/permissions/__fixtures__/big-label.d.ts.map +1 -0
- package/dist/permissions/__fixtures__/big-label.js +177 -0
- package/dist/permissions/__fixtures__/big-label.js.map +1 -0
- package/dist/permissions/__fixtures__/chat-react.d.ts +112 -0
- package/dist/permissions/__fixtures__/chat-react.d.ts.map +1 -0
- package/dist/permissions/__fixtures__/chat-react.js +51 -0
- package/dist/permissions/__fixtures__/chat-react.js.map +1 -0
- package/dist/permissions/compile.d.ts +182 -0
- package/dist/permissions/compile.d.ts.map +1 -0
- package/dist/permissions/compile.js +715 -0
- package/dist/permissions/compile.js.map +1 -0
- package/dist/permissions/dsl.d.ts +158 -0
- package/dist/permissions/dsl.d.ts.map +1 -0
- package/dist/permissions/dsl.js +391 -0
- package/dist/permissions/dsl.js.map +1 -0
- package/dist/permissions/relation.d.ts +84 -0
- package/dist/permissions/relation.d.ts.map +1 -0
- package/dist/permissions/relation.js +150 -0
- package/dist/permissions/relation.js.map +1 -0
- package/dist/permissions/types.d.ts +357 -0
- package/dist/permissions/types.d.ts.map +1 -0
- package/dist/permissions/types.js +5 -0
- package/dist/permissions/types.js.map +1 -0
- package/dist/printer/app-json.d.ts +96 -0
- package/dist/printer/app-json.d.ts.map +1 -0
- package/dist/printer/app-json.js +18 -0
- package/dist/printer/app-json.js.map +1 -0
- package/dist/printer/cli.d.ts +15 -0
- package/dist/printer/cli.d.ts.map +1 -0
- package/dist/printer/cli.js +76 -0
- package/dist/printer/cli.js.map +1 -0
- package/dist/printer/defs.d.ts +11 -0
- package/dist/printer/defs.d.ts.map +1 -0
- package/dist/printer/defs.js +123 -0
- package/dist/printer/defs.js.map +1 -0
- package/dist/printer/expr.d.ts +281 -0
- package/dist/printer/expr.d.ts.map +1 -0
- package/dist/printer/expr.js +940 -0
- package/dist/printer/expr.js.map +1 -0
- package/dist/printer/format.d.ts +17 -0
- package/dist/printer/format.d.ts.map +1 -0
- package/dist/printer/format.js +315 -0
- package/dist/printer/format.js.map +1 -0
- package/dist/printer/index.d.ts +31 -0
- package/dist/printer/index.d.ts.map +1 -0
- package/dist/printer/index.js +51 -0
- package/dist/printer/index.js.map +1 -0
- package/dist/printer/migrations.d.ts +28 -0
- package/dist/printer/migrations.d.ts.map +1 -0
- package/dist/printer/migrations.js +179 -0
- package/dist/printer/migrations.js.map +1 -0
- package/dist/printer/names.d.ts +17 -0
- package/dist/printer/names.d.ts.map +1 -0
- package/dist/printer/names.js +124 -0
- package/dist/printer/names.js.map +1 -0
- package/dist/printer/permissions.d.ts +60 -0
- package/dist/printer/permissions.d.ts.map +1 -0
- package/dist/printer/permissions.js +1167 -0
- package/dist/printer/permissions.js.map +1 -0
- package/dist/printer/schema.d.ts +18 -0
- package/dist/printer/schema.d.ts.map +1 -0
- package/dist/printer/schema.js +132 -0
- package/dist/printer/schema.js.map +1 -0
- package/dist/prosemirror/anchors.d.ts +30 -0
- package/dist/prosemirror/anchors.d.ts.map +1 -0
- package/dist/prosemirror/anchors.js +28 -0
- package/dist/prosemirror/anchors.js.map +1 -0
- package/dist/prosemirror/index.d.ts +7 -0
- package/dist/prosemirror/index.d.ts.map +1 -0
- package/dist/prosemirror/index.js +7 -0
- package/dist/prosemirror/index.js.map +1 -0
- package/dist/prosemirror/markdown.d.ts +95 -0
- package/dist/prosemirror/markdown.d.ts.map +1 -0
- package/dist/prosemirror/markdown.js +428 -0
- package/dist/prosemirror/markdown.js.map +1 -0
- package/dist/prosemirror/overlays.d.ts +69 -0
- package/dist/prosemirror/overlays.d.ts.map +1 -0
- package/dist/prosemirror/overlays.js +143 -0
- package/dist/prosemirror/overlays.js.map +1 -0
- package/dist/prosemirror/presence.d.ts +39 -0
- package/dist/prosemirror/presence.d.ts.map +1 -0
- package/dist/prosemirror/presence.js +88 -0
- package/dist/prosemirror/presence.js.map +1 -0
- package/dist/prosemirror/sync.d.ts +60 -0
- package/dist/prosemirror/sync.d.ts.map +1 -0
- package/dist/prosemirror/sync.js +196 -0
- package/dist/prosemirror/sync.js.map +1 -0
- package/dist/prosemirror/text-map.d.ts +21 -0
- package/dist/prosemirror/text-map.d.ts.map +1 -0
- package/dist/prosemirror/text-map.js +85 -0
- package/dist/prosemirror/text-map.js.map +1 -0
- package/dist/react/create-jazz-client.d.ts +2 -11
- package/dist/react/create-jazz-client.d.ts.map +1 -1
- package/dist/react/create-jazz-client.js +1 -47
- package/dist/react/create-jazz-client.js.map +1 -1
- package/dist/react/index.d.ts +14 -7
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +8 -6
- package/dist/react/index.js.map +1 -1
- package/dist/react/provider-props.d.ts +7 -0
- package/dist/react/provider-props.d.ts.map +1 -0
- package/dist/react/provider-props.js +15 -0
- package/dist/react/provider-props.js.map +1 -0
- package/dist/react/provider.d.ts +19 -15
- package/dist/react/provider.d.ts.map +1 -1
- package/dist/react/provider.js +25 -5
- package/dist/react/provider.js.map +1 -1
- package/dist/react/use-all.d.ts +1 -1
- package/dist/react/use-all.d.ts.map +1 -1
- package/dist/react/use-all.js +1 -1
- package/dist/react/use-all.js.map +1 -1
- package/dist/react/use-one.d.ts +2 -0
- package/dist/react/use-one.d.ts.map +1 -0
- package/dist/react/use-one.js +2 -0
- package/dist/react/use-one.js.map +1 -0
- package/dist/react-core/index.d.ts +9 -4
- package/dist/react-core/index.d.ts.map +1 -1
- package/dist/react-core/index.js +10 -2
- package/dist/react-core/index.js.map +1 -1
- package/dist/react-core/provider.d.ts +48 -12
- package/dist/react-core/provider.d.ts.map +1 -1
- package/dist/react-core/provider.js +117 -13
- package/dist/react-core/provider.js.map +1 -1
- package/dist/react-core/session-context.d.ts +7 -0
- package/dist/react-core/session-context.d.ts.map +1 -0
- package/dist/react-core/session-context.js +8 -0
- package/dist/react-core/session-context.js.map +1 -0
- package/dist/react-core/session.d.ts +63 -0
- package/dist/react-core/session.d.ts.map +1 -0
- package/dist/react-core/session.js +97 -0
- package/dist/react-core/session.js.map +1 -0
- package/dist/react-core/use-all.d.ts +95 -3
- package/dist/react-core/use-all.d.ts.map +1 -1
- package/dist/react-core/use-all.js +126 -52
- package/dist/react-core/use-all.js.map +1 -1
- package/dist/react-core/use-auth-state.d.ts +13 -0
- package/dist/react-core/use-auth-state.d.ts.map +1 -0
- package/dist/react-core/use-auth-state.js +15 -0
- package/dist/react-core/use-auth-state.js.map +1 -0
- package/dist/react-core/use-one.d.ts +58 -0
- package/dist/react-core/use-one.d.ts.map +1 -0
- package/dist/react-core/use-one.js +19 -0
- package/dist/react-core/use-one.js.map +1 -0
- package/dist/react-core/use-sync-status.d.ts +8 -0
- package/dist/react-core/use-sync-status.d.ts.map +1 -0
- package/dist/react-core/use-sync-status.js +12 -0
- package/dist/react-core/use-sync-status.js.map +1 -0
- package/dist/react-native/abort-signal.d.ts +9 -0
- package/dist/react-native/abort-signal.d.ts.map +1 -0
- package/dist/react-native/abort-signal.js +51 -0
- package/dist/react-native/abort-signal.js.map +1 -0
- package/dist/react-native/account-session.d.ts +11 -0
- package/dist/react-native/account-session.d.ts.map +1 -0
- package/dist/react-native/account-session.js +59 -0
- package/dist/react-native/account-session.js.map +1 -0
- package/dist/react-native/create-account-manager.d.ts +28 -0
- package/dist/react-native/create-account-manager.d.ts.map +1 -0
- package/dist/react-native/create-account-manager.js +30 -0
- package/dist/react-native/create-account-manager.js.map +1 -0
- package/dist/react-native/create-db.d.ts +8 -0
- package/dist/react-native/create-db.d.ts.map +1 -0
- package/dist/react-native/create-db.js +9 -0
- package/dist/react-native/create-db.js.map +1 -0
- package/dist/react-native/create-jazz-client.d.ts +12 -10
- package/dist/react-native/create-jazz-client.d.ts.map +1 -1
- package/dist/react-native/create-jazz-client.js +6 -21
- package/dist/react-native/create-jazz-client.js.map +1 -1
- package/dist/react-native/create-jazz-session.d.ts +66 -0
- package/dist/react-native/create-jazz-session.d.ts.map +1 -0
- package/dist/react-native/create-jazz-session.js +96 -0
- package/dist/react-native/create-jazz-session.js.map +1 -0
- package/dist/react-native/errors.d.ts +6 -0
- package/dist/react-native/errors.d.ts.map +1 -0
- package/dist/react-native/errors.js +6 -0
- package/dist/react-native/errors.js.map +1 -0
- package/dist/react-native/index.d.ts +19 -9
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/react-native/index.js +13 -7
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/native-foreground-db.d.ts +227 -0
- package/dist/react-native/native-foreground-db.d.ts.map +1 -0
- package/dist/react-native/native-foreground-db.js +905 -0
- package/dist/react-native/native-foreground-db.js.map +1 -0
- package/dist/react-native/native-relay.d.ts +7 -0
- package/dist/react-native/native-relay.d.ts.map +1 -0
- package/dist/react-native/native-relay.js +14 -0
- package/dist/react-native/native-relay.js.map +1 -0
- package/dist/react-native/provider.d.ts +19 -13
- package/dist/react-native/provider.d.ts.map +1 -1
- package/dist/react-native/provider.js +25 -5
- package/dist/react-native/provider.js.map +1 -1
- package/dist/react-native/runtime-source.d.ts +62 -0
- package/dist/react-native/runtime-source.d.ts.map +1 -0
- package/dist/react-native/runtime-source.js +314 -0
- package/dist/react-native/runtime-source.js.map +1 -0
- package/dist/react-native/use-all.d.ts +1 -1
- package/dist/react-native/use-all.d.ts.map +1 -1
- package/dist/react-native/use-all.js +1 -1
- package/dist/react-native/use-all.js.map +1 -1
- package/dist/react-native/use-one.d.ts +2 -0
- package/dist/react-native/use-one.d.ts.map +1 -0
- package/dist/react-native/use-one.js +2 -0
- package/dist/react-native/use-one.js.map +1 -0
- package/dist/reconcile-array.d.ts +45 -0
- package/dist/reconcile-array.d.ts.map +1 -0
- package/dist/reconcile-array.js +252 -0
- package/dist/reconcile-array.js.map +1 -0
- package/dist/relationships.d.ts +18 -0
- package/dist/relationships.d.ts.map +1 -0
- package/dist/relationships.js +28 -0
- package/dist/relationships.js.map +1 -0
- package/dist/runtime/auth-renewal-backoff.d.ts +14 -0
- package/dist/runtime/auth-renewal-backoff.d.ts.map +1 -0
- package/dist/runtime/auth-renewal-backoff.js +23 -0
- package/dist/runtime/auth-renewal-backoff.js.map +1 -0
- package/dist/runtime/auth-request-deadline.d.ts +3 -0
- package/dist/runtime/auth-request-deadline.d.ts.map +1 -0
- package/dist/runtime/auth-request-deadline.js +24 -0
- package/dist/runtime/auth-request-deadline.js.map +1 -0
- package/dist/runtime/auth-secret-codec.d.ts +21 -0
- package/dist/runtime/auth-secret-codec.d.ts.map +1 -0
- package/dist/runtime/auth-secret-codec.js +32 -0
- package/dist/runtime/auth-secret-codec.js.map +1 -0
- package/dist/runtime/auth-secret-store.d.ts +7 -0
- package/dist/runtime/auth-secret-store.d.ts.map +1 -0
- package/dist/runtime/auth-secret-store.js +12 -0
- package/dist/runtime/auth-secret-store.js.map +1 -0
- package/dist/runtime/auth-state.d.ts +47 -0
- package/dist/runtime/auth-state.d.ts.map +1 -0
- package/dist/runtime/auth-state.js +161 -0
- package/dist/runtime/auth-state.js.map +1 -0
- package/dist/runtime/author-id.d.ts +42 -0
- package/dist/runtime/author-id.d.ts.map +1 -0
- package/dist/runtime/author-id.js +172 -0
- package/dist/runtime/author-id.js.map +1 -0
- package/dist/runtime/authority-changed-error.d.ts +56 -0
- package/dist/runtime/authority-changed-error.d.ts.map +1 -0
- package/dist/runtime/authority-changed-error.js +74 -0
- package/dist/runtime/authority-changed-error.js.map +1 -0
- package/dist/runtime/backlog-rows.d.ts +3 -0
- package/dist/runtime/backlog-rows.d.ts.map +1 -0
- package/dist/runtime/backlog-rows.js +7 -0
- package/dist/runtime/backlog-rows.js.map +1 -0
- package/dist/runtime/browser-physical-database-epoch.d.ts +37 -0
- package/dist/runtime/browser-physical-database-epoch.d.ts.map +1 -0
- package/dist/runtime/browser-physical-database-epoch.js +89 -0
- package/dist/runtime/browser-physical-database-epoch.js.map +1 -0
- package/dist/runtime/browser-storage-invalidation.d.ts +8 -0
- package/dist/runtime/browser-storage-invalidation.d.ts.map +1 -0
- package/dist/runtime/browser-storage-invalidation.js +20 -0
- package/dist/runtime/browser-storage-invalidation.js.map +1 -0
- package/dist/runtime/browser-store-generation.d.ts +15 -0
- package/dist/runtime/browser-store-generation.d.ts.map +1 -0
- package/dist/runtime/browser-store-generation.js +48 -0
- package/dist/runtime/browser-store-generation.js.map +1 -0
- package/dist/runtime/browser-worker-assets.d.ts +31 -0
- package/dist/runtime/browser-worker-assets.d.ts.map +1 -0
- package/dist/runtime/browser-worker-assets.js +40 -0
- package/dist/runtime/browser-worker-assets.js.map +1 -0
- package/dist/runtime/browser-worker-assets.metro.d.ts +28 -0
- package/dist/runtime/browser-worker-assets.metro.d.ts.map +1 -0
- package/dist/runtime/browser-worker-assets.metro.js +52 -0
- package/dist/runtime/browser-worker-assets.metro.js.map +1 -0
- package/dist/runtime/browser-worker-assets.native.d.ts +7 -0
- package/dist/runtime/browser-worker-assets.native.d.ts.map +1 -0
- package/dist/runtime/browser-worker-assets.native.js +8 -0
- package/dist/runtime/browser-worker-assets.native.js.map +1 -0
- package/dist/runtime/browser-worker-config.d.ts +78 -0
- package/dist/runtime/browser-worker-config.d.ts.map +1 -0
- package/dist/runtime/browser-worker-config.js +299 -0
- package/dist/runtime/browser-worker-config.js.map +1 -0
- package/dist/runtime/client-config-key.d.ts +6 -0
- package/dist/runtime/client-config-key.d.ts.map +1 -0
- package/dist/runtime/client-config-key.js +83 -0
- package/dist/runtime/client-config-key.js.map +1 -0
- package/dist/runtime/client-migrations.d.ts +27 -0
- package/dist/runtime/client-migrations.d.ts.map +1 -0
- package/dist/runtime/client-migrations.js +25 -0
- package/dist/runtime/client-migrations.js.map +1 -0
- package/dist/runtime/client-registry.d.ts +21 -0
- package/dist/runtime/client-registry.d.ts.map +1 -0
- package/dist/runtime/client-registry.js +169 -0
- package/dist/runtime/client-registry.js.map +1 -0
- package/dist/runtime/client-scope.d.ts +38 -0
- package/dist/runtime/client-scope.d.ts.map +1 -0
- package/dist/runtime/client-scope.js +64 -0
- package/dist/runtime/client-scope.js.map +1 -0
- package/dist/runtime/client-session.d.ts +56 -14
- package/dist/runtime/client-session.d.ts.map +1 -1
- package/dist/runtime/client-session.js +211 -195
- package/dist/runtime/client-session.js.map +1 -1
- package/dist/runtime/client.d.ts +721 -194
- package/dist/runtime/client.d.ts.map +1 -1
- package/dist/runtime/client.js +1213 -434
- package/dist/runtime/client.js.map +1 -1
- package/dist/runtime/column-transforms.d.ts +26 -0
- package/dist/runtime/column-transforms.d.ts.map +1 -0
- package/dist/runtime/column-transforms.js +186 -0
- package/dist/runtime/column-transforms.js.map +1 -0
- package/dist/runtime/connection-manager/browser-connection-manager.d.ts +178 -0
- package/dist/runtime/connection-manager/browser-connection-manager.d.ts.map +1 -0
- package/dist/runtime/connection-manager/browser-connection-manager.js +1030 -0
- package/dist/runtime/connection-manager/browser-connection-manager.js.map +1 -0
- package/dist/runtime/connection-manager/direct-connection-manager.d.ts +28 -0
- package/dist/runtime/connection-manager/direct-connection-manager.d.ts.map +1 -0
- package/dist/runtime/connection-manager/direct-connection-manager.js +202 -0
- package/dist/runtime/connection-manager/direct-connection-manager.js.map +1 -0
- package/dist/runtime/connection-manager/index.d.ts +5 -0
- package/dist/runtime/connection-manager/index.d.ts.map +1 -0
- package/dist/runtime/connection-manager/index.js +4 -0
- package/dist/runtime/connection-manager/index.js.map +1 -0
- package/dist/runtime/connection-manager/types.d.ts +174 -0
- package/dist/runtime/connection-manager/types.d.ts.map +1 -0
- package/dist/runtime/connection-manager/types.js +396 -0
- package/dist/runtime/connection-manager/types.js.map +1 -0
- package/dist/runtime/context.d.ts +100 -30
- package/dist/runtime/context.d.ts.map +1 -1
- package/dist/runtime/context.js.map +1 -1
- package/dist/runtime/core-tick-failed-error.d.ts +31 -0
- package/dist/runtime/core-tick-failed-error.d.ts.map +1 -0
- package/dist/runtime/core-tick-failed-error.js +45 -0
- package/dist/runtime/core-tick-failed-error.js.map +1 -0
- package/dist/runtime/credentialed-transport.d.ts +42 -0
- package/dist/runtime/credentialed-transport.d.ts.map +1 -0
- package/dist/runtime/credentialed-transport.js +178 -0
- package/dist/runtime/credentialed-transport.js.map +1 -0
- package/dist/runtime/db-access-context.d.ts +14 -0
- package/dist/runtime/db-access-context.d.ts.map +1 -0
- package/dist/runtime/db-access-context.js +26 -0
- package/dist/runtime/db-access-context.js.map +1 -0
- package/dist/runtime/db-internal-session.d.ts +7 -0
- package/dist/runtime/db-internal-session.d.ts.map +1 -0
- package/dist/runtime/db-internal-session.js +21 -0
- package/dist/runtime/db-internal-session.js.map +1 -0
- package/dist/runtime/db-replaced-error.d.ts +21 -0
- package/dist/runtime/db-replaced-error.d.ts.map +1 -0
- package/dist/runtime/db-replaced-error.js +22 -0
- package/dist/runtime/db-replaced-error.js.map +1 -0
- package/dist/runtime/db.d.ts +857 -215
- package/dist/runtime/db.d.ts.map +1 -1
- package/dist/runtime/db.js +3474 -834
- package/dist/runtime/db.js.map +1 -1
- package/dist/runtime/default-create-db.d.ts +5 -0
- package/dist/runtime/default-create-db.d.ts.map +1 -0
- package/dist/runtime/default-create-db.js +7 -0
- package/dist/runtime/default-create-db.js.map +1 -0
- package/dist/runtime/default-runtime-source.d.ts +41 -0
- package/dist/runtime/default-runtime-source.d.ts.map +1 -0
- package/dist/runtime/default-runtime-source.js +326 -0
- package/dist/runtime/default-runtime-source.js.map +1 -0
- package/dist/runtime/delete-local-first-store.d.ts +12 -0
- package/dist/runtime/delete-local-first-store.d.ts.map +1 -0
- package/dist/runtime/delete-local-first-store.js +12 -0
- package/dist/runtime/delete-local-first-store.js.map +1 -0
- package/dist/runtime/deterministic-bytes.d.ts +6 -0
- package/dist/runtime/deterministic-bytes.d.ts.map +1 -0
- package/dist/runtime/deterministic-bytes.js +18 -0
- package/dist/runtime/deterministic-bytes.js.map +1 -0
- package/dist/runtime/graceful-shutdown-error.d.ts +17 -0
- package/dist/runtime/graceful-shutdown-error.d.ts.map +1 -0
- package/dist/runtime/graceful-shutdown-error.js +31 -0
- package/dist/runtime/graceful-shutdown-error.js.map +1 -0
- package/dist/runtime/hex.d.ts +21 -0
- package/dist/runtime/hex.d.ts.map +1 -0
- package/dist/runtime/hex.js +62 -0
- package/dist/runtime/hex.js.map +1 -0
- package/dist/runtime/history-relation.d.ts +8 -0
- package/dist/runtime/history-relation.d.ts.map +1 -0
- package/dist/runtime/history-relation.js +44 -0
- package/dist/runtime/history-relation.js.map +1 -0
- package/dist/runtime/in-process-transport.d.ts +18 -0
- package/dist/runtime/in-process-transport.d.ts.map +1 -0
- package/dist/runtime/in-process-transport.js +32 -0
- package/dist/runtime/in-process-transport.js.map +1 -0
- package/dist/runtime/index.d.ts +22 -13
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +14 -12
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/indexeddb-page-store.d.ts +214 -0
- package/dist/runtime/indexeddb-page-store.d.ts.map +1 -0
- package/dist/runtime/indexeddb-page-store.js +848 -0
- package/dist/runtime/indexeddb-page-store.js.map +1 -0
- package/dist/runtime/introspection-fetch.d.ts +18 -0
- package/dist/runtime/introspection-fetch.d.ts.map +1 -0
- package/dist/runtime/introspection-fetch.js +12 -0
- package/dist/runtime/introspection-fetch.js.map +1 -0
- package/dist/runtime/json-schema-evaluate.d.ts +55 -0
- package/dist/runtime/json-schema-evaluate.d.ts.map +1 -0
- package/dist/runtime/json-schema-evaluate.js +946 -0
- package/dist/runtime/json-schema-evaluate.js.map +1 -0
- package/dist/runtime/json-schema-formats.d.ts +14 -0
- package/dist/runtime/json-schema-formats.d.ts.map +1 -0
- package/dist/runtime/json-schema-formats.js +555 -0
- package/dist/runtime/json-schema-formats.js.map +1 -0
- package/dist/runtime/json-schema-json.d.ts +41 -0
- package/dist/runtime/json-schema-json.d.ts.map +1 -0
- package/dist/runtime/json-schema-json.js +309 -0
- package/dist/runtime/json-schema-json.js.map +1 -0
- package/dist/runtime/json-schema-metaschemas.d.ts +1403 -0
- package/dist/runtime/json-schema-metaschemas.d.ts.map +1 -0
- package/dist/runtime/json-schema-metaschemas.js +64 -0
- package/dist/runtime/json-schema-metaschemas.js.map +1 -0
- package/dist/runtime/json-schema-regex.d.ts +32 -0
- package/dist/runtime/json-schema-regex.d.ts.map +1 -0
- package/dist/runtime/json-schema-regex.js +895 -0
- package/dist/runtime/json-schema-regex.js.map +1 -0
- package/dist/runtime/json-schema-validator.d.ts +50 -0
- package/dist/runtime/json-schema-validator.d.ts.map +1 -0
- package/dist/runtime/json-schema-validator.js +404 -0
- package/dist/runtime/json-schema-validator.js.map +1 -0
- package/dist/runtime/json-text.js.map +1 -1
- package/dist/runtime/local-first-token.d.ts +11 -0
- package/dist/runtime/local-first-token.d.ts.map +1 -0
- package/dist/runtime/local-first-token.js +20 -0
- package/dist/runtime/local-first-token.js.map +1 -0
- package/dist/runtime/local-first-unavailable.d.ts +40 -0
- package/dist/runtime/local-first-unavailable.d.ts.map +1 -0
- package/dist/runtime/local-first-unavailable.js +81 -0
- package/dist/runtime/local-first-unavailable.js.map +1 -0
- package/dist/runtime/local-first-upgrade.d.ts +36 -0
- package/dist/runtime/local-first-upgrade.d.ts.map +1 -0
- package/dist/runtime/local-first-upgrade.js +31 -0
- package/dist/runtime/local-first-upgrade.js.map +1 -0
- package/dist/runtime/local-write-observer.d.ts +5 -0
- package/dist/runtime/local-write-observer.d.ts.map +1 -0
- package/dist/runtime/local-write-observer.js +31 -0
- package/dist/runtime/local-write-observer.js.map +1 -0
- package/dist/runtime/metro-setup-error.d.ts +20 -0
- package/dist/runtime/metro-setup-error.d.ts.map +1 -0
- package/dist/runtime/metro-setup-error.js +22 -0
- package/dist/runtime/metro-setup-error.js.map +1 -0
- package/dist/runtime/native-artifact-compatibility.d.ts +12 -0
- package/dist/runtime/native-artifact-compatibility.d.ts.map +1 -0
- package/dist/runtime/native-artifact-compatibility.js +26 -0
- package/dist/runtime/native-artifact-compatibility.js.map +1 -0
- package/dist/runtime/native-artifact-fingerprint-napi.d.ts +2 -0
- package/dist/runtime/native-artifact-fingerprint-napi.d.ts.map +1 -0
- package/dist/runtime/native-artifact-fingerprint-napi.js +3 -0
- package/dist/runtime/native-artifact-fingerprint-napi.js.map +1 -0
- package/dist/runtime/native-artifact-fingerprint-wasm.d.ts +2 -0
- package/dist/runtime/native-artifact-fingerprint-wasm.d.ts.map +1 -0
- package/dist/runtime/native-artifact-fingerprint-wasm.js +3 -0
- package/dist/runtime/native-artifact-fingerprint-wasm.js.map +1 -0
- package/dist/runtime/native-artifact-fingerprints.d.ts +5 -0
- package/dist/runtime/native-artifact-fingerprints.d.ts.map +1 -0
- package/dist/runtime/native-artifact-fingerprints.js +7 -0
- package/dist/runtime/native-artifact-fingerprints.js.map +1 -0
- package/dist/runtime/native-artifact-mismatch-error.d.ts +25 -0
- package/dist/runtime/native-artifact-mismatch-error.d.ts.map +1 -0
- package/dist/runtime/native-artifact-mismatch-error.js +34 -0
- package/dist/runtime/native-artifact-mismatch-error.js.map +1 -0
- package/dist/runtime/native-runtime/attached-browser-worker-connection.d.ts +23 -0
- package/dist/runtime/native-runtime/attached-browser-worker-connection.d.ts.map +1 -0
- package/dist/runtime/native-runtime/attached-browser-worker-connection.js +45 -0
- package/dist/runtime/native-runtime/attached-browser-worker-connection.js.map +1 -0
- package/dist/runtime/native-runtime/auxiliary-receive-deadline.d.ts +15 -0
- package/dist/runtime/native-runtime/auxiliary-receive-deadline.d.ts.map +1 -0
- package/dist/runtime/native-runtime/auxiliary-receive-deadline.js +64 -0
- package/dist/runtime/native-runtime/auxiliary-receive-deadline.js.map +1 -0
- package/dist/runtime/native-runtime/broker-worker-load-failure.d.ts +34 -0
- package/dist/runtime/native-runtime/broker-worker-load-failure.d.ts.map +1 -0
- package/dist/runtime/native-runtime/broker-worker-load-failure.js +61 -0
- package/dist/runtime/native-runtime/broker-worker-load-failure.js.map +1 -0
- package/dist/runtime/native-runtime/browser-follower-connection.d.ts +109 -0
- package/dist/runtime/native-runtime/browser-follower-connection.d.ts.map +1 -0
- package/dist/runtime/native-runtime/browser-follower-connection.js +558 -0
- package/dist/runtime/native-runtime/browser-follower-connection.js.map +1 -0
- package/dist/runtime/native-runtime/browser-shared-worker-connection.d.ts +130 -0
- package/dist/runtime/native-runtime/browser-shared-worker-connection.d.ts.map +1 -0
- package/dist/runtime/native-runtime/browser-shared-worker-connection.js +988 -0
- package/dist/runtime/native-runtime/browser-shared-worker-connection.js.map +1 -0
- package/dist/runtime/native-runtime/browser-worker-protocol.d.ts +527 -0
- package/dist/runtime/native-runtime/browser-worker-protocol.d.ts.map +1 -0
- package/dist/runtime/native-runtime/browser-worker-protocol.js +296 -0
- package/dist/runtime/native-runtime/browser-worker-protocol.js.map +1 -0
- package/dist/runtime/native-runtime/browser-worker-transport.d.ts +56 -0
- package/dist/runtime/native-runtime/browser-worker-transport.d.ts.map +1 -0
- package/dist/runtime/native-runtime/browser-worker-transport.js +305 -0
- package/dist/runtime/native-runtime/browser-worker-transport.js.map +1 -0
- package/dist/runtime/native-runtime/exact-integer.d.ts +7 -0
- package/dist/runtime/native-runtime/exact-integer.d.ts.map +1 -0
- package/dist/runtime/native-runtime/exact-integer.js +18 -0
- package/dist/runtime/native-runtime/exact-integer.js.map +1 -0
- package/dist/runtime/native-runtime/http-stream-socket.d.ts +103 -0
- package/dist/runtime/native-runtime/http-stream-socket.d.ts.map +1 -0
- package/dist/runtime/native-runtime/http-stream-socket.js +554 -0
- package/dist/runtime/native-runtime/http-stream-socket.js.map +1 -0
- package/dist/runtime/native-runtime/inspector-control-lifecycle.d.ts +4 -0
- package/dist/runtime/native-runtime/inspector-control-lifecycle.d.ts.map +1 -0
- package/dist/runtime/native-runtime/inspector-control-lifecycle.js +33 -0
- package/dist/runtime/native-runtime/inspector-control-lifecycle.js.map +1 -0
- package/dist/runtime/native-runtime/native-codec.d.ts +172 -0
- package/dist/runtime/native-runtime/native-codec.d.ts.map +1 -0
- package/dist/runtime/native-runtime/native-codec.js +629 -0
- package/dist/runtime/native-runtime/native-codec.js.map +1 -0
- package/dist/runtime/native-runtime/native-error-code.d.ts +39 -0
- package/dist/runtime/native-runtime/native-error-code.d.ts.map +1 -0
- package/dist/runtime/native-runtime/native-error-code.js +64 -0
- package/dist/runtime/native-runtime/native-error-code.js.map +1 -0
- package/dist/runtime/native-runtime/native-row-codec.d.ts +161 -0
- package/dist/runtime/native-runtime/native-row-codec.d.ts.map +1 -0
- package/dist/runtime/native-runtime/native-row-codec.js +903 -0
- package/dist/runtime/native-runtime/native-row-codec.js.map +1 -0
- package/dist/runtime/native-runtime/native-row-descriptor-key.d.ts +15 -0
- package/dist/runtime/native-runtime/native-row-descriptor-key.d.ts.map +1 -0
- package/dist/runtime/native-runtime/native-row-descriptor-key.js +25 -0
- package/dist/runtime/native-runtime/native-row-descriptor-key.js.map +1 -0
- package/dist/runtime/native-runtime/native-runtime-adapter.d.ts +913 -0
- package/dist/runtime/native-runtime/native-runtime-adapter.d.ts.map +1 -0
- package/dist/runtime/native-runtime/native-runtime-adapter.js +5999 -0
- package/dist/runtime/native-runtime/native-runtime-adapter.js.map +1 -0
- package/dist/runtime/native-runtime/node-foreground-node-lease.browser.d.ts +17 -0
- package/dist/runtime/native-runtime/node-foreground-node-lease.browser.d.ts.map +1 -0
- package/dist/runtime/native-runtime/node-foreground-node-lease.browser.js +4 -0
- package/dist/runtime/native-runtime/node-foreground-node-lease.browser.js.map +1 -0
- package/dist/runtime/native-runtime/node-foreground-node-lease.d.ts +19 -0
- package/dist/runtime/native-runtime/node-foreground-node-lease.d.ts.map +1 -0
- package/dist/runtime/native-runtime/node-foreground-node-lease.js +297 -0
- package/dist/runtime/native-runtime/node-foreground-node-lease.js.map +1 -0
- package/dist/runtime/native-runtime/row-values-transport.d.ts +2 -0
- package/dist/runtime/native-runtime/row-values-transport.d.ts.map +1 -0
- package/dist/runtime/native-runtime/row-values-transport.js +21 -0
- package/dist/runtime/native-runtime/row-values-transport.js.map +1 -0
- package/dist/runtime/native-runtime/schema-codec.d.ts +10 -0
- package/dist/runtime/native-runtime/schema-codec.d.ts.map +1 -0
- package/dist/runtime/native-runtime/schema-codec.js +13 -0
- package/dist/runtime/native-runtime/schema-codec.js.map +1 -0
- package/dist/runtime/native-runtime/session-renewal-wire.d.ts +48 -0
- package/dist/runtime/native-runtime/session-renewal-wire.d.ts.map +1 -0
- package/dist/runtime/native-runtime/session-renewal-wire.js +107 -0
- package/dist/runtime/native-runtime/session-renewal-wire.js.map +1 -0
- package/dist/runtime/native-runtime/stream-endpoint-memory.d.ts +34 -0
- package/dist/runtime/native-runtime/stream-endpoint-memory.d.ts.map +1 -0
- package/dist/runtime/native-runtime/stream-endpoint-memory.js +146 -0
- package/dist/runtime/native-runtime/stream-endpoint-memory.js.map +1 -0
- package/dist/runtime/native-runtime/websocket.d.ts +327 -0
- package/dist/runtime/native-runtime/websocket.d.ts.map +1 -0
- package/dist/runtime/native-runtime/websocket.js +1112 -0
- package/dist/runtime/native-runtime/websocket.js.map +1 -0
- package/dist/runtime/newer-build-reload.d.ts +30 -0
- package/dist/runtime/newer-build-reload.d.ts.map +1 -0
- package/dist/runtime/newer-build-reload.js +59 -0
- package/dist/runtime/newer-build-reload.js.map +1 -0
- package/dist/runtime/page-cache.d.ts +44 -0
- package/dist/runtime/page-cache.d.ts.map +1 -0
- package/dist/runtime/page-cache.js +104 -0
- package/dist/runtime/page-cache.js.map +1 -0
- package/dist/runtime/page-handle.d.ts +83 -0
- package/dist/runtime/page-handle.d.ts.map +1 -0
- package/dist/runtime/page-handle.js +151 -0
- package/dist/runtime/page-handle.js.map +1 -0
- package/dist/runtime/passkey-backup.d.ts +3 -0
- package/dist/runtime/passkey-backup.d.ts.map +1 -0
- package/dist/runtime/passkey-backup.js +2 -0
- package/dist/runtime/passkey-backup.js.map +1 -0
- package/dist/runtime/platform-url.d.ts +10 -0
- package/dist/runtime/platform-url.d.ts.map +1 -0
- package/dist/runtime/platform-url.js +3 -0
- package/dist/runtime/platform-url.js.map +1 -0
- package/dist/runtime/platform-url.native.d.ts +6 -0
- package/dist/runtime/platform-url.native.d.ts.map +1 -0
- package/dist/runtime/platform-url.native.js +38 -0
- package/dist/runtime/platform-url.native.js.map +1 -0
- package/dist/runtime/query-adapter.d.ts +7 -15
- package/dist/runtime/query-adapter.d.ts.map +1 -1
- package/dist/runtime/query-adapter.js +390 -110
- package/dist/runtime/query-adapter.js.map +1 -1
- package/dist/runtime/query-builder-shape.d.ts +75 -0
- package/dist/runtime/query-builder-shape.d.ts.map +1 -0
- package/dist/runtime/query-builder-shape.js +225 -0
- package/dist/runtime/query-builder-shape.js.map +1 -0
- package/dist/runtime/query-column-name.d.ts +3 -0
- package/dist/runtime/query-column-name.d.ts.map +1 -0
- package/dist/runtime/query-column-name.js +10 -0
- package/dist/runtime/query-column-name.js.map +1 -0
- package/dist/runtime/query-output-table.d.ts +5 -0
- package/dist/runtime/query-output-table.d.ts.map +1 -0
- package/dist/runtime/query-output-table.js +30 -0
- package/dist/runtime/query-output-table.js.map +1 -0
- package/dist/runtime/recovery-phrase.d.ts +3 -0
- package/dist/runtime/recovery-phrase.d.ts.map +1 -0
- package/dist/runtime/recovery-phrase.js +2 -0
- package/dist/runtime/recovery-phrase.js.map +1 -0
- package/dist/runtime/remote-link-state.d.ts +20 -0
- package/dist/runtime/remote-link-state.d.ts.map +1 -0
- package/dist/runtime/remote-link-state.js +5 -0
- package/dist/runtime/remote-link-state.js.map +1 -0
- package/dist/runtime/removed-provider-props.d.ts +17 -0
- package/dist/runtime/removed-provider-props.d.ts.map +1 -0
- package/dist/runtime/removed-provider-props.js +16 -0
- package/dist/runtime/removed-provider-props.js.map +1 -0
- package/dist/runtime/row-transformer.d.ts +17 -3
- package/dist/runtime/row-transformer.d.ts.map +1 -1
- package/dist/runtime/row-transformer.js +163 -38
- package/dist/runtime/row-transformer.js.map +1 -1
- package/dist/runtime/run-cleanup-steps.d.ts +5 -0
- package/dist/runtime/run-cleanup-steps.d.ts.map +1 -0
- package/dist/runtime/run-cleanup-steps.js +19 -0
- package/dist/runtime/run-cleanup-steps.js.map +1 -0
- package/dist/runtime/runtime-closed-error.d.ts +9 -0
- package/dist/runtime/runtime-closed-error.d.ts.map +1 -0
- package/dist/runtime/runtime-closed-error.js +12 -0
- package/dist/runtime/runtime-closed-error.js.map +1 -0
- package/dist/runtime/runtime-config.d.ts +13 -0
- package/dist/runtime/runtime-config.d.ts.map +1 -0
- package/dist/runtime/runtime-config.js +115 -0
- package/dist/runtime/runtime-config.js.map +1 -0
- package/dist/runtime/runtime-entropy.d.ts +14 -0
- package/dist/runtime/runtime-entropy.d.ts.map +1 -0
- package/dist/runtime/runtime-entropy.js +43 -0
- package/dist/runtime/runtime-entropy.js.map +1 -0
- package/dist/runtime/runtime-source.d.ts +206 -0
- package/dist/runtime/runtime-source.d.ts.map +1 -0
- package/dist/runtime/runtime-source.js +64 -0
- package/dist/runtime/runtime-source.js.map +1 -0
- package/dist/runtime/schema-metadata.d.ts +22 -0
- package/dist/runtime/schema-metadata.d.ts.map +1 -0
- package/dist/runtime/schema-metadata.js +70 -0
- package/dist/runtime/schema-metadata.js.map +1 -0
- package/dist/runtime/select-projection.d.ts +5 -0
- package/dist/runtime/select-projection.d.ts.map +1 -0
- package/dist/runtime/select-projection.js +47 -0
- package/dist/runtime/select-projection.js.map +1 -0
- package/dist/runtime/snapshot-ref.d.ts +24 -0
- package/dist/runtime/snapshot-ref.d.ts.map +1 -0
- package/dist/runtime/snapshot-ref.js +43 -0
- package/dist/runtime/snapshot-ref.js.map +1 -0
- package/dist/runtime/store-held-by-another-tab-error.d.ts +53 -0
- package/dist/runtime/store-held-by-another-tab-error.d.ts.map +1 -0
- package/dist/runtime/store-held-by-another-tab-error.js +55 -0
- package/dist/runtime/store-held-by-another-tab-error.js.map +1 -0
- package/dist/runtime/streaming-source.d.ts +4 -0
- package/dist/runtime/streaming-source.d.ts.map +1 -0
- package/dist/runtime/streaming-source.js +53 -0
- package/dist/runtime/streaming-source.js.map +1 -0
- package/dist/runtime/structural-values.d.ts +6 -0
- package/dist/runtime/structural-values.d.ts.map +1 -0
- package/dist/runtime/structural-values.js +51 -0
- package/dist/runtime/structural-values.js.map +1 -0
- package/dist/runtime/subscription-manager.d.ts +103 -14
- package/dist/runtime/subscription-manager.d.ts.map +1 -1
- package/dist/runtime/subscription-manager.js +1051 -25
- package/dist/runtime/subscription-manager.js.map +1 -1
- package/dist/runtime/sync-status.d.ts +178 -0
- package/dist/runtime/sync-status.d.ts.map +1 -0
- package/dist/runtime/sync-status.js +163 -0
- package/dist/runtime/sync-status.js.map +1 -0
- package/dist/runtime/sync-telemetry.d.ts +35 -0
- package/dist/runtime/sync-telemetry.d.ts.map +1 -0
- package/dist/runtime/sync-telemetry.js +354 -0
- package/dist/runtime/sync-telemetry.js.map +1 -0
- package/dist/runtime/system-identity.d.ts +5 -0
- package/dist/runtime/system-identity.d.ts.map +1 -0
- package/dist/runtime/system-identity.js +10 -0
- package/dist/runtime/system-identity.js.map +1 -0
- package/dist/runtime/telemetry-env.d.ts +2 -0
- package/dist/runtime/telemetry-env.d.ts.map +1 -0
- package/dist/runtime/telemetry-env.js +16 -0
- package/dist/runtime/telemetry-env.js.map +1 -0
- package/dist/runtime/telemetry-env.native.d.ts +3 -0
- package/dist/runtime/telemetry-env.native.d.ts.map +1 -0
- package/dist/runtime/telemetry-env.native.js +7 -0
- package/dist/runtime/telemetry-env.native.js.map +1 -0
- package/dist/runtime/text-anchors.d.ts +58 -0
- package/dist/runtime/text-anchors.d.ts.map +1 -0
- package/dist/runtime/text-anchors.js +9 -0
- package/dist/runtime/text-anchors.js.map +1 -0
- package/dist/runtime/unsupported-storage-codecs-error.d.ts +53 -0
- package/dist/runtime/unsupported-storage-codecs-error.d.ts.map +1 -0
- package/dist/runtime/unsupported-storage-codecs-error.js +74 -0
- package/dist/runtime/unsupported-storage-codecs-error.js.map +1 -0
- package/dist/runtime/url.d.ts +32 -0
- package/dist/runtime/url.d.ts.map +1 -0
- package/dist/runtime/url.js +96 -0
- package/dist/runtime/url.js.map +1 -0
- package/dist/runtime/utf8.d.ts +10 -0
- package/dist/runtime/utf8.d.ts.map +1 -0
- package/dist/runtime/utf8.js +93 -0
- package/dist/runtime/utf8.js.map +1 -0
- package/dist/runtime/util.d.ts +18 -0
- package/dist/runtime/util.d.ts.map +1 -0
- package/dist/runtime/util.js +59 -0
- package/dist/runtime/util.js.map +1 -0
- package/dist/runtime/value-converter.d.ts +9 -17
- package/dist/runtime/value-converter.d.ts.map +1 -1
- package/dist/runtime/value-converter.js +156 -42
- package/dist/runtime/value-converter.js.map +1 -1
- package/dist/runtime/wasm-loader.d.ts +6 -0
- package/dist/runtime/wasm-loader.d.ts.map +1 -0
- package/dist/runtime/wasm-loader.js +127 -0
- package/dist/runtime/wasm-loader.js.map +1 -0
- package/dist/runtime/write-preparation.d.ts +24 -0
- package/dist/runtime/write-preparation.d.ts.map +1 -0
- package/dist/runtime/write-preparation.js +63 -0
- package/dist/runtime/write-preparation.js.map +1 -0
- package/dist/runtime/write-row.d.ts +8 -0
- package/dist/runtime/write-row.d.ts.map +1 -0
- package/dist/runtime/write-row.js +17 -0
- package/dist/runtime/write-row.js.map +1 -0
- package/dist/schema-builders.d.ts +48 -0
- package/dist/schema-builders.d.ts.map +1 -0
- package/dist/schema-builders.js +26 -0
- package/dist/schema-builders.js.map +1 -0
- package/dist/schema-dsl/define-schema.d.ts +32 -0
- package/dist/schema-dsl/define-schema.d.ts.map +1 -0
- package/dist/schema-dsl/define-schema.js +80 -0
- package/dist/schema-dsl/define-schema.js.map +1 -0
- package/dist/schema-dsl/readable-app.d.ts +30 -0
- package/dist/schema-dsl/readable-app.d.ts.map +1 -0
- package/dist/schema-dsl/readable-app.js +139 -0
- package/dist/schema-dsl/readable-app.js.map +1 -0
- package/dist/schema-dsl/table.d.ts +101 -0
- package/dist/schema-dsl/table.d.ts.map +1 -0
- package/dist/schema-dsl/table.js +153 -0
- package/dist/schema-dsl/table.js.map +1 -0
- package/dist/schema-errors.d.ts +6 -0
- package/dist/schema-errors.d.ts.map +1 -0
- package/dist/schema-errors.js +6 -0
- package/dist/schema-errors.js.map +1 -0
- package/dist/schema-loader.d.ts +16 -0
- package/dist/schema-loader.d.ts.map +1 -0
- package/dist/schema-loader.js +108 -0
- package/dist/schema-loader.js.map +1 -0
- package/dist/schema-name.d.ts +2 -0
- package/dist/schema-name.d.ts.map +1 -0
- package/dist/schema-name.js +19 -0
- package/dist/schema-name.js.map +1 -0
- package/dist/schema-namespace.d.ts +7 -0
- package/dist/schema-namespace.d.ts.map +1 -0
- package/dist/schema-namespace.js +7 -0
- package/dist/schema-namespace.js.map +1 -0
- package/dist/schema-permissions.d.ts +12 -0
- package/dist/schema-permissions.d.ts.map +1 -0
- package/dist/schema-permissions.js +17 -0
- package/dist/schema-permissions.js.map +1 -0
- package/dist/schema-source.d.ts +11 -0
- package/dist/schema-source.d.ts.map +1 -0
- package/dist/schema-source.js +53 -0
- package/dist/schema-source.js.map +1 -0
- package/dist/schema.d.ts +95 -38
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +1 -16
- package/dist/schema.js.map +1 -1
- package/dist/session/backend-watch.d.ts +186 -0
- package/dist/session/backend-watch.d.ts.map +1 -0
- package/dist/session/backend-watch.js +698 -0
- package/dist/session/backend-watch.js.map +1 -0
- package/dist/session/config-options.d.ts +15 -0
- package/dist/session/config-options.d.ts.map +1 -0
- package/dist/session/config-options.js +55 -0
- package/dist/session/config-options.js.map +1 -0
- package/dist/session/consumer.d.ts +3 -0
- package/dist/session/consumer.d.ts.map +1 -0
- package/dist/session/consumer.js +3 -0
- package/dist/session/consumer.js.map +1 -0
- package/dist/session/create-jazz-session.d.ts +123 -0
- package/dist/session/create-jazz-session.d.ts.map +1 -0
- package/dist/session/create-jazz-session.js +542 -0
- package/dist/session/create-jazz-session.js.map +1 -0
- package/dist/session/follow-user.d.ts +72 -0
- package/dist/session/follow-user.d.ts.map +1 -0
- package/dist/session/follow-user.js +147 -0
- package/dist/session/follow-user.js.map +1 -0
- package/dist/session/jazz-session.d.ts +234 -0
- package/dist/session/jazz-session.d.ts.map +1 -0
- package/dist/session/jazz-session.js +528 -0
- package/dist/session/jazz-session.js.map +1 -0
- package/dist/session/native-backend-watch.d.ts +4 -0
- package/dist/session/native-backend-watch.d.ts.map +1 -0
- package/dist/session/native-backend-watch.js +14 -0
- package/dist/session/native-backend-watch.js.map +1 -0
- package/dist/session/no-kept-device-account-error.d.ts +6 -0
- package/dist/session/no-kept-device-account-error.d.ts.map +1 -0
- package/dist/session/no-kept-device-account-error.js +8 -0
- package/dist/session/no-kept-device-account-error.js.map +1 -0
- package/dist/session/replica-ledger.d.ts +164 -0
- package/dist/session/replica-ledger.d.ts.map +1 -0
- package/dist/session/replica-ledger.js +496 -0
- package/dist/session/replica-ledger.js.map +1 -0
- package/dist/session/state.d.ts +135 -0
- package/dist/session/state.d.ts.map +1 -0
- package/dist/session/state.js +535 -0
- package/dist/session/state.js.map +1 -0
- package/dist/shared/index.d.ts +20 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/index.js +17 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/solid/create-solid-jazz-client-internal.d.ts +13 -0
- package/dist/solid/create-solid-jazz-client-internal.d.ts.map +1 -0
- package/dist/solid/create-solid-jazz-client-internal.js +82 -0
- package/dist/solid/create-solid-jazz-client-internal.js.map +1 -0
- package/dist/solid/create-solid-jazz-client-internal.ssr.js +101 -0
- package/dist/solid/create-solid-jazz-client-internal.ssr.js.map +1 -0
- package/dist/solid/create-solid-jazz-client.d.ts +24 -0
- package/dist/solid/create-solid-jazz-client.d.ts.map +1 -0
- package/dist/solid/create-solid-jazz-client.js +42 -0
- package/dist/solid/create-solid-jazz-client.js.map +1 -0
- package/dist/solid/create-solid-jazz-client.ssr.js +45 -0
- package/dist/solid/create-solid-jazz-client.ssr.js.map +1 -0
- package/dist/solid/index.d.ts +13 -0
- package/dist/solid/index.d.ts.map +1 -0
- package/dist/solid/index.js +9 -0
- package/dist/solid/index.ssr.js +9 -0
- package/dist/solid/provider.d.ts +25 -0
- package/dist/solid/provider.d.ts.map +1 -0
- package/dist/solid/provider.js +48 -0
- package/dist/solid/provider.js.map +1 -0
- package/dist/solid/provider.ssr.js +48 -0
- package/dist/solid/provider.ssr.js.map +1 -0
- package/dist/solid/session-context.d.ts +14 -0
- package/dist/solid/session-context.d.ts.map +1 -0
- package/dist/solid/session-context.js +6 -0
- package/dist/solid/session-context.js.map +1 -0
- package/dist/solid/session-context.ssr.js +10 -0
- package/dist/solid/session-context.ssr.js.map +1 -0
- package/dist/solid/session.d.ts +55 -0
- package/dist/solid/session.d.ts.map +1 -0
- package/dist/solid/session.js +130 -0
- package/dist/solid/session.js.map +1 -0
- package/dist/solid/session.ssr.js +156 -0
- package/dist/solid/session.ssr.js.map +1 -0
- package/dist/solid/solid-jazz-client-store.d.ts +11 -0
- package/dist/solid/solid-jazz-client-store.d.ts.map +1 -0
- package/dist/solid/solid-jazz-client-store.js +38 -0
- package/dist/solid/solid-jazz-client-store.js.map +1 -0
- package/dist/solid/solid-jazz-client-store.ssr.js +39 -0
- package/dist/solid/solid-jazz-client-store.ssr.js.map +1 -0
- package/dist/solid/use-all.d.ts +18 -0
- package/dist/solid/use-all.d.ts.map +1 -0
- package/dist/solid/use-all.js +71 -0
- package/dist/solid/use-all.js.map +1 -0
- package/dist/solid/use-all.ssr.js +84 -0
- package/dist/solid/use-all.ssr.js.map +1 -0
- package/dist/solid/use-one.d.ts +18 -0
- package/dist/solid/use-one.d.ts.map +1 -0
- package/dist/solid/use-one.js +27 -0
- package/dist/solid/use-one.js.map +1 -0
- package/dist/solid/use-one.ssr.js +27 -0
- package/dist/solid/use-one.ssr.js.map +1 -0
- package/dist/solid/use-sync-status.d.ts +8 -0
- package/dist/solid/use-sync-status.d.ts.map +1 -0
- package/dist/solid/use-sync-status.js +13 -0
- package/dist/solid/use-sync-status.js.map +1 -0
- package/dist/solid/use-sync-status.ssr.js +20 -0
- package/dist/solid/use-sync-status.ssr.js.map +1 -0
- package/dist/subscription-store-internal.d.ts +11 -0
- package/dist/subscription-store-internal.d.ts.map +1 -0
- package/dist/subscription-store-internal.js +18 -0
- package/dist/subscription-store-internal.js.map +1 -0
- package/dist/subscriptions-orchestrator.d.ts +92 -14
- package/dist/subscriptions-orchestrator.d.ts.map +1 -1
- package/dist/subscriptions-orchestrator.js +390 -75
- package/dist/subscriptions-orchestrator.js.map +1 -1
- package/dist/svelte/JazzProvider.svelte +110 -0
- package/dist/svelte/JazzProvider.svelte.d.ts +24 -0
- package/dist/svelte/JazzProvider.svelte.d.ts.map +1 -0
- package/dist/svelte/JazzSvelteClientProvider.svelte +83 -0
- package/dist/svelte/JazzSvelteClientProvider.svelte.d.ts +15 -0
- package/dist/svelte/JazzSvelteClientProvider.svelte.d.ts.map +1 -0
- package/dist/svelte/context.svelte.d.ts +19 -3
- package/dist/svelte/context.svelte.d.ts.map +1 -1
- package/dist/svelte/context.svelte.js +21 -5
- package/dist/svelte/create-jazz-client.d.ts +2 -8
- package/dist/svelte/create-jazz-client.d.ts.map +1 -1
- package/dist/svelte/create-jazz-client.js +1 -17
- package/dist/svelte/index.d.ts +14 -7
- package/dist/svelte/index.d.ts.map +1 -1
- package/dist/svelte/index.js +10 -7
- package/dist/svelte/query-subscription.svelte.d.ts +60 -0
- package/dist/svelte/query-subscription.svelte.d.ts.map +1 -0
- package/dist/svelte/query-subscription.svelte.js +135 -0
- package/dist/svelte/session-state.d.ts +27 -0
- package/dist/svelte/session-state.d.ts.map +1 -0
- package/dist/svelte/session-state.js +49 -0
- package/dist/svelte/sync-status.d.ts +11 -0
- package/dist/svelte/sync-status.d.ts.map +1 -0
- package/dist/svelte/sync-status.js +15 -0
- package/dist/testing/fixtures/with-bigint/schema.d.ts +18 -0
- package/dist/testing/fixtures/with-bigint/schema.d.ts.map +1 -0
- package/dist/testing/fixtures/with-bigint/schema.js +15 -0
- package/dist/testing/fixtures/with-bigint/schema.js.map +1 -0
- package/dist/testing/index.d.ts +6 -1
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +5 -1
- package/dist/testing/index.js.map +1 -1
- package/dist/testing/policy-test-app.d.ts +129 -0
- package/dist/testing/policy-test-app.d.ts.map +1 -0
- package/dist/testing/policy-test-app.js +229 -0
- package/dist/testing/policy-test-app.js.map +1 -0
- package/dist/testing/test-app.d.ts +272 -0
- package/dist/testing/test-app.d.ts.map +1 -0
- package/dist/testing/test-app.js +62 -0
- package/dist/testing/test-app.js.map +1 -0
- package/dist/testing/test-jazz.d.ts +119 -0
- package/dist/testing/test-jazz.d.ts.map +1 -0
- package/dist/testing/test-jazz.js +162 -0
- package/dist/testing/test-jazz.js.map +1 -0
- package/dist/testing/test-jwt-issuer.d.ts +19 -0
- package/dist/testing/test-jwt-issuer.d.ts.map +1 -0
- package/dist/testing/test-jwt-issuer.js +40 -0
- package/dist/testing/test-jwt-issuer.js.map +1 -0
- package/dist/text-field/index.d.ts +40 -0
- package/dist/text-field/index.d.ts.map +1 -0
- package/dist/text-field/index.js +129 -0
- package/dist/text-field/index.js.map +1 -0
- package/dist/thin/index.d.ts +80 -0
- package/dist/thin/index.d.ts.map +1 -0
- package/dist/thin/index.js +219 -0
- package/dist/thin/index.js.map +1 -0
- package/dist/thin/self-signed-token.d.ts +13 -0
- package/dist/thin/self-signed-token.d.ts.map +1 -0
- package/dist/thin/self-signed-token.js +100 -0
- package/dist/thin/self-signed-token.js.map +1 -0
- package/dist/thin/thin-runtime-source.d.ts +19 -0
- package/dist/thin/thin-runtime-source.d.ts.map +1 -0
- package/dist/thin/thin-runtime-source.js +66 -0
- package/dist/thin/thin-runtime-source.js.map +1 -0
- package/dist/thin/thin-runtime.d.ts +294 -0
- package/dist/thin/thin-runtime.d.ts.map +1 -0
- package/dist/thin/thin-runtime.js +1492 -0
- package/dist/thin/thin-runtime.js.map +1 -0
- package/dist/thin/wire.d.ts +160 -0
- package/dist/thin/wire.d.ts.map +1 -0
- package/dist/thin/wire.js +304 -0
- package/dist/thin/wire.js.map +1 -0
- package/dist/typed-app.d.ts +644 -0
- package/dist/typed-app.d.ts.map +1 -0
- package/dist/typed-app.js +549 -0
- package/dist/typed-app.js.map +1 -0
- package/dist/vue/create-jazz-client.d.ts +3 -0
- package/dist/vue/create-jazz-client.d.ts.map +1 -0
- package/dist/vue/create-jazz-client.js +2 -0
- package/dist/vue/create-jazz-client.js.map +1 -0
- package/dist/vue/index.d.ts +13 -0
- package/dist/vue/index.d.ts.map +1 -0
- package/dist/vue/index.js +9 -0
- package/dist/vue/index.js.map +1 -0
- package/dist/vue/provider.d.ts +50 -0
- package/dist/vue/provider.d.ts.map +1 -0
- package/dist/vue/provider.js +97 -0
- package/dist/vue/provider.js.map +1 -0
- package/dist/vue/session-key.d.ts +15 -0
- package/dist/vue/session-key.d.ts.map +1 -0
- package/dist/vue/session-key.js +7 -0
- package/dist/vue/session-key.js.map +1 -0
- package/dist/vue/session.d.ts +40 -0
- package/dist/vue/session.d.ts.map +1 -0
- package/dist/vue/session.js +112 -0
- package/dist/vue/session.js.map +1 -0
- package/dist/vue/use-all.d.ts +61 -0
- package/dist/vue/use-all.d.ts.map +1 -0
- package/dist/vue/use-all.js +104 -0
- package/dist/vue/use-all.js.map +1 -0
- package/dist/vue/use-one.d.ts +24 -0
- package/dist/vue/use-one.d.ts.map +1 -0
- package/dist/vue/use-one.js +17 -0
- package/dist/vue/use-one.js.map +1 -0
- package/dist/vue/use-sync-status.d.ts +9 -0
- package/dist/vue/use-sync-status.d.ts.map +1 -0
- package/dist/vue/use-sync-status.js +16 -0
- package/dist/vue/use-sync-status.js.map +1 -0
- package/dist/web/create-jazz-client.d.ts +12 -0
- package/dist/web/create-jazz-client.d.ts.map +1 -0
- package/dist/web/create-jazz-client.js +35 -0
- package/dist/web/create-jazz-client.js.map +1 -0
- package/dist/web/lazy-local-first.d.ts +5 -0
- package/dist/web/lazy-local-first.d.ts.map +1 -0
- package/dist/web/lazy-local-first.js +8 -0
- package/dist/web/lazy-local-first.js.map +1 -0
- package/dist/web/registered-jazz-client.d.ts +15 -0
- package/dist/web/registered-jazz-client.d.ts.map +1 -0
- package/dist/web/registered-jazz-client.js +35 -0
- package/dist/web/registered-jazz-client.js.map +1 -0
- package/dist/where-operators.d.ts +13 -0
- package/dist/where-operators.d.ts.map +1 -0
- package/dist/where-operators.js +66 -0
- package/dist/where-operators.js.map +1 -0
- package/dist/window-client-storage.d.ts +7 -0
- package/dist/window-client-storage.d.ts.map +1 -0
- package/dist/window-client-storage.js +27 -0
- package/dist/window-client-storage.js.map +1 -0
- package/dist/worker/jazz-broker-worker-core.d.ts +34 -0
- package/dist/worker/jazz-broker-worker-core.d.ts.map +1 -0
- package/dist/worker/jazz-broker-worker-core.js +2241 -0
- package/dist/worker/jazz-broker-worker-core.js.map +1 -0
- package/dist/worker/jazz-broker-worker.d.ts +3 -0
- package/dist/worker/jazz-broker-worker.d.ts.map +1 -0
- package/dist/worker/jazz-broker-worker.js +5 -0
- package/dist/worker/jazz_wasm_bg.wasm +0 -0
- package/dist/worker/mutation-error-delivery.d.ts +8 -0
- package/dist/worker/mutation-error-delivery.d.ts.map +1 -0
- package/dist/worker/mutation-error-delivery.js +10 -0
- package/dist/worker/mutation-error-delivery.js.map +1 -0
- package/dist/worker/runtime-admission.d.ts +34 -0
- package/dist/worker/runtime-admission.d.ts.map +1 -0
- package/dist/worker/runtime-admission.js +60 -0
- package/dist/worker/runtime-admission.js.map +1 -0
- package/dist/worker/vite-dev-broker.d.ts +2 -0
- package/dist/worker/vite-dev-broker.d.ts.map +1 -0
- package/dist/worker/vite-dev-broker.js +8 -0
- package/dist/worker/vite-dev-broker.js.map +1 -0
- package/package.json +299 -37
- package/bin/native/.gitkeep +0 -0
- package/bin/native/jazz-tools-darwin-arm64 +0 -0
- package/bin/native/jazz-tools-darwin-x64 +0 -0
- package/bin/native/jazz-tools-linux-arm64 +0 -0
- package/bin/native/jazz-tools-linux-x64 +0 -0
- package/bin/native/jazz-tools-windows-x64.exe +0 -0
- package/dist/backend/create-jazz-context.test.d.ts +0 -2
- package/dist/backend/create-jazz-context.test.d.ts.map +0 -1
- package/dist/backend/create-jazz-context.test.js +0 -141
- package/dist/backend/create-jazz-context.test.js.map +0 -1
- package/dist/cli.test.d.ts +0 -2
- package/dist/cli.test.d.ts.map +0 -1
- package/dist/cli.test.js +0 -154
- package/dist/cli.test.js.map +0 -1
- package/dist/codegen/codegen.test.d.ts +0 -2
- package/dist/codegen/codegen.test.d.ts.map +0 -1
- package/dist/codegen/codegen.test.js +0 -914
- package/dist/codegen/codegen.test.js.map +0 -1
- package/dist/codegen/index.d.ts +0 -18
- package/dist/codegen/index.d.ts.map +0 -1
- package/dist/codegen/index.js +0 -22
- package/dist/codegen/index.js.map +0 -1
- package/dist/codegen/query-builder-generator.d.ts +0 -26
- package/dist/codegen/query-builder-generator.d.ts.map +0 -1
- package/dist/codegen/query-builder-generator.js +0 -342
- package/dist/codegen/query-builder-generator.js.map +0 -1
- package/dist/codegen/schema-reader.d.ts +0 -12
- package/dist/codegen/schema-reader.d.ts.map +0 -1
- package/dist/codegen/schema-reader.js +0 -180
- package/dist/codegen/schema-reader.js.map +0 -1
- package/dist/codegen/type-generator.d.ts +0 -29
- package/dist/codegen/type-generator.d.ts.map +0 -1
- package/dist/codegen/type-generator.js +0 -296
- package/dist/codegen/type-generator.js.map +0 -1
- package/dist/dev-tools/dev-tools.d.ts +0 -15
- package/dist/dev-tools/dev-tools.d.ts.map +0 -1
- package/dist/dev-tools/dev-tools.js +0 -297
- package/dist/dev-tools/dev-tools.js.map +0 -1
- package/dist/dev-tools/extension-panel.d.ts +0 -19
- package/dist/dev-tools/extension-panel.d.ts.map +0 -1
- package/dist/dev-tools/extension-panel.js +0 -419
- package/dist/dev-tools/extension-panel.js.map +0 -1
- package/dist/dev-tools/index.d.ts +0 -3
- package/dist/dev-tools/index.d.ts.map +0 -1
- package/dist/dev-tools/index.js +0 -3
- package/dist/dev-tools/index.js.map +0 -1
- package/dist/dev-tools/protocol.d.ts +0 -49
- package/dist/dev-tools/protocol.d.ts.map +0 -1
- package/dist/dev-tools/protocol.js +0 -40
- package/dist/dev-tools/protocol.js.map +0 -1
- package/dist/dsl.test.d.ts +0 -2
- package/dist/dsl.test.d.ts.map +0 -1
- package/dist/dsl.test.js +0 -51
- package/dist/dsl.test.js.map +0 -1
- package/dist/permissions/index.d.ts +0 -146
- package/dist/permissions/index.d.ts.map +0 -1
- package/dist/permissions/index.js +0 -1211
- package/dist/permissions/index.js.map +0 -1
- package/dist/permissions/index.test.d.ts +0 -2
- package/dist/permissions/index.test.d.ts.map +0 -1
- package/dist/permissions/index.test.js +0 -830
- package/dist/permissions/index.test.js.map +0 -1
- package/dist/permissions/type-inference.test.d.ts +0 -2
- package/dist/permissions/type-inference.test.d.ts.map +0 -1
- package/dist/permissions/type-inference.test.js +0 -149
- package/dist/permissions/type-inference.test.js.map +0 -1
- package/dist/react/create-jazz-client.integration.test.d.ts +0 -2
- package/dist/react/create-jazz-client.integration.test.d.ts.map +0 -1
- package/dist/react/create-jazz-client.integration.test.js +0 -82
- package/dist/react/create-jazz-client.integration.test.js.map +0 -1
- package/dist/react/create-jazz-client.test.d.ts +0 -2
- package/dist/react/create-jazz-client.test.d.ts.map +0 -1
- package/dist/react/create-jazz-client.test.js +0 -135
- package/dist/react/create-jazz-client.test.js.map +0 -1
- package/dist/react/synthetic-user-switcher.d.ts +0 -9
- package/dist/react/synthetic-user-switcher.d.ts.map +0 -1
- package/dist/react/synthetic-user-switcher.js +0 -65
- package/dist/react/synthetic-user-switcher.js.map +0 -1
- package/dist/react/synthetic-users.d.ts +0 -2
- package/dist/react/synthetic-users.d.ts.map +0 -1
- package/dist/react/synthetic-users.js +0 -2
- package/dist/react/synthetic-users.js.map +0 -1
- package/dist/react/synthetic-users.test.d.ts +0 -2
- package/dist/react/synthetic-users.test.d.ts.map +0 -1
- package/dist/react/synthetic-users.test.js +0 -43
- package/dist/react/synthetic-users.test.js.map +0 -1
- package/dist/react/use-link-external-identity.d.ts +0 -25
- package/dist/react/use-link-external-identity.d.ts.map +0 -1
- package/dist/react/use-link-external-identity.js +0 -45
- package/dist/react/use-link-external-identity.js.map +0 -1
- package/dist/react-native/create-jazz-client.test.d.ts +0 -2
- package/dist/react-native/create-jazz-client.test.d.ts.map +0 -1
- package/dist/react-native/create-jazz-client.test.js +0 -162
- package/dist/react-native/create-jazz-client.test.js.map +0 -1
- package/dist/react-native/create-jazz-rn-runtime.d.ts +0 -13
- package/dist/react-native/create-jazz-rn-runtime.d.ts.map +0 -1
- package/dist/react-native/create-jazz-rn-runtime.js +0 -7
- package/dist/react-native/create-jazz-rn-runtime.js.map +0 -1
- package/dist/react-native/db.d.ts +0 -16
- package/dist/react-native/db.d.ts.map +0 -1
- package/dist/react-native/db.js +0 -50
- package/dist/react-native/db.js.map +0 -1
- package/dist/react-native/db.test.d.ts +0 -2
- package/dist/react-native/db.test.d.ts.map +0 -1
- package/dist/react-native/db.test.js +0 -148
- package/dist/react-native/db.test.js.map +0 -1
- package/dist/react-native/jazz-rn-runtime-adapter.d.ts +0 -56
- package/dist/react-native/jazz-rn-runtime-adapter.d.ts.map +0 -1
- package/dist/react-native/jazz-rn-runtime-adapter.js +0 -192
- package/dist/react-native/jazz-rn-runtime-adapter.js.map +0 -1
- package/dist/react-native/jazz-rn-runtime-adapter.test.d.ts +0 -2
- package/dist/react-native/jazz-rn-runtime-adapter.test.d.ts.map +0 -1
- package/dist/react-native/jazz-rn-runtime-adapter.test.js +0 -165
- package/dist/react-native/jazz-rn-runtime-adapter.test.js.map +0 -1
- package/dist/runtime/client-session.test.d.ts +0 -2
- package/dist/runtime/client-session.test.d.ts.map +0 -1
- package/dist/runtime/client-session.test.js +0 -84
- package/dist/runtime/client-session.test.js.map +0 -1
- package/dist/runtime/client.for-request.test.d.ts +0 -2
- package/dist/runtime/client.for-request.test.d.ts.map +0 -1
- package/dist/runtime/client.for-request.test.js +0 -191
- package/dist/runtime/client.for-request.test.js.map +0 -1
- package/dist/runtime/cloud-server.integration.test.d.ts +0 -2
- package/dist/runtime/cloud-server.integration.test.d.ts.map +0 -1
- package/dist/runtime/cloud-server.integration.test.js +0 -1210
- package/dist/runtime/cloud-server.integration.test.js.map +0 -1
- package/dist/runtime/dynamic-query.d.ts +0 -10
- package/dist/runtime/dynamic-query.d.ts.map +0 -1
- package/dist/runtime/dynamic-query.js +0 -11
- package/dist/runtime/dynamic-query.js.map +0 -1
- package/dist/runtime/leader-lock.d.ts +0 -15
- package/dist/runtime/leader-lock.d.ts.map +0 -1
- package/dist/runtime/leader-lock.js +0 -49
- package/dist/runtime/leader-lock.js.map +0 -1
- package/dist/runtime/local-auth.d.ts +0 -32
- package/dist/runtime/local-auth.d.ts.map +0 -1
- package/dist/runtime/local-auth.js +0 -93
- package/dist/runtime/local-auth.js.map +0 -1
- package/dist/runtime/local-auth.test.d.ts +0 -2
- package/dist/runtime/local-auth.test.d.ts.map +0 -1
- package/dist/runtime/local-auth.test.js +0 -50
- package/dist/runtime/local-auth.test.js.map +0 -1
- package/dist/runtime/query-adapter.test.d.ts +0 -5
- package/dist/runtime/query-adapter.test.d.ts.map +0 -1
- package/dist/runtime/query-adapter.test.js +0 -1249
- package/dist/runtime/query-adapter.test.js.map +0 -1
- package/dist/runtime/row-transformer.test.d.ts +0 -5
- package/dist/runtime/row-transformer.test.d.ts.map +0 -1
- package/dist/runtime/row-transformer.test.js +0 -385
- package/dist/runtime/row-transformer.test.js.map +0 -1
- package/dist/runtime/schema-fetch.d.ts +0 -17
- package/dist/runtime/schema-fetch.d.ts.map +0 -1
- package/dist/runtime/schema-fetch.js +0 -33
- package/dist/runtime/schema-fetch.js.map +0 -1
- package/dist/runtime/schema-fetch.test.d.ts +0 -2
- package/dist/runtime/schema-fetch.test.d.ts.map +0 -1
- package/dist/runtime/schema-fetch.test.js +0 -87
- package/dist/runtime/schema-fetch.test.js.map +0 -1
- package/dist/runtime/subscription-manager.test.d.ts +0 -5
- package/dist/runtime/subscription-manager.test.d.ts.map +0 -1
- package/dist/runtime/subscription-manager.test.js +0 -120
- package/dist/runtime/subscription-manager.test.js.map +0 -1
- package/dist/runtime/sync-transport.d.ts +0 -163
- package/dist/runtime/sync-transport.d.ts.map +0 -1
- package/dist/runtime/sync-transport.js +0 -477
- package/dist/runtime/sync-transport.js.map +0 -1
- package/dist/runtime/sync-transport.test.d.ts +0 -2
- package/dist/runtime/sync-transport.test.d.ts.map +0 -1
- package/dist/runtime/sync-transport.test.js +0 -310
- package/dist/runtime/sync-transport.test.js.map +0 -1
- package/dist/runtime/tab-leader-election.d.ts +0 -97
- package/dist/runtime/tab-leader-election.d.ts.map +0 -1
- package/dist/runtime/tab-leader-election.js +0 -339
- package/dist/runtime/tab-leader-election.js.map +0 -1
- package/dist/runtime/tab-leader-election.test.d.ts +0 -2
- package/dist/runtime/tab-leader-election.test.d.ts.map +0 -1
- package/dist/runtime/tab-leader-election.test.js +0 -278
- package/dist/runtime/tab-leader-election.test.js.map +0 -1
- package/dist/runtime/testing/wasm-runtime-test-utils.d.ts +0 -13
- package/dist/runtime/testing/wasm-runtime-test-utils.d.ts.map +0 -1
- package/dist/runtime/testing/wasm-runtime-test-utils.js +0 -76
- package/dist/runtime/testing/wasm-runtime-test-utils.js.map +0 -1
- package/dist/runtime/utils.d.ts +0 -2
- package/dist/runtime/utils.d.ts.map +0 -1
- package/dist/runtime/utils.js +0 -16
- package/dist/runtime/utils.js.map +0 -1
- package/dist/runtime/value-converter.test.d.ts +0 -5
- package/dist/runtime/value-converter.test.d.ts.map +0 -1
- package/dist/runtime/value-converter.test.js +0 -222
- package/dist/runtime/value-converter.test.js.map +0 -1
- package/dist/runtime/worker-bridge.d.ts +0 -82
- package/dist/runtime/worker-bridge.d.ts.map +0 -1
- package/dist/runtime/worker-bridge.js +0 -308
- package/dist/runtime/worker-bridge.js.map +0 -1
- package/dist/runtime/worker-bridge.race-harness.test.d.ts +0 -2
- package/dist/runtime/worker-bridge.race-harness.test.d.ts.map +0 -1
- package/dist/runtime/worker-bridge.race-harness.test.js +0 -284
- package/dist/runtime/worker-bridge.race-harness.test.js.map +0 -1
- package/dist/runtime/worker-bridge.test.d.ts +0 -2
- package/dist/runtime/worker-bridge.test.d.ts.map +0 -1
- package/dist/runtime/worker-bridge.test.js +0 -233
- package/dist/runtime/worker-bridge.test.js.map +0 -1
- package/dist/sql-gen.d.ts +0 -4
- package/dist/sql-gen.d.ts.map +0 -1
- package/dist/sql-gen.js +0 -163
- package/dist/sql-gen.js.map +0 -1
- package/dist/sql-gen.test.d.ts +0 -2
- package/dist/sql-gen.test.d.ts.map +0 -1
- package/dist/sql-gen.test.js +0 -412
- package/dist/sql-gen.test.js.map +0 -1
- package/dist/subscriptions-orchestrator.integration.test.d.ts +0 -2
- package/dist/subscriptions-orchestrator.integration.test.d.ts.map +0 -1
- package/dist/subscriptions-orchestrator.integration.test.js +0 -192
- package/dist/subscriptions-orchestrator.integration.test.js.map +0 -1
- package/dist/subscriptions-orchestrator.test.d.ts +0 -2
- package/dist/subscriptions-orchestrator.test.d.ts.map +0 -1
- package/dist/subscriptions-orchestrator.test.js +0 -367
- package/dist/subscriptions-orchestrator.test.js.map +0 -1
- package/dist/svelte/JazzSvelteProvider.svelte +0 -49
- package/dist/svelte/JazzSvelteProvider.svelte.d.ts +0 -13
- package/dist/svelte/JazzSvelteProvider.svelte.d.ts.map +0 -1
- package/dist/svelte/SyntheticUserSwitcher.svelte +0 -121
- package/dist/svelte/SyntheticUserSwitcher.svelte.d.ts +0 -11
- package/dist/svelte/SyntheticUserSwitcher.svelte.d.ts.map +0 -1
- package/dist/svelte/context.test.d.ts +0 -2
- package/dist/svelte/context.test.d.ts.map +0 -1
- package/dist/svelte/context.test.js +0 -55
- package/dist/svelte/create-jazz-client.test.d.ts +0 -2
- package/dist/svelte/create-jazz-client.test.d.ts.map +0 -1
- package/dist/svelte/create-jazz-client.test.js +0 -50
- package/dist/svelte/use-all.svelte.d.ts +0 -32
- package/dist/svelte/use-all.svelte.d.ts.map +0 -1
- package/dist/svelte/use-all.svelte.js +0 -61
- package/dist/svelte/use-all.test.d.ts +0 -2
- package/dist/svelte/use-all.test.d.ts.map +0 -1
- package/dist/svelte/use-all.test.js +0 -158
- package/dist/svelte/use-link-external-identity.d.ts +0 -25
- package/dist/svelte/use-link-external-identity.d.ts.map +0 -1
- package/dist/svelte/use-link-external-identity.js +0 -33
- package/dist/svelte/use-link-external-identity.test.d.ts +0 -2
- package/dist/svelte/use-link-external-identity.test.d.ts.map +0 -1
- package/dist/svelte/use-link-external-identity.test.js +0 -97
- package/dist/synthetic-user-switcher.d.ts +0 -16
- package/dist/synthetic-user-switcher.d.ts.map +0 -1
- package/dist/synthetic-user-switcher.js +0 -134
- package/dist/synthetic-user-switcher.js.map +0 -1
- package/dist/synthetic-users.d.ts +0 -32
- package/dist/synthetic-users.d.ts.map +0 -1
- package/dist/synthetic-users.js +0 -124
- package/dist/synthetic-users.js.map +0 -1
- package/dist/testing/fixtures/basic/app.d.ts +0 -55
- package/dist/testing/fixtures/basic/app.d.ts.map +0 -1
- package/dist/testing/fixtures/basic/app.js +0 -174
- package/dist/testing/fixtures/basic/app.js.map +0 -1
- package/dist/testing/fixtures/basic/current.d.ts +0 -2
- package/dist/testing/fixtures/basic/current.d.ts.map +0 -1
- package/dist/testing/fixtures/basic/current.js +0 -6
- package/dist/testing/fixtures/basic/current.js.map +0 -1
- package/dist/testing/index.test.d.ts +0 -2
- package/dist/testing/index.test.d.ts.map +0 -1
- package/dist/testing/index.test.js +0 -234
- package/dist/testing/index.test.js.map +0 -1
- package/dist/testing/local-jazz-server.d.ts +0 -34
- package/dist/testing/local-jazz-server.d.ts.map +0 -1
- package/dist/testing/local-jazz-server.js +0 -313
- package/dist/testing/local-jazz-server.js.map +0 -1
- package/dist/testing/relation-ir-test-helpers.d.ts +0 -3
- package/dist/testing/relation-ir-test-helpers.d.ts.map +0 -1
- package/dist/testing/relation-ir-test-helpers.js +0 -258
- package/dist/testing/relation-ir-test-helpers.js.map +0 -1
- package/dist/worker/jazz-worker.d.ts +0 -9
- package/dist/worker/jazz-worker.d.ts.map +0 -1
- package/dist/worker/jazz-worker.js +0 -555
- package/dist/worker/jazz-worker.js.map +0 -1
- package/dist/worker/jazz-worker.ts +0 -630
- package/dist/worker/worker-protocol.d.ts +0 -136
- package/dist/worker/worker-protocol.d.ts.map +0 -1
- package/dist/worker/worker-protocol.js +0 -7
- package/dist/worker/worker-protocol.js.map +0 -1
|
@@ -0,0 +1,988 @@
|
|
|
1
|
+
import { createBrowserWorkerAssetScope, resolveBrowserWorkerRuntimeSources, resolveBrowserWorkerUrl, vitePrebundledBrokerWorkerUrl, } from "../browser-worker-config.js";
|
|
2
|
+
import { browserRuntimeModuleUrl, bundledBrowserWorkerType } from "../browser-worker-assets.js";
|
|
3
|
+
import { isMetroBundle, METRO_SETUP_ERROR } from "../metro-setup-error.js";
|
|
4
|
+
import { BrowserWorkerUnresponsiveError, deserializeBrowserRelayError, BROWSER_STORE_HELD_BY_ANOTHER_SIGN_IN, BROWSER_STORE_HELD_BY_ANOTHER_BUILD, BROWSER_STORE_OPEN_WITH_NEWER_BUILD, } from "./browser-worker-protocol.js";
|
|
5
|
+
import { MessagePortBrowserFollowerConnection } from "./browser-follower-connection.js";
|
|
6
|
+
import { waitForInspectorOpening } from "./inspector-control-lifecycle.js";
|
|
7
|
+
import { toError } from "../util.js";
|
|
8
|
+
import { browserStoreGeneration, browserStoreGenerationChanged, renewBrowserStoreGeneration, } from "../browser-store-generation.js";
|
|
9
|
+
import { describeBrokerWorkerLoadFailure } from "./broker-worker-load-failure.js";
|
|
10
|
+
/**
|
|
11
|
+
* The only place the broker SharedWorker is constructed.
|
|
12
|
+
*
|
|
13
|
+
* The foreground lease and the runtime connection must attach to the same
|
|
14
|
+
* SharedWorker realm, and a realm is keyed by script URL plus name. webpack 5
|
|
15
|
+
* emits a separate worker chunk (with a distinct URL) for every
|
|
16
|
+
* `new SharedWorker(new URL(..., import.meta.url))` expression it finds, so
|
|
17
|
+
* two such expressions put the lease and the runtime in different realms and
|
|
18
|
+
* the runtime never starts. Keep exactly one statically analyzable
|
|
19
|
+
* construction here so every bundler emits a single broker worker chunk.
|
|
20
|
+
*/
|
|
21
|
+
function createBrokerSharedWorker(runtimeSources, name) {
|
|
22
|
+
if (usesJazzResolvedWorkerUrl(runtimeSources)) {
|
|
23
|
+
return new SharedWorker(resolveBrowserWorkerUrl(runtimeSources), {
|
|
24
|
+
// Metro cannot build the worker from the expression below. It names
|
|
25
|
+
// the worker it built by URL instead, as a classic script. A URL the
|
|
26
|
+
// app sets is started as a module, and the type is not part of the
|
|
27
|
+
// worker's name: under Metro, leave brokerWorkerUrl unset (documented).
|
|
28
|
+
type: (appServesWorker(runtimeSources) ? null : bundledBrowserWorkerType()) ?? "module",
|
|
29
|
+
name,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
// Under the Vite dev server's pre-bundle the literal below points nowhere
|
|
33
|
+
// (Vite 6/7); the dev server resolves the worker by package instead.
|
|
34
|
+
const prebundledUrl = vitePrebundledBrokerWorkerUrl(browserRuntimeModuleUrl());
|
|
35
|
+
if (prebundledUrl)
|
|
36
|
+
return new SharedWorker(prebundledUrl, { type: "module", name });
|
|
37
|
+
const worker = new SharedWorker(new URL("../../worker/jazz-broker-worker.js", import.meta.url), {
|
|
38
|
+
type: "module",
|
|
39
|
+
name,
|
|
40
|
+
});
|
|
41
|
+
// Expo's Metro rewrites the expression above into a dedicated Worker, which
|
|
42
|
+
// has no port to attach a lease or a runtime to.
|
|
43
|
+
if (!("port" in worker)) {
|
|
44
|
+
worker.terminate?.();
|
|
45
|
+
throw new Error(METRO_SETUP_ERROR);
|
|
46
|
+
}
|
|
47
|
+
return worker;
|
|
48
|
+
}
|
|
49
|
+
function appServesWorker(runtimeSources) {
|
|
50
|
+
return Boolean(runtimeSources?.brokerWorkerUrl || runtimeSources?.baseUrl);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Whether the worker starts from the URL Jazz resolves: one the app serves,
|
|
54
|
+
* or the one a bundler that can't build the worker from
|
|
55
|
+
* `new SharedWorker(new URL(...))` named for it (Metro).
|
|
56
|
+
*
|
|
57
|
+
* A `wasmVersion` alone doesn't: the bundler's worker URL already changes
|
|
58
|
+
* with its bytes, and the realm name carries the versioned asset scope
|
|
59
|
+
* (`createBrowserSharedWorkerBaseName`), so tabs of another deployment never
|
|
60
|
+
* share the worker.
|
|
61
|
+
*/
|
|
62
|
+
function usesJazzResolvedWorkerUrl(runtimeSources) {
|
|
63
|
+
return appServesWorker(runtimeSources) || bundledBrowserWorkerType() !== null;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Fail as soon as the browser reports that the broker worker script never
|
|
67
|
+
* started, naming the likely cause, instead of waiting out an admission
|
|
68
|
+
* timeout that can only say the worker was silent. Calls `onFailure` at most
|
|
69
|
+
* once; the returned function stops listening.
|
|
70
|
+
*/
|
|
71
|
+
function watchBrokerWorkerStart(worker, runtimeSources, onFailure) {
|
|
72
|
+
if (typeof worker.addEventListener !== "function")
|
|
73
|
+
return () => undefined;
|
|
74
|
+
let watching = true;
|
|
75
|
+
const onError = () => {
|
|
76
|
+
if (!watching)
|
|
77
|
+
return;
|
|
78
|
+
stop();
|
|
79
|
+
void describeBrokerWorkerLoadFailure({
|
|
80
|
+
workerUrl: usesJazzResolvedWorkerUrl(runtimeSources)
|
|
81
|
+
? resolveBrowserWorkerUrl(runtimeSources)
|
|
82
|
+
: vitePrebundledBrokerWorkerUrl(browserRuntimeModuleUrl()),
|
|
83
|
+
moduleUrl: browserRuntimeModuleUrl(),
|
|
84
|
+
metro: isMetroBundle(),
|
|
85
|
+
}).then(onFailure);
|
|
86
|
+
};
|
|
87
|
+
const stop = () => {
|
|
88
|
+
watching = false;
|
|
89
|
+
worker.removeEventListener?.("error", onError);
|
|
90
|
+
};
|
|
91
|
+
worker.addEventListener("error", onError);
|
|
92
|
+
return stop;
|
|
93
|
+
}
|
|
94
|
+
// Acquiring a lease is deliberately the first operation on a persistent
|
|
95
|
+
// browser root. On a cold browser profile that means starting the worker,
|
|
96
|
+
// acquiring the Web Lock, opening IndexedDB, checking the durable owner, and
|
|
97
|
+
// committing the lease receipt. This is I/O admission, not a heartbeat. Keep
|
|
98
|
+
// the complete probe-and-admission operation bounded so a genuinely wedged
|
|
99
|
+
// worker still fails visibly, but do not guess that a busy realm is dead from
|
|
100
|
+
// a shorter probe timeout. A realm that accepted termination explicitly says
|
|
101
|
+
// it is closing so the client can safely advance to another generation.
|
|
102
|
+
const FOREGROUND_NODE_LEASE_ADMISSION_TIMEOUT_MS = 10_000;
|
|
103
|
+
const MAX_SHARED_WORKER_GENERATION_ATTEMPTS = 8;
|
|
104
|
+
const MAX_FOREGROUND_NODE_LEASE_BUSY_ATTEMPTS = 8;
|
|
105
|
+
const FOREGROUND_NODE_LEASE_RETRY_INITIAL_DELAY_MS = 25;
|
|
106
|
+
const FOREGROUND_NODE_LEASE_RETRY_MAX_DELAY_MS = 250;
|
|
107
|
+
const RUNTIME_STARTUP_TIMEOUT_MS = 5 * 60_000;
|
|
108
|
+
const RUNTIME_STARTUP_CLOCK_INTERVAL_MS = 1_000;
|
|
109
|
+
/**
|
|
110
|
+
* A timed-out admission must keep its port alive until the worker retires a
|
|
111
|
+
* possible late lease. Coalesce that background cleanup per physical worker
|
|
112
|
+
* root so callers retrying a wedged open do not retain unbounded ports.
|
|
113
|
+
*/
|
|
114
|
+
const pendingForegroundLeaseCleanups = new Map();
|
|
115
|
+
/**
|
|
116
|
+
* Ask a newly started worker to fetch, compile and instantiate its WASM while the lease,
|
|
117
|
+
* IndexedDB admission and the page's own setup run. Only URL-addressed assets
|
|
118
|
+
* are prefetched: in-memory modules are never cloned twice.
|
|
119
|
+
*/
|
|
120
|
+
function workerWasmPrefetch(runtimeSources) {
|
|
121
|
+
if (runtimeSources?.wasmModule || runtimeSources?.wasmSource)
|
|
122
|
+
return undefined;
|
|
123
|
+
return { runtimeSources };
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* The one physical SharedWorker realm that may own a browser persistence root.
|
|
127
|
+
*
|
|
128
|
+
* Authentication is intentionally not a part of this name. An explicitly
|
|
129
|
+
* named IndexedDB root is durably bound to its owner at open time; putting the
|
|
130
|
+
* owner in the worker name would instead make two workers race to own the same
|
|
131
|
+
* root. Foreground lease acquisition happens before the complete runtime
|
|
132
|
+
* configuration exists, so it must use precisely this same name.
|
|
133
|
+
*/
|
|
134
|
+
export function createBrowserSharedWorkerBaseName(runtimeSources, dbName) {
|
|
135
|
+
return ["jazz-runtime", dbName, createBrowserWorkerAssetScope(runtimeSources)].join(":");
|
|
136
|
+
}
|
|
137
|
+
/** How long a store delete may take before the page gives up on the worker (it tries again later). */
|
|
138
|
+
export const DELETE_STORE_TIMEOUT_MS = 30_000;
|
|
139
|
+
/**
|
|
140
|
+
* Delete `dbName`'s store through its broker worker, without opening it
|
|
141
|
+
* (#5250). `"held"`, deleting nothing, while a tab has it open or another
|
|
142
|
+
* realm owns it. Rejects when the worker fails or doesn't answer in time.
|
|
143
|
+
*/
|
|
144
|
+
export function deleteBrowserStore(runtimeSources, dbName) {
|
|
145
|
+
const workerName = createBrowserSharedWorkerBaseName(runtimeSources, dbName);
|
|
146
|
+
const worker = createBrokerSharedWorker(runtimeSources, `${workerName}:generation-${readWorkerGeneration(workerName)}`);
|
|
147
|
+
const port = worker.port;
|
|
148
|
+
return new Promise((resolve, reject) => {
|
|
149
|
+
const timer = setTimeout(() => {
|
|
150
|
+
finish();
|
|
151
|
+
reject(new Error("Jazz's browser worker didn't answer a store delete in time"));
|
|
152
|
+
}, DELETE_STORE_TIMEOUT_MS);
|
|
153
|
+
const stopWatching = watchBrokerWorkerStart(worker, runtimeSources, (error) => {
|
|
154
|
+
finish();
|
|
155
|
+
reject(error);
|
|
156
|
+
});
|
|
157
|
+
const onMessage = (event) => {
|
|
158
|
+
const answer = event.data;
|
|
159
|
+
if (answer?.type === "delete-store-result") {
|
|
160
|
+
finish();
|
|
161
|
+
// A tab in the back/forward cache meanwhile must not come back to it.
|
|
162
|
+
if (answer.outcome === "deleted")
|
|
163
|
+
renewBrowserStoreGeneration(dbName);
|
|
164
|
+
resolve(answer.outcome);
|
|
165
|
+
}
|
|
166
|
+
else if (answer?.type === "delete-store-error") {
|
|
167
|
+
finish();
|
|
168
|
+
reject(deserializeBrowserRelayError(answer.error));
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
function finish() {
|
|
172
|
+
clearTimeout(timer);
|
|
173
|
+
stopWatching();
|
|
174
|
+
port.removeEventListener("message", onMessage);
|
|
175
|
+
port.close();
|
|
176
|
+
}
|
|
177
|
+
port.addEventListener("message", onMessage);
|
|
178
|
+
port.start();
|
|
179
|
+
// Before as well as after: a tab coming back while the delete runs must
|
|
180
|
+
// not reconnect to it. A delete that deletes nothing costs it a reload.
|
|
181
|
+
renewBrowserStoreGeneration(dbName);
|
|
182
|
+
port.postMessage({
|
|
183
|
+
type: "delete-store",
|
|
184
|
+
dbName,
|
|
185
|
+
...(runtimeSources ? { runtimeSources } : {}),
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
function foregroundLeaseCleanupKey(workerName, storageOwner) {
|
|
190
|
+
return `${workerName}\u0000${storageOwner}`;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Lease-only worker connection established before a foreground schema/runtime
|
|
194
|
+
* exists. Its port stays open as the durable owner's liveness witness until
|
|
195
|
+
* explicit clean return or retirement.
|
|
196
|
+
*/
|
|
197
|
+
export class SharedBrowserForegroundNodeLease {
|
|
198
|
+
node;
|
|
199
|
+
confirmedTxTime;
|
|
200
|
+
leaseId;
|
|
201
|
+
workerRealmId;
|
|
202
|
+
worker = null;
|
|
203
|
+
port = null;
|
|
204
|
+
closed = false;
|
|
205
|
+
terminalError = null;
|
|
206
|
+
finishPromise = null;
|
|
207
|
+
finishWaiter = null;
|
|
208
|
+
listeningForFinish = false;
|
|
209
|
+
terminalRequestSent = false;
|
|
210
|
+
constructor(node, confirmedTxTime, leaseId, workerRealmId) {
|
|
211
|
+
this.node = node;
|
|
212
|
+
this.confirmedTxTime = confirmedTxTime;
|
|
213
|
+
this.leaseId = leaseId;
|
|
214
|
+
this.workerRealmId = workerRealmId;
|
|
215
|
+
}
|
|
216
|
+
static async acquire(options) {
|
|
217
|
+
const runtimeSources = resolveBrowserWorkerRuntimeSources(options.runtimeSources);
|
|
218
|
+
const workerName = createBrowserSharedWorkerBaseName(runtimeSources, options.dbName);
|
|
219
|
+
const cleanupKey = foregroundLeaseCleanupKey(workerName, options.storageOwner);
|
|
220
|
+
if (pendingForegroundLeaseCleanups.has(cleanupKey)) {
|
|
221
|
+
throw new Error("Shared browser foreground lease cancellation cleanup is still pending for this database; wait for the previous worker admission to finish");
|
|
222
|
+
}
|
|
223
|
+
const createWorker = (name) => createBrokerSharedWorker(runtimeSources, name);
|
|
224
|
+
// A named SharedWorker constructor can still attach to a realm after that
|
|
225
|
+
// realm has acknowledged termination but before the browser has finished
|
|
226
|
+
// destroying it. Probe before sending an allocation request so a realm
|
|
227
|
+
// that explicitly reports it is closing can be skipped without creating
|
|
228
|
+
// an orphan-risking durable operation in it.
|
|
229
|
+
const admissionDeadline = Date.now() + FOREGROUND_NODE_LEASE_ADMISSION_TIMEOUT_MS;
|
|
230
|
+
let generation = readWorkerGeneration(workerName);
|
|
231
|
+
let busyAttempt = 0;
|
|
232
|
+
let lastBusyMessage = null;
|
|
233
|
+
for (let generationAttempt = 0; generationAttempt < MAX_SHARED_WORKER_GENERATION_ATTEMPTS; generationAttempt += 1) {
|
|
234
|
+
while (true) {
|
|
235
|
+
const remainingAdmissionMs = admissionDeadline - Date.now();
|
|
236
|
+
if (remainingAdmissionMs <= 0) {
|
|
237
|
+
throw new Error(lastBusyMessage ?? "Shared browser runtime did not issue a foreground node lease");
|
|
238
|
+
}
|
|
239
|
+
const worker = createWorker(`${workerName}:generation-${generation}`);
|
|
240
|
+
const outcome = await this.acquireFromWorkerGeneration(worker, options, cleanupKey, crypto.randomUUID(), remainingAdmissionMs, workerWasmPrefetch(runtimeSources), runtimeSources);
|
|
241
|
+
if (outcome.type === "ready")
|
|
242
|
+
return outcome.lease;
|
|
243
|
+
if (outcome.type === "worker-closing") {
|
|
244
|
+
// Only an explicitly terminating realm sends this receipt. Idle
|
|
245
|
+
// close is still cancelable by its bootstrap reservation and never
|
|
246
|
+
// forces a generation jump.
|
|
247
|
+
generation = advanceWorkerGeneration(workerName, generation);
|
|
248
|
+
break;
|
|
249
|
+
}
|
|
250
|
+
lastBusyMessage = outcome.message;
|
|
251
|
+
busyAttempt += 1;
|
|
252
|
+
if (busyAttempt >= MAX_FOREGROUND_NODE_LEASE_BUSY_ATTEMPTS) {
|
|
253
|
+
throw new Error(lastBusyMessage);
|
|
254
|
+
}
|
|
255
|
+
const retryDelayMs = Math.min(FOREGROUND_NODE_LEASE_RETRY_INITIAL_DELAY_MS * 2 ** (busyAttempt - 1), FOREGROUND_NODE_LEASE_RETRY_MAX_DELAY_MS, Math.max(0, admissionDeadline - Date.now()));
|
|
256
|
+
if (retryDelayMs <= 0)
|
|
257
|
+
throw new Error(lastBusyMessage);
|
|
258
|
+
await new Promise((resolve) => setTimeout(resolve, retryDelayMs));
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
throw new Error(lastBusyMessage ?? "Shared browser foreground lease worker did not answer after closing");
|
|
262
|
+
}
|
|
263
|
+
/** @internal A context-scoped lease port minted by Inspector control. */
|
|
264
|
+
static async acquireFromPort(port, options) {
|
|
265
|
+
const outcome = await this.acquireFromWorkerGeneration({ port }, options, `inspector:${options.dbName}:${options.storageOwner}`, crypto.randomUUID(), FOREGROUND_NODE_LEASE_ADMISSION_TIMEOUT_MS);
|
|
266
|
+
if (outcome.type !== "ready")
|
|
267
|
+
throw new Error("Inspector worker is no longer available");
|
|
268
|
+
return outcome.lease;
|
|
269
|
+
}
|
|
270
|
+
static acquireFromWorkerGeneration(worker, options, cleanupKey, attemptId, timeoutMs, wasmPrefetch, runtimeSources) {
|
|
271
|
+
const port = worker.port;
|
|
272
|
+
return new Promise((resolve, reject) => {
|
|
273
|
+
let cancellationRequested = false;
|
|
274
|
+
let publicResultSettled = false;
|
|
275
|
+
let cleanupToken = null;
|
|
276
|
+
let admissionTimeout = null;
|
|
277
|
+
const timeoutError = new Error("Shared browser runtime did not issue a foreground node lease");
|
|
278
|
+
const rejectPublic = (error) => {
|
|
279
|
+
if (publicResultSettled)
|
|
280
|
+
return;
|
|
281
|
+
publicResultSettled = true;
|
|
282
|
+
reject(error);
|
|
283
|
+
};
|
|
284
|
+
const beginAdmissionTimeout = () => setTimeout(() => {
|
|
285
|
+
// Do not close the port immediately. The worker might be between the
|
|
286
|
+
// durable allocation and its ready reply; it must observe this cancel
|
|
287
|
+
// and retire such a lease before this acquire rejects. Otherwise a
|
|
288
|
+
// merely slow cold open would burn one node identity per timeout.
|
|
289
|
+
cancellationRequested = true;
|
|
290
|
+
cleanupToken = Symbol("foreground-lease-cleanup");
|
|
291
|
+
pendingForegroundLeaseCleanups.set(cleanupKey, cleanupToken);
|
|
292
|
+
port.postMessage({ type: "cancel-foreground-node-lease" });
|
|
293
|
+
// Public startup remains bounded. The open port and listeners stay
|
|
294
|
+
// alive in the background until the worker observes cancellation and
|
|
295
|
+
// retires any late lease; closing them here would recreate the orphan
|
|
296
|
+
// race this cancellation protocol exists to prevent.
|
|
297
|
+
rejectPublic(timeoutError);
|
|
298
|
+
}, timeoutMs);
|
|
299
|
+
const cleanup = () => {
|
|
300
|
+
if (admissionTimeout)
|
|
301
|
+
clearTimeout(admissionTimeout);
|
|
302
|
+
admissionTimeout = null;
|
|
303
|
+
stopWatchingStart();
|
|
304
|
+
// A successful concurrent admission never owned this retained cleanup.
|
|
305
|
+
// Only its timeout owner may clear the shared key; otherwise it could
|
|
306
|
+
// let a third caller accumulate another orphan-risking port.
|
|
307
|
+
if (cleanupToken !== null &&
|
|
308
|
+
pendingForegroundLeaseCleanups.get(cleanupKey) === cleanupToken) {
|
|
309
|
+
pendingForegroundLeaseCleanups.delete(cleanupKey);
|
|
310
|
+
}
|
|
311
|
+
port.removeEventListener("message", onMessage);
|
|
312
|
+
port.removeEventListener("messageerror", onMessageError);
|
|
313
|
+
};
|
|
314
|
+
const onMessage = (event) => {
|
|
315
|
+
const message = event.data;
|
|
316
|
+
if (message?.type === "foreground-node-lease-worker-alive") {
|
|
317
|
+
if (message.attemptId !== attemptId || admissionTimeout === null)
|
|
318
|
+
return;
|
|
319
|
+
port.postMessage({
|
|
320
|
+
type: "acquire-foreground-node-lease",
|
|
321
|
+
attemptId,
|
|
322
|
+
dbName: options.dbName,
|
|
323
|
+
storageOwner: options.storageOwner,
|
|
324
|
+
});
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
if (message?.type === "foreground-node-lease-worker-closing") {
|
|
328
|
+
if (message.attemptId !== attemptId)
|
|
329
|
+
return;
|
|
330
|
+
cleanup();
|
|
331
|
+
port.close();
|
|
332
|
+
publicResultSettled = true;
|
|
333
|
+
resolve({ type: "worker-closing" });
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
if (message?.type === "foreground-node-lease-busy") {
|
|
337
|
+
cleanup();
|
|
338
|
+
port.close();
|
|
339
|
+
publicResultSettled = true;
|
|
340
|
+
resolve({ type: "busy", message: message.message });
|
|
341
|
+
return;
|
|
342
|
+
}
|
|
343
|
+
if (message?.type === "foreground-node-lease-error") {
|
|
344
|
+
cleanup();
|
|
345
|
+
port.close();
|
|
346
|
+
rejectPublic(deserializeBrowserRelayError(message.error));
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
if (message?.type === "foreground-node-lease-cancelled") {
|
|
350
|
+
cleanup();
|
|
351
|
+
port.close();
|
|
352
|
+
rejectPublic(message.error ? deserializeBrowserRelayError(message.error) : timeoutError);
|
|
353
|
+
return;
|
|
354
|
+
}
|
|
355
|
+
if (message?.type !== "foreground-node-lease-ready")
|
|
356
|
+
return;
|
|
357
|
+
// A cancel can race the ready message. Leave the port open until the
|
|
358
|
+
// worker confirms it has retired this just-issued lease.
|
|
359
|
+
if (cancellationRequested)
|
|
360
|
+
return;
|
|
361
|
+
if (!/^(0|[1-9][0-9]*)$/.test(message.confirmedTxTime)) {
|
|
362
|
+
cleanup();
|
|
363
|
+
rejectPublic(new Error("Shared browser runtime returned an invalid foreground lease high-water"));
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
cleanup();
|
|
367
|
+
const lease = new SharedBrowserForegroundNodeLease(message.node.slice(), BigInt(message.confirmedTxTime), message.leaseId, message.workerRealmId);
|
|
368
|
+
lease.worker = worker;
|
|
369
|
+
lease.port = port;
|
|
370
|
+
publicResultSettled = true;
|
|
371
|
+
resolve({ type: "ready", lease });
|
|
372
|
+
};
|
|
373
|
+
const onMessageError = () => {
|
|
374
|
+
cleanup();
|
|
375
|
+
port.close();
|
|
376
|
+
rejectPublic(new Error("Shared browser foreground lease port message error"));
|
|
377
|
+
};
|
|
378
|
+
// A worker whose script never loaded can hold no lease and will never
|
|
379
|
+
// acknowledge a cancellation, so there is nothing to retain: settle at
|
|
380
|
+
// once (or, after a timeout, release the retained cleanup).
|
|
381
|
+
const stopWatchingStart = watchBrokerWorkerStart(worker, runtimeSources, (error) => {
|
|
382
|
+
cleanup();
|
|
383
|
+
port.close();
|
|
384
|
+
rejectPublic(error);
|
|
385
|
+
});
|
|
386
|
+
port.addEventListener("message", onMessage);
|
|
387
|
+
port.addEventListener("messageerror", onMessageError);
|
|
388
|
+
port.start();
|
|
389
|
+
admissionTimeout = beginAdmissionTimeout();
|
|
390
|
+
port.postMessage({
|
|
391
|
+
type: "probe-foreground-node-lease-worker",
|
|
392
|
+
attemptId,
|
|
393
|
+
...(wasmPrefetch ? { wasmPrefetch } : {}),
|
|
394
|
+
});
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
async returnWithHighWater(highWater) {
|
|
398
|
+
if (this.terminalError)
|
|
399
|
+
throw this.terminalError;
|
|
400
|
+
if (highWater < 0n)
|
|
401
|
+
throw new Error("Invalid foreground transaction high-water");
|
|
402
|
+
await this.finish({
|
|
403
|
+
type: "return-foreground-node-lease",
|
|
404
|
+
confirmedTxTime: highWater.toString(),
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
async retire() {
|
|
408
|
+
if (this.terminalError)
|
|
409
|
+
throw this.terminalError;
|
|
410
|
+
if (this.closed)
|
|
411
|
+
return;
|
|
412
|
+
await this.finish({ type: "retire-foreground-node-lease" });
|
|
413
|
+
}
|
|
414
|
+
abandonAfterWorkerFailure(error) {
|
|
415
|
+
if (this.terminalError)
|
|
416
|
+
return;
|
|
417
|
+
this.terminalError = error;
|
|
418
|
+
this.finishWaiter?.reject(error);
|
|
419
|
+
this.finishWaiter = null;
|
|
420
|
+
if (this.closed || !this.port)
|
|
421
|
+
return;
|
|
422
|
+
this.listenForFinish();
|
|
423
|
+
// A quiesced return may already have committed. Retain its one outcome;
|
|
424
|
+
// another command cannot retrospectively retire an identity already reused.
|
|
425
|
+
if (this.terminalRequestSent)
|
|
426
|
+
return;
|
|
427
|
+
this.terminalRequestSent = true;
|
|
428
|
+
try {
|
|
429
|
+
this.port.postMessage({ type: "retire-foreground-node-lease" });
|
|
430
|
+
}
|
|
431
|
+
catch {
|
|
432
|
+
this.closeFinishPort();
|
|
433
|
+
}
|
|
434
|
+
// Do not close after posting: WebKit can discard a queued retirement.
|
|
435
|
+
// The late result only releases this background witness, not durable success.
|
|
436
|
+
}
|
|
437
|
+
releaseAfterStorageReset(reason) {
|
|
438
|
+
this.failFinish(reason);
|
|
439
|
+
}
|
|
440
|
+
releaseAfterWorkerReplacement(reason) {
|
|
441
|
+
// The foreground has quiesced and the fenced successor owns persistence.
|
|
442
|
+
// Never return this identity as reusable through a dead predecessor port.
|
|
443
|
+
this.failFinish(reason);
|
|
444
|
+
}
|
|
445
|
+
failFinish(error) {
|
|
446
|
+
this.terminalError ??= error;
|
|
447
|
+
this.finishWaiter?.reject(this.terminalError);
|
|
448
|
+
this.closeFinishPort();
|
|
449
|
+
}
|
|
450
|
+
finish(message) {
|
|
451
|
+
if (this.terminalError)
|
|
452
|
+
return Promise.reject(this.terminalError);
|
|
453
|
+
if (this.closed)
|
|
454
|
+
return Promise.reject(new Error("Shared browser foreground lease is already closed"));
|
|
455
|
+
if (this.finishPromise)
|
|
456
|
+
return this.finishPromise;
|
|
457
|
+
const port = this.port;
|
|
458
|
+
if (!port)
|
|
459
|
+
return Promise.reject(new Error("Shared browser foreground lease port is unavailable"));
|
|
460
|
+
this.listenForFinish();
|
|
461
|
+
this.finishPromise = new Promise((resolve, reject) => {
|
|
462
|
+
this.finishWaiter = { resolve, reject };
|
|
463
|
+
});
|
|
464
|
+
this.terminalRequestSent = true;
|
|
465
|
+
try {
|
|
466
|
+
port.postMessage(message);
|
|
467
|
+
}
|
|
468
|
+
catch (error) {
|
|
469
|
+
this.failFinish(toError(error));
|
|
470
|
+
}
|
|
471
|
+
return this.finishPromise;
|
|
472
|
+
}
|
|
473
|
+
listenForFinish() {
|
|
474
|
+
if (this.listeningForFinish)
|
|
475
|
+
return;
|
|
476
|
+
this.listeningForFinish = true;
|
|
477
|
+
this.port?.addEventListener("message", this.onFinishResult);
|
|
478
|
+
this.port?.addEventListener("messageerror", this.onFinishError);
|
|
479
|
+
}
|
|
480
|
+
onFinishResult = (event) => {
|
|
481
|
+
const result = event.data;
|
|
482
|
+
if (result?.type !== "foreground-node-lease-result")
|
|
483
|
+
return;
|
|
484
|
+
if (result.error)
|
|
485
|
+
this.failFinish(deserializeBrowserRelayError(result.error));
|
|
486
|
+
else {
|
|
487
|
+
this.finishWaiter?.resolve();
|
|
488
|
+
this.closeFinishPort();
|
|
489
|
+
}
|
|
490
|
+
};
|
|
491
|
+
onFinishError = () => {
|
|
492
|
+
this.failFinish(new Error("Shared browser foreground lease port message error"));
|
|
493
|
+
};
|
|
494
|
+
closeFinishPort() {
|
|
495
|
+
this.finishWaiter = null;
|
|
496
|
+
this.closed = true;
|
|
497
|
+
this.port?.removeEventListener("message", this.onFinishResult);
|
|
498
|
+
this.port?.removeEventListener("messageerror", this.onFinishError);
|
|
499
|
+
this.worker?.port.close();
|
|
500
|
+
this.port = null;
|
|
501
|
+
this.worker = null;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
export class SharedBrowserWorkerConnection {
|
|
505
|
+
callbacks;
|
|
506
|
+
worker = null;
|
|
507
|
+
readyPromise;
|
|
508
|
+
initialConfigurationAdmissionRejected = false;
|
|
509
|
+
/** Why the worker refused this tab for now: another tab holds the store. */
|
|
510
|
+
heldByAnotherTab = false;
|
|
511
|
+
/** The worker refused this tab because a newer build of the app has the store open. */
|
|
512
|
+
olderThanStore = false;
|
|
513
|
+
readyError = null;
|
|
514
|
+
connection = null;
|
|
515
|
+
closed = false;
|
|
516
|
+
workerName;
|
|
517
|
+
connectedGeneration = null;
|
|
518
|
+
cancelBootstrap = null;
|
|
519
|
+
/** Lets go of this connection's liveness lock (see `holdLivenessLock`). */
|
|
520
|
+
releaseLivenessLock = null;
|
|
521
|
+
dbName;
|
|
522
|
+
/** The store's incarnation when the page left for the back/forward cache. */
|
|
523
|
+
storeGenerationWhenLeft = null;
|
|
524
|
+
constructor(runtime, options, fingerprint, callbacks) {
|
|
525
|
+
this.callbacks = callbacks;
|
|
526
|
+
// A physical database namespace has exactly one broker realm for a given
|
|
527
|
+
// worker asset. The physical namespace already includes the complete
|
|
528
|
+
// app/environment/auth scope, so different accounts intentionally reach
|
|
529
|
+
// separate workers and caches while same-scope tabs share one realm.
|
|
530
|
+
const runtimeSources = resolveBrowserWorkerRuntimeSources(options.runtimeSources);
|
|
531
|
+
const workerName = createBrowserSharedWorkerBaseName(runtimeSources, options.dbName);
|
|
532
|
+
this.workerName = workerName;
|
|
533
|
+
this.dbName = options.dbName;
|
|
534
|
+
const createWorker = (name) => createBrokerSharedWorker(runtimeSources, name);
|
|
535
|
+
// Retain admission failures as state rather than leaving a process-wide
|
|
536
|
+
// bootstrap promise rejected. The manager converts this state back into
|
|
537
|
+
// the caller's `all()`/`wait()` rejection at its operation boundary; a
|
|
538
|
+
// tab which has not yet installed one must never produce an ambient
|
|
539
|
+
// unhandled-rejection event merely because its durable root is owned by
|
|
540
|
+
// another account.
|
|
541
|
+
this.readyPromise = this.connect(runtime, { ...options, runtimeSources }, fingerprint, workerName, createWorker).then(() => undefined, (error) => {
|
|
542
|
+
this.readyError = toError(error);
|
|
543
|
+
this.releaseLivenessLock?.();
|
|
544
|
+
callbacks.onFailure(this.readyError);
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Hold a Web Lock for as long as this page lives, and name it to the
|
|
549
|
+
* worker: the browser releases it when the page goes away without a word
|
|
550
|
+
* (closed, crashed, discarded), and the worker then detaches this tab, so
|
|
551
|
+
* a tab waiting for this store under another sign-in gets in.
|
|
552
|
+
*
|
|
553
|
+
* Connecting doesn't wait for the grant, and the tab names the lock to the
|
|
554
|
+
* worker only once it holds it (`announceLivenessLock`): a worker that
|
|
555
|
+
* asked for it first would be granted it at once and drop a live tab.
|
|
556
|
+
*/
|
|
557
|
+
holdLivenessLock() {
|
|
558
|
+
const locks = globalThis.navigator?.locks;
|
|
559
|
+
if (!locks)
|
|
560
|
+
return undefined;
|
|
561
|
+
const name = `jazz-tab-alive:${crypto.randomUUID()}`;
|
|
562
|
+
let release;
|
|
563
|
+
const released = new Promise((resolve) => (release = resolve));
|
|
564
|
+
this.releaseLivenessLock = release;
|
|
565
|
+
const granted = new Promise((resolve, reject) => {
|
|
566
|
+
locks
|
|
567
|
+
.request(name, () => {
|
|
568
|
+
resolve();
|
|
569
|
+
return released;
|
|
570
|
+
})
|
|
571
|
+
.catch(reject);
|
|
572
|
+
});
|
|
573
|
+
granted.catch(() => undefined);
|
|
574
|
+
return { name, granted };
|
|
575
|
+
}
|
|
576
|
+
/** Name the held liveness lock to the worker that admitted this tab on `port`. */
|
|
577
|
+
announceLivenessLock(lock, port) {
|
|
578
|
+
void lock.granted.then(() => {
|
|
579
|
+
if (this.closed || this.worker?.port !== port)
|
|
580
|
+
return;
|
|
581
|
+
port.postMessage({
|
|
582
|
+
type: "liveness-lock",
|
|
583
|
+
name: lock.name,
|
|
584
|
+
});
|
|
585
|
+
}, () => undefined);
|
|
586
|
+
}
|
|
587
|
+
async connect(runtime, options, fingerprint, workerName, createWorker) {
|
|
588
|
+
const livenessLock = this.holdLivenessLock();
|
|
589
|
+
let generation = readWorkerGeneration(workerName);
|
|
590
|
+
for (let attempt = 0; attempt < MAX_SHARED_WORKER_GENERATION_ATTEMPTS; attempt += 1) {
|
|
591
|
+
if (this.closed)
|
|
592
|
+
return;
|
|
593
|
+
const generationName = `${workerName}:generation-${generation}`;
|
|
594
|
+
const outcome = await this.connectOnce(runtime, options, fingerprint, generationName, createWorker);
|
|
595
|
+
if (outcome.error)
|
|
596
|
+
throw outcome.error;
|
|
597
|
+
if (this.closed)
|
|
598
|
+
return;
|
|
599
|
+
if (outcome.connected) {
|
|
600
|
+
this.connectedGeneration = generation;
|
|
601
|
+
if (livenessLock && this.worker)
|
|
602
|
+
this.announceLivenessLock(livenessLock, this.worker.port);
|
|
603
|
+
return;
|
|
604
|
+
}
|
|
605
|
+
generation = advanceWorkerGeneration(workerName, generation);
|
|
606
|
+
}
|
|
607
|
+
throw new Error("Shared browser runtime did not answer after its previous realm closed");
|
|
608
|
+
}
|
|
609
|
+
connectOnce(runtime, options, fingerprint, workerName, createWorker) {
|
|
610
|
+
const worker = createWorker(workerName);
|
|
611
|
+
this.worker = worker;
|
|
612
|
+
const port = worker.port;
|
|
613
|
+
port.start();
|
|
614
|
+
return new Promise((resolve) => {
|
|
615
|
+
let settled = false;
|
|
616
|
+
let cancelled = false;
|
|
617
|
+
let closingLatePeer = false;
|
|
618
|
+
let lastTick = Date.now();
|
|
619
|
+
// A delayed alive reply is not evidence that this realm released its
|
|
620
|
+
// physical database lock. Only worker-closing authorizes a generation
|
|
621
|
+
// change; apply the bounded startup grace even before the first reply.
|
|
622
|
+
let deadline = lastTick + RUNTIME_STARTUP_TIMEOUT_MS;
|
|
623
|
+
let suspended = typeof document !== "undefined" && document.hidden;
|
|
624
|
+
let bootstrapTimer;
|
|
625
|
+
const settle = (outcome) => {
|
|
626
|
+
if (settled)
|
|
627
|
+
return;
|
|
628
|
+
settled = true;
|
|
629
|
+
stopClock();
|
|
630
|
+
if (this.cancelBootstrap === cancelForShutdown)
|
|
631
|
+
this.cancelBootstrap = null;
|
|
632
|
+
resolve(outcome);
|
|
633
|
+
};
|
|
634
|
+
const cancel = (outcome) => {
|
|
635
|
+
if (settled)
|
|
636
|
+
return;
|
|
637
|
+
cancelled = true;
|
|
638
|
+
settle(outcome);
|
|
639
|
+
// Keep the listener until the worker fences admission or publishes a
|
|
640
|
+
// late peer. Public readiness/shutdown must not await this cleanup.
|
|
641
|
+
if (this.worker === worker)
|
|
642
|
+
this.worker = null;
|
|
643
|
+
try {
|
|
644
|
+
port.postMessage({
|
|
645
|
+
type: "cancel-runtime-bootstrap",
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
catch {
|
|
649
|
+
cleanup();
|
|
650
|
+
port.close();
|
|
651
|
+
}
|
|
652
|
+
};
|
|
653
|
+
const cancelForShutdown = () => cancel({
|
|
654
|
+
connected: false,
|
|
655
|
+
error: new Error("Shared browser runtime connection is closed"),
|
|
656
|
+
});
|
|
657
|
+
this.cancelBootstrap = cancelForShutdown;
|
|
658
|
+
const refreshGrace = () => {
|
|
659
|
+
lastTick = Date.now();
|
|
660
|
+
deadline = lastTick + RUNTIME_STARTUP_TIMEOUT_MS;
|
|
661
|
+
};
|
|
662
|
+
const onVisibilityChange = () => {
|
|
663
|
+
const hidden = typeof document !== "undefined" && document.hidden;
|
|
664
|
+
if (suspended && !hidden)
|
|
665
|
+
refreshGrace();
|
|
666
|
+
suspended = hidden;
|
|
667
|
+
};
|
|
668
|
+
const onPageShow = () => refreshGrace();
|
|
669
|
+
const tick = () => {
|
|
670
|
+
const now = Date.now();
|
|
671
|
+
// A delayed task cannot distinguish a dead worker from a suspended
|
|
672
|
+
// page. Give a resumed page one fresh complete admission grace.
|
|
673
|
+
if (suspended || now - lastTick > RUNTIME_STARTUP_CLOCK_INTERVAL_MS * 2)
|
|
674
|
+
refreshGrace();
|
|
675
|
+
lastTick = now;
|
|
676
|
+
if (now >= deadline) {
|
|
677
|
+
cancel({
|
|
678
|
+
connected: false,
|
|
679
|
+
error: new BrowserWorkerUnresponsiveError("Shared browser runtime did not finish initialization within five minutes"),
|
|
680
|
+
});
|
|
681
|
+
return;
|
|
682
|
+
}
|
|
683
|
+
bootstrapTimer = setTimeout(tick, Math.min(RUNTIME_STARTUP_CLOCK_INTERVAL_MS, deadline - now));
|
|
684
|
+
};
|
|
685
|
+
const stopClock = () => {
|
|
686
|
+
clearTimeout(bootstrapTimer);
|
|
687
|
+
bootstrapTimer = undefined;
|
|
688
|
+
if (typeof document !== "undefined")
|
|
689
|
+
document.removeEventListener("visibilitychange", onVisibilityChange);
|
|
690
|
+
if (typeof window !== "undefined")
|
|
691
|
+
window.removeEventListener("pageshow", onPageShow);
|
|
692
|
+
};
|
|
693
|
+
const onMessage = (event) => {
|
|
694
|
+
if (cancelled) {
|
|
695
|
+
if (event.data?.type === "runtime-ready") {
|
|
696
|
+
if (closingLatePeer)
|
|
697
|
+
return;
|
|
698
|
+
closingLatePeer = true;
|
|
699
|
+
port.postMessage({
|
|
700
|
+
type: "close",
|
|
701
|
+
id: 0,
|
|
702
|
+
releaseContext: true,
|
|
703
|
+
});
|
|
704
|
+
return;
|
|
705
|
+
}
|
|
706
|
+
else if (event.data?.type !== "runtime-bootstrap-cancelled" &&
|
|
707
|
+
event.data?.type !== "runtime-error" &&
|
|
708
|
+
event.data?.type !== "worker-closing" &&
|
|
709
|
+
!(event.data?.type === "result" && event.data.id === 0))
|
|
710
|
+
return;
|
|
711
|
+
cleanup();
|
|
712
|
+
port.close();
|
|
713
|
+
return;
|
|
714
|
+
}
|
|
715
|
+
// Liveness is not completed initialization. A first or repeated
|
|
716
|
+
// alive reply must not restart the single startup budget.
|
|
717
|
+
if (event.data?.type === "worker-alive")
|
|
718
|
+
return;
|
|
719
|
+
if (event.data?.type === "runtime-error") {
|
|
720
|
+
cleanup();
|
|
721
|
+
port.close();
|
|
722
|
+
if (this.worker === worker)
|
|
723
|
+
this.worker = null;
|
|
724
|
+
const error = deserializeBrowserRelayError(event.data.error);
|
|
725
|
+
this.olderThanStore = error.message === BROWSER_STORE_OPEN_WITH_NEWER_BUILD;
|
|
726
|
+
this.heldByAnotherTab =
|
|
727
|
+
error.message === BROWSER_STORE_HELD_BY_ANOTHER_SIGN_IN
|
|
728
|
+
? "sign-in"
|
|
729
|
+
: error.message === BROWSER_STORE_HELD_BY_ANOTHER_BUILD || this.olderThanStore
|
|
730
|
+
? "build"
|
|
731
|
+
: false;
|
|
732
|
+
this.initialConfigurationAdmissionRejected =
|
|
733
|
+
error.message === "incompatible persistent browser configuration" ||
|
|
734
|
+
this.heldByAnotherTab !== false;
|
|
735
|
+
settle({ connected: false, error });
|
|
736
|
+
return;
|
|
737
|
+
}
|
|
738
|
+
if (event.data?.type === "worker-closing") {
|
|
739
|
+
cleanup();
|
|
740
|
+
port.close();
|
|
741
|
+
if (this.worker === worker)
|
|
742
|
+
this.worker = null;
|
|
743
|
+
settle({ connected: false });
|
|
744
|
+
return;
|
|
745
|
+
}
|
|
746
|
+
if (event.data?.type !== "runtime-ready")
|
|
747
|
+
return;
|
|
748
|
+
cleanup();
|
|
749
|
+
// The installed follower owns liveness from this synchronous handoff.
|
|
750
|
+
if (this.cancelBootstrap === cancelForShutdown)
|
|
751
|
+
this.cancelBootstrap = null;
|
|
752
|
+
const connection = new MessagePortBrowserFollowerConnection(runtime, port, options.sessionClaims, options.dbName, {
|
|
753
|
+
onAuthFailure: this.callbacks.onAuthFailure,
|
|
754
|
+
onAuthRestored: this.callbacks.onAuthRestored,
|
|
755
|
+
onExplicitOfflineChange: this.callbacks.onExplicitOfflineChange,
|
|
756
|
+
onRemoteLinkChange: this.callbacks.onRemoteLinkChange,
|
|
757
|
+
onFailure: this.callbacks.onFailure,
|
|
758
|
+
// Each tab that hears of a reset records it, for the tabs in the
|
|
759
|
+
// back/forward cache that don't (see `storeChangedSinceLeaving`).
|
|
760
|
+
onStorageReset: (resetId) => {
|
|
761
|
+
renewBrowserStoreGeneration(this.dbName);
|
|
762
|
+
this.callbacks.onStorageReset?.(resetId);
|
|
763
|
+
},
|
|
764
|
+
onStorageInvalidated: () => {
|
|
765
|
+
renewBrowserStoreGeneration(this.dbName);
|
|
766
|
+
this.callbacks.onStorageInvalidated?.();
|
|
767
|
+
},
|
|
768
|
+
onNewerBuild: this.callbacks.onNewerBuild,
|
|
769
|
+
}, options.logLevel === "trace");
|
|
770
|
+
this.connection = connection;
|
|
771
|
+
void connection.ready().then(() => settle({ connected: true }), (error) => {
|
|
772
|
+
port.close();
|
|
773
|
+
if (this.connection === connection)
|
|
774
|
+
this.connection = null;
|
|
775
|
+
if (this.worker === worker)
|
|
776
|
+
this.worker = null;
|
|
777
|
+
settle({
|
|
778
|
+
connected: false,
|
|
779
|
+
error: toError(error),
|
|
780
|
+
});
|
|
781
|
+
});
|
|
782
|
+
};
|
|
783
|
+
const onMessageError = () => {
|
|
784
|
+
cleanup();
|
|
785
|
+
port.close();
|
|
786
|
+
if (this.worker === worker)
|
|
787
|
+
this.worker = null;
|
|
788
|
+
settle({
|
|
789
|
+
connected: false,
|
|
790
|
+
error: new Error("Shared browser runtime port message error"),
|
|
791
|
+
});
|
|
792
|
+
};
|
|
793
|
+
const cleanup = () => {
|
|
794
|
+
stopClock();
|
|
795
|
+
stopWatchingStart();
|
|
796
|
+
port.removeEventListener("message", onMessage);
|
|
797
|
+
port.removeEventListener("messageerror", onMessageError);
|
|
798
|
+
};
|
|
799
|
+
// A realm that never ran admits nobody and acknowledges nothing: fail
|
|
800
|
+
// admission, or release a cancelled bootstrap's retained port.
|
|
801
|
+
const stopWatchingStart = watchBrokerWorkerStart(worker, options.runtimeSources, (error) => {
|
|
802
|
+
cleanup();
|
|
803
|
+
port.close();
|
|
804
|
+
if (this.worker === worker)
|
|
805
|
+
this.worker = null;
|
|
806
|
+
settle({ connected: false, error });
|
|
807
|
+
});
|
|
808
|
+
port.addEventListener("message", onMessage);
|
|
809
|
+
port.addEventListener("messageerror", onMessageError);
|
|
810
|
+
if (typeof document !== "undefined")
|
|
811
|
+
document.addEventListener("visibilitychange", onVisibilityChange);
|
|
812
|
+
if (typeof window !== "undefined")
|
|
813
|
+
window.addEventListener("pageshow", onPageShow);
|
|
814
|
+
bootstrapTimer = setTimeout(tick, 1_000);
|
|
815
|
+
try {
|
|
816
|
+
port.postMessage({
|
|
817
|
+
type: "connect-runtime",
|
|
818
|
+
tabId: crypto.randomUUID(),
|
|
819
|
+
fingerprint,
|
|
820
|
+
options,
|
|
821
|
+
});
|
|
822
|
+
}
|
|
823
|
+
catch (error) {
|
|
824
|
+
cleanup();
|
|
825
|
+
port.close();
|
|
826
|
+
if (this.worker === worker)
|
|
827
|
+
this.worker = null;
|
|
828
|
+
settle({
|
|
829
|
+
connected: false,
|
|
830
|
+
error: toError(error),
|
|
831
|
+
});
|
|
832
|
+
}
|
|
833
|
+
});
|
|
834
|
+
}
|
|
835
|
+
getWorkerRealmId() {
|
|
836
|
+
return this.connection?.getWorkerRealmId();
|
|
837
|
+
}
|
|
838
|
+
ready() {
|
|
839
|
+
// The constructor-owned promise always settles successfully; this is the
|
|
840
|
+
// operation boundary that turns its retained admission failure back into
|
|
841
|
+
// a normal caller-visible rejection.
|
|
842
|
+
return this.readyPromise.then(() => {
|
|
843
|
+
if (this.readyError)
|
|
844
|
+
throw this.readyError;
|
|
845
|
+
});
|
|
846
|
+
}
|
|
847
|
+
async waitForServerConnection() {
|
|
848
|
+
await this.ready();
|
|
849
|
+
await this.connection?.waitForServerConnection();
|
|
850
|
+
}
|
|
851
|
+
async updateAuth(authJson, sessionClaims) {
|
|
852
|
+
await this.ready();
|
|
853
|
+
this.connection?.updateAuth(authJson, sessionClaims);
|
|
854
|
+
}
|
|
855
|
+
async disconnect() {
|
|
856
|
+
await this.ready();
|
|
857
|
+
await this.connection?.disconnect();
|
|
858
|
+
}
|
|
859
|
+
async reconnect(authJson, sessionClaims) {
|
|
860
|
+
await this.ready();
|
|
861
|
+
await this.connection?.reconnect(authJson, sessionClaims);
|
|
862
|
+
}
|
|
863
|
+
canRetryInitialConfigurationAdmission() {
|
|
864
|
+
return this.initialConfigurationAdmissionRejected;
|
|
865
|
+
}
|
|
866
|
+
waitsForAnotherTab() {
|
|
867
|
+
return this.heldByAnotherTab;
|
|
868
|
+
}
|
|
869
|
+
isOlderThanStore() {
|
|
870
|
+
return this.olderThanStore;
|
|
871
|
+
}
|
|
872
|
+
/**
|
|
873
|
+
* The page is leaving for the back/forward cache: detach from the worker
|
|
874
|
+
* and let go of the liveness lock, now, so the worker doesn't count the
|
|
875
|
+
* page as a live tab while it is cached (see `page-cache`). This
|
|
876
|
+
* connection is closed after; the page opens a new one when it returns.
|
|
877
|
+
* Declines (`false`) unless connected and idle (see the follower's
|
|
878
|
+
* `leaveForPageCache`), or without localStorage to tell, on return,
|
|
879
|
+
* whether the store was reset meanwhile.
|
|
880
|
+
*/
|
|
881
|
+
leaveForPageCache() {
|
|
882
|
+
if (this.closed || this.readyError || !this.connection)
|
|
883
|
+
return false;
|
|
884
|
+
// Without localStorage a tab coming back couldn't tell a reset store:
|
|
885
|
+
// it keeps its connection and its locks, as before.
|
|
886
|
+
const generation = browserStoreGeneration(this.dbName);
|
|
887
|
+
if (generation === null || !this.connection.leaveForPageCache())
|
|
888
|
+
return false;
|
|
889
|
+
this.storeGenerationWhenLeft = generation;
|
|
890
|
+
this.closed = true;
|
|
891
|
+
this.connection = null;
|
|
892
|
+
this.worker = null;
|
|
893
|
+
this.releaseLivenessLock?.();
|
|
894
|
+
return true;
|
|
895
|
+
}
|
|
896
|
+
/**
|
|
897
|
+
* Whether the store was deleted, reset or invalidated (by another tab, or
|
|
898
|
+
* by clearing site data) since this connection left for the back/forward
|
|
899
|
+
* cache: the worker told the tabs attached then, not this one.
|
|
900
|
+
*/
|
|
901
|
+
storeChangedSinceLeaving() {
|
|
902
|
+
return browserStoreGenerationChanged(this.dbName, this.storeGenerationWhenLeft);
|
|
903
|
+
}
|
|
904
|
+
async shutdown() {
|
|
905
|
+
if (this.closed)
|
|
906
|
+
return;
|
|
907
|
+
this.closed = true;
|
|
908
|
+
this.cancelBootstrap?.();
|
|
909
|
+
try {
|
|
910
|
+
await this.connection?.shutdown(true);
|
|
911
|
+
}
|
|
912
|
+
finally {
|
|
913
|
+
this.connection = null;
|
|
914
|
+
this.worker?.port.close();
|
|
915
|
+
this.worker = null;
|
|
916
|
+
this.releaseLivenessLock?.();
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
async waitForPendingWrites() {
|
|
920
|
+
await this.ready();
|
|
921
|
+
await this.connection?.waitForPendingWrites();
|
|
922
|
+
}
|
|
923
|
+
async flushLocal() {
|
|
924
|
+
await this.ready();
|
|
925
|
+
await this.connection?.flushLocal();
|
|
926
|
+
}
|
|
927
|
+
async deleteStorage() {
|
|
928
|
+
await this.ready();
|
|
929
|
+
// Before as well as after (see `storeChangedSinceLeaving`): a tab coming
|
|
930
|
+
// back mid-delete reloads rather than reconnect to what is going.
|
|
931
|
+
renewBrowserStoreGeneration(this.dbName);
|
|
932
|
+
try {
|
|
933
|
+
return await this.connection?.deleteStorage();
|
|
934
|
+
}
|
|
935
|
+
finally {
|
|
936
|
+
renewBrowserStoreGeneration(this.dbName);
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
async storePendingUploads() {
|
|
940
|
+
await this.ready();
|
|
941
|
+
return this.connection?.storePendingUploads();
|
|
942
|
+
}
|
|
943
|
+
async openInspectorControlPort(signal) {
|
|
944
|
+
await waitForInspectorOpening(this.ready(), signal);
|
|
945
|
+
if (!this.connection)
|
|
946
|
+
throw new Error("Shared browser runtime is not connected");
|
|
947
|
+
const port = await this.connection.openInspectorControlPort(signal);
|
|
948
|
+
const generation = this.connectedGeneration;
|
|
949
|
+
if (generation !== null) {
|
|
950
|
+
installWorkerTerminationGenerationHandoff(port, this.workerName, generation);
|
|
951
|
+
}
|
|
952
|
+
return port;
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
/** @internal Keeps an acknowledged inspector restart out of its closing realm. */
|
|
956
|
+
export function installWorkerTerminationGenerationHandoff(port, workerName, generation) {
|
|
957
|
+
port.addEventListener("message", (event) => {
|
|
958
|
+
if (event.data?.type !== "result" || event.data.workerTerminated !== true)
|
|
959
|
+
return;
|
|
960
|
+
advanceWorkerGeneration(workerName, generation);
|
|
961
|
+
});
|
|
962
|
+
}
|
|
963
|
+
function readWorkerGeneration(workerName) {
|
|
964
|
+
try {
|
|
965
|
+
const generation = Number.parseInt(localStorage.getItem(workerGenerationKey(workerName)) ?? "0", 10);
|
|
966
|
+
return Number.isSafeInteger(generation) && generation >= 0 ? generation : 0;
|
|
967
|
+
}
|
|
968
|
+
catch {
|
|
969
|
+
return 0;
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
function advanceWorkerGeneration(workerName, failedGeneration) {
|
|
973
|
+
try {
|
|
974
|
+
const key = workerGenerationKey(workerName);
|
|
975
|
+
const current = readWorkerGeneration(workerName);
|
|
976
|
+
if (current === failedGeneration) {
|
|
977
|
+
localStorage.setItem(key, String(failedGeneration + 1));
|
|
978
|
+
}
|
|
979
|
+
return readWorkerGeneration(workerName);
|
|
980
|
+
}
|
|
981
|
+
catch {
|
|
982
|
+
return failedGeneration + 1;
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
function workerGenerationKey(workerName) {
|
|
986
|
+
return `jazz:shared-worker-generation:${workerName}`;
|
|
987
|
+
}
|
|
988
|
+
//# sourceMappingURL=browser-shared-worker-connection.js.map
|