diff --git a/package-lock.json b/package-lock.json index a5fd0631..16eb753e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,7 @@ "pify": "^6.1.0", "url-join": "^5.0.0", "uuid": "^9.0.1", - "webdav": "^5.3.1" + "webdav": "^5.5.0" }, "devDependencies": { "@babel/cli": "^7.23.4", @@ -1932,7 +1932,7 @@ "url-parse": "^1.5.10" } }, - "node_modules/@buttercup/dropbox-client/node_modules/@buttercup/fetch": { + "node_modules/@buttercup/fetch": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/@buttercup/fetch/-/fetch-0.2.1.tgz", "integrity": "sha512-sCgECOx8wiqY8NN1xN22BqqKzXYIG2AicNLlakOAI4f0WgyLVUbAigMf8CZhBtJxdudTcB1gD5lciqi44jwJvg==", @@ -1940,14 +1940,6 @@ "node-fetch": "^3.3.0" } }, - "node_modules/@buttercup/fetch": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@buttercup/fetch/-/fetch-0.1.2.tgz", - "integrity": "sha512-mDBtsysQ0Gnrp4FamlRJGpu7HUHwbyLC4uUav1I7QAqThFAa/4d1cdZCxrV5gKvh6zO1fu95bILNJi4Y2hALhQ==", - "optionalDependencies": { - "node-fetch": "^3.3.0" - } - }, "node_modules/@buttercup/googledrive-client": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@buttercup/googledrive-client/-/googledrive-client-2.3.0.tgz", @@ -1964,14 +1956,6 @@ "node": ">=16" } }, - "node_modules/@buttercup/googledrive-client/node_modules/@buttercup/fetch": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@buttercup/fetch/-/fetch-0.2.1.tgz", - "integrity": "sha512-sCgECOx8wiqY8NN1xN22BqqKzXYIG2AicNLlakOAI4f0WgyLVUbAigMf8CZhBtJxdudTcB1gD5lciqi44jwJvg==", - "optionalDependencies": { - "node-fetch": "^3.3.0" - } - }, "node_modules/@colors/colors": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", @@ -10780,11 +10764,11 @@ } }, "node_modules/webdav": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/webdav/-/webdav-5.3.1.tgz", - "integrity": "sha512-wzZdTHtMuSIXqHGBznc8FM2L94Mc/17Tbn9ppoMybRO0bjWOSIeScdVXWX5qqHsg00EjfiOcwMqGFx6ghIhccQ==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/webdav/-/webdav-5.5.0.tgz", + "integrity": "sha512-SHSDe6n8lBuwwyX+uePB1N1Yn35ebd3locl/LbADMWpcEoowyFdIbnH3fv17T4Jf2tOa1Vwjr/Lld3t0dOio1w==", "dependencies": { - "@buttercup/fetch": "^0.1.1", + "@buttercup/fetch": "^0.2.1", "base-64": "^1.0.0", "byte-length": "^1.0.2", "fast-xml-parser": "^4.2.4", @@ -12771,22 +12755,12 @@ "layerr": "^2.0.1", "node-fetch": "^3.3.2", "url-parse": "^1.5.10" - }, - "dependencies": { - "@buttercup/fetch": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@buttercup/fetch/-/fetch-0.2.1.tgz", - "integrity": "sha512-sCgECOx8wiqY8NN1xN22BqqKzXYIG2AicNLlakOAI4f0WgyLVUbAigMf8CZhBtJxdudTcB1gD5lciqi44jwJvg==", - "requires": { - "node-fetch": "^3.3.0" - } - } } }, "@buttercup/fetch": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@buttercup/fetch/-/fetch-0.1.2.tgz", - "integrity": "sha512-mDBtsysQ0Gnrp4FamlRJGpu7HUHwbyLC4uUav1I7QAqThFAa/4d1cdZCxrV5gKvh6zO1fu95bILNJi4Y2hALhQ==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@buttercup/fetch/-/fetch-0.2.1.tgz", + "integrity": "sha512-sCgECOx8wiqY8NN1xN22BqqKzXYIG2AicNLlakOAI4f0WgyLVUbAigMf8CZhBtJxdudTcB1gD5lciqi44jwJvg==", "requires": { "node-fetch": "^3.3.0" } @@ -12802,16 +12776,6 @@ "layerr": "^2.0.1", "node-fetch": "^3.3.2", "url-parse": "^1.5.10" - }, - "dependencies": { - "@buttercup/fetch": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@buttercup/fetch/-/fetch-0.2.1.tgz", - "integrity": "sha512-sCgECOx8wiqY8NN1xN22BqqKzXYIG2AicNLlakOAI4f0WgyLVUbAigMf8CZhBtJxdudTcB1gD5lciqi44jwJvg==", - "requires": { - "node-fetch": "^3.3.0" - } - } } }, "@colors/colors": { @@ -19412,11 +19376,11 @@ "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==" }, "webdav": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/webdav/-/webdav-5.3.1.tgz", - "integrity": "sha512-wzZdTHtMuSIXqHGBznc8FM2L94Mc/17Tbn9ppoMybRO0bjWOSIeScdVXWX5qqHsg00EjfiOcwMqGFx6ghIhccQ==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/webdav/-/webdav-5.5.0.tgz", + "integrity": "sha512-SHSDe6n8lBuwwyX+uePB1N1Yn35ebd3locl/LbADMWpcEoowyFdIbnH3fv17T4Jf2tOa1Vwjr/Lld3t0dOio1w==", "requires": { - "@buttercup/fetch": "^0.1.1", + "@buttercup/fetch": "^0.2.1", "base-64": "^1.0.0", "byte-length": "^1.0.2", "fast-xml-parser": "^4.2.4", diff --git a/package.json b/package.json index b256ee94..37b08077 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "pify": "^6.1.0", "url-join": "^5.0.0", "uuid": "^9.0.1", - "webdav": "^5.3.1" + "webdav": "^5.5.0" }, "devDependencies": { "@babel/cli": "^7.23.4", diff --git a/source/datasources/WebDAVDatasource.ts b/source/datasources/WebDAVDatasource.ts index 471aec24..f7ab79d0 100644 --- a/source/datasources/WebDAVDatasource.ts +++ b/source/datasources/WebDAVDatasource.ts @@ -1,4 +1,5 @@ -import { WebDAVClient } from "webdav"; +import { AuthType, WebDAVClient } from "webdav"; +import type { createClient as createWebDAVClient } from "webdav"; import pathPosix from "path-posix"; import { TextDatasource } from "./TextDatasource.js"; import { fireInstantiationHandlers, registerDatasource } from "./register.js"; @@ -39,9 +40,12 @@ export default class WebDAVDatasource extends TextDatasource { }; const { endpoint, password, path, username } = (this._config = datasourceConfig); this._path = path; - const createClient = getSharedAppEnv().getProperty("net/webdav/v1/newClient"); + const createClient = getSharedAppEnv().getProperty( + "net/webdav/v1/newClient" + ) as typeof createWebDAVClient; if (typeof username === "string" && typeof password === "string") { this._client = createClient(endpoint, { + authType: AuthType.Auto, username, password, maxBodyLength: MAX_DATA_SIZE, diff --git a/source/facades/tools.ts b/source/facades/tools.ts index 8a51224f..082feb33 100644 --- a/source/facades/tools.ts +++ b/source/facades/tools.ts @@ -50,8 +50,8 @@ export function createFieldDescriptor( valueType: valueType ? valueType : entryPropertyType === "attribute" - ? null - : getEntryPropertyValueType(entry, entryPropertyName), + ? null + : getEntryPropertyValueType(entry, entryPropertyName), formatting, removeable }; diff --git a/source/io/VaultFormatA.ts b/source/io/VaultFormatA.ts index be12ea67..b39b1034 100644 --- a/source/io/VaultFormatA.ts +++ b/source/io/VaultFormatA.ts @@ -349,8 +349,8 @@ export class VaultFormatA extends VaultFormat { const type = !item.originalValue ? EntryChangeType.Created : typeof item.newValue === "string" - ? EntryChangeType.Modified - : EntryChangeType.Deleted; + ? EntryChangeType.Modified + : EntryChangeType.Deleted; const change: EntryChange = { property: item.property, type,