piclist 1.8.11 → 1.9.0

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.
@@ -1,9 +1,18 @@
1
1
  import { IPlugin, ILifecyclePlugins } from '../types';
2
2
  export declare class LifecyclePlugins implements ILifecyclePlugins {
3
3
  static currentPlugin: string | null;
4
+ /**
5
+ * The name of the plugin
6
+ */
7
+ private readonly name;
8
+ /**
9
+ * The list of plugins
10
+ */
4
11
  private readonly list;
12
+ /**
13
+ * The map of plugin id
14
+ */
5
15
  private readonly pluginIdMap;
6
- private readonly name;
7
16
  constructor(name: string);
8
17
  register(id: string, plugin: IPlugin): void;
9
18
  unregister(pluginName: string): void;
@@ -0,0 +1,2 @@
1
+ import { IPicGo, IStringKeyMap } from '../../types';
2
+ export declare const uploaderTranslators: (ctx: IPicGo) => IStringKeyMap<any>;
@@ -1,3 +1,5 @@
1
- import { IPicGoPlugin } from '../../types';
2
- declare const buildInTransformers: IPicGoPlugin;
1
+ import { IPicGo } from '../../types';
2
+ declare const buildInTransformers: () => {
3
+ register(ctx: IPicGo): void;
4
+ };
3
5
  export default buildInTransformers;
@@ -0,0 +1,2 @@
1
+ import { IPicGo } from '../../types';
2
+ export default function register(ctx: IPicGo): void;
@@ -1,3 +1,5 @@
1
- import { IPicGoPlugin } from '../../types';
2
- declare const buildInUploaders: IPicGoPlugin;
1
+ import { IPicGo } from '../../types';
2
+ declare const buildInUploaders: () => {
3
+ register(ctx: IPicGo): void;
4
+ };
3
5
  export default buildInUploaders;
@@ -248,6 +248,16 @@ export interface ISmmsConfig {
248
248
  token: string;
249
249
  backupDomain?: string;
250
250
  }
251
+ /** 内置alist 图床配置项 */
252
+ export interface IAlistConfig {
253
+ url: string;
254
+ token?: string;
255
+ username?: string;
256
+ password?: string;
257
+ uploadPath?: string;
258
+ webPath?: string;
259
+ customUrl?: string;
260
+ }
251
261
  /** 本地图床配置项 */
252
262
  export interface ILocalConfig {
253
263
  path: string;
@@ -110,11 +110,10 @@ export declare const isInputConfigValid: (config: any) => boolean;
110
110
  export declare function safeParse<T>(str: string): T | string;
111
111
  export declare const forceNumber: (num?: string | number) => number;
112
112
  export declare const isDev: () => boolean;
113
- export declare const isProd: () => boolean;
114
113
  export declare function AddWatermark(img: Buffer, watermarkType: 'text' | 'image', defaultWatermarkFontPath: string, isFullScreenWatermark?: boolean, watermarkDegree?: number, text?: string, watermarkFontPath?: string, watermarkScaleRatio?: number, watermarkColor?: string, watermarkImagePath?: string, position?: sharp.Gravity): Promise<Buffer>;
115
114
  export declare function imageAddWaterMark(img: Buffer, options: IBuildInWaterMarkOptions, defaultWatermarkFontPath: string, logger: ILogger): Promise<Buffer>;
116
- export declare function imageProcess(img: Buffer, options: IBuildInCompressOptions, rawFormat: string, logger: ILogger): Promise<Buffer>;
115
+ export declare function imageCompress(img: Buffer, options: IBuildInCompressOptions, rawFormat: string, logger: ILogger): Promise<Buffer>;
117
116
  export declare function getConvertedFormat(options: IBuildInCompressOptions | undefined, rawFormat: string): string;
118
- export declare const needAddWatermark: (watermarkOptions: IBuildInWaterMarkOptions | undefined, fileExt: string) => boolean;
119
- export declare const needCompress: (compressOptions: IBuildInCompressOptions | undefined, fileExt: string) => boolean;
117
+ export declare const isNeedAddWatermark: (watermarkOptions: IBuildInWaterMarkOptions | undefined, fileExt: string) => boolean;
118
+ export declare const isNeedCompress: (compressOptions: IBuildInCompressOptions | undefined, fileExt: string) => boolean;
120
119
  export declare const removeExif: (img: Buffer, fileExt: string) => Promise<Buffer>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "piclist",
3
- "version": "1.8.11",
3
+ "version": "1.9.0",
4
4
  "description": "Modified PicGo core, A tool for picture uploading",
5
5
  "author": {
6
6
  "name": "Kuingsmile",
package/rollup.config.js CHANGED
@@ -7,6 +7,7 @@ import { string } from 'rollup-plugin-string'
7
7
  import json from '@rollup/plugin-json'
8
8
  import builtins from 'builtins'
9
9
  import replace from '@rollup/plugin-replace'
10
+
10
11
  const version = process.env.VERSION || pkg.version
11
12
  const sourcemap = 'inline'
12
13
  const banner = `/*