Compare commits
2 Commits
7db9e0208a
...
3805d361d7
Author | SHA1 | Date | |
---|---|---|---|
3805d361d7 | |||
18f5a05c1d |
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@push.rocks/smartwebdav",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.4",
|
||||
"private": false,
|
||||
"description": "A TypeScript library for easy interaction with WebDAV servers, including file and directory management.",
|
||||
"main": "dist_ts/index.js",
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/smartwebdav',
|
||||
version: '1.0.3',
|
||||
version: '1.0.4',
|
||||
description: 'A TypeScript library for easy interaction with WebDAV servers, including file and directory management.'
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import * as plugins from './plugins.js';
|
|||
|
||||
export interface IWebdavClientOptions {
|
||||
serverUrl: string;
|
||||
authType: plugins.webdav.AuthType;
|
||||
authType?: plugins.webdav.AuthType;
|
||||
username?: string;
|
||||
password?: string;
|
||||
}
|
||||
|
@ -11,7 +11,11 @@ export class WebdavClient {
|
|||
wdClient: plugins.webdav.WebDAVClient;
|
||||
constructor(optionsArg: IWebdavClientOptions) {
|
||||
this.wdClient = plugins.webdav.createClient(optionsArg.serverUrl, {
|
||||
authType: optionsArg.authType,
|
||||
...optionsArg.authType ? {
|
||||
authType: optionsArg.authType,
|
||||
} : {
|
||||
authType: plugins.webdav.AuthType.Password,
|
||||
},
|
||||
...(optionsArg.username
|
||||
? {
|
||||
username: optionsArg.username,
|
||||
|
|
Loading…
Reference in New Issue
Block a user