@eventmodelers/node-kit 0.0.2
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/README.md +66 -0
- package/package.json +36 -0
- package/src/cli.js +176 -0
- package/templates/.claude/skills/connect/SKILL.md +169 -0
- package/templates/.claude/skills/load-slice/SKILL.md +86 -0
- package/templates/realtime-agent/node_modules/.package-lock.json +107 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/LICENSE +21 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/README.md +190 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.d.ts +4 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.js +7 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthClient.d.ts +4 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthClient.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthClient.js +7 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthClient.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.d.ts +716 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.js +1108 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueClient.d.ts +2473 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueClient.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueClient.js +5217 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueClient.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/index.d.ts +9 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/index.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/index.js +20 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/index.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/base64url.d.ts +76 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/base64url.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/base64url.js +269 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/base64url.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/constants.d.ts +26 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/constants.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/constants.js +31 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/constants.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/error-codes.d.ts +7 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/error-codes.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/error-codes.js +3 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/error-codes.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/errors.d.ts +258 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/errors.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/errors.js +290 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/errors.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/fetch.d.ts +54 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/fetch.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/fetch.js +200 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/fetch.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/helpers.d.ts +94 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/helpers.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/helpers.js +406 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/helpers.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/local-storage.d.ts +9 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/local-storage.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/local-storage.js +21 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/local-storage.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/locks.d.ts +107 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/locks.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/locks.js +349 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/locks.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/polyfills.d.ts +5 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/polyfills.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/polyfills.js +29 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/polyfills.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/types.d.ts +2498 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/types.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/types.js +23 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/types.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/version.d.ts +2 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/version.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/version.js +11 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/version.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.d.ts +96 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.js +66 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/solana.d.ts +160 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/solana.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/solana.js +4 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/solana.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.d.ts +284 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.d.ts +583 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.js +4 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.d.ts +85 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.js +272 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.js +707 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.d.ts +4 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.js +4 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthClient.d.ts +4 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthClient.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthClient.js +4 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthClient.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.d.ts +716 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.js +1105 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueClient.d.ts +2473 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueClient.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueClient.js +5214 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueClient.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/index.d.ts +9 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/index.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/index.js +9 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/index.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/base64url.d.ts +76 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/base64url.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/base64url.js +257 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/base64url.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/constants.d.ts +26 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/constants.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/constants.js +28 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/constants.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/error-codes.d.ts +7 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/error-codes.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/error-codes.js +2 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/error-codes.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/errors.d.ts +258 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/errors.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/errors.js +267 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/errors.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/fetch.d.ts +54 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/fetch.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/fetch.js +190 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/fetch.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/helpers.d.ts +94 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/helpers.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/helpers.js +378 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/helpers.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/local-storage.d.ts +9 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/local-storage.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/local-storage.js +18 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/local-storage.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/locks.d.ts +107 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/locks.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/locks.js +341 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/locks.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/polyfills.d.ts +5 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/polyfills.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/polyfills.js +26 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/polyfills.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/types.d.ts +2498 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/types.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/types.js +20 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/types.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/version.d.ts +2 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/version.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/version.js +8 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/version.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/ethereum.d.ts +96 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/ethereum.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/ethereum.js +60 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/ethereum.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/solana.d.ts +160 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/solana.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/solana.js +3 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/solana.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.d.ts +284 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.dom.d.ts +583 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.dom.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.dom.js +3 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.dom.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.errors.d.ts +85 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.errors.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.errors.js +264 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.errors.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.js +689 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/tsconfig.module.tsbuildinfo +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/tsconfig.tsbuildinfo +1 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/package.json +44 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/src/AuthAdminApi.ts +5 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/src/AuthClient.ts +5 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/src/GoTrueAdminApi.ts +1267 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/src/GoTrueClient.ts +6360 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/src/index.ts +13 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/base64url.ts +308 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/constants.ts +34 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/error-codes.ts +90 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/errors.ts +359 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/fetch.ts +320 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/helpers.ts +476 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/local-storage.ts +21 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/locks.ts +420 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/polyfills.ts +23 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/types.ts +2917 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/version.ts +7 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/web3/ethereum.ts +184 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/web3/solana.ts +186 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/webauthn.dom.ts +636 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/webauthn.errors.ts +329 -0
- package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/webauthn.ts +946 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/README.md +134 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/FunctionsClient.d.ts +177 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/FunctionsClient.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/FunctionsClient.js +309 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/FunctionsClient.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/helper.d.ts +3 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/helper.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/helper.js +11 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/helper.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/index.d.ts +3 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/index.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/index.js +12 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/index.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/types.d.ts +122 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/types.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/types.js +98 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/types.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/version.d.ts +2 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/version.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/version.js +11 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/version.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/FunctionsClient.d.ts +177 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/FunctionsClient.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/FunctionsClient.js +305 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/FunctionsClient.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/helper.d.ts +3 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/helper.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/helper.js +7 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/helper.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/index.d.ts +3 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/index.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/index.js +3 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/index.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/types.d.ts +122 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/types.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/types.js +91 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/types.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/version.d.ts +2 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/version.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/version.js +8 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/version.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/tsconfig.module.tsbuildinfo +1 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/tsconfig.tsbuildinfo +1 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/package.json +52 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/src/FunctionsClient.ts +335 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/src/edge-runtime.d.ts +214 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/src/helper.ts +8 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/src/index.ts +10 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/src/types.ts +146 -0
- package/templates/realtime-agent/node_modules/@supabase/functions-js/src/version.ts +7 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/LICENSE.md +22 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/README.md +121 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/ajax.js +116 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/channel.js +331 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/constants.js +35 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/index.js +212 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/longpoll.js +192 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/presence.js +208 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/push.js +134 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/serializer.js +133 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/socket.js +756 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/timer.js +48 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/types.js +184 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/utils.js +16 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/package.json +58 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/favicon.ico +0 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix-orange.png +0 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.cjs.js +1825 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.cjs.js.map +7 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.js +1847 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.min.js +2 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.mjs +1802 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.mjs.map +7 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.png +0 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/ajax.d.ts +10 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/ajax.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/channel.d.ts +167 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/channel.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/constants.d.ts +36 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/constants.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/index.d.ts +10 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/index.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/longpoll.d.ts +29 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/longpoll.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/presence.d.ts +107 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/presence.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/push.d.ts +70 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/push.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/serializer.d.ts +74 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/serializer.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/socket.d.ts +291 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/socket.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/timer.d.ts +36 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/timer.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/types.d.ts +280 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/types.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/utils.d.ts +2 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/utils.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/phoenix/tsconfig.json +20 -0
- package/templates/realtime-agent/node_modules/@supabase/postgrest-js/README.md +213 -0
- package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.cjs +5025 -0
- package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.cjs.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.d.cts +3828 -0
- package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.d.cts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.d.mts +3828 -0
- package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.d.mts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.mjs +5017 -0
- package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.mjs.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/postgrest-js/package.json +69 -0
- package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/PostgrestBuilder.ts +688 -0
- package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/PostgrestClient.ts +447 -0
- package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/PostgrestError.ts +41 -0
- package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/PostgrestFilterBuilder.ts +2137 -0
- package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/PostgrestQueryBuilder.ts +1703 -0
- package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/PostgrestTransformBuilder.ts +981 -0
- package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/constants.ts +2 -0
- package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/index.ts +34 -0
- package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/select-query-parser/parser.ts +476 -0
- package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/select-query-parser/result.ts +550 -0
- package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/select-query-parser/types.ts +129 -0
- package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/select-query-parser/utils.ts +704 -0
- package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/types/common/common.ts +83 -0
- package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/types/common/rpc.ts +148 -0
- package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/types/feature-flags.ts +17 -0
- package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/types/types.ts +161 -0
- package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/version.ts +7 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/README.md +326 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeChannel.d.ts +442 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeChannel.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeChannel.js +719 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeChannel.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeClient.d.ts +275 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeClient.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeClient.js +697 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeClient.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimePresence.d.ts +62 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimePresence.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimePresence.js +43 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimePresence.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/index.d.ts +6 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/index.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/index.js +18 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/index.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/constants.d.ts +43 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/constants.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/constants.js +43 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/constants.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/normalizeChannelError.d.ts +10 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/normalizeChannelError.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/normalizeChannelError.js +29 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/normalizeChannelError.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/serializer.d.ts +33 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/serializer.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/serializer.js +155 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/serializer.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/transformers.d.ts +109 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/transformers.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/transformers.js +241 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/transformers.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/version.d.ts +2 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/version.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/version.js +11 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/version.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/websocket-factory.d.ts +82 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/websocket-factory.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/websocket-factory.js +130 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/websocket-factory.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/channelAdapter.d.ts +32 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/channelAdapter.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/channelAdapter.js +103 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/channelAdapter.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/presenceAdapter.d.ts +53 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/presenceAdapter.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/presenceAdapter.js +93 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/presenceAdapter.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/socketAdapter.d.ts +38 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/socketAdapter.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/socketAdapter.js +114 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/socketAdapter.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/types.d.ts +5 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/types.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/types.js +3 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/types.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeChannel.d.ts +442 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeChannel.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeChannel.js +714 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeChannel.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeClient.d.ts +275 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeClient.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeClient.js +693 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeClient.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimePresence.d.ts +62 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimePresence.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimePresence.js +38 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimePresence.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/index.d.ts +6 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/index.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/index.js +6 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/index.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/constants.d.ts +43 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/constants.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/constants.js +40 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/constants.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/normalizeChannelError.d.ts +10 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/normalizeChannelError.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/normalizeChannelError.js +26 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/normalizeChannelError.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/serializer.d.ts +33 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/serializer.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/serializer.js +152 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/serializer.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/transformers.d.ts +109 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/transformers.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/transformers.js +229 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/transformers.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/version.d.ts +2 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/version.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/version.js +8 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/version.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/websocket-factory.d.ts +82 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/websocket-factory.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/websocket-factory.js +126 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/websocket-factory.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/channelAdapter.d.ts +32 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/channelAdapter.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/channelAdapter.js +100 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/channelAdapter.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/presenceAdapter.d.ts +53 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/presenceAdapter.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/presenceAdapter.js +90 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/presenceAdapter.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/socketAdapter.d.ts +38 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/socketAdapter.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/socketAdapter.js +111 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/socketAdapter.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/types.d.ts +5 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/types.d.ts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/types.js +2 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/types.js.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/tsconfig.module.tsbuildinfo +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/tsconfig.tsbuildinfo +1 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/package.json +58 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/RealtimeChannel.ts +1118 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/RealtimeClient.ts +868 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/RealtimePresence.ts +71 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/index.ts +53 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/lib/constants.ts +62 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/lib/normalizeChannelError.ts +30 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/lib/serializer.ts +203 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/lib/transformers.ts +270 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/lib/version.ts +7 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/lib/websocket-factory.ts +204 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/phoenix/channelAdapter.ts +149 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/phoenix/presenceAdapter.ts +116 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/phoenix/socketAdapter.ts +168 -0
- package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/phoenix/types.ts +32 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/README.md +1262 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.cjs +2995 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.cjs.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.d.cts +2956 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.d.cts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.d.mts +2956 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.d.mts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.mjs +2979 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.mjs.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/umd/supabase.js +1 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/package.json +62 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/src/StorageClient.ts +98 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/src/index.ts +19 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/common/BaseApiClient.ts +104 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/common/errors.ts +160 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/common/fetch.ts +303 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/common/headers.ts +43 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/common/helpers.ts +146 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/constants.ts +4 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/types.ts +654 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/version.ts +7 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/BlobDownloadBuilder.ts +62 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/StorageAnalyticsClient.ts +420 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/StorageBucketApi.ts +414 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/StorageFileApi.ts +1423 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/StorageVectorsClient.ts +644 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/StreamDownloadBuilder.ts +39 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/VectorBucketApi.ts +73 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/VectorDataApi.ts +98 -0
- package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/VectorIndexApi.ts +90 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/README.md +238 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.cjs +89 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.cjs.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.d.cts +58 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.d.cts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.d.mts +58 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.d.mts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.mjs +88 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.mjs.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.cjs +660 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.cjs.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.d.cts +616 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.d.cts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.d.mts +616 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.d.mts.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.mjs +607 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.mjs.map +1 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/umd/supabase.js +24 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/package.json +122 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/SupabaseClient.ts +625 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/cors.ts +84 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/index.ts +106 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/SupabaseAuthClient.ts +8 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/constants.ts +35 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/fetch.ts +36 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/helpers.ts +98 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/rest/types/common/common.ts +93 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/rest/types/common/rpc.ts +158 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/types.ts +196 -0
- package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/version.ts +7 -0
- package/templates/realtime-agent/node_modules/iceberg-js/LICENSE +21 -0
- package/templates/realtime-agent/node_modules/iceberg-js/README.md +439 -0
- package/templates/realtime-agent/node_modules/iceberg-js/dist/index.cjs +596 -0
- package/templates/realtime-agent/node_modules/iceberg-js/dist/index.cjs.map +1 -0
- package/templates/realtime-agent/node_modules/iceberg-js/dist/index.d.cts +547 -0
- package/templates/realtime-agent/node_modules/iceberg-js/dist/index.d.ts +547 -0
- package/templates/realtime-agent/node_modules/iceberg-js/dist/index.mjs +587 -0
- package/templates/realtime-agent/node_modules/iceberg-js/dist/index.mjs.map +1 -0
- package/templates/realtime-agent/node_modules/iceberg-js/package.json +77 -0
- package/templates/realtime-agent/node_modules/tslib/CopyrightNotice.txt +15 -0
- package/templates/realtime-agent/node_modules/tslib/LICENSE.txt +12 -0
- package/templates/realtime-agent/node_modules/tslib/README.md +164 -0
- package/templates/realtime-agent/node_modules/tslib/SECURITY.md +41 -0
- package/templates/realtime-agent/node_modules/tslib/modules/index.d.ts +38 -0
- package/templates/realtime-agent/node_modules/tslib/modules/index.js +70 -0
- package/templates/realtime-agent/node_modules/tslib/modules/package.json +3 -0
- package/templates/realtime-agent/node_modules/tslib/package.json +47 -0
- package/templates/realtime-agent/node_modules/tslib/tslib.d.ts +460 -0
- package/templates/realtime-agent/node_modules/tslib/tslib.es6.html +1 -0
- package/templates/realtime-agent/node_modules/tslib/tslib.es6.js +402 -0
- package/templates/realtime-agent/node_modules/tslib/tslib.es6.mjs +401 -0
- package/templates/realtime-agent/node_modules/tslib/tslib.html +1 -0
- package/templates/realtime-agent/node_modules/tslib/tslib.js +484 -0
- package/templates/realtime-agent/package-lock.json +114 -0
- package/templates/realtime-agent/package.json +11 -0
- package/templates/realtime-agent/src/index.js +152 -0
- package/templates/root/AGENT.md +37 -0
- package/templates/root/model.md +1 -0
- package/templates/root/prompt.md +91 -0
- package/templates/root/ralph.sh +47 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/*
|
|
2
|
+
This file draws heavily from https://github.com/phoenixframework/phoenix/blob/d344ec0a732ab4ee204215b31de69cf4be72e3bf/assets/js/phoenix/presence.js
|
|
3
|
+
License: https://github.com/phoenixframework/phoenix/blob/d344ec0a732ab4ee204215b31de69cf4be72e3bf/LICENSE.md
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type RealtimeChannel from './RealtimeChannel'
|
|
7
|
+
import PresenceAdapter from './phoenix/presenceAdapter'
|
|
8
|
+
|
|
9
|
+
export type Presence<T extends { [key: string]: any } = {}> = {
|
|
10
|
+
presence_ref: string
|
|
11
|
+
} & T
|
|
12
|
+
|
|
13
|
+
export type RealtimePresenceState<T extends { [key: string]: any } = {}> = {
|
|
14
|
+
[key: string]: Presence<T>[]
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type RealtimePresenceJoinPayload<T extends { [key: string]: any }> = {
|
|
18
|
+
event: `${REALTIME_PRESENCE_LISTEN_EVENTS.JOIN}`
|
|
19
|
+
key: string
|
|
20
|
+
currentPresences: Presence<T>[]
|
|
21
|
+
newPresences: Presence<T>[]
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type RealtimePresenceLeavePayload<T extends { [key: string]: any }> = {
|
|
25
|
+
event: `${REALTIME_PRESENCE_LISTEN_EVENTS.LEAVE}`
|
|
26
|
+
key: string
|
|
27
|
+
currentPresences: Presence<T>[]
|
|
28
|
+
leftPresences: Presence<T>[]
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export enum REALTIME_PRESENCE_LISTEN_EVENTS {
|
|
32
|
+
SYNC = 'sync',
|
|
33
|
+
JOIN = 'join',
|
|
34
|
+
LEAVE = 'leave',
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export type RealtimePresenceOptions = {
|
|
38
|
+
events?: { state: string; diff: string }
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export default class RealtimePresence {
|
|
42
|
+
get state() {
|
|
43
|
+
return this.presenceAdapter.state
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
private presenceAdapter: PresenceAdapter
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Creates a Presence helper that keeps the local presence state in sync with the server.
|
|
50
|
+
*
|
|
51
|
+
* @param channel - The realtime channel to bind to.
|
|
52
|
+
* @param opts - Optional custom event names, e.g. `{ events: { state: 'state', diff: 'diff' } }`.
|
|
53
|
+
*
|
|
54
|
+
* @category Realtime
|
|
55
|
+
*
|
|
56
|
+
* @example Example for a presence channel
|
|
57
|
+
* ```ts
|
|
58
|
+
* const presence = new RealtimePresence(channel)
|
|
59
|
+
*
|
|
60
|
+
* channel.on('presence', ({ event, key }) => {
|
|
61
|
+
* console.log(`Presence ${event} on ${key}`)
|
|
62
|
+
* })
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
constructor(
|
|
66
|
+
public channel: RealtimeChannel,
|
|
67
|
+
opts?: RealtimePresenceOptions
|
|
68
|
+
) {
|
|
69
|
+
this.presenceAdapter = new PresenceAdapter(this.channel.channelAdapter, opts)
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import RealtimeClient, {
|
|
2
|
+
RealtimeClientOptions,
|
|
3
|
+
RealtimeMessage,
|
|
4
|
+
RealtimeRemoveChannelResponse,
|
|
5
|
+
WebSocketLikeConstructor,
|
|
6
|
+
} from './RealtimeClient'
|
|
7
|
+
import RealtimeChannel, {
|
|
8
|
+
RealtimeChannelOptions,
|
|
9
|
+
RealtimeChannelSendResponse,
|
|
10
|
+
RealtimePostgresChangesFilter,
|
|
11
|
+
RealtimePostgresChangesPayload,
|
|
12
|
+
RealtimePostgresInsertPayload,
|
|
13
|
+
RealtimePostgresUpdatePayload,
|
|
14
|
+
RealtimePostgresDeletePayload,
|
|
15
|
+
REALTIME_LISTEN_TYPES,
|
|
16
|
+
REALTIME_POSTGRES_CHANGES_LISTEN_EVENT,
|
|
17
|
+
REALTIME_SUBSCRIBE_STATES,
|
|
18
|
+
REALTIME_CHANNEL_STATES,
|
|
19
|
+
} from './RealtimeChannel'
|
|
20
|
+
import RealtimePresence, {
|
|
21
|
+
RealtimePresenceState,
|
|
22
|
+
RealtimePresenceJoinPayload,
|
|
23
|
+
RealtimePresenceLeavePayload,
|
|
24
|
+
REALTIME_PRESENCE_LISTEN_EVENTS,
|
|
25
|
+
} from './RealtimePresence'
|
|
26
|
+
import WebSocketFactory, { WebSocketLike } from './lib/websocket-factory'
|
|
27
|
+
|
|
28
|
+
export {
|
|
29
|
+
RealtimePresence,
|
|
30
|
+
RealtimeChannel,
|
|
31
|
+
RealtimeChannelOptions,
|
|
32
|
+
RealtimeChannelSendResponse,
|
|
33
|
+
RealtimeClient,
|
|
34
|
+
RealtimeClientOptions,
|
|
35
|
+
RealtimeMessage,
|
|
36
|
+
RealtimePostgresChangesFilter,
|
|
37
|
+
RealtimePostgresChangesPayload,
|
|
38
|
+
RealtimePostgresInsertPayload,
|
|
39
|
+
RealtimePostgresUpdatePayload,
|
|
40
|
+
RealtimePostgresDeletePayload,
|
|
41
|
+
RealtimePresenceJoinPayload,
|
|
42
|
+
RealtimePresenceLeavePayload,
|
|
43
|
+
RealtimePresenceState,
|
|
44
|
+
RealtimeRemoveChannelResponse,
|
|
45
|
+
REALTIME_LISTEN_TYPES,
|
|
46
|
+
REALTIME_POSTGRES_CHANGES_LISTEN_EVENT,
|
|
47
|
+
REALTIME_PRESENCE_LISTEN_EVENTS,
|
|
48
|
+
REALTIME_SUBSCRIBE_STATES,
|
|
49
|
+
REALTIME_CHANNEL_STATES,
|
|
50
|
+
WebSocketFactory,
|
|
51
|
+
WebSocketLike,
|
|
52
|
+
WebSocketLikeConstructor,
|
|
53
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { version } from './version'
|
|
2
|
+
import type {
|
|
3
|
+
SocketState,
|
|
4
|
+
ChannelState,
|
|
5
|
+
ChannelEvent as PhoenixChannelEvent,
|
|
6
|
+
Transport,
|
|
7
|
+
Vsn,
|
|
8
|
+
} from '../phoenix/types'
|
|
9
|
+
|
|
10
|
+
export type { SocketState, ChannelState, Transport }
|
|
11
|
+
|
|
12
|
+
export const DEFAULT_VERSION = `realtime-js/${version}`
|
|
13
|
+
|
|
14
|
+
export const VSN_1_0_0: Vsn = '1.0.0'
|
|
15
|
+
export const VSN_2_0_0: Vsn = '2.0.0'
|
|
16
|
+
export const DEFAULT_VSN: Vsn = VSN_2_0_0
|
|
17
|
+
|
|
18
|
+
export const VERSION = version
|
|
19
|
+
|
|
20
|
+
export const DEFAULT_TIMEOUT = 10000
|
|
21
|
+
|
|
22
|
+
export const WS_CLOSE_NORMAL = 1000
|
|
23
|
+
export const MAX_PUSH_BUFFER_SIZE = 100
|
|
24
|
+
|
|
25
|
+
export const SOCKET_STATES = {
|
|
26
|
+
connecting: 0,
|
|
27
|
+
open: 1,
|
|
28
|
+
closing: 2,
|
|
29
|
+
closed: 3,
|
|
30
|
+
} as const
|
|
31
|
+
|
|
32
|
+
export const CHANNEL_STATES = {
|
|
33
|
+
closed: 'closed',
|
|
34
|
+
errored: 'errored',
|
|
35
|
+
joined: 'joined',
|
|
36
|
+
joining: 'joining',
|
|
37
|
+
leaving: 'leaving',
|
|
38
|
+
} as const
|
|
39
|
+
|
|
40
|
+
export type ChannelEvent = PhoenixChannelEvent | 'access_token'
|
|
41
|
+
|
|
42
|
+
export const CHANNEL_EVENTS = {
|
|
43
|
+
close: 'phx_close',
|
|
44
|
+
error: 'phx_error',
|
|
45
|
+
join: 'phx_join',
|
|
46
|
+
reply: 'phx_reply',
|
|
47
|
+
leave: 'phx_leave',
|
|
48
|
+
access_token: 'access_token',
|
|
49
|
+
} as const
|
|
50
|
+
|
|
51
|
+
export const TRANSPORTS = {
|
|
52
|
+
websocket: 'websocket',
|
|
53
|
+
} as const
|
|
54
|
+
|
|
55
|
+
export type ConnectionState = 'connecting' | 'open' | 'closing' | 'closed' | (string & {})
|
|
56
|
+
|
|
57
|
+
export const CONNECTION_STATE = {
|
|
58
|
+
connecting: 'connecting',
|
|
59
|
+
open: 'open',
|
|
60
|
+
closing: 'closing',
|
|
61
|
+
closed: 'closed',
|
|
62
|
+
} as const
|
package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/lib/normalizeChannelError.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalize the various shapes a channel error reason can take into a real `Error`.
|
|
3
|
+
*
|
|
4
|
+
* Transport-level channel errors arrive as a `CloseEvent`, a transport `Event`, an `Error`,
|
|
5
|
+
* a string, or `undefined` depending on which path in the underlying socket fired. Server-reply
|
|
6
|
+
* errors arrive as a payload object. This helper produces a consistent `Error` for every case
|
|
7
|
+
* and preserves the original via `cause` so callers can still inspect the raw event.
|
|
8
|
+
*/
|
|
9
|
+
export function normalizeChannelError(reason: unknown): Error {
|
|
10
|
+
if (reason instanceof Error) {
|
|
11
|
+
return reason
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
if (typeof reason === 'string') {
|
|
15
|
+
return new Error(reason)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if (reason && typeof reason === 'object') {
|
|
19
|
+
const obj = reason as Record<string, unknown>
|
|
20
|
+
|
|
21
|
+
if (typeof obj.code === 'number') {
|
|
22
|
+
const detail = typeof obj.reason === 'string' && obj.reason ? ` (${obj.reason})` : ''
|
|
23
|
+
return new Error(`socket closed: ${obj.code}${detail}`, { cause: reason })
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return new Error('channel error: transport failure', { cause: reason })
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return new Error('channel error: connection lost')
|
|
30
|
+
}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
// This file draws heavily from https://github.com/phoenixframework/phoenix/commit/cf098e9cf7a44ee6479d31d911a97d3c7430c6fe
|
|
2
|
+
// License: https://github.com/phoenixframework/phoenix/blob/master/LICENSE.md
|
|
3
|
+
export type Msg<T> = {
|
|
4
|
+
join_ref?: string | null
|
|
5
|
+
ref?: string | null
|
|
6
|
+
topic: string
|
|
7
|
+
event: string
|
|
8
|
+
payload: T
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default class Serializer {
|
|
12
|
+
HEADER_LENGTH = 1
|
|
13
|
+
USER_BROADCAST_PUSH_META_LENGTH = 6
|
|
14
|
+
KINDS = { userBroadcastPush: 3, userBroadcast: 4 }
|
|
15
|
+
BINARY_ENCODING = 0
|
|
16
|
+
JSON_ENCODING = 1
|
|
17
|
+
BROADCAST_EVENT = 'broadcast'
|
|
18
|
+
|
|
19
|
+
allowedMetadataKeys: string[] = []
|
|
20
|
+
|
|
21
|
+
constructor(allowedMetadataKeys?: string[] | null) {
|
|
22
|
+
this.allowedMetadataKeys = allowedMetadataKeys ?? []
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
encode(msg: Msg<{ [key: string]: any }>, callback: (result: ArrayBuffer | string) => any) {
|
|
26
|
+
if (
|
|
27
|
+
msg.event === this.BROADCAST_EVENT &&
|
|
28
|
+
!(msg.payload instanceof ArrayBuffer) &&
|
|
29
|
+
typeof msg.payload.event === 'string'
|
|
30
|
+
) {
|
|
31
|
+
return callback(
|
|
32
|
+
this._binaryEncodeUserBroadcastPush(msg as Msg<{ event: string } & { [key: string]: any }>)
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
let payload = [msg.join_ref, msg.ref, msg.topic, msg.event, msg.payload]
|
|
37
|
+
return callback(JSON.stringify(payload))
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
private _binaryEncodeUserBroadcastPush(message: Msg<{ event: string } & { [key: string]: any }>) {
|
|
41
|
+
if (this._isArrayBuffer(message.payload?.payload)) {
|
|
42
|
+
return this._encodeBinaryUserBroadcastPush(message)
|
|
43
|
+
} else {
|
|
44
|
+
return this._encodeJsonUserBroadcastPush(message)
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
private _encodeBinaryUserBroadcastPush(message: Msg<{ event: string } & { [key: string]: any }>) {
|
|
49
|
+
const userPayload = message.payload?.payload ?? new ArrayBuffer(0)
|
|
50
|
+
return this._encodeUserBroadcastPush(message, this.BINARY_ENCODING, userPayload)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
private _encodeJsonUserBroadcastPush(message: Msg<{ event: string } & { [key: string]: any }>) {
|
|
54
|
+
const userPayload = message.payload?.payload ?? {}
|
|
55
|
+
const encoder = new TextEncoder()
|
|
56
|
+
const encodedUserPayload = encoder.encode(JSON.stringify(userPayload)).buffer
|
|
57
|
+
return this._encodeUserBroadcastPush(message, this.JSON_ENCODING, encodedUserPayload)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
private _encodeUserBroadcastPush(
|
|
61
|
+
message: Msg<{ event: string } & { [key: string]: any }>,
|
|
62
|
+
encodingType: number,
|
|
63
|
+
encodedPayload: ArrayBuffer
|
|
64
|
+
) {
|
|
65
|
+
const topic = message.topic
|
|
66
|
+
const ref = message.ref ?? ''
|
|
67
|
+
const joinRef = message.join_ref ?? ''
|
|
68
|
+
const userEvent = message.payload.event
|
|
69
|
+
|
|
70
|
+
// Filter metadata based on allowed keys
|
|
71
|
+
const rest = this.allowedMetadataKeys
|
|
72
|
+
? this._pick(message.payload, this.allowedMetadataKeys)
|
|
73
|
+
: {}
|
|
74
|
+
|
|
75
|
+
const metadata = Object.keys(rest).length === 0 ? '' : JSON.stringify(rest)
|
|
76
|
+
|
|
77
|
+
// Validate lengths don't exceed uint8 max value (255)
|
|
78
|
+
if (joinRef.length > 255) {
|
|
79
|
+
throw new Error(`joinRef length ${joinRef.length} exceeds maximum of 255`)
|
|
80
|
+
}
|
|
81
|
+
if (ref.length > 255) {
|
|
82
|
+
throw new Error(`ref length ${ref.length} exceeds maximum of 255`)
|
|
83
|
+
}
|
|
84
|
+
if (topic.length > 255) {
|
|
85
|
+
throw new Error(`topic length ${topic.length} exceeds maximum of 255`)
|
|
86
|
+
}
|
|
87
|
+
if (userEvent.length > 255) {
|
|
88
|
+
throw new Error(`userEvent length ${userEvent.length} exceeds maximum of 255`)
|
|
89
|
+
}
|
|
90
|
+
if (metadata.length > 255) {
|
|
91
|
+
throw new Error(`metadata length ${metadata.length} exceeds maximum of 255`)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const metaLength =
|
|
95
|
+
this.USER_BROADCAST_PUSH_META_LENGTH +
|
|
96
|
+
joinRef.length +
|
|
97
|
+
ref.length +
|
|
98
|
+
topic.length +
|
|
99
|
+
userEvent.length +
|
|
100
|
+
metadata.length
|
|
101
|
+
|
|
102
|
+
const header = new ArrayBuffer(this.HEADER_LENGTH + metaLength)
|
|
103
|
+
let view = new DataView(header)
|
|
104
|
+
let offset = 0
|
|
105
|
+
|
|
106
|
+
view.setUint8(offset++, this.KINDS.userBroadcastPush) // kind
|
|
107
|
+
view.setUint8(offset++, joinRef.length)
|
|
108
|
+
view.setUint8(offset++, ref.length)
|
|
109
|
+
view.setUint8(offset++, topic.length)
|
|
110
|
+
view.setUint8(offset++, userEvent.length)
|
|
111
|
+
view.setUint8(offset++, metadata.length)
|
|
112
|
+
view.setUint8(offset++, encodingType)
|
|
113
|
+
Array.from(joinRef, (char) => view.setUint8(offset++, char.charCodeAt(0)))
|
|
114
|
+
Array.from(ref, (char) => view.setUint8(offset++, char.charCodeAt(0)))
|
|
115
|
+
Array.from(topic, (char) => view.setUint8(offset++, char.charCodeAt(0)))
|
|
116
|
+
Array.from(userEvent, (char) => view.setUint8(offset++, char.charCodeAt(0)))
|
|
117
|
+
Array.from(metadata, (char) => view.setUint8(offset++, char.charCodeAt(0)))
|
|
118
|
+
|
|
119
|
+
var combined = new Uint8Array(header.byteLength + encodedPayload.byteLength)
|
|
120
|
+
combined.set(new Uint8Array(header), 0)
|
|
121
|
+
combined.set(new Uint8Array(encodedPayload), header.byteLength)
|
|
122
|
+
|
|
123
|
+
return combined.buffer
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
decode(rawPayload: ArrayBuffer | string, callback: Function) {
|
|
127
|
+
if (this._isArrayBuffer(rawPayload)) {
|
|
128
|
+
let result = this._binaryDecode(rawPayload as ArrayBuffer)
|
|
129
|
+
return callback(result)
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
if (typeof rawPayload === 'string') {
|
|
133
|
+
const jsonPayload = JSON.parse(rawPayload)
|
|
134
|
+
const [join_ref, ref, topic, event, payload] = jsonPayload
|
|
135
|
+
return callback({ join_ref, ref, topic, event, payload })
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return callback({})
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
private _binaryDecode(buffer: ArrayBuffer) {
|
|
142
|
+
const view = new DataView(buffer)
|
|
143
|
+
const kind = view.getUint8(0)
|
|
144
|
+
const decoder = new TextDecoder()
|
|
145
|
+
switch (kind) {
|
|
146
|
+
case this.KINDS.userBroadcast:
|
|
147
|
+
return this._decodeUserBroadcast(buffer, view, decoder)
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
private _decodeUserBroadcast(
|
|
152
|
+
buffer: ArrayBuffer,
|
|
153
|
+
view: DataView,
|
|
154
|
+
decoder: TextDecoder
|
|
155
|
+
): {
|
|
156
|
+
join_ref: null
|
|
157
|
+
ref: null
|
|
158
|
+
topic: string
|
|
159
|
+
event: string
|
|
160
|
+
payload: { [key: string]: any }
|
|
161
|
+
} {
|
|
162
|
+
const topicSize = view.getUint8(1)
|
|
163
|
+
const userEventSize = view.getUint8(2)
|
|
164
|
+
const metadataSize = view.getUint8(3)
|
|
165
|
+
const payloadEncoding = view.getUint8(4)
|
|
166
|
+
|
|
167
|
+
let offset = this.HEADER_LENGTH + 4
|
|
168
|
+
const topic = decoder.decode(buffer.slice(offset, offset + topicSize))
|
|
169
|
+
offset = offset + topicSize
|
|
170
|
+
const userEvent = decoder.decode(buffer.slice(offset, offset + userEventSize))
|
|
171
|
+
offset = offset + userEventSize
|
|
172
|
+
const metadata = decoder.decode(buffer.slice(offset, offset + metadataSize))
|
|
173
|
+
offset = offset + metadataSize
|
|
174
|
+
|
|
175
|
+
const payload = buffer.slice(offset, buffer.byteLength)
|
|
176
|
+
const parsedPayload =
|
|
177
|
+
payloadEncoding === this.JSON_ENCODING ? JSON.parse(decoder.decode(payload)) : payload
|
|
178
|
+
|
|
179
|
+
const data: { [key: string]: any } = {
|
|
180
|
+
type: this.BROADCAST_EVENT,
|
|
181
|
+
event: userEvent,
|
|
182
|
+
payload: parsedPayload,
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// Metadata is optional and always JSON encoded
|
|
186
|
+
if (metadataSize > 0) {
|
|
187
|
+
data['meta'] = JSON.parse(metadata)
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
return { join_ref: null, ref: null, topic: topic, event: this.BROADCAST_EVENT, payload: data }
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
private _isArrayBuffer(buffer: any): boolean {
|
|
194
|
+
return buffer instanceof ArrayBuffer || buffer?.constructor?.name === 'ArrayBuffer'
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
private _pick(obj: Record<string, any> | null | undefined, keys: string[]): Record<string, any> {
|
|
198
|
+
if (!obj || typeof obj !== 'object') {
|
|
199
|
+
return {}
|
|
200
|
+
}
|
|
201
|
+
return Object.fromEntries(Object.entries(obj).filter(([key]) => keys.includes(key)))
|
|
202
|
+
}
|
|
203
|
+
}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helpers to convert the change Payload into native JS types.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// Adapted from epgsql (src/epgsql_binary.erl), this module licensed under
|
|
6
|
+
// 3-clause BSD found here: https://raw.githubusercontent.com/epgsql/epgsql/devel/LICENSE
|
|
7
|
+
|
|
8
|
+
export enum PostgresTypes {
|
|
9
|
+
abstime = 'abstime',
|
|
10
|
+
bool = 'bool',
|
|
11
|
+
date = 'date',
|
|
12
|
+
daterange = 'daterange',
|
|
13
|
+
float4 = 'float4',
|
|
14
|
+
float8 = 'float8',
|
|
15
|
+
int2 = 'int2',
|
|
16
|
+
int4 = 'int4',
|
|
17
|
+
int4range = 'int4range',
|
|
18
|
+
int8 = 'int8',
|
|
19
|
+
int8range = 'int8range',
|
|
20
|
+
json = 'json',
|
|
21
|
+
jsonb = 'jsonb',
|
|
22
|
+
money = 'money',
|
|
23
|
+
numeric = 'numeric',
|
|
24
|
+
oid = 'oid',
|
|
25
|
+
reltime = 'reltime',
|
|
26
|
+
text = 'text',
|
|
27
|
+
time = 'time',
|
|
28
|
+
timestamp = 'timestamp',
|
|
29
|
+
timestamptz = 'timestamptz',
|
|
30
|
+
timetz = 'timetz',
|
|
31
|
+
tsrange = 'tsrange',
|
|
32
|
+
tstzrange = 'tstzrange',
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
type Columns = {
|
|
36
|
+
name: string // the column name. eg: "user_id"
|
|
37
|
+
type: string // the column type. eg: "uuid"
|
|
38
|
+
flags?: string[] // any special flags for the column. eg: ["key"]
|
|
39
|
+
type_modifier?: number // the type modifier. eg: 4294967295
|
|
40
|
+
}[]
|
|
41
|
+
|
|
42
|
+
type BaseValue = null | string | number | boolean
|
|
43
|
+
type RecordValue = BaseValue | BaseValue[]
|
|
44
|
+
|
|
45
|
+
type Record = {
|
|
46
|
+
[key: string]: RecordValue
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Takes an array of columns and an object of string values then converts each string value
|
|
51
|
+
* to its mapped type.
|
|
52
|
+
*
|
|
53
|
+
* @param {{name: String, type: String}[]} columns
|
|
54
|
+
* @param {Object} record
|
|
55
|
+
* @param {Object} options The map of various options that can be applied to the mapper
|
|
56
|
+
* @param {Array} options.skipTypes The array of types that should not be converted
|
|
57
|
+
*
|
|
58
|
+
* @example convertChangeData([{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], {first_name: 'Paul', age:'33'}, {})
|
|
59
|
+
* //=>{ first_name: 'Paul', age: 33 }
|
|
60
|
+
*/
|
|
61
|
+
export const convertChangeData = (
|
|
62
|
+
columns: Columns,
|
|
63
|
+
record: Record | null,
|
|
64
|
+
options: { skipTypes?: string[] } = {}
|
|
65
|
+
): Record => {
|
|
66
|
+
const skipTypes = options.skipTypes ?? []
|
|
67
|
+
|
|
68
|
+
if (!record) {
|
|
69
|
+
return {}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return Object.keys(record).reduce((acc, rec_key) => {
|
|
73
|
+
acc[rec_key] = convertColumn(rec_key, columns, record, skipTypes)
|
|
74
|
+
return acc
|
|
75
|
+
}, {} as Record)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Converts the value of an individual column.
|
|
80
|
+
*
|
|
81
|
+
* @param {String} columnName The column that you want to convert
|
|
82
|
+
* @param {{name: String, type: String}[]} columns All of the columns
|
|
83
|
+
* @param {Object} record The map of string values
|
|
84
|
+
* @param {Array} skipTypes An array of types that should not be converted
|
|
85
|
+
* @return {object} Useless information
|
|
86
|
+
*
|
|
87
|
+
* @example convertColumn('age', [{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], {first_name: 'Paul', age: '33'}, [])
|
|
88
|
+
* //=> 33
|
|
89
|
+
* @example convertColumn('age', [{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], {first_name: 'Paul', age: '33'}, ['int4'])
|
|
90
|
+
* //=> "33"
|
|
91
|
+
*/
|
|
92
|
+
export const convertColumn = (
|
|
93
|
+
columnName: string,
|
|
94
|
+
columns: Columns,
|
|
95
|
+
record: Record,
|
|
96
|
+
skipTypes: string[]
|
|
97
|
+
): RecordValue => {
|
|
98
|
+
const column = columns.find((x) => x.name === columnName)
|
|
99
|
+
const colType = column?.type
|
|
100
|
+
const value = record[columnName]
|
|
101
|
+
|
|
102
|
+
if (colType && !skipTypes.includes(colType)) {
|
|
103
|
+
return convertCell(colType, value)
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return noop(value)
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* If the value of the cell is `null`, returns null.
|
|
111
|
+
* Otherwise converts the string value to the correct type.
|
|
112
|
+
* @param {String} type A postgres column type
|
|
113
|
+
* @param {String} value The cell value
|
|
114
|
+
*
|
|
115
|
+
* @example convertCell('bool', 't')
|
|
116
|
+
* //=> true
|
|
117
|
+
* @example convertCell('int8', '10')
|
|
118
|
+
* //=> 10
|
|
119
|
+
* @example convertCell('_int4', '{1,2,3,4}')
|
|
120
|
+
* //=> [1,2,3,4]
|
|
121
|
+
*/
|
|
122
|
+
export const convertCell = (type: string, value: RecordValue): RecordValue => {
|
|
123
|
+
// if data type is an array
|
|
124
|
+
if (type.charAt(0) === '_') {
|
|
125
|
+
const dataType = type.slice(1, type.length)
|
|
126
|
+
return toArray(value, dataType)
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// If not null, convert to correct type.
|
|
130
|
+
switch (type) {
|
|
131
|
+
case PostgresTypes.bool:
|
|
132
|
+
return toBoolean(value)
|
|
133
|
+
case PostgresTypes.float4:
|
|
134
|
+
case PostgresTypes.float8:
|
|
135
|
+
case PostgresTypes.int2:
|
|
136
|
+
case PostgresTypes.int4:
|
|
137
|
+
case PostgresTypes.int8:
|
|
138
|
+
case PostgresTypes.numeric:
|
|
139
|
+
case PostgresTypes.oid:
|
|
140
|
+
return toNumber(value)
|
|
141
|
+
case PostgresTypes.json:
|
|
142
|
+
case PostgresTypes.jsonb:
|
|
143
|
+
return toJson(value)
|
|
144
|
+
case PostgresTypes.timestamp:
|
|
145
|
+
return toTimestampString(value) // Format to be consistent with PostgREST
|
|
146
|
+
case PostgresTypes.abstime: // To allow users to cast it based on Timezone
|
|
147
|
+
case PostgresTypes.date: // To allow users to cast it based on Timezone
|
|
148
|
+
case PostgresTypes.daterange:
|
|
149
|
+
case PostgresTypes.int4range:
|
|
150
|
+
case PostgresTypes.int8range:
|
|
151
|
+
case PostgresTypes.money:
|
|
152
|
+
case PostgresTypes.reltime: // To allow users to cast it based on Timezone
|
|
153
|
+
case PostgresTypes.text:
|
|
154
|
+
case PostgresTypes.time: // To allow users to cast it based on Timezone
|
|
155
|
+
case PostgresTypes.timestamptz: // To allow users to cast it based on Timezone
|
|
156
|
+
case PostgresTypes.timetz: // To allow users to cast it based on Timezone
|
|
157
|
+
case PostgresTypes.tsrange:
|
|
158
|
+
case PostgresTypes.tstzrange:
|
|
159
|
+
return noop(value)
|
|
160
|
+
default:
|
|
161
|
+
// Return the value for remaining types
|
|
162
|
+
return noop(value)
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const noop = (value: RecordValue): RecordValue => {
|
|
167
|
+
return value
|
|
168
|
+
}
|
|
169
|
+
export const toBoolean = (value: RecordValue): RecordValue => {
|
|
170
|
+
switch (value) {
|
|
171
|
+
case 't':
|
|
172
|
+
return true
|
|
173
|
+
case 'f':
|
|
174
|
+
return false
|
|
175
|
+
default:
|
|
176
|
+
return value
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
export const toNumber = (value: RecordValue): RecordValue => {
|
|
180
|
+
if (typeof value === 'string') {
|
|
181
|
+
const parsedValue = parseFloat(value)
|
|
182
|
+
if (!Number.isNaN(parsedValue)) {
|
|
183
|
+
return parsedValue
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
return value
|
|
187
|
+
}
|
|
188
|
+
export const toJson = (value: RecordValue): RecordValue => {
|
|
189
|
+
if (typeof value === 'string') {
|
|
190
|
+
try {
|
|
191
|
+
return JSON.parse(value)
|
|
192
|
+
} catch {
|
|
193
|
+
return value
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
return value
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Converts a Postgres Array into a native JS array
|
|
201
|
+
*
|
|
202
|
+
* @example toArray('{}', 'int4')
|
|
203
|
+
* //=> []
|
|
204
|
+
* @example toArray('{"[2021-01-01,2021-12-31)","(2021-01-01,2021-12-32]"}', 'daterange')
|
|
205
|
+
* //=> ['[2021-01-01,2021-12-31)', '(2021-01-01,2021-12-32]']
|
|
206
|
+
* @example toArray([1,2,3,4], 'int4')
|
|
207
|
+
* //=> [1,2,3,4]
|
|
208
|
+
*/
|
|
209
|
+
export const toArray = (value: RecordValue, type: string): RecordValue => {
|
|
210
|
+
if (typeof value !== 'string') {
|
|
211
|
+
return value
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
const lastIdx = value.length - 1
|
|
215
|
+
const closeBrace = value[lastIdx]
|
|
216
|
+
const openBrace = value[0]
|
|
217
|
+
|
|
218
|
+
// Confirm value is a Postgres array by checking curly brackets
|
|
219
|
+
if (openBrace === '{' && closeBrace === '}') {
|
|
220
|
+
let arr
|
|
221
|
+
const valTrim = value.slice(1, lastIdx)
|
|
222
|
+
|
|
223
|
+
// TODO: find a better solution to separate Postgres array data
|
|
224
|
+
try {
|
|
225
|
+
arr = JSON.parse('[' + valTrim + ']')
|
|
226
|
+
} catch (_) {
|
|
227
|
+
// WARNING: splitting on comma does not cover all edge cases
|
|
228
|
+
arr = valTrim ? valTrim.split(',') : []
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
return arr.map((val: BaseValue) => convertCell(type, val))
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
return value
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Fixes timestamp to be ISO-8601. Swaps the space between the date and time for a 'T'
|
|
239
|
+
* See https://github.com/supabase/supabase/issues/18
|
|
240
|
+
*
|
|
241
|
+
* @example toTimestampString('2019-09-10 00:00:00')
|
|
242
|
+
* //=> '2019-09-10T00:00:00'
|
|
243
|
+
*/
|
|
244
|
+
export const toTimestampString = (value: RecordValue): RecordValue => {
|
|
245
|
+
if (typeof value === 'string') {
|
|
246
|
+
return value.replace(' ', 'T')
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
return value
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export const httpEndpointURL = (socketUrl: string): string => {
|
|
253
|
+
const wsUrl = new URL(socketUrl)
|
|
254
|
+
|
|
255
|
+
wsUrl.protocol = wsUrl.protocol.replace(/^ws/i, 'http')
|
|
256
|
+
|
|
257
|
+
wsUrl.pathname = wsUrl.pathname
|
|
258
|
+
.replace(/\/+$/, '') // remove all trailing slashes
|
|
259
|
+
.replace(/\/socket\/websocket$/i, '') // remove the socket/websocket path
|
|
260
|
+
.replace(/\/socket$/i, '') // remove the socket path
|
|
261
|
+
.replace(/\/websocket$/i, '') // remove the websocket path
|
|
262
|
+
|
|
263
|
+
if (wsUrl.pathname === '' || wsUrl.pathname === '/') {
|
|
264
|
+
wsUrl.pathname = '/api/broadcast'
|
|
265
|
+
} else {
|
|
266
|
+
wsUrl.pathname = wsUrl.pathname + '/api/broadcast'
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
return wsUrl.href
|
|
270
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Generated automatically during releases by scripts/update-version-files.ts
|
|
2
|
+
// This file provides runtime access to the package version for:
|
|
3
|
+
// - HTTP request headers (e.g., X-Client-Info header for API requests)
|
|
4
|
+
// - Debugging and support (identifying which version is running)
|
|
5
|
+
// - Telemetry and logging (version reporting in errors/analytics)
|
|
6
|
+
// - Ensuring build artifacts match the published package version
|
|
7
|
+
export const version = '2.105.4'
|