The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
update supabase-js
Alaister Young51aaec5553b3
diff --git a/studio/lib/common/fetch/base.ts b/studio/lib/common/fetch/base.tsindex b13b7a026b5..91b0ed53505 100644--- a/studio/lib/common/fetch/base.ts+++ b/studio/lib/common/fetch/base.ts@@ -88,7 +88,9 @@ export async function getAccessToken() {// ignore if server-sideif (typeof window === 'undefined') return ''- const { session } = await auth.getSession()+ const {+ data: { session },+ } = await auth.getSession()if (!session) {// try to get from url fragmentconst accessToken = getParameterByName('access_token')diff --git a/studio/lib/gotrue.ts b/studio/lib/gotrue.tsindex 358b7cb326e..6591fcb3a47 100644--- a/studio/lib/gotrue.ts+++ b/studio/lib/gotrue.ts@@ -10,7 +10,10 @@ export const auth = new GoTrueClient({export const getAuthUser = async (token: String): Promise<any> => {try {- const { user, error } = await auth.api.getUser(token.replace('Bearer ', ''))+ const {+ data: { user },+ error,+ } = await auth.getUser(token.replace('Bearer ', ''))if (error) throw errorreturn { user, error: null }diff --git a/studio/package-lock.json b/studio/package-lock.jsonindex c78815e9d17..81dcbb85188 100644--- a/studio/package-lock.json+++ b/studio/package-lock.json@@ -21,7 +21,7 @@"@supabase/postgres-meta": "^0.26.1","@supabase/react-data-grid": "^7.1.0-beta.7","@supabase/shared-types": "^0.1.25",- "@supabase/supabase-js": "^1.36.0-next.14",+ "@supabase/supabase-js": "^1.36.0-next.25","@supabase/ui": "0.37.0-alpha.80","ajv": "^8.6.3","analytics-node": "^3.5.0",@@ -8323,17 +8323,17 @@"integrity": "sha512-cywIoKu3sJnBPQ1eKi3BzFHWslA2ePqHvQhcxp7iYYlo1tWcVgEKTSh7y7hb6GoR4TyT3DwlK4v1vOZpVg8u4Q=="},"node_modules/@supabase/functions-js": {- "version": "1.3.4",- "resolved": "https://registry.npmjs.org/@supabase/functions-js/-/functions-js-1.3.4.tgz",- "integrity": "sha512-yYVgkECjv7IZEBKBI3EB5Q7R1p0FJ10g8Q9N7SWKIHUU6i6DnbEGHIMFLyQRm1hmiNWD8fL7bRVEYacmTRJhHw==",+ "version": "1.4.0-next.5",+ "resolved": "https://registry.npmjs.org/@supabase/functions-js/-/functions-js-1.4.0-next.5.tgz",+ "integrity": "sha512-y2lPF1+U5e0DbJo3wKbTQsIB+3Vqq3PZ0pOAjt4RhI9MZBl/or88KcAHzBey+lG38NjQtAo9y0yx0r1mZGm8zQ==","dependencies": {"cross-fetch": "^3.1.5"}},"node_modules/@supabase/gotrue-js": {- "version": "1.23.0-next.12",- "resolved": "https://registry.npmjs.org/@supabase/gotrue-js/-/gotrue-js-1.23.0-next.12.tgz",- "integrity": "sha512-F+XFCnexNwDHD9JcbqhnJeM10MSBRuLZXWKvEGLjrRSHJdxYm7z+HSf1t8mlvno2Xd97oWUFTr6lSnSQmDM+Bw==",+ "version": "1.23.0-next.24",+ "resolved": "https://registry.npmjs.org/@supabase/gotrue-js/-/gotrue-js-1.23.0-next.24.tgz",+ "integrity": "sha512-fCnDh70OsH6lD3fc1w0cz7lTh3dWyme+TffGDUZCStHPxHVB/yGpGJu8COspWwl+8W6JVLD5bSc/OqNtQ5bh7g==","dependencies": {"cross-fetch": "^3.1.5"}@@ -8353,9 +8353,9 @@}},"node_modules/@supabase/postgrest-js": {- "version": "1.0.0-next.2",- "resolved": "https://registry.npmjs.org/@supabase/postgrest-js/-/postgrest-js-1.0.0-next.2.tgz",- "integrity": "sha512-8hg7xbT6w07BjrQRqQT4DOVg9NkcBFdvlpdArriKwOtqKiztVy32HXT/CjPTgMxl9Z4Bc7n2krhS5EKOB7Wmvw==",+ "version": "1.0.0-next.7",+ "resolved": "https://registry.npmjs.org/@supabase/postgrest-js/-/postgrest-js-1.0.0-next.7.tgz",+ "integrity": "sha512-UefMDfIJ0aqZoJhIWLHbrrksIiqH+Sv9uml0sfISNX4nm4Q+hqm0aR32pFzr6VfMP7sXK1PaYKyPqGv0a4h7LA==","dependencies": {"cross-fetch": "^3.1.5"}@@ -8373,9 +8373,9 @@}},"node_modules/@supabase/realtime-js": {- "version": "1.8.0-next.13",- "resolved": "https://registry.npmjs.org/@supabase/realtime-js/-/realtime-js-1.8.0-next.13.tgz",- "integrity": "sha512-qHMIXTp7AXd4Iy2vtOBqYJ7C1x7DrgTH3BqrcvQQCqp+xEBAqQdKsiZsbk8mfSJqVMQghksgMT3GT3G9QboBDQ==",+ "version": "1.7.4",+ "resolved": "https://registry.npmjs.org/@supabase/realtime-js/-/realtime-js-1.7.4.tgz",+ "integrity": "sha512-h/Jk3PCLkIVonsNavof/LvHbvF41UD+D+mWcA3m8yHzJ2TLbV3S4XDYId+A3AkvFOAork7Ns/9O8rK0uY4F4zw==","dependencies": {"@types/phoenix": "^1.5.4","websocket": "^1.0.34"@@ -8387,23 +8387,23 @@"integrity": "sha512-nKIwMc/Ig22s58FxH9lyCJ+hAqp3D4Qq7LDCTlGlzTV7sOeKXFyMQuevwGdCVfIuQbp99QC1y2rS9pyV+R7RFA=="},"node_modules/@supabase/storage-js": {- "version": "1.8.0-next.3",- "resolved": "https://registry.npmjs.org/@supabase/storage-js/-/storage-js-1.8.0-next.3.tgz",- "integrity": "sha512-3gfrXap+awcgwyw44s0x248Qu4x+yaqpe8JLWEnp/G2hecD+J/7vEJ9MJe+GS0ZL+ZJalnWcDWt1m86fxoDyFg==",+ "version": "1.8.0-next.6",+ "resolved": "https://registry.npmjs.org/@supabase/storage-js/-/storage-js-1.8.0-next.6.tgz",+ "integrity": "sha512-7cLxxvCwlUBe0b6DltI/i/EAFE8RxvouL7FIcW8ysyd30+rAOq14BIbuJjx1PForxQzapcBoaZBUHf+x3xyssw==","dependencies": {"cross-fetch": "^3.1.5"}},"node_modules/@supabase/supabase-js": {- "version": "1.36.0-next.14",- "resolved": "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-1.36.0-next.14.tgz",- "integrity": "sha512-e14M4JyRrbFx7MdBFvSO4umJm1nzBUaLhPRwwFWMZfSPPlYmjYdrCQOgHITkE9G+E/QLNFK3x7WthIjLkcODrw==",- "dependencies": {- "@supabase/functions-js": "^1.3.3",- "@supabase/gotrue-js": "^1.23.0-next.12",- "@supabase/postgrest-js": "^1.0.0-next.2",- "@supabase/realtime-js": "^1.8.0-next.13",- "@supabase/storage-js": "^1.8.0-next.3",+ "version": "1.36.0-next.25",+ "resolved": "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-1.36.0-next.25.tgz",+ "integrity": "sha512-yEzKycD4CJoGbgbFGJsewePBgvjwOe2zMF39/8IiDPc1cb6xxOWa5iwCftzZOYZMKdSL4o8wR1a9XUbK4NqIuQ==",+ "dependencies": {+ "@supabase/functions-js": "^1.4.0-next.5",+ "@supabase/gotrue-js": "^1.23.0-next.24",+ "@supabase/postgrest-js": "^1.0.0-next.7",+ "@supabase/realtime-js": "1.7.4",+ "@supabase/storage-js": "^1.8.0-next.6","cross-fetch": "^3.1.5"}},@@ -35736,17 +35736,17 @@"integrity": "sha512-cywIoKu3sJnBPQ1eKi3BzFHWslA2ePqHvQhcxp7iYYlo1tWcVgEKTSh7y7hb6GoR4TyT3DwlK4v1vOZpVg8u4Q=="},"@supabase/functions-js": {- "version": "1.3.4",- "resolved": "https://registry.npmjs.org/@supabase/functions-js/-/functions-js-1.3.4.tgz",- "integrity": "sha512-yYVgkECjv7IZEBKBI3EB5Q7R1p0FJ10g8Q9N7SWKIHUU6i6DnbEGHIMFLyQRm1hmiNWD8fL7bRVEYacmTRJhHw==",+ "version": "1.4.0-next.5",+ "resolved": "https://registry.npmjs.org/@supabase/functions-js/-/functions-js-1.4.0-next.5.tgz",+ "integrity": "sha512-y2lPF1+U5e0DbJo3wKbTQsIB+3Vqq3PZ0pOAjt4RhI9MZBl/or88KcAHzBey+lG38NjQtAo9y0yx0r1mZGm8zQ==","requires": {"cross-fetch": "^3.1.5"}},"@supabase/gotrue-js": {- "version": "1.23.0-next.12",- "resolved": "https://registry.npmjs.org/@supabase/gotrue-js/-/gotrue-js-1.23.0-next.12.tgz",- "integrity": "sha512-F+XFCnexNwDHD9JcbqhnJeM10MSBRuLZXWKvEGLjrRSHJdxYm7z+HSf1t8mlvno2Xd97oWUFTr6lSnSQmDM+Bw==",+ "version": "1.23.0-next.24",+ "resolved": "https://registry.npmjs.org/@supabase/gotrue-js/-/gotrue-js-1.23.0-next.24.tgz",+ "integrity": "sha512-fCnDh70OsH6lD3fc1w0cz7lTh3dWyme+TffGDUZCStHPxHVB/yGpGJu8COspWwl+8W6JVLD5bSc/OqNtQ5bh7g==","requires": {"cross-fetch": "^3.1.5"}@@ -35762,9 +35762,9 @@}},"@supabase/postgrest-js": {- "version": "1.0.0-next.2",- "resolved": "https://registry.npmjs.org/@supabase/postgrest-js/-/postgrest-js-1.0.0-next.2.tgz",- "integrity": "sha512-8hg7xbT6w07BjrQRqQT4DOVg9NkcBFdvlpdArriKwOtqKiztVy32HXT/CjPTgMxl9Z4Bc7n2krhS5EKOB7Wmvw==",+ "version": "1.0.0-next.7",+ "resolved": "https://registry.npmjs.org/@supabase/postgrest-js/-/postgrest-js-1.0.0-next.7.tgz",+ "integrity": "sha512-UefMDfIJ0aqZoJhIWLHbrrksIiqH+Sv9uml0sfISNX4nm4Q+hqm0aR32pFzr6VfMP7sXK1PaYKyPqGv0a4h7LA==","requires": {"cross-fetch": "^3.1.5"}@@ -35778,9 +35778,9 @@}},"@supabase/realtime-js": {- "version": "1.8.0-next.13",- "resolved": "https://registry.npmjs.org/@supabase/realtime-js/-/realtime-js-1.8.0-next.13.tgz",- "integrity": "sha512-qHMIXTp7AXd4Iy2vtOBqYJ7C1x7DrgTH3BqrcvQQCqp+xEBAqQdKsiZsbk8mfSJqVMQghksgMT3GT3G9QboBDQ==",+ "version": "1.7.4",+ "resolved": "https://registry.npmjs.org/@supabase/realtime-js/-/realtime-js-1.7.4.tgz",+ "integrity": "sha512-h/Jk3PCLkIVonsNavof/LvHbvF41UD+D+mWcA3m8yHzJ2TLbV3S4XDYId+A3AkvFOAork7Ns/9O8rK0uY4F4zw==","requires": {"@types/phoenix": "^1.5.4","websocket": "^1.0.34"@@ -35792,23 +35792,23 @@"integrity": "sha512-nKIwMc/Ig22s58FxH9lyCJ+hAqp3D4Qq7LDCTlGlzTV7sOeKXFyMQuevwGdCVfIuQbp99QC1y2rS9pyV+R7RFA=="},"@supabase/storage-js": {- "version": "1.8.0-next.3",- "resolved": "https://registry.npmjs.org/@supabase/storage-js/-/storage-js-1.8.0-next.3.tgz",- "integrity": "sha512-3gfrXap+awcgwyw44s0x248Qu4x+yaqpe8JLWEnp/G2hecD+J/7vEJ9MJe+GS0ZL+ZJalnWcDWt1m86fxoDyFg==",+ "version": "1.8.0-next.6",+ "resolved": "https://registry.npmjs.org/@supabase/storage-js/-/storage-js-1.8.0-next.6.tgz",+ "integrity": "sha512-7cLxxvCwlUBe0b6DltI/i/EAFE8RxvouL7FIcW8ysyd30+rAOq14BIbuJjx1PForxQzapcBoaZBUHf+x3xyssw==","requires": {"cross-fetch": "^3.1.5"}},"@supabase/supabase-js": {- "version": "1.36.0-next.14",- "resolved": "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-1.36.0-next.14.tgz",- "integrity": "sha512-e14M4JyRrbFx7MdBFvSO4umJm1nzBUaLhPRwwFWMZfSPPlYmjYdrCQOgHITkE9G+E/QLNFK3x7WthIjLkcODrw==",- "requires": {- "@supabase/functions-js": "^1.3.3",- "@supabase/gotrue-js": "^1.23.0-next.12",- "@supabase/postgrest-js": "^1.0.0-next.2",- "@supabase/realtime-js": "^1.8.0-next.13",- "@supabase/storage-js": "^1.8.0-next.3",+ "version": "1.36.0-next.25",+ "resolved": "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-1.36.0-next.25.tgz",+ "integrity": "sha512-yEzKycD4CJoGbgbFGJsewePBgvjwOe2zMF39/8IiDPc1cb6xxOWa5iwCftzZOYZMKdSL4o8wR1a9XUbK4NqIuQ==",+ "requires": {+ "@supabase/functions-js": "^1.4.0-next.5",+ "@supabase/gotrue-js": "^1.23.0-next.24",+ "@supabase/postgrest-js": "^1.0.0-next.7",+ "@supabase/realtime-js": "1.7.4",+ "@supabase/storage-js": "^1.8.0-next.6","cross-fetch": "^3.1.5"}},diff --git a/studio/package.json b/studio/package.jsonindex 90f953dba49..2a9e82ed0ff 100644--- a/studio/package.json+++ b/studio/package.json@@ -27,7 +27,7 @@"@supabase/postgres-meta": "^0.26.1","@supabase/react-data-grid": "^7.1.0-beta.7","@supabase/shared-types": "^0.1.25",- "@supabase/supabase-js": "^1.36.0-next.14",+ "@supabase/supabase-js": "^1.36.0-next.25","@supabase/ui": "0.37.0-alpha.80","ajv": "^8.6.3","analytics-node": "^3.5.0",