@backendrelay/core 1.1.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/standalone/index.js +1 -1
- package/dist/standalone/index.umd.cjs +1 -1
- package/node_modules/@backendrelay/admin/dist/commonjs/__types__/typeUtils.d.ts +20 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/__types__/typeUtils.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/__types__/typeUtils.js +5 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/__types__/typeUtils.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/__types__/typesTests.d.ts +2 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/__types__/typesTests.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/__types__/typesTests.js +88 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/__types__/typesTests.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/byop.live.e2e.test.d.ts +2 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/byop.live.e2e.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/byop.live.e2e.test.js +131 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/byop.live.e2e.test.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/config.test.d.ts +2 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/config.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/config.test.js +65 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/config.test.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/index.d.ts +725 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/index.js +1159 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/index.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/live.e2e.test.d.ts +2 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/live.e2e.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/live.e2e.test.js +91 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/live.e2e.test.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/package.json +3 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/polyfill.d.ts +17 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/polyfill.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/polyfill.js +26 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/polyfill.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/removed-features.test.d.ts +2 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/removed-features.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/removed-features.test.js +50 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/removed-features.test.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/storage-upload.test.d.ts +2 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/storage-upload.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/storage-upload.test.js +33 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/storage-upload.test.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/subscribe.d.ts +39 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/subscribe.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/subscribe.js +306 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/subscribe.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/version.d.ts +3 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/version.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/version.js +5 -0
- package/node_modules/@backendrelay/admin/dist/commonjs/version.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/__types__/typeUtils.d.ts +20 -0
- package/node_modules/@backendrelay/admin/dist/esm/__types__/typeUtils.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/__types__/typeUtils.js +4 -0
- package/node_modules/@backendrelay/admin/dist/esm/__types__/typeUtils.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/__types__/typesTests.d.ts +2 -0
- package/node_modules/@backendrelay/admin/dist/esm/__types__/typesTests.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/__types__/typesTests.js +86 -0
- package/node_modules/@backendrelay/admin/dist/esm/__types__/typesTests.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/byop.live.e2e.test.d.ts +2 -0
- package/node_modules/@backendrelay/admin/dist/esm/byop.live.e2e.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/byop.live.e2e.test.js +129 -0
- package/node_modules/@backendrelay/admin/dist/esm/byop.live.e2e.test.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/config.test.d.ts +2 -0
- package/node_modules/@backendrelay/admin/dist/esm/config.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/config.test.js +63 -0
- package/node_modules/@backendrelay/admin/dist/esm/config.test.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/index.d.ts +725 -0
- package/node_modules/@backendrelay/admin/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/index.js +1146 -0
- package/node_modules/@backendrelay/admin/dist/esm/index.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/live.e2e.test.d.ts +2 -0
- package/node_modules/@backendrelay/admin/dist/esm/live.e2e.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/live.e2e.test.js +89 -0
- package/node_modules/@backendrelay/admin/dist/esm/live.e2e.test.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/package.json +3 -0
- package/node_modules/@backendrelay/admin/dist/esm/polyfill.d.ts +17 -0
- package/node_modules/@backendrelay/admin/dist/esm/polyfill.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/polyfill.js +22 -0
- package/node_modules/@backendrelay/admin/dist/esm/polyfill.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/removed-features.test.d.ts +2 -0
- package/node_modules/@backendrelay/admin/dist/esm/removed-features.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/removed-features.test.js +48 -0
- package/node_modules/@backendrelay/admin/dist/esm/removed-features.test.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/storage-upload.test.d.ts +2 -0
- package/node_modules/@backendrelay/admin/dist/esm/storage-upload.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/storage-upload.test.js +31 -0
- package/node_modules/@backendrelay/admin/dist/esm/storage-upload.test.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/subscribe.d.ts +39 -0
- package/node_modules/@backendrelay/admin/dist/esm/subscribe.d.ts.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/subscribe.js +300 -0
- package/node_modules/@backendrelay/admin/dist/esm/subscribe.js.map +1 -0
- package/node_modules/@backendrelay/admin/dist/esm/version.d.ts +3 -0
- package/node_modules/@backendrelay/admin/dist/esm/version.d.ts.map +1 -0
- package/{src/version.ts → node_modules/@backendrelay/admin/dist/esm/version.js} +1 -1
- package/node_modules/@backendrelay/admin/dist/esm/version.js.map +1 -0
- package/node_modules/@backendrelay/admin/package.json +52 -0
- package/node_modules/@backendrelay/functions/README.md +131 -0
- package/node_modules/@backendrelay/functions/dist/commonjs/__types__/typeUtils.d.ts +3 -0
- package/node_modules/@backendrelay/functions/dist/commonjs/__types__/typeUtils.d.ts.map +1 -0
- package/node_modules/@backendrelay/functions/dist/commonjs/__types__/typeUtils.js +3 -0
- package/node_modules/@backendrelay/functions/dist/commonjs/__types__/typeUtils.js.map +1 -0
- package/node_modules/@backendrelay/functions/dist/commonjs/__types__/typesTests.d.ts +2 -0
- package/node_modules/@backendrelay/functions/dist/commonjs/__types__/typesTests.d.ts.map +1 -0
- package/node_modules/@backendrelay/functions/dist/commonjs/__types__/typesTests.js +51 -0
- package/node_modules/@backendrelay/functions/dist/commonjs/__types__/typesTests.js.map +1 -0
- package/node_modules/@backendrelay/functions/dist/commonjs/index.d.ts +230 -0
- package/node_modules/@backendrelay/functions/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/functions/dist/commonjs/index.js +415 -0
- package/node_modules/@backendrelay/functions/dist/commonjs/index.js.map +1 -0
- package/node_modules/@backendrelay/functions/dist/commonjs/package.json +3 -0
- package/node_modules/@backendrelay/functions/dist/esm/__types__/typeUtils.d.ts +3 -0
- package/node_modules/@backendrelay/functions/dist/esm/__types__/typeUtils.d.ts.map +1 -0
- package/node_modules/@backendrelay/functions/dist/esm/__types__/typeUtils.js +2 -0
- package/node_modules/@backendrelay/functions/dist/esm/__types__/typeUtils.js.map +1 -0
- package/node_modules/@backendrelay/functions/dist/esm/__types__/typesTests.d.ts +2 -0
- package/node_modules/@backendrelay/functions/dist/esm/__types__/typesTests.d.ts.map +1 -0
- package/node_modules/@backendrelay/functions/dist/esm/__types__/typesTests.js +49 -0
- package/node_modules/@backendrelay/functions/dist/esm/__types__/typesTests.js.map +1 -0
- package/node_modules/@backendrelay/functions/dist/esm/index.d.ts +230 -0
- package/node_modules/@backendrelay/functions/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/functions/dist/esm/index.js +403 -0
- package/node_modules/@backendrelay/functions/dist/esm/index.js.map +1 -0
- package/node_modules/@backendrelay/functions/dist/esm/package.json +3 -0
- package/node_modules/@backendrelay/functions/package.json +49 -0
- package/node_modules/@backendrelay/hatchet/dist/commonjs/index.d.ts +43 -0
- package/node_modules/@backendrelay/hatchet/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/hatchet/dist/commonjs/index.js +63 -0
- package/node_modules/@backendrelay/hatchet/dist/commonjs/index.js.map +1 -0
- package/node_modules/@backendrelay/hatchet/dist/commonjs/package.json +3 -0
- package/node_modules/@backendrelay/hatchet/dist/esm/index.d.ts +43 -0
- package/node_modules/@backendrelay/hatchet/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/hatchet/dist/esm/index.js +59 -0
- package/node_modules/@backendrelay/hatchet/dist/esm/index.js.map +1 -0
- package/node_modules/@backendrelay/hatchet/dist/esm/package.json +3 -0
- package/node_modules/@backendrelay/hatchet/package.json +46 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/ProgressPromise.d.ts +18 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/ProgressPromise.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/ProgressPromise.js +77 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/ProgressPromise.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/apps.d.ts +99 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/apps.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/apps.js +177 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/apps.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/auth.d.ts +7 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/auth.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/auth.js +15 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/auth.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/http.d.ts +3 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/http.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/http.js +46 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/http.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/perms.d.ts +13 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/perms.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/perms.js +25 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/perms.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/platform-api.d.ts +285 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/platform-api.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/platform-api.js +426 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/platform-api.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/schema-coerce.d.ts +24 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/schema-coerce.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/schema-coerce.js +108 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/schema-coerce.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/schema.d.ts +188 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/schema.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/schema.js +412 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api/schema.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api.d.ts +9 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api.js +12 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/api.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/backupDownload.d.ts +89 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/backupDownload.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/backupDownload.js +357 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/backupDownload.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/backups.d.ts +146 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/backups.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/backups.js +251 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/backups.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/clerk.d.ts +2 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/clerk.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/clerk.js +29 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/clerk.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/consts.d.ts +11 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/consts.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/consts.js +17 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/consts.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/crypto.d.ts +4 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/crypto.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/crypto.js +26 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/crypto.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/index.d.ts +19 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/index.js +76 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/index.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/migrationUtils.d.ts +4 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/migrationUtils.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/migrationUtils.js +52 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/migrationUtils.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/migrations.d.ts +99 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/migrations.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/migrations.js +597 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/migrations.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/oauth.d.ts +98 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/oauth.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/oauth.js +275 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/oauth.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/oauthCommon.d.ts +12 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/oauthCommon.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/oauthCommon.js +26 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/oauthCommon.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/package.json +3 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/perms.d.ts +3 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/perms.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/perms.js +66 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/perms.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/privateFields.d.ts +13 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/privateFields.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/privateFields.js +31 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/privateFields.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/relationships.d.ts +7 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/relationships.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/relationships.js +46 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/relationships.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/schema.d.ts +161 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/schema.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/schema.js +174 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/schema.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/serverOAuth.d.ts +25 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/serverOAuth.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/serverOAuth.js +68 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/serverOAuth.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/typescript-schema.d.ts +17 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/typescript-schema.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/typescript-schema.js +314 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/typescript-schema.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/util.d.ts +13 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/util.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/util.js +55 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/util.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/version.d.ts +3 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/version.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/version.js +5 -0
- package/node_modules/@backendrelay/platform/dist/commonjs/version.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/ProgressPromise.d.ts +18 -0
- package/node_modules/@backendrelay/platform/dist/esm/ProgressPromise.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/ProgressPromise.js +73 -0
- package/node_modules/@backendrelay/platform/dist/esm/ProgressPromise.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/apps.d.ts +99 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/apps.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/apps.js +165 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/apps.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/auth.d.ts +7 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/auth.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/auth.js +12 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/auth.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/http.d.ts +3 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/http.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/http.js +39 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/http.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/perms.d.ts +13 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/perms.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/perms.js +21 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/perms.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/platform-api.d.ts +285 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/platform-api.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/platform-api.js +421 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/platform-api.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/schema-coerce.d.ts +24 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/schema-coerce.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/schema-coerce.js +99 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/schema-coerce.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/schema.d.ts +188 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/schema.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/schema.js +393 -0
- package/node_modules/@backendrelay/platform/dist/esm/api/schema.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api.d.ts +9 -0
- package/node_modules/@backendrelay/platform/dist/esm/api.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/api.js +4 -0
- package/node_modules/@backendrelay/platform/dist/esm/api.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/backupDownload.d.ts +89 -0
- package/node_modules/@backendrelay/platform/dist/esm/backupDownload.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/backupDownload.js +354 -0
- package/node_modules/@backendrelay/platform/dist/esm/backupDownload.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/backups.d.ts +146 -0
- package/node_modules/@backendrelay/platform/dist/esm/backups.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/backups.js +240 -0
- package/node_modules/@backendrelay/platform/dist/esm/backups.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/clerk.d.ts +2 -0
- package/node_modules/@backendrelay/platform/dist/esm/clerk.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/clerk.js +26 -0
- package/node_modules/@backendrelay/platform/dist/esm/clerk.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/consts.d.ts +11 -0
- package/node_modules/@backendrelay/platform/dist/esm/consts.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/consts.js +13 -0
- package/node_modules/@backendrelay/platform/dist/esm/consts.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/crypto.d.ts +4 -0
- package/node_modules/@backendrelay/platform/dist/esm/crypto.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/crypto.js +21 -0
- package/node_modules/@backendrelay/platform/dist/esm/crypto.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/index.d.ts +19 -0
- package/node_modules/@backendrelay/platform/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/index.js +18 -0
- package/node_modules/@backendrelay/platform/dist/esm/index.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/migrationUtils.d.ts +4 -0
- package/node_modules/@backendrelay/platform/dist/esm/migrationUtils.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/migrationUtils.js +47 -0
- package/node_modules/@backendrelay/platform/dist/esm/migrationUtils.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/migrations.d.ts +99 -0
- package/node_modules/@backendrelay/platform/dist/esm/migrations.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/migrations.js +588 -0
- package/node_modules/@backendrelay/platform/dist/esm/migrations.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/oauth.d.ts +98 -0
- package/node_modules/@backendrelay/platform/dist/esm/oauth.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/oauth.js +266 -0
- package/node_modules/@backendrelay/platform/dist/esm/oauth.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/oauthCommon.d.ts +12 -0
- package/node_modules/@backendrelay/platform/dist/esm/oauthCommon.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/oauthCommon.js +22 -0
- package/node_modules/@backendrelay/platform/dist/esm/oauthCommon.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/package.json +3 -0
- package/node_modules/@backendrelay/platform/dist/esm/perms.d.ts +3 -0
- package/node_modules/@backendrelay/platform/dist/esm/perms.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/perms.js +62 -0
- package/node_modules/@backendrelay/platform/dist/esm/perms.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/privateFields.d.ts +13 -0
- package/node_modules/@backendrelay/platform/dist/esm/privateFields.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/privateFields.js +28 -0
- package/node_modules/@backendrelay/platform/dist/esm/privateFields.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/relationships.d.ts +7 -0
- package/node_modules/@backendrelay/platform/dist/esm/relationships.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/relationships.js +43 -0
- package/node_modules/@backendrelay/platform/dist/esm/relationships.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/schema.d.ts +161 -0
- package/node_modules/@backendrelay/platform/dist/esm/schema.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/schema.js +158 -0
- package/node_modules/@backendrelay/platform/dist/esm/schema.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/serverOAuth.d.ts +25 -0
- package/node_modules/@backendrelay/platform/dist/esm/serverOAuth.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/serverOAuth.js +64 -0
- package/node_modules/@backendrelay/platform/dist/esm/serverOAuth.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/typescript-schema.d.ts +17 -0
- package/node_modules/@backendrelay/platform/dist/esm/typescript-schema.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/typescript-schema.js +310 -0
- package/node_modules/@backendrelay/platform/dist/esm/typescript-schema.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/util.d.ts +13 -0
- package/node_modules/@backendrelay/platform/dist/esm/util.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/util.js +46 -0
- package/node_modules/@backendrelay/platform/dist/esm/util.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/version.d.ts +3 -0
- package/node_modules/@backendrelay/platform/dist/esm/version.d.ts.map +1 -0
- package/node_modules/@backendrelay/platform/dist/esm/version.js +3 -0
- package/node_modules/@backendrelay/platform/dist/esm/version.js.map +1 -0
- package/node_modules/@backendrelay/platform/dist/standalone/index.js +13738 -0
- package/node_modules/@backendrelay/platform/dist/standalone/index.umd.cjs +72 -0
- package/node_modules/@backendrelay/platform/package.json +51 -0
- package/node_modules/@backendrelay/resumable-stream/dist/commonjs/index.d.ts +67 -0
- package/node_modules/@backendrelay/resumable-stream/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/resumable-stream/dist/commonjs/index.js +129 -0
- package/node_modules/@backendrelay/resumable-stream/dist/commonjs/index.js.map +1 -0
- package/node_modules/@backendrelay/resumable-stream/dist/commonjs/package.json +3 -0
- package/node_modules/@backendrelay/resumable-stream/dist/esm/index.d.ts +67 -0
- package/node_modules/@backendrelay/resumable-stream/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/resumable-stream/dist/esm/index.js +126 -0
- package/node_modules/@backendrelay/resumable-stream/dist/esm/index.js.map +1 -0
- package/node_modules/@backendrelay/resumable-stream/dist/esm/package.json +3 -0
- package/node_modules/@backendrelay/resumable-stream/dist/standalone/index.js +4354 -0
- package/node_modules/@backendrelay/resumable-stream/dist/standalone/index.umd.cjs +6 -0
- package/node_modules/@backendrelay/resumable-stream/package.json +47 -0
- package/node_modules/@backendrelay/rules/README.md +34 -0
- package/node_modules/@backendrelay/rules/dist/commonjs/index.d.ts +117 -0
- package/node_modules/@backendrelay/rules/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/rules/dist/commonjs/index.js +68 -0
- package/node_modules/@backendrelay/rules/dist/commonjs/index.js.map +1 -0
- package/node_modules/@backendrelay/rules/dist/commonjs/package.json +3 -0
- package/node_modules/@backendrelay/rules/dist/esm/index.d.ts +117 -0
- package/node_modules/@backendrelay/rules/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/rules/dist/esm/index.js +64 -0
- package/node_modules/@backendrelay/rules/dist/esm/index.js.map +1 -0
- package/node_modules/@backendrelay/rules/dist/esm/package.json +3 -0
- package/node_modules/@backendrelay/rules/package.json +46 -0
- package/node_modules/@backendrelay/test/README.md +75 -0
- package/node_modules/@backendrelay/test/dist/commonjs/index.d.ts +74 -0
- package/node_modules/@backendrelay/test/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/test/dist/commonjs/index.js +197 -0
- package/node_modules/@backendrelay/test/dist/commonjs/index.js.map +1 -0
- package/node_modules/@backendrelay/test/dist/commonjs/live.e2e.test.d.ts +2 -0
- package/node_modules/@backendrelay/test/dist/commonjs/live.e2e.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/test/dist/commonjs/live.e2e.test.js +45 -0
- package/node_modules/@backendrelay/test/dist/commonjs/live.e2e.test.js.map +1 -0
- package/node_modules/@backendrelay/test/dist/commonjs/package.json +3 -0
- package/node_modules/@backendrelay/test/dist/esm/index.d.ts +74 -0
- package/node_modules/@backendrelay/test/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/test/dist/esm/index.js +192 -0
- package/node_modules/@backendrelay/test/dist/esm/index.js.map +1 -0
- package/node_modules/@backendrelay/test/dist/esm/live.e2e.test.d.ts +2 -0
- package/node_modules/@backendrelay/test/dist/esm/live.e2e.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/test/dist/esm/live.e2e.test.js +43 -0
- package/node_modules/@backendrelay/test/dist/esm/live.e2e.test.js.map +1 -0
- package/node_modules/@backendrelay/test/dist/esm/package.json +3 -0
- package/node_modules/@backendrelay/test/package.json +49 -0
- package/node_modules/@backendrelay/version/dist/commonjs/index.d.ts +3 -0
- package/node_modules/@backendrelay/version/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/version/dist/commonjs/index.js +6 -0
- package/node_modules/@backendrelay/version/dist/commonjs/index.js.map +1 -0
- package/node_modules/@backendrelay/version/dist/commonjs/package.json +3 -0
- package/node_modules/@backendrelay/version/dist/commonjs/version.d.ts +3 -0
- package/node_modules/@backendrelay/version/dist/commonjs/version.d.ts.map +1 -0
- package/node_modules/@backendrelay/version/dist/commonjs/version.js +10 -0
- package/node_modules/@backendrelay/version/dist/commonjs/version.js.map +1 -0
- package/node_modules/@backendrelay/version/dist/esm/index.d.ts +3 -0
- package/node_modules/@backendrelay/version/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/version/dist/esm/index.js +3 -0
- package/node_modules/@backendrelay/version/dist/esm/index.js.map +1 -0
- package/node_modules/@backendrelay/version/dist/esm/package.json +3 -0
- package/node_modules/@backendrelay/version/dist/esm/version.d.ts +3 -0
- package/node_modules/@backendrelay/version/dist/esm/version.d.ts.map +1 -0
- package/node_modules/@backendrelay/version/dist/esm/version.js +7 -0
- package/node_modules/@backendrelay/version/dist/esm/version.js.map +1 -0
- package/node_modules/@backendrelay/version/dist/standalone/index.js +4 -0
- package/node_modules/@backendrelay/version/dist/standalone/index.umd.cjs +1 -0
- package/node_modules/@backendrelay/version/package.json +44 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/__types__/typeUtils.d.ts +12 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/__types__/typeUtils.d.ts.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/__types__/typeUtils.js +5 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/__types__/typeUtils.js.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/__types__/typesTests.d.ts +2 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/__types__/typesTests.d.ts.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/__types__/typesTests.js +82 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/__types__/typesTests.js.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/index.d.ts +607 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/index.js +830 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/index.js.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/live.e2e.test.d.ts +2 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/live.e2e.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/live.e2e.test.js +139 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/live.e2e.test.js.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/commonjs/package.json +3 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/__types__/typeUtils.d.ts +12 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/__types__/typeUtils.d.ts.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/__types__/typeUtils.js +4 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/__types__/typeUtils.js.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/__types__/typesTests.d.ts +2 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/__types__/typesTests.d.ts.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/__types__/typesTests.js +80 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/__types__/typesTests.js.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/index.d.ts +607 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/index.js +825 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/index.js.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/live.e2e.test.d.ts +2 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/live.e2e.test.d.ts.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/live.e2e.test.js +137 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/live.e2e.test.js.map +1 -0
- package/node_modules/@backendrelay/webhooks/dist/esm/package.json +3 -0
- package/node_modules/@backendrelay/webhooks/package.json +46 -0
- package/package.json +129 -56
- package/subpaths/admin/index.cjs +1 -0
- package/subpaths/admin/index.d.ts +1 -0
- package/subpaths/admin/index.mjs +3 -0
- package/subpaths/functions/index.cjs +1 -0
- package/subpaths/functions/index.d.ts +1 -0
- package/subpaths/functions/index.mjs +3 -0
- package/subpaths/hatchet/index.cjs +1 -0
- package/subpaths/hatchet/index.d.ts +1 -0
- package/subpaths/hatchet/index.mjs +3 -0
- package/subpaths/platform/index.cjs +1 -0
- package/subpaths/platform/index.d.ts +1 -0
- package/subpaths/platform/index.mjs +3 -0
- package/subpaths/resumable-stream/index.cjs +1 -0
- package/subpaths/resumable-stream/index.d.ts +1 -0
- package/subpaths/resumable-stream/index.mjs +3 -0
- package/subpaths/rules/index.cjs +1 -0
- package/subpaths/rules/index.d.ts +1 -0
- package/subpaths/rules/index.mjs +3 -0
- package/subpaths/test/index.cjs +1 -0
- package/subpaths/test/index.d.ts +1 -0
- package/subpaths/test/index.mjs +3 -0
- package/subpaths/version/index.cjs +1 -0
- package/subpaths/version/index.d.ts +1 -0
- package/subpaths/version/index.mjs +3 -0
- package/subpaths/webhooks/index.cjs +1 -0
- package/subpaths/webhooks/index.d.ts +1 -0
- package/subpaths/webhooks/index.mjs +3 -0
- package/.tshy/build.json +0 -8
- package/.tshy/commonjs.json +0 -16
- package/.tshy/esm.json +0 -15
- package/__example__/standalone.esm.html +0 -23
- package/__example__/standalone.umd.html +0 -21
- package/__tests__/src/Connection.test.ts +0 -292
- package/__tests__/src/IndexedDBStorage.test.ts +0 -96
- package/__tests__/src/Reactor.test.ts +0 -1179
- package/__tests__/src/auth-extra-fields.e2e.test.ts +0 -160
- package/__tests__/src/byop.e2e.test.ts +0 -762
- package/__tests__/src/config.test.ts +0 -85
- package/__tests__/src/cookieSync.e2e.test.ts +0 -163
- package/__tests__/src/data/movies/attrs.json +0 -145
- package/__tests__/src/data/movies/triples.json +0 -1507
- package/__tests__/src/data/zeneca/attrs.json +0 -251
- package/__tests__/src/data/zeneca/triples.json +0 -15854
- package/__tests__/src/datalog.test.ts +0 -175
- package/__tests__/src/devtool.test.ts +0 -23
- package/__tests__/src/framework.test.ts +0 -173
- package/__tests__/src/infiniteQuery.e2e.test.ts +0 -467
- package/__tests__/src/instaml.test.ts +0 -1593
- package/__tests__/src/instaql.bench.ts +0 -34
- package/__tests__/src/instaql.test.ts +0 -1497
- package/__tests__/src/instaqlInference.test.ts +0 -243
- package/__tests__/src/presence.test.ts +0 -49
- package/__tests__/src/queryValidation.test.ts +0 -1101
- package/__tests__/src/schema.test.ts +0 -653
- package/__tests__/src/serializeSchema.test.ts +0 -123
- package/__tests__/src/simple.e2e.test.ts +0 -133
- package/__tests__/src/storage-upload.test.ts +0 -37
- package/__tests__/src/store.test.ts +0 -960
- package/__tests__/src/syncTable.e2e.test.ts +0 -245
- package/__tests__/src/syncTable.test.ts +0 -235
- package/__tests__/src/transactionValidation.test.ts +0 -450
- package/__tests__/src/typeUtils.ts +0 -39
- package/__tests__/src/upstream-improvements.e2e.test.ts +0 -54
- package/__tests__/src/utils/MutationStorage.test.ts +0 -77
- package/__tests__/src/utils/PersistedObject.test.ts +0 -569
- package/__tests__/src/utils/dates.test.ts +0 -111
- package/__tests__/src/utils/e2e.ts +0 -100
- package/__tests__/src/utils/msw.ts +0 -3
- package/__tests__/src/utils/object.test.ts +0 -78
- package/__tests__/src/utils/weakHash.test.ts +0 -68
- package/__tests__/src/utils/weakHashLegacy.test.ts +0 -22
- package/__tests__/src/vite.env.d.ts +0 -1
- package/src/BackendRelayError.ts +0 -50
- package/src/Connection.ts +0 -361
- package/src/InMemoryStorage.ts +0 -34
- package/src/IndexedDBStorage.ts +0 -398
- package/src/Reactor.js +0 -1541
- package/src/StorageAPI.ts +0 -147
- package/src/Stream.ts +0 -1252
- package/src/SyncTable.ts +0 -750
- package/src/WindowNetworkListener.js +0 -19
- package/src/__types__/fieldsTypeTest.ts +0 -111
- package/src/__types__/typeUtils.ts +0 -39
- package/src/__types__/useDatesTypeTest.ts +0 -66
- package/src/attrTypes.ts +0 -37
- package/src/authAPI.ts +0 -205
- package/src/clientTypes.ts +0 -28
- package/src/coreTypes.ts +0 -58
- package/src/createRouteHandler.ts +0 -68
- package/src/datalog.js +0 -116
- package/src/devtool.ts +0 -179
- package/src/framework.ts +0 -450
- package/src/helperTypes.ts +0 -117
- package/src/index.ts +0 -1293
- package/src/infiniteQuery.ts +0 -599
- package/src/instaml.ts +0 -676
- package/src/instaql.ts +0 -999
- package/src/instatx.ts +0 -265
- package/src/model/instaqlResult.js +0 -25
- package/src/parseSchemaFromJSON.ts +0 -176
- package/src/presence.ts +0 -123
- package/src/presenceTypes.ts +0 -19
- package/src/queryTypes.ts +0 -749
- package/src/queryValidation.ts +0 -598
- package/src/reactorAuth.js +0 -236
- package/src/reactorEvents.js +0 -414
- package/src/reactorMutations.js +0 -354
- package/src/reactorRooms.js +0 -297
- package/src/reactorStorage.js +0 -180
- package/src/reactorSubs.js +0 -275
- package/src/reactorTransport.js +0 -391
- package/src/reactorTypes.ts +0 -41
- package/src/routeHandlerProtocol.ts +0 -25
- package/src/rulesTypes.ts +0 -132
- package/src/sanityCheckQueries.ts +0 -191
- package/src/schema.ts +0 -206
- package/src/schemaTypes.ts +0 -664
- package/src/store.ts +0 -1165
- package/src/transactionValidation.ts +0 -204
- package/src/urls.ts +0 -50
- package/src/utils/Deferred.ts +0 -20
- package/src/utils/MutationStorage.ts +0 -89
- package/src/utils/PersistedObject.ts +0 -612
- package/src/utils/dates.ts +0 -269
- package/src/utils/error.ts +0 -9
- package/src/utils/fetch.ts +0 -131
- package/src/utils/flags.ts +0 -14
- package/src/utils/id.ts +0 -28
- package/src/utils/linkIndex.ts +0 -33
- package/src/utils/log.ts +0 -23
- package/src/utils/object.js +0 -180
- package/src/utils/pgtime.ts +0 -199
- package/src/utils/pick.js +0 -9
- package/src/utils/strings.ts +0 -19
- package/src/utils/weakHash.ts +0 -77
- package/src/utils/weakHashLegacy.ts +0 -75
- package/src/warningToggle.ts +0 -5
- package/tsconfig.cjs.dev.json +0 -15
- package/tsconfig.dev.json +0 -14
- package/tsconfig.json +0 -13
- package/tsconfig.test.json +0 -5
- package/vite.config.ts +0 -19
- package/vitest.config.ts +0 -54
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('@backendrelay/resumable-stream');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@backendrelay/resumable-stream';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('@backendrelay/rules');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@backendrelay/rules';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('@backendrelay/test');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@backendrelay/test';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('@backendrelay/version');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@backendrelay/version';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('@backendrelay/webhooks');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@backendrelay/webhooks';
|
package/.tshy/build.json
DELETED
package/.tshy/commonjs.json
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./build.json",
|
|
3
|
-
"include": [
|
|
4
|
-
"../src/**/*.ts",
|
|
5
|
-
"../src/**/*.cts",
|
|
6
|
-
"../src/**/*.tsx",
|
|
7
|
-
"../src/**/*.json"
|
|
8
|
-
],
|
|
9
|
-
"exclude": [
|
|
10
|
-
"../src/**/*.mts",
|
|
11
|
-
"../src/package.json"
|
|
12
|
-
],
|
|
13
|
-
"compilerOptions": {
|
|
14
|
-
"outDir": "../.tshy-build/commonjs"
|
|
15
|
-
}
|
|
16
|
-
}
|
package/.tshy/esm.json
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
-
<title>Instant Core ESM standalone example/test</title>
|
|
7
|
-
</head>
|
|
8
|
-
<body>
|
|
9
|
-
<!-- make sure to run `build:standalone` first! -->
|
|
10
|
-
<!-- easiest way to test this is with `python3 -m http.server` in the root directory of this project -->
|
|
11
|
-
<script type="module">
|
|
12
|
-
import { init } from "/dist/standalone/index.mjs";
|
|
13
|
-
|
|
14
|
-
const query = {};
|
|
15
|
-
|
|
16
|
-
const db = init({
|
|
17
|
-
appId: new URL(location.href).searchParams.get("app_id"),
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
const unsub = db.subscribeQuery(query, console.log);
|
|
21
|
-
</script>
|
|
22
|
-
</body>
|
|
23
|
-
</html>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
-
<title>Instant Core UMD standalone example/test</title>
|
|
7
|
-
</head>
|
|
8
|
-
<body>
|
|
9
|
-
<!-- make sure to run `build:standalone` first! -->
|
|
10
|
-
<script src="../dist/standalone/index.umd.js"></script>
|
|
11
|
-
<script>
|
|
12
|
-
const query = {};
|
|
13
|
-
|
|
14
|
-
const db = instant.init({
|
|
15
|
-
appId: new URL(location.href).searchParams.get("app_id"),
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
const unsub = db.subscribeQuery(query, console.log);
|
|
19
|
-
</script>
|
|
20
|
-
</body>
|
|
21
|
-
</html>
|
|
@@ -1,292 +0,0 @@
|
|
|
1
|
-
import { afterEach, expect, test, vi } from 'vitest';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
type EventSourceConstructor,
|
|
5
|
-
type EventSourceType,
|
|
6
|
-
SSEConnection,
|
|
7
|
-
} from '../../src/Connection';
|
|
8
|
-
|
|
9
|
-
const PUSH_FORMAT_HEADER = 'X-BackendRelay-SSE-Push-Format';
|
|
10
|
-
|
|
11
|
-
class FakeEventSource implements EventSourceType {
|
|
12
|
-
static OPEN = 1;
|
|
13
|
-
static CONNECTING = 0;
|
|
14
|
-
static CLOSED = 2;
|
|
15
|
-
|
|
16
|
-
readonly url: string;
|
|
17
|
-
readyState = FakeEventSource.OPEN;
|
|
18
|
-
onopen = null;
|
|
19
|
-
onmessage = null;
|
|
20
|
-
onerror = null;
|
|
21
|
-
|
|
22
|
-
constructor(url: string) {
|
|
23
|
-
this.url = url;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
close() {
|
|
27
|
-
this.readyState = FakeEventSource.CLOSED;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function response(status: number, format: string | null = null): Response {
|
|
32
|
-
return {
|
|
33
|
-
ok: status >= 200 && status < 300,
|
|
34
|
-
status,
|
|
35
|
-
headers: {
|
|
36
|
-
get(name: string) {
|
|
37
|
-
return name === PUSH_FORMAT_HEADER ? format : null;
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
} as Response;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function openConnection() {
|
|
44
|
-
const connection = new SSEConnection(
|
|
45
|
-
FakeEventSource as unknown as EventSourceConstructor,
|
|
46
|
-
'https://api.example.com/runtime/sse',
|
|
47
|
-
);
|
|
48
|
-
connection.conn.onmessage?.call(connection.conn, {
|
|
49
|
-
data: JSON.stringify({
|
|
50
|
-
op: 'sse-init',
|
|
51
|
-
'machine-id': 'machine',
|
|
52
|
-
'session-id': 'session',
|
|
53
|
-
'sse-token': 'token',
|
|
54
|
-
}),
|
|
55
|
-
} as MessageEvent);
|
|
56
|
-
return connection;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
async function waitForCalls(
|
|
60
|
-
fetchMock: ReturnType<typeof vi.fn>,
|
|
61
|
-
count: number,
|
|
62
|
-
) {
|
|
63
|
-
await vi.waitFor(() => expect(fetchMock).toHaveBeenCalledTimes(count));
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
afterEach(() => {
|
|
67
|
-
vi.unstubAllGlobals();
|
|
68
|
-
vi.useRealTimers();
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
test('SSE POST batches preserve backlog order and bound each request', async () => {
|
|
72
|
-
const fetchMock = vi.fn().mockResolvedValue(response(200));
|
|
73
|
-
vi.stubGlobal('fetch', fetchMock);
|
|
74
|
-
const connection = openConnection();
|
|
75
|
-
|
|
76
|
-
for (let index = 0; index < 102; index++) {
|
|
77
|
-
connection.send({ op: 'message', index, 'client-event-id': `${index}` });
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
await waitForCalls(fetchMock, 2);
|
|
81
|
-
const batches = fetchMock.mock.calls.map(([, init]) =>
|
|
82
|
-
JSON.parse(init.body).messages.map((message) => message.index),
|
|
83
|
-
);
|
|
84
|
-
expect(batches).toEqual([
|
|
85
|
-
Array.from({ length: 100 }, (_, index) => index),
|
|
86
|
-
[100, 101],
|
|
87
|
-
]);
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
test('SSE POST negotiates NDJSON after a successful legacy JSON response', async () => {
|
|
91
|
-
const fetchMock = vi
|
|
92
|
-
.fn()
|
|
93
|
-
.mockResolvedValueOnce(response(200, 'ndjson'))
|
|
94
|
-
.mockResolvedValueOnce(response(200, 'ndjson'));
|
|
95
|
-
vi.stubGlobal('fetch', fetchMock);
|
|
96
|
-
const connection = openConnection();
|
|
97
|
-
|
|
98
|
-
connection.send({ op: 'first', 'client-event-id': 'first' });
|
|
99
|
-
await waitForCalls(fetchMock, 1);
|
|
100
|
-
connection.send({ op: 'second', 'client-event-id': 'second' });
|
|
101
|
-
await waitForCalls(fetchMock, 2);
|
|
102
|
-
|
|
103
|
-
expect(fetchMock.mock.calls[0][1].headers['Content-Type']).toBe(
|
|
104
|
-
'application/json',
|
|
105
|
-
);
|
|
106
|
-
expect(fetchMock.mock.calls[1][1].headers['Content-Type']).toBe(
|
|
107
|
-
'application/x-ndjson',
|
|
108
|
-
);
|
|
109
|
-
expect(fetchMock.mock.calls[1][1].body).toBe(
|
|
110
|
-
'{"machine_id":"machine","session_id":"session","sse_token":"token"}\n{"op":"second","client-event-id":"second"}\n',
|
|
111
|
-
);
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
test('SSE POST falls back to JSON when an NDJSON request is unsupported', async () => {
|
|
115
|
-
const fetchMock = vi
|
|
116
|
-
.fn()
|
|
117
|
-
.mockResolvedValueOnce(response(200, 'ndjson'))
|
|
118
|
-
.mockResolvedValueOnce(response(415))
|
|
119
|
-
.mockResolvedValueOnce(response(200));
|
|
120
|
-
vi.stubGlobal('fetch', fetchMock);
|
|
121
|
-
const connection = openConnection();
|
|
122
|
-
const onerror = vi.fn();
|
|
123
|
-
connection.onerror = onerror;
|
|
124
|
-
|
|
125
|
-
connection.send({ op: 'first', 'client-event-id': 'first' });
|
|
126
|
-
await waitForCalls(fetchMock, 1);
|
|
127
|
-
connection.send({ op: 'second', 'client-event-id': 'second' });
|
|
128
|
-
await waitForCalls(fetchMock, 3);
|
|
129
|
-
|
|
130
|
-
expect(fetchMock.mock.calls[1][1].headers['Content-Type']).toBe(
|
|
131
|
-
'application/x-ndjson',
|
|
132
|
-
);
|
|
133
|
-
expect(JSON.parse(fetchMock.mock.calls[2][1].body)).toMatchObject({
|
|
134
|
-
messages: [{ op: 'second', 'client-event-id': 'second' }],
|
|
135
|
-
});
|
|
136
|
-
expect(onerror).not.toHaveBeenCalled();
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
test('SSE POST reports terminal request errors without retrying the batch', async () => {
|
|
140
|
-
const fetchMock = vi.fn().mockResolvedValue(response(500));
|
|
141
|
-
vi.stubGlobal('fetch', fetchMock);
|
|
142
|
-
const connection = openConnection();
|
|
143
|
-
const onerror = vi.fn();
|
|
144
|
-
connection.onerror = onerror;
|
|
145
|
-
|
|
146
|
-
connection.send({ op: 'message', 'client-event-id': 'message' });
|
|
147
|
-
await vi.waitFor(() => expect(onerror).toHaveBeenCalledTimes(1));
|
|
148
|
-
|
|
149
|
-
expect(fetchMock).toHaveBeenCalledTimes(1);
|
|
150
|
-
expect(connection.conn.readyState).toBe(FakeEventSource.CLOSED);
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
test('SSE POST aborts a stalled fetch at its deadline without replaying or draining the queue', async () => {
|
|
154
|
-
vi.useFakeTimers();
|
|
155
|
-
const fetchMock = vi.fn(
|
|
156
|
-
(_url, init) =>
|
|
157
|
-
new Promise<Response>((_resolve, reject) => {
|
|
158
|
-
init?.signal?.addEventListener('abort', () =>
|
|
159
|
-
reject(new Error('aborted')),
|
|
160
|
-
);
|
|
161
|
-
}),
|
|
162
|
-
);
|
|
163
|
-
vi.stubGlobal('fetch', fetchMock);
|
|
164
|
-
const connection = openConnection();
|
|
165
|
-
connection.onerror = vi.fn();
|
|
166
|
-
connection.onclose = vi.fn();
|
|
167
|
-
|
|
168
|
-
connection.send({ op: 'transact', 'client-event-id': 'in-flight' });
|
|
169
|
-
await vi.advanceTimersByTimeAsync(0);
|
|
170
|
-
connection.send({ op: 'transact', 'client-event-id': 'queued' });
|
|
171
|
-
await vi.advanceTimersByTimeAsync(9999);
|
|
172
|
-
expect(connection.onerror).not.toHaveBeenCalled();
|
|
173
|
-
await vi.advanceTimersByTimeAsync(1);
|
|
174
|
-
|
|
175
|
-
expect(fetchMock.mock.calls[0][1].signal?.aborted).toBe(true);
|
|
176
|
-
expect(connection.onerror).toHaveBeenCalledTimes(1);
|
|
177
|
-
expect(connection.onclose).toHaveBeenCalledTimes(1);
|
|
178
|
-
expect(connection.isOpen()).toBe(false);
|
|
179
|
-
expect(fetchMock).toHaveBeenCalledTimes(1);
|
|
180
|
-
expect(vi.getTimerCount()).toBe(0);
|
|
181
|
-
});
|
|
182
|
-
|
|
183
|
-
test('SSE close aborts an active push without reporting an error or sending queued messages', async () => {
|
|
184
|
-
vi.useFakeTimers();
|
|
185
|
-
const fetchMock = vi.fn(
|
|
186
|
-
(_url, init) =>
|
|
187
|
-
new Promise<Response>((_resolve, reject) => {
|
|
188
|
-
init?.signal?.addEventListener('abort', () =>
|
|
189
|
-
reject(new Error('aborted')),
|
|
190
|
-
);
|
|
191
|
-
}),
|
|
192
|
-
);
|
|
193
|
-
vi.stubGlobal('fetch', fetchMock);
|
|
194
|
-
const connection = openConnection();
|
|
195
|
-
connection.onerror = vi.fn();
|
|
196
|
-
connection.onclose = vi.fn();
|
|
197
|
-
connection.send({ op: 'transact', 'client-event-id': 'in-flight' });
|
|
198
|
-
await vi.advanceTimersByTimeAsync(0);
|
|
199
|
-
connection.send({ op: 'transact', 'client-event-id': 'queued' });
|
|
200
|
-
connection.close();
|
|
201
|
-
connection.close();
|
|
202
|
-
await vi.runAllTimersAsync();
|
|
203
|
-
|
|
204
|
-
expect(fetchMock.mock.calls[0][1].signal?.aborted).toBe(true);
|
|
205
|
-
expect(fetchMock).toHaveBeenCalledTimes(1);
|
|
206
|
-
expect(connection.onerror).not.toHaveBeenCalled();
|
|
207
|
-
expect(connection.onclose).toHaveBeenCalledTimes(1);
|
|
208
|
-
expect(vi.getTimerCount()).toBe(0);
|
|
209
|
-
});
|
|
210
|
-
|
|
211
|
-
test('SSE close before the scheduled flush prevents the push', async () => {
|
|
212
|
-
const fetchMock = vi.fn().mockResolvedValue(response(200));
|
|
213
|
-
vi.stubGlobal('fetch', fetchMock);
|
|
214
|
-
const connection = openConnection();
|
|
215
|
-
connection.send({ op: 'transact', 'client-event-id': 'queued' });
|
|
216
|
-
connection.close();
|
|
217
|
-
await Promise.resolve();
|
|
218
|
-
expect(fetchMock).not.toHaveBeenCalled();
|
|
219
|
-
});
|
|
220
|
-
|
|
221
|
-
test('SSE close before init cancels the init deadline even without an onclose listener', async () => {
|
|
222
|
-
vi.useFakeTimers();
|
|
223
|
-
const connection = new SSEConnection(
|
|
224
|
-
FakeEventSource,
|
|
225
|
-
'https://api.example.com/runtime/sse',
|
|
226
|
-
);
|
|
227
|
-
connection.onerror = vi.fn();
|
|
228
|
-
connection.close();
|
|
229
|
-
await vi.runAllTimersAsync();
|
|
230
|
-
expect(connection.onerror).not.toHaveBeenCalled();
|
|
231
|
-
expect(vi.getTimerCount()).toBe(0);
|
|
232
|
-
});
|
|
233
|
-
|
|
234
|
-
test.each([500, 'network error'])(
|
|
235
|
-
'SSE NDJSON does not replay an ambiguous %s failure',
|
|
236
|
-
async (failure) => {
|
|
237
|
-
vi.useFakeTimers();
|
|
238
|
-
const fetchMock = vi.fn().mockResolvedValueOnce(response(200, 'ndjson'));
|
|
239
|
-
if (typeof failure === 'number') {
|
|
240
|
-
fetchMock.mockResolvedValueOnce(response(failure));
|
|
241
|
-
} else {
|
|
242
|
-
fetchMock.mockRejectedValueOnce(new Error(failure));
|
|
243
|
-
}
|
|
244
|
-
vi.stubGlobal('fetch', fetchMock);
|
|
245
|
-
const connection = openConnection();
|
|
246
|
-
connection.onerror = vi.fn();
|
|
247
|
-
connection.onclose = vi.fn();
|
|
248
|
-
connection.send({ op: 'first', 'client-event-id': 'first' });
|
|
249
|
-
await vi.advanceTimersByTimeAsync(0);
|
|
250
|
-
for (let index = 0; index < 101; index++) {
|
|
251
|
-
connection.send({ op: 'transact', 'client-event-id': `${index}` });
|
|
252
|
-
}
|
|
253
|
-
await vi.runAllTimersAsync();
|
|
254
|
-
expect(fetchMock.mock.calls[1][1].headers['Content-Type']).toBe(
|
|
255
|
-
'application/x-ndjson',
|
|
256
|
-
);
|
|
257
|
-
expect(fetchMock).toHaveBeenCalledTimes(2);
|
|
258
|
-
expect(connection.onerror).toHaveBeenCalledTimes(1);
|
|
259
|
-
expect(connection.onclose).toHaveBeenCalledTimes(1);
|
|
260
|
-
expect(vi.getTimerCount()).toBe(0);
|
|
261
|
-
},
|
|
262
|
-
);
|
|
263
|
-
|
|
264
|
-
test('SSE close ignores a late format rejection instead of sending a fallback', async () => {
|
|
265
|
-
vi.useFakeTimers();
|
|
266
|
-
let resolvePush!: (value: Response) => void;
|
|
267
|
-
const fetchMock = vi
|
|
268
|
-
.fn()
|
|
269
|
-
.mockResolvedValueOnce(response(200, 'ndjson'))
|
|
270
|
-
.mockImplementationOnce(
|
|
271
|
-
() =>
|
|
272
|
-
new Promise<Response>((resolve) => {
|
|
273
|
-
resolvePush = resolve;
|
|
274
|
-
}),
|
|
275
|
-
);
|
|
276
|
-
vi.stubGlobal('fetch', fetchMock);
|
|
277
|
-
const connection = openConnection();
|
|
278
|
-
connection.onerror = vi.fn();
|
|
279
|
-
connection.onclose = vi.fn();
|
|
280
|
-
connection.send({ op: 'first', 'client-event-id': 'first' });
|
|
281
|
-
await vi.advanceTimersByTimeAsync(0);
|
|
282
|
-
expect(vi.getTimerCount()).toBe(0);
|
|
283
|
-
connection.send({ op: 'transact', 'client-event-id': 'second' });
|
|
284
|
-
await vi.advanceTimersByTimeAsync(0);
|
|
285
|
-
connection.close();
|
|
286
|
-
resolvePush(response(415));
|
|
287
|
-
await vi.runAllTimersAsync();
|
|
288
|
-
expect(fetchMock).toHaveBeenCalledTimes(2);
|
|
289
|
-
expect(connection.onerror).not.toHaveBeenCalled();
|
|
290
|
-
expect(connection.onclose).toHaveBeenCalledTimes(1);
|
|
291
|
-
expect(vi.getTimerCount()).toBe(0);
|
|
292
|
-
});
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { afterEach, expect, test, vi } from 'vitest';
|
|
2
|
-
import { IDBFactory } from 'fake-indexeddb';
|
|
3
|
-
import IndexedDBStorage from '../../src/IndexedDBStorage';
|
|
4
|
-
|
|
5
|
-
afterEach(() => vi.unstubAllGlobals());
|
|
6
|
-
|
|
7
|
-
async function exerciseStorage() {
|
|
8
|
-
const storage = new IndexedDBStorage('restricted-browser', 'kv');
|
|
9
|
-
// Let initialization settle before reading, as Reactor does. There must be
|
|
10
|
-
// no unhandled rejection even when the browser throws synchronously.
|
|
11
|
-
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
12
|
-
expect(await storage.getItem('missing')).toBeNull();
|
|
13
|
-
await storage.setItem('auth', { token: 'local' });
|
|
14
|
-
await storage.multiSet([
|
|
15
|
-
['pending', [1, 2]],
|
|
16
|
-
['zero', 0],
|
|
17
|
-
]);
|
|
18
|
-
expect(await storage.getItem('auth')).toEqual({ token: 'local' });
|
|
19
|
-
expect(await storage.getItem('pending')).toEqual([1, 2]);
|
|
20
|
-
expect(await storage.getItem('zero')).toBe(0);
|
|
21
|
-
expect((await storage.getAllKeys()).sort()).toEqual([
|
|
22
|
-
'auth',
|
|
23
|
-
'pending',
|
|
24
|
-
'zero',
|
|
25
|
-
]);
|
|
26
|
-
await storage.removeItem('auth');
|
|
27
|
-
expect(await storage.getItem('auth')).toBeNull();
|
|
28
|
-
const otherStore = new IndexedDBStorage('restricted-browser', 'querySubs');
|
|
29
|
-
const otherApp = new IndexedDBStorage('another-app', 'kv');
|
|
30
|
-
expect(await otherStore.getItem('pending')).toBeNull();
|
|
31
|
-
expect(await otherApp.getItem('pending')).toBeNull();
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
test('upstream #2779: missing IndexedDB falls back to usable memory storage', async () => {
|
|
35
|
-
vi.stubGlobal('indexedDB', undefined);
|
|
36
|
-
await exerciseStorage();
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
test('upstream #2779: a throwing global getter does not crash initialization', async () => {
|
|
40
|
-
vi.stubGlobal('indexedDB', undefined);
|
|
41
|
-
Object.defineProperty(globalThis, 'indexedDB', {
|
|
42
|
-
configurable: true,
|
|
43
|
-
get() {
|
|
44
|
-
throw new DOMException('Storage denied', 'SecurityError');
|
|
45
|
-
},
|
|
46
|
-
});
|
|
47
|
-
await exerciseStorage();
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
test('upstream #2779: synchronous open failure falls back', async () => {
|
|
51
|
-
vi.stubGlobal('indexedDB', {
|
|
52
|
-
open() {
|
|
53
|
-
throw new DOMException('Storage denied', 'SecurityError');
|
|
54
|
-
},
|
|
55
|
-
});
|
|
56
|
-
await exerciseStorage();
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
test('upstream #2779: asynchronous open failure falls back', async () => {
|
|
60
|
-
vi.stubGlobal('indexedDB', {
|
|
61
|
-
open() {
|
|
62
|
-
const request = { onerror: null as null | ((event: Event) => void) };
|
|
63
|
-
queueMicrotask(() => request.onerror?.(new Event('error')));
|
|
64
|
-
return request;
|
|
65
|
-
},
|
|
66
|
-
});
|
|
67
|
-
await exerciseStorage();
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
test('available IndexedDB still persists between storage instances', async () => {
|
|
71
|
-
vi.stubGlobal('indexedDB', new IDBFactory());
|
|
72
|
-
const first = new IndexedDBStorage('persistent-browser', 'kv');
|
|
73
|
-
await first.setItem('auth', { token: 'persisted' });
|
|
74
|
-
const second = new IndexedDBStorage('persistent-browser', 'kv');
|
|
75
|
-
expect(await second.getItem('auth')).toEqual({ token: 'persisted' });
|
|
76
|
-
(await first._dbPromise)?.close();
|
|
77
|
-
(await second._dbPromise)?.close();
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
test('a write failure after successful initialization is not reported as persisted', async () => {
|
|
81
|
-
vi.stubGlobal('indexedDB', new IDBFactory());
|
|
82
|
-
const storage = new IndexedDBStorage('quota-browser', 'kv');
|
|
83
|
-
const db = await storage._dbPromise;
|
|
84
|
-
expect(db).not.toBeNull();
|
|
85
|
-
const failure = new DOMException('Quota exceeded', 'QuotaExceededError');
|
|
86
|
-
const transaction = vi.spyOn(db!, 'transaction').mockImplementation(() => {
|
|
87
|
-
throw failure;
|
|
88
|
-
});
|
|
89
|
-
try {
|
|
90
|
-
await expect(storage.setItem('pending', [1])).rejects.toBe(failure);
|
|
91
|
-
} finally {
|
|
92
|
-
transaction.mockRestore();
|
|
93
|
-
}
|
|
94
|
-
expect(await storage.getItem('pending')).toBeNull();
|
|
95
|
-
db?.close();
|
|
96
|
-
});
|