@supabase/supabase-js 2.86.0 → 2.86.1-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/wrapper.mjs +94 -0
- package/dist/main/lib/rest/types/common/rpc.d.ts +5 -2
- package/dist/main/lib/rest/types/common/rpc.d.ts.map +1 -1
- package/dist/main/lib/version.d.ts +1 -1
- package/dist/main/lib/version.d.ts.map +1 -1
- package/dist/main/lib/version.js +1 -1
- package/dist/main/lib/version.js.map +1 -1
- package/dist/module/lib/rest/types/common/rpc.d.ts +5 -2
- package/dist/module/lib/rest/types/common/rpc.d.ts.map +1 -1
- package/dist/module/lib/version.d.ts +1 -1
- package/dist/module/lib/version.d.ts.map +1 -1
- package/dist/module/lib/version.js +1 -1
- package/dist/module/lib/version.js.map +1 -1
- package/dist/umd/supabase.js +1 -1
- package/package.json +19 -9
- package/src/lib/rest/types/common/rpc.ts +17 -4
- package/src/lib/version.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supabase/supabase-js",
|
|
3
|
-
"version": "2.86.0",
|
|
3
|
+
"version": "2.86.1-canary.0",
|
|
4
4
|
"description": "Isomorphic Javascript SDK for Supabase",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript",
|
|
@@ -16,8 +16,17 @@
|
|
|
16
16
|
"src"
|
|
17
17
|
],
|
|
18
18
|
"main": "dist/main/index.js",
|
|
19
|
-
"module": "dist/
|
|
19
|
+
"module": "dist/esm/wrapper.mjs",
|
|
20
20
|
"types": "dist/module/index.d.ts",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./dist/module/index.d.ts",
|
|
24
|
+
"import": "./dist/esm/wrapper.mjs",
|
|
25
|
+
"require": "./dist/main/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./dist/module/*": "./dist/module/*",
|
|
28
|
+
"./package.json": "./package.json"
|
|
29
|
+
},
|
|
21
30
|
"sideEffects": false,
|
|
22
31
|
"repository": {
|
|
23
32
|
"type": "git",
|
|
@@ -25,9 +34,10 @@
|
|
|
25
34
|
"directory": "packages/core/supabase-js"
|
|
26
35
|
},
|
|
27
36
|
"scripts": {
|
|
28
|
-
"build": "npm run build:main && npm run build:module && npm run build:umd",
|
|
37
|
+
"build": "npm run build:main && npm run build:module && npm run build:esm && npm run build:umd",
|
|
29
38
|
"build:main": "tsc -p tsconfig.json",
|
|
30
39
|
"build:module": "tsc -p tsconfig.module.json",
|
|
40
|
+
"build:esm": "node scripts/copy-wrapper.cjs",
|
|
31
41
|
"build:umd": "webpack --env mode=production",
|
|
32
42
|
"test": "npm run test:types && npm run test:run",
|
|
33
43
|
"test:all": "npm run test:types && npm run test:run && npm run test:integration && npm run test:integration:browser",
|
|
@@ -49,16 +59,16 @@
|
|
|
49
59
|
"serve:coverage": "npx nx test:coverage supabase-js && serve test/coverage",
|
|
50
60
|
"update:test-deps": "npm run update:test-deps:expo && npm run update:test-deps:next && npm run update:test-deps:deno && npm run update:test-deps:bun",
|
|
51
61
|
"update:test-deps:expo": "cd test/integration/expo && npm install",
|
|
52
|
-
"update:test-deps:next": "cd test/integration/next && npm install
|
|
62
|
+
"update:test-deps:next": "cd test/integration/next && npm install",
|
|
53
63
|
"update:test-deps:deno": "cd test/deno && npm install",
|
|
54
64
|
"update:test-deps:bun": "cd test/integration/bun && bun install"
|
|
55
65
|
},
|
|
56
66
|
"dependencies": {
|
|
57
|
-
"@supabase/auth-js": "2.86.0",
|
|
58
|
-
"@supabase/functions-js": "2.86.0",
|
|
59
|
-
"@supabase/postgrest-js": "2.86.0",
|
|
60
|
-
"@supabase/realtime-js": "2.86.0",
|
|
61
|
-
"@supabase/storage-js": "2.86.0"
|
|
67
|
+
"@supabase/auth-js": "2.86.1-canary.0",
|
|
68
|
+
"@supabase/functions-js": "2.86.1-canary.0",
|
|
69
|
+
"@supabase/postgrest-js": "2.86.1-canary.0",
|
|
70
|
+
"@supabase/realtime-js": "2.86.1-canary.0",
|
|
71
|
+
"@supabase/storage-js": "2.86.1-canary.0"
|
|
62
72
|
},
|
|
63
73
|
"devDependencies": {
|
|
64
74
|
"jsr": "^0.13.5",
|
|
@@ -72,6 +72,10 @@ type RpcFunctionNotFound<FnName> = {
|
|
|
72
72
|
Relationships: null
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
type CrossSchemaError<TableRef extends string> = {
|
|
76
|
+
error: true
|
|
77
|
+
} & `Function returns SETOF from a different schema ('${TableRef}'). Use .overrideTypes<YourReturnType>() to specify the return type explicitly.`
|
|
78
|
+
|
|
75
79
|
export type GetRpcFunctionFilterBuilderByArgs<
|
|
76
80
|
Schema extends GenericSchema,
|
|
77
81
|
FnName extends string & keyof Schema['Functions'],
|
|
@@ -108,13 +112,20 @@ export type GetRpcFunctionFilterBuilderByArgs<
|
|
|
108
112
|
? // If we are dealing with an non-typed client everything is any
|
|
109
113
|
IsAny<Fn> extends true
|
|
110
114
|
? { Row: any; Result: any; RelationName: FnName; Relationships: null }
|
|
111
|
-
: // Otherwise, we use the arguments based function definition narrowing to get the
|
|
115
|
+
: // Otherwise, we use the arguments based function definition narrowing to get the right value
|
|
112
116
|
Fn extends GenericFunction
|
|
113
117
|
? {
|
|
114
118
|
Row: Fn['SetofOptions'] extends GenericSetofOption
|
|
115
|
-
? Fn['SetofOptions']['
|
|
119
|
+
? Fn['SetofOptions']['to'] extends keyof TablesAndViews<Schema>
|
|
116
120
|
? TablesAndViews<Schema>[Fn['SetofOptions']['to']]['Row']
|
|
117
|
-
:
|
|
121
|
+
: // Cross-schema fallback: use Returns type when table is not in current schema
|
|
122
|
+
Fn['Returns'] extends any[]
|
|
123
|
+
? Fn['Returns'][number] extends Record<string, unknown>
|
|
124
|
+
? Fn['Returns'][number]
|
|
125
|
+
: CrossSchemaError<Fn['SetofOptions']['to'] & string>
|
|
126
|
+
: Fn['Returns'] extends Record<string, unknown>
|
|
127
|
+
? Fn['Returns']
|
|
128
|
+
: CrossSchemaError<Fn['SetofOptions']['to'] & string>
|
|
118
129
|
: Fn['Returns'] extends any[]
|
|
119
130
|
? Fn['Returns'][number] extends Record<string, unknown>
|
|
120
131
|
? Fn['Returns'][number]
|
|
@@ -135,7 +146,9 @@ export type GetRpcFunctionFilterBuilderByArgs<
|
|
|
135
146
|
Relationships: Fn['SetofOptions'] extends GenericSetofOption
|
|
136
147
|
? Fn['SetofOptions']['to'] extends keyof Schema['Tables']
|
|
137
148
|
? Schema['Tables'][Fn['SetofOptions']['to']]['Relationships']
|
|
138
|
-
:
|
|
149
|
+
: Fn['SetofOptions']['to'] extends keyof Schema['Views']
|
|
150
|
+
? Schema['Views'][Fn['SetofOptions']['to']]['Relationships']
|
|
151
|
+
: null
|
|
139
152
|
: null
|
|
140
153
|
}
|
|
141
154
|
: // If we failed to find the function by argument, we still pass with any but also add an overridable
|
package/src/lib/version.ts
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
// - Debugging and support (identifying which version is running)
|
|
5
5
|
// - Telemetry and logging (version reporting in errors/analytics)
|
|
6
6
|
// - Ensuring build artifacts match the published package version
|
|
7
|
-
export const version = '2.86.0'
|
|
7
|
+
export const version = '2.86.1-canary.0'
|