@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
package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeChannel.js
ADDED
|
@@ -0,0 +1,714 @@
|
|
|
1
|
+
import { CHANNEL_EVENTS, CHANNEL_STATES } from './lib/constants';
|
|
2
|
+
import RealtimePresence from './RealtimePresence';
|
|
3
|
+
import * as Transformers from './lib/transformers';
|
|
4
|
+
import { httpEndpointURL } from './lib/transformers';
|
|
5
|
+
import { normalizeChannelError } from './lib/normalizeChannelError';
|
|
6
|
+
import ChannelAdapter from './phoenix/channelAdapter';
|
|
7
|
+
export var REALTIME_POSTGRES_CHANGES_LISTEN_EVENT;
|
|
8
|
+
(function (REALTIME_POSTGRES_CHANGES_LISTEN_EVENT) {
|
|
9
|
+
REALTIME_POSTGRES_CHANGES_LISTEN_EVENT["ALL"] = "*";
|
|
10
|
+
REALTIME_POSTGRES_CHANGES_LISTEN_EVENT["INSERT"] = "INSERT";
|
|
11
|
+
REALTIME_POSTGRES_CHANGES_LISTEN_EVENT["UPDATE"] = "UPDATE";
|
|
12
|
+
REALTIME_POSTGRES_CHANGES_LISTEN_EVENT["DELETE"] = "DELETE";
|
|
13
|
+
})(REALTIME_POSTGRES_CHANGES_LISTEN_EVENT || (REALTIME_POSTGRES_CHANGES_LISTEN_EVENT = {}));
|
|
14
|
+
export var REALTIME_LISTEN_TYPES;
|
|
15
|
+
(function (REALTIME_LISTEN_TYPES) {
|
|
16
|
+
REALTIME_LISTEN_TYPES["BROADCAST"] = "broadcast";
|
|
17
|
+
REALTIME_LISTEN_TYPES["PRESENCE"] = "presence";
|
|
18
|
+
REALTIME_LISTEN_TYPES["POSTGRES_CHANGES"] = "postgres_changes";
|
|
19
|
+
REALTIME_LISTEN_TYPES["SYSTEM"] = "system";
|
|
20
|
+
})(REALTIME_LISTEN_TYPES || (REALTIME_LISTEN_TYPES = {}));
|
|
21
|
+
export var REALTIME_SUBSCRIBE_STATES;
|
|
22
|
+
(function (REALTIME_SUBSCRIBE_STATES) {
|
|
23
|
+
REALTIME_SUBSCRIBE_STATES["SUBSCRIBED"] = "SUBSCRIBED";
|
|
24
|
+
REALTIME_SUBSCRIBE_STATES["TIMED_OUT"] = "TIMED_OUT";
|
|
25
|
+
REALTIME_SUBSCRIBE_STATES["CLOSED"] = "CLOSED";
|
|
26
|
+
REALTIME_SUBSCRIBE_STATES["CHANNEL_ERROR"] = "CHANNEL_ERROR";
|
|
27
|
+
})(REALTIME_SUBSCRIBE_STATES || (REALTIME_SUBSCRIBE_STATES = {}));
|
|
28
|
+
export const REALTIME_CHANNEL_STATES = CHANNEL_STATES;
|
|
29
|
+
/** A channel is the basic building block of Realtime
|
|
30
|
+
* and narrows the scope of data flow to subscribed clients.
|
|
31
|
+
* You can think of a channel as a chatroom where participants are able to see who's online
|
|
32
|
+
* and send and receive messages.
|
|
33
|
+
*/
|
|
34
|
+
export default class RealtimeChannel {
|
|
35
|
+
get state() {
|
|
36
|
+
return this.channelAdapter.state;
|
|
37
|
+
}
|
|
38
|
+
set state(state) {
|
|
39
|
+
this.channelAdapter.state = state;
|
|
40
|
+
}
|
|
41
|
+
get joinedOnce() {
|
|
42
|
+
return this.channelAdapter.joinedOnce;
|
|
43
|
+
}
|
|
44
|
+
get timeout() {
|
|
45
|
+
return this.socket.timeout;
|
|
46
|
+
}
|
|
47
|
+
get joinPush() {
|
|
48
|
+
return this.channelAdapter.joinPush;
|
|
49
|
+
}
|
|
50
|
+
get rejoinTimer() {
|
|
51
|
+
return this.channelAdapter.rejoinTimer;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Creates a channel that can broadcast messages, sync presence, and listen to Postgres changes.
|
|
55
|
+
*
|
|
56
|
+
* The topic determines which realtime stream you are subscribing to. Config options let you
|
|
57
|
+
* enable acknowledgement for broadcasts, presence tracking, or private channels.
|
|
58
|
+
*
|
|
59
|
+
* @category Realtime
|
|
60
|
+
*
|
|
61
|
+
* @example Using supabase-js (recommended)
|
|
62
|
+
* ```ts
|
|
63
|
+
* import { createClient } from '@supabase/supabase-js'
|
|
64
|
+
*
|
|
65
|
+
* const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key')
|
|
66
|
+
* const channel = supabase.channel('room1')
|
|
67
|
+
* channel
|
|
68
|
+
* .on('broadcast', { event: 'cursor-pos' }, (payload) => console.log(payload))
|
|
69
|
+
* .subscribe()
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
72
|
+
* @example Standalone import for bundle-sensitive environments
|
|
73
|
+
* ```ts
|
|
74
|
+
* import RealtimeClient from '@supabase/realtime-js'
|
|
75
|
+
*
|
|
76
|
+
* const client = new RealtimeClient('https://xyzcompany.supabase.co/realtime/v1', {
|
|
77
|
+
* params: { apikey: 'your-publishable-key' },
|
|
78
|
+
* })
|
|
79
|
+
* const channel = new RealtimeChannel('realtime:public:messages', { config: {} }, client)
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
constructor(
|
|
83
|
+
/** Topic name can be any string. */
|
|
84
|
+
topic, params = { config: {} }, socket) {
|
|
85
|
+
var _a, _b;
|
|
86
|
+
this.topic = topic;
|
|
87
|
+
this.params = params;
|
|
88
|
+
this.socket = socket;
|
|
89
|
+
this.bindings = {};
|
|
90
|
+
this.subTopic = topic.replace(/^realtime:/i, '');
|
|
91
|
+
this.params.config = Object.assign({
|
|
92
|
+
broadcast: { ack: false, self: false },
|
|
93
|
+
presence: { key: '', enabled: false },
|
|
94
|
+
private: false,
|
|
95
|
+
}, params.config);
|
|
96
|
+
this.channelAdapter = new ChannelAdapter(this.socket.socketAdapter, topic, this.params);
|
|
97
|
+
this.presence = new RealtimePresence(this);
|
|
98
|
+
this._onClose(() => {
|
|
99
|
+
this.socket._remove(this);
|
|
100
|
+
});
|
|
101
|
+
this._updateFilterTransform();
|
|
102
|
+
this.broadcastEndpointURL = httpEndpointURL(this.socket.socketAdapter.endPointURL());
|
|
103
|
+
this.private = this.params.config.private || false;
|
|
104
|
+
if (!this.private && ((_b = (_a = this.params.config) === null || _a === void 0 ? void 0 : _a.broadcast) === null || _b === void 0 ? void 0 : _b.replay)) {
|
|
105
|
+
throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Subscribe registers your client with the server
|
|
110
|
+
* @category Realtime
|
|
111
|
+
*/
|
|
112
|
+
subscribe(callback, timeout = this.timeout) {
|
|
113
|
+
var _a, _b, _c;
|
|
114
|
+
if (!this.socket.isConnected()) {
|
|
115
|
+
this.socket.connect();
|
|
116
|
+
}
|
|
117
|
+
if (this.channelAdapter.isClosed()) {
|
|
118
|
+
const { config: { broadcast, presence, private: isPrivate }, } = this.params;
|
|
119
|
+
const postgres_changes = (_b = (_a = this.bindings.postgres_changes) === null || _a === void 0 ? void 0 : _a.map((r) => r.filter)) !== null && _b !== void 0 ? _b : [];
|
|
120
|
+
const presence_enabled = (!!this.bindings[REALTIME_LISTEN_TYPES.PRESENCE] &&
|
|
121
|
+
this.bindings[REALTIME_LISTEN_TYPES.PRESENCE].length > 0) ||
|
|
122
|
+
((_c = this.params.config.presence) === null || _c === void 0 ? void 0 : _c.enabled) === true;
|
|
123
|
+
const accessTokenPayload = {};
|
|
124
|
+
const config = {
|
|
125
|
+
broadcast,
|
|
126
|
+
presence: Object.assign(Object.assign({}, presence), { enabled: presence_enabled }),
|
|
127
|
+
postgres_changes,
|
|
128
|
+
private: isPrivate,
|
|
129
|
+
};
|
|
130
|
+
if (this.socket.accessTokenValue) {
|
|
131
|
+
accessTokenPayload.access_token = this.socket.accessTokenValue;
|
|
132
|
+
}
|
|
133
|
+
this._onError((reason) => {
|
|
134
|
+
callback === null || callback === void 0 ? void 0 : callback(REALTIME_SUBSCRIBE_STATES.CHANNEL_ERROR, normalizeChannelError(reason));
|
|
135
|
+
});
|
|
136
|
+
this._onClose(() => callback === null || callback === void 0 ? void 0 : callback(REALTIME_SUBSCRIBE_STATES.CLOSED));
|
|
137
|
+
this.updateJoinPayload(Object.assign({ config }, accessTokenPayload));
|
|
138
|
+
this._updateFilterMessage();
|
|
139
|
+
this.channelAdapter
|
|
140
|
+
.subscribe(timeout)
|
|
141
|
+
.receive('ok', async ({ postgres_changes }) => {
|
|
142
|
+
// Only refresh auth if using callback-based tokens
|
|
143
|
+
if (!this.socket._isManualToken()) {
|
|
144
|
+
this.socket.setAuth();
|
|
145
|
+
}
|
|
146
|
+
if (postgres_changes === undefined) {
|
|
147
|
+
callback === null || callback === void 0 ? void 0 : callback(REALTIME_SUBSCRIBE_STATES.SUBSCRIBED);
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
this._updatePostgresBindings(postgres_changes, callback);
|
|
151
|
+
})
|
|
152
|
+
.receive('error', (error) => {
|
|
153
|
+
this.state = CHANNEL_STATES.errored;
|
|
154
|
+
const message = Object.values(error).join(', ') || 'error';
|
|
155
|
+
callback === null || callback === void 0 ? void 0 : callback(REALTIME_SUBSCRIBE_STATES.CHANNEL_ERROR, new Error(message, { cause: error }));
|
|
156
|
+
})
|
|
157
|
+
.receive('timeout', () => {
|
|
158
|
+
callback === null || callback === void 0 ? void 0 : callback(REALTIME_SUBSCRIBE_STATES.TIMED_OUT);
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
return this;
|
|
162
|
+
}
|
|
163
|
+
_updatePostgresBindings(postgres_changes, callback) {
|
|
164
|
+
var _a;
|
|
165
|
+
const clientPostgresBindings = this.bindings.postgres_changes;
|
|
166
|
+
const bindingsLen = (_a = clientPostgresBindings === null || clientPostgresBindings === void 0 ? void 0 : clientPostgresBindings.length) !== null && _a !== void 0 ? _a : 0;
|
|
167
|
+
const newPostgresBindings = [];
|
|
168
|
+
for (let i = 0; i < bindingsLen; i++) {
|
|
169
|
+
const clientPostgresBinding = clientPostgresBindings[i];
|
|
170
|
+
const { filter: { event, schema, table, filter }, } = clientPostgresBinding;
|
|
171
|
+
const serverPostgresFilter = postgres_changes && postgres_changes[i];
|
|
172
|
+
if (serverPostgresFilter &&
|
|
173
|
+
serverPostgresFilter.event === event &&
|
|
174
|
+
RealtimeChannel.isFilterValueEqual(serverPostgresFilter.schema, schema) &&
|
|
175
|
+
RealtimeChannel.isFilterValueEqual(serverPostgresFilter.table, table) &&
|
|
176
|
+
RealtimeChannel.isFilterValueEqual(serverPostgresFilter.filter, filter)) {
|
|
177
|
+
newPostgresBindings.push(Object.assign(Object.assign({}, clientPostgresBinding), { id: serverPostgresFilter.id }));
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
this.unsubscribe();
|
|
181
|
+
this.state = CHANNEL_STATES.errored;
|
|
182
|
+
callback === null || callback === void 0 ? void 0 : callback(REALTIME_SUBSCRIBE_STATES.CHANNEL_ERROR, new Error('mismatch between server and client bindings for postgres changes'));
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
this.bindings.postgres_changes = newPostgresBindings;
|
|
187
|
+
if (this.state != CHANNEL_STATES.errored && callback) {
|
|
188
|
+
callback(REALTIME_SUBSCRIBE_STATES.SUBSCRIBED);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Returns the current presence state for this channel.
|
|
193
|
+
*
|
|
194
|
+
* The shape is a map keyed by presence key (for example a user id) where each entry contains the
|
|
195
|
+
* tracked metadata for that user.
|
|
196
|
+
*
|
|
197
|
+
* @category Realtime
|
|
198
|
+
*/
|
|
199
|
+
presenceState() {
|
|
200
|
+
return this.presence.state;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Sends the supplied payload to the presence tracker so other subscribers can see that this
|
|
204
|
+
* client is online. Use `untrack` to stop broadcasting presence for the same key.
|
|
205
|
+
*
|
|
206
|
+
* @category Realtime
|
|
207
|
+
*/
|
|
208
|
+
async track(payload, opts = {}) {
|
|
209
|
+
return await this.send({
|
|
210
|
+
type: 'presence',
|
|
211
|
+
event: 'track',
|
|
212
|
+
payload,
|
|
213
|
+
}, opts.timeout || this.timeout);
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Removes the current presence state for this client.
|
|
217
|
+
*
|
|
218
|
+
* @category Realtime
|
|
219
|
+
*/
|
|
220
|
+
async untrack(opts = {}) {
|
|
221
|
+
return await this.send({
|
|
222
|
+
type: 'presence',
|
|
223
|
+
event: 'untrack',
|
|
224
|
+
}, opts);
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Listen to realtime events on this channel.
|
|
228
|
+
* @category Realtime
|
|
229
|
+
*
|
|
230
|
+
* @remarks
|
|
231
|
+
* - By default, Broadcast and Presence are enabled for all projects.
|
|
232
|
+
* - By default, listening to database changes is disabled for new projects due to database performance and security concerns. You can turn it on by managing Realtime's [replication](/docs/guides/api#realtime-api-overview).
|
|
233
|
+
* - You can receive the "previous" data for updates and deletes by setting the table's `REPLICA IDENTITY` to `FULL` (e.g., `ALTER TABLE your_table REPLICA IDENTITY FULL;`).
|
|
234
|
+
* - Row level security is not applied to delete statements. When RLS is enabled and replica identity is set to full, only the primary key is sent to clients.
|
|
235
|
+
*
|
|
236
|
+
* @example Listen to broadcast messages
|
|
237
|
+
* ```js
|
|
238
|
+
* const channel = supabase.channel("room1")
|
|
239
|
+
*
|
|
240
|
+
* channel.on("broadcast", { event: "cursor-pos" }, (payload) => {
|
|
241
|
+
* console.log("Cursor position received!", payload);
|
|
242
|
+
* }).subscribe((status) => {
|
|
243
|
+
* if (status === "SUBSCRIBED") {
|
|
244
|
+
* channel.send({
|
|
245
|
+
* type: "broadcast",
|
|
246
|
+
* event: "cursor-pos",
|
|
247
|
+
* payload: { x: Math.random(), y: Math.random() },
|
|
248
|
+
* });
|
|
249
|
+
* }
|
|
250
|
+
* });
|
|
251
|
+
* ```
|
|
252
|
+
*
|
|
253
|
+
* @example Listen to presence sync
|
|
254
|
+
* ```js
|
|
255
|
+
* const channel = supabase.channel('room1')
|
|
256
|
+
* channel
|
|
257
|
+
* .on('presence', { event: 'sync' }, () => {
|
|
258
|
+
* console.log('Synced presence state: ', channel.presenceState())
|
|
259
|
+
* })
|
|
260
|
+
* .subscribe(async (status) => {
|
|
261
|
+
* if (status === 'SUBSCRIBED') {
|
|
262
|
+
* await channel.track({ online_at: new Date().toISOString() })
|
|
263
|
+
* }
|
|
264
|
+
* })
|
|
265
|
+
* ```
|
|
266
|
+
*
|
|
267
|
+
* @example Listen to presence join
|
|
268
|
+
* ```js
|
|
269
|
+
* const channel = supabase.channel('room1')
|
|
270
|
+
* channel
|
|
271
|
+
* .on('presence', { event: 'join' }, ({ newPresences }) => {
|
|
272
|
+
* console.log('Newly joined presences: ', newPresences)
|
|
273
|
+
* })
|
|
274
|
+
* .subscribe(async (status) => {
|
|
275
|
+
* if (status === 'SUBSCRIBED') {
|
|
276
|
+
* await channel.track({ online_at: new Date().toISOString() })
|
|
277
|
+
* }
|
|
278
|
+
* })
|
|
279
|
+
* ```
|
|
280
|
+
*
|
|
281
|
+
* @example Listen to presence leave
|
|
282
|
+
* ```js
|
|
283
|
+
* const channel = supabase.channel('room1')
|
|
284
|
+
* channel
|
|
285
|
+
* .on('presence', { event: 'leave' }, ({ leftPresences }) => {
|
|
286
|
+
* console.log('Newly left presences: ', leftPresences)
|
|
287
|
+
* })
|
|
288
|
+
* .subscribe(async (status) => {
|
|
289
|
+
* if (status === 'SUBSCRIBED') {
|
|
290
|
+
* await channel.track({ online_at: new Date().toISOString() })
|
|
291
|
+
* await channel.untrack()
|
|
292
|
+
* }
|
|
293
|
+
* })
|
|
294
|
+
* ```
|
|
295
|
+
*
|
|
296
|
+
* @example Listen to all database changes
|
|
297
|
+
* ```js
|
|
298
|
+
* supabase
|
|
299
|
+
* .channel('room1')
|
|
300
|
+
* .on('postgres_changes', { event: '*', schema: '*' }, payload => {
|
|
301
|
+
* console.log('Change received!', payload)
|
|
302
|
+
* })
|
|
303
|
+
* .subscribe()
|
|
304
|
+
* ```
|
|
305
|
+
*
|
|
306
|
+
* @example Listen to a specific table
|
|
307
|
+
* ```js
|
|
308
|
+
* supabase
|
|
309
|
+
* .channel('room1')
|
|
310
|
+
* .on('postgres_changes', { event: '*', schema: 'public', table: 'countries' }, payload => {
|
|
311
|
+
* console.log('Change received!', payload)
|
|
312
|
+
* })
|
|
313
|
+
* .subscribe()
|
|
314
|
+
* ```
|
|
315
|
+
*
|
|
316
|
+
* @example Listen to inserts
|
|
317
|
+
* ```js
|
|
318
|
+
* supabase
|
|
319
|
+
* .channel('room1')
|
|
320
|
+
* .on('postgres_changes', { event: 'INSERT', schema: 'public', table: 'countries' }, payload => {
|
|
321
|
+
* console.log('Change received!', payload)
|
|
322
|
+
* })
|
|
323
|
+
* .subscribe()
|
|
324
|
+
* ```
|
|
325
|
+
*
|
|
326
|
+
* @exampleDescription Listen to updates
|
|
327
|
+
* By default, Supabase will send only the updated record. If you want to receive the previous values as well you can
|
|
328
|
+
* enable full replication for the table you are listening to:
|
|
329
|
+
*
|
|
330
|
+
* ```sql
|
|
331
|
+
* alter table "your_table" replica identity full;
|
|
332
|
+
* ```
|
|
333
|
+
*
|
|
334
|
+
* @example Listen to updates
|
|
335
|
+
* ```js
|
|
336
|
+
* supabase
|
|
337
|
+
* .channel('room1')
|
|
338
|
+
* .on('postgres_changes', { event: 'UPDATE', schema: 'public', table: 'countries' }, payload => {
|
|
339
|
+
* console.log('Change received!', payload)
|
|
340
|
+
* })
|
|
341
|
+
* .subscribe()
|
|
342
|
+
* ```
|
|
343
|
+
*
|
|
344
|
+
* @exampleDescription Listen to deletes
|
|
345
|
+
* By default, Supabase does not send deleted records. If you want to receive the deleted record you can
|
|
346
|
+
* enable full replication for the table you are listening to:
|
|
347
|
+
*
|
|
348
|
+
* ```sql
|
|
349
|
+
* alter table "your_table" replica identity full;
|
|
350
|
+
* ```
|
|
351
|
+
*
|
|
352
|
+
* @example Listen to deletes
|
|
353
|
+
* ```js
|
|
354
|
+
* supabase
|
|
355
|
+
* .channel('room1')
|
|
356
|
+
* .on('postgres_changes', { event: 'DELETE', schema: 'public', table: 'countries' }, payload => {
|
|
357
|
+
* console.log('Change received!', payload)
|
|
358
|
+
* })
|
|
359
|
+
* .subscribe()
|
|
360
|
+
* ```
|
|
361
|
+
*
|
|
362
|
+
* @exampleDescription Listen to multiple events
|
|
363
|
+
* You can chain listeners if you want to listen to multiple events for each table.
|
|
364
|
+
*
|
|
365
|
+
* @example Listen to multiple events
|
|
366
|
+
* ```js
|
|
367
|
+
* supabase
|
|
368
|
+
* .channel('room1')
|
|
369
|
+
* .on('postgres_changes', { event: 'INSERT', schema: 'public', table: 'countries' }, handleRecordInserted)
|
|
370
|
+
* .on('postgres_changes', { event: 'DELETE', schema: 'public', table: 'countries' }, handleRecordDeleted)
|
|
371
|
+
* .subscribe()
|
|
372
|
+
* ```
|
|
373
|
+
*
|
|
374
|
+
* @exampleDescription Listen to row level changes
|
|
375
|
+
* You can listen to individual rows using the format `{table}:{col}=eq.{val}` - where `{col}` is the column name, and `{val}` is the value which you want to match.
|
|
376
|
+
*
|
|
377
|
+
* @example Listen to row level changes
|
|
378
|
+
* ```js
|
|
379
|
+
* supabase
|
|
380
|
+
* .channel('room1')
|
|
381
|
+
* .on('postgres_changes', { event: 'UPDATE', schema: 'public', table: 'countries', filter: 'id=eq.200' }, handleRecordUpdated)
|
|
382
|
+
* .subscribe()
|
|
383
|
+
* ```
|
|
384
|
+
*/
|
|
385
|
+
on(type, filter, callback) {
|
|
386
|
+
const stateCheck = this.channelAdapter.isJoined() || this.channelAdapter.isJoining();
|
|
387
|
+
const typeCheck = type === REALTIME_LISTEN_TYPES.PRESENCE || type === REALTIME_LISTEN_TYPES.POSTGRES_CHANGES;
|
|
388
|
+
if (stateCheck && typeCheck) {
|
|
389
|
+
this.socket.log('channel', `cannot add \`${type}\` callbacks for ${this.topic} after \`subscribe()\`.`);
|
|
390
|
+
throw new Error(`cannot add \`${type}\` callbacks for ${this.topic} after \`subscribe()\`.`);
|
|
391
|
+
}
|
|
392
|
+
return this._on(type, filter, callback);
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* Sends a broadcast message explicitly via REST API.
|
|
396
|
+
*
|
|
397
|
+
* This method always uses the REST API endpoint regardless of WebSocket connection state.
|
|
398
|
+
* Useful when you want to guarantee REST delivery or when gradually migrating from implicit REST fallback.
|
|
399
|
+
*
|
|
400
|
+
* @param event The name of the broadcast event
|
|
401
|
+
* @param payload Payload to be sent (required)
|
|
402
|
+
* @param opts Options including timeout
|
|
403
|
+
* @returns Promise resolving to object with success status, and error details if failed
|
|
404
|
+
*
|
|
405
|
+
* @category Realtime
|
|
406
|
+
*/
|
|
407
|
+
async httpSend(event, payload, opts = {}) {
|
|
408
|
+
var _a;
|
|
409
|
+
if (payload === undefined || payload === null) {
|
|
410
|
+
return Promise.reject(new Error('Payload is required for httpSend()'));
|
|
411
|
+
}
|
|
412
|
+
const headers = {
|
|
413
|
+
apikey: this.socket.apiKey ? this.socket.apiKey : '',
|
|
414
|
+
'Content-Type': 'application/json',
|
|
415
|
+
};
|
|
416
|
+
if (this.socket.accessTokenValue) {
|
|
417
|
+
headers['Authorization'] = `Bearer ${this.socket.accessTokenValue}`;
|
|
418
|
+
}
|
|
419
|
+
const options = {
|
|
420
|
+
method: 'POST',
|
|
421
|
+
headers,
|
|
422
|
+
body: JSON.stringify({
|
|
423
|
+
messages: [
|
|
424
|
+
{
|
|
425
|
+
topic: this.subTopic,
|
|
426
|
+
event,
|
|
427
|
+
payload: payload,
|
|
428
|
+
private: this.private,
|
|
429
|
+
},
|
|
430
|
+
],
|
|
431
|
+
}),
|
|
432
|
+
};
|
|
433
|
+
const response = await this._fetchWithTimeout(this.broadcastEndpointURL, options, (_a = opts.timeout) !== null && _a !== void 0 ? _a : this.timeout);
|
|
434
|
+
if (response.status === 202) {
|
|
435
|
+
return { success: true };
|
|
436
|
+
}
|
|
437
|
+
let errorMessage = response.statusText;
|
|
438
|
+
try {
|
|
439
|
+
const errorBody = await response.json();
|
|
440
|
+
errorMessage = errorBody.error || errorBody.message || errorMessage;
|
|
441
|
+
}
|
|
442
|
+
catch (_b) { }
|
|
443
|
+
return Promise.reject(new Error(errorMessage));
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* Sends a message into the channel.
|
|
447
|
+
*
|
|
448
|
+
* @param args Arguments to send to channel
|
|
449
|
+
* @param args.type The type of event to send
|
|
450
|
+
* @param args.event The name of the event being sent
|
|
451
|
+
* @param args.payload Payload to be sent
|
|
452
|
+
* @param opts Options to be used during the send process
|
|
453
|
+
*
|
|
454
|
+
* @category Realtime
|
|
455
|
+
*
|
|
456
|
+
* @remarks
|
|
457
|
+
* - When using REST you don't need to subscribe to the channel
|
|
458
|
+
* - REST calls are only available from 2.37.0 onwards
|
|
459
|
+
*
|
|
460
|
+
* @example Send a message via websocket
|
|
461
|
+
* ```js
|
|
462
|
+
* const channel = supabase.channel('room1')
|
|
463
|
+
*
|
|
464
|
+
* channel.subscribe((status) => {
|
|
465
|
+
* if (status === 'SUBSCRIBED') {
|
|
466
|
+
* channel.send({
|
|
467
|
+
* type: 'broadcast',
|
|
468
|
+
* event: 'cursor-pos',
|
|
469
|
+
* payload: { x: Math.random(), y: Math.random() },
|
|
470
|
+
* })
|
|
471
|
+
* }
|
|
472
|
+
* })
|
|
473
|
+
* ```
|
|
474
|
+
*
|
|
475
|
+
* @exampleResponse Send a message via websocket
|
|
476
|
+
* ```js
|
|
477
|
+
* ok | timed out | error
|
|
478
|
+
* ```
|
|
479
|
+
*
|
|
480
|
+
* @example Send a message via REST
|
|
481
|
+
* ```js
|
|
482
|
+
* supabase
|
|
483
|
+
* .channel('room1')
|
|
484
|
+
* .httpSend('cursor-pos', { x: Math.random(), y: Math.random() })
|
|
485
|
+
* ```
|
|
486
|
+
*/
|
|
487
|
+
async send(args, opts = {}) {
|
|
488
|
+
var _a, _b;
|
|
489
|
+
if (!this.channelAdapter.canPush() && args.type === 'broadcast') {
|
|
490
|
+
console.warn('Realtime send() is automatically falling back to REST API. ' +
|
|
491
|
+
'This behavior will be deprecated in the future. ' +
|
|
492
|
+
'Please use httpSend() explicitly for REST delivery.');
|
|
493
|
+
const { event, payload: endpoint_payload } = args;
|
|
494
|
+
const headers = {
|
|
495
|
+
apikey: this.socket.apiKey ? this.socket.apiKey : '',
|
|
496
|
+
'Content-Type': 'application/json',
|
|
497
|
+
};
|
|
498
|
+
if (this.socket.accessTokenValue) {
|
|
499
|
+
headers['Authorization'] = `Bearer ${this.socket.accessTokenValue}`;
|
|
500
|
+
}
|
|
501
|
+
const options = {
|
|
502
|
+
method: 'POST',
|
|
503
|
+
headers,
|
|
504
|
+
body: JSON.stringify({
|
|
505
|
+
messages: [
|
|
506
|
+
{
|
|
507
|
+
topic: this.subTopic,
|
|
508
|
+
event,
|
|
509
|
+
payload: endpoint_payload,
|
|
510
|
+
private: this.private,
|
|
511
|
+
},
|
|
512
|
+
],
|
|
513
|
+
}),
|
|
514
|
+
};
|
|
515
|
+
try {
|
|
516
|
+
const response = await this._fetchWithTimeout(this.broadcastEndpointURL, options, (_a = opts.timeout) !== null && _a !== void 0 ? _a : this.timeout);
|
|
517
|
+
await ((_b = response.body) === null || _b === void 0 ? void 0 : _b.cancel());
|
|
518
|
+
return response.ok ? 'ok' : 'error';
|
|
519
|
+
}
|
|
520
|
+
catch (error) {
|
|
521
|
+
if (error instanceof Error && error.name === 'AbortError') {
|
|
522
|
+
return 'timed out';
|
|
523
|
+
}
|
|
524
|
+
else {
|
|
525
|
+
return 'error';
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
else {
|
|
530
|
+
return new Promise((resolve) => {
|
|
531
|
+
var _a, _b, _c;
|
|
532
|
+
const push = this.channelAdapter.push(args.type, args, opts.timeout || this.timeout);
|
|
533
|
+
if (args.type === 'broadcast' && !((_c = (_b = (_a = this.params) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.broadcast) === null || _c === void 0 ? void 0 : _c.ack)) {
|
|
534
|
+
resolve('ok');
|
|
535
|
+
}
|
|
536
|
+
push.receive('ok', () => resolve('ok'));
|
|
537
|
+
push.receive('error', () => resolve('error'));
|
|
538
|
+
push.receive('timeout', () => resolve('timed out'));
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* Updates the payload that will be sent the next time the channel joins (reconnects).
|
|
544
|
+
* Useful for rotating access tokens or updating config without re-creating the channel.
|
|
545
|
+
*
|
|
546
|
+
* @category Realtime
|
|
547
|
+
*/
|
|
548
|
+
updateJoinPayload(payload) {
|
|
549
|
+
this.channelAdapter.updateJoinPayload(payload);
|
|
550
|
+
}
|
|
551
|
+
/**
|
|
552
|
+
* Leaves the channel.
|
|
553
|
+
*
|
|
554
|
+
* Unsubscribes from server events, and instructs channel to terminate on server.
|
|
555
|
+
* Triggers onClose() hooks.
|
|
556
|
+
*
|
|
557
|
+
* To receive leave acknowledgements, use the a `receive` hook to bind to the server ack, ie:
|
|
558
|
+
* channel.unsubscribe().receive("ok", () => alert("left!") )
|
|
559
|
+
*
|
|
560
|
+
* @category Realtime
|
|
561
|
+
*/
|
|
562
|
+
async unsubscribe(timeout = this.timeout) {
|
|
563
|
+
return new Promise((resolve) => {
|
|
564
|
+
this.channelAdapter
|
|
565
|
+
.unsubscribe(timeout)
|
|
566
|
+
.receive('ok', () => resolve('ok'))
|
|
567
|
+
.receive('timeout', () => resolve('timed out'))
|
|
568
|
+
.receive('error', () => resolve('error'));
|
|
569
|
+
});
|
|
570
|
+
}
|
|
571
|
+
/**
|
|
572
|
+
* Destroys and stops related timers.
|
|
573
|
+
*
|
|
574
|
+
* @category Realtime
|
|
575
|
+
*/
|
|
576
|
+
teardown() {
|
|
577
|
+
this.channelAdapter.teardown();
|
|
578
|
+
}
|
|
579
|
+
/** @internal */
|
|
580
|
+
async _fetchWithTimeout(url, options, timeout) {
|
|
581
|
+
const controller = new AbortController();
|
|
582
|
+
const id = setTimeout(() => controller.abort(), timeout);
|
|
583
|
+
const response = await this.socket.fetch(url, Object.assign(Object.assign({}, options), { signal: controller.signal }));
|
|
584
|
+
clearTimeout(id);
|
|
585
|
+
return response;
|
|
586
|
+
}
|
|
587
|
+
/** @internal */
|
|
588
|
+
_on(type, filter, callback) {
|
|
589
|
+
const typeLower = type.toLocaleLowerCase();
|
|
590
|
+
const ref = this.channelAdapter.on(type, callback);
|
|
591
|
+
const binding = {
|
|
592
|
+
type: typeLower,
|
|
593
|
+
filter: filter,
|
|
594
|
+
callback: callback,
|
|
595
|
+
ref: ref,
|
|
596
|
+
};
|
|
597
|
+
if (this.bindings[typeLower]) {
|
|
598
|
+
this.bindings[typeLower].push(binding);
|
|
599
|
+
}
|
|
600
|
+
else {
|
|
601
|
+
this.bindings[typeLower] = [binding];
|
|
602
|
+
}
|
|
603
|
+
this._updateFilterMessage();
|
|
604
|
+
return this;
|
|
605
|
+
}
|
|
606
|
+
/**
|
|
607
|
+
* Registers a callback that will be executed when the channel closes.
|
|
608
|
+
*
|
|
609
|
+
* @internal
|
|
610
|
+
*/
|
|
611
|
+
_onClose(callback) {
|
|
612
|
+
this.channelAdapter.onClose(callback);
|
|
613
|
+
}
|
|
614
|
+
/**
|
|
615
|
+
* Registers a callback that will be executed when the channel encounteres an error.
|
|
616
|
+
*
|
|
617
|
+
* @internal
|
|
618
|
+
*/
|
|
619
|
+
_onError(callback) {
|
|
620
|
+
this.channelAdapter.onError(callback);
|
|
621
|
+
}
|
|
622
|
+
/** @internal */
|
|
623
|
+
_updateFilterMessage() {
|
|
624
|
+
this.channelAdapter.updateFilterBindings((binding, payload, ref) => {
|
|
625
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
626
|
+
const typeLower = binding.event.toLocaleLowerCase();
|
|
627
|
+
if (this._notThisChannelEvent(typeLower, ref)) {
|
|
628
|
+
return false;
|
|
629
|
+
}
|
|
630
|
+
const bind = (_a = this.bindings[typeLower]) === null || _a === void 0 ? void 0 : _a.find((bind) => bind.ref === binding.ref);
|
|
631
|
+
if (!bind) {
|
|
632
|
+
return true;
|
|
633
|
+
}
|
|
634
|
+
if (['broadcast', 'presence', 'postgres_changes'].includes(typeLower)) {
|
|
635
|
+
if ('id' in bind) {
|
|
636
|
+
const bindId = bind.id;
|
|
637
|
+
const bindEvent = (_b = bind.filter) === null || _b === void 0 ? void 0 : _b.event;
|
|
638
|
+
return (bindId &&
|
|
639
|
+
((_c = payload.ids) === null || _c === void 0 ? void 0 : _c.includes(bindId)) &&
|
|
640
|
+
(bindEvent === '*' ||
|
|
641
|
+
(bindEvent === null || bindEvent === void 0 ? void 0 : bindEvent.toLocaleLowerCase()) === ((_d = payload.data) === null || _d === void 0 ? void 0 : _d.type.toLocaleLowerCase())));
|
|
642
|
+
}
|
|
643
|
+
else {
|
|
644
|
+
const bindEvent = (_f = (_e = bind === null || bind === void 0 ? void 0 : bind.filter) === null || _e === void 0 ? void 0 : _e.event) === null || _f === void 0 ? void 0 : _f.toLocaleLowerCase();
|
|
645
|
+
return bindEvent === '*' || bindEvent === ((_g = payload === null || payload === void 0 ? void 0 : payload.event) === null || _g === void 0 ? void 0 : _g.toLocaleLowerCase());
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
else {
|
|
649
|
+
return bind.type.toLocaleLowerCase() === typeLower;
|
|
650
|
+
}
|
|
651
|
+
});
|
|
652
|
+
}
|
|
653
|
+
/** @internal */
|
|
654
|
+
_notThisChannelEvent(event, ref) {
|
|
655
|
+
const { close, error, leave, join } = CHANNEL_EVENTS;
|
|
656
|
+
const events = [close, error, leave, join];
|
|
657
|
+
return ref && events.includes(event) && ref !== this.joinPush.ref;
|
|
658
|
+
}
|
|
659
|
+
/** @internal */
|
|
660
|
+
_updateFilterTransform() {
|
|
661
|
+
this.channelAdapter.updatePayloadTransform((event, payload, ref) => {
|
|
662
|
+
if (typeof payload === 'object' && 'ids' in payload) {
|
|
663
|
+
const postgresChanges = payload.data;
|
|
664
|
+
const { schema, table, commit_timestamp, type, errors } = postgresChanges;
|
|
665
|
+
const enrichedPayload = {
|
|
666
|
+
schema: schema,
|
|
667
|
+
table: table,
|
|
668
|
+
commit_timestamp: commit_timestamp,
|
|
669
|
+
eventType: type,
|
|
670
|
+
new: {},
|
|
671
|
+
old: {},
|
|
672
|
+
errors: errors,
|
|
673
|
+
};
|
|
674
|
+
return Object.assign(Object.assign({}, enrichedPayload), this._getPayloadRecords(postgresChanges));
|
|
675
|
+
}
|
|
676
|
+
return payload;
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
copyBindings(other) {
|
|
680
|
+
if (this.joinedOnce) {
|
|
681
|
+
throw new Error('cannot copy bindings into joined channel');
|
|
682
|
+
}
|
|
683
|
+
for (const kind in other.bindings) {
|
|
684
|
+
for (const binding of other.bindings[kind]) {
|
|
685
|
+
this._on(binding.type, binding.filter, binding.callback);
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
/**
|
|
690
|
+
* Compares two optional filter values for equality.
|
|
691
|
+
* Treats undefined, null, and empty string as equivalent empty values.
|
|
692
|
+
* @internal
|
|
693
|
+
*/
|
|
694
|
+
static isFilterValueEqual(serverValue, clientValue) {
|
|
695
|
+
const normalizedServer = serverValue !== null && serverValue !== void 0 ? serverValue : undefined;
|
|
696
|
+
const normalizedClient = clientValue !== null && clientValue !== void 0 ? clientValue : undefined;
|
|
697
|
+
return normalizedServer === normalizedClient;
|
|
698
|
+
}
|
|
699
|
+
/** @internal */
|
|
700
|
+
_getPayloadRecords(payload) {
|
|
701
|
+
const records = {
|
|
702
|
+
new: {},
|
|
703
|
+
old: {},
|
|
704
|
+
};
|
|
705
|
+
if (payload.type === 'INSERT' || payload.type === 'UPDATE') {
|
|
706
|
+
records.new = Transformers.convertChangeData(payload.columns, payload.record);
|
|
707
|
+
}
|
|
708
|
+
if (payload.type === 'UPDATE' || payload.type === 'DELETE') {
|
|
709
|
+
records.old = Transformers.convertChangeData(payload.columns, payload.old_record);
|
|
710
|
+
}
|
|
711
|
+
return records;
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
//# sourceMappingURL=RealtimeChannel.js.map
|