diff --git a/__mocks__/@nextcloud/axios.ts b/__mocks__/@nextcloud/axios.ts index e9a440f47473b..35cb11bcabf53 100644 --- a/__mocks__/@nextcloud/axios.ts +++ b/__mocks__/@nextcloud/axios.ts @@ -19,8 +19,20 @@ * along with this program. If not, see . * */ + +import type { AxiosInterceptorManager, AxiosResponse, InternalAxiosRequestConfig } from 'axios' + export default { get: async () => ({ status: 200, data: {} }), delete: async () => ({ status: 200, data: {} }), post: async () => ({ status: 200, data: {} }), + + interceptors: { + request: { + use: () => {}, + } as AxiosInterceptorManager, + response: { + use: () => {}, + } as AxiosInterceptorManager, + } } diff --git a/package-lock.json b/package-lock.json index 440d14032f1cd..96b3a66fc2c54 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,7 +29,7 @@ "@nextcloud/paths": "^2.1.0", "@nextcloud/router": "^3.0.1", "@nextcloud/sharing": "^0.2.2", - "@nextcloud/upload": "^1.1.1", + "@nextcloud/upload": "^1.5.0", "@nextcloud/vue": "^8.16.0", "@skjnldsv/sanitize-svg": "^1.0.2", "@vueuse/components": "^10.11.0", @@ -4224,39 +4224,38 @@ "integrity": "sha512-WQ2gDll12T9WD34fdRFgQVgO8bag3gavrAgJ0frN4phlwdJARpE6gO1YvLEMJR0KKgoc+/Ea/A0Pp11I00xBvw==" }, "node_modules/@nextcloud/auth": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@nextcloud/auth/-/auth-2.3.0.tgz", - "integrity": "sha512-PCkRJbML9sXvBENY43vTIERIZJFk2azu08IK6zYOnOZ7cFkD1QlFJtdTCZTImQLg01IXhIm0j0ExEdatHoqz7g==", - "license": "GPL-3.0-or-later", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@nextcloud/auth/-/auth-2.4.0.tgz", + "integrity": "sha512-T5OFltKd0O9Hfj47VrzE7TVjCwqOMHH9JLyjjLUR3pu2MaTY9WL6AjL79sHbFTXUaIkftZgJKu12lHYmqXnL2Q==", "dependencies": { - "@nextcloud/event-bus": "^3.2.0" + "@nextcloud/browser-storage": "^0.4.0", + "@nextcloud/event-bus": "^3.3.1" }, "engines": { "node": "^20.0.0", "npm": "^10.0.0" } }, - "node_modules/@nextcloud/axios": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@nextcloud/axios/-/axios-2.4.0.tgz", - "integrity": "sha512-ARGzT9p45L0sjRIV3JZWGPtMbwgxd4eEMcMJNn58NA7UQIsMkTwHb5pXQjL+5elXY9zp/JMz7n/7SHTp0bkuXQ==", + "node_modules/@nextcloud/auth/node_modules/@nextcloud/browser-storage": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@nextcloud/browser-storage/-/browser-storage-0.4.0.tgz", + "integrity": "sha512-D6XxznxCYmJ3oBCC3p0JB6GZJ2RZ9dgbB1UqtTePXrIvHUMBAeF/YkiGKYxLAVZCZb+NSNZXgAYHm/3LnIUbDg==", "dependencies": { - "@nextcloud/auth": "^2.1.0", - "@nextcloud/router": "^2.1.2", - "axios": "^1.4.0" + "core-js": "3.37.0" }, "engines": { "node": "^20.0.0", - "npm": "^9.0.0" + "npm": "^10.0.0" } }, - "node_modules/@nextcloud/axios/node_modules/@nextcloud/router": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@nextcloud/router/-/router-2.2.1.tgz", - "integrity": "sha512-ZRc/WI0RaksEJMz08H/6LimIdP+1A1xTHThCYEghs7VgAKNp5917vT2OKSpG0cMRbIwk0ongFVt5FB5qjy/iFg==", + "node_modules/@nextcloud/axios": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@nextcloud/axios/-/axios-2.5.1.tgz", + "integrity": "sha512-AA7BPF/rsOZWAiVxqlobGSdD67AEwjOnymZCKUIwEIBArKxYK7OQEqcILDjQwgj6G0e/Vg9Y8zTVsPZp+mlvwA==", "dependencies": { - "@nextcloud/typings": "^1.7.0", - "core-js": "^3.6.4" + "@nextcloud/auth": "^2.3.0", + "@nextcloud/router": "^3.0.1", + "axios": "^1.6.8" }, "engines": { "node": "^20.0.0", @@ -4426,20 +4425,6 @@ "vue": "^2.7.16" } }, - "node_modules/@nextcloud/dialogs/node_modules/@nextcloud/axios": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@nextcloud/axios/-/axios-2.5.0.tgz", - "integrity": "sha512-82LQ5PZA0ZVUnS8QiGoAGOR5kE7EKD84qEEgeZJ+Y7p5iljwi3AT6niQuP7YuHjt3MKM+6jQiyghZk5SquiszQ==", - "dependencies": { - "@nextcloud/auth": "^2.3.0", - "@nextcloud/router": "^3.0.1", - "axios": "^1.6.8" - }, - "engines": { - "node": "^20.0.0", - "npm": "^10.0.0" - } - }, "node_modules/@nextcloud/dialogs/node_modules/@vueuse/core": { "version": "10.11.1", "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.11.1.tgz", @@ -4594,11 +4579,11 @@ } }, "node_modules/@nextcloud/files": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/@nextcloud/files/-/files-3.8.0.tgz", - "integrity": "sha512-5oi61suf2nDcXPTA4BSxl7EomJBCWrmc6ZGaokaj+jREOsSVlS+nR3ID/6eMqZSsqODpAARK56djyUPmiHOLWQ==", + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/@nextcloud/files/-/files-3.9.1.tgz", + "integrity": "sha512-eureE0Hi13QhC7detUUlp5B7NjLLu1JnVLDF0yuNv/My5ETbe3SuWjulAXQ2KH3lvqVjhjgbNoEjH5wHemIG+g==", "dependencies": { - "@nextcloud/auth": "^2.3.0", + "@nextcloud/auth": "^2.4.0", "@nextcloud/capabilities": "^1.2.0", "@nextcloud/l10n": "^3.1.0", "@nextcloud/logger": "^3.0.2", @@ -4606,10 +4591,10 @@ "@nextcloud/router": "^3.0.1", "@nextcloud/sharing": "^0.2.3", "cancelable-promise": "^4.3.1", - "is-svg": "^5.0.1", + "is-svg": "^5.1.0", "typedoc-plugin-missing-exports": "^3.0.0", "typescript-event-target": "^1.1.1", - "webdav": "^5.7.0" + "webdav": "^5.7.1" }, "engines": { "node": "^20.0.0", @@ -4837,20 +4822,21 @@ } }, "node_modules/@nextcloud/upload": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@nextcloud/upload/-/upload-1.1.1.tgz", - "integrity": "sha512-cMEIL3dJtAJVdyQnEqVpBrNlH736KxepXykZZCRKWB5dNxoK3mChMV96a/bCGceR2bdCR9mOY9VQKn2CweA5cA==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@nextcloud/upload/-/upload-1.6.1.tgz", + "integrity": "sha512-DlRYY5gQF5PEU2StLDx5bCvaMBe26FWd4Pb10Ra4eUyPYPAwdSP4w1piRMQro1TRRbeSBizSjd72xeqBZVmKjA==", "dependencies": { - "@nextcloud/auth": "^2.2.1", - "@nextcloud/axios": "^2.4.0", - "@nextcloud/dialogs": "^5.2.0", - "@nextcloud/files": "^3.1.1", - "@nextcloud/l10n": "^2.2.0", - "@nextcloud/logger": "^2.7.0", - "@nextcloud/paths": "^2.1.0", + "@nextcloud/auth": "^2.4.0", + "@nextcloud/axios": "^2.5.1", + "@nextcloud/dialogs": "^5.3.7", + "@nextcloud/files": "^3.9.0", + "@nextcloud/l10n": "^3.1.0", + "@nextcloud/logger": "^3.0.2", + "@nextcloud/paths": "^2.2.1", "@nextcloud/router": "^3.0.0", - "axios": "^1.6.8", - "buffer": "^6.0.3", + "@nextcloud/sharing": "^0.2.3", + "axios": "^1.7.7", + "axios-retry": "^4.5.0", "crypto-browserify": "^3.12.0", "p-cancelable": "^4.0.1", "p-queue": "^8.0.0", @@ -4865,29 +4851,12 @@ "vue": "^2.7.16" } }, - "node_modules/@nextcloud/upload/node_modules/@nextcloud/l10n": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@nextcloud/l10n/-/l10n-2.2.0.tgz", - "integrity": "sha512-UAM2NJcl/NR46MANSF7Gr7q8/Up672zRyGrxLpN3k4URNmWQM9upkbRME+1K3T29wPrUyOIbQu710ZjvZafqFA==", - "dependencies": { - "@nextcloud/router": "^2.1.2", - "@nextcloud/typings": "^1.7.0", - "dompurify": "^3.0.3", - "escape-html": "^1.0.3", - "node-gettext": "^3.0.0" - }, - "engines": { - "node": "^20.0.0", - "npm": "^9.0.0" - } - }, - "node_modules/@nextcloud/upload/node_modules/@nextcloud/l10n/node_modules/@nextcloud/router": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@nextcloud/router/-/router-2.2.1.tgz", - "integrity": "sha512-ZRc/WI0RaksEJMz08H/6LimIdP+1A1xTHThCYEghs7VgAKNp5917vT2OKSpG0cMRbIwk0ongFVt5FB5qjy/iFg==", + "node_modules/@nextcloud/upload/node_modules/@nextcloud/logger": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@nextcloud/logger/-/logger-3.0.2.tgz", + "integrity": "sha512-wByt0R0/6QC44RBpaJr1MWghjjOxk/pRbACHo/ZWWKht1qYbJRHB4GtEi+35KEIHY07ZpqxiDk6dIRuN7sXYWQ==", "dependencies": { - "@nextcloud/typings": "^1.7.0", - "core-js": "^3.6.4" + "@nextcloud/auth": "^2.3.0" }, "engines": { "node": "^20.0.0", @@ -8016,6 +7985,17 @@ "proxy-from-env": "^1.1.0" } }, + "node_modules/axios-retry": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/axios-retry/-/axios-retry-4.5.0.tgz", + "integrity": "sha512-aR99oXhpEDGo0UuAlYcn2iGRds30k366Zfa05XWScR9QaQD4JYiP3/1Qt1u7YlefUOK+cn0CcwoL1oefavQUlQ==", + "dependencies": { + "is-retry-allowed": "^2.2.0" + }, + "peerDependencies": { + "axios": "0.x || 1.x" + } + }, "node_modules/b4a": { "version": "1.6.6", "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.6.tgz", @@ -8779,6 +8759,7 @@ "version": "6.0.3", "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "dev": true, "funding": [ { "type": "github", @@ -8793,6 +8774,7 @@ "url": "https://feross.org/support" } ], + "peer": true, "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" @@ -15899,6 +15881,17 @@ "node": ">=0.10.0" } }, + "node_modules/is-retry-allowed": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-2.2.0.tgz", + "integrity": "sha512-XVm7LOeLpTW4jV19QSH38vkswxoLud8sQ57YwJVTPWdiaI9I8keEhGFpBlslyVsgdQy4Opg8QOLb8YRgsyZiQg==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-set": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", @@ -15954,12 +15947,11 @@ } }, "node_modules/is-svg": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-5.0.1.tgz", - "integrity": "sha512-mLYxDsfisQWdS4+gSblAwhATDoNMS/tx8G7BKA+aBIf7F0m1iUwMvuKAo6mW4WMleQAEE50I1Zqef9yMMfHk3w==", - "license": "MIT", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-5.1.0.tgz", + "integrity": "sha512-uVg5yifaTxHoefNf5Jcx+i9RZe2OBYd/UStp1umx+EERa4xGRa3LLGXjoEph43qUORC0qkafUgrXZ6zzK89yGA==", "dependencies": { - "fast-xml-parser": "^4.1.3" + "fast-xml-parser": "^4.4.1" }, "engines": { "node": ">=14.16" diff --git a/package.json b/package.json index 16d10d58bf44a..6ee0ff7312a7d 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "@nextcloud/paths": "^2.1.0", "@nextcloud/router": "^3.0.1", "@nextcloud/sharing": "^0.2.2", - "@nextcloud/upload": "^1.1.1", + "@nextcloud/upload": "^1.5.0", "@nextcloud/vue": "^8.16.0", "@skjnldsv/sanitize-svg": "^1.0.2", "@vueuse/components": "^10.11.0",