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.
- package/CHANGELOG.md +19 -0
- package/dist/core/Lifecycle.d.ts +3 -7
- package/dist/i18n/zh-CN.d.ts +19 -0
- package/dist/index.cjs.js +2 -2
- package/dist/index.esm.js +2 -2
- package/dist/lib/LifecyclePlugins.d.ts +10 -1
- package/dist/plugins/commander/utils.d.ts +2 -0
- package/dist/plugins/transformer/index.d.ts +4 -2
- package/dist/plugins/uploader/alist.d.ts +2 -0
- package/dist/plugins/uploader/index.d.ts +4 -2
- package/dist/types/index.d.ts +10 -0
- package/dist/utils/common.d.ts +3 -4
- package/package.json +1 -1
- package/rollup.config.js +1 -0
|
@@ -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;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -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;
|
package/dist/utils/common.d.ts
CHANGED
|
@@ -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
|
|
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
|
|
119
|
-
export declare const
|
|
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
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 = `/*
|