universal-picgo 3.0.0 → 3.0.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/dist/index.d.ts +1 -0
- package/dist/index.js +9182 -9488
- package/dist/package.json +3 -3
- package/dist/src/config/DefaultRecognition.d.ts +1 -2
- package/dist/src/config/MaskUtils.d.ts +0 -1
- package/dist/src/config/UnifiedConfigFacade.d.ts +0 -1
- package/dist/src/config/UnifiedConfigTypes.d.ts +0 -1
- package/dist/src/config/V3MigrationService.d.ts +0 -1
- package/dist/src/core/ExternalPicgo.d.ts +0 -1
- package/dist/src/core/Lifecycle.d.ts +1 -2
- package/dist/src/core/PicListUploader.d.ts +0 -1
- package/dist/src/core/UniversalPicGo.d.ts +6 -7
- package/dist/src/db/config/index.d.ts +1 -2
- package/dist/src/db/externalPicGo/index.d.ts +2 -3
- package/dist/src/db/pluginLoder/index.d.ts +1 -2
- package/dist/src/headless/UniversalPicGoHeadlessManager.d.ts +1 -2
- package/dist/src/headless/types.d.ts +0 -1
- package/dist/src/headless/uploaderSchemas.d.ts +1 -2
- package/dist/src/i18n/browserI18nDb.d.ts +0 -1
- package/dist/src/i18n/en.d.ts +0 -1
- package/dist/src/i18n/index.d.ts +1 -2
- package/dist/src/i18n/simpleI18n.d.ts +0 -1
- package/dist/src/i18n/zh-TW.d.ts +0 -1
- package/dist/src/index.d.ts +13 -14
- package/dist/src/lib/LifecyclePlugins.d.ts +0 -1
- package/dist/src/lib/PicGoRequest.d.ts +1 -2
- package/dist/src/lib/PluginHandler.d.ts +0 -1
- package/dist/src/lib/PluginLoader.d.ts +0 -1
- package/dist/src/plugins/transformer/base64.d.ts +0 -1
- package/dist/src/plugins/transformer/index.d.ts +0 -1
- package/dist/src/plugins/transformer/path.d.ts +0 -1
- package/dist/src/plugins/uploader/aliyun/index.d.ts +0 -1
- package/dist/src/plugins/uploader/aliyun/web.d.ts +1 -2
- package/dist/src/plugins/uploader/awss3.d.ts +0 -1
- package/dist/src/plugins/uploader/github.d.ts +0 -1
- package/dist/src/plugins/uploader/gitlab.d.ts +0 -1
- package/dist/src/plugins/uploader/imgur.d.ts +0 -1
- package/dist/src/plugins/uploader/index.d.ts +0 -1
- package/dist/src/plugins/uploader/lsky/index.d.ts +0 -1
- package/dist/src/plugins/uploader/qiniu/index.d.ts +0 -1
- package/dist/src/plugins/uploader/qiniu/rs.d.ts +0 -1
- package/dist/src/plugins/uploader/s3/uploader.d.ts +1 -2
- package/dist/src/plugins/uploader/s3/utils.d.ts +0 -1
- package/dist/src/plugins/uploader/smms.d.ts +0 -1
- package/dist/src/plugins/uploader/tcyun.d.ts +0 -1
- package/dist/src/plugins/uploader/upyun/index.d.ts +0 -1
- package/dist/src/setup.d.ts +0 -0
- package/dist/src/utils/CodingUtil.d.ts +0 -1
- package/dist/src/utils/clipboard/browser.d.ts +0 -1
- package/dist/src/utils/clipboard/electron.d.ts +0 -1
- package/dist/src/utils/common.d.ts +3 -4
- package/dist/src/utils/createContext.d.ts +0 -1
- package/dist/src/utils/cryptoUtil.d.ts +0 -1
- package/dist/src/utils/getClipboardImage.d.ts +0 -1
- package/dist/src/utils/image-size/detector.d.ts +1 -2
- package/dist/src/utils/image-size/index.d.ts +2 -3
- package/dist/src/utils/image-size/types/bmp.d.ts +0 -1
- package/dist/src/utils/image-size/types/cur.d.ts +0 -1
- package/dist/src/utils/image-size/types/dds.d.ts +0 -1
- package/dist/src/utils/image-size/types/gif.d.ts +0 -1
- package/dist/src/utils/image-size/types/heif.d.ts +0 -1
- package/dist/src/utils/image-size/types/icns.d.ts +0 -1
- package/dist/src/utils/image-size/types/ico.d.ts +0 -1
- package/dist/src/utils/image-size/types/interface.d.ts +0 -1
- package/dist/src/utils/image-size/types/j2c.d.ts +0 -1
- package/dist/src/utils/image-size/types/jp2.d.ts +0 -1
- package/dist/src/utils/image-size/types/jpg.d.ts +0 -1
- package/dist/src/utils/image-size/types/ktx.d.ts +0 -1
- package/dist/src/utils/image-size/types/png.d.ts +0 -1
- package/dist/src/utils/image-size/types/pnm.d.ts +0 -1
- package/dist/src/utils/image-size/types/psd.d.ts +0 -1
- package/dist/src/utils/image-size/types/svg.d.ts +0 -1
- package/dist/src/utils/image-size/types/tga.d.ts +0 -1
- package/dist/src/utils/image-size/types/tiff.d.ts +0 -1
- package/dist/src/utils/image-size/types/utils.d.ts +0 -1
- package/dist/src/utils/image-size/types/webp.d.ts +0 -1
- package/dist/src/utils/nodePolyfill.d.ts +1 -2
- package/dist/src/utils/picgoEventBus.d.ts +0 -1
- package/package.json +3 -3
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "universal-picgo",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "picgo lib for node, browser and electron",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@terwer/eslint-config-custom": "^1.3.6",
|
|
30
30
|
"@terwer/vite-config-custom": "^0.7.6",
|
|
31
31
|
"@types/mime": "^4.0.0",
|
|
32
|
-
"vite-plugin-node-polyfills": "^0.
|
|
32
|
+
"vite-plugin-node-polyfills": "^0.28.0"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@aws-sdk/client-s3": "^3.421.0",
|
|
@@ -51,4 +51,4 @@
|
|
|
51
51
|
"publishConfig": {
|
|
52
52
|
"access": "public"
|
|
53
53
|
}
|
|
54
|
-
}
|
|
54
|
+
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { ReadyUnifiedPicGoConfigFacade } from '../config';
|
|
2
|
-
import { PicGoRequestWrapper } from '../lib/PicGoRequest';
|
|
3
|
-
import { StorageAdapter } from 'universal-picgo-store';
|
|
4
|
-
import { PluginHandler } from '../lib/PluginHandler';
|
|
5
|
-
import { IConfig, IHelper, II18nManager, IImgInfo, IPicGo, IPicGoPlugin, IPicGoPluginInterface, IPluginLoader, IStringKeyMap, IUniversalPicGoOptions } from '../types';
|
|
6
|
-
import { EventEmitter } from '../utils/nodePolyfill';
|
|
7
1
|
import { ILogger } from 'zhi-lib-base';
|
|
8
|
-
|
|
2
|
+
import { EventEmitter } from '../utils/nodePolyfill';
|
|
3
|
+
import { IConfig, IHelper, II18nManager, IImgInfo, IPicGo, IPicGoPlugin, IPicGoPluginInterface, IPluginLoader, IStringKeyMap, IUniversalPicGoOptions } from '../types';
|
|
4
|
+
import { PluginHandler } from '../lib/PluginHandler';
|
|
5
|
+
import { StorageAdapter } from 'universal-picgo-store';
|
|
6
|
+
import { PicGoRequestWrapper } from '../lib/PicGoRequest';
|
|
7
|
+
import { ReadyUnifiedPicGoConfigFacade } from '../config';
|
|
9
8
|
declare class UniversalPicGo extends EventEmitter implements IPicGo {
|
|
10
9
|
private _config;
|
|
11
10
|
private lifecycle;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { PicgoTypeEnum } from '../../utils/enums';
|
|
2
|
-
import { IJSON } from 'universal-picgo-store';
|
|
3
1
|
import { IExternalPicgoConfig, IPicGo, IPicgoDb } from '../../types';
|
|
4
|
-
|
|
2
|
+
import { IJSON } from 'universal-picgo-store';
|
|
3
|
+
import { PicgoTypeEnum } from '../../utils/enums';
|
|
5
4
|
declare class ExternalPicgoConfigDb implements IPicgoDb<IExternalPicgoConfig> {
|
|
6
5
|
private readonly ctx;
|
|
7
6
|
private readonly db;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { IPicGoHeadlessManager, PicGoHeadlessManagerOptions, PicGoHeadlessSaveUploaderConfigOptions, PicGoUploaderConfigSchema, PicGoUploaderListItem, PicGoUploaderSchemaAuditResult, PicGoValidationResult } from './types';
|
|
2
1
|
import { IConfig, IImgInfo, IPicGo } from '../types';
|
|
3
|
-
|
|
2
|
+
import { IPicGoHeadlessManager, PicGoHeadlessManagerOptions, PicGoHeadlessSaveUploaderConfigOptions, PicGoUploaderConfigSchema, PicGoUploaderListItem, PicGoUploaderSchemaAuditResult, PicGoValidationResult } from './types';
|
|
4
3
|
declare class UniversalPicGoHeadlessManager implements IPicGoHeadlessManager {
|
|
5
4
|
private readonly ctx;
|
|
6
5
|
constructor(options?: PicGoHeadlessManagerOptions);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { PicGoUploaderConfigSchema, PicGoUploaderListItem, PicGoUploaderSchemaAuditResult } from './types';
|
|
2
1
|
import { IPicGo } from '../types';
|
|
3
|
-
|
|
2
|
+
import { PicGoUploaderConfigSchema, PicGoUploaderListItem, PicGoUploaderSchemaAuditResult } from './types';
|
|
4
3
|
export declare const BUILT_IN_UPLOADER_IDS: readonly ["github", "gitlab", "aliyun", "tcyun", "qiniu", "upyun", "smms", "imgur", "awss3", "lsky"];
|
|
5
4
|
export type BuiltInUploaderId = (typeof BUILT_IN_UPLOADER_IDS)[number];
|
|
6
5
|
export declare const isBuiltInUploaderId: (uploaderId: string) => uploaderId is "smms" | "lsky" | "github" | "gitlab" | "aliyun" | "tcyun" | "qiniu" | "upyun" | "imgur" | "awss3";
|
package/dist/src/i18n/en.d.ts
CHANGED
package/dist/src/i18n/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ILocalesKey } from './zh-CN';
|
|
2
1
|
import { II18nManager, ILocale, IPicGo, IStringKeyMap } from '../types';
|
|
3
|
-
|
|
2
|
+
import { ILocalesKey } from './zh-CN';
|
|
4
3
|
declare class I18nManager implements II18nManager {
|
|
5
4
|
private readonly i18n;
|
|
6
5
|
private readonly objectAdapter;
|
package/dist/src/i18n/zh-TW.d.ts
CHANGED
package/dist/src/index.d.ts
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { UniversalPicGoHeadlessManager, createPicGoHeadlessManager } from './headless';
|
|
2
|
-
import { isElectronRuntime, isPicGoPluginPackageName, isThirdPartyPluginRuntimeAvailable } from './utils/pluginRuntime';
|
|
3
|
-
import { deepMerge, getByPath, setByPath, unsetByPath } from './utils/pathObject';
|
|
4
|
-
import { calculateMD5, isFileOrBlob, isSiyuanProxyAvailable } from './utils/common';
|
|
5
|
-
import { IConfig, IExternalPicgoConfig, IImgInfo, IPicBedType, IPicGo, IPicgoDb, IPicGoPlugin, IPluginConfig, IUniversalPicGoOptions, IUploaderConfigItem, IUploaderConfigListItem } from './types';
|
|
6
|
-
import { IBusEvent, PicgoTypeEnum } from './utils/enums';
|
|
7
|
-
import { currentWin, hasNodeEnv, parentWin, win } from 'universal-picgo-store';
|
|
8
|
-
import { picgoEventBus } from './utils/picgoEventBus';
|
|
9
|
-
import { default as ExternalPicgoConfigDb } from './db/externalPicGo';
|
|
10
|
-
import { default as PluginLoaderDb } from './db/pluginLoder';
|
|
11
|
-
import { default as ConfigDb } from './db/config';
|
|
12
|
-
import { PicListUploader } from './core/PicListUploader';
|
|
13
|
-
import { ExternalPicgo } from './core/ExternalPicgo';
|
|
14
1
|
import { UniversalPicGo } from './core/UniversalPicGo';
|
|
15
|
-
|
|
2
|
+
import { ExternalPicgo } from './core/ExternalPicgo';
|
|
3
|
+
import { PicListUploader } from './core/PicListUploader';
|
|
4
|
+
import { default as ConfigDb } from './db/config';
|
|
5
|
+
import { default as PluginLoaderDb } from './db/pluginLoder';
|
|
6
|
+
import { default as ExternalPicgoConfigDb } from './db/externalPicGo';
|
|
7
|
+
import { picgoEventBus } from './utils/picgoEventBus';
|
|
8
|
+
import { currentWin, hasNodeEnv, parentWin, win } from 'universal-picgo-store';
|
|
9
|
+
import { IBusEvent, PicgoTypeEnum } from './utils/enums';
|
|
10
|
+
import { IConfig, IExternalPicgoConfig, IImgInfo, IPicBedType, IPicGo, IPicgoDb, IPicGoPlugin, IPluginConfig, IUniversalPicGoOptions, IUploaderConfigItem, IUploaderConfigListItem } from './types';
|
|
11
|
+
import { calculateMD5, isFileOrBlob, isSiyuanProxyAvailable } from './utils/common';
|
|
12
|
+
import { deepMerge, getByPath, setByPath, unsetByPath } from './utils/pathObject';
|
|
13
|
+
import { isElectronRuntime, isPicGoPluginPackageName, isThirdPartyPluginRuntimeAvailable } from './utils/pluginRuntime';
|
|
14
|
+
import { UniversalPicGoHeadlessManager, createPicGoHeadlessManager } from './headless';
|
|
16
15
|
export { UniversalPicGo, ExternalPicgo, PicListUploader, picgoEventBus };
|
|
17
16
|
export { UniversalPicGoHeadlessManager, createPicGoHeadlessManager };
|
|
18
17
|
export { ConfigDb, PluginLoaderDb, ExternalPicgoConfigDb };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { AxiosRequestConfig } from 'axios';
|
|
2
1
|
import { IAliyunConfig, IPicGo } from '../../../types';
|
|
3
|
-
|
|
2
|
+
import { AxiosRequestConfig } from 'axios';
|
|
4
3
|
declare const generateSignature: (options: IAliyunConfig, fileName: string, date: string) => string;
|
|
5
4
|
declare const postOptions: (options: IAliyunConfig, fileName: string, signature: string, image: Buffer, date: string) => AxiosRequestConfig;
|
|
6
5
|
declare const handleWeb: (ctx: IPicGo) => Promise<IPicGo>;
|
|
File without changes
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ILogger } from 'zhi-lib-base';
|
|
2
|
-
import { Buffer } from './nodePolyfill';
|
|
3
|
-
import { win } from 'universal-picgo-store';
|
|
4
1
|
import { IImgSize, IPathTransformedImgInfo, IPicGo, IPluginNameType } from '../types';
|
|
5
|
-
|
|
2
|
+
import { win } from 'universal-picgo-store';
|
|
3
|
+
import { Buffer } from './nodePolyfill';
|
|
4
|
+
import { ILogger } from 'zhi-lib-base';
|
|
6
5
|
export declare const isUrl: (url: string) => boolean;
|
|
7
6
|
/**
|
|
8
7
|
* 检测输入是否为 base64 编码的字符串
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Buffer } from './nodePolyfill';
|
|
2
|
-
|
|
3
2
|
type HashAlgorithm = "md5" | "sha1" | "sha256";
|
|
4
3
|
type DigestEncoding = "hex" | "base64" | undefined;
|
|
5
4
|
export declare function digestHash(input: string | Buffer | Uint8Array, algorithm: HashAlgorithm, encoding: DigestEncoding): string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { win } from 'universal-picgo-store';
|
|
2
|
-
import { imageType } from './types';
|
|
3
1
|
import { ISizeCalculationResult } from './types/interface';
|
|
4
|
-
|
|
2
|
+
import { imageType } from './types';
|
|
3
|
+
import { win } from 'universal-picgo-store';
|
|
5
4
|
type CallbackFn = (e: Error | null, r?: ISizeCalculationResult) => void;
|
|
6
5
|
export default imageSize;
|
|
7
6
|
export declare function imageSize(input: typeof win.Uint8Array | string): ISizeCalculationResult;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { win } from 'universal-picgo-store';
|
|
2
|
-
|
|
3
2
|
export declare const toUTF8String: (input: typeof win.Uint8Array, start?: number, end?: any) => string;
|
|
4
3
|
export declare const toHexString: (input: typeof win.Uint8Array, start?: number, end?: any) => any;
|
|
5
4
|
export declare const readInt16LE: (input: typeof win.Uint8Array, offset?: number) => number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "universal-picgo",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "picgo lib for node, browser and electron",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@terwer/eslint-config-custom": "^1.3.6",
|
|
22
22
|
"@terwer/vite-config-custom": "^0.7.6",
|
|
23
23
|
"@types/mime": "^4.0.0",
|
|
24
|
-
"vite-plugin-node-polyfills": "^0.
|
|
24
|
+
"vite-plugin-node-polyfills": "^0.28.0"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@aws-sdk/client-s3": "^3.421.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"mime": "^4.0.3",
|
|
39
39
|
"queue": "^7.0.0",
|
|
40
40
|
"zhi-lib-base": "^0.8.0",
|
|
41
|
-
"universal-picgo-store": "3.0.
|
|
41
|
+
"universal-picgo-store": "3.0.2"
|
|
42
42
|
},
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public"
|