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

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 (544) hide show
  1. package/README.md +1 -1
  2. package/bin/jazz-tools.js +3 -0
  3. package/dist/_dev/native-account-session.d.ts +8 -1
  4. package/dist/_dev/native-account-session.d.ts.map +1 -1
  5. package/dist/_dev/native-account-session.js +10 -0
  6. package/dist/_dev/native-account-session.js.map +1 -1
  7. package/dist/accounts/account-manager-core.d.ts +6 -0
  8. package/dist/accounts/account-manager-core.d.ts.map +1 -1
  9. package/dist/accounts/account-manager-core.js +26 -2
  10. package/dist/accounts/account-manager-core.js.map +1 -1
  11. package/dist/accounts/enrollment.d.ts.map +1 -1
  12. package/dist/accounts/enrollment.js +11 -4
  13. package/dist/accounts/enrollment.js.map +1 -1
  14. package/dist/accounts/exports.d.ts +1 -2
  15. package/dist/accounts/exports.d.ts.map +1 -1
  16. package/dist/accounts/exports.js +4 -1
  17. package/dist/accounts/exports.js.map +1 -1
  18. package/dist/accounts/persistence.d.ts +8 -0
  19. package/dist/accounts/persistence.d.ts.map +1 -1
  20. package/dist/accounts/persistence.js +12 -0
  21. package/dist/accounts/persistence.js.map +1 -1
  22. package/dist/accounts/registry-client.d.ts +20 -0
  23. package/dist/accounts/registry-client.d.ts.map +1 -1
  24. package/dist/accounts/registry-client.js +34 -0
  25. package/dist/accounts/registry-client.js.map +1 -1
  26. package/dist/accounts/state.d.ts.map +1 -1
  27. package/dist/accounts/state.js +2 -1
  28. package/dist/accounts/state.js.map +1 -1
  29. package/dist/backend/create-jazz-session.d.ts +9 -7
  30. package/dist/backend/create-jazz-session.d.ts.map +1 -1
  31. package/dist/backend/create-jazz-session.js +55 -17
  32. package/dist/backend/create-jazz-session.js.map +1 -1
  33. package/dist/backend/create-jazz.d.ts +122 -34
  34. package/dist/backend/create-jazz.d.ts.map +1 -1
  35. package/dist/backend/create-jazz.js +396 -101
  36. package/dist/backend/create-jazz.js.map +1 -1
  37. package/dist/backend/early-db.d.ts.map +1 -1
  38. package/dist/backend/early-db.js +1 -0
  39. package/dist/backend/early-db.js.map +1 -1
  40. package/dist/backend/from-jwt.d.ts +2 -2
  41. package/dist/backend/from-jwt.d.ts.map +1 -1
  42. package/dist/backend/from-jwt.js +7 -1
  43. package/dist/backend/from-jwt.js.map +1 -1
  44. package/dist/backend/index.d.ts +2 -1
  45. package/dist/backend/index.d.ts.map +1 -1
  46. package/dist/backend/index.js +3 -1
  47. package/dist/backend/index.js.map +1 -1
  48. package/dist/backend/inspect-ui.d.ts +14 -0
  49. package/dist/backend/inspect-ui.d.ts.map +1 -0
  50. package/dist/backend/inspect-ui.js +156 -0
  51. package/dist/backend/inspect-ui.js.map +1 -0
  52. package/dist/backend/inspect.d.ts +129 -0
  53. package/dist/backend/inspect.d.ts.map +1 -0
  54. package/dist/backend/inspect.js +763 -0
  55. package/dist/backend/inspect.js.map +1 -0
  56. package/dist/backend/inspector-ui/0.js +2 -0
  57. package/dist/backend/inspector-ui/1.js +2 -0
  58. package/dist/backend/inspector-ui/10.js +2 -0
  59. package/dist/backend/inspector-ui/11.js +2 -0
  60. package/dist/backend/inspector-ui/12.js +2 -0
  61. package/dist/backend/inspector-ui/13.js +2 -0
  62. package/dist/backend/inspector-ui/14.js +2 -0
  63. package/dist/backend/inspector-ui/15.js +2 -0
  64. package/dist/backend/inspector-ui/16.js +2 -0
  65. package/dist/backend/inspector-ui/17.js +2 -0
  66. package/dist/backend/inspector-ui/18.js +2 -0
  67. package/dist/backend/inspector-ui/19.js +2 -0
  68. package/dist/backend/inspector-ui/2.js +2 -0
  69. package/dist/backend/inspector-ui/20.js +2 -0
  70. package/dist/backend/inspector-ui/3.js +2 -0
  71. package/dist/backend/inspector-ui/4.js +2 -0
  72. package/dist/backend/inspector-ui/5.js +2 -0
  73. package/dist/backend/inspector-ui/6.js +2 -0
  74. package/dist/backend/inspector-ui/7.js +2 -0
  75. package/dist/backend/inspector-ui/8.js +2 -0
  76. package/dist/backend/inspector-ui/9.js +2 -0
  77. package/dist/backend/inspector-ui-files.d.ts +4 -0
  78. package/dist/backend/inspector-ui-files.d.ts.map +1 -0
  79. package/dist/backend/inspector-ui-files.js +25 -0
  80. package/dist/backend/session-expiry.d.ts +61 -0
  81. package/dist/backend/session-expiry.d.ts.map +1 -0
  82. package/dist/backend/session-expiry.js +102 -0
  83. package/dist/backend/session-expiry.js.map +1 -0
  84. package/dist/backend/upgrade-status.d.ts +19 -0
  85. package/dist/backend/upgrade-status.d.ts.map +1 -0
  86. package/dist/backend/upgrade-status.js +55 -0
  87. package/dist/backend/upgrade-status.js.map +1 -0
  88. package/dist/backend/vercel-sockets.d.ts +16 -0
  89. package/dist/backend/vercel-sockets.d.ts.map +1 -0
  90. package/dist/backend/vercel-sockets.js +24 -0
  91. package/dist/backend/vercel-sockets.js.map +1 -0
  92. package/dist/backend/vercel-store.d.ts.map +1 -1
  93. package/dist/backend/vercel-store.js +77 -10
  94. package/dist/backend/vercel-store.js.map +1 -1
  95. package/dist/classic-api.d.ts.map +1 -1
  96. package/dist/classic-api.js +36 -0
  97. package/dist/classic-api.js.map +1 -1
  98. package/dist/cli.d.ts.map +1 -1
  99. package/dist/cli.js +30 -2
  100. package/dist/cli.js.map +1 -1
  101. package/dist/client/index.d.ts +2 -6
  102. package/dist/client/index.d.ts.map +1 -1
  103. package/dist/client/index.js +2 -3
  104. package/dist/client/index.js.map +1 -1
  105. package/dist/cloud/credentials.d.ts +1 -1
  106. package/dist/cloud/credentials.d.ts.map +1 -1
  107. package/dist/cloud/credentials.js.map +1 -1
  108. package/dist/dev/catalogue.d.ts +12 -0
  109. package/dist/dev/catalogue.d.ts.map +1 -1
  110. package/dist/dev/catalogue.js +31 -0
  111. package/dist/dev/catalogue.js.map +1 -1
  112. package/dist/dev/inspector-overlay/embedded/assets/backend-DHeT1LCS.css +1 -0
  113. package/dist/dev/inspector-overlay/embedded/assets/backend-Dt5FYVfX.js +1 -0
  114. package/dist/dev/inspector-overlay/embedded/assets/{create-legacy-browser-delegate-X_T_QKCN.js → create-legacy-browser-delegate-Bf58kV5i.js} +1 -1
  115. package/dist/dev/inspector-overlay/embedded/assets/esm-BQhYkCKN.js +1 -0
  116. package/dist/dev/inspector-overlay/embedded/assets/{esm-aRzpnC3u.js → esm-CI6IodCN.js} +1 -1
  117. package/dist/dev/inspector-overlay/embedded/assets/{esm-ezD5H765.js → esm-D5aLlEYl.js} +1 -1
  118. package/dist/dev/inspector-overlay/embedded/assets/{esm-7mP3GQX4.js → esm-D_R-EGgt.js} +1 -1
  119. package/dist/dev/inspector-overlay/embedded/assets/{esm-BX6IY2Mv.js → esm-WihpI9g6.js} +1 -1
  120. package/dist/dev/inspector-overlay/embedded/assets/index-CjhxdwQ7.js +1 -0
  121. package/dist/dev/inspector-overlay/embedded/assets/jazz-broker-worker-CaVlHITU.js +3 -0
  122. package/dist/dev/inspector-overlay/embedded/assets/{jazz-broker-worker-XRRxJUcx.js → jazz-broker-worker-D-HQuhdu.js} +160 -557
  123. package/dist/dev/inspector-overlay/embedded/assets/jazz_wasm-t1Mm3faf.js +1 -0
  124. package/dist/dev/inspector-overlay/embedded/assets/{jazz_wasm_bg-KR7h3v27.wasm → jazz_wasm_bg-BazWJnU4.wasm} +0 -0
  125. package/dist/dev/inspector-overlay/embedded/assets/{index-C78Pprka.css → src-Cq8gSOLx.css} +1 -1
  126. package/dist/dev/inspector-overlay/embedded/assets/src-Dg6641Mj.js +22 -0
  127. package/dist/dev/inspector-overlay/embedded/assets/{trace-api-B5CaetI0.js → trace-api-BctnwbUf.js} +1 -1
  128. package/dist/dev/inspector-overlay/embedded/backend.html +16 -0
  129. package/dist/dev/inspector-overlay/embedded/embedded.html +3 -2
  130. package/dist/dev/inspector-overlay/host-bridge.d.ts.map +1 -1
  131. package/dist/dev/inspector-overlay/host-bridge.js +4 -1
  132. package/dist/dev/inspector-overlay/host-bridge.js.map +1 -1
  133. package/dist/dev/inspector-overlay/loader.d.ts +12 -1
  134. package/dist/dev/inspector-overlay/loader.d.ts.map +1 -1
  135. package/dist/dev/inspector-overlay/loader.js +31 -4
  136. package/dist/dev/inspector-overlay/loader.js.map +1 -1
  137. package/dist/drivers/schema-wire.d.ts +6 -2
  138. package/dist/drivers/schema-wire.d.ts.map +1 -1
  139. package/dist/drivers/schema-wire.js +6 -2
  140. package/dist/drivers/schema-wire.js.map +1 -1
  141. package/dist/effect/jazz.d.ts +12 -5
  142. package/dist/effect/jazz.d.ts.map +1 -1
  143. package/dist/effect/jazz.js +28 -5
  144. package/dist/effect/jazz.js.map +1 -1
  145. package/dist/expo/create-account-manager.d.ts +1 -1
  146. package/dist/expo/create-account-manager.d.ts.map +1 -1
  147. package/dist/expo/create-jazz-session.d.ts +37 -17
  148. package/dist/expo/create-jazz-session.d.ts.map +1 -1
  149. package/dist/expo/create-jazz-session.js +49 -10
  150. package/dist/expo/create-jazz-session.js.map +1 -1
  151. package/dist/expo/index.d.ts +5 -8
  152. package/dist/expo/index.d.ts.map +1 -1
  153. package/dist/expo/index.js +5 -7
  154. package/dist/expo/index.js.map +1 -1
  155. package/dist/expo/provider.d.ts +6 -3
  156. package/dist/expo/provider.d.ts.map +1 -1
  157. package/dist/expo/provider.js +7 -6
  158. package/dist/expo/provider.js.map +1 -1
  159. package/dist/index.d.ts +2 -2
  160. package/dist/index.d.ts.map +1 -1
  161. package/dist/index.js +2 -1
  162. package/dist/index.js.map +1 -1
  163. package/dist/inspect/cli.d.ts +12 -0
  164. package/dist/inspect/cli.d.ts.map +1 -0
  165. package/dist/inspect/cli.js +292 -0
  166. package/dist/inspect/cli.js.map +1 -0
  167. package/dist/inspect/client.d.ts +60 -0
  168. package/dist/inspect/client.d.ts.map +1 -0
  169. package/dist/inspect/client.js +241 -0
  170. package/dist/inspect/client.js.map +1 -0
  171. package/dist/inspect/mcp.d.ts +17 -0
  172. package/dist/inspect/mcp.d.ts.map +1 -0
  173. package/dist/inspect/mcp.js +308 -0
  174. package/dist/inspect/mcp.js.map +1 -0
  175. package/dist/inspect/protocol.d.ts +218 -0
  176. package/dist/inspect/protocol.d.ts.map +1 -0
  177. package/dist/inspect/protocol.js +357 -0
  178. package/dist/inspect/protocol.js.map +1 -0
  179. package/dist/inspector/index.d.ts +10 -0
  180. package/dist/inspector/index.d.ts.map +1 -0
  181. package/dist/inspector/index.js +27 -0
  182. package/dist/inspector/index.js.map +1 -0
  183. package/dist/migrations.d.ts +1 -1
  184. package/dist/migrations.js +1 -1
  185. package/dist/migrations.js.map +1 -1
  186. package/dist/react/index.d.ts +4 -9
  187. package/dist/react/index.d.ts.map +1 -1
  188. package/dist/react/index.js +4 -6
  189. package/dist/react/index.js.map +1 -1
  190. package/dist/react/provider-props.d.ts +7 -0
  191. package/dist/react/provider-props.d.ts.map +1 -0
  192. package/dist/react/provider-props.js +15 -0
  193. package/dist/react/provider-props.js.map +1 -0
  194. package/dist/react/provider.d.ts +9 -15
  195. package/dist/react/provider.d.ts.map +1 -1
  196. package/dist/react/provider.js +19 -38
  197. package/dist/react/provider.js.map +1 -1
  198. package/dist/react-core/index.d.ts +3 -4
  199. package/dist/react-core/index.d.ts.map +1 -1
  200. package/dist/react-core/index.js +8 -4
  201. package/dist/react-core/index.js.map +1 -1
  202. package/dist/react-core/provider.d.ts +6 -6
  203. package/dist/react-core/provider.d.ts.map +1 -1
  204. package/dist/react-core/provider.js +5 -6
  205. package/dist/react-core/provider.js.map +1 -1
  206. package/dist/react-core/session.d.ts +41 -33
  207. package/dist/react-core/session.d.ts.map +1 -1
  208. package/dist/react-core/session.js +41 -89
  209. package/dist/react-core/session.js.map +1 -1
  210. package/dist/react-native/account-session.js +1 -1
  211. package/dist/react-native/account-session.js.map +1 -1
  212. package/dist/react-native/create-account-manager.d.ts +1 -1
  213. package/dist/react-native/create-account-manager.d.ts.map +1 -1
  214. package/dist/react-native/create-jazz-session.d.ts +37 -17
  215. package/dist/react-native/create-jazz-session.d.ts.map +1 -1
  216. package/dist/react-native/create-jazz-session.js +49 -10
  217. package/dist/react-native/create-jazz-session.js.map +1 -1
  218. package/dist/react-native/index.d.ts +5 -10
  219. package/dist/react-native/index.d.ts.map +1 -1
  220. package/dist/react-native/index.js +5 -7
  221. package/dist/react-native/index.js.map +1 -1
  222. package/dist/react-native/native-foreground-db.d.ts +7 -0
  223. package/dist/react-native/native-foreground-db.d.ts.map +1 -1
  224. package/dist/react-native/native-foreground-db.js +29 -0
  225. package/dist/react-native/native-foreground-db.js.map +1 -1
  226. package/dist/react-native/provider.d.ts +14 -19
  227. package/dist/react-native/provider.d.ts.map +1 -1
  228. package/dist/react-native/provider.js +19 -18
  229. package/dist/react-native/provider.js.map +1 -1
  230. package/dist/react-native/runtime-source.js +1 -1
  231. package/dist/react-native/runtime-source.js.map +1 -1
  232. package/dist/removed-api.d.ts +87 -0
  233. package/dist/removed-api.d.ts.map +1 -0
  234. package/dist/removed-api.js +95 -0
  235. package/dist/removed-api.js.map +1 -0
  236. package/dist/runtime/auth-secret-store.d.ts +0 -44
  237. package/dist/runtime/auth-secret-store.d.ts.map +1 -1
  238. package/dist/runtime/auth-secret-store.js +1 -103
  239. package/dist/runtime/auth-secret-store.js.map +1 -1
  240. package/dist/runtime/client.d.ts +10 -4
  241. package/dist/runtime/client.d.ts.map +1 -1
  242. package/dist/runtime/client.js.map +1 -1
  243. package/dist/runtime/connection-manager/browser-connection-manager.d.ts +4 -1
  244. package/dist/runtime/connection-manager/browser-connection-manager.d.ts.map +1 -1
  245. package/dist/runtime/connection-manager/browser-connection-manager.js +33 -2
  246. package/dist/runtime/connection-manager/browser-connection-manager.js.map +1 -1
  247. package/dist/runtime/connection-manager/types.d.ts +17 -2
  248. package/dist/runtime/connection-manager/types.d.ts.map +1 -1
  249. package/dist/runtime/connection-manager/types.js +19 -5
  250. package/dist/runtime/connection-manager/types.js.map +1 -1
  251. package/dist/runtime/credentialed-transport.d.ts +5 -2
  252. package/dist/runtime/credentialed-transport.d.ts.map +1 -1
  253. package/dist/runtime/credentialed-transport.js +12 -3
  254. package/dist/runtime/credentialed-transport.js.map +1 -1
  255. package/dist/runtime/db-replaced-error.d.ts +3 -1
  256. package/dist/runtime/db-replaced-error.d.ts.map +1 -1
  257. package/dist/runtime/db-replaced-error.js +4 -2
  258. package/dist/runtime/db-replaced-error.js.map +1 -1
  259. package/dist/runtime/db.d.ts +35 -7
  260. package/dist/runtime/db.d.ts.map +1 -1
  261. package/dist/runtime/db.js +65 -9
  262. package/dist/runtime/db.js.map +1 -1
  263. package/dist/runtime/index.d.ts +3 -4
  264. package/dist/runtime/index.d.ts.map +1 -1
  265. package/dist/runtime/index.js +1 -2
  266. package/dist/runtime/index.js.map +1 -1
  267. package/dist/runtime/native-artifact-fingerprint-napi.d.ts +1 -1
  268. package/dist/runtime/native-artifact-fingerprint-napi.js +1 -1
  269. package/dist/runtime/native-artifact-fingerprint-napi.js.map +1 -1
  270. package/dist/runtime/native-artifact-fingerprint-wasm.d.ts +1 -1
  271. package/dist/runtime/native-artifact-fingerprint-wasm.js +1 -1
  272. package/dist/runtime/native-artifact-fingerprint-wasm.js.map +1 -1
  273. package/dist/runtime/native-artifact-fingerprints.d.ts +2 -2
  274. package/dist/runtime/native-runtime/attached-browser-worker-connection.d.ts +3 -1
  275. package/dist/runtime/native-runtime/attached-browser-worker-connection.d.ts.map +1 -1
  276. package/dist/runtime/native-runtime/attached-browser-worker-connection.js.map +1 -1
  277. package/dist/runtime/native-runtime/broker-worker-load-failure.d.ts +31 -0
  278. package/dist/runtime/native-runtime/broker-worker-load-failure.d.ts.map +1 -0
  279. package/dist/runtime/native-runtime/broker-worker-load-failure.js +66 -0
  280. package/dist/runtime/native-runtime/broker-worker-load-failure.js.map +1 -0
  281. package/dist/runtime/native-runtime/browser-follower-connection.d.ts +5 -1
  282. package/dist/runtime/native-runtime/browser-follower-connection.d.ts.map +1 -1
  283. package/dist/runtime/native-runtime/browser-follower-connection.js +4 -3
  284. package/dist/runtime/native-runtime/browser-follower-connection.js.map +1 -1
  285. package/dist/runtime/native-runtime/browser-shared-worker-connection.d.ts +3 -1
  286. package/dist/runtime/native-runtime/browser-shared-worker-connection.d.ts.map +1 -1
  287. package/dist/runtime/native-runtime/browser-shared-worker-connection.js +55 -4
  288. package/dist/runtime/native-runtime/browser-shared-worker-connection.js.map +1 -1
  289. package/dist/runtime/native-runtime/browser-worker-protocol.d.ts +5 -0
  290. package/dist/runtime/native-runtime/browser-worker-protocol.d.ts.map +1 -1
  291. package/dist/runtime/native-runtime/browser-worker-protocol.js.map +1 -1
  292. package/dist/runtime/native-runtime/http-stream-socket.d.ts +25 -7
  293. package/dist/runtime/native-runtime/http-stream-socket.d.ts.map +1 -1
  294. package/dist/runtime/native-runtime/http-stream-socket.js +56 -29
  295. package/dist/runtime/native-runtime/http-stream-socket.js.map +1 -1
  296. package/dist/runtime/native-runtime/native-runtime-adapter.d.ts +13 -5
  297. package/dist/runtime/native-runtime/native-runtime-adapter.d.ts.map +1 -1
  298. package/dist/runtime/native-runtime/native-runtime-adapter.js +38 -10
  299. package/dist/runtime/native-runtime/native-runtime-adapter.js.map +1 -1
  300. package/dist/runtime/native-runtime/websocket.d.ts +13 -0
  301. package/dist/runtime/native-runtime/websocket.d.ts.map +1 -1
  302. package/dist/runtime/native-runtime/websocket.js +23 -4
  303. package/dist/runtime/native-runtime/websocket.js.map +1 -1
  304. package/dist/runtime/page-handle.d.ts +87 -0
  305. package/dist/runtime/page-handle.d.ts.map +1 -0
  306. package/dist/runtime/page-handle.js +144 -0
  307. package/dist/runtime/page-handle.js.map +1 -0
  308. package/dist/runtime/removed-provider-props.d.ts +17 -0
  309. package/dist/runtime/removed-provider-props.d.ts.map +1 -0
  310. package/dist/runtime/removed-provider-props.js +16 -0
  311. package/dist/runtime/removed-provider-props.js.map +1 -0
  312. package/dist/runtime/runtime-source.d.ts +4 -1
  313. package/dist/runtime/runtime-source.d.ts.map +1 -1
  314. package/dist/runtime/runtime-source.js.map +1 -1
  315. package/dist/runtime/store-held-by-another-tab-error.d.ts +11 -0
  316. package/dist/runtime/store-held-by-another-tab-error.d.ts.map +1 -1
  317. package/dist/runtime/store-held-by-another-tab-error.js +11 -0
  318. package/dist/runtime/store-held-by-another-tab-error.js.map +1 -1
  319. package/dist/runtime/sync-status.d.ts +60 -1
  320. package/dist/runtime/sync-status.d.ts.map +1 -1
  321. package/dist/runtime/sync-status.js +64 -4
  322. package/dist/runtime/sync-status.js.map +1 -1
  323. package/dist/session/backend-watch.d.ts +53 -14
  324. package/dist/session/backend-watch.d.ts.map +1 -1
  325. package/dist/session/backend-watch.js +99 -22
  326. package/dist/session/backend-watch.js.map +1 -1
  327. package/dist/session/config-options.d.ts +15 -0
  328. package/dist/session/config-options.d.ts.map +1 -0
  329. package/dist/session/config-options.js +55 -0
  330. package/dist/session/config-options.js.map +1 -0
  331. package/dist/session/consumer.d.ts +1 -1
  332. package/dist/session/consumer.js +1 -1
  333. package/dist/session/consumer.js.map +1 -1
  334. package/dist/session/create-jazz-session.d.ts +57 -21
  335. package/dist/session/create-jazz-session.d.ts.map +1 -1
  336. package/dist/session/create-jazz-session.js +257 -58
  337. package/dist/session/create-jazz-session.js.map +1 -1
  338. package/dist/session/follow-user.d.ts +17 -7
  339. package/dist/session/follow-user.d.ts.map +1 -1
  340. package/dist/session/follow-user.js +23 -2
  341. package/dist/session/follow-user.js.map +1 -1
  342. package/dist/session/jazz-session.d.ts +164 -0
  343. package/dist/session/jazz-session.d.ts.map +1 -0
  344. package/dist/session/jazz-session.js +432 -0
  345. package/dist/session/jazz-session.js.map +1 -0
  346. package/dist/session/left-behind-replicas.d.ts +8 -1
  347. package/dist/session/left-behind-replicas.d.ts.map +1 -1
  348. package/dist/session/left-behind-replicas.js +21 -4
  349. package/dist/session/left-behind-replicas.js.map +1 -1
  350. package/dist/session/state.d.ts +20 -13
  351. package/dist/session/state.d.ts.map +1 -1
  352. package/dist/session/state.js +68 -23
  353. package/dist/session/state.js.map +1 -1
  354. package/dist/solid/index.d.ts +3 -9
  355. package/dist/solid/index.d.ts.map +1 -1
  356. package/dist/solid/index.js +8 -11
  357. package/dist/solid/index.ssr.js +3 -6
  358. package/dist/solid/provider.d.ts +3 -3
  359. package/dist/solid/provider.d.ts.map +1 -1
  360. package/dist/solid/provider.js +23 -39
  361. package/dist/solid/provider.js.map +1 -1
  362. package/dist/solid/provider.ssr.js +6 -23
  363. package/dist/solid/provider.ssr.js.map +1 -1
  364. package/dist/solid/session.d.ts +42 -12
  365. package/dist/solid/session.d.ts.map +1 -1
  366. package/dist/solid/session.js +82 -35
  367. package/dist/solid/session.js.map +1 -1
  368. package/dist/solid/session.ssr.js +85 -22
  369. package/dist/solid/session.ssr.js.map +1 -1
  370. package/dist/svelte/JazzProvider.svelte +54 -20
  371. package/dist/svelte/JazzProvider.svelte.d.ts +14 -4
  372. package/dist/svelte/JazzProvider.svelte.d.ts.map +1 -1
  373. package/dist/svelte/JazzSvelteClientProvider.svelte +1 -7
  374. package/dist/svelte/JazzSvelteClientProvider.svelte.d.ts +0 -1
  375. package/dist/svelte/JazzSvelteClientProvider.svelte.d.ts.map +1 -1
  376. package/dist/svelte/JazzSvelteProvider.svelte +5 -4
  377. package/dist/svelte/JazzSvelteProvider.svelte.d.ts +2 -2
  378. package/dist/svelte/JazzSvelteProvider.svelte.d.ts.map +1 -1
  379. package/dist/svelte/index.d.ts +4 -12
  380. package/dist/svelte/index.d.ts.map +1 -1
  381. package/dist/svelte/index.js +4 -8
  382. package/dist/svelte/session-state.d.ts +14 -4
  383. package/dist/svelte/session-state.d.ts.map +1 -1
  384. package/dist/svelte/session-state.js +10 -4
  385. package/dist/testing/policy-test-app.d.ts.map +1 -1
  386. package/dist/testing/policy-test-app.js +5 -4
  387. package/dist/testing/policy-test-app.js.map +1 -1
  388. package/dist/testing/test-jazz.d.ts +2 -2
  389. package/dist/testing/test-jazz.d.ts.map +1 -1
  390. package/dist/testing/test-jazz.js +5 -2
  391. package/dist/testing/test-jazz.js.map +1 -1
  392. package/dist/thin/index.d.ts +7 -10
  393. package/dist/thin/index.d.ts.map +1 -1
  394. package/dist/thin/index.js +28 -11
  395. package/dist/thin/index.js.map +1 -1
  396. package/dist/thin/thin-runtime.d.ts +22 -2
  397. package/dist/thin/thin-runtime.d.ts.map +1 -1
  398. package/dist/thin/thin-runtime.js +157 -24
  399. package/dist/thin/thin-runtime.js.map +1 -1
  400. package/dist/vue/index.d.ts +3 -8
  401. package/dist/vue/index.d.ts.map +1 -1
  402. package/dist/vue/index.js +3 -5
  403. package/dist/vue/index.js.map +1 -1
  404. package/dist/vue/provider.d.ts +6 -27
  405. package/dist/vue/provider.d.ts.map +1 -1
  406. package/dist/vue/provider.js +10 -19
  407. package/dist/vue/provider.js.map +1 -1
  408. package/dist/vue/session.d.ts +29 -28
  409. package/dist/vue/session.d.ts.map +1 -1
  410. package/dist/vue/session.js +79 -22
  411. package/dist/vue/session.js.map +1 -1
  412. package/dist/window-client-storage.d.ts +4 -30
  413. package/dist/window-client-storage.d.ts.map +1 -1
  414. package/dist/window-client-storage.js +2 -63
  415. package/dist/window-client-storage.js.map +1 -1
  416. package/dist/worker/jazz-broker-worker-core.d.ts.map +1 -1
  417. package/dist/worker/jazz-broker-worker-core.js +16 -19
  418. package/dist/worker/jazz-broker-worker-core.js.map +1 -1
  419. package/dist/worker/jazz-broker-worker.js +160 -557
  420. package/dist/worker/jazz_wasm_bg.wasm +0 -0
  421. package/dist/worker/runtime-admission.d.ts +19 -0
  422. package/dist/worker/runtime-admission.d.ts.map +1 -0
  423. package/dist/worker/runtime-admission.js +34 -0
  424. package/dist/worker/runtime-admission.js.map +1 -0
  425. package/package.json +18 -5
  426. package/dist/backend/session-recheck.d.ts +0 -18
  427. package/dist/backend/session-recheck.d.ts.map +0 -1
  428. package/dist/backend/session-recheck.js +0 -57
  429. package/dist/backend/session-recheck.js.map +0 -1
  430. package/dist/dev/inspector-overlay/embedded/assets/esm-k3rsq4Gn.js +0 -1
  431. package/dist/dev/inspector-overlay/embedded/assets/index-C-btvLcw.js +0 -20
  432. package/dist/dev/inspector-overlay/embedded/assets/jazz-broker-worker-CAMcDeUa.js +0 -3
  433. package/dist/dev/inspector-overlay/embedded/assets/jazz_wasm-Cc71x_6y.js +0 -1
  434. package/dist/dev/inspector-overlay/serve.d.ts +0 -46
  435. package/dist/dev/inspector-overlay/serve.d.ts.map +0 -1
  436. package/dist/dev/inspector-overlay/serve.js +0 -131
  437. package/dist/dev/inspector-overlay/serve.js.map +0 -1
  438. package/dist/dev-tools/auto-attach.d.ts +0 -11
  439. package/dist/dev-tools/auto-attach.d.ts.map +0 -1
  440. package/dist/dev-tools/auto-attach.js +0 -26
  441. package/dist/dev-tools/auto-attach.js.map +0 -1
  442. package/dist/expo/auth-secret-store.d.ts +0 -37
  443. package/dist/expo/auth-secret-store.d.ts.map +0 -1
  444. package/dist/expo/auth-secret-store.js +0 -139
  445. package/dist/expo/auth-secret-store.js.map +0 -1
  446. package/dist/expo/session.d.ts +0 -10
  447. package/dist/expo/session.d.ts.map +0 -1
  448. package/dist/expo/session.js +0 -5
  449. package/dist/expo/session.js.map +0 -1
  450. package/dist/expo/use-local-first-auth.d.ts +0 -12
  451. package/dist/expo/use-local-first-auth.d.ts.map +0 -1
  452. package/dist/expo/use-local-first-auth.js +0 -13
  453. package/dist/expo/use-local-first-auth.js.map +0 -1
  454. package/dist/react/devtools-auto-attach.d.ts +0 -2
  455. package/dist/react/devtools-auto-attach.d.ts.map +0 -1
  456. package/dist/react/devtools-auto-attach.js +0 -11
  457. package/dist/react/devtools-auto-attach.js.map +0 -1
  458. package/dist/react/session.d.ts +0 -18
  459. package/dist/react/session.d.ts.map +0 -1
  460. package/dist/react/session.js +0 -28
  461. package/dist/react/session.js.map +0 -1
  462. package/dist/react/use-local-first-auth.d.ts +0 -11
  463. package/dist/react/use-local-first-auth.d.ts.map +0 -1
  464. package/dist/react/use-local-first-auth.js +0 -13
  465. package/dist/react/use-local-first-auth.js.map +0 -1
  466. package/dist/react-core/app.d.ts +0 -31
  467. package/dist/react-core/app.d.ts.map +0 -1
  468. package/dist/react-core/app.js +0 -65
  469. package/dist/react-core/app.js.map +0 -1
  470. package/dist/react-core/use-account-state.d.ts +0 -4
  471. package/dist/react-core/use-account-state.d.ts.map +0 -1
  472. package/dist/react-core/use-account-state.js +0 -6
  473. package/dist/react-core/use-account-state.js.map +0 -1
  474. package/dist/react-core/use-local-first-auth.d.ts +0 -12
  475. package/dist/react-core/use-local-first-auth.d.ts.map +0 -1
  476. package/dist/react-core/use-local-first-auth.js +0 -14
  477. package/dist/react-core/use-local-first-auth.js.map +0 -1
  478. package/dist/react-native/session.d.ts +0 -10
  479. package/dist/react-native/session.d.ts.map +0 -1
  480. package/dist/react-native/session.js +0 -5
  481. package/dist/react-native/session.js.map +0 -1
  482. package/dist/react-native/use-local-first-auth.d.ts +0 -15
  483. package/dist/react-native/use-local-first-auth.d.ts.map +0 -1
  484. package/dist/react-native/use-local-first-auth.js +0 -14
  485. package/dist/react-native/use-local-first-auth.js.map +0 -1
  486. package/dist/runtime/local-first-auth-controller.d.ts +0 -29
  487. package/dist/runtime/local-first-auth-controller.d.ts.map +0 -1
  488. package/dist/runtime/local-first-auth-controller.js +0 -101
  489. package/dist/runtime/local-first-auth-controller.js.map +0 -1
  490. package/dist/session/app.d.ts +0 -58
  491. package/dist/session/app.d.ts.map +0 -1
  492. package/dist/session/app.js +0 -325
  493. package/dist/session/app.js.map +0 -1
  494. package/dist/session/create-jazz-app.d.ts +0 -11
  495. package/dist/session/create-jazz-app.d.ts.map +0 -1
  496. package/dist/session/create-jazz-app.js +0 -11
  497. package/dist/session/create-jazz-app.js.map +0 -1
  498. package/dist/solid/app.d.ts +0 -30
  499. package/dist/solid/app.d.ts.map +0 -1
  500. package/dist/solid/app.js +0 -95
  501. package/dist/solid/app.js.map +0 -1
  502. package/dist/solid/app.ssr.js +0 -109
  503. package/dist/solid/app.ssr.js.map +0 -1
  504. package/dist/solid/create-account-state.d.ts +0 -4
  505. package/dist/solid/create-account-state.d.ts.map +0 -1
  506. package/dist/solid/create-account-state.js +0 -10
  507. package/dist/solid/create-account-state.js.map +0 -1
  508. package/dist/solid/create-account-state.ssr.js +0 -12
  509. package/dist/solid/create-account-state.ssr.js.map +0 -1
  510. package/dist/solid/use-local-first-auth.d.ts +0 -11
  511. package/dist/solid/use-local-first-auth.d.ts.map +0 -1
  512. package/dist/solid/use-local-first-auth.js +0 -30
  513. package/dist/solid/use-local-first-auth.js.map +0 -1
  514. package/dist/solid/use-local-first-auth.ssr.js +0 -31
  515. package/dist/solid/use-local-first-auth.ssr.js.map +0 -1
  516. package/dist/svelte/JazzSessionClientProvider.svelte +0 -42
  517. package/dist/svelte/JazzSessionClientProvider.svelte.d.ts +0 -13
  518. package/dist/svelte/JazzSessionClientProvider.svelte.d.ts.map +0 -1
  519. package/dist/svelte/JazzSessionProvider.svelte +0 -68
  520. package/dist/svelte/JazzSessionProvider.svelte.d.ts +0 -19
  521. package/dist/svelte/JazzSessionProvider.svelte.d.ts.map +0 -1
  522. package/dist/svelte/account-state.d.ts +0 -5
  523. package/dist/svelte/account-state.d.ts.map +0 -1
  524. package/dist/svelte/account-state.js +0 -9
  525. package/dist/svelte/auth-state.d.ts +0 -23
  526. package/dist/svelte/auth-state.d.ts.map +0 -1
  527. package/dist/svelte/auth-state.js +0 -16
  528. package/dist/svelte/local-first-auth.svelte.d.ts +0 -50
  529. package/dist/svelte/local-first-auth.svelte.d.ts.map +0 -1
  530. package/dist/svelte/local-first-auth.svelte.js +0 -58
  531. package/dist/vue/app.d.ts +0 -76
  532. package/dist/vue/app.d.ts.map +0 -1
  533. package/dist/vue/app.js +0 -100
  534. package/dist/vue/app.js.map +0 -1
  535. package/dist/vue/use-account-state.d.ts +0 -5
  536. package/dist/vue/use-account-state.d.ts.map +0 -1
  537. package/dist/vue/use-account-state.js +0 -10
  538. package/dist/vue/use-account-state.js.map +0 -1
  539. package/dist/vue/use-local-first-auth.d.ts +0 -53
  540. package/dist/vue/use-local-first-auth.d.ts.map +0 -1
  541. package/dist/vue/use-local-first-auth.js +0 -67
  542. package/dist/vue/use-local-first-auth.js.map +0 -1
  543. /package/dist/dev/inspector-overlay/embedded/assets/{esm-CH5eVyQQ.js → esm-xNe3wI_B.js} +0 -0
  544. /package/dist/dev/inspector-overlay/embedded/assets/{node-foreground-node-lease.browser-Bm3gYjlT.js → node-foreground-node-lease.browser-CH8w-D6S.js} +0 -0
@@ -1 +0,0 @@
1
- var e=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,O.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,O.unregister(this),e}free(){let e=this.__destroy_into_raw();$.__wbg_pendingnativeread_free(e,0)}cancel(){$.pendingnativeread_cancel(this.__wbg_ptr)}poll(){let e=$.pendingnativeread_poll(this.__wbg_ptr);if(e[2])throw J(e[1]);return J(e[0])}};Symbol.dispose&&(e.prototype[Symbol.dispose]=e.prototype.free);var t=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,A.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,A.unregister(this),e}free(){let e=this.__destroy_into_raw();$.__wbg_streamingmutation_free(e,0)}abort(){return $.wasmstreamingmutation_abort(this.__wbg_ptr)}finish(){return $.wasmstreamingmutation_finish(this.__wbg_ptr)}finishInTransaction(){let e=$.wasmstreamingmutation_finishInTransaction(this.__wbg_ptr);if(e[1])throw J(e[0])}push(e){let t=K(e,$.__wbindgen_malloc),n=Q;return $.wasmstreamingmutation_push(this.__wbg_ptr,t,n)}};Symbol.dispose&&(t.prototype[Symbol.dispose]=t.prototype.free);var n=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,M.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,M.unregister(this),e}free(){let e=this.__destroy_into_raw();$.__wbg_upstreamlink_free(e,0)}handle(e,t){let n,r;try{let o=q(t,$.__wbindgen_malloc,$.__wbindgen_realloc),s=Q,c=$.upstreamlink_handle(this.__wbg_ptr,e,o,s);var i=c[0],a=c[1];if(c[3])throw i=0,a=0,J(c[2]);return n=i,r=a,B(i,a)}finally{$.__wbindgen_free(n,r,1)}}constructor(e){return this.__wbg_ptr=$.upstreamlink_new(e)>>>0,M.register(this,this.__wbg_ptr,this),this}};Symbol.dispose&&(n.prototype[Symbol.dispose]=n.prototype.free);var r=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,D.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,D.unregister(this),e}free(){let e=this.__destroy_into_raw();$.__wbg_wasmdb_free(e,0)}acceptSubscriber(e,t,n){let r=K(e,$.__wbindgen_malloc),i=Q,a=$.wasmdb_acceptSubscriber(this.__wbg_ptr,r,i,t,!W(n),W(n)?BigInt(0):n);if(a[2])throw J(a[1]);return J(a[0])}acceptSubscriberWithSelfSignedProof(e,t,n,r,i){let a=q(t,$.__wbindgen_malloc,$.__wbindgen_realloc),o=Q,s=q(n,$.__wbindgen_malloc,$.__wbindgen_realloc),c=Q,l=q(r,$.__wbindgen_malloc,$.__wbindgen_realloc),u=Q,d=$.wasmdb_acceptSubscriberWithSelfSignedProof(this.__wbg_ptr,e,a,o,s,c,l,u,!W(i),W(i)?BigInt(0):i);if(d[2])throw J(d[1]);return J(d[0])}all(e,t,n,r,i){let a=K(e,$.__wbindgen_malloc),o=Q;var s=W(n)?0:q(n,$.__wbindgen_malloc,$.__wbindgen_realloc),c=Q,l=W(r)?0:K(r,$.__wbindgen_malloc),u=Q;let d=$.wasmdb_all(this.__wbg_ptr,a,o,t,s,c,l,u,i);if(d[2])throw J(d[1]);return J(d[0])}beginStreamingMutation(e,n,r,i,a,o,s,c,l,u,d){let f=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),p=Q,m=K(n,$.__wbindgen_malloc),h=Q,g=K(r,$.__wbindgen_malloc),_=Q,v=q(i,$.__wbindgen_malloc,$.__wbindgen_realloc),y=Q;var b=W(a)?0:q(a,$.__wbindgen_malloc,$.__wbindgen_realloc),x=Q,S=W(o)?0:K(o,$.__wbindgen_malloc),C=Q,w=W(s)?0:K(s,$.__wbindgen_malloc),ee=Q,te=W(d)?0:q(d,$.__wbindgen_malloc,$.__wbindgen_realloc),T=Q;let E=$.wasmdb_beginStreamingMutation(this.__wbg_ptr,f,p,m,h,g,_,v,y,b,x,S,C,w,ee,!W(c),W(c)?0:c,W(l)?0:P(l),W(u)?0:P(u),te,T);if(E[2])throw J(E[1]);return t.__wrap(E[0])}beginTransaction(e,t,n,r){let i=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),a=Q,o=q(t,$.__wbindgen_malloc,$.__wbindgen_realloc),s=Q;var c=W(n)?0:K(n,$.__wbindgen_malloc),l=Q,u=W(r)?0:K(r,$.__wbindgen_malloc),d=Q;let f=$.wasmdb_beginTransaction(this.__wbg_ptr,i,a,o,s,c,l,u,d);if(f[1])throw J(f[0])}canInsert(e,t){let n,r;try{let o=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),s=Q,c=K(t,$.__wbindgen_malloc),l=Q,u=$.wasmdb_canInsert(this.__wbg_ptr,o,s,c,l);var i=u[0],a=u[1];if(u[3])throw i=0,a=0,J(u[2]);return n=i,r=a,B(i,a)}finally{$.__wbindgen_free(n,r,1)}}captureSnapshot(){let e=$.wasmdb_captureSnapshot(this.__wbg_ptr);if(e[2])throw J(e[1]);return J(e[0])}close(){return $.wasmdb_close(this.__wbg_ptr)}commitTransaction(e,t){let n=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),r=Q;var i=W(t)?0:q(t,$.__wbindgen_malloc,$.__wbindgen_realloc),a=Q;let o=$.wasmdb_commitTransaction(this.__wbg_ptr,n,r,i,a);if(o[2])throw J(o[1]);return s.__wrap(o[0])}connectUpstream(){let e=$.wasmdb_connectUpstream(this.__wbg_ptr);if(e[2])throw J(e[1]);return J(e[0])}connectUpstreamWithSession(e,t,n,r,i,a){let o=K(n,$.__wbindgen_malloc),s=Q,c=K(i,$.__wbindgen_malloc),l=Q,u=$.wasmdb_connectUpstreamWithSession(this.__wbg_ptr,e,t,o,s,r,c,l,a);if(u[2])throw J(u[1]);return J(u[0])}createUpstreamLink(e){let t=$.wasmdb_createUpstreamLink(this.__wbg_ptr,e);return n.__wrap(t)}delete(e,t,n){let r=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),i=Q,a=K(t,$.__wbindgen_malloc),o=Q,c=$.wasmdb_delete(this.__wbg_ptr,r,i,a,o,n);if(c[2])throw J(c[1]);return s.__wrap(c[0])}deleteInTransaction(e,t,n,r){let i=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),a=Q,o=q(t,$.__wbindgen_malloc,$.__wbindgen_realloc),s=Q,c=K(n,$.__wbindgen_malloc),l=Q,u=$.wasmdb_deleteInTransaction(this.__wbg_ptr,i,a,o,s,c,l,r);if(u[1])throw J(u[0])}static destroyBrowserStorage(e,t){let n=q(t,$.__wbindgen_malloc,$.__wbindgen_realloc),r=Q;return $.wasmdb_destroyBrowserStorage(e,n,r)}evictExpiredStagedLargeValues(){return $.wasmdb_evictExpiredStagedLargeValues(this.__wbg_ptr)}flush(){return $.wasmdb_flush(this.__wbg_ptr)}foregroundTxTimeHighWater(){let e=$.wasmdb_foregroundTxTimeHighWater(this.__wbg_ptr);if(e[2])throw J(e[1]);return J(e[0])}insert(e,t,n){let r=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),i=Q,a=K(t,$.__wbindgen_malloc),o=Q,c=$.wasmdb_insert(this.__wbg_ptr,r,i,a,o,n);if(c[2])throw J(c[1]);return s.__wrap(c[0])}insertInTransaction(e,t,n,r){let i=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),a=Q,o=q(t,$.__wbindgen_malloc,$.__wbindgen_realloc),s=Q,c=K(n,$.__wbindgen_malloc),l=Q,u=$.wasmdb_insertInTransaction(this.__wbg_ptr,i,a,o,s,c,l,r);if(u[3])throw J(u[2]);var d=L(u[0],u[1]).slice();return $.__wbindgen_free(u[0],u[1]*1,1),d}localCurrentRow(e,t){let n=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),r=Q,i=K(t,$.__wbindgen_malloc),a=Q,o=$.wasmdb_localCurrentRow(this.__wbg_ptr,n,r,i,a);if(o[3])throw J(o[2]);var s=L(o[0],o[1]).slice();return $.__wbindgen_free(o[0],o[1]*1,1),s}onMutationError(e){$.wasmdb_onMutationError(this.__wbg_ptr,e)}onStorageFailure(e){$.wasmdb_onStorageFailure(this.__wbg_ptr,e)}static openBrowser(e,t,n,r){let i=K(t,$.__wbindgen_malloc),a=Q,o=K(n,$.__wbindgen_malloc),s=Q,c=q(r,$.__wbindgen_malloc,$.__wbindgen_realloc),l=Q;return $.wasmdb_openBrowser(e,i,a,o,s,c,l)}static openBrowserWithSelfSignedProof(e,t,n,r,i,a,o){let s=K(t,$.__wbindgen_malloc),c=Q,l=K(n,$.__wbindgen_malloc),u=Q,d=q(r,$.__wbindgen_malloc,$.__wbindgen_realloc),f=Q,p=q(i,$.__wbindgen_malloc,$.__wbindgen_realloc),m=Q,h=q(a,$.__wbindgen_malloc,$.__wbindgen_realloc),g=Q,_=q(o,$.__wbindgen_malloc,$.__wbindgen_realloc),v=Q;return $.wasmdb_openBrowserWithSelfSignedProof(e,s,c,l,u,d,f,p,m,h,g,_,v)}static openMemory(t,n){let r=K(t,$.__wbindgen_malloc),i=Q,a=K(n,$.__wbindgen_malloc),o=Q,s=$.wasmdb_openMemory(r,i,a,o);if(s[2])throw J(s[1]);return e.__wrap(s[0])}static openMemoryAsBackend(t,n){let r=K(t,$.__wbindgen_malloc),i=Q,a=K(n,$.__wbindgen_malloc),o=Q,s=$.wasmdb_openMemoryAsBackend(r,i,a,o);if(s[2])throw J(s[1]);return e.__wrap(s[0])}static openMemoryWithSelfSignedProof(t,n,r,i,a){let o=K(t,$.__wbindgen_malloc),s=Q,c=K(n,$.__wbindgen_malloc),l=Q,u=q(r,$.__wbindgen_malloc,$.__wbindgen_realloc),d=Q,f=q(i,$.__wbindgen_malloc,$.__wbindgen_realloc),p=Q,m=q(a,$.__wbindgen_malloc,$.__wbindgen_realloc),h=Q,g=$.wasmdb_openMemoryWithSelfSignedProof(o,s,c,l,u,d,f,p,m,h);if(g[2])throw J(g[1]);return e.__wrap(g[0])}pendingUploadCount(){let e=$.wasmdb_pendingUploadCount(this.__wbg_ptr);if(e[2])throw J(e[1]);return e[0]>>>0}registerSchema(t,n){let r=K(t,$.__wbindgen_malloc),i=Q;var a=W(n)?0:K(n,$.__wbindgen_malloc),o=Q;let s=$.wasmdb_registerSchema(this.__wbg_ptr,r,i,a,o);if(s[2])throw J(s[1]);return e.__wrap(s[0])}requestDeletePermissionAdvice(e,t){let n=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),r=Q,i=K(t,$.__wbindgen_malloc),o=Q,s=$.wasmdb_requestDeletePermissionAdvice(this.__wbg_ptr,n,r,i,o);if(s[2])throw J(s[1]);return a.__wrap(s[0])}requestInsertPermissionAdvice(e,t){let n=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),r=Q,i=K(t,$.__wbindgen_malloc),o=Q,s=$.wasmdb_requestInsertPermissionAdvice(this.__wbg_ptr,n,r,i,o);if(s[2])throw J(s[1]);return a.__wrap(s[0])}requestReadPermissionAdvice(e,t){let n=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),r=Q,i=K(t,$.__wbindgen_malloc),o=Q,s=$.wasmdb_requestReadPermissionAdvice(this.__wbg_ptr,n,r,i,o);if(s[2])throw J(s[1]);return a.__wrap(s[0])}requestUpdatePermissionAdvice(e,t,n){let r=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),i=Q,o=K(t,$.__wbindgen_malloc),s=Q,c=K(n,$.__wbindgen_malloc),l=Q,u=$.wasmdb_requestUpdatePermissionAdvice(this.__wbg_ptr,r,i,o,s,c,l);if(u[2])throw J(u[1]);return a.__wrap(u[0])}restore(e,t,n,r){let i=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),a=Q,o=K(t,$.__wbindgen_malloc),c=Q;var l=W(n)?0:K(n,$.__wbindgen_malloc),u=Q;let d=$.wasmdb_restore(this.__wbg_ptr,i,a,o,c,l,u,r);if(d[2])throw J(d[1]);return s.__wrap(d[0])}restoreInTransaction(e,t,n,r,i){let a=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),o=Q,s=q(t,$.__wbindgen_malloc,$.__wbindgen_realloc),c=Q,l=K(n,$.__wbindgen_malloc),u=Q;var d=W(r)?0:K(r,$.__wbindgen_malloc),f=Q;let p=$.wasmdb_restoreInTransaction(this.__wbg_ptr,a,o,s,c,l,u,d,f,i);if(p[1])throw J(p[0])}rollbackTransaction(e){let t=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),n=Q,r=$.wasmdb_rollbackTransaction(this.__wbg_ptr,t,n);if(r[1])throw J(r[0])}seedForegroundTxTimeHighWater(e){let t=$.wasmdb_seedForegroundTxTimeHighWater(this.__wbg_ptr,e);if(t[1])throw J(t[0])}setIdentityClaims(e,t){let n=K(e,$.__wbindgen_malloc),r=Q,i=$.wasmdb_setIdentityClaims(this.__wbg_ptr,n,r,t);if(i[1])throw J(i[0])}setLargeValueStagingPolicy(e,t,n){let r=$.wasmdb_setLargeValueStagingPolicy(this.__wbg_ptr,e,t,!W(n),W(n)?0:n);if(r[1])throw J(r[0])}setNonDurableClient(){let e=$.wasmdb_setNonDurableClient(this.__wbg_ptr);if(e[1])throw J(e[0])}setRemoteLinkHint(e){let t=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),n=Q,r=$.wasmdb_setRemoteLinkHint(this.__wbg_ptr,t,n);if(r[1])throw J(r[0])}setSessionClaims(e){let t=$.wasmdb_setSessionClaims(this.__wbg_ptr,e);if(t[2])throw J(t[1]);return J(t[0])}setSlowQueryThresholdMs(e){let t=$.wasmdb_setSlowQueryThresholdMs(this.__wbg_ptr,e);if(t[1])throw J(t[0])}setTickScheduler(e){$.wasmdb_setTickScheduler(this.__wbg_ptr,e)}subscribe(e,t,n,r){let i=K(e,$.__wbindgen_malloc),a=Q;var o=W(n)?0:K(n,$.__wbindgen_malloc),s=Q;let c=$.wasmdb_subscribe(this.__wbg_ptr,i,a,t,o,s,r);if(c[2])throw J(c[1]);return J(c[0])}takeSlowQueryReport(e){var t=W(e)?0:q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),n=Q;let r=$.wasmdb_takeSlowQueryReport(this.__wbg_ptr,t,n);if(r[3])throw J(r[2]);var i=de(r[0],r[1]).slice();return $.__wbindgen_free(r[0],r[1]*4,4),i}tick(){return $.wasmdb_tick(this.__wbg_ptr)}update(e,t,n,r){let i=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),a=Q,o=K(t,$.__wbindgen_malloc),c=Q,l=K(n,$.__wbindgen_malloc),u=Q,d=$.wasmdb_update(this.__wbg_ptr,i,a,o,c,l,u,r);if(d[2])throw J(d[1]);return s.__wrap(d[0])}updateInTransaction(e,t,n,r,i){let a=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),o=Q,s=q(t,$.__wbindgen_malloc,$.__wbindgen_realloc),c=Q,l=K(n,$.__wbindgen_malloc),u=Q,d=K(r,$.__wbindgen_malloc),f=Q,p=$.wasmdb_updateInTransaction(this.__wbg_ptr,a,o,s,c,l,u,d,f,i);if(p[1])throw J(p[0])}updateLargeValues(e,t,n,r,i){let a=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),o=Q,c=K(t,$.__wbindgen_malloc),l=Q,u=K(n,$.__wbindgen_malloc),d=Q,f=$.wasmdb_updateLargeValues(this.__wbg_ptr,a,o,c,l,u,d,r,!W(i),W(i)?0:i);if(f[2])throw J(f[1]);return s.__wrap(f[0])}updateLargeValuesInTransaction(e,t,n,r,i,a){let o=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),s=Q,c=q(t,$.__wbindgen_malloc,$.__wbindgen_realloc),l=Q,u=K(n,$.__wbindgen_malloc),d=Q,f=K(r,$.__wbindgen_malloc),p=Q,m=$.wasmdb_updateLargeValuesInTransaction(this.__wbg_ptr,o,s,c,l,u,d,f,p,i,!W(a),W(a)?0:a);if(m[1])throw J(m[0])}upsert(e,t,n,r){let i=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),a=Q,o=K(t,$.__wbindgen_malloc),c=Q,l=K(n,$.__wbindgen_malloc),u=Q,d=$.wasmdb_upsert(this.__wbg_ptr,i,a,o,c,l,u,r);if(d[2])throw J(d[1]);return s.__wrap(d[0])}upsertInTransaction(e,t,n,r,i){let a=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),o=Q,s=q(t,$.__wbindgen_malloc,$.__wbindgen_realloc),c=Q,l=K(n,$.__wbindgen_malloc),u=Q,d=K(r,$.__wbindgen_malloc),f=Q,p=$.wasmdb_upsertInTransaction(this.__wbg_ptr,a,o,s,c,l,u,d,f,i);if(p[1])throw J(p[0])}waitForPendingWrites(e,t){let n=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),r=Q;return $.wasmdb_waitForPendingWrites(this.__wbg_ptr,n,r,W(t)?0:P(t))}wireFeatures(){return $.wasmdb_wireFeatures(this.__wbg_ptr)>>>0}};Symbol.dispose&&(r.prototype[Symbol.dispose]=r.prototype.free);var i=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,ue.unregister(this),e}free(){let e=this.__destroy_into_raw();$.__wbg_wasmpendingsubscription_free(e,0)}cancel(){$.wasmpendingsubscription_cancel(this.__wbg_ptr)}poll(){let e=$.wasmpendingsubscription_poll(this.__wbg_ptr);if(e[2])throw J(e[1]);return J(e[0])}setWake(e){$.wasmpendingsubscription_setWake(this.__wbg_ptr,e)}};Symbol.dispose&&(i.prototype[Symbol.dispose]=i.prototype.free);var a=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,k.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,k.unregister(this),e}free(){let e=this.__destroy_into_raw();$.__wbg_wasmpermissionadvicerequest_free(e,0)}cancel(){$.wasmpermissionadvicerequest_cancel(this.__wbg_ptr)}get promise(){return $.wasmpermissionadvicerequest_promise(this.__wbg_ptr)}};Symbol.dispose&&(a.prototype[Symbol.dispose]=a.prototype.free);var o=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,j.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,j.unregister(this),e}free(){let e=this.__destroy_into_raw();$.__wbg_wasmtransport_free(e,0)}auxiliaryOutboundReady(){return $.wasmtransport_auxiliaryOutboundReady(this.__wbg_ptr)}auxiliaryReceiveTimeoutMs(){let e=$.wasmtransport_auxiliaryReceiveTimeoutMs(this.__wbg_ptr);return e===4294967297?void 0:e}clearOutboundScheduler(){$.wasmtransport_clearOutboundScheduler(this.__wbg_ptr)}close(){return $.wasmtransport_close(this.__wbg_ptr)!==0}expireAuxiliaryReceive(){$.wasmtransport_expireAuxiliaryReceive(this.__wbg_ptr)}recvAuxiliaryWireFrames(e,t){return $.wasmtransport_recvAuxiliaryWireFrames(this.__wbg_ptr,W(e)?4294967297:e>>>0,W(t)?4294967297:t>>>0)}recvWireFrames(){return $.wasmtransport_recvWireFrames(this.__wbg_ptr)}routeAuxiliaryWireFrame(e){let t=K(e,$.__wbindgen_malloc),n=Q;return $.wasmtransport_routeAuxiliaryWireFrame(this.__wbg_ptr,t,n)}sendWireFrame(e){let t=K(e,$.__wbindgen_malloc),n=Q;$.wasmtransport_sendWireFrame(this.__wbg_ptr,t,n)}sendWireFrames(e){$.wasmtransport_sendWireFrames(this.__wbg_ptr,e)}setAuxiliaryTraceEnabled(e){$.wasmtransport_setAuxiliaryTraceEnabled(this.__wbg_ptr,e)}setOutboundScheduler(e){$.wasmtransport_setOutboundScheduler(this.__wbg_ptr,e)}takeAuxiliaryTrace(){return $.wasmtransport_takeAuxiliaryTrace(this.__wbg_ptr)}tick(){return $.wasmtransport_tick(this.__wbg_ptr)}updateAuthenticatedClaims(e){let t=$.wasmtransport_updateAuthenticatedClaims(this.__wbg_ptr,e);if(t[2])throw J(t[1]);return J(t[0])}upstreamRefusal(){return $.wasmtransport_upstreamRefusal(this.__wbg_ptr)}};Symbol.dispose&&(o.prototype[Symbol.dispose]=o.prototype.free);var s=class e{static __wrap(t){t>>>=0;let n=Object.create(e.prototype);return n.__wbg_ptr=t,N.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,N.unregister(this),e}free(){let e=this.__destroy_into_raw();$.__wbg_wasmwrite_free(e,0)}close(){return $.wasmwrite_close(this.__wbg_ptr)!==0}get payload(){let e=$.wasmwrite_payload(this.__wbg_ptr);var t=L(e[0],e[1]).slice();return $.__wbindgen_free(e[0],e[1]*1,1),t}get rowId(){let e=$.wasmwrite_rowId(this.__wbg_ptr);var t=L(e[0],e[1]).slice();return $.__wbindgen_free(e[0],e[1]*1,1),t}get txId(){let e,t;try{let n=$.wasmwrite_txId(this.__wbg_ptr);return e=n[0],t=n[1],B(n[0],n[1])}finally{$.__wbindgen_free(e,t,1)}}wait(e,t){let n=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),r=Q,i=$.wasmwrite_wait(this.__wbg_ptr,n,r,W(t)?16777215:t?1:0);if(i[2])throw J(i[1]);return J(i[0])}writeState(){let e=$.wasmwrite_writeState(this.__wbg_ptr);if(e[2])throw J(e[1]);return J(e[0])}};Symbol.dispose&&(s.prototype[Symbol.dispose]=s.prototype.free);function c(){let e,t;try{let n=$.__testBindingCodecGoldenFixture();return e=n[0],t=n[1],B(n[0],n[1])}finally{$.__wbindgen_free(e,t,1)}}function l(e,t,n){let r=K(e,$.__wbindgen_malloc),i=Q,a=q(t,$.__wbindgen_malloc,$.__wbindgen_realloc),o=Q,s=q(n,$.__wbindgen_malloc,$.__wbindgen_realloc),c=Q,l=$.__testValidateWireFrameBatchCorpus(r,i,a,o,s,c);if(l[1])throw J(l[0])}function u(){let e,t;try{let n=$.__testWireFrameCorpusFeatures();return e=n[0],t=n[1],B(n[0],n[1])}finally{$.__wbindgen_free(e,t,1)}}function d(e,t,n,r){let i=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),a=Q,o=$.captureTextAnchor(i,a,!W(t),W(t)?0:t,n,r);if(o[2])throw J(o[1]);return J(o[0])}function f(e,t,n,r){let i=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),a=Q,o=$.captureTextRange(i,a,!W(t),W(t)?0:t,n,r);if(o[2])throw J(o[1]);return J(o[0])}function p(){let e=$.currentTimestamp();return BigInt.asUintN(64,e)}function m(e){let t,n;try{let a=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),o=Q,s=$.deriveUserId(a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,J(s[2]);return t=r,n=i,B(r,i)}finally{$.__wbindgen_free(t,n,1)}}function h(){return $.drainTraceEntries()}function g(){let e,t;try{let n=$.generateId();return e=n[0],t=n[1],B(n[0],n[1])}finally{$.__wbindgen_free(e,t,1)}}function _(){$.init()}function v(e,t,n,r){let i,a;try{let c=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),l=Q,u=q(t,$.__wbindgen_malloc,$.__wbindgen_realloc),d=Q,f=$.mintAnonymousToken(c,l,u,d,n,r);var o=f[0],s=f[1];if(f[3])throw o=0,s=0,J(f[2]);return i=o,a=s,B(o,s)}finally{$.__wbindgen_free(i,a,1)}}function y(e,t,n,r){let i,a;try{let c=q(e,$.__wbindgen_malloc,$.__wbindgen_realloc),l=Q,u=q(t,$.__wbindgen_malloc,$.__wbindgen_realloc),d=Q,f=$.mintLocalFirstToken(c,l,u,d,n,r);var o=f[0],s=f[1];if(f[3])throw o=0,s=0,J(f[2]);return i=o,a=s,B(o,s)}finally{$.__wbindgen_free(i,a,1)}}function b(){let e,t;try{let n=$.nativeArtifactFingerprint();return e=n[0],t=n[1],B(n[0],n[1])}finally{$.__wbindgen_free(e,t,1)}}function x(e,t,n){let r=q(t,$.__wbindgen_malloc,$.__wbindgen_realloc),i=Q,a=$.resolveTextAnchor(e,r,i,!W(n),W(n)?0:n);if(a[2])throw J(a[1]);return J(a[0])}function S(e,t,n){let r=q(t,$.__wbindgen_malloc,$.__wbindgen_realloc),i=Q,a=$.resolveTextRange(e,r,i,!W(n),W(n)?0:n);if(a[2])throw J(a[1]);return J(a[0])}function C(e){$.setJsonSchemaValidator(e)}function w(e){$.setTraceEntryCollectionEnabled(e)}function ee(e){return $.subscribeTraceEntries(e)}function te(e){let t=K(e,$.__wbindgen_malloc),n=Q,r=$.validateSchema(t,n);if(r[1])throw J(r[0])}function T(){let t={__proto__:null,__wbg_Error_2e59b1b37a9a34c3:function(e,t){return Error(B(e,t))},__wbg_Number_e6ffdb596c888833:function(e){return Number(e)},__wbg_String_8564e559799eccda:function(e,t){let n=q(String(t),$.__wbindgen_malloc,$.__wbindgen_realloc),r=Q;z().setInt32(e+4,r,!0),z().setInt32(e+0,n,!0)},__wbg_Window_70131fc0c91e4b3c:function(e){return e.Window},__wbg_WorkerGlobalScope_601c48015b8cc78e:function(e){return e.WorkerGlobalScope},__wbg___wbindgen_bigint_get_as_i64_2c5082002e4826e2:function(e,t){let n=t,r=typeof n==`bigint`?n:void 0;z().setBigInt64(e+8,W(r)?BigInt(0):r,!0),z().setInt32(e+0,!W(r),!0)},__wbg___wbindgen_boolean_get_a86c216575a75c30:function(e){let t=e,n=typeof t==`boolean`?t:void 0;return W(n)?16777215:n?1:0},__wbg___wbindgen_debug_string_dd5d2d07ce9e6c57:function(e,t){let n=q(I(t),$.__wbindgen_malloc,$.__wbindgen_realloc),r=Q;z().setInt32(e+4,r,!0),z().setInt32(e+0,n,!0)},__wbg___wbindgen_in_4bd7a57e54337366:function(e,t){return e in t},__wbg___wbindgen_is_bigint_6c98f7e945dacdde:function(e){return typeof e==`bigint`},__wbg___wbindgen_is_function_49868bde5eb1e745:function(e){return typeof e==`function`},__wbg___wbindgen_is_null_344c8750a8525473:function(e){return e===null},__wbg___wbindgen_is_object_40c5a80572e8f9d3:function(e){let t=e;return typeof t==`object`&&!!t},__wbg___wbindgen_is_string_b29b5c5a8065ba1a:function(e){return typeof e==`string`},__wbg___wbindgen_is_undefined_c0cca72b82b86f4d:function(e){return e===void 0},__wbg___wbindgen_jsval_eq_7d430e744a913d26:function(e,t){return e===t},__wbg___wbindgen_jsval_loose_eq_3a72ae764d46d944:function(e,t){return e==t},__wbg___wbindgen_number_get_7579aab02a8a620c:function(e,t){let n=t,r=typeof n==`number`?n:void 0;z().setFloat64(e+8,W(r)?0:r,!0),z().setInt32(e+0,!W(r),!0)},__wbg___wbindgen_string_get_914df97fcfa788f2:function(e,t){let n=t,r=typeof n==`string`?n:void 0;var i=W(r)?0:q(r,$.__wbindgen_malloc,$.__wbindgen_realloc),a=Q;z().setInt32(e+4,a,!0),z().setInt32(e+0,i,!0)},__wbg___wbindgen_throw_81fc77679af83bc6:function(e,t){throw Error(B(e,t))},__wbg__wbg_cb_unref_3c3b4f651835fbcb:function(e){e._wbg_cb_unref()},__wbg_abort_cfab06d16d2d33a6:function(){return U(function(e){e.abort()},arguments)},__wbg_bound_88db1072ea68e901:function(){return U(function(e,t,n,r){return IDBKeyRange.bound(e,t,n!==0,r!==0)},arguments)},__wbg_call_368fa9c372d473ba:function(){return U(function(e,t,n,r){return e.call(t,n,r)},arguments)},__wbg_call_7f2987183bb62793:function(){return U(function(e,t){return e.call(t)},arguments)},__wbg_call_d578befcc3145dee:function(){return U(function(e,t,n){return e.call(t,n)},arguments)},__wbg_commit_e9c1332714c53826:function(){return U(function(e){e.commit()},arguments)},__wbg_construct_adeb3d5948c3d19a:function(){return U(function(e,t){return Reflect.construct(e,t)},arguments)},__wbg_createObjectStore_6e567b25160be2fa:function(){return U(function(e,t,n,r){return e.createObjectStore(B(t,n),r)},arguments)},__wbg_delete_fc24bd7dfa57938e:function(){return U(function(e,t){return e.delete(t)},arguments)},__wbg_done_547d467e97529006:function(e){return e.done},__wbg_entries_616b1a459b85be0b:function(e){return Object.entries(e)},__wbg_error_58469b8474e13592:function(){return U(function(e){let t=e.error;return W(t)?0:P(t)},arguments)},__wbg_error_a6fa202b58aa1cd3:function(e,t){let n,r;try{n=e,r=t,console.error(B(e,t))}finally{$.__wbindgen_free(n,r,1)}},__wbg_getAll_93336699ea033b51:function(){return U(function(e,t){return e.getAll(t)},arguments)},__wbg_getDate_bafac038eaae076e:function(e){return e.getDate()},__wbg_getDay_6eebc8fe9cb183f5:function(e){return e.getDay()},__wbg_getFullYear_8f83597f7403c865:function(e){return e.getFullYear()},__wbg_getHours_81348c8e800060e7:function(e){return e.getHours()},__wbg_getMinutes_bd1ccf17dab913bf:function(e){return e.getMinutes()},__wbg_getMonth_288607689622719c:function(e){return e.getMonth()},__wbg_getRandomValues_15134f5c0ae6b0d0:function(){return U(function(e,t){globalThis.crypto.getRandomValues(L(e,t))},arguments)},__wbg_getRandomValues_d49329ff89a07af1:function(){return U(function(e,t){globalThis.crypto.getRandomValues(L(e,t))},arguments)},__wbg_getSeconds_edef7266627a185f:function(e){return e.getSeconds()},__wbg_getTime_f6ac312467f7cf09:function(e){return e.getTime()},__wbg_getTimezoneOffset_ac5be603b21a5797:function(e){return e.getTimezoneOffset()},__wbg_get_4848e350b40afc16:function(e,t){return e[t>>>0]},__wbg_get_ed0642c4b9d31ddf:function(){return U(function(e,t){return Reflect.get(e,t)},arguments)},__wbg_get_f96702c6245e4ef9:function(){return U(function(e,t){return Reflect.get(e,t)},arguments)},__wbg_get_unchecked_7d7babe32e9e6a54:function(e,t){return e[t>>>0]},__wbg_get_with_ref_key_6412cf3094599694:function(e,t){return e[t]},__wbg_global_e30ac0b7684506d0:function(e){return e.global},__wbg_has_3ec5c22db2e5237a:function(){return U(function(e,t){return Reflect.has(e,t)},arguments)},__wbg_indexedDB_065ce3ad400579e3:function(){return U(function(e){let t=e.indexedDB;return W(t)?0:P(t)},arguments)},__wbg_indexedDB_a2139150e2ea2a08:function(){return U(function(e){let t=e.indexedDB;return W(t)?0:P(t)},arguments)},__wbg_indexedDB_af74cb6df65fa636:function(){return U(function(e){let t=e.indexedDB;return W(t)?0:P(t)},arguments)},__wbg_instanceof_ArrayBuffer_ff7c1337a5e3b33a:function(e){let t;try{t=e instanceof ArrayBuffer}catch{t=!1}return t},__wbg_instanceof_DomException_37f96d3fb69189bd:function(e){let t;try{t=e instanceof DOMException}catch{t=!1}return t},__wbg_instanceof_Error_e3390d6805733dad:function(e){let t;try{t=e instanceof Error}catch{t=!1}return t},__wbg_instanceof_IdbDatabase_0af111edb4be95f4:function(e){let t;try{t=e instanceof IDBDatabase}catch{t=!1}return t},__wbg_instanceof_IdbRequest_fc5918c726448f04:function(e){let t;try{t=e instanceof IDBRequest}catch{t=!1}return t},__wbg_instanceof_Map_a10a2795ef4bfe97:function(e){let t;try{t=e instanceof Map}catch{t=!1}return t},__wbg_instanceof_Uint8Array_4b8da683deb25d72:function(e){let t;try{t=e instanceof Uint8Array}catch{t=!1}return t},__wbg_isArray_db61795ad004c139:function(e){return Array.isArray(e)},__wbg_isSafeInteger_ea83862ba994770c:function(e){return Number.isSafeInteger(e)},__wbg_iterator_de403ef31815a3e6:function(){return Symbol.iterator},__wbg_length_0c32cb8543c8e4c8:function(e){return e.length},__wbg_length_6e821edde497a532:function(e){return e.length},__wbg_log_6a8b55ee2e172f54:function(e,t,n,r,i,a,o,s){let c,l;try{c=e,l=t,console.log(B(e,t),B(n,r),B(i,a),B(o,s))}finally{$.__wbindgen_free(c,l,1)}},__wbg_lowerBound_279c232a69ac0f79:function(){return U(function(e,t){return IDBKeyRange.lowerBound(e,t!==0)},arguments)},__wbg_message_52a9425f28c45ebc:function(e,t){let n=t.message,r=q(n,$.__wbindgen_malloc,$.__wbindgen_realloc),i=Q;z().setInt32(e+4,i,!0),z().setInt32(e+0,r,!0)},__wbg_message_7367f8c7d0fa1589:function(e){return e.message},__wbg_name_d7bb38b41d6d953e:function(e,t){let n=t.name,r=q(n,$.__wbindgen_malloc,$.__wbindgen_realloc),i=Q;z().setInt32(e+4,i,!0),z().setInt32(e+0,r,!0)},__wbg_new_0_bfa2ef4bc447daa2:function(){return new Date},__wbg_new_0f6d2ddfe083319b:function(e){return new Date(e)},__wbg_new_227d7c05414eb861:function(){return Error()},__wbg_new_40792555590ec35c:function(e,t){try{var n={a:e,b:t};return new Promise((e,t)=>{let r=n.a;n.a=0;try{return se(r,n.b,e,t)}finally{n.a=r}})}finally{n.a=0}},__wbg_new_4f9fafbb3909af72:function(){return{}},__wbg_new_99cabae501c0a8a0:function(){return new Map},__wbg_new_a560378ea1240b14:function(e){return new Uint8Array(e)},__wbg_new_e3b04b4d53d1b593:function(e,t){return Error(B(e,t))},__wbg_new_f3c9df4f38f3f798:function(){return[]},__wbg_new_from_slice_2580ff33d0d10520:function(e,t){return new Uint8Array(L(e,t))},__wbg_new_typed_14d7cc391ce53d2c:function(e,t){try{var n={a:e,b:t};return new Promise((e,t)=>{let r=n.a;n.a=0;try{return se(r,n.b,e,t)}finally{n.a=r}})}finally{n.a=0}},__wbg_new_with_length_9cedd08484b73942:function(e){return new Uint8Array(e>>>0)},__wbg_new_with_year_month_day_d7dc1e63a7b42902:function(e,t,n){return new Date(e>>>0,t,n)},__wbg_next_01132ed6134b8ef5:function(e){return e.next},__wbg_next_b3713ec761a9dbfd:function(){return U(function(e){return e.next()},arguments)},__wbg_now_6798946be0e6fe2b:function(){return U(function(){return Date.now()},arguments)},__wbg_now_88621c9c9a4f3ffc:function(){return Date.now()},__wbg_now_e7c6795a7f81e10f:function(e){return e.now()},__wbg_objectStore_3d4cade4416cd432:function(){return U(function(e,t,n){return e.objectStore(B(t,n))},arguments)},__wbg_open_ac04ec9d75d0eeaf:function(){return U(function(e,t,n,r){return e.open(B(t,n),r>>>0)},arguments)},__wbg_pendingnativeread_new:function(t){return e.__wrap(t)},__wbg_performance_3fcf6e32a7e1ed0a:function(e){return e.performance},__wbg_prototypesetcall_3e05eb9545565046:function(e,t,n){Uint8Array.prototype.set.call(L(e,t),n)},__wbg_push_6bdbc990be5ac37b:function(e,t){return e.push(t)},__wbg_put_015a7e88e46a2502:function(){return U(function(e,t){return e.put(t)},arguments)},__wbg_queueMicrotask_abaf92f0bd4e80a4:function(e){return e.queueMicrotask},__wbg_queueMicrotask_df5a6dac26d818f3:function(e){queueMicrotask(e)},__wbg_random_a72d453e63c9558c:function(){return Math.random()},__wbg_readyState_accbdf425c074d9c:function(e){let t=e.readyState;return(ce.indexOf(t)+1||3)-1},__wbg_reject_1340e1211c01825b:function(e){return Promise.reject(e)},__wbg_resolve_0a79de24e9d2267b:function(e){return Promise.resolve(e)},__wbg_result_452c1006fc727317:function(){return U(function(e){return e.result},arguments)},__wbg_set_08463b1df38a7e29:function(e,t,n){return e.set(t,n)},__wbg_set_16a9c1a07b3d38ec:function(e,t,n){e.set(L(t,n))},__wbg_set_6be42768c690e380:function(e,t,n){e[t]=n},__wbg_set_6c60b2e8ad0e9383:function(e,t,n){e[t>>>0]=n},__wbg_set_8ee2d34facb8466e:function(){return U(function(e,t,n){return Reflect.set(e,t,n)},arguments)},__wbg_set_key_path_6edd6ee0e8d75af3:function(e,t){e.keyPath=t},__wbg_set_onabort_6b6df7a41aa97c23:function(e,t){e.onabort=t},__wbg_set_oncomplete_20fb27150b4ee0d4:function(e,t){e.oncomplete=t},__wbg_set_onerror_2b7dfa4e6dea4159:function(e,t){e.onerror=t},__wbg_set_onerror_3c4b5087146b11b6:function(e,t){e.onerror=t},__wbg_set_onsuccess_f7e5b5cbed5008b1:function(e,t){e.onsuccess=t},__wbg_set_onupgradeneeded_d7e8e03a1999bf5d:function(e,t){e.onupgradeneeded=t},__wbg_stack_3b0d974bbf31e44f:function(e,t){let n=t.stack,r=q(n,$.__wbindgen_malloc,$.__wbindgen_realloc),i=Q;z().setInt32(e+4,i,!0),z().setInt32(e+0,r,!0)},__wbg_static_accessor_GLOBAL_THIS_a1248013d790bf5f:function(){let e=typeof globalThis>`u`?null:globalThis;return W(e)?0:P(e)},__wbg_static_accessor_GLOBAL_f2e0f995a21329ff:function(){let e=typeof global>`u`?null:global;return W(e)?0:P(e)},__wbg_static_accessor_SELF_24f78b6d23f286ea:function(){let e=typeof self>`u`?null:self;return W(e)?0:P(e)},__wbg_static_accessor_WINDOW_59fd959c540fe405:function(){let e=typeof window>`u`?null:window;return W(e)?0:P(e)},__wbg_subarray_0f98d3fb634508ad:function(e,t,n){return e.subarray(t>>>0,n>>>0)},__wbg_target_732d56b173b7e87c:function(e){let t=e.target;return W(t)?0:P(t)},__wbg_then_00eed3ac0b8e82cb:function(e,t,n){return e.then(t,n)},__wbg_then_a0c8db0381c8994c:function(e,t){return e.then(t)},__wbg_toString_891d991e862e1d44:function(e){return e.toString()},__wbg_transaction_cc65dcef07fabb06:function(e){return e.transaction},__wbg_transaction_f909284bfed41115:function(){return U(function(e,t,n,r){return e.transaction(B(t,n),le[r])},arguments)},__wbg_upperBound_2f3c07fb628c7a3c:function(){return U(function(e,t){return IDBKeyRange.upperBound(e,t!==0)},arguments)},__wbg_value_7f6052747ccf940f:function(e){return e.value},__wbg_wasmdb_new:function(e){return r.__wrap(e)},__wbg_wasmtransport_new:function(e){return o.__wrap(e)},__wbg_wasmwrite_new:function(e){return s.__wrap(e)},__wbindgen_cast_0000000000000001:function(e,t){return G(e,t,ae)},__wbindgen_cast_0000000000000002:function(e,t){return G(e,t,ie)},__wbindgen_cast_0000000000000003:function(e,t){return G(e,t,re)},__wbindgen_cast_0000000000000004:function(e,t){return G(e,t,oe)},__wbindgen_cast_0000000000000005:function(e,t){return G(e,t,E)},__wbindgen_cast_0000000000000006:function(e,t){return G(e,t,ne)},__wbindgen_cast_0000000000000007:function(e){return e},__wbindgen_cast_0000000000000008:function(e){return e},__wbindgen_cast_0000000000000009:function(e,t){return B(e,t)},__wbindgen_cast_000000000000000a:function(e){return BigInt.asUintN(64,e)},__wbindgen_init_externref_table:function(){let e=$.__wbindgen_externrefs,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}};return{__proto__:null,"./jazz_wasm_bg.js":t}}function E(e,t){$.wasm_bindgen__convert__closures_____invoke__h69610db431037c77(e,t)}function ne(e,t){$.wasm_bindgen__convert__closures_____invoke__h492b14c1fd17d971(e,t)}function re(e,t,n){$.wasm_bindgen__convert__closures_____invoke__hf83e1094fac4ab4c(e,t,n)}function ie(e,t,n){return $.wasm_bindgen__convert__closures_____invoke__h62288b7949ffd3ae(e,t,n)}function ae(e,t,n){let r=$.wasm_bindgen__convert__closures_____invoke__hf2d3ca0c7acb67d9(e,t,n);if(r[1])throw J(r[0])}function oe(e,t,n){let r=$.wasm_bindgen__convert__closures_____invoke__h05f77cffdc1766b5(e,t,n);if(r[1])throw J(r[0])}function se(e,t,n,r){$.wasm_bindgen__convert__closures_____invoke__h0c5680e9ed94b2e6(e,t,n,r)}var ce=[`pending`,`done`],le=[`readonly`,`readwrite`,`versionchange`,`readwriteflush`,`cleanup`],D=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>$.__wbg_wasmdb_free(e>>>0,1)),O=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>$.__wbg_pendingnativeread_free(e>>>0,1)),ue=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>$.__wbg_wasmpendingsubscription_free(e>>>0,1)),k=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>$.__wbg_wasmpermissionadvicerequest_free(e>>>0,1)),A=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>$.__wbg_streamingmutation_free(e>>>0,1)),j=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>$.__wbg_wasmtransport_free(e>>>0,1)),M=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>$.__wbg_upstreamlink_free(e>>>0,1)),N=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>$.__wbg_wasmwrite_free(e>>>0,1));function P(e){let t=$.__externref_table_alloc();return $.__wbindgen_externrefs.set(t,e),t}var F=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>$.__wbindgen_destroy_closure(e.a,e.b));function I(e){let t=typeof e;if(t==`number`||t==`boolean`||e==null)return`${e}`;if(t==`string`)return`"${e}"`;if(t==`symbol`){let t=e.description;return t==null?`Symbol`:`Symbol(${t})`}if(t==`function`){let t=e.name;return typeof t==`string`&&t.length>0?`Function(${t})`:`Function`}if(Array.isArray(e)){let t=e.length,n=`[`;t>0&&(n+=I(e[0]));for(let r=1;r<t;r++)n+=`, `+I(e[r]);return n+=`]`,n}let n=/\[object ([^\]]+)\]/.exec(toString.call(e)),r;if(n&&n.length>1)r=n[1];else return toString.call(e);if(r==`Object`)try{return`Object(`+JSON.stringify(e)+`)`}catch{return`Object`}return e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:r}function de(e,t){e>>>=0;let n=z(),r=[];for(let i=e;i<e+4*t;i+=4)r.push($.__wbindgen_externrefs.get(n.getUint32(i,!0)));return $.__externref_drop_slice(e,t),r}function L(e,t){return e>>>=0,H().subarray(e/1,e/1+t)}var R=null;function z(){return(R===null||R.buffer.detached===!0||R.buffer.detached===void 0&&R.buffer!==$.memory.buffer)&&(R=new DataView($.memory.buffer)),R}function B(e,t){return e>>>=0,pe(e,t)}var V=null;function H(){return(V===null||V.byteLength===0)&&(V=new Uint8Array($.memory.buffer)),V}function U(e,t){try{return e.apply(this,t)}catch(e){let t=P(e);$.__wbindgen_exn_store(t)}}function W(e){return e==null}function G(e,t,n){let r={a:e,b:t,cnt:1},i=(...e)=>{r.cnt++;let t=r.a;r.a=0;try{return n(t,r.b,...e)}finally{r.a=t,i._wbg_cb_unref()}};return i._wbg_cb_unref=()=>{--r.cnt===0&&($.__wbindgen_destroy_closure(r.a,r.b),r.a=0,F.unregister(r))},F.register(i,r,r),i}function K(e,t){let n=t(e.length*1,1)>>>0;return H().set(e,n/1),Q=e.length,n}function q(e,t,n){if(n===void 0){let n=Z.encode(e),r=t(n.length,1)>>>0;return H().subarray(r,r+n.length).set(n),Q=n.length,r}let r=e.length,i=t(r,1)>>>0,a=H(),o=0;for(;o<r;o++){let t=e.charCodeAt(o);if(t>127)break;a[i+o]=t}if(o!==r){o!==0&&(e=e.slice(o)),i=n(i,r,r=o+e.length*3,1)>>>0;let t=H().subarray(i+o,i+r),a=Z.encodeInto(e,t);o+=a.written,i=n(i,r,o,1)>>>0}return Q=o,i}function J(e){let t=$.__wbindgen_externrefs.get(e);return $.__externref_table_dealloc(e),t}var Y=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0});Y.decode();var fe=2146435072,X=0;function pe(e,t){return X+=t,X>=fe&&(Y=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}),Y.decode(),X=t),Y.decode(H().subarray(e,e+t))}var Z=new TextEncoder;`encodeInto`in Z||(Z.encodeInto=function(e,t){let n=Z.encode(e);return t.set(n),{read:e.length,written:n.length}});var Q=0,$;function me(e,t){return $=e.exports,R=null,V=null,$.__wbindgen_start(),$}async function he(e,t){if(typeof Response==`function`&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming==`function`)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(e.ok&&n(e.type)&&e.headers.get(`Content-Type`)!==`application/wasm`)console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t);else throw t}let r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}else{let n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}function n(e){switch(e){case`basic`:case`cors`:case`default`:return!0}return!1}}function ge(e){if($!==void 0)return $;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module:e}=e:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let t=T();return e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e)),me(new WebAssembly.Instance(e,t),e)}async function _e(e){if($!==void 0)return $;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn(`using deprecated parameters for the initialization function; pass a single object instead`)),e===void 0&&(e=new URL(``+new URL(`jazz_wasm_bg-KR7h3v27.wasm`,import.meta.url).href,``+import.meta.url));let t=T();(typeof e==`string`||typeof Request==`function`&&e instanceof Request||typeof URL==`function`&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:r}=await he(await e,t);return me(n,r)}export{e as PendingNativeRead,t as StreamingMutation,n as UpstreamLink,r as WasmDb,i as WasmPendingSubscription,a as WasmPermissionAdviceRequest,o as WasmTransport,s as WasmWrite,c as __testBindingCodecGoldenFixture,l as __testValidateWireFrameBatchCorpus,u as __testWireFrameCorpusFeatures,d as captureTextAnchor,f as captureTextRange,p as currentTimestamp,_e as default,m as deriveUserId,h as drainTraceEntries,g as generateId,_ as init,ge as initSync,v as mintAnonymousToken,y as mintLocalFirstToken,b as nativeArtifactFingerprint,x as resolveTextAnchor,S as resolveTextRange,C as setJsonSchemaValidator,w as setTraceEntryCollectionEnabled,ee as subscribeTraceEntries,te as validateSchema};
@@ -1,46 +0,0 @@
1
- export declare const OVERLAY_EMBEDDED_PREFIX = "/__jazz/embedded";
2
- export declare function resolveEmbeddedDir(): string | null;
3
- export interface OverlayResponse {
4
- setHeader(name: string, value: string): void;
5
- statusCode: number;
6
- end(body?: string | Buffer): void;
7
- }
8
- export interface OverlayDevServer {
9
- config: {
10
- root: string;
11
- env?: Record<string, string>;
12
- };
13
- middlewares?: {
14
- use(fn: (req: {
15
- url?: string;
16
- }, res: OverlayResponse, next: () => void) => void): void;
17
- };
18
- }
19
- export declare const OVERLAY_ENABLED_MESSAGE = "[jazz] Inspector overlay enabled \u2014 click the \uD83C\uDFB5 button in your app (Alt+Shift+J).";
20
- /**
21
- * During dev, serve the inspector's embedded assets (/__jazz/embedded/*) and
22
- * signal the client that the jazz dev plugin is active by exposing
23
- * VITE_JAZZ_INSPECTOR (Vite surfaces VITE_*-prefixed keys to the browser via
24
- * import.meta.env). The provider reads that flag and mounts the overlay toggle,
25
- * so the inspector is on by default whenever the plugin is in use — and absent
26
- * when it isn't (nothing would serve the iframe otherwise). Both the Vite and
27
- * SvelteKit plugins call this.
28
- */
29
- export declare function wireInspectorOverlay(server: OverlayDevServer): void;
30
- export interface OverlayAssetServer {
31
- /** Origin to proxy `/__jazz/embedded/*` requests to, e.g. http://127.0.0.1:54321 */
32
- origin: string;
33
- close(): Promise<void>;
34
- }
35
- /**
36
- * Start a tiny localhost HTTP server that serves the inspector's embedded build
37
- * at /__jazz/embedded/*, reusing the same handler as the Vite/SvelteKit
38
- * middleware. Next has no dev-middleware hook, so its plugin proxies to this
39
- * server via a dev-only rewrite instead of copying assets into the app. The
40
- * socket is unref()'d so it never keeps the dev process alive.
41
- */
42
- export declare function startOverlayAssetServer(): Promise<OverlayAssetServer>;
43
- export declare function createOverlayHandler(): (req: {
44
- url?: string;
45
- }, res: OverlayResponse) => Promise<boolean>;
46
- //# sourceMappingURL=serve.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../../src/dev/inspector-overlay/serve.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,uBAAuB,qBAAqB,CAAC;AAiB1D,wBAAgB,kBAAkB,IAAI,MAAM,GAAG,IAAI,CAalD;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CACnC;AAGD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,CAAC;IACvD,WAAW,CAAC,EAAE;QACZ,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE;YAAE,GAAG,CAAC,EAAE,MAAM,CAAA;SAAE,EAAE,GAAG,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,IAAI,KAAK,IAAI,GAAG,IAAI,CAAC;KACxF,CAAC;CACH;AAID,eAAO,MAAM,uBAAuB,qGACiD,CAAC;AAEtF;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAUnE;AAED,MAAM,WAAW,kBAAkB;IACjC,oFAAoF;IACpF,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED;;;;;;GAMG;AACH,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAqB3E;AAED,wBAAgB,oBAAoB,KAWL,KAAK;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,KAAK,eAAe,KAAG,OAAO,CAAC,OAAO,CAAC,CA+B5F"}
@@ -1,131 +0,0 @@
1
- import { createServer } from "node:http";
2
- import { readFile } from "node:fs/promises";
3
- import { existsSync } from "node:fs";
4
- import { fileURLToPath } from "node:url";
5
- import { dirname, join, relative, isAbsolute } from "node:path";
6
- export const OVERLAY_EMBEDDED_PREFIX = "/__jazz/embedded";
7
- const MIME = {
8
- ".html": "text/html; charset=utf-8",
9
- ".js": "text/javascript; charset=utf-8",
10
- ".mjs": "text/javascript; charset=utf-8",
11
- ".css": "text/css; charset=utf-8",
12
- ".wasm": "application/wasm",
13
- ".json": "application/json; charset=utf-8",
14
- ".map": "application/json; charset=utf-8",
15
- ".svg": "image/svg+xml",
16
- };
17
- const ext = (p) => {
18
- const i = p.lastIndexOf(".");
19
- return i === -1 ? "" : p.slice(i);
20
- };
21
- export function resolveEmbeddedDir() {
22
- const here = dirname(fileURLToPath(import.meta.url));
23
- // First: the inspector's embedded build bundled into jazz-tools' own dist next
24
- // to this module (staged at publish via scripts/stage-inspector-overlay.mjs) —
25
- // resolved relative to jazz-tools, so it works in any consumer install anywhere.
26
- // Fallback (monorepo dev only, never reached in a published install): read the
27
- // sibling inspector package directly, since we don't stage into dist during a
28
- // normal build. `here` is .../jazz-tools/{src,dist}/dev/inspector-overlay, so
29
- // four levels up lands on `packages/`.
30
- for (const dir of [join(here, "embedded"), join(here, "../../../../inspector/dist-embedded")]) {
31
- if (existsSync(join(dir, "embedded.html")))
32
- return dir;
33
- }
34
- return null;
35
- }
36
- // Announced so the overlay's toggle/shortcut is discoverable — there's no other
37
- // hint that it's there.
38
- export const OVERLAY_ENABLED_MESSAGE = "[jazz] Inspector overlay enabled — click the 🎵 button in your app (Alt+Shift+J).";
39
- /**
40
- * During dev, serve the inspector's embedded assets (/__jazz/embedded/*) and
41
- * signal the client that the jazz dev plugin is active by exposing
42
- * VITE_JAZZ_INSPECTOR (Vite surfaces VITE_*-prefixed keys to the browser via
43
- * import.meta.env). The provider reads that flag and mounts the overlay toggle,
44
- * so the inspector is on by default whenever the plugin is in use — and absent
45
- * when it isn't (nothing would serve the iframe otherwise). Both the Vite and
46
- * SvelteKit plugins call this.
47
- */
48
- export function wireInspectorOverlay(server) {
49
- const overlay = createOverlayHandler();
50
- server.middlewares?.use((req, res, next) => {
51
- void overlay(req, res).then((handled) => {
52
- if (!handled)
53
- next();
54
- });
55
- });
56
- server.config.env ??= {};
57
- server.config.env.VITE_JAZZ_INSPECTOR = "1";
58
- console.log(OVERLAY_ENABLED_MESSAGE);
59
- }
60
- /**
61
- * Start a tiny localhost HTTP server that serves the inspector's embedded build
62
- * at /__jazz/embedded/*, reusing the same handler as the Vite/SvelteKit
63
- * middleware. Next has no dev-middleware hook, so its plugin proxies to this
64
- * server via a dev-only rewrite instead of copying assets into the app. The
65
- * socket is unref()'d so it never keeps the dev process alive.
66
- */
67
- export async function startOverlayAssetServer() {
68
- const handle = createOverlayHandler();
69
- const server = createServer((req, res) => {
70
- void handle({ url: req.url }, res).then((handled) => {
71
- if (!handled) {
72
- res.statusCode = 404;
73
- res.end("Not found");
74
- }
75
- });
76
- });
77
- server.unref();
78
- await new Promise((resolve, reject) => {
79
- server.once("error", reject);
80
- server.listen(0, "127.0.0.1", resolve);
81
- });
82
- const address = server.address();
83
- const port = typeof address === "object" && address ? address.port : 0;
84
- return {
85
- origin: `http://127.0.0.1:${port}`,
86
- close: () => new Promise((resolve) => server.close(() => resolve())),
87
- };
88
- }
89
- export function createOverlayHandler() {
90
- // Resolve the embedded dir once at startup (hits disk). It ships inside
91
- // jazz-tools, so a miss means a broken install — say so once here rather than
92
- // re-checking per request.
93
- const dir = resolveEmbeddedDir();
94
- if (!dir) {
95
- console.log("[jazz] Inspector overlay: couldn't find the embedded inspector build. " +
96
- "It ships with jazz-tools — try reinstalling dependencies.");
97
- }
98
- return async function handle(req, res) {
99
- const url = (req.url ?? "").split("?")[0];
100
- if (url !== OVERLAY_EMBEDDED_PREFIX && !url.startsWith(OVERLAY_EMBEDDED_PREFIX + "/")) {
101
- return false;
102
- }
103
- if (!dir) {
104
- res.statusCode = 404;
105
- res.end("Inspector not installed");
106
- return true;
107
- }
108
- const rel = url.slice(OVERLAY_EMBEDDED_PREFIX.length).replace(/^\//, "") || "embedded.html";
109
- const filePath = join(dir, rel);
110
- const within = relative(dir, filePath);
111
- if (within.startsWith("..") || isAbsolute(within)) {
112
- res.statusCode = 403;
113
- res.end("Forbidden");
114
- return true;
115
- }
116
- try {
117
- // No in-process cache: this is a dev-only server and the OS page cache
118
- // already keeps these files hot, so a plain read stays fast and always
119
- // reflects a rebuild.
120
- const body = await readFile(filePath);
121
- res.setHeader("Content-Type", MIME[ext(filePath)] ?? "application/octet-stream");
122
- res.end(body);
123
- }
124
- catch {
125
- res.statusCode = 404;
126
- res.end("Not found");
127
- }
128
- return true;
129
- };
130
- }
131
- //# sourceMappingURL=serve.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"serve.js","sourceRoot":"","sources":["../../../src/dev/inspector-overlay/serve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEhE,MAAM,CAAC,MAAM,uBAAuB,GAAG,kBAAkB,CAAC;AAE1D,MAAM,IAAI,GAA2B;IACnC,OAAO,EAAE,0BAA0B;IACnC,KAAK,EAAE,gCAAgC;IACvC,MAAM,EAAE,gCAAgC;IACxC,MAAM,EAAE,yBAAyB;IACjC,OAAO,EAAE,kBAAkB;IAC3B,OAAO,EAAE,iCAAiC;IAC1C,MAAM,EAAE,iCAAiC;IACzC,MAAM,EAAE,eAAe;CACxB,CAAC;AACF,MAAM,GAAG,GAAG,CAAC,CAAS,EAAE,EAAE;IACxB,MAAM,CAAC,GAAG,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAC7B,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACpC,CAAC,CAAC;AAEF,MAAM,UAAU,kBAAkB;IAChC,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACrD,+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AAU,GAAG,GAAG,CAAC;YACrB,GAAG,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACvB,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import { createServer } from \"node:http\";\nimport { readFile } from \"node:fs/promises\";\nimport { existsSync } from \"node:fs\";\nimport { fileURLToPath } from \"node:url\";\nimport { dirname, join, relative, isAbsolute } from \"node:path\";\n\nexport const OVERLAY_EMBEDDED_PREFIX = \"/__jazz/embedded\";\n\nconst MIME: Record<string, string> = {\n \".html\": \"text/html; charset=utf-8\",\n \".js\": \"text/javascript; charset=utf-8\",\n \".mjs\": \"text/javascript; charset=utf-8\",\n \".css\": \"text/css; charset=utf-8\",\n \".wasm\": \"application/wasm\",\n \".json\": \"application/json; charset=utf-8\",\n \".map\": \"application/json; charset=utf-8\",\n \".svg\": \"image/svg+xml\",\n};\nconst ext = (p: string) => {\n const i = p.lastIndexOf(\".\");\n return i === -1 ? \"\" : p.slice(i);\n};\n\nexport function resolveEmbeddedDir(): string | null {\n const here = dirname(fileURLToPath(import.meta.url));\n // First: the inspector's embedded build bundled into jazz-tools' own dist next\n // to this module (staged at publish via scripts/stage-inspector-overlay.mjs) —\n // resolved relative to jazz-tools, so it works in any consumer install anywhere.\n // Fallback (monorepo dev only, never reached in a published install): read the\n // sibling inspector package directly, since we don't stage into dist during a\n // normal build. `here` is .../jazz-tools/{src,dist}/dev/inspector-overlay, so\n // four levels up lands on `packages/`.\n for (const dir of [join(here, \"embedded\"), join(here, \"../../../../inspector/dist-embedded\")]) {\n if (existsSync(join(dir, \"embedded.html\"))) return dir;\n }\n return null;\n}\n\nexport interface OverlayResponse {\n setHeader(name: string, value: string): void;\n statusCode: number;\n end(body?: string | Buffer): void;\n}\n// Minimal Vite-style dev server shape the overlay needs. Shared so the Vite and\n// SvelteKit plugins serve the inspector assets the same way (one definition).\nexport interface OverlayDevServer {\n config: { root: string; env?: Record<string, string> };\n middlewares?: {\n use(fn: (req: { url?: string }, res: OverlayResponse, next: () => void) => void): void;\n };\n}\n\n// Announced so the overlay's toggle/shortcut is discoverable — there's no other\n// hint that it's there.\nexport const OVERLAY_ENABLED_MESSAGE =\n \"[jazz] Inspector overlay enabled — click the 🎵 button in your app (Alt+Shift+J).\";\n\n/**\n * During dev, serve the inspector's embedded assets (/__jazz/embedded/*) and\n * signal the client that the jazz dev plugin is active by exposing\n * VITE_JAZZ_INSPECTOR (Vite surfaces VITE_*-prefixed keys to the browser via\n * import.meta.env). The provider reads that flag and mounts the overlay toggle,\n * so the inspector is on by default whenever the plugin is in use — and absent\n * when it isn't (nothing would serve the iframe otherwise). Both the Vite and\n * SvelteKit plugins call this.\n */\nexport function wireInspectorOverlay(server: OverlayDevServer): void {\n const overlay = createOverlayHandler();\n server.middlewares?.use((req, res, next) => {\n void overlay(req, res).then((handled) => {\n if (!handled) next();\n });\n });\n server.config.env ??= {};\n server.config.env.VITE_JAZZ_INSPECTOR = \"1\";\n console.log(OVERLAY_ENABLED_MESSAGE);\n}\n\nexport interface OverlayAssetServer {\n /** Origin to proxy `/__jazz/embedded/*` requests to, e.g. http://127.0.0.1:54321 */\n origin: string;\n close(): Promise<void>;\n}\n\n/**\n * Start a tiny localhost HTTP server that serves the inspector's embedded build\n * at /__jazz/embedded/*, reusing the same handler as the Vite/SvelteKit\n * middleware. Next has no dev-middleware hook, so its plugin proxies to this\n * server via a dev-only rewrite instead of copying assets into the app. The\n * socket is unref()'d so it never keeps the dev process alive.\n */\nexport async function startOverlayAssetServer(): Promise<OverlayAssetServer> {\n const handle = createOverlayHandler();\n const server = createServer((req, res) => {\n void handle({ url: req.url }, res as unknown as OverlayResponse).then((handled) => {\n if (!handled) {\n res.statusCode = 404;\n res.end(\"Not found\");\n }\n });\n });\n server.unref();\n await new Promise<void>((resolve, reject) => {\n server.once(\"error\", reject);\n server.listen(0, \"127.0.0.1\", resolve);\n });\n const address = server.address();\n const port = typeof address === \"object\" && address ? address.port : 0;\n return {\n origin: `http://127.0.0.1:${port}`,\n close: () => new Promise<void>((resolve) => server.close(() => resolve())),\n };\n}\n\nexport function createOverlayHandler() {\n // Resolve the embedded dir once at startup (hits disk). It ships inside\n // jazz-tools, so a miss means a broken install — say so once here rather than\n // re-checking per request.\n const dir = resolveEmbeddedDir();\n if (!dir) {\n console.log(\n \"[jazz] Inspector overlay: couldn't find the embedded inspector build. \" +\n \"It ships with jazz-tools — try reinstalling dependencies.\",\n );\n }\n return async function handle(req: { url?: string }, res: OverlayResponse): Promise<boolean> {\n const url = (req.url ?? \"\").split(\"?\")[0];\n if (url !== OVERLAY_EMBEDDED_PREFIX && !url.startsWith(OVERLAY_EMBEDDED_PREFIX + \"/\")) {\n return false;\n }\n if (!dir) {\n res.statusCode = 404;\n res.end(\"Inspector not installed\");\n return true;\n }\n const rel = url.slice(OVERLAY_EMBEDDED_PREFIX.length).replace(/^\\//, \"\") || \"embedded.html\";\n const filePath = join(dir, rel);\n const within = relative(dir, filePath);\n if (within.startsWith(\"..\") || isAbsolute(within)) {\n res.statusCode = 403;\n res.end(\"Forbidden\");\n return true;\n }\n try {\n // No in-process cache: this is a dev-only server and the OS page cache\n // already keeps these files hot, so a plain read stays fast and always\n // reflects a rebuild.\n const body = await readFile(filePath);\n res.setHeader(\"Content-Type\", MIME[ext(filePath)] ?? \"application/octet-stream\");\n res.end(body);\n } catch {\n res.statusCode = 404;\n res.end(\"Not found\");\n }\n return true;\n };\n}\n"]}
@@ -1,11 +0,0 @@
1
- import type { InspectorHostDb } from "../dev/inspector-overlay/host-bridge.js";
2
- export declare function jazzDevPluginActive(): boolean;
3
- /**
4
- * Mount the inspector overlay for a db. The providers only call this in dev; it
5
- * no-ops unless the jazz dev plugin is serving the inspector. Safe to call on
6
- * every provider effect run with no guard here: the overlay UI mounts once
7
- * globally and the host handle is installed once per db, so repeat calls are
8
- * idempotent.
9
- */
10
- export declare function startInspectorOnce(db: InspectorHostDb): void;
11
- //# sourceMappingURL=auto-attach.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auto-attach.d.ts","sourceRoot":"","sources":["../../src/dev-tools/auto-attach.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAE/E,wBAAgB,mBAAmB,IAAI,OAAO,CAK7C;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,eAAe,GAAG,IAAI,CAK5D"}
@@ -1,26 +0,0 @@
1
- // Auto-starts the inspector overlay for an app db. Shared by the framework
2
- // providers so the loader's module path lives in one place.
3
- //
4
- // The dynamic import("../dev/inspector-overlay/loader.js") is the lazy-chunk
5
- // boundary that keeps the inspector out of the main bundle. The providers call
6
- // this only inside a `process.env.NODE_ENV !== "production"` branch, so in
7
- // production the call — and this whole module — is dropped, and the inspector
8
- // never ships to prod.
9
- export function jazzDevPluginActive() {
10
- const viteEnv = import.meta.env;
11
- const nextFlag = typeof process !== "undefined" ? process.env.NEXT_PUBLIC_JAZZ_INSPECTOR : undefined;
12
- return Boolean(viteEnv?.VITE_JAZZ_INSPECTOR || nextFlag);
13
- }
14
- /**
15
- * Mount the inspector overlay for a db. The providers only call this in dev; it
16
- * no-ops unless the jazz dev plugin is serving the inspector. Safe to call on
17
- * every provider effect run with no guard here: the overlay UI mounts once
18
- * globally and the host handle is installed once per db, so repeat calls are
19
- * idempotent.
20
- */
21
- export function startInspectorOnce(db) {
22
- if (!jazzDevPluginActive())
23
- return;
24
- void import("../dev/inspector-overlay/loader.js").then(({ startInspectorOverlay }) => startInspectorOverlay(db));
25
- }
26
- //# sourceMappingURL=auto-attach.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auto-attach.js","sourceRoot":"","sources":["../../src/dev-tools/auto-attach.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,4DAA4D;AAC5D,EAAE;AACF,6EAA6E;AAC7E,+EAA+E;AAC/E,2EAA2E;AAC3E,8EAA8E;AAC9E,uBAAuB;AAWvB,MAAM,UAAU,mBAAmB;IACjC,MAAM,OAAO,GAAI,MAAM,CAAC,IAAqD,CAAC,GAAG,CAAC;IAClF,MAAM,QAAQ,GACZ,OAAO,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC,CAAC,SAAS,CAAC;IACtF,OAAO,OAAO,CAAC,OAAO,EAAE,mBAAmB,IAAI,QAAQ,CAAC,CAAC;AAC3D,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,EAAmB;IACpD,IAAI,CAAC,mBAAmB,EAAE;QAAE,OAAO;IACnC,KAAK,MAAM,CAAC,oCAAoC,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,qBAAqB,EAAE,EAAE,EAAE,CACnF,qBAAqB,CAAC,EAAE,CAAC,CAC1B,CAAC;AACJ,CAAC","sourcesContent":["// Auto-starts the inspector overlay for an app db. Shared by the framework\n// providers so the loader's module path lives in one place.\n//\n// The dynamic import(\"../dev/inspector-overlay/loader.js\") is the lazy-chunk\n// boundary that keeps the inspector out of the main bundle. The providers call\n// this only inside a `process.env.NODE_ENV !== \"production\"` branch, so in\n// production the call — and this whole module — is dropped, and the inspector\n// never ships to prod.\n\n// The overlay mounts only when the jazz dev plugin is active: the plugin exposes\n// a public flag to the browser in dev (Vite-family on import.meta.env, Next on\n// process.env), and we read both since each is undefined under the other's\n// bundler (and `process` itself is undefined in a Vite browser bundle, hence the\n// guard). Without the plugin there's no flag and no toggle — correct, since\n// nothing would serve the iframe. Read process.env.NEXT_PUBLIC_JAZZ_INSPECTOR as\n// a literal: Next only static-inlines that exact member access, not an alias.\nimport type { InspectorHostDb } from \"../dev/inspector-overlay/host-bridge.js\";\n\nexport function jazzDevPluginActive(): boolean {\n const viteEnv = (import.meta as unknown as { env?: Record<string, unknown> }).env;\n const nextFlag =\n typeof process !== \"undefined\" ? process.env.NEXT_PUBLIC_JAZZ_INSPECTOR : undefined;\n return Boolean(viteEnv?.VITE_JAZZ_INSPECTOR || nextFlag);\n}\n\n/**\n * Mount the inspector overlay for a db. The providers only call this in dev; it\n * no-ops unless the jazz dev plugin is serving the inspector. Safe to call on\n * every provider effect run with no guard here: the overlay UI mounts once\n * globally and the host handle is installed once per db, so repeat calls are\n * idempotent.\n */\nexport function startInspectorOnce(db: InspectorHostDb): void {\n if (!jazzDevPluginActive()) return;\n void import(\"../dev/inspector-overlay/loader.js\").then(({ startInspectorOverlay }) =>\n startInspectorOverlay(db),\n );\n}\n"]}
@@ -1,37 +0,0 @@
1
- import type { AuthSecretStore } from "../runtime/auth-secret-store.js";
2
- import { type AuthSecretScope } from "../runtime/auth-secret-codec.js";
3
- export interface ExpoSecureStoreLike {
4
- getItemAsync(key: string): Promise<string | null>;
5
- setItemAsync(key: string, value: string): Promise<void>;
6
- deleteItemAsync(key: string): Promise<void>;
7
- }
8
- export interface ExpoAuthSecretStoreOptions extends AuthSecretScope {
9
- /** Explicit physical SecureStore key. Prefer appId/profile for portable scoping. */
10
- key?: string;
11
- /** Override SecureStore backend for tests and host adapters. */
12
- secureStore?: ExpoSecureStoreLike;
13
- }
14
- export declare class ExpoAuthSecretStore implements AuthSecretStore {
15
- private static globalInstances;
16
- private static globalOperationStates;
17
- private static storageScopedInstances;
18
- private static storageScopedOperationStates;
19
- private readonly key;
20
- private readonly store;
21
- private readonly operationState;
22
- constructor(options?: ExpoAuthSecretStoreOptions);
23
- private static getOperationState;
24
- static getDefault(options?: ExpoAuthSecretStoreOptions): ExpoAuthSecretStore;
25
- loadSecret(): Promise<string | null>;
26
- saveSecret(secret: string): Promise<void>;
27
- clearSecret(): Promise<void>;
28
- getOrCreateSecret(): Promise<string>;
29
- private serialize;
30
- private getOrCreateSecretInternal;
31
- static loadSecret(options?: ExpoAuthSecretStoreOptions): Promise<string | null>;
32
- static saveSecret(secret: string, options?: ExpoAuthSecretStoreOptions): Promise<void>;
33
- static clearSecret(options?: ExpoAuthSecretStoreOptions): Promise<void>;
34
- static getOrCreateSecret(options?: ExpoAuthSecretStoreOptions): Promise<string>;
35
- }
36
- export declare const expoAuthSecretStore: AuthSecretStore;
37
- //# sourceMappingURL=auth-secret-store.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth-secret-store.d.ts","sourceRoot":"","sources":["../../src/expo/auth-secret-store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,iCAAiC,CAAC;AAEzC,MAAM,WAAW,mBAAmB;IAClC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAClD,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7C;AAED,MAAM,WAAW,0BAA2B,SAAQ,eAAe;IACjE,oFAAoF;IACpF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,WAAW,CAAC,EAAE,mBAAmB,CAAC;CACnC;AAoBD,qBAAa,mBAAoB,YAAW,eAAe;IACzD,OAAO,CAAC,MAAM,CAAC,eAAe,CAA0C;IACxE,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAA2C;IAC/E,OAAO,CAAC,MAAM,CAAC,sBAAsB,CAGjC;IACJ,OAAO,CAAC,MAAM,CAAC,4BAA4B,CAGvC;IACJ,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAsB;IAC5C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAuB;gBAE1C,OAAO,GAAE,0BAA+B;IAMpD,OAAO,CAAC,MAAM,CAAC,iBAAiB;IA0BhC,MAAM,CAAC,UAAU,CAAC,OAAO,GAAE,0BAA+B,GAAG,mBAAmB;IA0BhF,UAAU,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IASpC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAazC,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAK5B,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC;IAapC,OAAO,CAAC,SAAS;YASH,yBAAyB;IAWvC,MAAM,CAAC,UAAU,CAAC,OAAO,GAAE,0BAA+B,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAInF,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,0BAA+B,GAAG,OAAO,CAAC,IAAI,CAAC;IAI1F,MAAM,CAAC,WAAW,CAAC,OAAO,GAAE,0BAA+B,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3E,MAAM,CAAC,iBAAiB,CAAC,OAAO,GAAE,0BAA+B,GAAG,OAAO,CAAC,MAAM,CAAC;CAGpF;AAED,eAAO,MAAM,mBAAmB,EAAE,eAAkD,CAAC"}
@@ -1,139 +0,0 @@
1
- import { getRandomBytes } from "expo-crypto";
2
- import { deleteItemAsync, getItemAsync, setItemAsync } from "expo-secure-store";
3
- import { authSecretStorageKey, formatAuthSecret, parseAuthSecret, } from "../runtime/auth-secret-codec.js";
4
- function newSecretOperationState() {
5
- return { cachedPromise: null, operationTail: Promise.resolve() };
6
- }
7
- function resolveExpoAuthSecretKey(options = {}) {
8
- if (options.key) {
9
- return options.key;
10
- }
11
- return authSecretStorageKey(options);
12
- }
13
- export class ExpoAuthSecretStore {
14
- static globalInstances = new Map();
15
- static globalOperationStates = new Map();
16
- static storageScopedInstances = new WeakMap();
17
- static storageScopedOperationStates = new WeakMap();
18
- key;
19
- store;
20
- operationState;
21
- constructor(options = {}) {
22
- this.key = resolveExpoAuthSecretKey(options);
23
- this.store = options.secureStore ?? { getItemAsync, setItemAsync, deleteItemAsync };
24
- this.operationState = ExpoAuthSecretStore.getOperationState(this.key, options.secureStore);
25
- }
26
- static getOperationState(key, secureStore) {
27
- if (!secureStore) {
28
- let state = ExpoAuthSecretStore.globalOperationStates.get(key);
29
- if (!state) {
30
- state = newSecretOperationState();
31
- ExpoAuthSecretStore.globalOperationStates.set(key, state);
32
- }
33
- return state;
34
- }
35
- let states = ExpoAuthSecretStore.storageScopedOperationStates.get(secureStore);
36
- if (!states) {
37
- states = new Map();
38
- ExpoAuthSecretStore.storageScopedOperationStates.set(secureStore, states);
39
- }
40
- let state = states.get(key);
41
- if (!state) {
42
- state = newSecretOperationState();
43
- states.set(key, state);
44
- }
45
- return state;
46
- }
47
- static getDefault(options = {}) {
48
- const key = resolveExpoAuthSecretKey(options);
49
- if (options.secureStore) {
50
- let instances = ExpoAuthSecretStore.storageScopedInstances.get(options.secureStore);
51
- if (!instances) {
52
- instances = new Map();
53
- ExpoAuthSecretStore.storageScopedInstances.set(options.secureStore, instances);
54
- }
55
- let instance = instances.get(key);
56
- if (!instance) {
57
- instance = new ExpoAuthSecretStore(options);
58
- instances.set(key, instance);
59
- }
60
- return instance;
61
- }
62
- let instance = ExpoAuthSecretStore.globalInstances.get(key);
63
- if (!instance) {
64
- instance = new ExpoAuthSecretStore(options);
65
- ExpoAuthSecretStore.globalInstances.set(key, instance);
66
- }
67
- return instance;
68
- }
69
- loadSecret() {
70
- return this.serialize(async () => {
71
- const secret = await this.store.getItemAsync(this.key);
72
- if (secret === null)
73
- return null;
74
- parseAuthSecret(secret);
75
- return secret;
76
- });
77
- }
78
- saveSecret(secret) {
79
- parseAuthSecret(secret);
80
- const saving = this.serialize(() => this.store.setItemAsync(this.key, secret));
81
- const cached = saving.then(() => secret);
82
- this.operationState.cachedPromise = cached;
83
- void cached.catch(() => {
84
- if (this.operationState.cachedPromise === cached) {
85
- this.operationState.cachedPromise = null;
86
- }
87
- });
88
- return saving;
89
- }
90
- clearSecret() {
91
- this.operationState.cachedPromise = null;
92
- return this.serialize(() => this.store.deleteItemAsync(this.key));
93
- }
94
- getOrCreateSecret() {
95
- if (!this.operationState.cachedPromise) {
96
- const pending = this.serialize(() => this.getOrCreateSecretInternal());
97
- this.operationState.cachedPromise = pending;
98
- void pending.catch(() => {
99
- if (this.operationState.cachedPromise === pending) {
100
- this.operationState.cachedPromise = null;
101
- }
102
- });
103
- }
104
- return this.operationState.cachedPromise;
105
- }
106
- serialize(operation) {
107
- const result = this.operationState.operationTail.then(operation);
108
- this.operationState.operationTail = result.then(() => undefined, () => undefined);
109
- return result;
110
- }
111
- async getOrCreateSecretInternal() {
112
- const existing = await this.store.getItemAsync(this.key);
113
- if (existing !== null) {
114
- parseAuthSecret(existing);
115
- return existing;
116
- }
117
- const secret = generateExpoAuthSecret();
118
- await this.store.setItemAsync(this.key, secret);
119
- return secret;
120
- }
121
- static loadSecret(options = {}) {
122
- return ExpoAuthSecretStore.getDefault(options).loadSecret();
123
- }
124
- static saveSecret(secret, options = {}) {
125
- return ExpoAuthSecretStore.getDefault(options).saveSecret(secret);
126
- }
127
- static clearSecret(options = {}) {
128
- return ExpoAuthSecretStore.getDefault(options).clearSecret();
129
- }
130
- static getOrCreateSecret(options = {}) {
131
- return ExpoAuthSecretStore.getDefault(options).getOrCreateSecret();
132
- }
133
- }
134
- export const expoAuthSecretStore = ExpoAuthSecretStore.getDefault();
135
- function generateExpoAuthSecret() {
136
- const bytes = getRandomBytes(32);
137
- return formatAuthSecret(bytes);
138
- }
139
- //# sourceMappingURL=auth-secret-store.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth-secret-store.js","sourceRoot":"","sources":["../../src/expo/auth-secret-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEhF,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,GAEhB,MAAM,iCAAiC,CAAC;AA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AC;QAClB,CAAC;QACD,MAAM,MAAM,GAAG,sBAAsB,EAAE,CAAC;QACxC,MAAM,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QAChD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,UAAsC,EAAE;QACxD,OAAO,mBAAmB,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;IAC9D,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,MAAc,EAAE,UAAsC,EAAE;QACxE,OAAO,mBAAmB,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IACpE,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,UAAsC,EAAE;QACzD,OAAO,mBAAmB,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;IAC/D,CAAC;IAED,MAAM,CAAC,iBAAiB,CAAC,UAAsC,EAAE;QAC/D,OAAO,mBAAmB,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,iBAAiB,EAAE,CAAC;IACrE,CAAC;;AAGH,MAAM,CAAC,MAAM,mBAAmB,GAAoB,mBAAmB,CAAC,UAAU,EAAE,CAAC;AAErF,SAAS,sBAAsB;IAC7B,MAAM,KAAK,GAAG,cAAc,CAAC,EAAE,CAAC,CAAC;IACjC,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;AACjC,CAAC","sourcesContent":["import { getRandomBytes } from \"expo-crypto\";\nimport { deleteItemAsync, getItemAsync, setItemAsync } from \"expo-secure-store\";\nimport type { AuthSecretStore } from \"../runtime/auth-secret-store.js\";\nimport {\n authSecretStorageKey,\n formatAuthSecret,\n parseAuthSecret,\n type AuthSecretScope,\n} from \"../runtime/auth-secret-codec.js\";\n\nexport interface ExpoSecureStoreLike {\n getItemAsync(key: string): Promise<string | null>;\n setItemAsync(key: string, value: string): Promise<void>;\n deleteItemAsync(key: string): Promise<void>;\n}\n\nexport interface ExpoAuthSecretStoreOptions extends AuthSecretScope {\n /** Explicit physical SecureStore key. Prefer appId/profile for portable scoping. */\n key?: string;\n /** Override SecureStore backend for tests and host adapters. */\n secureStore?: ExpoSecureStoreLike;\n}\n\n/** State shared by every adapter instance addressing one SecureStore key. */\ntype SecretOperationState = {\n cachedPromise: Promise<string> | null;\n operationTail: Promise<void>;\n};\n\nfunction newSecretOperationState(): SecretOperationState {\n return { cachedPromise: null, operationTail: Promise.resolve() };\n}\n\nfunction resolveExpoAuthSecretKey(options: ExpoAuthSecretStoreOptions = {}): string {\n if (options.key) {\n return options.key;\n }\n\n return authSecretStorageKey(options);\n}\n\nexport class ExpoAuthSecretStore implements AuthSecretStore {\n private static globalInstances = new Map<string, ExpoAuthSecretStore>();\n private static globalOperationStates = new Map<string, SecretOperationState>();\n private static storageScopedInstances = new WeakMap<\n ExpoSecureStoreLike,\n Map<string, ExpoAuthSecretStore>\n >();\n private static storageScopedOperationStates = new WeakMap<\n ExpoSecureStoreLike,\n Map<string, SecretOperationState>\n >();\n private readonly key: string;\n private readonly store: ExpoSecureStoreLike;\n private readonly operationState: SecretOperationState;\n\n constructor(options: ExpoAuthSecretStoreOptions = {}) {\n this.key = resolveExpoAuthSecretKey(options);\n this.store = options.secureStore ?? { getItemAsync, setItemAsync, deleteItemAsync };\n this.operationState = ExpoAuthSecretStore.getOperationState(this.key, options.secureStore);\n }\n\n private static getOperationState(\n key: string,\n secureStore: ExpoSecureStoreLike | undefined,\n ): SecretOperationState {\n if (!secureStore) {\n let state = ExpoAuthSecretStore.globalOperationStates.get(key);\n if (!state) {\n state = newSecretOperationState();\n ExpoAuthSecretStore.globalOperationStates.set(key, state);\n }\n return state;\n }\n\n let states = ExpoAuthSecretStore.storageScopedOperationStates.get(secureStore);\n if (!states) {\n states = new Map<string, SecretOperationState>();\n ExpoAuthSecretStore.storageScopedOperationStates.set(secureStore, states);\n }\n let state = states.get(key);\n if (!state) {\n state = newSecretOperationState();\n states.set(key, state);\n }\n return state;\n }\n\n static getDefault(options: ExpoAuthSecretStoreOptions = {}): ExpoAuthSecretStore {\n const key = resolveExpoAuthSecretKey(options);\n\n if (options.secureStore) {\n let instances = ExpoAuthSecretStore.storageScopedInstances.get(options.secureStore);\n if (!instances) {\n instances = new Map<string, ExpoAuthSecretStore>();\n ExpoAuthSecretStore.storageScopedInstances.set(options.secureStore, instances);\n }\n\n let instance = instances.get(key);\n if (!instance) {\n instance = new ExpoAuthSecretStore(options);\n instances.set(key, instance);\n }\n return instance;\n }\n\n let instance = ExpoAuthSecretStore.globalInstances.get(key);\n if (!instance) {\n instance = new ExpoAuthSecretStore(options);\n ExpoAuthSecretStore.globalInstances.set(key, instance);\n }\n return instance;\n }\n\n loadSecret(): Promise<string | null> {\n return this.serialize(async () => {\n const secret = await this.store.getItemAsync(this.key);\n if (secret === null) return null;\n parseAuthSecret(secret);\n return secret;\n });\n }\n\n saveSecret(secret: string): Promise<void> {\n parseAuthSecret(secret);\n const saving = this.serialize(() => this.store.setItemAsync(this.key, secret));\n const cached = saving.then(() => secret);\n this.operationState.cachedPromise = cached;\n void cached.catch(() => {\n if (this.operationState.cachedPromise === cached) {\n this.operationState.cachedPromise = null;\n }\n });\n return saving;\n }\n\n clearSecret(): Promise<void> {\n this.operationState.cachedPromise = null;\n return this.serialize(() => this.store.deleteItemAsync(this.key));\n }\n\n getOrCreateSecret(): Promise<string> {\n if (!this.operationState.cachedPromise) {\n const pending = this.serialize(() => this.getOrCreateSecretInternal());\n this.operationState.cachedPromise = pending;\n void pending.catch(() => {\n if (this.operationState.cachedPromise === pending) {\n this.operationState.cachedPromise = null;\n }\n });\n }\n return this.operationState.cachedPromise;\n }\n\n private serialize<T>(operation: () => Promise<T>): Promise<T> {\n const result = this.operationState.operationTail.then(operation);\n this.operationState.operationTail = result.then(\n () => undefined,\n () => undefined,\n );\n return result;\n }\n\n private async getOrCreateSecretInternal(): Promise<string> {\n const existing = await this.store.getItemAsync(this.key);\n if (existing !== null) {\n parseAuthSecret(existing);\n return existing;\n }\n const secret = generateExpoAuthSecret();\n await this.store.setItemAsync(this.key, secret);\n return secret;\n }\n\n static loadSecret(options: ExpoAuthSecretStoreOptions = {}): Promise<string | null> {\n return ExpoAuthSecretStore.getDefault(options).loadSecret();\n }\n\n static saveSecret(secret: string, options: ExpoAuthSecretStoreOptions = {}): Promise<void> {\n return ExpoAuthSecretStore.getDefault(options).saveSecret(secret);\n }\n\n static clearSecret(options: ExpoAuthSecretStoreOptions = {}): Promise<void> {\n return ExpoAuthSecretStore.getDefault(options).clearSecret();\n }\n\n static getOrCreateSecret(options: ExpoAuthSecretStoreOptions = {}): Promise<string> {\n return ExpoAuthSecretStore.getDefault(options).getOrCreateSecret();\n }\n}\n\nexport const expoAuthSecretStore: AuthSecretStore = ExpoAuthSecretStore.getDefault();\n\nfunction generateExpoAuthSecret(): string {\n const bytes = getRandomBytes(32);\n return formatAuthSecret(bytes);\n}\n"]}
@@ -1,10 +0,0 @@
1
- import { type JazzSessionProviderProps as ExternalProps, type ConfiguredJazzSessionProviderProps, type UseJazzSessionResult as CoreResult } from "../react-core/session.js";
2
- import { type JazzClientConfig } from "./create-jazz-session.js";
3
- import type { JazzClient } from "../react-native/create-jazz-client.js";
4
- export { createJazzClient, type JazzClientConfig } from "./create-jazz-session.js";
5
- export type { JazzSession, JazzSessionSnapshot, JazzSessionActions } from "../session/state.js";
6
- export type { JazzSessionOwnerResult } from "../react-core/session.js";
7
- export type UseJazzSessionResult = CoreResult<JazzClient>;
8
- export type JazzSessionProviderProps = ExternalProps<JazzClient> | ConfiguredJazzSessionProviderProps<JazzClientConfig>;
9
- export declare const JazzSessionProvider: (props: ExternalProps<JazzClient> | ConfiguredJazzSessionProviderProps<JazzClientConfig>) => import("react/jsx-runtime").JSX.Element, useJazzSession: () => CoreResult<JazzClient>, useJazzSessionOwner: (config: JazzClientConfig) => import("../react-core/session.js").JazzSessionOwnerResult<JazzClient>;
10
- //# sourceMappingURL=session.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/expo/session.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,wBAAwB,IAAI,aAAa,EAC9C,KAAK,kCAAkC,EACvC,KAAK,oBAAoB,IAAI,UAAU,EACxC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACnF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACnF,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAChG,YAAY,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAEvE,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;AAC1D,MAAM,MAAM,wBAAwB,GAChC,aAAa,CAAC,UAAU,CAAC,GACzB,kCAAkC,CAAC,gBAAgB,CAAC,CAAC;AAEzD,eAAO,MAAQ,mBAAmB,wIAAE,cAAc,gCAAE,mBAAmB,qGAC1B,CAAC"}
@@ -1,5 +0,0 @@
1
- import { createJazzSessionBindings, } from "../react-core/session.js";
2
- import { createJazzClient } from "./create-jazz-session.js";
3
- export { createJazzClient } from "./create-jazz-session.js";
4
- export const { JazzSessionProvider, useJazzSession, useJazzSessionOwner } = createJazzSessionBindings(createJazzClient);
5
- //# sourceMappingURL=session.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/expo/session.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,GAI1B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAyB,MAAM,0BAA0B,CAAC;AAEnF,OAAO,EAAE,gBAAgB,EAAyB,MAAM,0BAA0B,CAAC;AASnF,MAAM,CAAC,MAAM,EAAE,mBAAmB,EAAE,cAAc,EAAE,mBAAmB,EAAE,GACvE,yBAAyB,CAAC,gBAAgB,CAAC,CAAC","sourcesContent":["import {\n createJazzSessionBindings,\n type JazzSessionProviderProps as ExternalProps,\n type ConfiguredJazzSessionProviderProps,\n type UseJazzSessionResult as CoreResult,\n} from \"../react-core/session.js\";\nimport { createJazzClient, type JazzClientConfig } from \"./create-jazz-session.js\";\nimport type { JazzClient } from \"../react-native/create-jazz-client.js\";\nexport { createJazzClient, type JazzClientConfig } from \"./create-jazz-session.js\";\nexport type { JazzSession, JazzSessionSnapshot, JazzSessionActions } from \"../session/state.js\";\nexport type { JazzSessionOwnerResult } from \"../react-core/session.js\";\n\nexport type UseJazzSessionResult = CoreResult<JazzClient>;\nexport type JazzSessionProviderProps =\n | ExternalProps<JazzClient>\n | ConfiguredJazzSessionProviderProps<JazzClientConfig>;\n\nexport const { JazzSessionProvider, useJazzSession, useJazzSessionOwner } =\n createJazzSessionBindings(createJazzClient);\n"]}
@@ -1,12 +0,0 @@
1
- import type { LocalFirstAuth } from "../react-core/use-local-first-auth.js";
2
- import { type ExpoAuthSecretStoreOptions } from "./auth-secret-store.js";
3
- export type UseLocalFirstAuthOptions = Pick<ExpoAuthSecretStoreOptions, "key" | "profile"> & {
4
- /**
5
- * For apps that already have local-first users: the app id their secrets
6
- * were stored under, so they keep them. New apps leave it out.
7
- */
8
- scope?: string;
9
- };
10
- export declare function useLocalFirstAuth(options?: UseLocalFirstAuthOptions): LocalFirstAuth;
11
- export type { LocalFirstAuth } from "../react-core/use-local-first-auth.js";
12
- //# sourceMappingURL=use-local-first-auth.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-local-first-auth.d.ts","sourceRoot":"","sources":["../../src/expo/use-local-first-auth.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAGL,KAAK,0BAA0B,EAChC,MAAM,wBAAwB,CAAC;AAEhC,MAAM,MAAM,wBAAwB,GAAG,IAAI,CAAC,0BAA0B,EAAE,KAAK,GAAG,SAAS,CAAC,GAAG;IAC3F;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,wBAA6B,GAAG,cAAc,CAMxF;AAMD,YAAY,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC"}
@@ -1,13 +0,0 @@
1
- import { useLocalFirstAuthWithStore } from "../react-core/use-local-first-auth.js";
2
- import { ExpoAuthSecretStore, expoAuthSecretStore, } from "./auth-secret-store.js";
3
- export function useLocalFirstAuth(options = {}) {
4
- const hasCustomOptions = Object.values(options).some((value) => value !== undefined);
5
- const store = hasCustomOptions
6
- ? ExpoAuthSecretStore.getDefault(secretStoreOptions(options))
7
- : expoAuthSecretStore;
8
- return useLocalFirstAuthWithStore(store);
9
- }
10
- function secretStoreOptions({ scope, ...options }) {
11
- return scope === undefined ? options : { ...options, appId: scope };
12
- }
13
- //# sourceMappingURL=use-local-first-auth.js.map