@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
package/src/utils/dates.ts
DELETED
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
import { pgTimezoneMatch, pgTimezoneAbbrevs } from './pgtime.ts';
|
|
2
|
-
|
|
3
|
-
// Date parsing functions
|
|
4
|
-
function zonedDateTimeStrToInstant(s) {
|
|
5
|
-
return new Date(s);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
function localDateTimeStrToInstant(s) {
|
|
9
|
-
// Parse as UTC since there's no timezone info
|
|
10
|
-
return new Date(s + 'Z');
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const localDateStrRe = /^(\d+)[\./-](\d+)[\./-](\d+)$/;
|
|
14
|
-
|
|
15
|
-
function localDateStrToInstant(s) {
|
|
16
|
-
const match = s.match(localDateStrRe);
|
|
17
|
-
if (!match) {
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const [_, part1, part2, part3] = match;
|
|
22
|
-
|
|
23
|
-
if (part1 <= 0 || part2 <= 0 || part3 <= 0) {
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
if (part1 > 999) {
|
|
28
|
-
return new Date(Date.UTC(part1, part2 - 1, part3, 0, 0, 0, 0));
|
|
29
|
-
}
|
|
30
|
-
return new Date(Date.UTC(part3, part1 - 1, part2, 0, 0, 0, 0));
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// Custom date formatters
|
|
34
|
-
function offioDateStrToInstant(s) {
|
|
35
|
-
// Format: "yyyy-MM-dd HH:mm:ss"
|
|
36
|
-
// Treat as UTC
|
|
37
|
-
const [datePart, timePart] = s.split(' ');
|
|
38
|
-
return new Date(datePart + 'T' + timePart + 'Z');
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function zenecaDateStrToInstant(s) {
|
|
42
|
-
// Format: "yyyy-MM-dd HH:mm:ss.n"
|
|
43
|
-
// Treat as UTC
|
|
44
|
-
const [datePart, timeWithNanos] = s.split(' ');
|
|
45
|
-
// JavaScript Date can handle fractional seconds
|
|
46
|
-
return new Date(datePart + 'T' + timeWithNanos + 'Z');
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function rfc1123ToInstant(s) {
|
|
50
|
-
// RFC 1123 format is natively supported by Date constructor
|
|
51
|
-
return new Date(s);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function dowMonDayYearStrToInstant(s) {
|
|
55
|
-
// Format: "EEE MMM dd yyyy" (e.g., "Wed Jan 15 2025")
|
|
56
|
-
|
|
57
|
-
//Only parse if the string is in the correct format
|
|
58
|
-
const regex = /^(\w{3}) (\w{3}) (\d{2}) (\d{4})$/;
|
|
59
|
-
const match = s.match(regex);
|
|
60
|
-
|
|
61
|
-
if (!match) {
|
|
62
|
-
throw new Error(`Unable to parse \`${s}\` as a date.`);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const date = new Date(s + ' UTC'); // Force UTC parsing
|
|
66
|
-
return new Date(
|
|
67
|
-
Date.UTC(
|
|
68
|
-
date.getUTCFullYear(),
|
|
69
|
-
date.getUTCMonth(),
|
|
70
|
-
date.getUTCDate(),
|
|
71
|
-
0,
|
|
72
|
-
0,
|
|
73
|
-
0,
|
|
74
|
-
0,
|
|
75
|
-
),
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function iso8601IncompleteOffsetToInstant(s) {
|
|
80
|
-
// Format: "2025-01-02T00:00:00-08" (missing minutes in timezone offset)
|
|
81
|
-
// Convert to proper ISO 8601 format by adding ":00" to the timezone offset
|
|
82
|
-
const regex = /^(.+T.+)([+-])(\d{2})$/;
|
|
83
|
-
const match = s.match(regex);
|
|
84
|
-
|
|
85
|
-
if (match) {
|
|
86
|
-
const [, dateTimePart, sign, hours] = match;
|
|
87
|
-
const correctedString = `${dateTimePart}${sign}${hours}:00`;
|
|
88
|
-
return new Date(correctedString);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
return null;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function iso8601SingleDigitToInstant(s) {
|
|
95
|
-
// Format: "2025-11-2T00:00:00.000Z" or "2025-1-2T00:00:00Z" (single-digit month/day)
|
|
96
|
-
// Also handles space separator: "2025-1-2 00:00:00"
|
|
97
|
-
// Also handles single-digit hours/minutes/seconds: "2026-04-28T04:7:00.000Z"
|
|
98
|
-
// Normalize to proper ISO 8601 format with two-digit values
|
|
99
|
-
const regex =
|
|
100
|
-
/^(\d+)-(\d{1,2})-(\d{1,2})([ T])(\d{1,2})(?::(\d{1,2}))?(?::(\d{1,2}))?(.*)$/;
|
|
101
|
-
const match = s.match(regex);
|
|
102
|
-
|
|
103
|
-
if (match) {
|
|
104
|
-
const [, year, month, day, _separator, hours, minutes, seconds, rest] =
|
|
105
|
-
match;
|
|
106
|
-
const paddedMonth = month.padStart(2, '0');
|
|
107
|
-
const paddedDay = day.padStart(2, '0');
|
|
108
|
-
let timeStr = hours.padStart(2, '0');
|
|
109
|
-
if (minutes !== undefined) {
|
|
110
|
-
timeStr += `:${minutes.padStart(2, '0')}`;
|
|
111
|
-
}
|
|
112
|
-
if (seconds !== undefined) {
|
|
113
|
-
timeStr += `:${seconds.padStart(2, '0')}`;
|
|
114
|
-
}
|
|
115
|
-
const correctedString = `${year}-${paddedMonth}-${paddedDay}T${timeStr}${rest}`;
|
|
116
|
-
return new Date(correctedString);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
return null;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
function usDateTimeStrToInstant(s) {
|
|
123
|
-
// Format: "M/d/yyyy, h:mm:ss a" (e.g., "8/4/2025, 11:02:31 PM")
|
|
124
|
-
const [datePart, timePart] = s.split(', ');
|
|
125
|
-
const [month, day, year] = datePart.split('/').map(Number);
|
|
126
|
-
|
|
127
|
-
// Parse time with AM/PM
|
|
128
|
-
const timeMatch = timePart.match(/(\d{1,2}):(\d{2}):(\d{2}) (AM|PM)/);
|
|
129
|
-
if (!timeMatch) {
|
|
130
|
-
throw new Error(`Unable to parse time from: ${s}`);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
let [, hours, minutes, seconds, ampm] = timeMatch;
|
|
134
|
-
hours = Number(hours);
|
|
135
|
-
minutes = Number(minutes);
|
|
136
|
-
seconds = Number(seconds);
|
|
137
|
-
|
|
138
|
-
// Convert 12-hour to 24-hour format
|
|
139
|
-
if (ampm === 'PM' && hours !== 12) {
|
|
140
|
-
hours += 12;
|
|
141
|
-
} else if (ampm === 'AM' && hours === 12) {
|
|
142
|
-
hours = 0;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// Create date in UTC
|
|
146
|
-
return new Date(Date.UTC(year, month - 1, day, hours, minutes, seconds));
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
// https://www.postgresql.org/docs/17/datatype-datetime.html#DATATYPE-DATETIME-SPECIAL-VALUES
|
|
150
|
-
function specialStrToInstant(s: string) {
|
|
151
|
-
switch (s) {
|
|
152
|
-
case 'epoch':
|
|
153
|
-
return new Date(0);
|
|
154
|
-
case 'infinity':
|
|
155
|
-
return new Date(8.64e15);
|
|
156
|
-
case '-infinity':
|
|
157
|
-
return new Date(-8.64e15);
|
|
158
|
-
case 'today':
|
|
159
|
-
return startOfCurrentUTCDay();
|
|
160
|
-
case 'tomorrow':
|
|
161
|
-
return new Date(startOfCurrentUTCDay().getTime() + 24 * 60 * 60 * 1000);
|
|
162
|
-
case 'yesterday':
|
|
163
|
-
return new Date(startOfCurrentUTCDay().getTime() - 24 * 60 * 60 * 1000);
|
|
164
|
-
case 'now':
|
|
165
|
-
return new Date();
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
function startOfCurrentUTCDay() {
|
|
170
|
-
const now = new Date();
|
|
171
|
-
return new Date(
|
|
172
|
-
Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate()),
|
|
173
|
-
);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
function pgTimezoneStrToInstant(s: string) {
|
|
177
|
-
const match = s.match(pgTimezoneMatch);
|
|
178
|
-
if (!match) {
|
|
179
|
-
return null;
|
|
180
|
-
}
|
|
181
|
-
const [tz] = match;
|
|
182
|
-
|
|
183
|
-
const offset = pgTimezoneAbbrevs[tz];
|
|
184
|
-
|
|
185
|
-
const baseDate = new Date(s.replace(pgTimezoneMatch, 'Z'));
|
|
186
|
-
|
|
187
|
-
return new Date(baseDate.getTime() - offset * 1000);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
// Array of parsers
|
|
191
|
-
const dateParsers = [
|
|
192
|
-
localDateStrToInstant,
|
|
193
|
-
zenecaDateStrToInstant,
|
|
194
|
-
dowMonDayYearStrToInstant,
|
|
195
|
-
usDateTimeStrToInstant,
|
|
196
|
-
localDateTimeStrToInstant,
|
|
197
|
-
iso8601IncompleteOffsetToInstant,
|
|
198
|
-
offioDateStrToInstant,
|
|
199
|
-
zonedDateTimeStrToInstant,
|
|
200
|
-
specialStrToInstant,
|
|
201
|
-
pgTimezoneStrToInstant,
|
|
202
|
-
iso8601SingleDigitToInstant,
|
|
203
|
-
rfc1123ToInstant,
|
|
204
|
-
];
|
|
205
|
-
|
|
206
|
-
// Try to parse with a specific parser
|
|
207
|
-
function tryParseDateString(parser, s: string) {
|
|
208
|
-
try {
|
|
209
|
-
const result = parser(s);
|
|
210
|
-
// Check if result is valid date
|
|
211
|
-
if (result instanceof Date && !isNaN(result.getTime())) {
|
|
212
|
-
return result;
|
|
213
|
-
}
|
|
214
|
-
return null;
|
|
215
|
-
} catch (e) {
|
|
216
|
-
return null;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
// Try all parsers until one succeeds
|
|
221
|
-
function dateStrToInstant(s) {
|
|
222
|
-
for (const parser of dateParsers) {
|
|
223
|
-
const instant = tryParseDateString(parser, s);
|
|
224
|
-
if (instant) {
|
|
225
|
-
return instant;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
return null;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
// Parse JSON string and then try date parsing
|
|
232
|
-
function jsonStrToInstant(maybeJson: string) {
|
|
233
|
-
try {
|
|
234
|
-
const s = JSON.parse(maybeJson);
|
|
235
|
-
if (typeof s === 'string') {
|
|
236
|
-
return dateStrToInstant(s);
|
|
237
|
-
}
|
|
238
|
-
return null;
|
|
239
|
-
} catch (e) {
|
|
240
|
-
return null;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
// Main parse function that handles strings and numbers
|
|
245
|
-
export function coerceToDate(x: unknown): Date | null | undefined {
|
|
246
|
-
if (x === undefined) {
|
|
247
|
-
return undefined;
|
|
248
|
-
}
|
|
249
|
-
if (x === null) {
|
|
250
|
-
return null;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
if (x instanceof Date) {
|
|
254
|
-
return x;
|
|
255
|
-
}
|
|
256
|
-
if (typeof x === 'string') {
|
|
257
|
-
const result =
|
|
258
|
-
dateStrToInstant(x) || jsonStrToInstant(x) || dateStrToInstant(x.trim());
|
|
259
|
-
if (!result) {
|
|
260
|
-
throw new Error(`Unable to parse \`${x}\` as a date.`);
|
|
261
|
-
}
|
|
262
|
-
return result;
|
|
263
|
-
} else if (typeof x === 'number') {
|
|
264
|
-
return new Date(x);
|
|
265
|
-
}
|
|
266
|
-
throw new Error(
|
|
267
|
-
`Invalid date value \`${x}\`. Expected a date, number, or string, got type ${typeof x}.`,
|
|
268
|
-
);
|
|
269
|
-
}
|
package/src/utils/error.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export function assert(condition: any, msg?: string): asserts condition {
|
|
2
|
-
if (!condition) {
|
|
3
|
-
throw new Error('[assertion error] ' + msg);
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export function assertUnreachable(_x: never): never {
|
|
8
|
-
throw new Error('[assertion error] TS should prevent us from reaching here');
|
|
9
|
-
}
|
package/src/utils/fetch.ts
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { BackendRelayError } from '../BackendRelayError.ts';
|
|
2
|
-
|
|
3
|
-
type BackendRelayIssueBody =
|
|
4
|
-
| { type: 'param-missing'; message: string; hint: { in: string[] } }
|
|
5
|
-
| { type: 'param-malformed'; message: string; hint: { in: string[] } }
|
|
6
|
-
| {
|
|
7
|
-
type: 'record-not-found';
|
|
8
|
-
message: string;
|
|
9
|
-
hint: { 'record-type': string };
|
|
10
|
-
}
|
|
11
|
-
| {
|
|
12
|
-
type: 'record-not-unique';
|
|
13
|
-
message: string;
|
|
14
|
-
hint: { 'record-type': string };
|
|
15
|
-
}
|
|
16
|
-
| {
|
|
17
|
-
type: 'validation-failed';
|
|
18
|
-
message: string;
|
|
19
|
-
hint: { 'data-type': string; errors: any[] };
|
|
20
|
-
}
|
|
21
|
-
| {
|
|
22
|
-
type: 'record-expired';
|
|
23
|
-
message: string;
|
|
24
|
-
hint: { 'record-type': string };
|
|
25
|
-
}
|
|
26
|
-
| {
|
|
27
|
-
type: 'record-foreign-key-invalid';
|
|
28
|
-
message: string;
|
|
29
|
-
hint: { table?: string; condition?: string; constraint?: string };
|
|
30
|
-
}
|
|
31
|
-
| {
|
|
32
|
-
type: 'record-check-violation';
|
|
33
|
-
message: string;
|
|
34
|
-
hint: { table?: string; condition?: string; constraint?: string };
|
|
35
|
-
}
|
|
36
|
-
| {
|
|
37
|
-
type: 'permission-denied';
|
|
38
|
-
message: string;
|
|
39
|
-
hint: { input: any; expected: string };
|
|
40
|
-
}
|
|
41
|
-
| {
|
|
42
|
-
type: 'permission-evaluation-failed';
|
|
43
|
-
message: string;
|
|
44
|
-
hint: {
|
|
45
|
-
rule: [string, string];
|
|
46
|
-
error?: { type: string; message: string; hint: any };
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
| {
|
|
50
|
-
type: 'sql-raise';
|
|
51
|
-
message: string;
|
|
52
|
-
hint: { table?: string; condition?: string; constraint?: string };
|
|
53
|
-
}
|
|
54
|
-
| {
|
|
55
|
-
type: 'sql-exception';
|
|
56
|
-
message: string;
|
|
57
|
-
hint: { table?: string; condition?: string; constraint?: string };
|
|
58
|
-
}
|
|
59
|
-
| {
|
|
60
|
-
type: 'rate-limited';
|
|
61
|
-
message: string;
|
|
62
|
-
hint: {
|
|
63
|
-
'retry-at'?: string;
|
|
64
|
-
'retry-after'?: number;
|
|
65
|
-
'remaining-tokens'?: number;
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
| {
|
|
69
|
-
type: 'session-missing';
|
|
70
|
-
message: string;
|
|
71
|
-
hint: { 'sess-id': string };
|
|
72
|
-
}
|
|
73
|
-
| {
|
|
74
|
-
type: 'socket-missing';
|
|
75
|
-
message: string;
|
|
76
|
-
hint: { 'sess-id': string; 'exception-message'?: string };
|
|
77
|
-
}
|
|
78
|
-
| { type: undefined; [k: string]: any }
|
|
79
|
-
| undefined;
|
|
80
|
-
// Note that BackendRelayIssueBody is not exported and is only necessary for making BackendRelayAPIError
|
|
81
|
-
// below to have all the members and typecheck as BackendRelayIssue
|
|
82
|
-
export type BackendRelayIssue = {
|
|
83
|
-
body: BackendRelayIssueBody;
|
|
84
|
-
status: number;
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
export class BackendRelayAPIError extends BackendRelayError {
|
|
88
|
-
body: BackendRelayIssueBody;
|
|
89
|
-
status: number;
|
|
90
|
-
|
|
91
|
-
constructor(error: BackendRelayIssue) {
|
|
92
|
-
// Create a descriptive message based on the error
|
|
93
|
-
const message = error.body?.message || `API Error (${error.status})`;
|
|
94
|
-
super(
|
|
95
|
-
message,
|
|
96
|
-
(error.body as any).hint,
|
|
97
|
-
(error.body as any)?.traceId || (error.body as any)['trace-id'],
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
const actualProto = new.target.prototype;
|
|
101
|
-
if (Object.setPrototypeOf) {
|
|
102
|
-
Object.setPrototypeOf(this, actualProto);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// Maintain proper stack trace for where our error was thrown
|
|
106
|
-
if (Error.captureStackTrace) {
|
|
107
|
-
Error.captureStackTrace(this, BackendRelayAPIError);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
this.name = 'BackendRelayAPIError';
|
|
111
|
-
this.status = error.status;
|
|
112
|
-
this.body = error.body;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
get [Symbol.toStringTag]() {
|
|
116
|
-
return 'BackendRelayAPIError';
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
export async function jsonFetch(
|
|
121
|
-
input: RequestInfo,
|
|
122
|
-
init: RequestInit | undefined,
|
|
123
|
-
): Promise<any> {
|
|
124
|
-
const res = await fetch(input, init);
|
|
125
|
-
const json = await res.json();
|
|
126
|
-
return res.status === 200
|
|
127
|
-
? Promise.resolve(json)
|
|
128
|
-
: Promise.reject(
|
|
129
|
-
new BackendRelayAPIError({ status: res.status, body: json }),
|
|
130
|
-
);
|
|
131
|
-
}
|
package/src/utils/flags.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
let devBackend = false;
|
|
2
|
-
let backendrelayLogs = false;
|
|
3
|
-
let devtoolLocalDashboard = false;
|
|
4
|
-
|
|
5
|
-
if (
|
|
6
|
-
typeof window !== 'undefined' &&
|
|
7
|
-
typeof window.localStorage !== 'undefined'
|
|
8
|
-
) {
|
|
9
|
-
devBackend = !!window.localStorage.getItem('devBackend');
|
|
10
|
-
backendrelayLogs = !!window.localStorage.getItem('__instantLogging');
|
|
11
|
-
devtoolLocalDashboard = !!window.localStorage.getItem('__devtoolLocalDash');
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export { devBackend, backendrelayLogs, devtoolLocalDashboard };
|
package/src/utils/id.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { v4 } from 'uuid';
|
|
2
|
-
|
|
3
|
-
function uuidToByteArray(uuid: string) {
|
|
4
|
-
const hex = uuid.replace(/-/g, '');
|
|
5
|
-
const bytes: number[] = [];
|
|
6
|
-
for (let i = 0; i < hex.length; i += 2) {
|
|
7
|
-
bytes.push(parseInt(hex.substring(i, i + 2), 16));
|
|
8
|
-
}
|
|
9
|
-
return bytes;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function compareByteArrays(a, b) {
|
|
13
|
-
for (let i = 0; i < a.length; i++) {
|
|
14
|
-
if (a[i] < b[i]) return -1;
|
|
15
|
-
if (a[i] > b[i]) return 1;
|
|
16
|
-
}
|
|
17
|
-
return 0;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export function uuidCompare(uuid_a: string, uuid_b: string) {
|
|
21
|
-
return compareByteArrays(uuidToByteArray(uuid_a), uuidToByteArray(uuid_b));
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function id(): string {
|
|
25
|
-
return v4();
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export default id;
|
package/src/utils/linkIndex.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { BackendRelayGraph, LinkDef, LinksDef } from '../schemaTypes.ts';
|
|
2
|
-
|
|
3
|
-
export type LinkIndex = Record<
|
|
4
|
-
string,
|
|
5
|
-
Record<
|
|
6
|
-
string,
|
|
7
|
-
{
|
|
8
|
-
isForward: boolean;
|
|
9
|
-
isSingular: boolean;
|
|
10
|
-
link: LinkDef<any, any, any, any, any, any, any>;
|
|
11
|
-
}
|
|
12
|
-
>
|
|
13
|
-
>;
|
|
14
|
-
|
|
15
|
-
export function createLinkIndex(schema: BackendRelayGraph<any, LinksDef<{}>>) {
|
|
16
|
-
return Object.values(schema.links).reduce((linkIndex, link) => {
|
|
17
|
-
linkIndex[link.forward.on] ??= {};
|
|
18
|
-
linkIndex[link.forward.on][link.forward.label] = {
|
|
19
|
-
isForward: true,
|
|
20
|
-
isSingular: link.forward.has === 'one',
|
|
21
|
-
link,
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
linkIndex[link.reverse.on] ??= {};
|
|
25
|
-
linkIndex[link.reverse.on][link.reverse.label] = {
|
|
26
|
-
isForward: false,
|
|
27
|
-
isSingular: link.reverse.has === 'one',
|
|
28
|
-
link,
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
return linkIndex;
|
|
32
|
-
}, {} as LinkIndex);
|
|
33
|
-
}
|
package/src/utils/log.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export interface Logger {
|
|
2
|
-
info: (...args: any[]) => void;
|
|
3
|
-
debug: (...args: any[]) => void;
|
|
4
|
-
error: (...args: any[]) => void;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export default function createLogger(
|
|
8
|
-
isEnabled: boolean,
|
|
9
|
-
getStats: () => Record<string, any>,
|
|
10
|
-
baseLogger: Logger = console,
|
|
11
|
-
): Logger {
|
|
12
|
-
return {
|
|
13
|
-
info: isEnabled
|
|
14
|
-
? (...args: any[]) => baseLogger.info(...args, getStats())
|
|
15
|
-
: () => {},
|
|
16
|
-
debug: isEnabled
|
|
17
|
-
? (...args: any[]) => baseLogger.debug(...args, getStats())
|
|
18
|
-
: () => {},
|
|
19
|
-
error: isEnabled
|
|
20
|
-
? (...args: any[]) => baseLogger.error(...args, getStats())
|
|
21
|
-
: () => {},
|
|
22
|
-
};
|
|
23
|
-
}
|
package/src/utils/object.js
DELETED
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
// Presence payloads are peer-controlled: an object can carry a key named
|
|
2
|
-
// `hasOwnProperty`, which shadows the method. Always ask `Object.prototype`.
|
|
3
|
-
function hasOwn(obj, key) {
|
|
4
|
-
return Object.prototype.hasOwnProperty.call(obj, key);
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export function areObjectKeysEqual(a, b) {
|
|
8
|
-
const ak = Object.keys(a);
|
|
9
|
-
const bk = Object.keys(b);
|
|
10
|
-
return ak.length === bk.length && ak.every((k) => hasOwn(b, k));
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export function areObjectsShallowEqual(obj1, obj2) {
|
|
14
|
-
return (
|
|
15
|
-
Object.keys(obj1).length === Object.keys(obj2).length &&
|
|
16
|
-
Object.keys(obj1).every(
|
|
17
|
-
(key) => hasOwn(obj2, key) && obj1[key] === obj2[key],
|
|
18
|
-
)
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function areObjectsDeepEqual(obj1, obj2) {
|
|
23
|
-
if (
|
|
24
|
-
typeof obj1 !== 'object' ||
|
|
25
|
-
typeof obj2 !== 'object' ||
|
|
26
|
-
obj1 === null ||
|
|
27
|
-
obj2 === null
|
|
28
|
-
) {
|
|
29
|
-
return obj1 === obj2;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
if (!areObjectKeysEqual(obj1, obj2)) {
|
|
33
|
-
return false;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return Object.keys(obj1).every((key) =>
|
|
37
|
-
areObjectsDeepEqual(obj1[key], obj2[key]),
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export function immutableRemoveUndefined(obj) {
|
|
42
|
-
if (!isObject(obj)) {
|
|
43
|
-
return obj;
|
|
44
|
-
}
|
|
45
|
-
const result = {};
|
|
46
|
-
for (const [key, value] of Object.entries(obj)) {
|
|
47
|
-
if (value === undefined) continue;
|
|
48
|
-
|
|
49
|
-
result[key] = value;
|
|
50
|
-
}
|
|
51
|
-
return result;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export function immutableDeepMerge(target, source) {
|
|
55
|
-
if (!isObject(target) || !isObject(source)) {
|
|
56
|
-
return source;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const result = { ...target };
|
|
60
|
-
|
|
61
|
-
for (const key of Object.keys(source)) {
|
|
62
|
-
if (source[key] === undefined) continue;
|
|
63
|
-
if (source[key] === null) {
|
|
64
|
-
delete result[key];
|
|
65
|
-
continue;
|
|
66
|
-
}
|
|
67
|
-
const areBothObjects = isObject(target[key]) && isObject(source[key]);
|
|
68
|
-
result[key] = areBothObjects
|
|
69
|
-
? immutableDeepMerge(target[key], source[key])
|
|
70
|
-
: source[key];
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return result;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export function immutableDeepReplace(target, replaceValue, replacementValue) {
|
|
77
|
-
if (!isObject(target)) {
|
|
78
|
-
return target;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
const result = {};
|
|
82
|
-
|
|
83
|
-
for (const [key, value] of Object.entries(target)) {
|
|
84
|
-
result[key] = isObject(value)
|
|
85
|
-
? immutableDeepReplace(value, replaceValue, replacementValue)
|
|
86
|
-
: value === replaceValue
|
|
87
|
-
? replacementValue
|
|
88
|
-
: value;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
return result;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export function isObject(val) {
|
|
95
|
-
return typeof val === 'object' && val !== null && !Array.isArray(val);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export function immutableOmitValue(obj, v) {}
|
|
99
|
-
/**
|
|
100
|
-
* Like `assocInMutative`, but
|
|
101
|
-
*
|
|
102
|
-
* - for arrays: inserts the value at the specified index, instead of replacing it
|
|
103
|
-
*/
|
|
104
|
-
export function insertInMutative(obj, path, value) {
|
|
105
|
-
if (!obj) {
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
if (path.length === 0) {
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
let current = obj || {};
|
|
113
|
-
for (let i = 0; i < path.length - 1; i++) {
|
|
114
|
-
const key = path[i];
|
|
115
|
-
if (!(key in current) || typeof current[key] !== 'object') {
|
|
116
|
-
current[key] = typeof path[i + 1] === 'number' ? [] : {};
|
|
117
|
-
}
|
|
118
|
-
current = current[key];
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
const key = path[path.length - 1];
|
|
122
|
-
if (Array.isArray(current) && typeof key === 'number') {
|
|
123
|
-
current.splice(key, 0, value);
|
|
124
|
-
} else {
|
|
125
|
-
current[key] = value;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export function assocInMutative(obj, path, value) {
|
|
130
|
-
if (!obj) {
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
if (path.length === 0) {
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
let current = obj || {};
|
|
138
|
-
for (let i = 0; i < path.length - 1; i++) {
|
|
139
|
-
const key = path[i];
|
|
140
|
-
if (!(key in current) || typeof current[key] !== 'object') {
|
|
141
|
-
current[key] = typeof path[i + 1] === 'number' ? [] : {};
|
|
142
|
-
}
|
|
143
|
-
current = current[key];
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
current[path[path.length - 1]] = value;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
export function dissocInMutative(obj, path) {
|
|
150
|
-
if (!obj) {
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
if (path.length === 0) {
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
const [key, ...restPath] = path;
|
|
158
|
-
|
|
159
|
-
if (!(key in obj)) {
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
if (restPath.length === 0) {
|
|
164
|
-
if (Array.isArray(obj)) {
|
|
165
|
-
obj.splice(key, 1);
|
|
166
|
-
} else {
|
|
167
|
-
delete obj[key];
|
|
168
|
-
}
|
|
169
|
-
return;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
dissocInMutative(obj[key], restPath);
|
|
173
|
-
if (isEmpty(obj[key])) {
|
|
174
|
-
delete obj[key];
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
function isEmpty(obj) {
|
|
179
|
-
return obj && Object.keys(obj).length === 0;
|
|
180
|
-
}
|