diff --git a/biome.json b/biome.json index 405a298..9623dda 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/1.7.3/schema.json", + "$schema": "https://biomejs.dev/schemas/1.8.3/schema.json", "organizeImports": { "enabled": true }, @@ -24,7 +24,7 @@ "jsxQuoteStyle": "double", "quoteProperties": "asNeeded", "semicolons": "always", - "trailingComma": "es5" + "trailingCommas": "es5" } }, "linter": { diff --git a/package.json b/package.json index f2472f5..47a5bdb 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "build2": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production", "build": "webpack --mode production", "dev": "webpack --mode development --watch", - "format": "npx @biomejs/biome check --apply .", + "format": "npx @biomejs/biome check --write .", "clean": "npx rimraf main.js", "test": "cross-env TS_NODE_COMPILER_OPTIONS={\\\"module\\\":\\\"commonjs\\\"} mocha -r ts-node/register 'tests/**/*.ts' 'pro/tests/**/*.ts'" }, @@ -25,55 +25,55 @@ "author": "", "license": "SEE LICENSE IN LICENSE", "devDependencies": { - "@biomejs/biome": "1.7.3", + "@biomejs/biome": "1.8.3", "@microsoft/microsoft-graph-types": "^2.40.0", - "@types/chai": "^4.3.14", + "@types/chai": "^4.3.16", "@types/chai-as-promised": "^7.1.8", - "@types/jsdom": "^21.1.6", - "@types/lodash": "^4.17.0", + "@types/jsdom": "^21.1.7", + "@types/lodash": "^4.17.7", "@types/mime-types": "^2.1.4", - "@types/mocha": "^10.0.6", + "@types/mocha": "^10.0.7", "@types/mustache": "^4.2.5", - "@types/node": "^20.12.7", + "@types/node": "^20.14.12", "@types/qrcode": "^1.5.5", - "builtin-modules": "^3.3.0", + "builtin-modules": "^4.0.0", "cross-env": "^7.0.3", "dotenv": "^16.4.5", - "esbuild": "^0.20.2", + "esbuild": "^0.23.0", "esbuild-plugin-inline-worker": "^0.1.1", - "jsdom": "^24.0.0", - "mocha": "^10.4.0", + "jsdom": "^24.1.1", + "mocha": "^10.7.0", "npm-check-updates": "^16.14.20", "obsidian": "^1.5.7", - "openapi-typescript": "^7.0.0-rc.0", + "openapi-typescript": "^7.1.0", "ts-loader": "^9.5.1", "ts-node": "^10.9.2", - "tslib": "^2.6.2", - "typescript": "^5.4.5", + "tslib": "^2.6.3", + "typescript": "^5.5.4", "webdav-server": "^2.6.2", - "webpack": "^5.91.0", + "webpack": "^5.93.0", "webpack-cli": "^5.1.4", "worker-loader": "^3.0.8" }, "dependencies": { - "@aws-sdk/client-s3": "^3.563.0", - "@aws-sdk/lib-storage": "^3.563.0", - "@aws-sdk/signature-v4-crt": "^3.556.0", - "@aws-sdk/types": "^3.535.0", - "@azure/msal-node": "^2.7.0", - "@azure/storage-blob": "^12.23.0", + "@aws-sdk/client-s3": "^3.620.0", + "@aws-sdk/lib-storage": "^3.620.0", + "@aws-sdk/signature-v4-crt": "^3.620.0", + "@aws-sdk/types": "^3.609.0", + "@azure/msal-node": "^2.12.0", + "@azure/storage-blob": "^12.24.0", "@fyears/rclone-crypt": "^0.0.7", "@fyears/tsqueue": "^1.0.1", "@microsoft/microsoft-graph-client": "^3.0.7", "@sanity/diff-match-patch": "^3.1.1", - "@smithy/fetch-http-handler": "^2.5.0", - "@smithy/protocol-http": "^3.3.0", - "@smithy/querystring-builder": "^2.2.0", - "acorn": "^8.11.3", + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/querystring-builder": "^3.0.3", + "acorn": "^8.12.1", "aggregate-error": "^5.0.0", "assert": "^2.1.0", - "aws-crt": "^1.21.2", - "box-typescript-sdk-gen": "^1.0.0", + "aws-crt": "^1.21.3", + "box-typescript-sdk-gen": "^1.3.0", "buffer": "^6.0.3", "crypto-browserify": "^3.12.0", "dropbox": "^10.34.0", @@ -83,21 +83,21 @@ "localforage-getitems": "^1.4.2", "localforage-removeitems": "^1.4.0", "lodash": "^4.17.21", - "lucide": "^0.376.1", + "lucide": "^0.416.0", "mime-types": "^2.1.35", "mustache": "^4.2.0", "nanoid": "^5.0.7", "node-diff3": "^3.1.2", - "openapi-fetch": "^0.9.7", + "openapi-fetch": "^0.10.2", "p-queue": "^8.0.1", "path-browserify": "^1.0.1", "pcloud-sdk-js": "^2.0.0", "process": "^0.11.10", "qrcode": "^1.5.3", "rfc4648": "^1.5.3", - "rimraf": "^5.0.5", + "rimraf": "^6.0.1", "stream-browserify": "^3.0.0", - "url": "^0.11.3", + "url": "^0.11.4", "util": "^0.12.5", "webdav": "^5.6.0", "xregexp": "^5.1.1" diff --git a/pro/src/fsKoofr.ts b/pro/src/fsKoofr.ts index fb1e33c..46fe4f4 100644 --- a/pro/src/fsKoofr.ts +++ b/pro/src/fsKoofr.ts @@ -263,7 +263,7 @@ const getAuthMiddleware = ( saveUpdatedConfigFunc: any ) => { const authMiddleware: Middleware = { - async onRequest(req) { + async onRequest({ request }) { const getAccessToken = async () => { if (koofrConfig.refreshToken === "") { throw Error("The user has not manually auth yet."); @@ -291,8 +291,8 @@ const getAuthMiddleware = ( }; const access = await getAccessToken(); - req.headers.set("Authorization", `Bearer ${access}`); - return req; + request.headers.set("Authorization", `Bearer ${access}`); + return request; }, }; return authMiddleware;