nuxt4, and some changes on packages
This commit is contained in:
+3
-7
@@ -32,6 +32,7 @@ class SupabaseClient {
|
||||
* @param options.auth.persistSession Set to "true" if you want to automatically save the user session into local storage.
|
||||
* @param options.auth.detectSessionInUrl Set to "true" if you want to automatically detects OAuth grants in the URL and signs in the user.
|
||||
* @param options.realtime Options passed along to realtime-js constructor.
|
||||
* @param options.storage Options passed along to the storage-js constructor.
|
||||
* @param options.global.fetch A custom fetch implementation.
|
||||
* @param options.global.headers Any additional headers to send with each network request.
|
||||
*/
|
||||
@@ -79,6 +80,7 @@ class SupabaseClient {
|
||||
schema: settings.db.schema,
|
||||
fetch: this.fetch,
|
||||
});
|
||||
this.storage = new storage_js_1.StorageClient(this.storageUrl.href, this.headers, this.fetch, options === null || options === void 0 ? void 0 : options.storage);
|
||||
if (!settings.accessToken) {
|
||||
this._listenForAuthEvents();
|
||||
}
|
||||
@@ -92,12 +94,6 @@ class SupabaseClient {
|
||||
customFetch: this.fetch,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Supabase Storage allows you to manage user-generated content, such as photos or videos.
|
||||
*/
|
||||
get storage() {
|
||||
return new storage_js_1.StorageClient(this.storageUrl.href, this.headers, this.fetch);
|
||||
}
|
||||
/**
|
||||
* Perform a query on a table or a view.
|
||||
*
|
||||
@@ -182,7 +178,7 @@ class SupabaseClient {
|
||||
return yield this.accessToken();
|
||||
}
|
||||
const { data } = yield this.auth.getSession();
|
||||
return (_b = (_a = data.session) === null || _a === void 0 ? void 0 : _a.access_token) !== null && _b !== void 0 ? _b : null;
|
||||
return (_b = (_a = data.session) === null || _a === void 0 ? void 0 : _a.access_token) !== null && _b !== void 0 ? _b : this.supabaseKey;
|
||||
});
|
||||
}
|
||||
_initSupabaseAuthClient({ autoRefreshToken, persistSession, detectSessionInUrl, storage, storageKey, flowType, lock, debug, }, headers, fetch) {
|
||||
|
||||
+27
@@ -38,4 +38,31 @@ const createClient = (supabaseUrl, supabaseKey, options) => {
|
||||
return new SupabaseClient_1.default(supabaseUrl, supabaseKey, options);
|
||||
};
|
||||
exports.createClient = createClient;
|
||||
// Check for Node.js <= 18 deprecation
|
||||
function shouldShowDeprecationWarning() {
|
||||
// Skip in browser environments
|
||||
if (typeof window !== 'undefined') {
|
||||
return false;
|
||||
}
|
||||
// Skip if process is not available (e.g., Edge Runtime)
|
||||
if (typeof process === 'undefined') {
|
||||
return false;
|
||||
}
|
||||
// Use dynamic property access to avoid Next.js Edge Runtime static analysis warnings
|
||||
const processVersion = process['version'];
|
||||
if (processVersion === undefined || processVersion === null) {
|
||||
return false;
|
||||
}
|
||||
const versionMatch = processVersion.match(/^v(\d+)\./);
|
||||
if (!versionMatch) {
|
||||
return false;
|
||||
}
|
||||
const majorVersion = parseInt(versionMatch[1], 10);
|
||||
return majorVersion <= 18;
|
||||
}
|
||||
if (shouldShowDeprecationWarning()) {
|
||||
console.warn(`⚠️ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. ` +
|
||||
`Please upgrade to Node.js 20 or later. ` +
|
||||
`For more information, visit: https://github.com/orgs/supabase/discussions/37217`);
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -31,6 +31,7 @@ function applySettingDefaults(options, defaults) {
|
||||
db: Object.assign(Object.assign({}, DEFAULT_DB_OPTIONS), dbOptions),
|
||||
auth: Object.assign(Object.assign({}, DEFAULT_AUTH_OPTIONS), authOptions),
|
||||
realtime: Object.assign(Object.assign({}, DEFAULT_REALTIME_OPTIONS), realtimeOptions),
|
||||
storage: {},
|
||||
global: Object.assign(Object.assign(Object.assign({}, DEFAULT_GLOBAL_OPTIONS), globalOptions), { headers: Object.assign(Object.assign({}, ((_a = DEFAULT_GLOBAL_OPTIONS === null || DEFAULT_GLOBAL_OPTIONS === void 0 ? void 0 : DEFAULT_GLOBAL_OPTIONS.headers) !== null && _a !== void 0 ? _a : {})), ((_b = globalOptions === null || globalOptions === void 0 ? void 0 : globalOptions.headers) !== null && _b !== void 0 ? _b : {})) }),
|
||||
accessToken: () => __awaiter(this, void 0, void 0, function* () { return ''; }),
|
||||
};
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = void 0;
|
||||
exports.version = '2.49.8';
|
||||
exports.version = '2.55.0';
|
||||
//# sourceMappingURL=version.js.map
|
||||
+26
-13
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@supabase/supabase-js",
|
||||
"version": "2.49.8",
|
||||
"version": "2.55.0",
|
||||
"description": "Isomorphic Javascript client for Supabase",
|
||||
"keywords": [
|
||||
"javascript",
|
||||
@@ -26,35 +26,48 @@
|
||||
"build": "run-s clean format build:*",
|
||||
"build:main": "tsc -p tsconfig.json",
|
||||
"build:module": "tsc -p tsconfig.module.json",
|
||||
"build:umd": "webpack",
|
||||
"build:umd": "webpack --env mode=production",
|
||||
"types-generate": "dts-gen -m '@supabase/supabase-js' -s",
|
||||
"test": "run-s test:types test:run",
|
||||
"test:run": "jest --runInBand",
|
||||
"test:coverage": "jest --runInBand --coverage",
|
||||
"test:db": "cd infra/db && docker-compose down && docker-compose up -d && sleep 5",
|
||||
"test:all": "run-s test:types test:run test:integration test:integration:browser",
|
||||
"test:run": "jest --runInBand --detectOpenHandles",
|
||||
"test:unit": "jest --runInBand --detectOpenHandles test/unit",
|
||||
"test:coverage": "jest --runInBand --coverage --testPathIgnorePatterns=\"test/integration|test/deno\"",
|
||||
"test:integration": "jest --runInBand --detectOpenHandles test/integration.test.ts",
|
||||
"test:integration:browser": "deno test --allow-all test/integration.browser.test.ts",
|
||||
"test:edge-functions": "deno test --allow-all --no-check test/deno/edge-functions-integration.test.ts",
|
||||
"test:watch": "jest --watch --verbose false --silent false",
|
||||
"test:clean": "cd infra/db && docker-compose down",
|
||||
"test:types": "run-s build:module && tsd --files test/*.test-d.ts",
|
||||
"test:node:playwright": "cd test/integration/node-browser && npm install && cp ../../../dist/umd/supabase.js . && npm run test",
|
||||
"test:bun": "cd test/integration/bun && bun install && bun test",
|
||||
"test:types": "run-s build:module && tsd --files test/types/*.test-d.ts && jsr publish --dry-run",
|
||||
"docs": "typedoc --entryPoints src/index.ts --out docs/v2 --includes src/**/*.ts",
|
||||
"docs:json": "typedoc --entryPoints src/index.ts --includes src/**/*.ts --json docs/v2/spec.json --excludeExternals",
|
||||
"serve:coverage": "npm run test:coverage && serve test/coverage"
|
||||
"serve:coverage": "npm run test:coverage && serve test/coverage",
|
||||
"update:test-deps": "npm run build && npm pack && cp supabase-supabase-js-*.tgz test/integration/expo/supabase-supabase-js-0.0.0-automated.tgz && cp supabase-supabase-js-*.tgz test/integration/next/supabase-supabase-js-0.0.0-automated.tgz && cp supabase-supabase-js-*.tgz test/deno/supabase-supabase-js-0.0.0-automated.tgz && cp supabase-supabase-js-*.tgz test/integration/bun/supabase-supabase-js-0.0.0-automated.tgz && cd test/integration/expo && npm install && cd ../next && npm install --legacy-peer-deps && cd ../../deno && npm install && cd ../integration/bun && bun install",
|
||||
"update:test-deps:expo": "npm run build && npm pack && cp supabase-supabase-js-*.tgz test/integration/expo/supabase-supabase-js-0.0.0-automated.tgz && cd test/integration/expo && npm install",
|
||||
"update:test-deps:next": "npm run build && npm pack && cp supabase-supabase-js-*.tgz test/integration/next/supabase-supabase-js-0.0.0-automated.tgz && cd test/integration/next && npm install --legacy-peer-deps",
|
||||
"update:test-deps:deno": "npm run build && npm pack && cp supabase-supabase-js-*.tgz test/deno/supabase-supabase-js-0.0.0-automated.tgz && cd test/deno && npm install",
|
||||
"update:test-deps:bun": "npm run build && npm pack && cp supabase-supabase-js-*.tgz test/integration/bun/supabase-supabase-js-0.0.0-automated.tgz && cd test/integration/bun && bun install"
|
||||
},
|
||||
"dependencies": {
|
||||
"@supabase/auth-js": "2.69.1",
|
||||
"@supabase/functions-js": "2.4.4",
|
||||
"@supabase/auth-js": "2.71.1",
|
||||
"@supabase/functions-js": "2.4.5",
|
||||
"@supabase/node-fetch": "2.6.15",
|
||||
"@supabase/postgrest-js": "1.19.4",
|
||||
"@supabase/realtime-js": "2.11.2",
|
||||
"@supabase/storage-js": "2.7.1"
|
||||
"@supabase/realtime-js": "2.15.1",
|
||||
"@supabase/storage-js": "^2.10.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sebbo2002/semantic-release-jsr": "^1.0.0",
|
||||
"@solana/wallet-standard-features": "^1.3.0",
|
||||
"@types/jest": "^29.2.5",
|
||||
"husky": "^4.3.0",
|
||||
"husky": "^4.3.8",
|
||||
"jest": "^29.3.1",
|
||||
"jsr": "^0.13.5",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "^2.5.1",
|
||||
"pretty-quick": "^3.1.3",
|
||||
"puppeteer": "^24.9.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"semantic-release-plugin-update-version-in-files": "^1.1.0",
|
||||
"serve": "^14.2.1",
|
||||
|
||||
Reference in New Issue
Block a user