@aurabase/aurabase-js 0.3.0 → 0.3.1

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 (258) hide show
  1. package/package.json +4 -4
  2. package/packages/ai/node_modules/.bin/esbuild +0 -19
  3. package/packages/ai/node_modules/.bin/tsc +0 -22
  4. package/packages/ai/node_modules/.bin/tsserver +0 -22
  5. package/packages/ai/node_modules/.bin/tsup +0 -22
  6. package/packages/ai/node_modules/.bin/tsup-node +0 -22
  7. package/packages/ai/node_modules/.bin/vite +0 -22
  8. package/packages/ai/node_modules/.bin/vitest +0 -22
  9. package/packages/ai/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
  10. package/packages/ai/src/AiService.ts +0 -226
  11. package/packages/ai/src/index.ts +0 -18
  12. package/packages/ai/src/sse.ts +0 -141
  13. package/packages/ai/src/types.ts +0 -30
  14. package/packages/ai/tests/chat-stream.test.ts +0 -151
  15. package/packages/ai/tests/rag-namespaces.test.ts +0 -54
  16. package/packages/ai/tests/sse.test.ts +0 -69
  17. package/packages/ai/tsconfig.json +0 -5
  18. package/packages/ai/tsup.config.ts +0 -11
  19. package/packages/aurabase/node_modules/.bin/esbuild +0 -19
  20. package/packages/aurabase/node_modules/.bin/tsc +0 -22
  21. package/packages/aurabase/node_modules/.bin/tsserver +0 -22
  22. package/packages/aurabase/node_modules/.bin/tsup +0 -22
  23. package/packages/aurabase/node_modules/.bin/tsup-node +0 -22
  24. package/packages/aurabase/node_modules/.bin/vite +0 -22
  25. package/packages/aurabase/node_modules/.bin/vitest +0 -22
  26. package/packages/aurabase/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
  27. package/packages/aurabase/src/AuraClient.ts +0 -237
  28. package/packages/aurabase/src/index.ts +0 -152
  29. package/packages/aurabase/src/ssr.ts +0 -156
  30. package/packages/aurabase/tests/ai-streaming-rag-e2e.test.ts +0 -82
  31. package/packages/aurabase/tests/ai.test.ts +0 -111
  32. package/packages/aurabase/tests/auth-admin.test.ts +0 -515
  33. package/packages/aurabase/tests/auth-e2e.test.ts +0 -135
  34. package/packages/aurabase/tests/auth-hardening.test.ts +0 -206
  35. package/packages/aurabase/tests/auth.test.ts +0 -947
  36. package/packages/aurabase/tests/database.test.ts +0 -230
  37. package/packages/aurabase/tests/db-types-e2e.test.ts +0 -217
  38. package/packages/aurabase/tests/dispose.test.ts +0 -23
  39. package/packages/aurabase/tests/foreign-token.e2e.test.ts +0 -129
  40. package/packages/aurabase/tests/functions.test.ts +0 -107
  41. package/packages/aurabase/tests/integration.test.ts +0 -413
  42. package/packages/aurabase/tests/live-production-validation.js +0 -241
  43. package/packages/aurabase/tests/live-sdk-production-validation.js +0 -293
  44. package/packages/aurabase/tests/mocks.ts +0 -139
  45. package/packages/aurabase/tests/notifications.test.ts +0 -314
  46. package/packages/aurabase/tests/observability-backup.test.ts +0 -186
  47. package/packages/aurabase/tests/observability-hook.test.ts +0 -130
  48. package/packages/aurabase/tests/production-robustness.test.ts +0 -268
  49. package/packages/aurabase/tests/public-api-surface.test.ts +0 -53
  50. package/packages/aurabase/tests/query-builder.test.ts +0 -329
  51. package/packages/aurabase/tests/readme-smoke-e2e.test.ts +0 -231
  52. package/packages/aurabase/tests/realtime-filter-e2e.test.ts +0 -344
  53. package/packages/aurabase/tests/refresh-locks.test.ts +0 -210
  54. package/packages/aurabase/tests/retry-option.test.ts +0 -17
  55. package/packages/aurabase/tests/rpc-e2e.test.ts +0 -254
  56. package/packages/aurabase/tests/rs256-local-e2e.test.ts +0 -114
  57. package/packages/aurabase/tests/rt-alias-public-e2e.test.ts +0 -235
  58. package/packages/aurabase/tests/rt-http-broadcast-e2e.test.ts +0 -124
  59. package/packages/aurabase/tests/service-role-guard.test.ts +0 -99
  60. package/packages/aurabase/tests/ssr.test.ts +0 -91
  61. package/packages/aurabase/tests/storage-backend-e2e.test.ts +0 -481
  62. package/packages/aurabase/tests/storage-sdk-parity-e2e.test.ts +0 -104
  63. package/packages/aurabase/tests/storage-transform-e2e.test.ts +0 -684
  64. package/packages/aurabase/tests/storage.test.ts +0 -55
  65. package/packages/aurabase/tests/types/client-generic.test-d.ts +0 -79
  66. package/packages/aurabase/tests/types/docs-snippets.test-d.ts +0 -571
  67. package/packages/aurabase/tests/types/error-code.test-d.ts +0 -53
  68. package/packages/aurabase/tsconfig.json +0 -5
  69. package/packages/aurabase/tsconfig.test-d.json +0 -5
  70. package/packages/aurabase/tsup.config.ts +0 -11
  71. package/packages/aurabase/vitest.config.ts +0 -16
  72. package/packages/auth/node_modules/.bin/esbuild +0 -19
  73. package/packages/auth/node_modules/.bin/tsc +0 -22
  74. package/packages/auth/node_modules/.bin/tsserver +0 -22
  75. package/packages/auth/node_modules/.bin/tsup +0 -22
  76. package/packages/auth/node_modules/.bin/tsup-node +0 -22
  77. package/packages/auth/node_modules/.bin/vite +0 -22
  78. package/packages/auth/node_modules/.bin/vitest +0 -22
  79. package/packages/auth/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
  80. package/packages/auth/src/AuthAdminService.ts +0 -149
  81. package/packages/auth/src/AuthService.ts +0 -1166
  82. package/packages/auth/src/SessionManager.ts +0 -92
  83. package/packages/auth/src/index.ts +0 -17
  84. package/packages/auth/src/jwks.ts +0 -337
  85. package/packages/auth/src/pkce.ts +0 -27
  86. package/packages/auth/src/types.ts +0 -89
  87. package/packages/auth/tests/auth-lifecycle.test.ts +0 -149
  88. package/packages/auth/tests/detect-session.test.ts +0 -361
  89. package/packages/auth/tests/getclaims.test.ts +0 -780
  90. package/packages/auth/tests/is-mfa-challenge.test.ts +0 -27
  91. package/packages/auth/tests/password-recovery.test.ts +0 -124
  92. package/packages/auth/tests/pkce.test.ts +0 -192
  93. package/packages/auth/tests/session-manager.test.ts +0 -103
  94. package/packages/auth/tests/set-session.test.ts +0 -139
  95. package/packages/auth/tests/verify-otp.test.ts +0 -153
  96. package/packages/auth/tsconfig.json +0 -5
  97. package/packages/auth/tsup.config.ts +0 -11
  98. package/packages/core/node_modules/.bin/esbuild +0 -22
  99. package/packages/core/node_modules/.bin/tsc +0 -22
  100. package/packages/core/node_modules/.bin/tsserver +0 -22
  101. package/packages/core/node_modules/.bin/tsup +0 -22
  102. package/packages/core/node_modules/.bin/tsup-node +0 -22
  103. package/packages/core/node_modules/.bin/vite +0 -22
  104. package/packages/core/node_modules/.bin/vitest +0 -22
  105. package/packages/core/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
  106. package/packages/core/src/AuraError.ts +0 -89
  107. package/packages/core/src/BaseService.ts +0 -44
  108. package/packages/core/src/client.ts +0 -34
  109. package/packages/core/src/cookie-utils.ts +0 -42
  110. package/packages/core/src/fetch.ts +0 -435
  111. package/packages/core/src/index.ts +0 -22
  112. package/packages/core/src/retry.ts +0 -63
  113. package/packages/core/src/serialize.ts +0 -6
  114. package/packages/core/src/stores/BaseAuthStore.ts +0 -164
  115. package/packages/core/src/stores/LocalAuthStore.ts +0 -199
  116. package/packages/core/src/types.ts +0 -1042
  117. package/packages/core/tests/auth-store.test.ts +0 -300
  118. package/packages/core/tests/error-code.test.ts +0 -61
  119. package/packages/core/tests/error.test.ts +0 -24
  120. package/packages/core/tests/fetch.test.ts +0 -286
  121. package/packages/core/tests/mocks.ts +0 -139
  122. package/packages/core/tests/observability.test.ts +0 -86
  123. package/packages/core/tests/refresh-hardening.test.ts +0 -164
  124. package/packages/core/tests/refresh-observability.test.ts +0 -111
  125. package/packages/core/tests/retry.test.ts +0 -106
  126. package/packages/core/tests/serialize.test.ts +0 -12
  127. package/packages/core/tests/timeout.test.ts +0 -79
  128. package/packages/core/tsconfig.json +0 -5
  129. package/packages/core/tsup.config.ts +0 -11
  130. package/packages/db/node_modules/.bin/esbuild +0 -19
  131. package/packages/db/node_modules/.bin/tsc +0 -22
  132. package/packages/db/node_modules/.bin/tsserver +0 -22
  133. package/packages/db/node_modules/.bin/tsup +0 -22
  134. package/packages/db/node_modules/.bin/tsup-node +0 -22
  135. package/packages/db/node_modules/.bin/vite +0 -22
  136. package/packages/db/node_modules/.bin/vitest +0 -22
  137. package/packages/db/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
  138. package/packages/db/src/DatabaseService.ts +0 -170
  139. package/packages/db/src/QueryBuilder.ts +0 -830
  140. package/packages/db/src/index.ts +0 -2
  141. package/packages/db/src/pgrst-types/common/common.ts +0 -86
  142. package/packages/db/src/pgrst-types/common/rpc.ts +0 -151
  143. package/packages/db/src/pgrst-types/feature-flags.ts +0 -20
  144. package/packages/db/src/pgrst-types/types.ts +0 -134
  145. package/packages/db/src/select-query-parser/parser.ts +0 -479
  146. package/packages/db/src/select-query-parser/result.ts +0 -553
  147. package/packages/db/src/select-query-parser/types.ts +0 -132
  148. package/packages/db/src/select-query-parser/utils.ts +0 -707
  149. package/packages/db/tests/filters.test.ts +0 -81
  150. package/packages/db/tests/mutations-filtered.e2e.test.ts +0 -132
  151. package/packages/db/tests/mutations-filtered.test.ts +0 -188
  152. package/packages/db/tests/order.test.ts +0 -45
  153. package/packages/db/tests/rpc.test.ts +0 -41
  154. package/packages/db/tests/scale/build-large-schema.ts +0 -94
  155. package/packages/db/tests/scale/scale-compile.test.ts +0 -167
  156. package/packages/db/tests/schema.test.ts +0 -77
  157. package/packages/db/tests/single-accept.e2e.test.ts +0 -123
  158. package/packages/db/tests/single.test.ts +0 -211
  159. package/packages/db/tests/types/filters.test-d.ts +0 -52
  160. package/packages/db/tests/types/fixtures.ts +0 -40
  161. package/packages/db/tests/types/from-views.test-d.ts +0 -18
  162. package/packages/db/tests/types/mutations.test-d.ts +0 -23
  163. package/packages/db/tests/types/rpc.test-d.ts +0 -60
  164. package/packages/db/tests/types/schema-shape.test-d.ts +0 -8
  165. package/packages/db/tests/types/select-inference.test-d.ts +0 -38
  166. package/packages/db/tests/vendored/fixtures.ts +0 -83
  167. package/packages/db/tests/vendored/get-result.test-d.ts +0 -75
  168. package/packages/db/tsconfig.json +0 -5
  169. package/packages/db/tsconfig.test-d.json +0 -5
  170. package/packages/db/tsup.config.ts +0 -11
  171. package/packages/db/vitest.config.ts +0 -8
  172. package/packages/functions/node_modules/.bin/esbuild +0 -19
  173. package/packages/functions/node_modules/.bin/tsc +0 -22
  174. package/packages/functions/node_modules/.bin/tsserver +0 -22
  175. package/packages/functions/node_modules/.bin/tsup +0 -22
  176. package/packages/functions/node_modules/.bin/tsup-node +0 -22
  177. package/packages/functions/node_modules/.bin/vite +0 -22
  178. package/packages/functions/node_modules/.bin/vitest +0 -22
  179. package/packages/functions/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
  180. package/packages/functions/src/FunctionsService.ts +0 -188
  181. package/packages/functions/src/errors.ts +0 -70
  182. package/packages/functions/src/index.ts +0 -6
  183. package/packages/functions/tests/invoke.test.ts +0 -97
  184. package/packages/functions/tests/response-type-errors.test.ts +0 -135
  185. package/packages/functions/tsconfig.json +0 -5
  186. package/packages/functions/tsup.config.ts +0 -11
  187. package/packages/gen/node_modules/.bin/esbuild +0 -19
  188. package/packages/gen/node_modules/.bin/tsc +0 -22
  189. package/packages/gen/node_modules/.bin/tsserver +0 -22
  190. package/packages/gen/node_modules/.bin/tsup +0 -22
  191. package/packages/gen/node_modules/.bin/tsup-node +0 -22
  192. package/packages/gen/node_modules/.bin/vite +0 -22
  193. package/packages/gen/node_modules/.bin/vitest +0 -22
  194. package/packages/gen/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
  195. package/packages/gen/src/cli.ts +0 -67
  196. package/packages/gen/src/generate.ts +0 -0
  197. package/packages/gen/src/index.ts +0 -2
  198. package/packages/gen/tests/compile.test.ts +0 -213
  199. package/packages/gen/tests/e2e.test.ts +0 -130
  200. package/packages/gen/tests/generate.test.ts +0 -396
  201. package/packages/gen/tsconfig.json +0 -5
  202. package/packages/gen/tsup.config.ts +0 -11
  203. package/packages/notifications/node_modules/.bin/esbuild +0 -19
  204. package/packages/notifications/node_modules/.bin/tsc +0 -22
  205. package/packages/notifications/node_modules/.bin/tsserver +0 -22
  206. package/packages/notifications/node_modules/.bin/tsup +0 -22
  207. package/packages/notifications/node_modules/.bin/tsup-node +0 -22
  208. package/packages/notifications/node_modules/.bin/vite +0 -22
  209. package/packages/notifications/node_modules/.bin/vitest +0 -22
  210. package/packages/notifications/src/NotificationsService.ts +0 -230
  211. package/packages/notifications/src/index.ts +0 -19
  212. package/packages/notifications/tsconfig.json +0 -5
  213. package/packages/notifications/tsup.config.ts +0 -11
  214. package/packages/realtime/node_modules/.bin/esbuild +0 -19
  215. package/packages/realtime/node_modules/.bin/tsc +0 -22
  216. package/packages/realtime/node_modules/.bin/tsserver +0 -22
  217. package/packages/realtime/node_modules/.bin/tsup +0 -22
  218. package/packages/realtime/node_modules/.bin/tsup-node +0 -22
  219. package/packages/realtime/node_modules/.bin/vite +0 -22
  220. package/packages/realtime/node_modules/.bin/vitest +0 -22
  221. package/packages/realtime/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
  222. package/packages/realtime/src/AuraChannel.ts +0 -485
  223. package/packages/realtime/src/HeartbeatManager.ts +0 -73
  224. package/packages/realtime/src/RealtimeService.ts +0 -505
  225. package/packages/realtime/src/columnFilter.ts +0 -301
  226. package/packages/realtime/src/index.ts +0 -4
  227. package/packages/realtime/tests/ack-routing.test.ts +0 -81
  228. package/packages/realtime/tests/column-filter.test.ts +0 -144
  229. package/packages/realtime/tests/dispatch.test.ts +0 -191
  230. package/packages/realtime/tests/heartbeat.test.ts +0 -67
  231. package/packages/realtime/tests/http-broadcast.test.ts +0 -68
  232. package/packages/realtime/tests/realtime-token.test.ts +0 -43
  233. package/packages/realtime/tests/reconnect-race.test.ts +0 -149
  234. package/packages/realtime/tests/ref-id.test.ts +0 -34
  235. package/packages/realtime/tests/set-auth.test.ts +0 -70
  236. package/packages/realtime/tsconfig.json +0 -5
  237. package/packages/realtime/tsup.config.ts +0 -11
  238. package/packages/storage/node_modules/.bin/esbuild +0 -19
  239. package/packages/storage/node_modules/.bin/tsc +0 -22
  240. package/packages/storage/node_modules/.bin/tsserver +0 -22
  241. package/packages/storage/node_modules/.bin/tsup +0 -22
  242. package/packages/storage/node_modules/.bin/tsup-node +0 -22
  243. package/packages/storage/node_modules/.bin/vite +0 -22
  244. package/packages/storage/node_modules/.bin/vitest +0 -22
  245. package/packages/storage/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
  246. package/packages/storage/src/DownloadBuilder.ts +0 -60
  247. package/packages/storage/src/StorageService.ts +0 -323
  248. package/packages/storage/src/index.ts +0 -2
  249. package/packages/storage/src/path.ts +0 -35
  250. package/packages/storage/src/transform.ts +0 -15
  251. package/packages/storage/tests/download.test.ts +0 -64
  252. package/packages/storage/tests/parity.test.ts +0 -154
  253. package/packages/storage/tests/path.test.ts +0 -87
  254. package/packages/storage/tests/transform.test.ts +0 -79
  255. package/packages/storage/tsconfig.json +0 -5
  256. package/packages/storage/tsup.config.ts +0 -11
  257. package/pnpm-workspace.yaml +0 -24
  258. package/tsconfig.base.json +0 -15
@@ -1,151 +0,0 @@
1
- import { describe, it, expect } from 'vitest'
2
- import { AiService } from '../src/AiService'
3
- import { BaseAuthStore, isAuraError } from '@aurabase/core'
4
- import type { AuraClientLike } from '@aurabase/core'
5
-
6
- function b64url(o: unknown) { return btoa(JSON.stringify(o)).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '') }
7
- function expiredJwt() { return `${b64url({ alg: 'HS256' })}.${b64url({ exp: Math.floor(Date.now() / 1000) - 60 })}.s` }
8
- function validJwt() { return `${b64url({ alg: 'HS256' })}.${b64url({ exp: Math.floor(Date.now() / 1000) + 3600 })}.s` }
9
- function fakeUser() { return { id: 'u', email: null, role: 'authenticated', email_verified: true, is_banned: false, is_anonymous: false, mfa_enabled: false, user_metadata: {}, app_metadata: {}, created_at: '2025-01-01T00:00:00Z' } }
10
-
11
- function streamResponse(chunks: string[], status = 200): Response {
12
- const enc = new TextEncoder()
13
- let i = 0
14
- const body = new ReadableStream<Uint8Array>({
15
- pull(controller) {
16
- if (i < chunks.length) controller.enqueue(enc.encode(chunks[i++]))
17
- else controller.close()
18
- },
19
- })
20
- return new Response(body, { status, headers: { 'Content-Type': 'text/event-stream' } })
21
- }
22
-
23
- function make(
24
- responder: (url: string, init: RequestInit) => Response | Promise<Response>,
25
- store = new BaseAuthStore(),
26
- ) {
27
- const calls: Array<{ url: string; init: RequestInit }> = []
28
- const client: AuraClientLike = {
29
- baseUrl: 'http://x', projectId: 'p', apiKey: 'k', authStore: store,
30
- fetchFn: (async (url: string, init: RequestInit) => { calls.push({ url: String(url), init }); return responder(String(url), init) }) as unknown as typeof globalThis.fetch,
31
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
32
- auth: { refreshSession: async () => ({ data: null, error: null }) as any },
33
- }
34
- return { ai: new AiService(client), calls }
35
- }
36
-
37
- const delta = (c: string) => `event: delta\ndata: ${JSON.stringify({ content: c })}\n\n`
38
- const done = () => `event: done\ndata: ${JSON.stringify({ status: '[DONE]' })}\n\n`
39
-
40
- const doneRiche = () =>
41
- `event: done\ndata: ${JSON.stringify({
42
- status: '[DONE]',
43
- provider: 'google',
44
- fallback_used: false,
45
- finish_reason: 'length',
46
- truncated: true,
47
- usage: { input_tokens: 11, output_tokens: 76, reasoning_tokens: 74, estimated: false },
48
- })}\n\n`
49
-
50
- describe('ai.chatStream — SSE via fetchFn brut', () => {
51
- it('livre un chunk final avec usage et motif d’arrêt quand le serveur les fournit', async () => {
52
- const { ai } = make(() => streamResponse([delta('Ah, les'), doneRiche()]))
53
- const chunks: { delta: string; final?: Record<string, unknown> }[] = []
54
- for await (const c of ai.chatStream([{ role: 'user', content: 'hi' }])) chunks.push(c)
55
-
56
- // Le texte reste livré à l'identique…
57
- expect(chunks.map((c) => c.delta).join('')).toBe('Ah, les')
58
- // …et le dernier chunk porte de quoi détecter une réponse TRONQUÉE, qui était
59
- // jusqu'ici indiscernable d'une réponse complète côté application.
60
- const final = chunks[chunks.length - 1].final as Record<string, unknown>
61
- expect(final).toBeDefined()
62
- expect(final.finish_reason).toBe('length')
63
- expect(final.truncated).toBe(true)
64
- expect(final.provider).toBe('google')
65
- // Usage réel, raisonnement inclus (74 des 76 tokens de sortie).
66
- expect((final.usage as Record<string, number>).output_tokens).toBe(76)
67
- expect((final.usage as Record<string, number>).reasoning_tokens).toBe(74)
68
- })
69
-
70
- it('serveur ancien (done sans détail) → aucun chunk final ajouté', async () => {
71
- const { ai } = make(() => streamResponse([delta('a'), delta('b'), done()]))
72
- const out: string[] = []
73
- for await (const c of ai.chatStream([{ role: 'user', content: 'hi' }])) out.push(c.delta)
74
- expect(out).toEqual(['a', 'b'])
75
- })
76
-
77
- it('livre des deltas incrémentaux puis termine sur done', async () => {
78
- const { ai } = make(() => streamResponse([delta('Hel'), delta('lo'), delta('!'), done()]))
79
- const out: string[] = []
80
- for await (const chunk of ai.chatStream([{ role: 'user', content: 'hi' }])) {
81
- out.push(chunk.delta)
82
- }
83
- expect(out).toEqual(['Hel', 'lo', '!'])
84
- expect(out.join('')).toBe('Hello!')
85
- })
86
-
87
- it('POST vers /chat/stream avec Accept text/event-stream + apikey + Authorization', async () => {
88
- const store = new BaseAuthStore()
89
- store.save(validJwt(), 'rt', fakeUser())
90
- const { ai, calls } = make(() => streamResponse([done()]), store)
91
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
92
- for await (const _ of ai.chatStream([{ role: 'user', content: 'hi' }])) { /* drain */ }
93
- expect(calls[0]!.url).toBe('http://x/v1/ai/p/chat/stream')
94
- expect(calls[0]!.init.method).toBe('POST')
95
- const h = calls[0]!.init.headers as Record<string, string>
96
- expect(h['Accept']).toBe('text/event-stream')
97
- expect(h['apikey']).toBe('k')
98
- expect(h['Authorization']).toBe(`Bearer ${store.token}`)
99
- })
100
-
101
- it('event error → lève une AuraError exploitable', async () => {
102
- const { ai } = make(() => streamResponse([delta('a'), `event: error\ndata: ${JSON.stringify({ error: 'boom' })}\n\n`]))
103
- await expect(async () => {
104
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
105
- for await (const _ of ai.chatStream([{ role: 'user', content: 'hi' }])) { /* drain */ }
106
- }).rejects.toSatisfy((e: unknown) => isAuraError(e) && (e as { message: string }).message.includes('boom'))
107
- })
108
-
109
- it('!res.ok → lève AuraError(status)', async () => {
110
- const { ai } = make(() => new Response(JSON.stringify({ error: { code: 'nope', message: 'x' } }), { status: 429 }))
111
- await expect(async () => {
112
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
113
- for await (const _ of ai.chatStream([{ role: 'user', content: 'hi' }])) { /* drain */ }
114
- }).rejects.toSatisfy((e: unknown) => isAuraError(e) && (e as { status: number }).status === 429)
115
- })
116
-
117
- it('AbortSignal déjà avorté → fin d’itération propre (aucun delta, pas de throw)', async () => {
118
- const ac = new AbortController()
119
- ac.abort()
120
- const { ai } = make((_url, init) =>
121
- init.signal?.aborted
122
- ? Promise.reject(Object.assign(new Error('aborted'), { name: 'AbortError' }))
123
- : Promise.resolve(streamResponse([delta('a'), done()])),
124
- )
125
- const out: string[] = []
126
- for await (const chunk of ai.chatStream([{ role: 'user', content: 'hi' }], { signal: ac.signal })) {
127
- out.push(chunk.delta)
128
- }
129
- expect(out).toEqual([])
130
- })
131
-
132
- it('refresh proactif si token expiré (refresh AVANT ouverture du flux)', async () => {
133
- const store = new BaseAuthStore()
134
- store.save(expiredJwt(), 'rt', fakeUser())
135
- const { ai, calls } = make((url) => {
136
- if (url.includes('/v1/auth/')) return new Response(JSON.stringify({ access_token: validJwt(), refresh_token: 'rt2', token_type: 'bearer', expires_in: 3600, user: fakeUser() }), { status: 200, headers: { 'Content-Type': 'application/json' } })
137
- return streamResponse([done()])
138
- }, store)
139
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
140
- for await (const _ of ai.chatStream([{ role: 'user', content: 'hi' }])) { /* drain */ }
141
- expect(calls[0]!.url).toContain('/v1/auth/p/refresh')
142
- expect(calls[1]!.url).toContain('/chat/stream')
143
- })
144
-
145
- it('chat() (JSON) reste inchangé', async () => {
146
- const { ai } = make(() => new Response(JSON.stringify({ data: { model: 'm', content: 'hi' } }), { status: 200, headers: { 'Content-Type': 'application/json' } }))
147
- const { data, error } = await ai.chat([{ role: 'user', content: 'hi' }])
148
- expect(error).toBeNull()
149
- expect(data).toEqual({ model: 'm', content: 'hi' })
150
- })
151
- })
@@ -1,54 +0,0 @@
1
- import { describe, it, expect } from 'vitest'
2
- import { AiService } from '../src/AiService'
3
- import { BaseAuthStore } from '@aurabase/core'
4
- import type { AuraClientLike } from '@aurabase/core'
5
-
6
- function make(responder: (url: string, init: RequestInit) => Response) {
7
- const calls: Array<{ url: string; method: string }> = []
8
- const client: AuraClientLike = {
9
- baseUrl: 'http://x', projectId: 'p', apiKey: 'k', authStore: new BaseAuthStore(),
10
- fetchFn: (async (url: string, init: RequestInit) => {
11
- calls.push({ url: String(url), method: String(init.method) })
12
- return responder(String(url), init)
13
- }) as unknown as typeof globalThis.fetch,
14
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
15
- auth: { refreshSession: async () => ({ data: null, error: null }) as any },
16
- }
17
- return { ai: new AiService(client), calls }
18
- }
19
- const json = (o: unknown, s = 200) => new Response(JSON.stringify(o), { status: s, headers: { 'Content-Type': 'application/json' } })
20
-
21
- describe('ai RAG — CRUD namespaces', () => {
22
- it('listNamespaces → GET /rag/namespaces, dé-wrappe la liste', async () => {
23
- const { ai, calls } = make(() => json({ data: ['ns_a', 'ns_b'] }))
24
- const { data, error } = await ai.listNamespaces()
25
- expect(error).toBeNull()
26
- expect(data).toEqual(['ns_a', 'ns_b'])
27
- expect(calls[0]).toEqual({ url: 'http://x/v1/ai/p/rag/namespaces', method: 'GET' })
28
- })
29
-
30
- it('deleteNamespace → DELETE /rag/{ns} (encodé), dé-wrappe { deleted }', async () => {
31
- const { ai, calls } = make(() => json({ data: { deleted: 3 } }))
32
- const { data, error } = await ai.deleteNamespace('ns test/x')
33
- expect(error).toBeNull()
34
- expect(data).toEqual({ deleted: 3 })
35
- expect(calls[0]!.method).toBe('DELETE')
36
- expect(calls[0]!.url).toBe('http://x/v1/ai/p/rag/ns%20test%2Fx')
37
- })
38
-
39
- it('reindexNamespace → POST /rag/{ns}/reindex (encodé), dé-wrappe ReindexResponse', async () => {
40
- const { ai, calls } = make(() => json({ data: { reindexed: 42, embedding_model: 'text-embedding-3-small' } }))
41
- const { data, error } = await ai.reindexNamespace('ns#1')
42
- expect(error).toBeNull()
43
- expect(data).toEqual({ reindexed: 42, embedding_model: 'text-embedding-3-small' })
44
- expect(calls[0]!.method).toBe('POST')
45
- expect(calls[0]!.url).toBe('http://x/v1/ai/p/rag/ns%231/reindex')
46
- })
47
-
48
- it('propage une erreur HTTP (status)', async () => {
49
- const { ai } = make(() => json({ error: { code: 'not_found', message: 'x' } }, 404))
50
- const { data, error } = await ai.deleteNamespace('missing')
51
- expect(data).toBeNull()
52
- expect(error?.status).toBe(404)
53
- })
54
- })
@@ -1,69 +0,0 @@
1
- import { describe, it, expect } from 'vitest'
2
- import { parseSSE } from '../src/sse'
3
-
4
- /** Construit un ReadableStream<Uint8Array> à partir de fragments texte arbitraires. */
5
- function streamOf(chunks: string[]): ReadableStream<Uint8Array> {
6
- const enc = new TextEncoder()
7
- let i = 0
8
- return new ReadableStream<Uint8Array>({
9
- pull(controller) {
10
- if (i < chunks.length) controller.enqueue(enc.encode(chunks[i++]))
11
- else controller.close()
12
- },
13
- })
14
- }
15
-
16
- async function collect(stream: ReadableStream<Uint8Array>) {
17
- const out: Array<{ event: string; data: string }> = []
18
- for await (const msg of parseSSE(stream)) out.push(msg)
19
- return out
20
- }
21
-
22
- describe('parseSSE', () => {
23
- it('parse un event simple (event + data)', async () => {
24
- const got = await collect(streamOf(['event: delta\ndata: hello\n\n']))
25
- expect(got).toEqual([{ event: 'delta', data: 'hello' }])
26
- })
27
-
28
- it('event scindé sur deux chunks (trame partielle)', async () => {
29
- // La coupure tombe au milieu du champ data.
30
- const got = await collect(streamOf(['event: delta\ndata: hel', 'lo\n\n']))
31
- expect(got).toEqual([{ event: 'delta', data: 'hello' }])
32
- })
33
-
34
- it('plusieurs data: par event → jointes par \\n', async () => {
35
- const got = await collect(streamOf(['event: delta\ndata: line1\ndata: line2\n\n']))
36
- expect(got).toEqual([{ event: 'delta', data: 'line1\nline2' }])
37
- })
38
-
39
- it('plusieurs events dans un même chunk', async () => {
40
- const got = await collect(
41
- streamOf(['event: delta\ndata: a\n\nevent: delta\ndata: b\n\nevent: done\ndata: [DONE]\n\n']),
42
- )
43
- expect(got).toEqual([
44
- { event: 'delta', data: 'a' },
45
- { event: 'delta', data: 'b' },
46
- { event: 'done', data: '[DONE]' },
47
- ])
48
- })
49
-
50
- it('ignore les lignes keep-alive (commentaires « : … »)', async () => {
51
- const got = await collect(streamOf([': keep-alive ping\n\nevent: delta\ndata: x\n\n']))
52
- expect(got).toEqual([{ event: 'delta', data: 'x' }])
53
- })
54
-
55
- it('event: done est reconnu et livré', async () => {
56
- const got = await collect(streamOf(['event: done\ndata: [DONE]\n\n']))
57
- expect(got.at(-1)).toEqual({ event: 'done', data: '[DONE]' })
58
- })
59
-
60
- it('tolère les fins de ligne CRLF', async () => {
61
- const got = await collect(streamOf(['event: delta\r\ndata: crlf\r\n\r\n']))
62
- expect(got).toEqual([{ event: 'delta', data: 'crlf' }])
63
- })
64
-
65
- it('event final sans ligne vide terminale est tout de même livré', async () => {
66
- const got = await collect(streamOf(['event: delta\ndata: tail']))
67
- expect(got).toEqual([{ event: 'delta', data: 'tail' }])
68
- })
69
- })
@@ -1,5 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "compilerOptions": { "outDir": "dist", "rootDir": "src" },
4
- "include": ["src"]
5
- }
@@ -1,11 +0,0 @@
1
- import { defineConfig } from 'tsup'
2
-
3
- export default defineConfig({
4
- entry: ['src/index.ts'],
5
- format: ['cjs', 'esm'],
6
- dts: true,
7
- splitting: false,
8
- clean: true,
9
- treeshake: true,
10
- minify: false,
11
- })
@@ -1,19 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*)
6
- if command -v cygpath > /dev/null 2>&1; then
7
- basedir=`cygpath -w "$basedir"`
8
- fi
9
- ;;
10
- esac
11
-
12
- if [ -z "$NODE_PATH" ]; then
13
- export NODE_PATH="/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/esbuild@0.27.7/node_modules/esbuild/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/esbuild@0.27.7/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/node_modules"
14
- else
15
- export NODE_PATH="/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/esbuild@0.27.7/node_modules/esbuild/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/esbuild@0.27.7/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/node_modules:$NODE_PATH"
16
- fi
17
- "$basedir/../../../../node_modules/.pnpm/esbuild@0.27.7/node_modules/esbuild/bin/esbuild" "$@"
18
- exit $?
19
- # cmd-shim-target=/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/esbuild@0.27.7/node_modules/esbuild/bin/esbuild
@@ -1,22 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*)
6
- if command -v cygpath > /dev/null 2>&1; then
7
- basedir=`cygpath -w "$basedir"`
8
- fi
9
- ;;
10
- esac
11
-
12
- if [ -z "$NODE_PATH" ]; then
13
- export NODE_PATH="/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/typescript@5.9.3/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/node_modules"
14
- else
15
- export NODE_PATH="/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/typescript@5.9.3/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/node_modules:$NODE_PATH"
16
- fi
17
- if [ -x "$basedir/node" ]; then
18
- exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@"
19
- else
20
- exec node "$basedir/../typescript/bin/tsc" "$@"
21
- fi
22
- # cmd-shim-target=/Users/affanedaylami/aurabase/aurabase-js/packages/aurabase/node_modules/typescript/bin/tsc
@@ -1,22 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*)
6
- if command -v cygpath > /dev/null 2>&1; then
7
- basedir=`cygpath -w "$basedir"`
8
- fi
9
- ;;
10
- esac
11
-
12
- if [ -z "$NODE_PATH" ]; then
13
- export NODE_PATH="/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/typescript@5.9.3/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/node_modules"
14
- else
15
- export NODE_PATH="/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/typescript@5.9.3/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/node_modules:$NODE_PATH"
16
- fi
17
- if [ -x "$basedir/node" ]; then
18
- exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@"
19
- else
20
- exec node "$basedir/../typescript/bin/tsserver" "$@"
21
- fi
22
- # cmd-shim-target=/Users/affanedaylami/aurabase/aurabase-js/packages/aurabase/node_modules/typescript/bin/tsserver
@@ -1,22 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*)
6
- if command -v cygpath > /dev/null 2>&1; then
7
- basedir=`cygpath -w "$basedir"`
8
- fi
9
- ;;
10
- esac
11
-
12
- if [ -z "$NODE_PATH" ]; then
13
- export NODE_PATH="/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.16_typescript@5.9.3/node_modules/tsup/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.16_typescript@5.9.3/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/node_modules"
14
- else
15
- export NODE_PATH="/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.16_typescript@5.9.3/node_modules/tsup/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.16_typescript@5.9.3/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/node_modules:$NODE_PATH"
16
- fi
17
- if [ -x "$basedir/node" ]; then
18
- exec "$basedir/node" "$basedir/../tsup/dist/cli-default.js" "$@"
19
- else
20
- exec node "$basedir/../tsup/dist/cli-default.js" "$@"
21
- fi
22
- # cmd-shim-target=/Users/affanedaylami/aurabase/aurabase-js/packages/aurabase/node_modules/tsup/dist/cli-default.js
@@ -1,22 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*)
6
- if command -v cygpath > /dev/null 2>&1; then
7
- basedir=`cygpath -w "$basedir"`
8
- fi
9
- ;;
10
- esac
11
-
12
- if [ -z "$NODE_PATH" ]; then
13
- export NODE_PATH="/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.16_typescript@5.9.3/node_modules/tsup/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.16_typescript@5.9.3/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/node_modules"
14
- else
15
- export NODE_PATH="/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.16_typescript@5.9.3/node_modules/tsup/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.16_typescript@5.9.3/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/node_modules:$NODE_PATH"
16
- fi
17
- if [ -x "$basedir/node" ]; then
18
- exec "$basedir/node" "$basedir/../tsup/dist/cli-node.js" "$@"
19
- else
20
- exec node "$basedir/../tsup/dist/cli-node.js" "$@"
21
- fi
22
- # cmd-shim-target=/Users/affanedaylami/aurabase/aurabase-js/packages/aurabase/node_modules/tsup/dist/cli-node.js
@@ -1,22 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*)
6
- if command -v cygpath > /dev/null 2>&1; then
7
- basedir=`cygpath -w "$basedir"`
8
- fi
9
- ;;
10
- esac
11
-
12
- if [ -z "$NODE_PATH" ]; then
13
- export NODE_PATH="/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/vite@8.1.3_@types+node@20.14.15_esbuild@0.27.7/node_modules/vite/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/vite@8.1.3_@types+node@20.14.15_esbuild@0.27.7/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/node_modules"
14
- else
15
- export NODE_PATH="/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/vite@8.1.3_@types+node@20.14.15_esbuild@0.27.7/node_modules/vite/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/vite@8.1.3_@types+node@20.14.15_esbuild@0.27.7/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/node_modules:$NODE_PATH"
16
- fi
17
- if [ -x "$basedir/node" ]; then
18
- exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/vite@8.1.3_@types+node@20.14.15_esbuild@0.27.7/node_modules/vite/bin/vite.js" "$@"
19
- else
20
- exec node "$basedir/../../../../node_modules/.pnpm/vite@8.1.3_@types+node@20.14.15_esbuild@0.27.7/node_modules/vite/bin/vite.js" "$@"
21
- fi
22
- # cmd-shim-target=/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/vite@8.1.3_@types+node@20.14.15_esbuild@0.27.7/node_modules/vite/bin/vite.js
@@ -1,22 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*)
6
- if command -v cygpath > /dev/null 2>&1; then
7
- basedir=`cygpath -w "$basedir"`
8
- fi
9
- ;;
10
- esac
11
-
12
- if [ -z "$NODE_PATH" ]; then
13
- export NODE_PATH="/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/vitest@4.1.9_@types+node@20.14.15_vite@8.1.3_@types+node@20.14.15_esbuild@0.27.7_/node_modules/vitest/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/vitest@4.1.9_@types+node@20.14.15_vite@8.1.3_@types+node@20.14.15_esbuild@0.27.7_/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/node_modules"
14
- else
15
- export NODE_PATH="/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/vitest@4.1.9_@types+node@20.14.15_vite@8.1.3_@types+node@20.14.15_esbuild@0.27.7_/node_modules/vitest/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/vitest@4.1.9_@types+node@20.14.15_vite@8.1.3_@types+node@20.14.15_esbuild@0.27.7_/node_modules:/Users/affanedaylami/aurabase/aurabase-js/node_modules/.pnpm/node_modules:$NODE_PATH"
16
- fi
17
- if [ -x "$basedir/node" ]; then
18
- exec "$basedir/node" "$basedir/../vitest/vitest.mjs" "$@"
19
- else
20
- exec node "$basedir/../vitest/vitest.mjs" "$@"
21
- fi
22
- # cmd-shim-target=/Users/affanedaylami/aurabase/aurabase-js/packages/aurabase/node_modules/vitest/vitest.mjs
@@ -1 +0,0 @@
1
- {"version":"4.1.9","results":[[":tests/query-builder.test.ts",{"duration":491.47279100000014,"failed":false}],[":tests/notifications.test.ts",{"duration":806.037167,"failed":false}],[":tests/ai.test.ts",{"duration":582.0696669999998,"failed":false}],[":tests/auth-hardening.test.ts",{"duration":372.9561670000003,"failed":false}],[":tests/auth.test.ts",{"duration":958.2934169999999,"failed":false}],[":tests/auth-admin.test.ts",{"duration":784.9338749999997,"failed":false}],[":tests/database.test.ts",{"duration":895.6781250000004,"failed":false}],[":tests/functions.test.ts",{"duration":649.8064999999997,"failed":false}],[":tests/storage.test.ts",{"duration":446.6877080000004,"failed":false}],[":tests/public-api-surface.test.ts",{"duration":16.40112500000032,"failed":false}],[":tests/retry-option.test.ts",{"duration":64.39083299999993,"failed":false}],[":tests/dispose.test.ts",{"duration":115.68229199999996,"failed":false}],[":tests/integration.test.ts",{"duration":5918.981792,"failed":false}],[":tests/ssr.test.ts",{"duration":123.54670799999985,"failed":false}],[":tests/db-types-e2e.test.ts",{"duration":0,"failed":false}],[":tests/auth-e2e.test.ts",{"duration":0,"failed":false}],[":tests/readme-smoke-e2e.test.ts",{"duration":0,"failed":false}],[":tests/refresh-locks.test.ts",{"duration":401.80212500000016,"failed":false}],[":tests/service-role-guard.test.ts",{"duration":43.237082999999984,"failed":false}],[":tests/observability-hook.test.ts",{"duration":683.2948750000005,"failed":false}],[":tests/rpc-e2e.test.ts",{"duration":0,"failed":false}],[":tests/rpc-verify.e2e.test.ts",{"duration":4431.977625,"failed":false}],[":tests/foreign-token.e2e.test.ts",{"duration":0,"failed":false}],[":tests/storage-transform-e2e.test.ts",{"duration":0,"failed":false}],[":tests/rs256-local-e2e.test.ts",{"duration":0,"failed":false}],[":tests/realtime-filter-e2e.test.ts",{"duration":0,"failed":false}],[":tests/rt-alias-public-e2e.test.ts",{"duration":0,"failed":false}],[":tests/storage-backend-e2e.test.ts",{"duration":0,"failed":false}],[":tests/rt-http-broadcast-e2e.test.ts",{"duration":0,"failed":false}],[":tests/storage-sdk-parity-e2e.test.ts",{"duration":0,"failed":false}],[":tests/ai-streaming-rag-e2e.test.ts",{"duration":0,"failed":false}]]}