fix(core): update
This commit is contained in:
33
ts/classes.smartexpose.ts
Normal file
33
ts/classes.smartexpose.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import type { ExposeProvider } from './classes.exposeprovider.js';
|
||||
import { WebDavExposeProvider } from './classes.exposeprovider.webdav.js';
|
||||
import * as plugins from './plugins.js';
|
||||
|
||||
export interface ISmartExposeOptions {
|
||||
deleteAfterMillis?: number,
|
||||
privateUrl?: boolean,
|
||||
}
|
||||
|
||||
export class SmartExpose {
|
||||
// STATIC
|
||||
public static createWithWebdav(optionsArg: {
|
||||
webdavCredentials: plugins.smartwebdav.IWebdavClientOptions,
|
||||
webdavSubPath: string,
|
||||
exposedBaseUrl: string,
|
||||
exposeOptions: ISmartExposeOptions,
|
||||
}) {
|
||||
const provider = new WebDavExposeProvider({
|
||||
webdavCredentials: optionsArg.webdavCredentials,
|
||||
webdavSubPath: optionsArg.webdavSubPath,
|
||||
});
|
||||
const smartexposeInstance = new SmartExpose(provider, optionsArg.exposeOptions);
|
||||
return smartexposeInstance;
|
||||
}
|
||||
|
||||
// INSTANCE
|
||||
public taskmanager: plugins.taskbuffer.TaskManager;
|
||||
public options: ISmartExposeOptions;
|
||||
|
||||
constructor(provider: ExposeProvider, optionsArg: ISmartExposeOptions) {
|
||||
this.options = optionsArg;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user