Compare commits

..

No commits in common. "3805d361d75d7ac2670a6d0e2b384a6204c2114b" and "7db9e0208aed11dc4518f02b72cc0fe2678dd1b7" have entirely different histories.

3 changed files with 4 additions and 8 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@push.rocks/smartwebdav", "name": "@push.rocks/smartwebdav",
"version": "1.0.4", "version": "1.0.3",
"private": false, "private": false,
"description": "A TypeScript library for easy interaction with WebDAV servers, including file and directory management.", "description": "A TypeScript library for easy interaction with WebDAV servers, including file and directory management.",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@push.rocks/smartwebdav', name: '@push.rocks/smartwebdav',
version: '1.0.4', version: '1.0.3',
description: 'A TypeScript library for easy interaction with WebDAV servers, including file and directory management.' description: 'A TypeScript library for easy interaction with WebDAV servers, including file and directory management.'
} }

View File

@ -2,7 +2,7 @@ import * as plugins from './plugins.js';
export interface IWebdavClientOptions { export interface IWebdavClientOptions {
serverUrl: string; serverUrl: string;
authType?: plugins.webdav.AuthType; authType: plugins.webdav.AuthType;
username?: string; username?: string;
password?: string; password?: string;
} }
@ -11,11 +11,7 @@ export class WebdavClient {
wdClient: plugins.webdav.WebDAVClient; wdClient: plugins.webdav.WebDAVClient;
constructor(optionsArg: IWebdavClientOptions) { constructor(optionsArg: IWebdavClientOptions) {
this.wdClient = plugins.webdav.createClient(optionsArg.serverUrl, { this.wdClient = plugins.webdav.createClient(optionsArg.serverUrl, {
...optionsArg.authType ? { authType: optionsArg.authType,
authType: optionsArg.authType,
} : {
authType: plugins.webdav.AuthType.Password,
},
...(optionsArg.username ...(optionsArg.username
? { ? {
username: optionsArg.username, username: optionsArg.username,