jazz-tools 2.0.0-alpha.6 → 2.0.0-alpha.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1660) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +178 -2
  3. package/bin/jazz-tools.js +91 -45
  4. package/dist/_dev/inspector-cache-runtime.d.ts +8 -0
  5. package/dist/_dev/inspector-cache-runtime.d.ts.map +1 -0
  6. package/dist/_dev/inspector-cache-runtime.js +237 -0
  7. package/dist/_dev/inspector-cache-runtime.js.map +1 -0
  8. package/dist/_dev/inspector-client.d.ts +15 -0
  9. package/dist/_dev/inspector-client.d.ts.map +1 -0
  10. package/dist/_dev/inspector-client.js +134 -0
  11. package/dist/_dev/inspector-client.js.map +1 -0
  12. package/dist/_dev/native-account-session.d.ts +16 -0
  13. package/dist/_dev/native-account-session.d.ts.map +1 -0
  14. package/dist/_dev/native-account-session.js +51 -0
  15. package/dist/_dev/native-account-session.js.map +1 -0
  16. package/dist/_dev/native-binding-codec.d.ts +9 -0
  17. package/dist/_dev/native-binding-codec.d.ts.map +1 -0
  18. package/dist/_dev/native-binding-codec.js +9 -0
  19. package/dist/_dev/native-binding-codec.js.map +1 -0
  20. package/dist/accounts/account-manager-core.d.ts +28 -0
  21. package/dist/accounts/account-manager-core.d.ts.map +1 -0
  22. package/dist/accounts/account-manager-core.js +179 -0
  23. package/dist/accounts/account-manager-core.js.map +1 -0
  24. package/dist/accounts/browser-host.d.ts +8 -0
  25. package/dist/accounts/browser-host.d.ts.map +1 -0
  26. package/dist/accounts/browser-host.js +16 -0
  27. package/dist/accounts/browser-host.js.map +1 -0
  28. package/dist/accounts/config-capability.d.ts +26 -0
  29. package/dist/accounts/config-capability.d.ts.map +1 -0
  30. package/dist/accounts/config-capability.js +58 -0
  31. package/dist/accounts/config-capability.js.map +1 -0
  32. package/dist/accounts/context.d.ts +14 -0
  33. package/dist/accounts/context.d.ts.map +1 -0
  34. package/dist/accounts/context.js +214 -0
  35. package/dist/accounts/context.js.map +1 -0
  36. package/dist/accounts/create-account-manager.d.ts +52 -0
  37. package/dist/accounts/create-account-manager.d.ts.map +1 -0
  38. package/dist/accounts/create-account-manager.js +17 -0
  39. package/dist/accounts/create-account-manager.js.map +1 -0
  40. package/dist/accounts/enrollment.d.ts +87 -0
  41. package/dist/accounts/enrollment.d.ts.map +1 -0
  42. package/dist/accounts/enrollment.js +305 -0
  43. package/dist/accounts/enrollment.js.map +1 -0
  44. package/dist/accounts/exports.d.ts +4 -0
  45. package/dist/accounts/exports.d.ts.map +1 -0
  46. package/dist/accounts/exports.js +2 -0
  47. package/dist/accounts/exports.js.map +1 -0
  48. package/dist/accounts/local-first.d.ts +14 -0
  49. package/dist/accounts/local-first.d.ts.map +1 -0
  50. package/dist/accounts/local-first.js +62 -0
  51. package/dist/accounts/local-first.js.map +1 -0
  52. package/dist/accounts/persistence.d.ts +34 -0
  53. package/dist/accounts/persistence.d.ts.map +1 -0
  54. package/dist/accounts/persistence.js +299 -0
  55. package/dist/accounts/persistence.js.map +1 -0
  56. package/dist/accounts/registry-client.d.ts +50 -0
  57. package/dist/accounts/registry-client.d.ts.map +1 -0
  58. package/dist/accounts/registry-client.js +108 -0
  59. package/dist/accounts/registry-client.js.map +1 -0
  60. package/dist/accounts/state.d.ts +76 -0
  61. package/dist/accounts/state.d.ts.map +1 -0
  62. package/dist/accounts/state.js +171 -0
  63. package/dist/accounts/state.js.map +1 -0
  64. package/dist/backend/admission.d.ts +18 -0
  65. package/dist/backend/admission.d.ts.map +1 -0
  66. package/dist/backend/admission.js +139 -0
  67. package/dist/backend/admission.js.map +1 -0
  68. package/dist/backend/backend-clients.d.ts +76 -0
  69. package/dist/backend/backend-clients.d.ts.map +1 -0
  70. package/dist/backend/backend-clients.js +237 -0
  71. package/dist/backend/backend-clients.js.map +1 -0
  72. package/dist/backend/backend-issuer.d.ts +6 -0
  73. package/dist/backend/backend-issuer.d.ts.map +1 -0
  74. package/dist/backend/backend-issuer.js +6 -0
  75. package/dist/backend/backend-issuer.js.map +1 -0
  76. package/dist/backend/blobs.d.ts +121 -0
  77. package/dist/backend/blobs.d.ts.map +1 -0
  78. package/dist/backend/blobs.js +123 -0
  79. package/dist/backend/blobs.js.map +1 -0
  80. package/dist/backend/create-jazz-context.d.ts +116 -0
  81. package/dist/backend/create-jazz-context.d.ts.map +1 -0
  82. package/dist/backend/create-jazz-context.js +607 -0
  83. package/dist/backend/create-jazz-context.js.map +1 -0
  84. package/dist/backend/create-jazz-session.d.ts +105 -0
  85. package/dist/backend/create-jazz-session.d.ts.map +1 -0
  86. package/dist/backend/create-jazz-session.js +467 -0
  87. package/dist/backend/create-jazz-session.js.map +1 -0
  88. package/dist/backend/create-jazz.d.ts +405 -0
  89. package/dist/backend/create-jazz.d.ts.map +1 -0
  90. package/dist/backend/create-jazz.js +2731 -0
  91. package/dist/backend/create-jazz.js.map +1 -0
  92. package/dist/backend/early-db.d.ts +29 -0
  93. package/dist/backend/early-db.d.ts.map +1 -0
  94. package/dist/backend/early-db.js +202 -0
  95. package/dist/backend/early-db.js.map +1 -0
  96. package/dist/backend/external-jwt.d.ts +27 -0
  97. package/dist/backend/external-jwt.d.ts.map +1 -0
  98. package/dist/backend/external-jwt.js +380 -0
  99. package/dist/backend/external-jwt.js.map +1 -0
  100. package/dist/backend/from-jwt.d.ts +62 -0
  101. package/dist/backend/from-jwt.d.ts.map +1 -0
  102. package/dist/backend/from-jwt.js +96 -0
  103. package/dist/backend/from-jwt.js.map +1 -0
  104. package/dist/backend/index.d.ts +11 -1
  105. package/dist/backend/index.d.ts.map +1 -1
  106. package/dist/backend/index.js +8 -1
  107. package/dist/backend/index.js.map +1 -1
  108. package/dist/backend/no-account-error.d.ts +23 -0
  109. package/dist/backend/no-account-error.d.ts.map +1 -0
  110. package/dist/backend/no-account-error.js +30 -0
  111. package/dist/backend/no-account-error.js.map +1 -0
  112. package/dist/backend/optional-peer.d.ts +9 -0
  113. package/dist/backend/optional-peer.d.ts.map +1 -0
  114. package/dist/backend/optional-peer.js +24 -0
  115. package/dist/backend/optional-peer.js.map +1 -0
  116. package/dist/backend/request-auth.d.ts +39 -0
  117. package/dist/backend/request-auth.d.ts.map +1 -0
  118. package/dist/backend/request-auth.js +77 -0
  119. package/dist/backend/request-auth.js.map +1 -0
  120. package/dist/backend/session-recheck.d.ts +18 -0
  121. package/dist/backend/session-recheck.d.ts.map +1 -0
  122. package/dist/backend/session-recheck.js +57 -0
  123. package/dist/backend/session-recheck.js.map +1 -0
  124. package/dist/backend/socket-deadline.d.ts +23 -0
  125. package/dist/backend/socket-deadline.d.ts.map +1 -0
  126. package/dist/backend/socket-deadline.js +70 -0
  127. package/dist/backend/socket-deadline.js.map +1 -0
  128. package/dist/backend/vercel-store.d.ts +223 -0
  129. package/dist/backend/vercel-store.d.ts.map +1 -0
  130. package/dist/backend/vercel-store.js +932 -0
  131. package/dist/backend/vercel-store.js.map +1 -0
  132. package/dist/better-auth-adapter/fixtures/permissions.d.ts +2 -0
  133. package/dist/better-auth-adapter/fixtures/permissions.d.ts.map +1 -0
  134. package/dist/better-auth-adapter/fixtures/permissions.js +2 -0
  135. package/dist/better-auth-adapter/fixtures/permissions.js.map +1 -0
  136. package/dist/better-auth-adapter/fixtures/schema.d.ts +69 -0
  137. package/dist/better-auth-adapter/fixtures/schema.d.ts.map +1 -0
  138. package/dist/better-auth-adapter/fixtures/schema.js +84 -0
  139. package/dist/better-auth-adapter/fixtures/schema.js.map +1 -0
  140. package/dist/better-auth-adapter/index.d.ts +13 -0
  141. package/dist/better-auth-adapter/index.d.ts.map +1 -0
  142. package/dist/better-auth-adapter/index.js +366 -0
  143. package/dist/better-auth-adapter/index.js.map +1 -0
  144. package/dist/better-auth-adapter/indexes.d.ts +9 -0
  145. package/dist/better-auth-adapter/indexes.d.ts.map +1 -0
  146. package/dist/better-auth-adapter/indexes.js +40 -0
  147. package/dist/better-auth-adapter/indexes.js.map +1 -0
  148. package/dist/better-auth-adapter/schema.d.ts +49 -0
  149. package/dist/better-auth-adapter/schema.d.ts.map +1 -0
  150. package/dist/better-auth-adapter/schema.js +300 -0
  151. package/dist/better-auth-adapter/schema.js.map +1 -0
  152. package/dist/better-auth-adapter/types.d.ts +13 -0
  153. package/dist/better-auth-adapter/types.d.ts.map +1 -0
  154. package/dist/better-auth-adapter/types.js +2 -0
  155. package/dist/better-auth-adapter/types.js.map +1 -0
  156. package/dist/better-auth-adapter/utils.d.ts +27 -0
  157. package/dist/better-auth-adapter/utils.d.ts.map +1 -0
  158. package/dist/better-auth-adapter/utils.js +189 -0
  159. package/dist/better-auth-adapter/utils.js.map +1 -0
  160. package/dist/browser-benchmark-mode.d.ts +6 -0
  161. package/dist/browser-benchmark-mode.d.ts.map +1 -0
  162. package/dist/browser-benchmark-mode.js +13 -0
  163. package/dist/browser-benchmark-mode.js.map +1 -0
  164. package/dist/classic-api.d.ts +59 -0
  165. package/dist/classic-api.d.ts.map +1 -0
  166. package/dist/classic-api.js +86 -0
  167. package/dist/classic-api.js.map +1 -0
  168. package/dist/cli.d.ts +29 -2
  169. package/dist/cli.d.ts.map +1 -1
  170. package/dist/cli.js +358 -268
  171. package/dist/cli.js.map +1 -1
  172. package/dist/client/index.d.ts +14 -0
  173. package/dist/client/index.d.ts.map +1 -0
  174. package/dist/client/index.js +8 -0
  175. package/dist/client/index.js.map +1 -0
  176. package/dist/cloud/api.d.ts +11 -0
  177. package/dist/cloud/api.d.ts.map +1 -0
  178. package/dist/cloud/api.js +46 -0
  179. package/dist/cloud/api.js.map +1 -0
  180. package/dist/cloud/commands.d.ts +13 -0
  181. package/dist/cloud/commands.d.ts.map +1 -0
  182. package/dist/cloud/commands.js +413 -0
  183. package/dist/cloud/commands.js.map +1 -0
  184. package/dist/cloud/credentials.d.ts +49 -0
  185. package/dist/cloud/credentials.d.ts.map +1 -0
  186. package/dist/cloud/credentials.js +219 -0
  187. package/dist/cloud/credentials.js.map +1 -0
  188. package/dist/cloud/session.d.ts +57 -0
  189. package/dist/cloud/session.d.ts.map +1 -0
  190. package/dist/cloud/session.js +269 -0
  191. package/dist/cloud/session.js.map +1 -0
  192. package/dist/codegen/relation-analyzer.d.ts +5 -12
  193. package/dist/codegen/relation-analyzer.d.ts.map +1 -1
  194. package/dist/codegen/relation-analyzer.js +54 -65
  195. package/dist/codegen/relation-analyzer.js.map +1 -1
  196. package/dist/codegen/schema-reader.d.ts +6 -2
  197. package/dist/codegen/schema-reader.d.ts.map +1 -1
  198. package/dist/codegen/schema-reader.js +129 -98
  199. package/dist/codegen/schema-reader.js.map +1 -1
  200. package/dist/dev/catalogue-api.d.ts +157 -0
  201. package/dist/dev/catalogue-api.d.ts.map +1 -0
  202. package/dist/dev/catalogue-api.js +145 -0
  203. package/dist/dev/catalogue-api.js.map +1 -0
  204. package/dist/dev/catalogue-project.d.ts +150 -0
  205. package/dist/dev/catalogue-project.d.ts.map +1 -0
  206. package/dist/dev/catalogue-project.js +1466 -0
  207. package/dist/dev/catalogue-project.js.map +1 -0
  208. package/dist/dev/catalogue.d.ts +72 -0
  209. package/dist/dev/catalogue.d.ts.map +1 -0
  210. package/dist/dev/catalogue.js +279 -0
  211. package/dist/dev/catalogue.js.map +1 -0
  212. package/dist/dev/dev-server.d.ts +57 -0
  213. package/dist/dev/dev-server.d.ts.map +1 -0
  214. package/dist/dev/dev-server.js +122 -0
  215. package/dist/dev/dev-server.js.map +1 -0
  216. package/dist/dev/index.d.ts +3 -0
  217. package/dist/dev/index.d.ts.map +1 -0
  218. package/dist/dev/index.js +3 -0
  219. package/dist/dev/index.js.map +1 -0
  220. package/dist/dev/inspector-overlay/browser-control-registry.d.ts +10 -0
  221. package/dist/dev/inspector-overlay/browser-control-registry.d.ts.map +1 -0
  222. package/dist/dev/inspector-overlay/browser-control-registry.js +188 -0
  223. package/dist/dev/inspector-overlay/browser-control-registry.js.map +1 -0
  224. package/dist/dev/inspector-overlay/embedded/assets/create-legacy-browser-delegate-X_T_QKCN.js +1 -0
  225. package/dist/dev/inspector-overlay/embedded/assets/esm-7mP3GQX4.js +1 -0
  226. package/dist/dev/inspector-overlay/embedded/assets/esm-BX6IY2Mv.js +1 -0
  227. package/dist/dev/inspector-overlay/embedded/assets/esm-CH5eVyQQ.js +1 -0
  228. package/dist/dev/inspector-overlay/embedded/assets/esm-aRzpnC3u.js +1 -0
  229. package/dist/dev/inspector-overlay/embedded/assets/esm-ezD5H765.js +1 -0
  230. package/dist/dev/inspector-overlay/embedded/assets/esm-k3rsq4Gn.js +1 -0
  231. package/dist/dev/inspector-overlay/embedded/assets/index-C-btvLcw.js +20 -0
  232. package/dist/dev/inspector-overlay/embedded/assets/index-C78Pprka.css +1 -0
  233. package/dist/dev/inspector-overlay/embedded/assets/jazz-broker-worker-CAMcDeUa.js +3 -0
  234. package/dist/dev/inspector-overlay/embedded/assets/jazz-broker-worker-XRRxJUcx.js +23997 -0
  235. package/dist/dev/inspector-overlay/embedded/assets/jazz_wasm-Cc71x_6y.js +1 -0
  236. package/dist/dev/inspector-overlay/embedded/assets/jazz_wasm_bg-KR7h3v27.wasm +0 -0
  237. package/dist/dev/inspector-overlay/embedded/assets/node-foreground-node-lease.browser-Bm3gYjlT.js +1 -0
  238. package/dist/dev/inspector-overlay/embedded/assets/trace-api-B5CaetI0.js +1 -0
  239. package/dist/dev/inspector-overlay/embedded/embedded.html +13 -0
  240. package/dist/dev/inspector-overlay/embedded/favicon.ico +0 -0
  241. package/dist/dev/inspector-overlay/host-bridge.d.ts +8 -0
  242. package/dist/dev/inspector-overlay/host-bridge.d.ts.map +1 -0
  243. package/dist/dev/inspector-overlay/host-bridge.js +136 -0
  244. package/dist/dev/inspector-overlay/host-bridge.js.map +1 -0
  245. package/dist/dev/inspector-overlay/inspector-host-types.d.ts +35 -0
  246. package/dist/dev/inspector-overlay/inspector-host-types.d.ts.map +1 -0
  247. package/dist/dev/inspector-overlay/inspector-host-types.js +10 -0
  248. package/dist/dev/inspector-overlay/inspector-host-types.js.map +1 -0
  249. package/dist/dev/inspector-overlay/loader.d.ts +13 -0
  250. package/dist/dev/inspector-overlay/loader.d.ts.map +1 -0
  251. package/dist/dev/inspector-overlay/loader.js +506 -0
  252. package/dist/dev/inspector-overlay/loader.js.map +1 -0
  253. package/dist/dev/inspector-overlay/serve.d.ts +46 -0
  254. package/dist/dev/inspector-overlay/serve.d.ts.map +1 -0
  255. package/dist/dev/inspector-overlay/serve.js +131 -0
  256. package/dist/dev/inspector-overlay/serve.js.map +1 -0
  257. package/dist/dev/legacy-schema-hash.d.ts +4 -0
  258. package/dist/dev/legacy-schema-hash.d.ts.map +1 -0
  259. package/dist/dev/legacy-schema-hash.js +12 -0
  260. package/dist/dev/legacy-schema-hash.js.map +1 -0
  261. package/dist/dev/migration-graph.d.ts +32 -0
  262. package/dist/dev/migration-graph.d.ts.map +1 -0
  263. package/dist/dev/migration-graph.js +136 -0
  264. package/dist/dev/migration-graph.js.map +1 -0
  265. package/dist/dev/migrations.d.ts +14 -0
  266. package/dist/dev/migrations.d.ts.map +1 -0
  267. package/dist/dev/migrations.js +441 -0
  268. package/dist/dev/migrations.js.map +1 -0
  269. package/dist/dev/schema-utils.d.ts +18 -0
  270. package/dist/dev/schema-utils.d.ts.map +1 -0
  271. package/dist/dev/schema-utils.js +365 -0
  272. package/dist/dev/schema-utils.js.map +1 -0
  273. package/dist/dev/schema-validation.d.ts +5 -0
  274. package/dist/dev/schema-validation.d.ts.map +1 -0
  275. package/dist/dev/schema-validation.js +11 -0
  276. package/dist/dev/schema-validation.js.map +1 -0
  277. package/dist/dev-tools/auto-attach.d.ts +11 -0
  278. package/dist/dev-tools/auto-attach.d.ts.map +1 -0
  279. package/dist/dev-tools/auto-attach.js +26 -0
  280. package/dist/dev-tools/auto-attach.js.map +1 -0
  281. package/dist/drivers/index.d.ts +1 -1
  282. package/dist/drivers/index.d.ts.map +1 -1
  283. package/dist/drivers/index.js.map +1 -1
  284. package/dist/drivers/schema-wire.d.ts +18 -0
  285. package/dist/drivers/schema-wire.d.ts.map +1 -0
  286. package/dist/drivers/schema-wire.js +66 -0
  287. package/dist/drivers/schema-wire.js.map +1 -0
  288. package/dist/drivers/types.d.ts +322 -45
  289. package/dist/drivers/types.d.ts.map +1 -1
  290. package/dist/drivers/types.js +5 -4
  291. package/dist/drivers/types.js.map +1 -1
  292. package/dist/dsl.d.ts +291 -101
  293. package/dist/dsl.d.ts.map +1 -1
  294. package/dist/dsl.js +244 -113
  295. package/dist/dsl.js.map +1 -1
  296. package/dist/e2ee/SODIUM-LICENSE.txt +36 -0
  297. package/dist/e2ee/SODIUM-SOURCES.json +4 -0
  298. package/dist/e2ee/browser.d.ts +18 -0
  299. package/dist/e2ee/browser.d.ts.map +1 -0
  300. package/dist/e2ee/browser.js +111 -0
  301. package/dist/e2ee/browser.js.map +1 -0
  302. package/dist/e2ee/context.d.ts +23 -0
  303. package/dist/e2ee/context.d.ts.map +1 -0
  304. package/dist/e2ee/context.js +49 -0
  305. package/dist/e2ee/context.js.map +1 -0
  306. package/dist/e2ee/crypto.d.ts +10 -0
  307. package/dist/e2ee/crypto.d.ts.map +1 -0
  308. package/dist/e2ee/crypto.js +22 -0
  309. package/dist/e2ee/crypto.js.map +1 -0
  310. package/dist/e2ee/envelope.d.ts +22 -0
  311. package/dist/e2ee/envelope.d.ts.map +1 -0
  312. package/dist/e2ee/envelope.js +52 -0
  313. package/dist/e2ee/envelope.js.map +1 -0
  314. package/dist/e2ee/index.d.ts +14 -0
  315. package/dist/e2ee/index.d.ts.map +1 -0
  316. package/dist/e2ee/index.js +3 -0
  317. package/dist/e2ee/index.js.map +1 -0
  318. package/dist/e2ee/large-value.d.ts +20 -0
  319. package/dist/e2ee/large-value.d.ts.map +1 -0
  320. package/dist/e2ee/large-value.js +204 -0
  321. package/dist/e2ee/large-value.js.map +1 -0
  322. package/dist/e2ee/native.d.ts +18 -0
  323. package/dist/e2ee/native.d.ts.map +1 -0
  324. package/dist/e2ee/native.js +91 -0
  325. package/dist/e2ee/native.js.map +1 -0
  326. package/dist/e2ee/record-frame.d.ts +3 -0
  327. package/dist/e2ee/record-frame.d.ts.map +1 -0
  328. package/dist/e2ee/record-frame.js +18 -0
  329. package/dist/e2ee/record-frame.js.map +1 -0
  330. package/dist/e2ee/signer.d.ts +10 -0
  331. package/dist/e2ee/signer.d.ts.map +1 -0
  332. package/dist/e2ee/signer.js +54 -0
  333. package/dist/e2ee/signer.js.map +1 -0
  334. package/dist/e2ee/sodium-browser.d.ts +2 -0
  335. package/dist/e2ee/sodium-browser.d.ts.map +1 -0
  336. package/dist/e2ee/sodium-browser.js +3432 -0
  337. package/dist/e2ee/sodium.d.ts +20 -0
  338. package/dist/e2ee/sodium.d.ts.map +1 -0
  339. package/dist/e2ee/sodium.js +165 -0
  340. package/dist/e2ee/sodium.js.map +1 -0
  341. package/dist/e2ee/types.d.ts +92 -0
  342. package/dist/e2ee/types.d.ts.map +1 -0
  343. package/dist/e2ee/types.js +2 -0
  344. package/dist/e2ee/types.js.map +1 -0
  345. package/dist/effect/backend/index.d.ts +8 -0
  346. package/dist/effect/backend/index.d.ts.map +1 -0
  347. package/dist/effect/backend/index.js +8 -0
  348. package/dist/effect/backend/index.js.map +1 -0
  349. package/dist/effect/errors.d.ts +53 -0
  350. package/dist/effect/errors.d.ts.map +1 -0
  351. package/dist/effect/errors.js +61 -0
  352. package/dist/effect/errors.js.map +1 -0
  353. package/dist/effect/index.d.ts +9 -0
  354. package/dist/effect/index.d.ts.map +1 -0
  355. package/dist/effect/index.js +9 -0
  356. package/dist/effect/index.js.map +1 -0
  357. package/dist/effect/jazz-backend.d.ts +69 -0
  358. package/dist/effect/jazz-backend.d.ts.map +1 -0
  359. package/dist/effect/jazz-backend.js +92 -0
  360. package/dist/effect/jazz-backend.js.map +1 -0
  361. package/dist/effect/jazz.d.ts +122 -0
  362. package/dist/effect/jazz.d.ts.map +1 -0
  363. package/dist/effect/jazz.js +159 -0
  364. package/dist/effect/jazz.js.map +1 -0
  365. package/dist/expo/auth-secret-store.d.ts +37 -0
  366. package/dist/expo/auth-secret-store.d.ts.map +1 -0
  367. package/dist/expo/auth-secret-store.js +139 -0
  368. package/dist/expo/auth-secret-store.js.map +1 -0
  369. package/dist/expo/create-account-manager.d.ts +28 -0
  370. package/dist/expo/create-account-manager.d.ts.map +1 -0
  371. package/dist/expo/create-account-manager.js +35 -0
  372. package/dist/expo/create-account-manager.js.map +1 -0
  373. package/dist/expo/create-jazz-session.d.ts +35 -0
  374. package/dist/expo/create-jazz-session.d.ts.map +1 -0
  375. package/dist/expo/create-jazz-session.js +39 -0
  376. package/dist/expo/create-jazz-session.js.map +1 -0
  377. package/dist/expo/index.d.ts +16 -0
  378. package/dist/expo/index.d.ts.map +1 -0
  379. package/dist/expo/index.js +14 -0
  380. package/dist/expo/index.js.map +1 -0
  381. package/dist/expo/polyfills.d.ts +2 -0
  382. package/dist/expo/polyfills.d.ts.map +1 -0
  383. package/dist/expo/polyfills.js +5 -0
  384. package/dist/expo/polyfills.js.map +1 -0
  385. package/dist/expo/provider.d.ts +7 -0
  386. package/dist/expo/provider.d.ts.map +1 -0
  387. package/dist/expo/provider.js +10 -0
  388. package/dist/expo/provider.js.map +1 -0
  389. package/dist/expo/session.d.ts +10 -0
  390. package/dist/expo/session.d.ts.map +1 -0
  391. package/dist/expo/session.js +5 -0
  392. package/dist/expo/session.js.map +1 -0
  393. package/dist/expo/use-local-first-auth.d.ts +12 -0
  394. package/dist/expo/use-local-first-auth.d.ts.map +1 -0
  395. package/dist/expo/use-local-first-auth.js +13 -0
  396. package/dist/expo/use-local-first-auth.js.map +1 -0
  397. package/dist/index.d.ts +24 -7
  398. package/dist/index.d.ts.map +1 -1
  399. package/dist/index.js +19 -8
  400. package/dist/index.js.map +1 -1
  401. package/dist/internal/inspector-query.d.ts +6 -0
  402. package/dist/internal/inspector-query.d.ts.map +1 -0
  403. package/dist/internal/inspector-query.js +20 -0
  404. package/dist/internal/inspector-query.js.map +1 -0
  405. package/dist/ir.d.ts +139 -115
  406. package/dist/ir.d.ts.map +1 -1
  407. package/dist/ir.js +496 -1
  408. package/dist/ir.js.map +1 -1
  409. package/dist/local-first/index.d.ts +16 -0
  410. package/dist/local-first/index.d.ts.map +1 -0
  411. package/dist/local-first/index.js +15 -0
  412. package/dist/local-first/index.js.map +1 -0
  413. package/dist/local-first-auth/browser.d.ts +18 -0
  414. package/dist/local-first-auth/browser.d.ts.map +1 -0
  415. package/dist/local-first-auth/browser.js +26 -0
  416. package/dist/local-first-auth/browser.js.map +1 -0
  417. package/dist/local-first-auth/encoding.d.ts +10 -0
  418. package/dist/local-first-auth/encoding.d.ts.map +1 -0
  419. package/dist/local-first-auth/encoding.js +38 -0
  420. package/dist/local-first-auth/encoding.js.map +1 -0
  421. package/dist/local-first-auth/identity.d.ts +73 -0
  422. package/dist/local-first-auth/identity.d.ts.map +1 -0
  423. package/dist/local-first-auth/identity.js +258 -0
  424. package/dist/local-first-auth/identity.js.map +1 -0
  425. package/dist/local-first-auth/index.d.ts +6 -0
  426. package/dist/local-first-auth/index.d.ts.map +1 -0
  427. package/dist/local-first-auth/index.js +4 -0
  428. package/dist/local-first-auth/index.js.map +1 -0
  429. package/dist/local-first-auth/passkey.d.ts +22 -0
  430. package/dist/local-first-auth/passkey.d.ts.map +1 -0
  431. package/dist/local-first-auth/passkey.js +116 -0
  432. package/dist/local-first-auth/passkey.js.map +1 -0
  433. package/dist/local-first-auth/recovery-phrase.d.ts +10 -0
  434. package/dist/local-first-auth/recovery-phrase.d.ts.map +1 -0
  435. package/dist/local-first-auth/recovery-phrase.js +59 -0
  436. package/dist/local-first-auth/recovery-phrase.js.map +1 -0
  437. package/dist/local-first-auth/secret.d.ts +25 -0
  438. package/dist/local-first-auth/secret.d.ts.map +1 -0
  439. package/dist/local-first-auth/secret.js +68 -0
  440. package/dist/local-first-auth/secret.js.map +1 -0
  441. package/dist/local-first-auth/server.d.ts +13 -0
  442. package/dist/local-first-auth/server.d.ts.map +1 -0
  443. package/dist/local-first-auth/server.js +32 -0
  444. package/dist/local-first-auth/server.js.map +1 -0
  445. package/dist/local-first-auth/store.d.ts +51 -0
  446. package/dist/local-first-auth/store.d.ts.map +1 -0
  447. package/dist/local-first-auth/store.js +112 -0
  448. package/dist/local-first-auth/store.js.map +1 -0
  449. package/dist/magic-columns.d.ts +34 -0
  450. package/dist/magic-columns.d.ts.map +1 -0
  451. package/dist/magic-columns.js +86 -0
  452. package/dist/magic-columns.js.map +1 -0
  453. package/dist/migration-namespace.d.ts +8 -0
  454. package/dist/migration-namespace.d.ts.map +1 -0
  455. package/dist/migration-namespace.js +9 -0
  456. package/dist/migration-namespace.js.map +1 -0
  457. package/dist/migrations.d.ts +229 -0
  458. package/dist/migrations.d.ts.map +1 -0
  459. package/dist/migrations.js +383 -0
  460. package/dist/migrations.js.map +1 -0
  461. package/dist/observed-jazz-client.d.ts +15 -0
  462. package/dist/observed-jazz-client.d.ts.map +1 -0
  463. package/dist/observed-jazz-client.js +38 -0
  464. package/dist/observed-jazz-client.js.map +1 -0
  465. package/dist/passkey-backup.d.ts +3 -0
  466. package/dist/passkey-backup.d.ts.map +1 -0
  467. package/dist/passkey-backup.js +2 -0
  468. package/dist/passkey-backup.js.map +1 -0
  469. package/dist/passphrase.d.ts +2 -0
  470. package/dist/passphrase.d.ts.map +1 -0
  471. package/dist/passphrase.js +2 -0
  472. package/dist/passphrase.js.map +1 -0
  473. package/dist/permissions/index.d.ts +149 -41
  474. package/dist/permissions/index.d.ts.map +1 -1
  475. package/dist/permissions/index.js +1209 -423
  476. package/dist/permissions/index.js.map +1 -1
  477. package/dist/policy-expr-map.d.ts +15 -0
  478. package/dist/policy-expr-map.d.ts.map +1 -0
  479. package/dist/policy-expr-map.js +45 -0
  480. package/dist/policy-expr-map.js.map +1 -0
  481. package/dist/prosemirror/anchors.d.ts +30 -0
  482. package/dist/prosemirror/anchors.d.ts.map +1 -0
  483. package/dist/prosemirror/anchors.js +28 -0
  484. package/dist/prosemirror/anchors.js.map +1 -0
  485. package/dist/prosemirror/index.d.ts +7 -0
  486. package/dist/prosemirror/index.d.ts.map +1 -0
  487. package/dist/prosemirror/index.js +7 -0
  488. package/dist/prosemirror/index.js.map +1 -0
  489. package/dist/prosemirror/markdown.d.ts +95 -0
  490. package/dist/prosemirror/markdown.d.ts.map +1 -0
  491. package/dist/prosemirror/markdown.js +428 -0
  492. package/dist/prosemirror/markdown.js.map +1 -0
  493. package/dist/prosemirror/overlays.d.ts +69 -0
  494. package/dist/prosemirror/overlays.d.ts.map +1 -0
  495. package/dist/prosemirror/overlays.js +143 -0
  496. package/dist/prosemirror/overlays.js.map +1 -0
  497. package/dist/prosemirror/presence.d.ts +39 -0
  498. package/dist/prosemirror/presence.d.ts.map +1 -0
  499. package/dist/prosemirror/presence.js +88 -0
  500. package/dist/prosemirror/presence.js.map +1 -0
  501. package/dist/prosemirror/sync.d.ts +60 -0
  502. package/dist/prosemirror/sync.d.ts.map +1 -0
  503. package/dist/prosemirror/sync.js +174 -0
  504. package/dist/prosemirror/sync.js.map +1 -0
  505. package/dist/prosemirror/text-map.d.ts +21 -0
  506. package/dist/prosemirror/text-map.d.ts.map +1 -0
  507. package/dist/prosemirror/text-map.js +85 -0
  508. package/dist/prosemirror/text-map.js.map +1 -0
  509. package/dist/provenance-guidance.d.ts +3 -0
  510. package/dist/provenance-guidance.d.ts.map +1 -0
  511. package/dist/provenance-guidance.js +19 -0
  512. package/dist/provenance-guidance.js.map +1 -0
  513. package/dist/react/create-jazz-client.d.ts +2 -10
  514. package/dist/react/create-jazz-client.d.ts.map +1 -1
  515. package/dist/react/create-jazz-client.js +1 -25
  516. package/dist/react/create-jazz-client.js.map +1 -1
  517. package/dist/react/devtools-auto-attach.d.ts +2 -0
  518. package/dist/react/devtools-auto-attach.d.ts.map +1 -0
  519. package/dist/react/devtools-auto-attach.js +11 -0
  520. package/dist/react/devtools-auto-attach.js.map +1 -0
  521. package/dist/react/index.d.ts +20 -6
  522. package/dist/react/index.d.ts.map +1 -1
  523. package/dist/react/index.js +12 -5
  524. package/dist/react/index.js.map +1 -1
  525. package/dist/react/provider.d.ts +23 -11
  526. package/dist/react/provider.d.ts.map +1 -1
  527. package/dist/react/provider.js +43 -3
  528. package/dist/react/provider.js.map +1 -1
  529. package/dist/react/session.d.ts +18 -0
  530. package/dist/react/session.d.ts.map +1 -0
  531. package/dist/react/session.js +28 -0
  532. package/dist/react/session.js.map +1 -0
  533. package/dist/react/use-all.d.ts +1 -1
  534. package/dist/react/use-all.d.ts.map +1 -1
  535. package/dist/react/use-all.js +1 -1
  536. package/dist/react/use-all.js.map +1 -1
  537. package/dist/react/use-local-first-auth.d.ts +11 -0
  538. package/dist/react/use-local-first-auth.d.ts.map +1 -0
  539. package/dist/react/use-local-first-auth.js +13 -0
  540. package/dist/react/use-local-first-auth.js.map +1 -0
  541. package/dist/react/use-one.d.ts +2 -0
  542. package/dist/react/use-one.d.ts.map +1 -0
  543. package/dist/react/use-one.js +2 -0
  544. package/dist/react/use-one.js.map +1 -0
  545. package/dist/react-core/app.d.ts +31 -0
  546. package/dist/react-core/app.d.ts.map +1 -0
  547. package/dist/react-core/app.js +65 -0
  548. package/dist/react-core/app.js.map +1 -0
  549. package/dist/react-core/index.d.ts +11 -4
  550. package/dist/react-core/index.d.ts.map +1 -1
  551. package/dist/react-core/index.js +8 -2
  552. package/dist/react-core/index.js.map +1 -1
  553. package/dist/react-core/provider.d.ts +44 -12
  554. package/dist/react-core/provider.d.ts.map +1 -1
  555. package/dist/react-core/provider.js +110 -10
  556. package/dist/react-core/provider.js.map +1 -1
  557. package/dist/react-core/session.d.ts +45 -0
  558. package/dist/react-core/session.d.ts.map +1 -0
  559. package/dist/react-core/session.js +130 -0
  560. package/dist/react-core/session.js.map +1 -0
  561. package/dist/react-core/use-account-state.d.ts +4 -0
  562. package/dist/react-core/use-account-state.d.ts.map +1 -0
  563. package/dist/react-core/use-account-state.js +6 -0
  564. package/dist/react-core/use-account-state.js.map +1 -0
  565. package/dist/react-core/use-all.d.ts +95 -3
  566. package/dist/react-core/use-all.d.ts.map +1 -1
  567. package/dist/react-core/use-all.js +126 -52
  568. package/dist/react-core/use-all.js.map +1 -1
  569. package/dist/react-core/use-auth-state.d.ts +13 -0
  570. package/dist/react-core/use-auth-state.d.ts.map +1 -0
  571. package/dist/react-core/use-auth-state.js +15 -0
  572. package/dist/react-core/use-auth-state.js.map +1 -0
  573. package/dist/react-core/use-local-first-auth.d.ts +12 -0
  574. package/dist/react-core/use-local-first-auth.d.ts.map +1 -0
  575. package/dist/react-core/use-local-first-auth.js +14 -0
  576. package/dist/react-core/use-local-first-auth.js.map +1 -0
  577. package/dist/react-core/use-one.d.ts +58 -0
  578. package/dist/react-core/use-one.d.ts.map +1 -0
  579. package/dist/react-core/use-one.js +19 -0
  580. package/dist/react-core/use-one.js.map +1 -0
  581. package/dist/react-core/use-sync-status.d.ts +8 -0
  582. package/dist/react-core/use-sync-status.d.ts.map +1 -0
  583. package/dist/react-core/use-sync-status.js +12 -0
  584. package/dist/react-core/use-sync-status.js.map +1 -0
  585. package/dist/react-native/abort-signal.d.ts +9 -0
  586. package/dist/react-native/abort-signal.d.ts.map +1 -0
  587. package/dist/react-native/abort-signal.js +51 -0
  588. package/dist/react-native/abort-signal.js.map +1 -0
  589. package/dist/react-native/account-session.d.ts +11 -0
  590. package/dist/react-native/account-session.d.ts.map +1 -0
  591. package/dist/react-native/account-session.js +59 -0
  592. package/dist/react-native/account-session.js.map +1 -0
  593. package/dist/react-native/create-account-manager.d.ts +28 -0
  594. package/dist/react-native/create-account-manager.d.ts.map +1 -0
  595. package/dist/react-native/create-account-manager.js +30 -0
  596. package/dist/react-native/create-account-manager.js.map +1 -0
  597. package/dist/react-native/create-db.d.ts +8 -0
  598. package/dist/react-native/create-db.d.ts.map +1 -0
  599. package/dist/react-native/create-db.js +9 -0
  600. package/dist/react-native/create-db.js.map +1 -0
  601. package/dist/react-native/create-jazz-client.d.ts +12 -10
  602. package/dist/react-native/create-jazz-client.d.ts.map +1 -1
  603. package/dist/react-native/create-jazz-client.js +6 -21
  604. package/dist/react-native/create-jazz-client.js.map +1 -1
  605. package/dist/react-native/create-jazz-session.d.ts +35 -0
  606. package/dist/react-native/create-jazz-session.d.ts.map +1 -0
  607. package/dist/react-native/create-jazz-session.js +39 -0
  608. package/dist/react-native/create-jazz-session.js.map +1 -0
  609. package/dist/react-native/errors.d.ts +6 -0
  610. package/dist/react-native/errors.d.ts.map +1 -0
  611. package/dist/react-native/errors.js +6 -0
  612. package/dist/react-native/errors.js.map +1 -0
  613. package/dist/react-native/index.d.ts +25 -9
  614. package/dist/react-native/index.d.ts.map +1 -1
  615. package/dist/react-native/index.js +17 -7
  616. package/dist/react-native/index.js.map +1 -1
  617. package/dist/react-native/native-foreground-db.d.ts +192 -0
  618. package/dist/react-native/native-foreground-db.d.ts.map +1 -0
  619. package/dist/react-native/native-foreground-db.js +801 -0
  620. package/dist/react-native/native-foreground-db.js.map +1 -0
  621. package/dist/react-native/native-relay.d.ts +7 -0
  622. package/dist/react-native/native-relay.d.ts.map +1 -0
  623. package/dist/react-native/native-relay.js +14 -0
  624. package/dist/react-native/native-relay.js.map +1 -0
  625. package/dist/react-native/provider.d.ts +23 -10
  626. package/dist/react-native/provider.d.ts.map +1 -1
  627. package/dist/react-native/provider.js +23 -3
  628. package/dist/react-native/provider.js.map +1 -1
  629. package/dist/react-native/runtime-source.d.ts +40 -0
  630. package/dist/react-native/runtime-source.d.ts.map +1 -0
  631. package/dist/react-native/runtime-source.js +250 -0
  632. package/dist/react-native/runtime-source.js.map +1 -0
  633. package/dist/react-native/session.d.ts +10 -0
  634. package/dist/react-native/session.d.ts.map +1 -0
  635. package/dist/react-native/session.js +5 -0
  636. package/dist/react-native/session.js.map +1 -0
  637. package/dist/react-native/use-all.d.ts +1 -1
  638. package/dist/react-native/use-all.d.ts.map +1 -1
  639. package/dist/react-native/use-all.js +1 -1
  640. package/dist/react-native/use-all.js.map +1 -1
  641. package/dist/react-native/use-local-first-auth.d.ts +15 -0
  642. package/dist/react-native/use-local-first-auth.d.ts.map +1 -0
  643. package/dist/react-native/use-local-first-auth.js +14 -0
  644. package/dist/react-native/use-local-first-auth.js.map +1 -0
  645. package/dist/react-native/use-one.d.ts +2 -0
  646. package/dist/react-native/use-one.d.ts.map +1 -0
  647. package/dist/react-native/use-one.js +2 -0
  648. package/dist/react-native/use-one.js.map +1 -0
  649. package/dist/reconcile-array.d.ts +45 -0
  650. package/dist/reconcile-array.d.ts.map +1 -0
  651. package/dist/reconcile-array.js +252 -0
  652. package/dist/reconcile-array.js.map +1 -0
  653. package/dist/relationships.d.ts +18 -0
  654. package/dist/relationships.d.ts.map +1 -0
  655. package/dist/relationships.js +28 -0
  656. package/dist/relationships.js.map +1 -0
  657. package/dist/runtime/anonymous-write-denied-error.d.ts +13 -0
  658. package/dist/runtime/anonymous-write-denied-error.d.ts.map +1 -0
  659. package/dist/runtime/anonymous-write-denied-error.js +58 -0
  660. package/dist/runtime/anonymous-write-denied-error.js.map +1 -0
  661. package/dist/runtime/auth-renewal-backoff.d.ts +14 -0
  662. package/dist/runtime/auth-renewal-backoff.d.ts.map +1 -0
  663. package/dist/runtime/auth-renewal-backoff.js +23 -0
  664. package/dist/runtime/auth-renewal-backoff.js.map +1 -0
  665. package/dist/runtime/auth-request-deadline.d.ts +3 -0
  666. package/dist/runtime/auth-request-deadline.d.ts.map +1 -0
  667. package/dist/runtime/auth-request-deadline.js +24 -0
  668. package/dist/runtime/auth-request-deadline.js.map +1 -0
  669. package/dist/runtime/auth-secret-codec.d.ts +21 -0
  670. package/dist/runtime/auth-secret-codec.d.ts.map +1 -0
  671. package/dist/runtime/auth-secret-codec.js +32 -0
  672. package/dist/runtime/auth-secret-codec.js.map +1 -0
  673. package/dist/runtime/auth-secret-store.d.ts +51 -0
  674. package/dist/runtime/auth-secret-store.d.ts.map +1 -0
  675. package/dist/runtime/auth-secret-store.js +114 -0
  676. package/dist/runtime/auth-secret-store.js.map +1 -0
  677. package/dist/runtime/auth-state.d.ts +40 -0
  678. package/dist/runtime/auth-state.d.ts.map +1 -0
  679. package/dist/runtime/auth-state.js +145 -0
  680. package/dist/runtime/auth-state.js.map +1 -0
  681. package/dist/runtime/author-id.d.ts +42 -0
  682. package/dist/runtime/author-id.d.ts.map +1 -0
  683. package/dist/runtime/author-id.js +172 -0
  684. package/dist/runtime/author-id.js.map +1 -0
  685. package/dist/runtime/authority-changed-error.d.ts +54 -0
  686. package/dist/runtime/authority-changed-error.d.ts.map +1 -0
  687. package/dist/runtime/authority-changed-error.js +72 -0
  688. package/dist/runtime/authority-changed-error.js.map +1 -0
  689. package/dist/runtime/browser-physical-database-epoch.d.ts +37 -0
  690. package/dist/runtime/browser-physical-database-epoch.d.ts.map +1 -0
  691. package/dist/runtime/browser-physical-database-epoch.js +89 -0
  692. package/dist/runtime/browser-physical-database-epoch.js.map +1 -0
  693. package/dist/runtime/browser-storage-invalidation.d.ts +8 -0
  694. package/dist/runtime/browser-storage-invalidation.d.ts.map +1 -0
  695. package/dist/runtime/browser-storage-invalidation.js +20 -0
  696. package/dist/runtime/browser-storage-invalidation.js.map +1 -0
  697. package/dist/runtime/browser-worker-assets.d.ts +4 -0
  698. package/dist/runtime/browser-worker-assets.d.ts.map +1 -0
  699. package/dist/runtime/browser-worker-assets.js +8 -0
  700. package/dist/runtime/browser-worker-assets.js.map +1 -0
  701. package/dist/runtime/browser-worker-assets.native.d.ts +5 -0
  702. package/dist/runtime/browser-worker-assets.native.d.ts.map +1 -0
  703. package/dist/runtime/browser-worker-assets.native.js +6 -0
  704. package/dist/runtime/browser-worker-assets.native.js.map +1 -0
  705. package/dist/runtime/browser-worker-config.d.ts +55 -0
  706. package/dist/runtime/browser-worker-config.d.ts.map +1 -0
  707. package/dist/runtime/browser-worker-config.js +222 -0
  708. package/dist/runtime/browser-worker-config.js.map +1 -0
  709. package/dist/runtime/client-config-key.d.ts +6 -0
  710. package/dist/runtime/client-config-key.d.ts.map +1 -0
  711. package/dist/runtime/client-config-key.js +83 -0
  712. package/dist/runtime/client-config-key.js.map +1 -0
  713. package/dist/runtime/client-migrations.d.ts +33 -0
  714. package/dist/runtime/client-migrations.d.ts.map +1 -0
  715. package/dist/runtime/client-migrations.js +30 -0
  716. package/dist/runtime/client-migrations.js.map +1 -0
  717. package/dist/runtime/client-registry.d.ts +21 -0
  718. package/dist/runtime/client-registry.d.ts.map +1 -0
  719. package/dist/runtime/client-registry.js +169 -0
  720. package/dist/runtime/client-registry.js.map +1 -0
  721. package/dist/runtime/client-scope.d.ts +38 -0
  722. package/dist/runtime/client-scope.d.ts.map +1 -0
  723. package/dist/runtime/client-scope.js +64 -0
  724. package/dist/runtime/client-scope.js.map +1 -0
  725. package/dist/runtime/client-session.d.ts +56 -13
  726. package/dist/runtime/client-session.d.ts.map +1 -1
  727. package/dist/runtime/client-session.js +212 -196
  728. package/dist/runtime/client-session.js.map +1 -1
  729. package/dist/runtime/client.d.ts +624 -191
  730. package/dist/runtime/client.d.ts.map +1 -1
  731. package/dist/runtime/client.js +1105 -425
  732. package/dist/runtime/client.js.map +1 -1
  733. package/dist/runtime/column-transforms.d.ts +40 -0
  734. package/dist/runtime/column-transforms.d.ts.map +1 -0
  735. package/dist/runtime/column-transforms.js +279 -0
  736. package/dist/runtime/column-transforms.js.map +1 -0
  737. package/dist/runtime/connection-manager/browser-connection-manager.d.ts +119 -0
  738. package/dist/runtime/connection-manager/browser-connection-manager.d.ts.map +1 -0
  739. package/dist/runtime/connection-manager/browser-connection-manager.js +836 -0
  740. package/dist/runtime/connection-manager/browser-connection-manager.js.map +1 -0
  741. package/dist/runtime/connection-manager/direct-connection-manager.d.ts +26 -0
  742. package/dist/runtime/connection-manager/direct-connection-manager.d.ts.map +1 -0
  743. package/dist/runtime/connection-manager/direct-connection-manager.js +198 -0
  744. package/dist/runtime/connection-manager/direct-connection-manager.js.map +1 -0
  745. package/dist/runtime/connection-manager/index.d.ts +5 -0
  746. package/dist/runtime/connection-manager/index.d.ts.map +1 -0
  747. package/dist/runtime/connection-manager/index.js +4 -0
  748. package/dist/runtime/connection-manager/index.js.map +1 -0
  749. package/dist/runtime/connection-manager/types.d.ts +136 -0
  750. package/dist/runtime/connection-manager/types.d.ts.map +1 -0
  751. package/dist/runtime/connection-manager/types.js +340 -0
  752. package/dist/runtime/connection-manager/types.js.map +1 -0
  753. package/dist/runtime/context.d.ts +90 -30
  754. package/dist/runtime/context.d.ts.map +1 -1
  755. package/dist/runtime/context.js.map +1 -1
  756. package/dist/runtime/credentialed-transport.d.ts +27 -0
  757. package/dist/runtime/credentialed-transport.d.ts.map +1 -0
  758. package/dist/runtime/credentialed-transport.js +155 -0
  759. package/dist/runtime/credentialed-transport.js.map +1 -0
  760. package/dist/runtime/db-access-context.d.ts +14 -0
  761. package/dist/runtime/db-access-context.d.ts.map +1 -0
  762. package/dist/runtime/db-access-context.js +26 -0
  763. package/dist/runtime/db-access-context.js.map +1 -0
  764. package/dist/runtime/db-internal-session.d.ts +7 -0
  765. package/dist/runtime/db-internal-session.d.ts.map +1 -0
  766. package/dist/runtime/db-internal-session.js +21 -0
  767. package/dist/runtime/db-internal-session.js.map +1 -0
  768. package/dist/runtime/db-replaced-error.d.ts +19 -0
  769. package/dist/runtime/db-replaced-error.d.ts.map +1 -0
  770. package/dist/runtime/db-replaced-error.js +20 -0
  771. package/dist/runtime/db-replaced-error.js.map +1 -0
  772. package/dist/runtime/db.d.ts +735 -201
  773. package/dist/runtime/db.d.ts.map +1 -1
  774. package/dist/runtime/db.js +3287 -727
  775. package/dist/runtime/db.js.map +1 -1
  776. package/dist/runtime/default-create-db.d.ts +5 -0
  777. package/dist/runtime/default-create-db.d.ts.map +1 -0
  778. package/dist/runtime/default-create-db.js +7 -0
  779. package/dist/runtime/default-create-db.js.map +1 -0
  780. package/dist/runtime/default-runtime-source.d.ts +41 -0
  781. package/dist/runtime/default-runtime-source.d.ts.map +1 -0
  782. package/dist/runtime/default-runtime-source.js +315 -0
  783. package/dist/runtime/default-runtime-source.js.map +1 -0
  784. package/dist/runtime/deterministic-bytes.d.ts +6 -0
  785. package/dist/runtime/deterministic-bytes.d.ts.map +1 -0
  786. package/dist/runtime/deterministic-bytes.js +18 -0
  787. package/dist/runtime/deterministic-bytes.js.map +1 -0
  788. package/dist/runtime/graceful-shutdown-error.d.ts +9 -0
  789. package/dist/runtime/graceful-shutdown-error.d.ts.map +1 -0
  790. package/dist/runtime/graceful-shutdown-error.js +17 -0
  791. package/dist/runtime/graceful-shutdown-error.js.map +1 -0
  792. package/dist/runtime/hex.d.ts +17 -0
  793. package/dist/runtime/hex.d.ts.map +1 -0
  794. package/dist/runtime/hex.js +56 -0
  795. package/dist/runtime/hex.js.map +1 -0
  796. package/dist/runtime/history-relation.d.ts +8 -0
  797. package/dist/runtime/history-relation.d.ts.map +1 -0
  798. package/dist/runtime/history-relation.js +44 -0
  799. package/dist/runtime/history-relation.js.map +1 -0
  800. package/dist/runtime/in-process-transport.d.ts +18 -0
  801. package/dist/runtime/in-process-transport.d.ts.map +1 -0
  802. package/dist/runtime/in-process-transport.js +32 -0
  803. package/dist/runtime/in-process-transport.js.map +1 -0
  804. package/dist/runtime/index.d.ts +22 -11
  805. package/dist/runtime/index.d.ts.map +1 -1
  806. package/dist/runtime/index.js +14 -10
  807. package/dist/runtime/index.js.map +1 -1
  808. package/dist/runtime/indexeddb-page-store.d.ts +214 -0
  809. package/dist/runtime/indexeddb-page-store.d.ts.map +1 -0
  810. package/dist/runtime/indexeddb-page-store.js +848 -0
  811. package/dist/runtime/indexeddb-page-store.js.map +1 -0
  812. package/dist/runtime/introspection-fetch.d.ts +18 -0
  813. package/dist/runtime/introspection-fetch.d.ts.map +1 -0
  814. package/dist/runtime/introspection-fetch.js +12 -0
  815. package/dist/runtime/introspection-fetch.js.map +1 -0
  816. package/dist/runtime/json-schema-evaluate.d.ts +55 -0
  817. package/dist/runtime/json-schema-evaluate.d.ts.map +1 -0
  818. package/dist/runtime/json-schema-evaluate.js +946 -0
  819. package/dist/runtime/json-schema-evaluate.js.map +1 -0
  820. package/dist/runtime/json-schema-formats.d.ts +14 -0
  821. package/dist/runtime/json-schema-formats.d.ts.map +1 -0
  822. package/dist/runtime/json-schema-formats.js +555 -0
  823. package/dist/runtime/json-schema-formats.js.map +1 -0
  824. package/dist/runtime/json-schema-json.d.ts +41 -0
  825. package/dist/runtime/json-schema-json.d.ts.map +1 -0
  826. package/dist/runtime/json-schema-json.js +309 -0
  827. package/dist/runtime/json-schema-json.js.map +1 -0
  828. package/dist/runtime/json-schema-metaschemas.d.ts +1403 -0
  829. package/dist/runtime/json-schema-metaschemas.d.ts.map +1 -0
  830. package/dist/runtime/json-schema-metaschemas.js +64 -0
  831. package/dist/runtime/json-schema-metaschemas.js.map +1 -0
  832. package/dist/runtime/json-schema-regex.d.ts +32 -0
  833. package/dist/runtime/json-schema-regex.d.ts.map +1 -0
  834. package/dist/runtime/json-schema-regex.js +895 -0
  835. package/dist/runtime/json-schema-regex.js.map +1 -0
  836. package/dist/runtime/json-schema-validator.d.ts +47 -0
  837. package/dist/runtime/json-schema-validator.d.ts.map +1 -0
  838. package/dist/runtime/json-schema-validator.js +404 -0
  839. package/dist/runtime/json-schema-validator.js.map +1 -0
  840. package/dist/runtime/json-text.d.ts +2 -0
  841. package/dist/runtime/json-text.d.ts.map +1 -0
  842. package/dist/runtime/json-text.js +17 -0
  843. package/dist/runtime/json-text.js.map +1 -0
  844. package/dist/runtime/local-first-auth-controller.d.ts +29 -0
  845. package/dist/runtime/local-first-auth-controller.d.ts.map +1 -0
  846. package/dist/runtime/local-first-auth-controller.js +101 -0
  847. package/dist/runtime/local-first-auth-controller.js.map +1 -0
  848. package/dist/runtime/local-first-token.d.ts +11 -0
  849. package/dist/runtime/local-first-token.d.ts.map +1 -0
  850. package/dist/runtime/local-first-token.js +20 -0
  851. package/dist/runtime/local-first-token.js.map +1 -0
  852. package/dist/runtime/local-first-upgrade.d.ts +27 -0
  853. package/dist/runtime/local-first-upgrade.d.ts.map +1 -0
  854. package/dist/runtime/local-first-upgrade.js +31 -0
  855. package/dist/runtime/local-first-upgrade.js.map +1 -0
  856. package/dist/runtime/local-write-observer.d.ts +5 -0
  857. package/dist/runtime/local-write-observer.d.ts.map +1 -0
  858. package/dist/runtime/local-write-observer.js +31 -0
  859. package/dist/runtime/local-write-observer.js.map +1 -0
  860. package/dist/runtime/native-artifact-compatibility.d.ts +12 -0
  861. package/dist/runtime/native-artifact-compatibility.d.ts.map +1 -0
  862. package/dist/runtime/native-artifact-compatibility.js +24 -0
  863. package/dist/runtime/native-artifact-compatibility.js.map +1 -0
  864. package/dist/runtime/native-artifact-fingerprint-napi.d.ts +2 -0
  865. package/dist/runtime/native-artifact-fingerprint-napi.d.ts.map +1 -0
  866. package/dist/runtime/native-artifact-fingerprint-napi.js +3 -0
  867. package/dist/runtime/native-artifact-fingerprint-napi.js.map +1 -0
  868. package/dist/runtime/native-artifact-fingerprint-wasm.d.ts +2 -0
  869. package/dist/runtime/native-artifact-fingerprint-wasm.d.ts.map +1 -0
  870. package/dist/runtime/native-artifact-fingerprint-wasm.js +3 -0
  871. package/dist/runtime/native-artifact-fingerprint-wasm.js.map +1 -0
  872. package/dist/runtime/native-artifact-fingerprints.d.ts +5 -0
  873. package/dist/runtime/native-artifact-fingerprints.d.ts.map +1 -0
  874. package/dist/runtime/native-artifact-fingerprints.js +7 -0
  875. package/dist/runtime/native-artifact-fingerprints.js.map +1 -0
  876. package/dist/runtime/native-runtime/attached-browser-worker-connection.d.ts +20 -0
  877. package/dist/runtime/native-runtime/attached-browser-worker-connection.d.ts.map +1 -0
  878. package/dist/runtime/native-runtime/attached-browser-worker-connection.js +42 -0
  879. package/dist/runtime/native-runtime/attached-browser-worker-connection.js.map +1 -0
  880. package/dist/runtime/native-runtime/auxiliary-receive-deadline.d.ts +15 -0
  881. package/dist/runtime/native-runtime/auxiliary-receive-deadline.d.ts.map +1 -0
  882. package/dist/runtime/native-runtime/auxiliary-receive-deadline.js +64 -0
  883. package/dist/runtime/native-runtime/auxiliary-receive-deadline.js.map +1 -0
  884. package/dist/runtime/native-runtime/browser-follower-connection.d.ts +78 -0
  885. package/dist/runtime/native-runtime/browser-follower-connection.d.ts.map +1 -0
  886. package/dist/runtime/native-runtime/browser-follower-connection.js +494 -0
  887. package/dist/runtime/native-runtime/browser-follower-connection.js.map +1 -0
  888. package/dist/runtime/native-runtime/browser-shared-worker-connection.d.ts +96 -0
  889. package/dist/runtime/native-runtime/browser-shared-worker-connection.d.ts.map +1 -0
  890. package/dist/runtime/native-runtime/browser-shared-worker-connection.js +780 -0
  891. package/dist/runtime/native-runtime/browser-shared-worker-connection.js.map +1 -0
  892. package/dist/runtime/native-runtime/browser-worker-protocol.d.ts +455 -0
  893. package/dist/runtime/native-runtime/browser-worker-protocol.d.ts.map +1 -0
  894. package/dist/runtime/native-runtime/browser-worker-protocol.js +281 -0
  895. package/dist/runtime/native-runtime/browser-worker-protocol.js.map +1 -0
  896. package/dist/runtime/native-runtime/browser-worker-transport.d.ts +53 -0
  897. package/dist/runtime/native-runtime/browser-worker-transport.d.ts.map +1 -0
  898. package/dist/runtime/native-runtime/browser-worker-transport.js +252 -0
  899. package/dist/runtime/native-runtime/browser-worker-transport.js.map +1 -0
  900. package/dist/runtime/native-runtime/exact-integer.d.ts +7 -0
  901. package/dist/runtime/native-runtime/exact-integer.d.ts.map +1 -0
  902. package/dist/runtime/native-runtime/exact-integer.js +18 -0
  903. package/dist/runtime/native-runtime/exact-integer.js.map +1 -0
  904. package/dist/runtime/native-runtime/http-stream-socket.d.ts +85 -0
  905. package/dist/runtime/native-runtime/http-stream-socket.d.ts.map +1 -0
  906. package/dist/runtime/native-runtime/http-stream-socket.js +433 -0
  907. package/dist/runtime/native-runtime/http-stream-socket.js.map +1 -0
  908. package/dist/runtime/native-runtime/inspector-control-lifecycle.d.ts +4 -0
  909. package/dist/runtime/native-runtime/inspector-control-lifecycle.d.ts.map +1 -0
  910. package/dist/runtime/native-runtime/inspector-control-lifecycle.js +33 -0
  911. package/dist/runtime/native-runtime/inspector-control-lifecycle.js.map +1 -0
  912. package/dist/runtime/native-runtime/native-codec.d.ts +177 -0
  913. package/dist/runtime/native-runtime/native-codec.d.ts.map +1 -0
  914. package/dist/runtime/native-runtime/native-codec.js +627 -0
  915. package/dist/runtime/native-runtime/native-codec.js.map +1 -0
  916. package/dist/runtime/native-runtime/native-error-code.d.ts +39 -0
  917. package/dist/runtime/native-runtime/native-error-code.d.ts.map +1 -0
  918. package/dist/runtime/native-runtime/native-error-code.js +62 -0
  919. package/dist/runtime/native-runtime/native-error-code.js.map +1 -0
  920. package/dist/runtime/native-runtime/native-row-codec.d.ts +161 -0
  921. package/dist/runtime/native-runtime/native-row-codec.d.ts.map +1 -0
  922. package/dist/runtime/native-runtime/native-row-codec.js +942 -0
  923. package/dist/runtime/native-runtime/native-row-codec.js.map +1 -0
  924. package/dist/runtime/native-runtime/native-row-descriptor-key.d.ts +15 -0
  925. package/dist/runtime/native-runtime/native-row-descriptor-key.d.ts.map +1 -0
  926. package/dist/runtime/native-runtime/native-row-descriptor-key.js +25 -0
  927. package/dist/runtime/native-runtime/native-row-descriptor-key.js.map +1 -0
  928. package/dist/runtime/native-runtime/native-runtime-adapter.d.ts +728 -0
  929. package/dist/runtime/native-runtime/native-runtime-adapter.d.ts.map +1 -0
  930. package/dist/runtime/native-runtime/native-runtime-adapter.js +5705 -0
  931. package/dist/runtime/native-runtime/native-runtime-adapter.js.map +1 -0
  932. package/dist/runtime/native-runtime/node-foreground-node-lease.browser.d.ts +17 -0
  933. package/dist/runtime/native-runtime/node-foreground-node-lease.browser.d.ts.map +1 -0
  934. package/dist/runtime/native-runtime/node-foreground-node-lease.browser.js +4 -0
  935. package/dist/runtime/native-runtime/node-foreground-node-lease.browser.js.map +1 -0
  936. package/dist/runtime/native-runtime/node-foreground-node-lease.d.ts +19 -0
  937. package/dist/runtime/native-runtime/node-foreground-node-lease.d.ts.map +1 -0
  938. package/dist/runtime/native-runtime/node-foreground-node-lease.js +297 -0
  939. package/dist/runtime/native-runtime/node-foreground-node-lease.js.map +1 -0
  940. package/dist/runtime/native-runtime/row-values-transport.d.ts +2 -0
  941. package/dist/runtime/native-runtime/row-values-transport.d.ts.map +1 -0
  942. package/dist/runtime/native-runtime/row-values-transport.js +21 -0
  943. package/dist/runtime/native-runtime/row-values-transport.js.map +1 -0
  944. package/dist/runtime/native-runtime/schema-codec.d.ts +10 -0
  945. package/dist/runtime/native-runtime/schema-codec.d.ts.map +1 -0
  946. package/dist/runtime/native-runtime/schema-codec.js +13 -0
  947. package/dist/runtime/native-runtime/schema-codec.js.map +1 -0
  948. package/dist/runtime/native-runtime/websocket.d.ts +165 -0
  949. package/dist/runtime/native-runtime/websocket.d.ts.map +1 -0
  950. package/dist/runtime/native-runtime/websocket.js +713 -0
  951. package/dist/runtime/native-runtime/websocket.js.map +1 -0
  952. package/dist/runtime/passkey-backup.d.ts +3 -0
  953. package/dist/runtime/passkey-backup.d.ts.map +1 -0
  954. package/dist/runtime/passkey-backup.js +2 -0
  955. package/dist/runtime/passkey-backup.js.map +1 -0
  956. package/dist/runtime/platform-url.d.ts +10 -0
  957. package/dist/runtime/platform-url.d.ts.map +1 -0
  958. package/dist/runtime/platform-url.js +3 -0
  959. package/dist/runtime/platform-url.js.map +1 -0
  960. package/dist/runtime/platform-url.native.d.ts +6 -0
  961. package/dist/runtime/platform-url.native.d.ts.map +1 -0
  962. package/dist/runtime/platform-url.native.js +37 -0
  963. package/dist/runtime/platform-url.native.js.map +1 -0
  964. package/dist/runtime/query-adapter.d.ts +7 -15
  965. package/dist/runtime/query-adapter.d.ts.map +1 -1
  966. package/dist/runtime/query-adapter.js +554 -167
  967. package/dist/runtime/query-adapter.js.map +1 -1
  968. package/dist/runtime/query-builder-shape.d.ts +75 -0
  969. package/dist/runtime/query-builder-shape.d.ts.map +1 -0
  970. package/dist/runtime/query-builder-shape.js +225 -0
  971. package/dist/runtime/query-builder-shape.js.map +1 -0
  972. package/dist/runtime/query-column-name.d.ts +3 -0
  973. package/dist/runtime/query-column-name.d.ts.map +1 -0
  974. package/dist/runtime/query-column-name.js +10 -0
  975. package/dist/runtime/query-column-name.js.map +1 -0
  976. package/dist/runtime/query-output-table.d.ts +5 -0
  977. package/dist/runtime/query-output-table.d.ts.map +1 -0
  978. package/dist/runtime/query-output-table.js +30 -0
  979. package/dist/runtime/query-output-table.js.map +1 -0
  980. package/dist/runtime/recovery-phrase.d.ts +3 -0
  981. package/dist/runtime/recovery-phrase.d.ts.map +1 -0
  982. package/dist/runtime/recovery-phrase.js +2 -0
  983. package/dist/runtime/recovery-phrase.js.map +1 -0
  984. package/dist/runtime/remote-link-state.d.ts +20 -0
  985. package/dist/runtime/remote-link-state.d.ts.map +1 -0
  986. package/dist/runtime/remote-link-state.js +5 -0
  987. package/dist/runtime/remote-link-state.js.map +1 -0
  988. package/dist/runtime/row-transformer.d.ts +18 -6
  989. package/dist/runtime/row-transformer.d.ts.map +1 -1
  990. package/dist/runtime/row-transformer.js +195 -41
  991. package/dist/runtime/row-transformer.js.map +1 -1
  992. package/dist/runtime/run-cleanup-steps.d.ts +5 -0
  993. package/dist/runtime/run-cleanup-steps.d.ts.map +1 -0
  994. package/dist/runtime/run-cleanup-steps.js +19 -0
  995. package/dist/runtime/run-cleanup-steps.js.map +1 -0
  996. package/dist/runtime/runtime-closed-error.d.ts +9 -0
  997. package/dist/runtime/runtime-closed-error.d.ts.map +1 -0
  998. package/dist/runtime/runtime-closed-error.js +12 -0
  999. package/dist/runtime/runtime-closed-error.js.map +1 -0
  1000. package/dist/runtime/runtime-config.d.ts +9 -0
  1001. package/dist/runtime/runtime-config.d.ts.map +1 -0
  1002. package/dist/runtime/runtime-config.js +111 -0
  1003. package/dist/runtime/runtime-config.js.map +1 -0
  1004. package/dist/runtime/runtime-entropy.d.ts +14 -0
  1005. package/dist/runtime/runtime-entropy.d.ts.map +1 -0
  1006. package/dist/runtime/runtime-entropy.js +43 -0
  1007. package/dist/runtime/runtime-entropy.js.map +1 -0
  1008. package/dist/runtime/runtime-source.d.ts +167 -0
  1009. package/dist/runtime/runtime-source.d.ts.map +1 -0
  1010. package/dist/runtime/runtime-source.js +64 -0
  1011. package/dist/runtime/runtime-source.js.map +1 -0
  1012. package/dist/runtime/schema-metadata.d.ts +5 -0
  1013. package/dist/runtime/schema-metadata.d.ts.map +1 -0
  1014. package/dist/runtime/schema-metadata.js +34 -0
  1015. package/dist/runtime/schema-metadata.js.map +1 -0
  1016. package/dist/runtime/select-projection.d.ts +5 -0
  1017. package/dist/runtime/select-projection.d.ts.map +1 -0
  1018. package/dist/runtime/select-projection.js +47 -0
  1019. package/dist/runtime/select-projection.js.map +1 -0
  1020. package/dist/runtime/snapshot-ref.d.ts +24 -0
  1021. package/dist/runtime/snapshot-ref.d.ts.map +1 -0
  1022. package/dist/runtime/snapshot-ref.js +43 -0
  1023. package/dist/runtime/snapshot-ref.js.map +1 -0
  1024. package/dist/runtime/store-held-by-another-tab-error.d.ts +36 -0
  1025. package/dist/runtime/store-held-by-another-tab-error.d.ts.map +1 -0
  1026. package/dist/runtime/store-held-by-another-tab-error.js +38 -0
  1027. package/dist/runtime/store-held-by-another-tab-error.js.map +1 -0
  1028. package/dist/runtime/streaming-source.d.ts +4 -0
  1029. package/dist/runtime/streaming-source.d.ts.map +1 -0
  1030. package/dist/runtime/streaming-source.js +53 -0
  1031. package/dist/runtime/streaming-source.js.map +1 -0
  1032. package/dist/runtime/structural-values.d.ts +6 -0
  1033. package/dist/runtime/structural-values.d.ts.map +1 -0
  1034. package/dist/runtime/structural-values.js +55 -0
  1035. package/dist/runtime/structural-values.js.map +1 -0
  1036. package/dist/runtime/subscription-manager.d.ts +98 -14
  1037. package/dist/runtime/subscription-manager.d.ts.map +1 -1
  1038. package/dist/runtime/subscription-manager.js +1049 -25
  1039. package/dist/runtime/subscription-manager.js.map +1 -1
  1040. package/dist/runtime/sync-status.d.ts +98 -0
  1041. package/dist/runtime/sync-status.d.ts.map +1 -0
  1042. package/dist/runtime/sync-status.js +93 -0
  1043. package/dist/runtime/sync-status.js.map +1 -0
  1044. package/dist/runtime/sync-telemetry.d.ts +35 -0
  1045. package/dist/runtime/sync-telemetry.d.ts.map +1 -0
  1046. package/dist/runtime/sync-telemetry.js +354 -0
  1047. package/dist/runtime/sync-telemetry.js.map +1 -0
  1048. package/dist/runtime/system-identity.d.ts +5 -0
  1049. package/dist/runtime/system-identity.d.ts.map +1 -0
  1050. package/dist/runtime/system-identity.js +10 -0
  1051. package/dist/runtime/system-identity.js.map +1 -0
  1052. package/dist/runtime/telemetry-env.d.ts +2 -0
  1053. package/dist/runtime/telemetry-env.d.ts.map +1 -0
  1054. package/dist/runtime/telemetry-env.js +16 -0
  1055. package/dist/runtime/telemetry-env.js.map +1 -0
  1056. package/dist/runtime/telemetry-env.native.d.ts +3 -0
  1057. package/dist/runtime/telemetry-env.native.d.ts.map +1 -0
  1058. package/dist/runtime/telemetry-env.native.js +7 -0
  1059. package/dist/runtime/telemetry-env.native.js.map +1 -0
  1060. package/dist/runtime/text-anchors.d.ts +58 -0
  1061. package/dist/runtime/text-anchors.d.ts.map +1 -0
  1062. package/dist/runtime/text-anchors.js +9 -0
  1063. package/dist/runtime/text-anchors.js.map +1 -0
  1064. package/dist/runtime/unsupported-storage-codecs-error.d.ts +53 -0
  1065. package/dist/runtime/unsupported-storage-codecs-error.d.ts.map +1 -0
  1066. package/dist/runtime/unsupported-storage-codecs-error.js +74 -0
  1067. package/dist/runtime/unsupported-storage-codecs-error.js.map +1 -0
  1068. package/dist/runtime/url.d.ts +32 -0
  1069. package/dist/runtime/url.d.ts.map +1 -0
  1070. package/dist/runtime/url.js +96 -0
  1071. package/dist/runtime/url.js.map +1 -0
  1072. package/dist/runtime/utf8.d.ts +10 -0
  1073. package/dist/runtime/utf8.d.ts.map +1 -0
  1074. package/dist/runtime/utf8.js +93 -0
  1075. package/dist/runtime/utf8.js.map +1 -0
  1076. package/dist/runtime/util.d.ts +18 -0
  1077. package/dist/runtime/util.d.ts.map +1 -0
  1078. package/dist/runtime/util.js +59 -0
  1079. package/dist/runtime/util.js.map +1 -0
  1080. package/dist/runtime/value-converter.d.ts +9 -17
  1081. package/dist/runtime/value-converter.d.ts.map +1 -1
  1082. package/dist/runtime/value-converter.js +196 -43
  1083. package/dist/runtime/value-converter.js.map +1 -1
  1084. package/dist/runtime/wasm-loader.d.ts +6 -0
  1085. package/dist/runtime/wasm-loader.d.ts.map +1 -0
  1086. package/dist/runtime/wasm-loader.js +120 -0
  1087. package/dist/runtime/wasm-loader.js.map +1 -0
  1088. package/dist/runtime/write-preparation.d.ts +24 -0
  1089. package/dist/runtime/write-preparation.d.ts.map +1 -0
  1090. package/dist/runtime/write-preparation.js +63 -0
  1091. package/dist/runtime/write-preparation.js.map +1 -0
  1092. package/dist/runtime/write-row.d.ts +8 -0
  1093. package/dist/runtime/write-row.d.ts.map +1 -0
  1094. package/dist/runtime/write-row.js +17 -0
  1095. package/dist/runtime/write-row.js.map +1 -0
  1096. package/dist/schema-hash.d.ts +3 -0
  1097. package/dist/schema-hash.d.ts.map +1 -0
  1098. package/dist/schema-hash.js +5 -0
  1099. package/dist/schema-hash.js.map +1 -0
  1100. package/dist/schema-loader.d.ts +31 -0
  1101. package/dist/schema-loader.d.ts.map +1 -0
  1102. package/dist/schema-loader.js +501 -0
  1103. package/dist/schema-loader.js.map +1 -0
  1104. package/dist/schema-name.d.ts +2 -0
  1105. package/dist/schema-name.d.ts.map +1 -0
  1106. package/dist/schema-name.js +19 -0
  1107. package/dist/schema-name.js.map +1 -0
  1108. package/dist/schema-namespace.d.ts +35 -0
  1109. package/dist/schema-namespace.d.ts.map +1 -0
  1110. package/dist/schema-namespace.js +17 -0
  1111. package/dist/schema-namespace.js.map +1 -0
  1112. package/dist/schema-permissions.d.ts +16 -0
  1113. package/dist/schema-permissions.d.ts.map +1 -0
  1114. package/dist/schema-permissions.js +405 -0
  1115. package/dist/schema-permissions.js.map +1 -0
  1116. package/dist/schema-source.d.ts +11 -0
  1117. package/dist/schema-source.d.ts.map +1 -0
  1118. package/dist/schema-source.js +39 -0
  1119. package/dist/schema-source.js.map +1 -0
  1120. package/dist/schema.d.ts +108 -36
  1121. package/dist/schema.d.ts.map +1 -1
  1122. package/dist/schema.js +1 -10
  1123. package/dist/schema.js.map +1 -1
  1124. package/dist/session/app.d.ts +58 -0
  1125. package/dist/session/app.d.ts.map +1 -0
  1126. package/dist/session/app.js +325 -0
  1127. package/dist/session/app.js.map +1 -0
  1128. package/dist/session/backend-watch.d.ts +138 -0
  1129. package/dist/session/backend-watch.d.ts.map +1 -0
  1130. package/dist/session/backend-watch.js +576 -0
  1131. package/dist/session/backend-watch.js.map +1 -0
  1132. package/dist/session/consumer.d.ts +3 -0
  1133. package/dist/session/consumer.d.ts.map +1 -0
  1134. package/dist/session/consumer.js +3 -0
  1135. package/dist/session/consumer.js.map +1 -0
  1136. package/dist/session/create-jazz-app.d.ts +11 -0
  1137. package/dist/session/create-jazz-app.d.ts.map +1 -0
  1138. package/dist/session/create-jazz-app.js +11 -0
  1139. package/dist/session/create-jazz-app.js.map +1 -0
  1140. package/dist/session/create-jazz-session.d.ts +68 -0
  1141. package/dist/session/create-jazz-session.d.ts.map +1 -0
  1142. package/dist/session/create-jazz-session.js +448 -0
  1143. package/dist/session/create-jazz-session.js.map +1 -0
  1144. package/dist/session/follow-user.d.ts +53 -0
  1145. package/dist/session/follow-user.d.ts.map +1 -0
  1146. package/dist/session/follow-user.js +107 -0
  1147. package/dist/session/follow-user.js.map +1 -0
  1148. package/dist/session/left-behind-replicas.d.ts +62 -0
  1149. package/dist/session/left-behind-replicas.d.ts.map +1 -0
  1150. package/dist/session/left-behind-replicas.js +146 -0
  1151. package/dist/session/left-behind-replicas.js.map +1 -0
  1152. package/dist/session/native-backend-watch.d.ts +4 -0
  1153. package/dist/session/native-backend-watch.d.ts.map +1 -0
  1154. package/dist/session/native-backend-watch.js +14 -0
  1155. package/dist/session/native-backend-watch.js.map +1 -0
  1156. package/dist/session/state.d.ts +93 -0
  1157. package/dist/session/state.d.ts.map +1 -0
  1158. package/dist/session/state.js +383 -0
  1159. package/dist/session/state.js.map +1 -0
  1160. package/dist/shared/index.d.ts +20 -0
  1161. package/dist/shared/index.d.ts.map +1 -0
  1162. package/dist/shared/index.js +17 -0
  1163. package/dist/shared/index.js.map +1 -0
  1164. package/dist/solid/app.d.ts +30 -0
  1165. package/dist/solid/app.d.ts.map +1 -0
  1166. package/dist/solid/app.js +95 -0
  1167. package/dist/solid/app.js.map +1 -0
  1168. package/dist/solid/app.ssr.js +109 -0
  1169. package/dist/solid/app.ssr.js.map +1 -0
  1170. package/dist/solid/create-account-state.d.ts +4 -0
  1171. package/dist/solid/create-account-state.d.ts.map +1 -0
  1172. package/dist/solid/create-account-state.js +10 -0
  1173. package/dist/solid/create-account-state.js.map +1 -0
  1174. package/dist/solid/create-account-state.ssr.js +12 -0
  1175. package/dist/solid/create-account-state.ssr.js.map +1 -0
  1176. package/dist/solid/create-solid-jazz-client-internal.d.ts +13 -0
  1177. package/dist/solid/create-solid-jazz-client-internal.d.ts.map +1 -0
  1178. package/dist/solid/create-solid-jazz-client-internal.js +83 -0
  1179. package/dist/solid/create-solid-jazz-client-internal.js.map +1 -0
  1180. package/dist/solid/create-solid-jazz-client-internal.ssr.js +101 -0
  1181. package/dist/solid/create-solid-jazz-client-internal.ssr.js.map +1 -0
  1182. package/dist/solid/create-solid-jazz-client.d.ts +24 -0
  1183. package/dist/solid/create-solid-jazz-client.d.ts.map +1 -0
  1184. package/dist/solid/create-solid-jazz-client.js +43 -0
  1185. package/dist/solid/create-solid-jazz-client.js.map +1 -0
  1186. package/dist/solid/create-solid-jazz-client.ssr.js +46 -0
  1187. package/dist/solid/create-solid-jazz-client.ssr.js.map +1 -0
  1188. package/dist/solid/index.d.ts +20 -0
  1189. package/dist/solid/index.d.ts.map +1 -0
  1190. package/dist/solid/index.js +13 -0
  1191. package/dist/solid/index.ssr.js +13 -0
  1192. package/dist/solid/provider.d.ts +32 -0
  1193. package/dist/solid/provider.d.ts.map +1 -0
  1194. package/dist/solid/provider.js +63 -0
  1195. package/dist/solid/provider.js.map +1 -0
  1196. package/dist/solid/provider.ssr.js +64 -0
  1197. package/dist/solid/provider.ssr.js.map +1 -0
  1198. package/dist/solid/session.d.ts +22 -0
  1199. package/dist/solid/session.d.ts.map +1 -0
  1200. package/dist/solid/session.js +76 -0
  1201. package/dist/solid/session.js.map +1 -0
  1202. package/dist/solid/session.ssr.js +85 -0
  1203. package/dist/solid/session.ssr.js.map +1 -0
  1204. package/dist/solid/solid-jazz-client-store.d.ts +11 -0
  1205. package/dist/solid/solid-jazz-client-store.d.ts.map +1 -0
  1206. package/dist/solid/solid-jazz-client-store.js +37 -0
  1207. package/dist/solid/solid-jazz-client-store.js.map +1 -0
  1208. package/dist/solid/solid-jazz-client-store.ssr.js +39 -0
  1209. package/dist/solid/solid-jazz-client-store.ssr.js.map +1 -0
  1210. package/dist/solid/use-all.d.ts +18 -0
  1211. package/dist/solid/use-all.d.ts.map +1 -0
  1212. package/dist/solid/use-all.js +73 -0
  1213. package/dist/solid/use-all.js.map +1 -0
  1214. package/dist/solid/use-all.ssr.js +84 -0
  1215. package/dist/solid/use-all.ssr.js.map +1 -0
  1216. package/dist/solid/use-local-first-auth.d.ts +11 -0
  1217. package/dist/solid/use-local-first-auth.d.ts.map +1 -0
  1218. package/dist/solid/use-local-first-auth.js +30 -0
  1219. package/dist/solid/use-local-first-auth.js.map +1 -0
  1220. package/dist/solid/use-local-first-auth.ssr.js +31 -0
  1221. package/dist/solid/use-local-first-auth.ssr.js.map +1 -0
  1222. package/dist/solid/use-one.d.ts +18 -0
  1223. package/dist/solid/use-one.d.ts.map +1 -0
  1224. package/dist/solid/use-one.js +28 -0
  1225. package/dist/solid/use-one.js.map +1 -0
  1226. package/dist/solid/use-one.ssr.js +28 -0
  1227. package/dist/solid/use-one.ssr.js.map +1 -0
  1228. package/dist/solid/use-sync-status.d.ts +8 -0
  1229. package/dist/solid/use-sync-status.d.ts.map +1 -0
  1230. package/dist/solid/use-sync-status.js +14 -0
  1231. package/dist/solid/use-sync-status.js.map +1 -0
  1232. package/dist/solid/use-sync-status.ssr.js +21 -0
  1233. package/dist/solid/use-sync-status.ssr.js.map +1 -0
  1234. package/dist/subscription-store-internal.d.ts +11 -0
  1235. package/dist/subscription-store-internal.d.ts.map +1 -0
  1236. package/dist/subscription-store-internal.js +18 -0
  1237. package/dist/subscription-store-internal.js.map +1 -0
  1238. package/dist/subscriptions-orchestrator.d.ts +53 -13
  1239. package/dist/subscriptions-orchestrator.d.ts.map +1 -1
  1240. package/dist/subscriptions-orchestrator.js +295 -74
  1241. package/dist/subscriptions-orchestrator.js.map +1 -1
  1242. package/dist/svelte/JazzProvider.svelte +62 -0
  1243. package/dist/svelte/JazzProvider.svelte.d.ts +13 -0
  1244. package/dist/svelte/JazzProvider.svelte.d.ts.map +1 -0
  1245. package/dist/svelte/JazzSessionClientProvider.svelte +42 -0
  1246. package/dist/svelte/JazzSessionClientProvider.svelte.d.ts +13 -0
  1247. package/dist/svelte/JazzSessionClientProvider.svelte.d.ts.map +1 -0
  1248. package/dist/svelte/JazzSessionProvider.svelte +68 -0
  1249. package/dist/svelte/JazzSessionProvider.svelte.d.ts +19 -0
  1250. package/dist/svelte/JazzSessionProvider.svelte.d.ts.map +1 -0
  1251. package/dist/svelte/JazzSvelteClientProvider.svelte +79 -0
  1252. package/dist/svelte/JazzSvelteClientProvider.svelte.d.ts +14 -0
  1253. package/dist/svelte/JazzSvelteClientProvider.svelte.d.ts.map +1 -0
  1254. package/dist/svelte/JazzSvelteProvider.svelte +158 -27
  1255. package/dist/svelte/JazzSvelteProvider.svelte.d.ts +3 -2
  1256. package/dist/svelte/JazzSvelteProvider.svelte.d.ts.map +1 -1
  1257. package/dist/svelte/account-state.d.ts +5 -0
  1258. package/dist/svelte/account-state.d.ts.map +1 -0
  1259. package/dist/svelte/account-state.js +9 -0
  1260. package/dist/svelte/auth-state.d.ts +23 -0
  1261. package/dist/svelte/auth-state.d.ts.map +1 -0
  1262. package/dist/svelte/auth-state.js +16 -0
  1263. package/dist/svelte/context.svelte.d.ts +23 -3
  1264. package/dist/svelte/context.svelte.d.ts.map +1 -1
  1265. package/dist/svelte/context.svelte.js +23 -3
  1266. package/dist/svelte/create-jazz-client.d.ts +2 -8
  1267. package/dist/svelte/create-jazz-client.d.ts.map +1 -1
  1268. package/dist/svelte/create-jazz-client.js +1 -17
  1269. package/dist/svelte/index.d.ts +21 -5
  1270. package/dist/svelte/index.d.ts.map +1 -1
  1271. package/dist/svelte/index.js +14 -5
  1272. package/dist/svelte/local-first-auth.svelte.d.ts +50 -0
  1273. package/dist/svelte/local-first-auth.svelte.d.ts.map +1 -0
  1274. package/dist/svelte/local-first-auth.svelte.js +58 -0
  1275. package/dist/svelte/query-subscription.svelte.d.ts +60 -0
  1276. package/dist/svelte/query-subscription.svelte.d.ts.map +1 -0
  1277. package/dist/svelte/query-subscription.svelte.js +135 -0
  1278. package/dist/svelte/session-state.d.ts +11 -0
  1279. package/dist/svelte/session-state.d.ts.map +1 -0
  1280. package/dist/svelte/session-state.js +23 -0
  1281. package/dist/svelte/sync-status.d.ts +11 -0
  1282. package/dist/svelte/sync-status.d.ts.map +1 -0
  1283. package/dist/svelte/sync-status.js +15 -0
  1284. package/dist/testing/client-migrations.d.ts +29 -0
  1285. package/dist/testing/client-migrations.d.ts.map +1 -0
  1286. package/dist/testing/client-migrations.js +34 -0
  1287. package/dist/testing/client-migrations.js.map +1 -0
  1288. package/dist/testing/fixtures/basic/schema.d.ts +11 -0
  1289. package/dist/testing/fixtures/basic/schema.d.ts.map +1 -0
  1290. package/dist/testing/fixtures/basic/schema.js +10 -0
  1291. package/dist/testing/fixtures/basic/schema.js.map +1 -0
  1292. package/dist/testing/fixtures/with-bigint/schema.d.ts +18 -0
  1293. package/dist/testing/fixtures/with-bigint/schema.d.ts.map +1 -0
  1294. package/dist/testing/fixtures/with-bigint/schema.js +15 -0
  1295. package/dist/testing/fixtures/with-bigint/schema.js.map +1 -0
  1296. package/dist/testing/fixtures/with-defaults/schema.d.ts +385 -0
  1297. package/dist/testing/fixtures/with-defaults/schema.d.ts.map +1 -0
  1298. package/dist/testing/fixtures/with-defaults/schema.js +15 -0
  1299. package/dist/testing/fixtures/with-defaults/schema.js.map +1 -0
  1300. package/dist/testing/fixtures/with-enum-payload-defaults/schema.d.ts +4 -0
  1301. package/dist/testing/fixtures/with-enum-payload-defaults/schema.d.ts.map +1 -0
  1302. package/dist/testing/fixtures/with-enum-payload-defaults/schema.js +22 -0
  1303. package/dist/testing/fixtures/with-enum-payload-defaults/schema.js.map +1 -0
  1304. package/dist/testing/fixtures/with-enum-payload-required-null/schema.d.ts +4 -0
  1305. package/dist/testing/fixtures/with-enum-payload-required-null/schema.d.ts.map +1 -0
  1306. package/dist/testing/fixtures/with-enum-payload-required-null/schema.js +14 -0
  1307. package/dist/testing/fixtures/with-enum-payload-required-null/schema.js.map +1 -0
  1308. package/dist/testing/fixtures/with-enum-payload-wrong-tag/schema.d.ts +4 -0
  1309. package/dist/testing/fixtures/with-enum-payload-wrong-tag/schema.d.ts.map +1 -0
  1310. package/dist/testing/fixtures/with-enum-payload-wrong-tag/schema.js +14 -0
  1311. package/dist/testing/fixtures/with-enum-payload-wrong-tag/schema.js.map +1 -0
  1312. package/dist/testing/index.d.ts +6 -1
  1313. package/dist/testing/index.d.ts.map +1 -1
  1314. package/dist/testing/index.js +5 -1
  1315. package/dist/testing/index.js.map +1 -1
  1316. package/dist/testing/policy-test-app.d.ts +123 -0
  1317. package/dist/testing/policy-test-app.d.ts.map +1 -0
  1318. package/dist/testing/policy-test-app.js +215 -0
  1319. package/dist/testing/policy-test-app.js.map +1 -0
  1320. package/dist/testing/test-jazz.d.ts +106 -0
  1321. package/dist/testing/test-jazz.d.ts.map +1 -0
  1322. package/dist/testing/test-jazz.js +154 -0
  1323. package/dist/testing/test-jazz.js.map +1 -0
  1324. package/dist/testing/test-jwt-issuer.d.ts +19 -0
  1325. package/dist/testing/test-jwt-issuer.d.ts.map +1 -0
  1326. package/dist/testing/test-jwt-issuer.js +40 -0
  1327. package/dist/testing/test-jwt-issuer.js.map +1 -0
  1328. package/dist/text-field/index.d.ts +40 -0
  1329. package/dist/text-field/index.d.ts.map +1 -0
  1330. package/dist/text-field/index.js +129 -0
  1331. package/dist/text-field/index.js.map +1 -0
  1332. package/dist/thin/index.d.ts +84 -0
  1333. package/dist/thin/index.d.ts.map +1 -0
  1334. package/dist/thin/index.js +204 -0
  1335. package/dist/thin/index.js.map +1 -0
  1336. package/dist/thin/self-signed-token.d.ts +13 -0
  1337. package/dist/thin/self-signed-token.d.ts.map +1 -0
  1338. package/dist/thin/self-signed-token.js +84 -0
  1339. package/dist/thin/self-signed-token.js.map +1 -0
  1340. package/dist/thin/thin-runtime-source.d.ts +19 -0
  1341. package/dist/thin/thin-runtime-source.d.ts.map +1 -0
  1342. package/dist/thin/thin-runtime-source.js +66 -0
  1343. package/dist/thin/thin-runtime-source.js.map +1 -0
  1344. package/dist/thin/thin-runtime.d.ts +224 -0
  1345. package/dist/thin/thin-runtime.d.ts.map +1 -0
  1346. package/dist/thin/thin-runtime.js +1190 -0
  1347. package/dist/thin/thin-runtime.js.map +1 -0
  1348. package/dist/thin/wire.d.ts +160 -0
  1349. package/dist/thin/wire.d.ts.map +1 -0
  1350. package/dist/thin/wire.js +304 -0
  1351. package/dist/thin/wire.js.map +1 -0
  1352. package/dist/typed-app.d.ts +729 -0
  1353. package/dist/typed-app.d.ts.map +1 -0
  1354. package/dist/typed-app.js +789 -0
  1355. package/dist/typed-app.js.map +1 -0
  1356. package/dist/vue/app.d.ts +76 -0
  1357. package/dist/vue/app.d.ts.map +1 -0
  1358. package/dist/vue/app.js +100 -0
  1359. package/dist/vue/app.js.map +1 -0
  1360. package/dist/vue/create-jazz-client.d.ts +3 -0
  1361. package/dist/vue/create-jazz-client.d.ts.map +1 -0
  1362. package/dist/vue/create-jazz-client.js +2 -0
  1363. package/dist/vue/create-jazz-client.js.map +1 -0
  1364. package/dist/vue/index.d.ts +19 -0
  1365. package/dist/vue/index.d.ts.map +1 -0
  1366. package/dist/vue/index.js +13 -0
  1367. package/dist/vue/index.js.map +1 -0
  1368. package/dist/vue/provider.d.ts +87 -0
  1369. package/dist/vue/provider.d.ts.map +1 -0
  1370. package/dist/vue/provider.js +225 -0
  1371. package/dist/vue/provider.js.map +1 -0
  1372. package/dist/vue/session.d.ts +39 -0
  1373. package/dist/vue/session.d.ts.map +1 -0
  1374. package/dist/vue/session.js +42 -0
  1375. package/dist/vue/session.js.map +1 -0
  1376. package/dist/vue/use-account-state.d.ts +5 -0
  1377. package/dist/vue/use-account-state.d.ts.map +1 -0
  1378. package/dist/vue/use-account-state.js +10 -0
  1379. package/dist/vue/use-account-state.js.map +1 -0
  1380. package/dist/vue/use-all.d.ts +61 -0
  1381. package/dist/vue/use-all.d.ts.map +1 -0
  1382. package/dist/vue/use-all.js +104 -0
  1383. package/dist/vue/use-all.js.map +1 -0
  1384. package/dist/vue/use-local-first-auth.d.ts +53 -0
  1385. package/dist/vue/use-local-first-auth.d.ts.map +1 -0
  1386. package/dist/vue/use-local-first-auth.js +67 -0
  1387. package/dist/vue/use-local-first-auth.js.map +1 -0
  1388. package/dist/vue/use-one.d.ts +24 -0
  1389. package/dist/vue/use-one.d.ts.map +1 -0
  1390. package/dist/vue/use-one.js +17 -0
  1391. package/dist/vue/use-one.js.map +1 -0
  1392. package/dist/vue/use-sync-status.d.ts +9 -0
  1393. package/dist/vue/use-sync-status.d.ts.map +1 -0
  1394. package/dist/vue/use-sync-status.js +16 -0
  1395. package/dist/vue/use-sync-status.js.map +1 -0
  1396. package/dist/web/create-jazz-client.d.ts +8 -0
  1397. package/dist/web/create-jazz-client.d.ts.map +1 -0
  1398. package/dist/web/create-jazz-client.js +8 -0
  1399. package/dist/web/create-jazz-client.js.map +1 -0
  1400. package/dist/web/lazy-local-first.d.ts +8 -0
  1401. package/dist/web/lazy-local-first.d.ts.map +1 -0
  1402. package/dist/web/lazy-local-first.js +13 -0
  1403. package/dist/web/lazy-local-first.js.map +1 -0
  1404. package/dist/web/registered-jazz-client.d.ts +15 -0
  1405. package/dist/web/registered-jazz-client.d.ts.map +1 -0
  1406. package/dist/web/registered-jazz-client.js +35 -0
  1407. package/dist/web/registered-jazz-client.js.map +1 -0
  1408. package/dist/where-operators.d.ts +13 -0
  1409. package/dist/where-operators.d.ts.map +1 -0
  1410. package/dist/where-operators.js +70 -0
  1411. package/dist/where-operators.js.map +1 -0
  1412. package/dist/window-client-storage.d.ts +33 -0
  1413. package/dist/window-client-storage.d.ts.map +1 -0
  1414. package/dist/window-client-storage.js +88 -0
  1415. package/dist/window-client-storage.js.map +1 -0
  1416. package/dist/worker/jazz-broker-worker-core.d.ts +34 -0
  1417. package/dist/worker/jazz-broker-worker-core.d.ts.map +1 -0
  1418. package/dist/worker/jazz-broker-worker-core.js +2033 -0
  1419. package/dist/worker/jazz-broker-worker-core.js.map +1 -0
  1420. package/dist/worker/jazz-broker-worker.d.ts +2 -0
  1421. package/dist/worker/jazz-broker-worker.d.ts.map +1 -0
  1422. package/dist/worker/jazz-broker-worker.js +23997 -0
  1423. package/dist/worker/jazz_wasm_bg.wasm +0 -0
  1424. package/dist/worker/mutation-error-delivery.d.ts +8 -0
  1425. package/dist/worker/mutation-error-delivery.d.ts.map +1 -0
  1426. package/dist/worker/mutation-error-delivery.js +10 -0
  1427. package/dist/worker/mutation-error-delivery.js.map +1 -0
  1428. package/package.json +248 -30
  1429. package/bin/native/.gitkeep +0 -0
  1430. package/bin/native/jazz-tools-darwin-arm64 +0 -0
  1431. package/bin/native/jazz-tools-darwin-x64 +0 -0
  1432. package/bin/native/jazz-tools-linux-arm64 +0 -0
  1433. package/bin/native/jazz-tools-linux-x64 +0 -0
  1434. package/bin/native/jazz-tools-windows-x64.exe +0 -0
  1435. package/dist/cli.test.d.ts +0 -2
  1436. package/dist/cli.test.d.ts.map +0 -1
  1437. package/dist/cli.test.js +0 -154
  1438. package/dist/cli.test.js.map +0 -1
  1439. package/dist/codegen/codegen.test.d.ts +0 -2
  1440. package/dist/codegen/codegen.test.d.ts.map +0 -1
  1441. package/dist/codegen/codegen.test.js +0 -844
  1442. package/dist/codegen/codegen.test.js.map +0 -1
  1443. package/dist/codegen/index.d.ts +0 -18
  1444. package/dist/codegen/index.d.ts.map +0 -1
  1445. package/dist/codegen/index.js +0 -22
  1446. package/dist/codegen/index.js.map +0 -1
  1447. package/dist/codegen/query-builder-generator.d.ts +0 -23
  1448. package/dist/codegen/query-builder-generator.d.ts.map +0 -1
  1449. package/dist/codegen/query-builder-generator.js +0 -325
  1450. package/dist/codegen/query-builder-generator.js.map +0 -1
  1451. package/dist/codegen/type-generator.d.ts +0 -29
  1452. package/dist/codegen/type-generator.d.ts.map +0 -1
  1453. package/dist/codegen/type-generator.js +0 -226
  1454. package/dist/codegen/type-generator.js.map +0 -1
  1455. package/dist/dsl.test.d.ts +0 -2
  1456. package/dist/dsl.test.d.ts.map +0 -1
  1457. package/dist/dsl.test.js +0 -51
  1458. package/dist/dsl.test.js.map +0 -1
  1459. package/dist/permissions/index.test.d.ts +0 -2
  1460. package/dist/permissions/index.test.d.ts.map +0 -1
  1461. package/dist/permissions/index.test.js +0 -830
  1462. package/dist/permissions/index.test.js.map +0 -1
  1463. package/dist/permissions/type-inference.test.d.ts +0 -2
  1464. package/dist/permissions/type-inference.test.d.ts.map +0 -1
  1465. package/dist/permissions/type-inference.test.js +0 -151
  1466. package/dist/permissions/type-inference.test.js.map +0 -1
  1467. package/dist/react/create-jazz-client.integration.test.d.ts +0 -2
  1468. package/dist/react/create-jazz-client.integration.test.d.ts.map +0 -1
  1469. package/dist/react/create-jazz-client.integration.test.js +0 -84
  1470. package/dist/react/create-jazz-client.integration.test.js.map +0 -1
  1471. package/dist/react/create-jazz-client.test.d.ts +0 -2
  1472. package/dist/react/create-jazz-client.test.d.ts.map +0 -1
  1473. package/dist/react/create-jazz-client.test.js +0 -133
  1474. package/dist/react/create-jazz-client.test.js.map +0 -1
  1475. package/dist/react/synthetic-user-switcher.d.ts +0 -9
  1476. package/dist/react/synthetic-user-switcher.d.ts.map +0 -1
  1477. package/dist/react/synthetic-user-switcher.js +0 -65
  1478. package/dist/react/synthetic-user-switcher.js.map +0 -1
  1479. package/dist/react/synthetic-users.d.ts +0 -2
  1480. package/dist/react/synthetic-users.d.ts.map +0 -1
  1481. package/dist/react/synthetic-users.js +0 -2
  1482. package/dist/react/synthetic-users.js.map +0 -1
  1483. package/dist/react/synthetic-users.test.d.ts +0 -2
  1484. package/dist/react/synthetic-users.test.d.ts.map +0 -1
  1485. package/dist/react/synthetic-users.test.js +0 -43
  1486. package/dist/react/synthetic-users.test.js.map +0 -1
  1487. package/dist/react/use-link-external-identity.d.ts +0 -25
  1488. package/dist/react/use-link-external-identity.d.ts.map +0 -1
  1489. package/dist/react/use-link-external-identity.js +0 -45
  1490. package/dist/react/use-link-external-identity.js.map +0 -1
  1491. package/dist/react-native/create-jazz-client.test.d.ts +0 -2
  1492. package/dist/react-native/create-jazz-client.test.d.ts.map +0 -1
  1493. package/dist/react-native/create-jazz-client.test.js +0 -162
  1494. package/dist/react-native/create-jazz-client.test.js.map +0 -1
  1495. package/dist/react-native/create-jazz-rn-runtime.d.ts +0 -13
  1496. package/dist/react-native/create-jazz-rn-runtime.d.ts.map +0 -1
  1497. package/dist/react-native/create-jazz-rn-runtime.js +0 -7
  1498. package/dist/react-native/create-jazz-rn-runtime.js.map +0 -1
  1499. package/dist/react-native/db.d.ts +0 -16
  1500. package/dist/react-native/db.d.ts.map +0 -1
  1501. package/dist/react-native/db.js +0 -50
  1502. package/dist/react-native/db.js.map +0 -1
  1503. package/dist/react-native/db.test.d.ts +0 -2
  1504. package/dist/react-native/db.test.d.ts.map +0 -1
  1505. package/dist/react-native/db.test.js +0 -150
  1506. package/dist/react-native/db.test.js.map +0 -1
  1507. package/dist/react-native/jazz-rn-runtime-adapter.d.ts +0 -56
  1508. package/dist/react-native/jazz-rn-runtime-adapter.d.ts.map +0 -1
  1509. package/dist/react-native/jazz-rn-runtime-adapter.js +0 -192
  1510. package/dist/react-native/jazz-rn-runtime-adapter.js.map +0 -1
  1511. package/dist/react-native/jazz-rn-runtime-adapter.test.d.ts +0 -2
  1512. package/dist/react-native/jazz-rn-runtime-adapter.test.d.ts.map +0 -1
  1513. package/dist/react-native/jazz-rn-runtime-adapter.test.js +0 -165
  1514. package/dist/react-native/jazz-rn-runtime-adapter.test.js.map +0 -1
  1515. package/dist/runtime/client-session.test.d.ts +0 -2
  1516. package/dist/runtime/client-session.test.d.ts.map +0 -1
  1517. package/dist/runtime/client-session.test.js +0 -84
  1518. package/dist/runtime/client-session.test.js.map +0 -1
  1519. package/dist/runtime/client.for-request.test.d.ts +0 -2
  1520. package/dist/runtime/client.for-request.test.d.ts.map +0 -1
  1521. package/dist/runtime/client.for-request.test.js +0 -171
  1522. package/dist/runtime/client.for-request.test.js.map +0 -1
  1523. package/dist/runtime/cloud-server.integration.test.d.ts +0 -2
  1524. package/dist/runtime/cloud-server.integration.test.d.ts.map +0 -1
  1525. package/dist/runtime/cloud-server.integration.test.js +0 -985
  1526. package/dist/runtime/cloud-server.integration.test.js.map +0 -1
  1527. package/dist/runtime/leader-lock.d.ts +0 -15
  1528. package/dist/runtime/leader-lock.d.ts.map +0 -1
  1529. package/dist/runtime/leader-lock.js +0 -49
  1530. package/dist/runtime/leader-lock.js.map +0 -1
  1531. package/dist/runtime/local-auth.d.ts +0 -32
  1532. package/dist/runtime/local-auth.d.ts.map +0 -1
  1533. package/dist/runtime/local-auth.js +0 -93
  1534. package/dist/runtime/local-auth.js.map +0 -1
  1535. package/dist/runtime/local-auth.test.d.ts +0 -2
  1536. package/dist/runtime/local-auth.test.d.ts.map +0 -1
  1537. package/dist/runtime/local-auth.test.js +0 -50
  1538. package/dist/runtime/local-auth.test.js.map +0 -1
  1539. package/dist/runtime/query-adapter.test.d.ts +0 -5
  1540. package/dist/runtime/query-adapter.test.d.ts.map +0 -1
  1541. package/dist/runtime/query-adapter.test.js +0 -1209
  1542. package/dist/runtime/query-adapter.test.js.map +0 -1
  1543. package/dist/runtime/row-transformer.test.d.ts +0 -5
  1544. package/dist/runtime/row-transformer.test.d.ts.map +0 -1
  1545. package/dist/runtime/row-transformer.test.js +0 -364
  1546. package/dist/runtime/row-transformer.test.js.map +0 -1
  1547. package/dist/runtime/subscription-manager.test.d.ts +0 -5
  1548. package/dist/runtime/subscription-manager.test.d.ts.map +0 -1
  1549. package/dist/runtime/subscription-manager.test.js +0 -120
  1550. package/dist/runtime/subscription-manager.test.js.map +0 -1
  1551. package/dist/runtime/sync-transport.d.ts +0 -163
  1552. package/dist/runtime/sync-transport.d.ts.map +0 -1
  1553. package/dist/runtime/sync-transport.js +0 -477
  1554. package/dist/runtime/sync-transport.js.map +0 -1
  1555. package/dist/runtime/sync-transport.test.d.ts +0 -2
  1556. package/dist/runtime/sync-transport.test.d.ts.map +0 -1
  1557. package/dist/runtime/sync-transport.test.js +0 -310
  1558. package/dist/runtime/sync-transport.test.js.map +0 -1
  1559. package/dist/runtime/tab-leader-election.d.ts +0 -97
  1560. package/dist/runtime/tab-leader-election.d.ts.map +0 -1
  1561. package/dist/runtime/tab-leader-election.js +0 -339
  1562. package/dist/runtime/tab-leader-election.js.map +0 -1
  1563. package/dist/runtime/tab-leader-election.test.d.ts +0 -2
  1564. package/dist/runtime/tab-leader-election.test.d.ts.map +0 -1
  1565. package/dist/runtime/tab-leader-election.test.js +0 -278
  1566. package/dist/runtime/tab-leader-election.test.js.map +0 -1
  1567. package/dist/runtime/testing/wasm-runtime-test-utils.d.ts +0 -13
  1568. package/dist/runtime/testing/wasm-runtime-test-utils.d.ts.map +0 -1
  1569. package/dist/runtime/testing/wasm-runtime-test-utils.js +0 -75
  1570. package/dist/runtime/testing/wasm-runtime-test-utils.js.map +0 -1
  1571. package/dist/runtime/utils.d.ts +0 -2
  1572. package/dist/runtime/utils.d.ts.map +0 -1
  1573. package/dist/runtime/utils.js +0 -16
  1574. package/dist/runtime/utils.js.map +0 -1
  1575. package/dist/runtime/value-converter.test.d.ts +0 -5
  1576. package/dist/runtime/value-converter.test.d.ts.map +0 -1
  1577. package/dist/runtime/value-converter.test.js +0 -212
  1578. package/dist/runtime/value-converter.test.js.map +0 -1
  1579. package/dist/runtime/worker-bridge.d.ts +0 -86
  1580. package/dist/runtime/worker-bridge.d.ts.map +0 -1
  1581. package/dist/runtime/worker-bridge.js +0 -250
  1582. package/dist/runtime/worker-bridge.js.map +0 -1
  1583. package/dist/runtime/worker-bridge.race-harness.test.d.ts +0 -2
  1584. package/dist/runtime/worker-bridge.race-harness.test.d.ts.map +0 -1
  1585. package/dist/runtime/worker-bridge.race-harness.test.js +0 -265
  1586. package/dist/runtime/worker-bridge.race-harness.test.js.map +0 -1
  1587. package/dist/runtime/worker-bridge.test.d.ts +0 -2
  1588. package/dist/runtime/worker-bridge.test.d.ts.map +0 -1
  1589. package/dist/runtime/worker-bridge.test.js +0 -233
  1590. package/dist/runtime/worker-bridge.test.js.map +0 -1
  1591. package/dist/sql-gen.d.ts +0 -4
  1592. package/dist/sql-gen.d.ts.map +0 -1
  1593. package/dist/sql-gen.js +0 -163
  1594. package/dist/sql-gen.js.map +0 -1
  1595. package/dist/sql-gen.test.d.ts +0 -2
  1596. package/dist/sql-gen.test.d.ts.map +0 -1
  1597. package/dist/sql-gen.test.js +0 -412
  1598. package/dist/sql-gen.test.js.map +0 -1
  1599. package/dist/subscriptions-orchestrator.integration.test.d.ts +0 -2
  1600. package/dist/subscriptions-orchestrator.integration.test.d.ts.map +0 -1
  1601. package/dist/subscriptions-orchestrator.integration.test.js +0 -194
  1602. package/dist/subscriptions-orchestrator.integration.test.js.map +0 -1
  1603. package/dist/subscriptions-orchestrator.test.d.ts +0 -2
  1604. package/dist/subscriptions-orchestrator.test.d.ts.map +0 -1
  1605. package/dist/subscriptions-orchestrator.test.js +0 -367
  1606. package/dist/subscriptions-orchestrator.test.js.map +0 -1
  1607. package/dist/svelte/SyntheticUserSwitcher.svelte +0 -121
  1608. package/dist/svelte/SyntheticUserSwitcher.svelte.d.ts +0 -11
  1609. package/dist/svelte/SyntheticUserSwitcher.svelte.d.ts.map +0 -1
  1610. package/dist/svelte/context.test.d.ts +0 -2
  1611. package/dist/svelte/context.test.d.ts.map +0 -1
  1612. package/dist/svelte/context.test.js +0 -51
  1613. package/dist/svelte/create-jazz-client.test.d.ts +0 -2
  1614. package/dist/svelte/create-jazz-client.test.d.ts.map +0 -1
  1615. package/dist/svelte/create-jazz-client.test.js +0 -50
  1616. package/dist/svelte/use-all.svelte.d.ts +0 -32
  1617. package/dist/svelte/use-all.svelte.d.ts.map +0 -1
  1618. package/dist/svelte/use-all.svelte.js +0 -61
  1619. package/dist/svelte/use-all.test.d.ts +0 -2
  1620. package/dist/svelte/use-all.test.d.ts.map +0 -1
  1621. package/dist/svelte/use-all.test.js +0 -154
  1622. package/dist/svelte/use-link-external-identity.d.ts +0 -25
  1623. package/dist/svelte/use-link-external-identity.d.ts.map +0 -1
  1624. package/dist/svelte/use-link-external-identity.js +0 -33
  1625. package/dist/svelte/use-link-external-identity.test.d.ts +0 -2
  1626. package/dist/svelte/use-link-external-identity.test.d.ts.map +0 -1
  1627. package/dist/svelte/use-link-external-identity.test.js +0 -97
  1628. package/dist/synthetic-user-switcher.d.ts +0 -16
  1629. package/dist/synthetic-user-switcher.d.ts.map +0 -1
  1630. package/dist/synthetic-user-switcher.js +0 -134
  1631. package/dist/synthetic-user-switcher.js.map +0 -1
  1632. package/dist/synthetic-users.d.ts +0 -32
  1633. package/dist/synthetic-users.d.ts.map +0 -1
  1634. package/dist/synthetic-users.js +0 -124
  1635. package/dist/synthetic-users.js.map +0 -1
  1636. package/dist/testing/fixtures/basic/app.d.ts +0 -55
  1637. package/dist/testing/fixtures/basic/app.d.ts.map +0 -1
  1638. package/dist/testing/fixtures/basic/app.js +0 -176
  1639. package/dist/testing/fixtures/basic/app.js.map +0 -1
  1640. package/dist/testing/fixtures/basic/current.d.ts +0 -2
  1641. package/dist/testing/fixtures/basic/current.d.ts.map +0 -1
  1642. package/dist/testing/fixtures/basic/current.js +0 -6
  1643. package/dist/testing/fixtures/basic/current.js.map +0 -1
  1644. package/dist/testing/index.test.d.ts +0 -2
  1645. package/dist/testing/index.test.d.ts.map +0 -1
  1646. package/dist/testing/index.test.js +0 -234
  1647. package/dist/testing/index.test.js.map +0 -1
  1648. package/dist/testing/local-jazz-server.d.ts +0 -34
  1649. package/dist/testing/local-jazz-server.d.ts.map +0 -1
  1650. package/dist/testing/local-jazz-server.js +0 -313
  1651. package/dist/testing/local-jazz-server.js.map +0 -1
  1652. package/dist/worker/jazz-worker.d.ts +0 -9
  1653. package/dist/worker/jazz-worker.d.ts.map +0 -1
  1654. package/dist/worker/jazz-worker.js +0 -516
  1655. package/dist/worker/jazz-worker.js.map +0 -1
  1656. package/dist/worker/jazz-worker.ts +0 -581
  1657. package/dist/worker/worker-protocol.d.ts +0 -136
  1658. package/dist/worker/worker-protocol.d.ts.map +0 -1
  1659. package/dist/worker/worker-protocol.js +0 -7
  1660. package/dist/worker/worker-protocol.js.map +0 -1
@@ -0,0 +1,836 @@
1
+ import { copyAccountConfigAdmission } from "../../accounts/config-capability.js";
2
+ import { reportCredentialRefusal } from "../client.js";
3
+ import { resolveClientInternalSessionSync } from "../client-session.js";
4
+ import { getTrustedReservedSession, setTrustedReservedSession } from "../db-internal-session.js";
5
+ import { CONNECTED, CONNECTING, offlineLink } from "../sync-status.js";
6
+ import { reloadAfterStorageInvalidation } from "../browser-storage-invalidation.js";
7
+ import { runCleanupSteps } from "../run-cleanup-steps.js";
8
+ import { BrowserWorkerUnresponsiveError } from "../native-runtime/browser-worker-protocol.js";
9
+ import { StoreHeldByAnotherTabError } from "../store-held-by-another-tab-error.js";
10
+ import { ConnectionManager, } from "./types.js";
11
+ import { registerBrowserInspectorControl } from "../../dev/inspector-overlay/browser-control-registry.js";
12
+ import { assertBrowserStorageOwnerUnchanged } from "../browser-worker-config.js";
13
+ import { waitForInspectorOpening } from "../native-runtime/inspector-control-lifecycle.js";
14
+ import { toError } from "../util.js";
15
+ /**
16
+ * Every persistent browser tab is an in-memory client of one SharedWorker
17
+ * runtime. There are no tab roles, elections, or follower handoffs. SharedWorker
18
+ * identity supplies the normal namespace-wide singleton, while a physical-root
19
+ * Web Lock fences retry generations and separately loaded worker assets.
20
+ */
21
+ export class BrowserConnectionManager extends ConnectionManager {
22
+ earlyLease;
23
+ connection = null;
24
+ connectionReady = null;
25
+ initialExplicitOfflineStateKnown = false;
26
+ connectionError = null;
27
+ disconnected = false;
28
+ /** Reported by the worker that owns the upstream socket. */
29
+ workerRemoteLink = "connecting";
30
+ /** The worker's link status; absent from an older worker. */
31
+ workerLinkStatus = null;
32
+ workerRemoteLinkListeners = new Set();
33
+ reconnectWaiters = new Set();
34
+ transportTransition = Promise.resolve();
35
+ storageReset = null;
36
+ storageResetError = null;
37
+ connectionScope = null;
38
+ unregisterInspectorControl = null;
39
+ browserConnectionInput = null;
40
+ /** A failed follower owns no recoverable port; reconnect must mint a new one. */
41
+ recoverableConnectionFailure = false;
42
+ workerRecoveryTimer = null;
43
+ workerRecoveryDelayMs = 250;
44
+ observedConfigurationAdmissionFailure = null;
45
+ configurationAdmissionRetry = null;
46
+ readinessByConnection = new WeakMap();
47
+ /** Waiting for a refused connection's replacement (see `admissionRefused`). */
48
+ replacementWaiters = new Set();
49
+ /** Runs out how long a refused tab waits quietly (see `admissionRefused`). */
50
+ heldPatienceTimer = null;
51
+ /** The other tab has held the store past that patience: report it. */
52
+ heldTooLong = false;
53
+ shutdownStarted = false;
54
+ shutdownFailure = null;
55
+ constructor(host,
56
+ /** A lease whose acquisition already started the worker, in parallel with runtime loading. */
57
+ earlyLease) {
58
+ super(host);
59
+ this.earlyLease = earlyLease;
60
+ }
61
+ async start() {
62
+ // This resolves before public Db construction returns, preserving the
63
+ // synchronous application mutation API while leasing the TxId node before
64
+ // the foreground runtime can exist or mint a transaction.
65
+ this.foregroundNodeLease = await (this.earlyLease ??
66
+ this.host.runtimeSource.acquireBrowserForegroundNodeLease(this.host.config));
67
+ }
68
+ getClient(schema) {
69
+ if (this.shutdownStarted)
70
+ throw new Error("Browser connection manager is shut down");
71
+ if (this.storageResetError)
72
+ throw this.storageResetError;
73
+ if (this.storageReset)
74
+ throw new Error("Browser storage reset is still in progress");
75
+ return super.getClient(schema);
76
+ }
77
+ onClientCreated(input) {
78
+ this.browserConnectionInput = input;
79
+ this.openBrowserWorkerConnection();
80
+ }
81
+ openBrowserWorkerConnection() {
82
+ if (this.shutdownStarted)
83
+ throw new Error("Browser connection manager is shut down");
84
+ const input = this.browserConnectionInput;
85
+ if (!input)
86
+ throw new Error("Browser worker connection requires an initialized client");
87
+ // An Inspector receipt authenticates one worker connection, not a durable
88
+ // database coordinate. Replacing a failed follower must therefore revoke
89
+ // the old receipt before the new generation can begin serving reads.
90
+ this.host.clearAuthenticatedInspectorLocalReads();
91
+ const workerConfig = { ...this.host.config };
92
+ copyAccountConfigAdmission(this.host.config, workerConfig);
93
+ setTrustedReservedSession(workerConfig, getTrustedReservedSession(this.host.config));
94
+ let scope;
95
+ const connection = this.host.runtimeSource.createBrowserWorkerConnection({
96
+ config: workerConfig,
97
+ schema: input.schema,
98
+ client: input.client,
99
+ onAuthFailure: (reason) => {
100
+ // A tab hears of a refusal from its worker, not from its own runtime.
101
+ reportCredentialRefusal(input.client, reason);
102
+ this.host.markUnauthenticated(reason);
103
+ },
104
+ onAuthRestored: () => this.host.clearAuthError(),
105
+ onExplicitOfflineChange: (offline) => this.setExplicitOffline(connection, offline),
106
+ onRemoteLinkChange: (state, link) => this.setWorkerRemoteLink(connection, state, link),
107
+ onFailure: (error) => this.observeConnectionFailure(connection, toError(error)),
108
+ onStorageReset: (resetId) => this.beginStorageReset(scope, resetId),
109
+ onStorageInvalidated: () => this.reloadAfterStorageInvalidation(connection),
110
+ });
111
+ scope = {
112
+ connection,
113
+ lease: this.foregroundNodeLease,
114
+ inspectorAttachment: workerConfig.runtimeSources?.inspectorBinding !== undefined,
115
+ resetReason: null,
116
+ leaseWorkerReplaced: false,
117
+ };
118
+ this.connectionScope = scope;
119
+ this.connection = connection;
120
+ this.wakeReplacementWaiters();
121
+ this.setWorkerRemoteLink(connection, "connecting");
122
+ this.observedConfigurationAdmissionFailure = null;
123
+ this.unregisterInspectorControl?.();
124
+ this.unregisterInspectorControl = registerBrowserInspectorControl((signal) => connection.openInspectorControlPort(signal), () => this.host.config);
125
+ this.initialExplicitOfflineStateKnown = false;
126
+ const readiness = connection.ready();
127
+ this.readinessByConnection.set(connection, readiness);
128
+ this.connectionReady = readiness.then(() => {
129
+ // Shutdown may already own this scope while follower init finishes.
130
+ // Keep its lease-owner evidence even after the manager detaches it.
131
+ const realm = connection.getWorkerRealmId?.();
132
+ scope.leaseWorkerReplaced =
133
+ realm !== undefined &&
134
+ scope.lease?.workerRealmId !== undefined &&
135
+ realm !== scope.lease.workerRealmId;
136
+ if (this.connection !== connection)
137
+ return;
138
+ const inspectorPhysicalDbName = connection.getAuthenticatedInspectorAttachmentPhysicalDbName?.();
139
+ if (inspectorPhysicalDbName) {
140
+ this.host.enableAuthenticatedInspectorLocalReads(inspectorPhysicalDbName);
141
+ }
142
+ // The worker sends an initial transport-state event before resolving
143
+ // follower init. Once this resolves, this manager has an authoritative
144
+ // namespace-wide explicit-offline snapshot.
145
+ this.initialExplicitOfflineStateKnown = true;
146
+ this.connectionError = null;
147
+ this.recoverableConnectionFailure = false;
148
+ this.clearWorkerRecoveryTimer();
149
+ this.workerRecoveryDelayMs = 250;
150
+ this.clearHeldPatience();
151
+ }, (error) => {
152
+ this.observeConnectionFailure(connection, toError(error));
153
+ if (this.connection !== connection)
154
+ return;
155
+ // `connectionReady` is also observed by passive readiness consumers
156
+ // (for example the initial offline-state probe). Keep it a settled
157
+ // notification, not a detached rejected promise. Public operations
158
+ // call ensureReady(), which rethrows this stored error below.
159
+ });
160
+ if (this.disconnected) {
161
+ const ready = this.connectionReady;
162
+ void this.enqueueTransportTransition(async () => {
163
+ await ready;
164
+ await connection.disconnect();
165
+ }).catch(() => undefined);
166
+ }
167
+ return connection;
168
+ }
169
+ observeConnectionFailure(connection, error) {
170
+ if (this.shutdownFailure?.connection === connection) {
171
+ if (error instanceof BrowserWorkerUnresponsiveError)
172
+ this.shutdownFailure.abandon(error);
173
+ return;
174
+ }
175
+ if (this.connection !== connection)
176
+ return;
177
+ this.connectionError = error;
178
+ this.recoverableConnectionFailure = true;
179
+ this.rejectReconnectWaiters(error);
180
+ this.notifyWorkerRemoteLink();
181
+ const refused = this.admissionRefused(connection);
182
+ if (refused)
183
+ this.startHeldPatience();
184
+ if (error instanceof BrowserWorkerUnresponsiveError || refused)
185
+ this.scheduleWorkerRecovery(connection);
186
+ }
187
+ /**
188
+ * Wait quietly for the other tab to let go for this long: following a
189
+ * sign-up takes it moments, and an abruptly closed tab is noticed by the
190
+ * worker as soon as the browser drops the page.
191
+ */
192
+ static HELD_BY_ANOTHER_TAB_PATIENCE_MS = 30_000;
193
+ startHeldPatience() {
194
+ if (this.heldPatienceTimer !== null || this.heldTooLong)
195
+ return;
196
+ this.heldPatienceTimer = setTimeout(() => {
197
+ this.heldPatienceTimer = null;
198
+ if (this.shutdownStarted || this.host.isShuttingDown)
199
+ return;
200
+ // Still waiting: the other tab is frozen in the background, or never
201
+ // follows (another build). Say so, and fail what waits, so the app can
202
+ // ask the user to close it; the retries go on.
203
+ this.heldTooLong = true;
204
+ this.wakeReplacementWaiters();
205
+ this.notifyWorkerRemoteLink();
206
+ }, BrowserConnectionManager.HELD_BY_ANOTHER_TAB_PATIENCE_MS);
207
+ }
208
+ clearHeldPatience() {
209
+ if (this.heldPatienceTimer !== null)
210
+ clearTimeout(this.heldPatienceTimer);
211
+ this.heldPatienceTimer = null;
212
+ if (!this.heldTooLong)
213
+ return;
214
+ this.heldTooLong = false;
215
+ this.notifyWorkerRemoteLink();
216
+ }
217
+ /**
218
+ * The worker refused this tab because another tab holds this account's
219
+ * store under another sign-in: a guest who just signed up here, while
220
+ * another tab is still the guest. That tab follows the sign-up, or closes
221
+ * (the worker watches each tab's page lock), so this tab tries again on
222
+ * its own, meanwhile connecting rather than stopped: its writes wait for
223
+ * the worker in this tab, and its queries and waits go on once it joins.
224
+ * Past `HELD_BY_ANOTHER_TAB_PATIENCE_MS` it reports `held-by-another-tab`
225
+ * and fails those waits with a `StoreHeldByAnotherTabError`, still trying
226
+ * in the background. Any other refused configuration (an older deploy's
227
+ * schema) still fails visibly.
228
+ */
229
+ admissionRefused(connection) {
230
+ return !!connection?.waitsForAnotherSignIn?.();
231
+ }
232
+ /** Resolves once `failed` is no longer this tab's connection, it shuts down, or `signal` aborts. */
233
+ replacementOf(failed, signal) {
234
+ return new Promise((resolve) => {
235
+ const check = () => {
236
+ if (this.connection === failed &&
237
+ !this.heldTooLong &&
238
+ !this.shutdownStarted &&
239
+ !this.host.isShuttingDown &&
240
+ !signal?.aborted)
241
+ return;
242
+ this.replacementWaiters.delete(check);
243
+ signal?.removeEventListener("abort", check);
244
+ resolve();
245
+ };
246
+ this.replacementWaiters.add(check);
247
+ signal?.addEventListener("abort", check, { once: true });
248
+ check();
249
+ });
250
+ }
251
+ wakeReplacementWaiters() {
252
+ for (const check of [...this.replacementWaiters])
253
+ check();
254
+ }
255
+ scheduleWorkerRecovery(failed) {
256
+ if (this.workerRecoveryTimer !== null ||
257
+ this.shutdownStarted ||
258
+ this.host.isShuttingDown ||
259
+ this.storageReset ||
260
+ // A tab the inspector attached recovers only on an explicit call, but
261
+ // waiting for another tab's sign-in is no failure of its own.
262
+ (this.connectionScope?.inspectorAttachment && !this.admissionRefused(failed)))
263
+ return;
264
+ const delay = this.workerRecoveryDelayMs;
265
+ this.workerRecoveryDelayMs = Math.min(delay * 2, 30_000);
266
+ this.workerRecoveryTimer = setTimeout(() => {
267
+ this.workerRecoveryTimer = null;
268
+ void this.enqueueTransportTransition(async () => {
269
+ if (this.connection !== failed ||
270
+ this.shutdownStarted ||
271
+ this.host.isShuttingDown ||
272
+ this.storageReset)
273
+ return;
274
+ if (this.admissionRefused(failed)) {
275
+ await this.retryConfigurationAdmission(failed);
276
+ await this.connectionReady;
277
+ return;
278
+ }
279
+ if (!(this.connectionError instanceof BrowserWorkerUnresponsiveError))
280
+ return;
281
+ // Preserve the in-memory runtime, its transaction identities, and its
282
+ // pending durability waiters. Native transport replacement replays the
283
+ // retained outbox through the normal sync and permission path.
284
+ // Worker readiness is sufficient here: recovery also works offline.
285
+ this.reopenFailedFollower();
286
+ await this.connectionReady;
287
+ }).catch((error) => {
288
+ this.connectionError ??= toError(error);
289
+ this.notifyWorkerRemoteLink();
290
+ });
291
+ }, delay);
292
+ }
293
+ clearWorkerRecoveryTimer() {
294
+ if (this.workerRecoveryTimer !== null)
295
+ clearTimeout(this.workerRecoveryTimer);
296
+ this.workerRecoveryTimer = null;
297
+ }
298
+ async ensureReady(requirement, signal) {
299
+ if (this.host.isShuttingDown || signal?.aborted)
300
+ return;
301
+ const reset = this.storageReset;
302
+ // Capture before yielding: callers already waiting on a rejected attempt
303
+ // must see that rejection, even if a later API call starts a replacement.
304
+ let connection = reset ? null : this.connection;
305
+ const retry = connection !== null && this.observedConfigurationAdmissionFailure === connection;
306
+ await reset;
307
+ if (this.storageResetError)
308
+ throw this.storageResetError;
309
+ if (this.host.isShuttingDown || signal?.aborted)
310
+ return;
311
+ // Between a retry's shutdown of the refused connection and its
312
+ // replacement there is none: wait for the replacement.
313
+ connection ??= this.connection ?? (await this.configurationAdmissionRetry);
314
+ if (retry && connection)
315
+ connection = await this.retryConfigurationAdmission(connection);
316
+ if (this.host.isShuttingDown || signal?.aborted)
317
+ return;
318
+ for (;;) {
319
+ try {
320
+ await (connection ? this.readinessByConnection.get(connection) : this.connectionReady);
321
+ break;
322
+ }
323
+ catch (error) {
324
+ // A refused tab tries again by itself (see `admissionRefused`): wait
325
+ // for the attempt that joins, as for a reconnect.
326
+ if (connection && this.admissionRefused(connection) && !signal?.aborted) {
327
+ if (this.heldTooLong)
328
+ throw new StoreHeldByAnotherTabError(undefined, { cause: error });
329
+ await this.replacementOf(connection, signal);
330
+ if (this.host.isShuttingDown || this.shutdownStarted || signal?.aborted)
331
+ return;
332
+ connection = this.connection ?? (await this.configurationAdmissionRetry);
333
+ continue;
334
+ }
335
+ if (connection === this.connection &&
336
+ connection?.canRetryInitialConfigurationAdmission?.()) {
337
+ this.observedConfigurationAdmissionFailure = connection;
338
+ }
339
+ throw error;
340
+ }
341
+ }
342
+ await this.connectionReady;
343
+ if (this.host.isShuttingDown)
344
+ return;
345
+ if (this.connectionError)
346
+ throw this.connectionError;
347
+ if (requirement !== "runtime") {
348
+ for (;;) {
349
+ while (this.disconnected) {
350
+ await this.waitForReconnect(signal);
351
+ if (this.host.isShuttingDown || signal?.aborted)
352
+ return;
353
+ }
354
+ await this.transportTransition;
355
+ if (!this.disconnected || this.host.isShuttingDown || signal?.aborted)
356
+ break;
357
+ }
358
+ }
359
+ if (this.host.config.serverUrl && requirement === "server") {
360
+ await this.connection?.waitForServerConnection();
361
+ }
362
+ }
363
+ retryConfigurationAdmission(failed) {
364
+ if (this.configurationAdmissionRetry)
365
+ return this.configurationAdmissionRetry;
366
+ if (failed !== this.connection)
367
+ return Promise.resolve(this.connection);
368
+ const retry = (async () => {
369
+ await failed.shutdown();
370
+ if (this.host.isShuttingDown || failed !== this.connection)
371
+ return null;
372
+ this.connection = null;
373
+ this.connectionReady = null;
374
+ this.connectionError = null;
375
+ this.observedConfigurationAdmissionFailure = null;
376
+ return this.openBrowserWorkerConnection();
377
+ })();
378
+ this.configurationAdmissionRetry = retry;
379
+ void retry
380
+ .finally(() => {
381
+ if (this.configurationAdmissionRetry === retry)
382
+ this.configurationAdmissionRetry = null;
383
+ })
384
+ .catch(() => undefined);
385
+ return retry;
386
+ }
387
+ shouldDeferSubscriptionStart(requirement) {
388
+ return requirement === "server";
389
+ }
390
+ isExplicitlyOffline() {
391
+ return this.disconnected;
392
+ }
393
+ initialExplicitOfflineState() {
394
+ return this.initialExplicitOfflineStateKnown ? null : this.connectionReady;
395
+ }
396
+ async waitForReconnect(signal) {
397
+ if (signal?.aborted)
398
+ return;
399
+ if (!this.disconnected) {
400
+ await this.transportTransition;
401
+ if (this.connectionError)
402
+ throw this.connectionError;
403
+ if (!this.disconnected)
404
+ return;
405
+ }
406
+ await new Promise((resolve, reject) => {
407
+ let settled = false;
408
+ const finish = (error) => {
409
+ if (settled)
410
+ return;
411
+ settled = true;
412
+ this.reconnectWaiters.delete(finish);
413
+ signal?.removeEventListener("abort", onAbort);
414
+ if (error)
415
+ reject(error);
416
+ else
417
+ resolve();
418
+ };
419
+ const onAbort = () => finish();
420
+ signal?.addEventListener("abort", onAbort, { once: true });
421
+ this.reconnectWaiters.add(finish);
422
+ if (signal?.aborted)
423
+ finish();
424
+ else if (this.connectionError)
425
+ finish(this.connectionError);
426
+ });
427
+ }
428
+ async disconnect() {
429
+ if (!this.host.config.serverUrl) {
430
+ throw new Error("Db.disconnect() requires a configured serverUrl.");
431
+ }
432
+ await this.enqueueTransportTransition(async () => {
433
+ await this.connectionReady;
434
+ await this.connection?.disconnect();
435
+ // Report explicit offline only after the worker confirms disconnect.
436
+ this.disconnected = true;
437
+ this.publishExplicitOfflineState();
438
+ });
439
+ }
440
+ async reconnect() {
441
+ if (!this.host.config.serverUrl) {
442
+ throw new Error("Db.reconnect() requires a configured serverUrl.");
443
+ }
444
+ await this.enqueueTransportTransition(async () => {
445
+ if (this.shutdownStarted)
446
+ throw new Error("Browser connection manager is shut down");
447
+ if (this.recoverableConnectionFailure)
448
+ this.reopenFailedFollower();
449
+ await this.connectionReady;
450
+ if (this.connectionError)
451
+ throw this.connectionError;
452
+ const connection = this.connection;
453
+ if (!connection)
454
+ throw new Error("Browser worker connection is unavailable");
455
+ await connection.reconnect(JSON.stringify(runtimeAuth(this.host.config)), runtimeSessionClaims(this.host.config));
456
+ this.disconnected = false;
457
+ this.publishExplicitOfflineState();
458
+ });
459
+ if (!this.disconnected)
460
+ this.resolveReconnectWaiters();
461
+ }
462
+ updateAuth(auth) {
463
+ // The persistent root belongs to the principal that opened it. Check
464
+ // before mutating Db config or forwarding anything to the worker, so a
465
+ // rejected Alice -> Bob switch cannot expose Alice's local rows to Bob.
466
+ const nextConfig = {
467
+ ...this.host.config,
468
+ ...(auth.mode === "bearer"
469
+ ? { jwtToken: auth.jwtToken, cookieSession: undefined }
470
+ : { jwtToken: undefined, cookieSession: auth.cookieSession }),
471
+ };
472
+ setTrustedReservedSession(nextConfig, auth.mode === "bearer" ? auth.trustedReservedSession : undefined);
473
+ assertBrowserStorageOwnerUnchanged(this.host.config, nextConfig);
474
+ super.updateAuth(auth);
475
+ const connection = this.connection;
476
+ if (!connection)
477
+ return;
478
+ void connection
479
+ .updateAuth(JSON.stringify(runtimeAuth(nextConfig)), runtimeSessionClaims(nextConfig))
480
+ .catch((error) => {
481
+ this.observeConnectionFailure(connection, toError(error));
482
+ });
483
+ }
484
+ async deleteClientStorage() {
485
+ // A reset already in progress (e.g. another tab deleted the shared
486
+ // storage) has detached this Db's client and connection; it is the
487
+ // delete, so wait for it rather than reopening mid-reset.
488
+ if (this.storageReset)
489
+ return this.storageReset;
490
+ // A Db that hasn't read or written yet has no worker connection, and
491
+ // without one there would be nothing to delete through: open it, as the
492
+ // direct manager opens its client, so the delete reaches the storage.
493
+ if (!this.connection && !this.getCurrentClient())
494
+ this.getClient({});
495
+ await this.connectionReady;
496
+ if (!this.connection)
497
+ throw new Error("deleteClientStorage(): the browser worker is not connected");
498
+ await this.connection?.deleteStorage();
499
+ await this.storageReset;
500
+ }
501
+ async openInspectorControlPort(signal) {
502
+ await waitForInspectorOpening(this.connectionReady ?? Promise.resolve(), signal);
503
+ if (!this.connection)
504
+ throw new Error("Shared browser runtime is not connected");
505
+ return this.connection.openInspectorControlPort(signal);
506
+ }
507
+ beginStorageReset(scope, resetId) {
508
+ if (scope.resetReason ||
509
+ (this.connectionScope !== scope && this.shutdownFailure?.scope !== scope))
510
+ return;
511
+ scope.resetReason = new Error(`Browser foreground lease released after storage reset ${resetId}`);
512
+ this.clearWorkerRecoveryTimer();
513
+ this.host.clearAuthenticatedInspectorLocalReads();
514
+ this.connection = null;
515
+ this.connectionReady = null;
516
+ this.foregroundNodeLease = undefined;
517
+ this.initialExplicitOfflineStateKnown = false;
518
+ const client = this.detachClient();
519
+ const reset = runCleanupSteps([
520
+ () => client?.discard(),
521
+ () => scope.lease?.releaseAfterStorageReset(scope.resetReason),
522
+ () => {
523
+ if (this.shutdownFailure?.scope === scope)
524
+ this.shutdownFailure.reset();
525
+ },
526
+ () => scope.connection.shutdown(),
527
+ async () => {
528
+ if (this.shutdownStarted || this.connectionScope !== scope)
529
+ return;
530
+ if (scope.inspectorAttachment) {
531
+ this.storageResetError = new Error("Inspector storage was reset; a new attachment is required");
532
+ return;
533
+ }
534
+ const successor = await this.host.runtimeSource.acquireBrowserForegroundNodeLease(this.host.config);
535
+ if (this.shutdownStarted || this.connectionScope !== scope)
536
+ await successor.retire();
537
+ else
538
+ this.foregroundNodeLease = successor;
539
+ },
540
+ ]).finally(() => {
541
+ if (this.storageReset !== reset)
542
+ return;
543
+ this.storageReset = null;
544
+ if (this.connectionScope === scope)
545
+ this.connectionScope = null;
546
+ });
547
+ this.storageReset = reset;
548
+ // A reset received by another tab has no direct promise consumer yet.
549
+ // Retain its failure for subsequent synchronous client access/readiness.
550
+ void reset.catch((error) => {
551
+ this.storageResetError ??= toError(error);
552
+ });
553
+ }
554
+ /**
555
+ * A follower transport failure closes its MessagePort by design. Reusing the
556
+ * old wrapper would only repeat its stored failure, so explicit reconnect
557
+ * acquires a new follower against the same durable SharedWorker namespace.
558
+ */
559
+ reopenFailedFollower() {
560
+ if (!this.recoverableConnectionFailure)
561
+ return;
562
+ this.clearWorkerRecoveryTimer();
563
+ this.host.clearAuthenticatedInspectorLocalReads();
564
+ this.connection = null;
565
+ this.connectionReady = null;
566
+ this.connectionError = null;
567
+ this.initialExplicitOfflineStateKnown = false;
568
+ this.recoverableConnectionFailure = false;
569
+ this.openBrowserWorkerConnection();
570
+ }
571
+ reloadAfterStorageInvalidation(connection) {
572
+ if (this.connection !== connection)
573
+ return;
574
+ this.connectionError = new Error("IndexedDB storage was externally invalidated");
575
+ reloadAfterStorageInvalidation();
576
+ }
577
+ async waitForPendingWrites() {
578
+ await this.connection?.waitForPendingWrites();
579
+ }
580
+ async shutdown() {
581
+ if (this.shutdownStarted)
582
+ return;
583
+ this.shutdownStarted = true;
584
+ this.clearWorkerRecoveryTimer();
585
+ if (this.heldPatienceTimer !== null)
586
+ clearTimeout(this.heldPatienceTimer);
587
+ this.heldPatienceTimer = null;
588
+ this.wakeReplacementWaiters();
589
+ const connection = this.connection;
590
+ const scope = this.connectionScope;
591
+ const admissionError = this.connectionError;
592
+ this.connection = null;
593
+ this.connectionReady = null;
594
+ this.browserConnectionInput = null;
595
+ this.initialExplicitOfflineStateKnown = false;
596
+ this.resolveReconnectWaiters();
597
+ const unregisterInspectorControl = this.unregisterInspectorControl;
598
+ this.unregisterInspectorControl = null;
599
+ const lease = this.foregroundNodeLease;
600
+ this.foregroundNodeLease = undefined;
601
+ const client = this.getCurrentClient();
602
+ let workerFailure = null;
603
+ let flushFailed = false;
604
+ let notifyAbandoned;
605
+ const abandoned = new Promise((resolve) => {
606
+ notifyAbandoned = resolve;
607
+ });
608
+ const abandon = (error) => {
609
+ if (workerFailure)
610
+ return;
611
+ workerFailure = error;
612
+ // Shutdown owns this lifetime now. Disable minting before even a best-effort
613
+ // retirement can transfer ownership; a mere reconnect never reaches here.
614
+ try {
615
+ this.detachClient()?.discard();
616
+ }
617
+ catch {
618
+ // The causal worker failure remains first even if local disposal fails.
619
+ }
620
+ finally {
621
+ lease?.abandonAfterWorkerFailure(error);
622
+ notifyAbandoned();
623
+ }
624
+ };
625
+ this.shutdownFailure = { connection, scope, abandon, reset: notifyAbandoned };
626
+ if (admissionError instanceof BrowserWorkerUnresponsiveError)
627
+ abandon(admissionError);
628
+ try {
629
+ await runCleanupSteps([
630
+ () => {
631
+ if (workerFailure)
632
+ throw workerFailure;
633
+ },
634
+ () => unregisterInspectorControl?.(),
635
+ () => this.storageReset ?? undefined,
636
+ async () => {
637
+ if (workerFailure)
638
+ throw workerFailure;
639
+ if (scope?.resetReason)
640
+ return;
641
+ // Configuration rejection is not a dead realm: skip the absent follower
642
+ // flush, but retain the lease's ordinary clean-return semantics.
643
+ if (admissionError)
644
+ return;
645
+ try {
646
+ await Promise.race([
647
+ connection?.flushLocal(),
648
+ abandoned.then(() => {
649
+ if (workerFailure)
650
+ throw workerFailure;
651
+ }),
652
+ ]);
653
+ }
654
+ catch (error) {
655
+ flushFailed = true;
656
+ if (workerFailure)
657
+ throw workerFailure;
658
+ if (error instanceof BrowserWorkerUnresponsiveError)
659
+ abandon(error);
660
+ throw error;
661
+ }
662
+ },
663
+ async () => {
664
+ if (workerFailure)
665
+ throw workerFailure;
666
+ if (scope?.resetReason)
667
+ return;
668
+ if (!lease)
669
+ return;
670
+ let finishFailed = false;
671
+ let finishError;
672
+ const finish = async () => {
673
+ try {
674
+ const runtime = client?.getRuntime();
675
+ if (!runtime) {
676
+ if (flushFailed)
677
+ await lease.retire();
678
+ else
679
+ await lease.returnWithHighWater(lease.confirmedTxTime);
680
+ }
681
+ else if (!runtime.quiesceForegroundTxTimeHighWater) {
682
+ await lease.retire();
683
+ }
684
+ else {
685
+ // Even after an ordinary flush failure, close mutation admission
686
+ // and drain started writes before releasing this identity. A
687
+ // failed flush cannot establish a clean durable handoff.
688
+ const highWater = await runtime.quiesceForegroundTxTimeHighWater();
689
+ if (scope?.resetReason)
690
+ return;
691
+ if (scope?.leaseWorkerReplaced && lease.releaseAfterWorkerReplacement) {
692
+ lease.releaseAfterWorkerReplacement(new Error("Foreground lease owner was replaced"));
693
+ }
694
+ else if (flushFailed)
695
+ await lease.retire();
696
+ else
697
+ await lease.returnWithHighWater(highWater);
698
+ }
699
+ }
700
+ catch (error) {
701
+ if (error === scope?.resetReason)
702
+ return;
703
+ finishFailed = true;
704
+ finishError = workerFailure ?? error;
705
+ // Abandonment rejects this fallback too; never replace the first
706
+ // failure or retry an unknown clean return.
707
+ await lease.retire().catch(() => undefined);
708
+ throw finishError;
709
+ }
710
+ };
711
+ // A causal failure may arrive while high-water capture or lease finish
712
+ // is already in flight. Its background work cannot hold shutdown open.
713
+ await Promise.race([
714
+ finish(),
715
+ abandoned.then(() => {
716
+ if (finishFailed)
717
+ throw finishError;
718
+ if (workerFailure)
719
+ throw workerFailure;
720
+ }),
721
+ ]);
722
+ },
723
+ () => {
724
+ // The tab view is non-durable; only its worker owns persistence shutdown.
725
+ this.detachClient()?.discard();
726
+ },
727
+ () => super.shutdown(),
728
+ () => (scope?.resetReason ? undefined : connection?.shutdown()),
729
+ () => this.storageReset ?? undefined,
730
+ () => {
731
+ if (workerFailure)
732
+ throw workerFailure;
733
+ },
734
+ ]);
735
+ }
736
+ finally {
737
+ this.shutdownFailure = null;
738
+ if (this.connectionScope === scope)
739
+ this.connectionScope = null;
740
+ }
741
+ }
742
+ resolveReconnectWaiters() {
743
+ const waiters = [...this.reconnectWaiters];
744
+ this.reconnectWaiters.clear();
745
+ for (const settle of waiters)
746
+ settle();
747
+ }
748
+ rejectReconnectWaiters(error) {
749
+ const waiters = [...this.reconnectWaiters];
750
+ this.reconnectWaiters.clear();
751
+ for (const settle of waiters)
752
+ settle(error);
753
+ }
754
+ /**
755
+ * A persistent browser namespace has one worker-owned upstream connection.
756
+ * The initiating tab receives the RPC result too, but every attached tab
757
+ * must make the same explicit-offline choice for its reads.
758
+ */
759
+ setExplicitOffline(connection, offline) {
760
+ if (this.connection !== connection)
761
+ return;
762
+ this.disconnected = offline;
763
+ this.publishExplicitOfflineState();
764
+ if (!offline)
765
+ this.resolveReconnectWaiters();
766
+ }
767
+ transportLinkState() {
768
+ // A failed follower cannot receive the worker's answer.
769
+ if (this.heldTooLong)
770
+ return "unavailable";
771
+ if (this.connectionError && this.admissionRefused(this.connection))
772
+ return "connecting";
773
+ return this.connectionError ? "unavailable" : this.workerRemoteLink;
774
+ }
775
+ onTransportLinkStateChange(listener, signal) {
776
+ if (signal.aborted)
777
+ return;
778
+ this.workerRemoteLinkListeners.add(listener);
779
+ signal.addEventListener("abort", () => this.workerRemoteLinkListeners.delete(listener), {
780
+ once: true,
781
+ });
782
+ }
783
+ transportLinkStatus() {
784
+ // A failed follower cannot receive the worker's answer.
785
+ if (this.heldTooLong)
786
+ return offlineLink("held-by-another-tab", true);
787
+ if (this.connectionError && this.admissionRefused(this.connection))
788
+ return CONNECTING;
789
+ if (this.connectionError)
790
+ return offlineLink("stopped");
791
+ // This Db has a server configured, so a worker that has not dialled yet
792
+ // (it may still wait for a credential) is about to connect, not local-only.
793
+ if (this.workerLinkStatus) {
794
+ return this.workerLinkStatus.state === "local-only" ? CONNECTING : this.workerLinkStatus;
795
+ }
796
+ switch (this.workerRemoteLink) {
797
+ case "connected":
798
+ return CONNECTED;
799
+ case "unavailable":
800
+ return offlineLink("network");
801
+ default:
802
+ return CONNECTING;
803
+ }
804
+ }
805
+ setWorkerRemoteLink(connection, state, link = null) {
806
+ if (this.connection !== connection)
807
+ return;
808
+ this.workerRemoteLink = state;
809
+ this.workerLinkStatus = link;
810
+ this.notifyWorkerRemoteLink();
811
+ }
812
+ notifyWorkerRemoteLink() {
813
+ for (const listener of [...this.workerRemoteLinkListeners])
814
+ listener();
815
+ this.notifySyncStatus();
816
+ }
817
+ enqueueTransportTransition(run) {
818
+ const transition = this.transportTransition.then(run, run);
819
+ this.transportTransition = transition.catch(() => undefined);
820
+ return transition;
821
+ }
822
+ }
823
+ function runtimeAuth(config) {
824
+ return {
825
+ jwt_token: config.jwtToken ?? null,
826
+ ...(config.adminSecret ? { admin_secret: config.adminSecret } : {}),
827
+ ...(config.cookieSession ? { backend_session: config.cookieSession } : {}),
828
+ };
829
+ }
830
+ function runtimeSessionClaims(config) {
831
+ return (resolveClientInternalSessionSync({
832
+ ...config,
833
+ trustedReservedSession: getTrustedReservedSession(config),
834
+ })?.claims ?? {});
835
+ }
836
+ //# sourceMappingURL=browser-connection-manager.js.map