piclist 2.3.1 → 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.
@@ -163,7 +163,7 @@ export interface ISmmsConfig {
163
163
  }
164
164
  /** 内置高级自定义图床 */
165
165
  export interface IAdvancedPlistConfig {
166
- endpoint: string;
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
- output: IImgInfo[];
666
- backupOutput: IImgInfo[];
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>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "piclist",
3
- "version": "2.3.1",
3
+ "version": "2.3.2",
4
4
  "description": "Modified PicGo core, A tool for picture uploading",
5
5
  "author": {
6
6
  "name": "Kuingsmile",