summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2023-06-30 09:57:40 +0200
committerJohn Molakvoæ <skjnldsv@protonmail.com>2023-07-05 16:20:33 +0200
commit18f88a7042087f4ea93d66290ee6196b19a5db78 (patch)
treec1126000dcad7eb4163950618575078d4ef34f8c
parent28c2d9e9063b05ad6eff9a227764a9571db4fcbe (diff)
downloadnextcloud-server-18f88a7042087f4ea93d66290ee6196b19a5db78.tar.gz
nextcloud-server-18f88a7042087f4ea93d66290ee6196b19a5db78.zip
chore: update webdav to 5.2.2
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
-rw-r--r--apps/files/src/services/WebdavClient.ts11
-rw-r--r--jest.config.ts1
-rw-r--r--package-lock.json14
-rw-r--r--package.json2
4 files changed, 17 insertions, 11 deletions
diff --git a/apps/files/src/services/WebdavClient.ts b/apps/files/src/services/WebdavClient.ts
index 0630e695afa..ae2ab27b9db 100644
--- a/apps/files/src/services/WebdavClient.ts
+++ b/apps/files/src/services/WebdavClient.ts
@@ -19,10 +19,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-import { createClient, getPatcher, RequestOptions } from 'webdav'
-import { request } from '../../../../node_modules/webdav/dist/node/request.js'
+import type { RequestOptions, Response } from 'webdav'
+
+import { createClient, getPatcher } from 'webdav'
import { generateRemoteUrl } from '@nextcloud/router'
import { getCurrentUser, getRequestToken } from '@nextcloud/auth'
+import { request } from 'webdav/dist/node/request.js'
export const rootPath = `/files/${getCurrentUser()?.uid}`
export const defaultRootUrl = generateRemoteUrl('dav' + rootPath)
@@ -40,7 +42,10 @@ export const getClient = (rootUrl = defaultRootUrl) => {
* @see https://github.com/perry-mitchell/webdav-client/blob/8d9694613c978ce7404e26a401c39a41f125f87f/source/request.ts
*/
const patcher = getPatcher()
- patcher.patch('request', (options: RequestOptions) => {
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
+ // @ts-ignore
+ // https://github.com/perry-mitchell/hot-patcher/issues/6
+ patcher.patch('request', (options: RequestOptions): Promise<Response> => {
if (options.headers?.method) {
options.method = options.headers.method
delete options.headers.method
diff --git a/jest.config.ts b/jest.config.ts
index 7e0ae631cd6..97a2bdf576e 100644
--- a/jest.config.ts
+++ b/jest.config.ts
@@ -28,6 +28,7 @@ const ignorePatterns = [
'@nextcloud/vue',
'ansi-regex',
'char-regex',
+ 'is-svg',
'splitpanes',
'string-length',
'strip-ansi',
diff --git a/package-lock.json b/package-lock.json
index ed0849418e1..56007cef2c2 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -89,7 +89,7 @@
"vuedraggable": "^2.24.3",
"vuex": "^3.6.2",
"vuex-router-sync": "^5.0.0",
- "webdav": "^5.2.1"
+ "webdav": "^5.2.2"
},
"devDependencies": {
"@babel/node": "^7.20.7",
@@ -26313,9 +26313,9 @@
}
},
"node_modules/webdav": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/webdav/-/webdav-5.2.1.tgz",
- "integrity": "sha512-GY01OAoLbKeLhMvHjfe8CLU9JMI/WKuyc5OUGV1P7lXP5N16lmZNRStFfIYyn5CTlDagEgVocAKekCq9Hrj/MA==",
+ "version": "5.2.2",
+ "resolved": "https://registry.npmjs.org/webdav/-/webdav-5.2.2.tgz",
+ "integrity": "sha512-CTnhTTKug7pKbMqcvrnGNr4rV9qhWXV1sLk1PpN4BOskqDT+cEfFx4Y4VlcFXUX6lSUFsQBm9Ka8+6dIe0doQQ==",
"dependencies": {
"@buttercup/fetch": "^0.1.1",
"base-64": "^1.0.0",
@@ -46961,9 +46961,9 @@
"optional": true
},
"webdav": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/webdav/-/webdav-5.2.1.tgz",
- "integrity": "sha512-GY01OAoLbKeLhMvHjfe8CLU9JMI/WKuyc5OUGV1P7lXP5N16lmZNRStFfIYyn5CTlDagEgVocAKekCq9Hrj/MA==",
+ "version": "5.2.2",
+ "resolved": "https://registry.npmjs.org/webdav/-/webdav-5.2.2.tgz",
+ "integrity": "sha512-CTnhTTKug7pKbMqcvrnGNr4rV9qhWXV1sLk1PpN4BOskqDT+cEfFx4Y4VlcFXUX6lSUFsQBm9Ka8+6dIe0doQQ==",
"requires": {
"@buttercup/fetch": "^0.1.1",
"base-64": "^1.0.0",
diff --git a/package.json b/package.json
index 17bff96d299..05bd3d78044 100644
--- a/package.json
+++ b/package.json
@@ -115,7 +115,7 @@
"vuedraggable": "^2.24.3",
"vuex": "^3.6.2",
"vuex-router-sync": "^5.0.0",
- "webdav": "^5.2.1"
+ "webdav": "^5.2.2"
},
"devDependencies": {
"@babel/node": "^7.20.7",