@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.
Files changed (546) hide show
  1. package/README.md +66 -0
  2. package/package.json +36 -0
  3. package/src/cli.js +176 -0
  4. package/templates/.claude/skills/connect/SKILL.md +169 -0
  5. package/templates/.claude/skills/load-slice/SKILL.md +86 -0
  6. package/templates/realtime-agent/node_modules/.package-lock.json +107 -0
  7. package/templates/realtime-agent/node_modules/@supabase/auth-js/LICENSE +21 -0
  8. package/templates/realtime-agent/node_modules/@supabase/auth-js/README.md +190 -0
  9. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.d.ts +4 -0
  10. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.d.ts.map +1 -0
  11. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.js +7 -0
  12. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.js.map +1 -0
  13. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthClient.d.ts +4 -0
  14. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthClient.d.ts.map +1 -0
  15. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthClient.js +7 -0
  16. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthClient.js.map +1 -0
  17. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.d.ts +716 -0
  18. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.d.ts.map +1 -0
  19. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.js +1108 -0
  20. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.js.map +1 -0
  21. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueClient.d.ts +2473 -0
  22. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueClient.d.ts.map +1 -0
  23. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueClient.js +5217 -0
  24. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueClient.js.map +1 -0
  25. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/index.d.ts +9 -0
  26. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/index.d.ts.map +1 -0
  27. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/index.js +20 -0
  28. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/index.js.map +1 -0
  29. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/base64url.d.ts +76 -0
  30. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/base64url.d.ts.map +1 -0
  31. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/base64url.js +269 -0
  32. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/base64url.js.map +1 -0
  33. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/constants.d.ts +26 -0
  34. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/constants.d.ts.map +1 -0
  35. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/constants.js +31 -0
  36. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/constants.js.map +1 -0
  37. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/error-codes.d.ts +7 -0
  38. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/error-codes.d.ts.map +1 -0
  39. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/error-codes.js +3 -0
  40. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/error-codes.js.map +1 -0
  41. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/errors.d.ts +258 -0
  42. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/errors.d.ts.map +1 -0
  43. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/errors.js +290 -0
  44. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/errors.js.map +1 -0
  45. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/fetch.d.ts +54 -0
  46. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/fetch.d.ts.map +1 -0
  47. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/fetch.js +200 -0
  48. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/fetch.js.map +1 -0
  49. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/helpers.d.ts +94 -0
  50. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/helpers.d.ts.map +1 -0
  51. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/helpers.js +406 -0
  52. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/helpers.js.map +1 -0
  53. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/local-storage.d.ts +9 -0
  54. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/local-storage.d.ts.map +1 -0
  55. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/local-storage.js +21 -0
  56. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/local-storage.js.map +1 -0
  57. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/locks.d.ts +107 -0
  58. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/locks.d.ts.map +1 -0
  59. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/locks.js +349 -0
  60. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/locks.js.map +1 -0
  61. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/polyfills.d.ts +5 -0
  62. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/polyfills.d.ts.map +1 -0
  63. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/polyfills.js +29 -0
  64. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/polyfills.js.map +1 -0
  65. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/types.d.ts +2498 -0
  66. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/types.d.ts.map +1 -0
  67. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/types.js +23 -0
  68. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/types.js.map +1 -0
  69. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/version.d.ts +2 -0
  70. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/version.d.ts.map +1 -0
  71. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/version.js +11 -0
  72. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/version.js.map +1 -0
  73. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.d.ts +96 -0
  74. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.d.ts.map +1 -0
  75. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.js +66 -0
  76. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.js.map +1 -0
  77. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/solana.d.ts +160 -0
  78. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/solana.d.ts.map +1 -0
  79. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/solana.js +4 -0
  80. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/solana.js.map +1 -0
  81. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.d.ts +284 -0
  82. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.d.ts.map +1 -0
  83. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.d.ts +583 -0
  84. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.d.ts.map +1 -0
  85. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.js +4 -0
  86. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.js.map +1 -0
  87. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.d.ts +85 -0
  88. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.d.ts.map +1 -0
  89. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.js +272 -0
  90. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.js.map +1 -0
  91. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.js +707 -0
  92. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.js.map +1 -0
  93. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.d.ts +4 -0
  94. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.d.ts.map +1 -0
  95. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.js +4 -0
  96. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.js.map +1 -0
  97. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthClient.d.ts +4 -0
  98. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthClient.d.ts.map +1 -0
  99. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthClient.js +4 -0
  100. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthClient.js.map +1 -0
  101. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.d.ts +716 -0
  102. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.d.ts.map +1 -0
  103. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.js +1105 -0
  104. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.js.map +1 -0
  105. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueClient.d.ts +2473 -0
  106. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueClient.d.ts.map +1 -0
  107. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueClient.js +5214 -0
  108. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueClient.js.map +1 -0
  109. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/index.d.ts +9 -0
  110. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/index.d.ts.map +1 -0
  111. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/index.js +9 -0
  112. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/index.js.map +1 -0
  113. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/base64url.d.ts +76 -0
  114. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/base64url.d.ts.map +1 -0
  115. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/base64url.js +257 -0
  116. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/base64url.js.map +1 -0
  117. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/constants.d.ts +26 -0
  118. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/constants.d.ts.map +1 -0
  119. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/constants.js +28 -0
  120. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/constants.js.map +1 -0
  121. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/error-codes.d.ts +7 -0
  122. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/error-codes.d.ts.map +1 -0
  123. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/error-codes.js +2 -0
  124. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/error-codes.js.map +1 -0
  125. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/errors.d.ts +258 -0
  126. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/errors.d.ts.map +1 -0
  127. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/errors.js +267 -0
  128. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/errors.js.map +1 -0
  129. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/fetch.d.ts +54 -0
  130. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/fetch.d.ts.map +1 -0
  131. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/fetch.js +190 -0
  132. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/fetch.js.map +1 -0
  133. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/helpers.d.ts +94 -0
  134. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/helpers.d.ts.map +1 -0
  135. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/helpers.js +378 -0
  136. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/helpers.js.map +1 -0
  137. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/local-storage.d.ts +9 -0
  138. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/local-storage.d.ts.map +1 -0
  139. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/local-storage.js +18 -0
  140. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/local-storage.js.map +1 -0
  141. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/locks.d.ts +107 -0
  142. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/locks.d.ts.map +1 -0
  143. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/locks.js +341 -0
  144. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/locks.js.map +1 -0
  145. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/polyfills.d.ts +5 -0
  146. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/polyfills.d.ts.map +1 -0
  147. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/polyfills.js +26 -0
  148. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/polyfills.js.map +1 -0
  149. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/types.d.ts +2498 -0
  150. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/types.d.ts.map +1 -0
  151. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/types.js +20 -0
  152. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/types.js.map +1 -0
  153. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/version.d.ts +2 -0
  154. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/version.d.ts.map +1 -0
  155. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/version.js +8 -0
  156. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/version.js.map +1 -0
  157. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/ethereum.d.ts +96 -0
  158. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/ethereum.d.ts.map +1 -0
  159. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/ethereum.js +60 -0
  160. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/ethereum.js.map +1 -0
  161. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/solana.d.ts +160 -0
  162. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/solana.d.ts.map +1 -0
  163. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/solana.js +3 -0
  164. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/solana.js.map +1 -0
  165. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.d.ts +284 -0
  166. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.d.ts.map +1 -0
  167. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.dom.d.ts +583 -0
  168. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.dom.d.ts.map +1 -0
  169. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.dom.js +3 -0
  170. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.dom.js.map +1 -0
  171. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.errors.d.ts +85 -0
  172. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.errors.d.ts.map +1 -0
  173. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.errors.js +264 -0
  174. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.errors.js.map +1 -0
  175. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.js +689 -0
  176. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.js.map +1 -0
  177. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/tsconfig.module.tsbuildinfo +1 -0
  178. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/tsconfig.tsbuildinfo +1 -0
  179. package/templates/realtime-agent/node_modules/@supabase/auth-js/package.json +44 -0
  180. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/AuthAdminApi.ts +5 -0
  181. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/AuthClient.ts +5 -0
  182. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/GoTrueAdminApi.ts +1267 -0
  183. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/GoTrueClient.ts +6360 -0
  184. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/index.ts +13 -0
  185. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/base64url.ts +308 -0
  186. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/constants.ts +34 -0
  187. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/error-codes.ts +90 -0
  188. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/errors.ts +359 -0
  189. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/fetch.ts +320 -0
  190. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/helpers.ts +476 -0
  191. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/local-storage.ts +21 -0
  192. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/locks.ts +420 -0
  193. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/polyfills.ts +23 -0
  194. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/types.ts +2917 -0
  195. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/version.ts +7 -0
  196. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/web3/ethereum.ts +184 -0
  197. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/web3/solana.ts +186 -0
  198. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/webauthn.dom.ts +636 -0
  199. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/webauthn.errors.ts +329 -0
  200. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/webauthn.ts +946 -0
  201. package/templates/realtime-agent/node_modules/@supabase/functions-js/README.md +134 -0
  202. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/FunctionsClient.d.ts +177 -0
  203. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/FunctionsClient.d.ts.map +1 -0
  204. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/FunctionsClient.js +309 -0
  205. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/FunctionsClient.js.map +1 -0
  206. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/helper.d.ts +3 -0
  207. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/helper.d.ts.map +1 -0
  208. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/helper.js +11 -0
  209. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/helper.js.map +1 -0
  210. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/index.d.ts +3 -0
  211. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/index.d.ts.map +1 -0
  212. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/index.js +12 -0
  213. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/index.js.map +1 -0
  214. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/types.d.ts +122 -0
  215. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/types.d.ts.map +1 -0
  216. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/types.js +98 -0
  217. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/types.js.map +1 -0
  218. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/version.d.ts +2 -0
  219. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/version.d.ts.map +1 -0
  220. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/version.js +11 -0
  221. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/version.js.map +1 -0
  222. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/FunctionsClient.d.ts +177 -0
  223. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/FunctionsClient.d.ts.map +1 -0
  224. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/FunctionsClient.js +305 -0
  225. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/FunctionsClient.js.map +1 -0
  226. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/helper.d.ts +3 -0
  227. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/helper.d.ts.map +1 -0
  228. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/helper.js +7 -0
  229. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/helper.js.map +1 -0
  230. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/index.d.ts +3 -0
  231. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/index.d.ts.map +1 -0
  232. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/index.js +3 -0
  233. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/index.js.map +1 -0
  234. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/types.d.ts +122 -0
  235. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/types.d.ts.map +1 -0
  236. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/types.js +91 -0
  237. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/types.js.map +1 -0
  238. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/version.d.ts +2 -0
  239. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/version.d.ts.map +1 -0
  240. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/version.js +8 -0
  241. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/version.js.map +1 -0
  242. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/tsconfig.module.tsbuildinfo +1 -0
  243. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/tsconfig.tsbuildinfo +1 -0
  244. package/templates/realtime-agent/node_modules/@supabase/functions-js/package.json +52 -0
  245. package/templates/realtime-agent/node_modules/@supabase/functions-js/src/FunctionsClient.ts +335 -0
  246. package/templates/realtime-agent/node_modules/@supabase/functions-js/src/edge-runtime.d.ts +214 -0
  247. package/templates/realtime-agent/node_modules/@supabase/functions-js/src/helper.ts +8 -0
  248. package/templates/realtime-agent/node_modules/@supabase/functions-js/src/index.ts +10 -0
  249. package/templates/realtime-agent/node_modules/@supabase/functions-js/src/types.ts +146 -0
  250. package/templates/realtime-agent/node_modules/@supabase/functions-js/src/version.ts +7 -0
  251. package/templates/realtime-agent/node_modules/@supabase/phoenix/LICENSE.md +22 -0
  252. package/templates/realtime-agent/node_modules/@supabase/phoenix/README.md +121 -0
  253. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/ajax.js +116 -0
  254. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/channel.js +331 -0
  255. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/constants.js +35 -0
  256. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/index.js +212 -0
  257. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/longpoll.js +192 -0
  258. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/presence.js +208 -0
  259. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/push.js +134 -0
  260. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/serializer.js +133 -0
  261. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/socket.js +756 -0
  262. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/timer.js +48 -0
  263. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/types.js +184 -0
  264. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/utils.js +16 -0
  265. package/templates/realtime-agent/node_modules/@supabase/phoenix/package.json +58 -0
  266. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/favicon.ico +0 -0
  267. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix-orange.png +0 -0
  268. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.cjs.js +1825 -0
  269. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.cjs.js.map +7 -0
  270. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.js +1847 -0
  271. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.min.js +2 -0
  272. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.mjs +1802 -0
  273. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.mjs.map +7 -0
  274. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.png +0 -0
  275. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/ajax.d.ts +10 -0
  276. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/ajax.d.ts.map +1 -0
  277. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/channel.d.ts +167 -0
  278. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/channel.d.ts.map +1 -0
  279. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/constants.d.ts +36 -0
  280. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/constants.d.ts.map +1 -0
  281. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/index.d.ts +10 -0
  282. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/index.d.ts.map +1 -0
  283. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/longpoll.d.ts +29 -0
  284. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/longpoll.d.ts.map +1 -0
  285. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/presence.d.ts +107 -0
  286. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/presence.d.ts.map +1 -0
  287. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/push.d.ts +70 -0
  288. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/push.d.ts.map +1 -0
  289. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/serializer.d.ts +74 -0
  290. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/serializer.d.ts.map +1 -0
  291. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/socket.d.ts +291 -0
  292. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/socket.d.ts.map +1 -0
  293. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/timer.d.ts +36 -0
  294. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/timer.d.ts.map +1 -0
  295. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/types.d.ts +280 -0
  296. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/types.d.ts.map +1 -0
  297. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/utils.d.ts +2 -0
  298. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/utils.d.ts.map +1 -0
  299. package/templates/realtime-agent/node_modules/@supabase/phoenix/tsconfig.json +20 -0
  300. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/README.md +213 -0
  301. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.cjs +5025 -0
  302. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.cjs.map +1 -0
  303. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.d.cts +3828 -0
  304. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.d.cts.map +1 -0
  305. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.d.mts +3828 -0
  306. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.d.mts.map +1 -0
  307. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.mjs +5017 -0
  308. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.mjs.map +1 -0
  309. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/package.json +69 -0
  310. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/PostgrestBuilder.ts +688 -0
  311. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/PostgrestClient.ts +447 -0
  312. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/PostgrestError.ts +41 -0
  313. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/PostgrestFilterBuilder.ts +2137 -0
  314. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/PostgrestQueryBuilder.ts +1703 -0
  315. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/PostgrestTransformBuilder.ts +981 -0
  316. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/constants.ts +2 -0
  317. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/index.ts +34 -0
  318. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/select-query-parser/parser.ts +476 -0
  319. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/select-query-parser/result.ts +550 -0
  320. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/select-query-parser/types.ts +129 -0
  321. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/select-query-parser/utils.ts +704 -0
  322. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/types/common/common.ts +83 -0
  323. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/types/common/rpc.ts +148 -0
  324. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/types/feature-flags.ts +17 -0
  325. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/types/types.ts +161 -0
  326. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/version.ts +7 -0
  327. package/templates/realtime-agent/node_modules/@supabase/realtime-js/README.md +326 -0
  328. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeChannel.d.ts +442 -0
  329. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeChannel.d.ts.map +1 -0
  330. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeChannel.js +719 -0
  331. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeChannel.js.map +1 -0
  332. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeClient.d.ts +275 -0
  333. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeClient.d.ts.map +1 -0
  334. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeClient.js +697 -0
  335. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeClient.js.map +1 -0
  336. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimePresence.d.ts +62 -0
  337. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimePresence.d.ts.map +1 -0
  338. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimePresence.js +43 -0
  339. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimePresence.js.map +1 -0
  340. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/index.d.ts +6 -0
  341. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/index.d.ts.map +1 -0
  342. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/index.js +18 -0
  343. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/index.js.map +1 -0
  344. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/constants.d.ts +43 -0
  345. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/constants.d.ts.map +1 -0
  346. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/constants.js +43 -0
  347. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/constants.js.map +1 -0
  348. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/normalizeChannelError.d.ts +10 -0
  349. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/normalizeChannelError.d.ts.map +1 -0
  350. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/normalizeChannelError.js +29 -0
  351. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/normalizeChannelError.js.map +1 -0
  352. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/serializer.d.ts +33 -0
  353. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/serializer.d.ts.map +1 -0
  354. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/serializer.js +155 -0
  355. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/serializer.js.map +1 -0
  356. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/transformers.d.ts +109 -0
  357. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/transformers.d.ts.map +1 -0
  358. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/transformers.js +241 -0
  359. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/transformers.js.map +1 -0
  360. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/version.d.ts +2 -0
  361. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/version.d.ts.map +1 -0
  362. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/version.js +11 -0
  363. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/version.js.map +1 -0
  364. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/websocket-factory.d.ts +82 -0
  365. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/websocket-factory.d.ts.map +1 -0
  366. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/websocket-factory.js +130 -0
  367. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/websocket-factory.js.map +1 -0
  368. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/channelAdapter.d.ts +32 -0
  369. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/channelAdapter.d.ts.map +1 -0
  370. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/channelAdapter.js +103 -0
  371. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/channelAdapter.js.map +1 -0
  372. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/presenceAdapter.d.ts +53 -0
  373. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/presenceAdapter.d.ts.map +1 -0
  374. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/presenceAdapter.js +93 -0
  375. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/presenceAdapter.js.map +1 -0
  376. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/socketAdapter.d.ts +38 -0
  377. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/socketAdapter.d.ts.map +1 -0
  378. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/socketAdapter.js +114 -0
  379. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/socketAdapter.js.map +1 -0
  380. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/types.d.ts +5 -0
  381. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/types.d.ts.map +1 -0
  382. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/types.js +3 -0
  383. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/types.js.map +1 -0
  384. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeChannel.d.ts +442 -0
  385. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeChannel.d.ts.map +1 -0
  386. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeChannel.js +714 -0
  387. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeChannel.js.map +1 -0
  388. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeClient.d.ts +275 -0
  389. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeClient.d.ts.map +1 -0
  390. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeClient.js +693 -0
  391. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeClient.js.map +1 -0
  392. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimePresence.d.ts +62 -0
  393. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimePresence.d.ts.map +1 -0
  394. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimePresence.js +38 -0
  395. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimePresence.js.map +1 -0
  396. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/index.d.ts +6 -0
  397. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/index.d.ts.map +1 -0
  398. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/index.js +6 -0
  399. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/index.js.map +1 -0
  400. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/constants.d.ts +43 -0
  401. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/constants.d.ts.map +1 -0
  402. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/constants.js +40 -0
  403. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/constants.js.map +1 -0
  404. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/normalizeChannelError.d.ts +10 -0
  405. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/normalizeChannelError.d.ts.map +1 -0
  406. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/normalizeChannelError.js +26 -0
  407. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/normalizeChannelError.js.map +1 -0
  408. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/serializer.d.ts +33 -0
  409. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/serializer.d.ts.map +1 -0
  410. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/serializer.js +152 -0
  411. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/serializer.js.map +1 -0
  412. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/transformers.d.ts +109 -0
  413. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/transformers.d.ts.map +1 -0
  414. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/transformers.js +229 -0
  415. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/transformers.js.map +1 -0
  416. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/version.d.ts +2 -0
  417. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/version.d.ts.map +1 -0
  418. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/version.js +8 -0
  419. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/version.js.map +1 -0
  420. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/websocket-factory.d.ts +82 -0
  421. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/websocket-factory.d.ts.map +1 -0
  422. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/websocket-factory.js +126 -0
  423. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/websocket-factory.js.map +1 -0
  424. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/channelAdapter.d.ts +32 -0
  425. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/channelAdapter.d.ts.map +1 -0
  426. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/channelAdapter.js +100 -0
  427. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/channelAdapter.js.map +1 -0
  428. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/presenceAdapter.d.ts +53 -0
  429. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/presenceAdapter.d.ts.map +1 -0
  430. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/presenceAdapter.js +90 -0
  431. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/presenceAdapter.js.map +1 -0
  432. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/socketAdapter.d.ts +38 -0
  433. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/socketAdapter.d.ts.map +1 -0
  434. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/socketAdapter.js +111 -0
  435. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/socketAdapter.js.map +1 -0
  436. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/types.d.ts +5 -0
  437. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/types.d.ts.map +1 -0
  438. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/types.js +2 -0
  439. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/types.js.map +1 -0
  440. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/tsconfig.module.tsbuildinfo +1 -0
  441. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/tsconfig.tsbuildinfo +1 -0
  442. package/templates/realtime-agent/node_modules/@supabase/realtime-js/package.json +58 -0
  443. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/RealtimeChannel.ts +1118 -0
  444. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/RealtimeClient.ts +868 -0
  445. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/RealtimePresence.ts +71 -0
  446. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/index.ts +53 -0
  447. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/lib/constants.ts +62 -0
  448. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/lib/normalizeChannelError.ts +30 -0
  449. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/lib/serializer.ts +203 -0
  450. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/lib/transformers.ts +270 -0
  451. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/lib/version.ts +7 -0
  452. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/lib/websocket-factory.ts +204 -0
  453. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/phoenix/channelAdapter.ts +149 -0
  454. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/phoenix/presenceAdapter.ts +116 -0
  455. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/phoenix/socketAdapter.ts +168 -0
  456. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/phoenix/types.ts +32 -0
  457. package/templates/realtime-agent/node_modules/@supabase/storage-js/README.md +1262 -0
  458. package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.cjs +2995 -0
  459. package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.cjs.map +1 -0
  460. package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.d.cts +2956 -0
  461. package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.d.cts.map +1 -0
  462. package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.d.mts +2956 -0
  463. package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.d.mts.map +1 -0
  464. package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.mjs +2979 -0
  465. package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.mjs.map +1 -0
  466. package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/umd/supabase.js +1 -0
  467. package/templates/realtime-agent/node_modules/@supabase/storage-js/package.json +62 -0
  468. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/StorageClient.ts +98 -0
  469. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/index.ts +19 -0
  470. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/common/BaseApiClient.ts +104 -0
  471. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/common/errors.ts +160 -0
  472. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/common/fetch.ts +303 -0
  473. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/common/headers.ts +43 -0
  474. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/common/helpers.ts +146 -0
  475. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/constants.ts +4 -0
  476. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/types.ts +654 -0
  477. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/version.ts +7 -0
  478. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/BlobDownloadBuilder.ts +62 -0
  479. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/StorageAnalyticsClient.ts +420 -0
  480. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/StorageBucketApi.ts +414 -0
  481. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/StorageFileApi.ts +1423 -0
  482. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/StorageVectorsClient.ts +644 -0
  483. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/StreamDownloadBuilder.ts +39 -0
  484. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/VectorBucketApi.ts +73 -0
  485. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/VectorDataApi.ts +98 -0
  486. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/VectorIndexApi.ts +90 -0
  487. package/templates/realtime-agent/node_modules/@supabase/supabase-js/README.md +238 -0
  488. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.cjs +89 -0
  489. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.cjs.map +1 -0
  490. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.d.cts +58 -0
  491. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.d.cts.map +1 -0
  492. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.d.mts +58 -0
  493. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.d.mts.map +1 -0
  494. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.mjs +88 -0
  495. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.mjs.map +1 -0
  496. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.cjs +660 -0
  497. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.cjs.map +1 -0
  498. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.d.cts +616 -0
  499. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.d.cts.map +1 -0
  500. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.d.mts +616 -0
  501. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.d.mts.map +1 -0
  502. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.mjs +607 -0
  503. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.mjs.map +1 -0
  504. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/umd/supabase.js +24 -0
  505. package/templates/realtime-agent/node_modules/@supabase/supabase-js/package.json +122 -0
  506. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/SupabaseClient.ts +625 -0
  507. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/cors.ts +84 -0
  508. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/index.ts +106 -0
  509. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/SupabaseAuthClient.ts +8 -0
  510. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/constants.ts +35 -0
  511. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/fetch.ts +36 -0
  512. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/helpers.ts +98 -0
  513. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/rest/types/common/common.ts +93 -0
  514. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/rest/types/common/rpc.ts +158 -0
  515. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/types.ts +196 -0
  516. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/version.ts +7 -0
  517. package/templates/realtime-agent/node_modules/iceberg-js/LICENSE +21 -0
  518. package/templates/realtime-agent/node_modules/iceberg-js/README.md +439 -0
  519. package/templates/realtime-agent/node_modules/iceberg-js/dist/index.cjs +596 -0
  520. package/templates/realtime-agent/node_modules/iceberg-js/dist/index.cjs.map +1 -0
  521. package/templates/realtime-agent/node_modules/iceberg-js/dist/index.d.cts +547 -0
  522. package/templates/realtime-agent/node_modules/iceberg-js/dist/index.d.ts +547 -0
  523. package/templates/realtime-agent/node_modules/iceberg-js/dist/index.mjs +587 -0
  524. package/templates/realtime-agent/node_modules/iceberg-js/dist/index.mjs.map +1 -0
  525. package/templates/realtime-agent/node_modules/iceberg-js/package.json +77 -0
  526. package/templates/realtime-agent/node_modules/tslib/CopyrightNotice.txt +15 -0
  527. package/templates/realtime-agent/node_modules/tslib/LICENSE.txt +12 -0
  528. package/templates/realtime-agent/node_modules/tslib/README.md +164 -0
  529. package/templates/realtime-agent/node_modules/tslib/SECURITY.md +41 -0
  530. package/templates/realtime-agent/node_modules/tslib/modules/index.d.ts +38 -0
  531. package/templates/realtime-agent/node_modules/tslib/modules/index.js +70 -0
  532. package/templates/realtime-agent/node_modules/tslib/modules/package.json +3 -0
  533. package/templates/realtime-agent/node_modules/tslib/package.json +47 -0
  534. package/templates/realtime-agent/node_modules/tslib/tslib.d.ts +460 -0
  535. package/templates/realtime-agent/node_modules/tslib/tslib.es6.html +1 -0
  536. package/templates/realtime-agent/node_modules/tslib/tslib.es6.js +402 -0
  537. package/templates/realtime-agent/node_modules/tslib/tslib.es6.mjs +401 -0
  538. package/templates/realtime-agent/node_modules/tslib/tslib.html +1 -0
  539. package/templates/realtime-agent/node_modules/tslib/tslib.js +484 -0
  540. package/templates/realtime-agent/package-lock.json +114 -0
  541. package/templates/realtime-agent/package.json +11 -0
  542. package/templates/realtime-agent/src/index.js +152 -0
  543. package/templates/root/AGENT.md +37 -0
  544. package/templates/root/model.md +1 -0
  545. package/templates/root/prompt.md +91 -0
  546. package/templates/root/ralph.sh +47 -0
@@ -0,0 +1,550 @@
1
+ import { Ast, ParseQuery } from './parser'
2
+ import {
3
+ AggregateFunctions,
4
+ ExtractFirstProperty,
5
+ GenericSchema,
6
+ IsNonEmptyArray,
7
+ Prettify,
8
+ TablesAndViews,
9
+ TypeScriptTypes,
10
+ ContainsNull,
11
+ GenericRelationship,
12
+ PostgreSQLTypes,
13
+ GenericTable,
14
+ ClientServerOptions,
15
+ } from './types'
16
+ import {
17
+ CheckDuplicateEmbededReference,
18
+ GetComputedFields,
19
+ GetFieldNodeResultName,
20
+ IsAny,
21
+ IsRelationNullable,
22
+ IsStringUnion,
23
+ JsonPathToType,
24
+ ResolveRelationship,
25
+ SelectQueryError,
26
+ } from './utils'
27
+ import type { SpreadOnManyEnabled } from '../types/feature-flags'
28
+
29
+ /**
30
+ * Main entry point for constructing the result type of a PostgREST query.
31
+ *
32
+ * @param Schema - Database schema.
33
+ * @param Row - The type of a row in the current table.
34
+ * @param RelationName - The name of the current table or view.
35
+ * @param Relationships - Relationships of the current table.
36
+ * @param Query - The select query string literal to parse.
37
+ */
38
+ export type GetResult<
39
+ Schema extends GenericSchema,
40
+ Row extends Record<string, unknown>,
41
+ RelationName,
42
+ Relationships,
43
+ Query extends string,
44
+ ClientOptions extends ClientServerOptions,
45
+ > =
46
+ IsAny<Schema> extends true
47
+ ? ParseQuery<Query> extends infer ParsedQuery
48
+ ? ParsedQuery extends Ast.Node[]
49
+ ? RelationName extends string
50
+ ? ProcessNodesWithoutSchema<ParsedQuery>
51
+ : any
52
+ : ParsedQuery
53
+ : any
54
+ : Relationships extends null // For .rpc calls the passed relationships will be null in that case, the result will always be the function return type
55
+ ? ParseQuery<Query> extends infer ParsedQuery
56
+ ? ParsedQuery extends Ast.Node[]
57
+ ? RPCCallNodes<ParsedQuery, RelationName extends string ? RelationName : 'rpc_call', Row>
58
+ : ParsedQuery
59
+ : Row
60
+ : ParseQuery<Query> extends infer ParsedQuery
61
+ ? ParsedQuery extends Ast.Node[]
62
+ ? RelationName extends string
63
+ ? Relationships extends GenericRelationship[]
64
+ ? ProcessNodes<ClientOptions, Schema, Row, RelationName, Relationships, ParsedQuery>
65
+ : SelectQueryError<'Invalid Relationships cannot infer result type'>
66
+ : SelectQueryError<'Invalid RelationName cannot infer result type'>
67
+ : ParsedQuery
68
+ : never
69
+
70
+ type ProcessSimpleFieldWithoutSchema<Field extends Ast.FieldNode> =
71
+ Field['aggregateFunction'] extends AggregateFunctions
72
+ ? {
73
+ // An aggregate function will always override the column name id.sum() will become sum
74
+ // except if it has been aliased
75
+ [K in GetFieldNodeResultName<Field>]: Field['castType'] extends PostgreSQLTypes
76
+ ? TypeScriptTypes<Field['castType']>
77
+ : number
78
+ }
79
+ : {
80
+ // Aliases override the property name in the result
81
+ [K in GetFieldNodeResultName<Field>]: Field['castType'] extends PostgreSQLTypes // We apply the detected casted as the result type
82
+ ? TypeScriptTypes<Field['castType']>
83
+ : any
84
+ }
85
+
86
+ type ProcessFieldNodeWithoutSchema<Node extends Ast.FieldNode> =
87
+ IsNonEmptyArray<Node['children']> extends true
88
+ ? {
89
+ [K in GetFieldNodeResultName<Node>]: Node['children'] extends Ast.Node[]
90
+ ? ProcessNodesWithoutSchema<Node['children']>[]
91
+ : ProcessSimpleFieldWithoutSchema<Node>
92
+ }
93
+ : ProcessSimpleFieldWithoutSchema<Node>
94
+
95
+ /**
96
+ * Processes a single Node without schema and returns the resulting TypeScript type.
97
+ */
98
+ type ProcessNodeWithoutSchema<Node extends Ast.Node> = Node extends Ast.StarNode
99
+ ? any
100
+ : Node extends Ast.SpreadNode
101
+ ? Node['target']['children'] extends Ast.StarNode[]
102
+ ? any
103
+ : Node['target']['children'] extends Ast.FieldNode[]
104
+ ? {
105
+ [P in Node['target']['children'][number] as GetFieldNodeResultName<P>]: P['castType'] extends PostgreSQLTypes
106
+ ? TypeScriptTypes<P['castType']>
107
+ : any
108
+ }
109
+ : any
110
+ : Node extends Ast.FieldNode
111
+ ? ProcessFieldNodeWithoutSchema<Node>
112
+ : any
113
+
114
+ /**
115
+ * Processes nodes when Schema is any, providing basic type inference
116
+ */
117
+ type ProcessNodesWithoutSchema<
118
+ Nodes extends Ast.Node[],
119
+ Acc extends Record<string, unknown> = {},
120
+ > = Nodes extends [infer FirstNode, ...infer RestNodes]
121
+ ? FirstNode extends Ast.Node
122
+ ? RestNodes extends Ast.Node[]
123
+ ? ProcessNodeWithoutSchema<FirstNode> extends infer FieldResult
124
+ ? FieldResult extends Record<string, unknown>
125
+ ? ProcessNodesWithoutSchema<RestNodes, Acc & FieldResult>
126
+ : FieldResult
127
+ : any
128
+ : any
129
+ : any
130
+ : Prettify<Acc>
131
+
132
+ /**
133
+ * Processes a single Node from a select chained after a rpc call
134
+ *
135
+ * @param Row - The type of a row in the current table.
136
+ * @param RelationName - The name of the current rpc function
137
+ * @param NodeType - The Node to process.
138
+ */
139
+ export type ProcessRPCNode<
140
+ Row extends Record<string, unknown>,
141
+ RelationName extends string,
142
+ NodeType extends Ast.Node,
143
+ > = NodeType['type'] extends Ast.StarNode['type'] // If the selection is *
144
+ ? Row
145
+ : NodeType['type'] extends Ast.FieldNode['type']
146
+ ? ProcessSimpleField<Row, RelationName, Extract<NodeType, Ast.FieldNode>>
147
+ : SelectQueryError<'RPC Unsupported node type.'>
148
+
149
+ /**
150
+ * Process select call that can be chained after an rpc call
151
+ */
152
+ export type RPCCallNodes<
153
+ Nodes extends Ast.Node[],
154
+ RelationName extends string,
155
+ Row extends Record<string, unknown>,
156
+ Acc extends Record<string, unknown> = {}, // Acc is now an object
157
+ > = Nodes extends [infer FirstNode, ...infer RestNodes]
158
+ ? FirstNode extends Ast.Node
159
+ ? RestNodes extends Ast.Node[]
160
+ ? ProcessRPCNode<Row, RelationName, FirstNode> extends infer FieldResult
161
+ ? FieldResult extends Record<string, unknown>
162
+ ? RPCCallNodes<RestNodes, RelationName, Row, Acc & FieldResult>
163
+ : FieldResult extends SelectQueryError<infer E>
164
+ ? SelectQueryError<E>
165
+ : SelectQueryError<'Could not retrieve a valid record or error value'>
166
+ : SelectQueryError<'Processing node failed.'>
167
+ : SelectQueryError<'Invalid rest nodes array in RPC call'>
168
+ : SelectQueryError<'Invalid first node in RPC call'>
169
+ : Prettify<Acc>
170
+
171
+ /**
172
+ * Recursively processes an array of Nodes and accumulates the resulting TypeScript type.
173
+ *
174
+ * @param Schema - Database schema.
175
+ * @param Row - The type of a row in the current table.
176
+ * @param RelationName - The name of the current table or view.
177
+ * @param Relationships - Relationships of the current table.
178
+ * @param Nodes - An array of AST nodes to process.
179
+ * @param Acc - Accumulator for the constructed type.
180
+ */
181
+ export type ProcessNodes<
182
+ ClientOptions extends ClientServerOptions,
183
+ Schema extends GenericSchema,
184
+ Row extends Record<string, unknown>,
185
+ RelationName extends string,
186
+ Relationships extends GenericRelationship[],
187
+ Nodes extends Ast.Node[],
188
+ Acc extends Record<string, unknown> = {}, // Acc is now an object
189
+ > =
190
+ CheckDuplicateEmbededReference<Schema, RelationName, Relationships, Nodes> extends false
191
+ ? Nodes extends [infer FirstNode, ...infer RestNodes]
192
+ ? FirstNode extends Ast.Node
193
+ ? RestNodes extends Ast.Node[]
194
+ ? ProcessNode<
195
+ ClientOptions,
196
+ Schema,
197
+ Row,
198
+ RelationName,
199
+ Relationships,
200
+ FirstNode
201
+ > extends infer FieldResult
202
+ ? FieldResult extends Record<string, unknown>
203
+ ? ProcessNodes<
204
+ ClientOptions,
205
+ Schema,
206
+ Row,
207
+ RelationName,
208
+ Relationships,
209
+ RestNodes,
210
+ // TODO:
211
+ // This SHOULD be `Omit<Acc, keyof FieldResult> & FieldResult` since in the case where the key
212
+ // is present in the Acc already, the intersection will create bad intersection types
213
+ // (eg: `{ a: number } & { a: { property } }` will become `{ a: number & { property } }`)
214
+ // but using Omit here explode the inference complexity resulting in "infinite recursion error" from typescript
215
+ // very early (see: 'Check that selecting many fields doesn't yield an possibly infinite recursion error') test
216
+ // in this case we can't get above ~10 fields before reaching the recursion error
217
+ // If someone find a better way to do this, please do it !
218
+ // It'll also allow to fix those two tests:
219
+ // - `'join over a 1-M relation with both nullables and non-nullables fields using column name hinting on nested relation'`
220
+ // - `'self reference relation via column''`
221
+ Acc & FieldResult
222
+ >
223
+ : FieldResult extends SelectQueryError<infer E>
224
+ ? SelectQueryError<E>
225
+ : SelectQueryError<'Could not retrieve a valid record or error value'>
226
+ : SelectQueryError<'Processing node failed.'>
227
+ : SelectQueryError<'Invalid rest nodes array type in ProcessNodes'>
228
+ : SelectQueryError<'Invalid first node type in ProcessNodes'>
229
+ : Prettify<Acc>
230
+ : Prettify<CheckDuplicateEmbededReference<Schema, RelationName, Relationships, Nodes>>
231
+
232
+ /**
233
+ * Processes a single Node and returns the resulting TypeScript type.
234
+ *
235
+ * @param Schema - Database schema.
236
+ * @param Row - The type of a row in the current table.
237
+ * @param RelationName - The name of the current table or view.
238
+ * @param Relationships - Relationships of the current table.
239
+ * @param NodeType - The Node to process.
240
+ */
241
+ export type ProcessNode<
242
+ ClientOptions extends ClientServerOptions,
243
+ Schema extends GenericSchema,
244
+ Row extends Record<string, unknown>,
245
+ RelationName extends string,
246
+ Relationships extends GenericRelationship[],
247
+ NodeType extends Ast.Node,
248
+ > =
249
+ // TODO: figure out why comparing the `type` property is necessary vs. `NodeType extends Ast.StarNode`
250
+ NodeType['type'] extends Ast.StarNode['type'] // If the selection is *
251
+ ? // If the row has computed field, postgrest will omit them from star selection per default
252
+ GetComputedFields<Schema, RelationName> extends never
253
+ ? // If no computed fields are detected on the row, we can return it as is
254
+ Row
255
+ : // otherwise we omit all the computed field from the star result return
256
+ Omit<Row, GetComputedFields<Schema, RelationName>>
257
+ : NodeType['type'] extends Ast.SpreadNode['type'] // If the selection is a ...spread
258
+ ? ProcessSpreadNode<
259
+ ClientOptions,
260
+ Schema,
261
+ Row,
262
+ RelationName,
263
+ Relationships,
264
+ Extract<NodeType, Ast.SpreadNode>
265
+ >
266
+ : NodeType['type'] extends Ast.FieldNode['type']
267
+ ? ProcessFieldNode<
268
+ ClientOptions,
269
+ Schema,
270
+ Row,
271
+ RelationName,
272
+ Relationships,
273
+ Extract<NodeType, Ast.FieldNode>
274
+ >
275
+ : SelectQueryError<'Unsupported node type.'>
276
+
277
+ /**
278
+ * Processes a FieldNode and returns the resulting TypeScript type.
279
+ *
280
+ * @param Schema - Database schema.
281
+ * @param Row - The type of a row in the current table.
282
+ * @param RelationName - The name of the current table or view.
283
+ * @param Relationships - Relationships of the current table.
284
+ * @param Field - The FieldNode to process.
285
+ */
286
+ type ProcessFieldNode<
287
+ ClientOptions extends ClientServerOptions,
288
+ Schema extends GenericSchema,
289
+ Row extends Record<string, unknown>,
290
+ RelationName extends string,
291
+ Relationships extends GenericRelationship[],
292
+ Field extends Ast.FieldNode,
293
+ > = Field['children'] extends []
294
+ ? // Empty `()` — could be a scalar computed column (e.g. `user_count()`).
295
+ // Route through ProcessEmbeddedResource so the scalar path returns the correct
296
+ // primitive type. For non-scalar embedded resources with empty selection,
297
+ // ProcessEmbeddedResource returns {} (no contribution to result type).
298
+ ProcessEmbeddedResource<ClientOptions, Schema, Relationships, Field, RelationName>
299
+ : IsNonEmptyArray<Field['children']> extends true // Has embedded resource?
300
+ ? ProcessEmbeddedResource<ClientOptions, Schema, Relationships, Field, RelationName>
301
+ : ProcessSimpleField<Row, RelationName, Field>
302
+
303
+ type ResolveJsonPathType<
304
+ Value,
305
+ Path extends string | undefined,
306
+ CastType extends PostgreSQLTypes,
307
+ > = Path extends string
308
+ ? JsonPathToType<Value, Path> extends never
309
+ ? // Always fallback if JsonPathToType returns never
310
+ TypeScriptTypes<CastType>
311
+ : JsonPathToType<Value, Path> extends infer PathResult
312
+ ? PathResult extends string
313
+ ? // Use the result if it's a string as we know that even with the string accessor ->> it's a valid type
314
+ PathResult
315
+ : IsStringUnion<PathResult> extends true
316
+ ? // Use the result if it's a union of strings
317
+ PathResult
318
+ : CastType extends 'json'
319
+ ? // If the type is not a string, ensure it was accessed with json accessor ->
320
+ PathResult
321
+ : // Otherwise it means non-string value accessed with string accessor ->> use the TypeScriptTypes result
322
+ TypeScriptTypes<CastType>
323
+ : TypeScriptTypes<CastType>
324
+ : // No json path, use regular type casting
325
+ TypeScriptTypes<CastType>
326
+
327
+ /**
328
+ * Processes a simple field (without embedded resources).
329
+ *
330
+ * @param Row - The type of a row in the current table.
331
+ * @param RelationName - The name of the current table or view.
332
+ * @param Field - The FieldNode to process.
333
+ */
334
+ type ProcessSimpleField<
335
+ Row extends Record<string, unknown>,
336
+ RelationName extends string,
337
+ Field extends Ast.FieldNode,
338
+ > = Field['name'] extends keyof Row | 'count'
339
+ ? Field['aggregateFunction'] extends AggregateFunctions
340
+ ? {
341
+ // An aggregate function will always override the column name id.sum() will become sum
342
+ // except if it has been aliased
343
+ [K in GetFieldNodeResultName<Field>]: Field['castType'] extends PostgreSQLTypes
344
+ ? TypeScriptTypes<Field['castType']>
345
+ : number
346
+ }
347
+ : {
348
+ // Aliases override the property name in the result
349
+ [K in GetFieldNodeResultName<Field>]: Field['castType'] extends PostgreSQLTypes
350
+ ? ResolveJsonPathType<Row[Field['name']], Field['jsonPath'], Field['castType']>
351
+ : Row[Field['name']]
352
+ }
353
+ : SelectQueryError<`column '${Field['name']}' does not exist on '${RelationName}'.`>
354
+
355
+ /**
356
+ * Processes an embedded resource (relation).
357
+ *
358
+ * @param Schema - Database schema.
359
+ * @param Row - The type of a row in the current table.
360
+ * @param RelationName - The name of the current table or view.
361
+ * @param Relationships - Relationships of the current table.
362
+ * @param Field - The FieldNode to process.
363
+ */
364
+ export type ProcessEmbeddedResource<
365
+ ClientOptions extends ClientServerOptions,
366
+ Schema extends GenericSchema,
367
+ Relationships extends GenericRelationship[],
368
+ Field extends Ast.FieldNode,
369
+ CurrentTableOrView extends keyof TablesAndViews<Schema> & string,
370
+ > =
371
+ ResolveRelationship<Schema, Relationships, Field, CurrentTableOrView> extends infer Resolved
372
+ ? Resolved extends {
373
+ scalarType: infer ScalarType
374
+ relation: { isSetofReturn?: boolean; isNotNullable?: boolean }
375
+ }
376
+ ? // Scalar computed column: bypass ProcessNodes and return the primitive type directly.
377
+ {
378
+ [K in GetFieldNodeResultName<Field>]: Resolved['relation']['isSetofReturn'] extends true
379
+ ? ScalarType
380
+ : Resolved['relation']['isNotNullable'] extends true
381
+ ? ScalarType
382
+ : ScalarType | null
383
+ }
384
+ : Resolved extends {
385
+ referencedTable: Pick<GenericTable, 'Row' | 'Relationships'>
386
+ relation: GenericRelationship & { match: 'refrel' | 'col' | 'fkname' | 'func' }
387
+ direction: string
388
+ }
389
+ ? Field['children'] extends []
390
+ ? // Empty `()` on a regular table embed — no fields selected, contribute nothing.
391
+ // This preserves the prior behavior: `users()` does not add a `users` key to the result.
392
+ {}
393
+ : ProcessEmbeddedResourceResult<
394
+ ClientOptions,
395
+ Schema,
396
+ Resolved,
397
+ Field,
398
+ CurrentTableOrView
399
+ >
400
+ : // Otherwise the Resolved is a SelectQueryError return it
401
+ { [K in GetFieldNodeResultName<Field>]: Resolved }
402
+ : {
403
+ [K in GetFieldNodeResultName<Field>]: SelectQueryError<'Failed to resolve relationship.'> &
404
+ string
405
+ }
406
+
407
+ /**
408
+ * Helper type to process the result of an embedded resource.
409
+ */
410
+ type ProcessEmbeddedResourceResult<
411
+ ClientOptions extends ClientServerOptions,
412
+ Schema extends GenericSchema,
413
+ Resolved extends {
414
+ referencedTable: Pick<GenericTable, 'Row' | 'Relationships'>
415
+ relation: GenericRelationship & {
416
+ match: 'refrel' | 'col' | 'fkname' | 'func'
417
+ isNotNullable?: boolean
418
+ referencedRelation: string
419
+ isSetofReturn?: boolean
420
+ }
421
+ direction: string
422
+ },
423
+ Field extends Ast.FieldNode,
424
+ CurrentTableOrView extends keyof TablesAndViews<Schema>,
425
+ > =
426
+ ProcessNodes<
427
+ ClientOptions,
428
+ Schema,
429
+ Resolved['referencedTable']['Row'],
430
+ // For embeded function selection, the source of truth is the 'referencedRelation'
431
+ // coming from the SetofOptions.to parameter
432
+ Resolved['relation']['match'] extends 'func'
433
+ ? Resolved['relation']['referencedRelation']
434
+ : Field['name'],
435
+ Resolved['referencedTable']['Relationships'],
436
+ Field['children'] extends undefined
437
+ ? []
438
+ : Exclude<Field['children'], undefined> extends Ast.Node[]
439
+ ? Exclude<Field['children'], undefined>
440
+ : []
441
+ > extends infer ProcessedChildren
442
+ ? {
443
+ [K in GetFieldNodeResultName<Field>]: Resolved['direction'] extends 'forward'
444
+ ? Field extends { innerJoin: true }
445
+ ? Resolved['relation']['isOneToOne'] extends true
446
+ ? ProcessedChildren
447
+ : ProcessedChildren[]
448
+ : Resolved['relation']['isOneToOne'] extends true
449
+ ? Resolved['relation']['match'] extends 'func'
450
+ ? Resolved['relation']['isNotNullable'] extends true
451
+ ? Resolved['relation']['isSetofReturn'] extends true
452
+ ? ProcessedChildren
453
+ : // TODO: This shouldn't be necessary but is due in an inconsitency in PostgREST v12/13 where if a function
454
+ // is declared with RETURNS <table-name> instead of RETURNS SETOF <table-name> ROWS 1
455
+ // In case where there is no object matching the relations, the object will be returned with all the properties within it
456
+ // set to null, we mimic this buggy behavior for type safety an issue is opened on postgREST here:
457
+ // https://github.com/PostgREST/postgrest/issues/4234
458
+ { [P in keyof ProcessedChildren]: ProcessedChildren[P] | null }
459
+ : ProcessedChildren | null
460
+ : ProcessedChildren | null
461
+ : ProcessedChildren[]
462
+ : // If the relation is a self-reference it'll always be considered as reverse relationship
463
+ Resolved['relation']['referencedRelation'] extends CurrentTableOrView
464
+ ? // It can either be a reverse reference via a column inclusion (eg: parent_id(*))
465
+ // in such case the result will be a single object
466
+ Resolved['relation']['match'] extends 'col'
467
+ ? IsRelationNullable<
468
+ TablesAndViews<Schema>[CurrentTableOrView],
469
+ Resolved['relation']
470
+ > extends true
471
+ ? ProcessedChildren | null
472
+ : ProcessedChildren
473
+ : // Or it can be a reference via the reference relation (eg: collections(*))
474
+ // in such case, the result will be an array of all the values (all collection with parent_id being the current id)
475
+ ProcessedChildren[]
476
+ : // Otherwise if it's a non self-reference reverse relationship it's a single object
477
+ IsRelationNullable<
478
+ TablesAndViews<Schema>[CurrentTableOrView],
479
+ Resolved['relation']
480
+ > extends true
481
+ ? Field extends { innerJoin: true }
482
+ ? ProcessedChildren
483
+ : ProcessedChildren | null
484
+ : ProcessedChildren
485
+ }
486
+ : {
487
+ [K in GetFieldNodeResultName<Field>]: SelectQueryError<'Failed to process embedded resource nodes.'> &
488
+ string
489
+ }
490
+
491
+ /**
492
+ * Processes a SpreadNode by processing its target node.
493
+ *
494
+ * @param Schema - Database schema.
495
+ * @param Row - The type of a row in the current table.
496
+ * @param RelationName - The name of the current table or view.
497
+ * @param Relationships - Relationships of the current table.
498
+ * @param Spread - The SpreadNode to process.
499
+ */
500
+ type ProcessSpreadNode<
501
+ ClientOptions extends ClientServerOptions,
502
+ Schema extends GenericSchema,
503
+ Row extends Record<string, unknown>,
504
+ RelationName extends string,
505
+ Relationships extends GenericRelationship[],
506
+ Spread extends Ast.SpreadNode,
507
+ > =
508
+ ProcessNode<
509
+ ClientOptions,
510
+ Schema,
511
+ Row,
512
+ RelationName,
513
+ Relationships,
514
+ Spread['target']
515
+ > extends infer Result
516
+ ? Result extends SelectQueryError<infer E>
517
+ ? SelectQueryError<E>
518
+ : ExtractFirstProperty<Result> extends unknown[]
519
+ ? SpreadOnManyEnabled<ClientOptions['PostgrestVersion']> extends true // Spread over an many-to-many relationship, turn all the result fields into correlated arrays
520
+ ? ProcessManyToManySpreadNodeResult<Result>
521
+ : {
522
+ [K in Spread['target']['name']]: SelectQueryError<`"${RelationName}" and "${Spread['target']['name']}" do not form a many-to-one or one-to-one relationship spread not possible`>
523
+ }
524
+ : ProcessSpreadNodeResult<Result>
525
+ : never
526
+
527
+ /**
528
+ * Helper type to process the result of a many-to-many spread node.
529
+ * Converts all fields in the spread object into arrays.
530
+ */
531
+ type ProcessManyToManySpreadNodeResult<Result> =
532
+ Result extends Record<string, SelectQueryError<string> | null>
533
+ ? Result
534
+ : ExtractFirstProperty<Result> extends infer SpreadedObject
535
+ ? SpreadedObject extends Array<Record<string, unknown>>
536
+ ? { [K in keyof SpreadedObject[number]]: Array<SpreadedObject[number][K]> }
537
+ : SelectQueryError<'An error occurred spreading the many-to-many object'>
538
+ : SelectQueryError<'An error occurred spreading the many-to-many object'>
539
+
540
+ /**
541
+ * Helper type to process the result of a spread node.
542
+ */
543
+ type ProcessSpreadNodeResult<Result> =
544
+ Result extends Record<string, SelectQueryError<string> | null>
545
+ ? Result
546
+ : ExtractFirstProperty<Result> extends infer SpreadedObject
547
+ ? ContainsNull<SpreadedObject> extends true
548
+ ? Exclude<{ [K in keyof SpreadedObject]: SpreadedObject[K] | null }, null>
549
+ : Exclude<{ [K in keyof SpreadedObject]: SpreadedObject[K] }, null>
550
+ : SelectQueryError<'An error occurred spreading the object'>
@@ -0,0 +1,129 @@
1
+ import type {
2
+ GenericRelationship,
3
+ GenericSchema,
4
+ GenericTable,
5
+ ClientServerOptions,
6
+ GenericSetofOption,
7
+ GenericFunction,
8
+ } from '../types/common/common'
9
+ import type { Prettify } from '../types/types'
10
+
11
+ export type {
12
+ GenericRelationship,
13
+ GenericSchema,
14
+ GenericTable,
15
+ ClientServerOptions,
16
+ GenericSetofOption,
17
+ Prettify,
18
+ GenericFunction,
19
+ }
20
+
21
+ export type AggregateWithoutColumnFunctions = 'count'
22
+
23
+ export type AggregateWithColumnFunctions =
24
+ | 'sum'
25
+ | 'avg'
26
+ | 'min'
27
+ | 'max'
28
+ | AggregateWithoutColumnFunctions
29
+
30
+ export type AggregateFunctions = AggregateWithColumnFunctions
31
+
32
+ export type Json =
33
+ | string
34
+ | number
35
+ | boolean
36
+ | null
37
+ | {
38
+ [key: string]: Json | undefined
39
+ }
40
+ | Json[]
41
+
42
+ type PostgresSQLNumberTypes = 'int2' | 'int4' | 'int8' | 'float4' | 'float8' | 'numeric'
43
+
44
+ type PostgresSQLStringTypes =
45
+ | 'bytea'
46
+ | 'bpchar'
47
+ | 'varchar'
48
+ | 'date'
49
+ | 'text'
50
+ | 'citext'
51
+ | 'time'
52
+ | 'timetz'
53
+ | 'timestamp'
54
+ | 'timestamptz'
55
+ | 'uuid'
56
+ | 'vector'
57
+
58
+ type SingleValuePostgreSQLTypes =
59
+ | PostgresSQLNumberTypes
60
+ | PostgresSQLStringTypes
61
+ | 'bool'
62
+ | 'json'
63
+ | 'jsonb'
64
+ | 'void'
65
+ | 'record'
66
+ | string
67
+
68
+ type ArrayPostgreSQLTypes = `_${SingleValuePostgreSQLTypes}`
69
+
70
+ type TypeScriptSingleValueTypes<T extends SingleValuePostgreSQLTypes> = T extends 'bool'
71
+ ? boolean
72
+ : T extends PostgresSQLNumberTypes
73
+ ? number
74
+ : T extends PostgresSQLStringTypes
75
+ ? string
76
+ : T extends 'json' | 'jsonb'
77
+ ? Json
78
+ : T extends 'void'
79
+ ? undefined
80
+ : T extends 'record'
81
+ ? Record<string, unknown>
82
+ : unknown
83
+
84
+ type StripUnderscore<T extends string> = T extends `_${infer U}` ? U : T
85
+
86
+ // Represents all possible PostgreSQL types, including array types, allow for custom types with 'string' in union
87
+ export type PostgreSQLTypes = SingleValuePostgreSQLTypes | ArrayPostgreSQLTypes
88
+
89
+ // Helper type to convert PostgreSQL types to their TypeScript equivalents
90
+ export type TypeScriptTypes<T extends PostgreSQLTypes> = T extends ArrayPostgreSQLTypes
91
+ ? TypeScriptSingleValueTypes<StripUnderscore<Extract<T, SingleValuePostgreSQLTypes>>>[]
92
+ : TypeScriptSingleValueTypes<T>
93
+
94
+ // Utility types for working with unions
95
+ export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (
96
+ k: infer I
97
+ ) => void
98
+ ? I
99
+ : never
100
+
101
+ export type LastOf<T> =
102
+ UnionToIntersection<T extends any ? () => T : never> extends () => infer R ? R : never
103
+
104
+ export type Push<T extends any[], V> = [...T, V]
105
+
106
+ // Converts a union type to a tuple type
107
+ export type UnionToTuple<T, L = LastOf<T>, N = [T] extends [never] ? true : false> = N extends true
108
+ ? []
109
+ : Push<UnionToTuple<Exclude<T, L>>, L>
110
+
111
+ export type UnionToArray<T> = UnionToTuple<T>
112
+
113
+ // Extracts the type of the first property in an object type
114
+ export type ExtractFirstProperty<T> = T extends { [K in keyof T]: infer U } ? U : never
115
+
116
+ // Type predicates
117
+ export type ContainsNull<T> = null extends T ? true : false
118
+
119
+ export type IsNonEmptyArray<T> =
120
+ Exclude<T, undefined> extends readonly [unknown, ...unknown[]] ? true : false
121
+
122
+ // Types for working with database schemas
123
+ export type TablesAndViews<Schema extends GenericSchema> = Schema['Tables'] &
124
+ Exclude<Schema['Views'], ''>
125
+
126
+ export type GetTableRelationships<
127
+ Schema extends GenericSchema,
128
+ Tname extends string,
129
+ > = TablesAndViews<Schema>[Tname] extends { Relationships: infer R } ? R : false