piclist 2.3.0 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/bin/picgo-server +2 -2
- package/dist/i18n/zh-CN.d.ts +2 -0
- package/dist/index.js +2 -2
- package/dist/types/index.d.ts +5 -3
- package/dist/utils/runScripts.d.ts +11 -0
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -163,7 +163,7 @@ export interface ISmmsConfig {
|
|
|
163
163
|
}
|
|
164
164
|
/** 内置高级自定义图床 */
|
|
165
165
|
export interface IAdvancedPlistConfig {
|
|
166
|
-
endpoint
|
|
166
|
+
endpoint?: string;
|
|
167
167
|
method?: string;
|
|
168
168
|
formDataKey?: string;
|
|
169
169
|
headers?: string;
|
|
@@ -171,6 +171,7 @@ export interface IAdvancedPlistConfig {
|
|
|
171
171
|
resDataPath?: string;
|
|
172
172
|
customPrefix?: string;
|
|
173
173
|
webPath?: string;
|
|
174
|
+
uploadScriptName?: string;
|
|
174
175
|
}
|
|
175
176
|
/** 内置alist 图床配置项 */
|
|
176
177
|
export interface IAlistConfig {
|
|
@@ -662,7 +663,8 @@ export interface IBuildInListItem {
|
|
|
662
663
|
manualRename?: boolean;
|
|
663
664
|
}
|
|
664
665
|
export interface IUploadResultWithBackup {
|
|
665
|
-
|
|
666
|
-
|
|
666
|
+
ctx?: IPicGo;
|
|
667
|
+
backupCtx?: IPicGo;
|
|
667
668
|
}
|
|
669
|
+
export type IScriptLifecycle = 'onSoftwareOpen' | 'onSoftwareClose' | 'preProcess' | 'beforeTransform' | 'transform' | 'beforeUpload' | 'upload' | 'afterUpload' | 'onUploadSuccess' | 'onUploadFailure' | 'onGalleryRemove';
|
|
668
670
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IPicGo } from '../types';
|
|
2
|
+
export declare class ScriptHandler {
|
|
3
|
+
private ctx;
|
|
4
|
+
private scriptCache;
|
|
5
|
+
private readonly stages;
|
|
6
|
+
constructor(ctx: any);
|
|
7
|
+
refreshCache(): Promise<void>;
|
|
8
|
+
runStage(stage: string, extra?: Record<string, any>): Promise<void>;
|
|
9
|
+
private createSandbox;
|
|
10
|
+
}
|
|
11
|
+
export declare function runScript(ctx: IPicGo, script: string, extra: Record<string, any>): Promise<any>;
|