universal-picgo 1.12.1 → 2.0.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.
Files changed (86) hide show
  1. package/README.md +48 -0
  2. package/package.json +4 -7
  3. package/dist/README.md +0 -52
  4. package/dist/index.d.ts +0 -1
  5. package/dist/index.js +0 -85200
  6. package/dist/package.json +0 -56
  7. package/dist/src/core/ExternalPicgo.d.ts +0 -24
  8. package/dist/src/core/Lifecycle.d.ts +0 -15
  9. package/dist/src/core/UniversalPicGo.d.ts +0 -47
  10. package/dist/src/db/config/index.d.ts +0 -25
  11. package/dist/src/db/externalPicGo/index.d.ts +0 -24
  12. package/dist/src/db/pluginLoder/index.d.ts +0 -24
  13. package/dist/src/i18n/browserI18nDb.d.ts +0 -16
  14. package/dist/src/i18n/en.d.ts +0 -3
  15. package/dist/src/i18n/index.d.ts +0 -18
  16. package/dist/src/i18n/zh-CN.d.ts +0 -143
  17. package/dist/src/i18n/zh-TW.d.ts +0 -3
  18. package/dist/src/index.d.ts +0 -17
  19. package/dist/src/index.spec.d.ts +0 -1
  20. package/dist/src/lib/LifecyclePlugins.d.ts +0 -18
  21. package/dist/src/lib/PicGoRequest.d.ts +0 -21
  22. package/dist/src/lib/PluginHandler.d.ts +0 -20
  23. package/dist/src/lib/PluginLoader.d.ts +0 -29
  24. package/dist/src/plugins/transformer/base64.d.ts +0 -6
  25. package/dist/src/plugins/transformer/index.d.ts +0 -4
  26. package/dist/src/plugins/transformer/path.d.ts +0 -6
  27. package/dist/src/plugins/uploader/aliyun/index.d.ts +0 -3
  28. package/dist/src/plugins/uploader/aliyun/node.d.ts +0 -4
  29. package/dist/src/plugins/uploader/aliyun/web.d.ts +0 -4
  30. package/dist/src/plugins/uploader/awss3.d.ts +0 -3
  31. package/dist/src/plugins/uploader/github.d.ts +0 -3
  32. package/dist/src/plugins/uploader/gitlab.d.ts +0 -3
  33. package/dist/src/plugins/uploader/imgur.d.ts +0 -3
  34. package/dist/src/plugins/uploader/index.d.ts +0 -4
  35. package/dist/src/plugins/uploader/lsky/index.d.ts +0 -3
  36. package/dist/src/plugins/uploader/qiniu/digest.d.ts +0 -7
  37. package/dist/src/plugins/uploader/qiniu/index.d.ts +0 -3
  38. package/dist/src/plugins/uploader/qiniu/rs.d.ts +0 -13
  39. package/dist/src/plugins/uploader/qiniu/util.d.ts +0 -8
  40. package/dist/src/plugins/uploader/s3/uploader.d.ts +0 -30
  41. package/dist/src/plugins/uploader/s3/utils.d.ts +0 -8
  42. package/dist/src/plugins/uploader/smms.d.ts +0 -3
  43. package/dist/src/plugins/uploader/tcyun.d.ts +0 -9
  44. package/dist/src/plugins/uploader/upyun/index.d.ts +0 -3
  45. package/dist/src/utils/CodingUtil.d.ts +0 -39
  46. package/dist/src/utils/CodingUtil.spec.d.ts +0 -1
  47. package/dist/src/utils/browserUtils.d.ts +0 -12
  48. package/dist/src/utils/clipboard/browser.d.ts +0 -4
  49. package/dist/src/utils/clipboard/electron.d.ts +0 -4
  50. package/dist/src/utils/common.d.ts +0 -135
  51. package/dist/src/utils/constants.d.ts +0 -1
  52. package/dist/src/utils/createContext.d.ts +0 -9
  53. package/dist/src/utils/enums.d.ts +0 -32
  54. package/dist/src/utils/getClipboardImage.d.ts +0 -4
  55. package/dist/src/utils/hashUtil.d.ts +0 -2
  56. package/dist/src/utils/image-size/detector.d.ts +0 -4
  57. package/dist/src/utils/image-size/index.d.ts +0 -12
  58. package/dist/src/utils/image-size/types/bmp.d.ts +0 -3
  59. package/dist/src/utils/image-size/types/cur.d.ts +0 -3
  60. package/dist/src/utils/image-size/types/dds.d.ts +0 -3
  61. package/dist/src/utils/image-size/types/gif.d.ts +0 -3
  62. package/dist/src/utils/image-size/types/heif.d.ts +0 -3
  63. package/dist/src/utils/image-size/types/icns.d.ts +0 -3
  64. package/dist/src/utils/image-size/types/ico.d.ts +0 -3
  65. package/dist/src/utils/image-size/types/index.d.ts +0 -21
  66. package/dist/src/utils/image-size/types/interface.d.ts +0 -15
  67. package/dist/src/utils/image-size/types/j2c.d.ts +0 -3
  68. package/dist/src/utils/image-size/types/jp2.d.ts +0 -3
  69. package/dist/src/utils/image-size/types/jpg.d.ts +0 -3
  70. package/dist/src/utils/image-size/types/ktx.d.ts +0 -3
  71. package/dist/src/utils/image-size/types/png.d.ts +0 -3
  72. package/dist/src/utils/image-size/types/pnm.d.ts +0 -3
  73. package/dist/src/utils/image-size/types/psd.d.ts +0 -3
  74. package/dist/src/utils/image-size/types/svg.d.ts +0 -3
  75. package/dist/src/utils/image-size/types/tga.d.ts +0 -3
  76. package/dist/src/utils/image-size/types/tiff.d.ts +0 -3
  77. package/dist/src/utils/image-size/types/utils.d.ts +0 -17
  78. package/dist/src/utils/image-size/types/webp.d.ts +0 -3
  79. package/dist/src/utils/nodePolyfill.d.ts +0 -4
  80. package/dist/src/utils/nodeUtils.d.ts +0 -31
  81. package/dist/src/utils/os/index.d.ts +0 -3
  82. package/dist/src/utils/os/is-docker/index.d.ts +0 -2
  83. package/dist/src/utils/os/is-inside-container/index.d.ts +0 -1
  84. package/dist/src/utils/os/is-wsl/index.d.ts +0 -2
  85. package/dist/src/utils/picgoEventBus.d.ts +0 -4
  86. package/dist/vite.config.d.ts +0 -2
@@ -1,30 +0,0 @@
1
- import { IAwsS3Config, IImgInfo, IPicGo } from '../../../types';
2
- import { S3Client, ObjectCannedACL } from '@aws-sdk/client-s3';
3
-
4
- export interface IUploadResult {
5
- index: number;
6
- key: string;
7
- url: string;
8
- imgURL: string;
9
- versionId?: string;
10
- eTag?: string;
11
- }
12
- declare function createS3Client(ctx: IPicGo, opts: IAwsS3Config): S3Client;
13
- interface createUploadTaskOpts {
14
- client: S3Client;
15
- bucketName: string;
16
- path: string;
17
- item: IImgInfo;
18
- index: number;
19
- acl: ObjectCannedACL | undefined;
20
- customUrl?: string;
21
- corsProxy?: boolean;
22
- }
23
- declare function createUploadTask(opts: createUploadTaskOpts): Promise<IUploadResult>;
24
- declare function getFileURL(opts: createUploadTaskOpts, eTag: string, versionId: string): Promise<string>;
25
- declare const _default: {
26
- createS3Client: typeof createS3Client;
27
- createUploadTask: typeof createUploadTask;
28
- getFileURL: typeof getFileURL;
29
- };
30
- export default _default;
@@ -1,8 +0,0 @@
1
- import { IImgInfo } from '../../../types';
2
-
3
- export declare function formatPath(info: IImgInfo, format?: string): string;
4
- export declare function extractInfo(info: IImgInfo): Promise<{
5
- body?: Buffer;
6
- contentType?: string;
7
- contentEncoding?: string;
8
- }>;
@@ -1,3 +0,0 @@
1
- import { IPicGo } from '../../types';
2
-
3
- export default function register(ctx: IPicGo): void;
@@ -1,9 +0,0 @@
1
- import { IPicGo } from '../../types';
2
-
3
- export interface ISignature {
4
- signature: string;
5
- appId: string;
6
- bucket: string;
7
- signTime: string;
8
- }
9
- export default function register(ctx: IPicGo): void;
@@ -1,3 +0,0 @@
1
- import { IPicGo } from '../../../types';
2
-
3
- export default function register(ctx: IPicGo): void;
@@ -1,39 +0,0 @@
1
- import { Buffer } from './nodePolyfill';
2
-
3
- /**
4
- * 提供编码和解码相关的实用方法
5
- *
6
- * @author terwer
7
- * @since 1.8.0
8
- */
9
- declare class CodingUtil {
10
- /**
11
- * 编码字符串为 base64 格式
12
- *
13
- * @returns 编码后的 base64 字符串
14
- * @param input - string | Uint8Array | ArrayBuffer
15
- */
16
- static encodeToBase64String(input: any): string;
17
- /**
18
- * 解码 base64
19
- *
20
- * @returns 解码后的值
21
- * @param input - 要解码的 base64 字符串
22
- */
23
- static decodeBase64(input: string): Buffer;
24
- /**
25
- * 编码字符串为十六进制格式
26
- *
27
- * @param input 要编码的字符串
28
- * @returns 编码后的十六进制字符串
29
- */
30
- static encodeToHexString(input: string): string;
31
- /**
32
- * 解码十六进制
33
- *
34
- * @param input 要解码的十六进制字符串
35
- * @returns 解码后的值
36
- */
37
- static decodeHex(input: string): Buffer;
38
- }
39
- export { CodingUtil };
@@ -1 +0,0 @@
1
- export {};
@@ -1,12 +0,0 @@
1
- /**
2
- * 获取浏览器目录
3
- *
4
- * @param path 完整的路径
5
- */
6
- export declare const getBrowserDirectoryPath: (path: string) => string;
7
- /**
8
- * 浏览器路径拼接
9
- *
10
- * @param paths 路径数组
11
- */
12
- export declare const browserPathJoin: (...paths: string[]) => string;
@@ -1,4 +0,0 @@
1
- import { IClipboardImage, IPicGo } from '../../types';
2
-
3
- declare const getClipboardImageBrowser: (ctx: IPicGo) => Promise<IClipboardImage>;
4
- export { getClipboardImageBrowser };
@@ -1,4 +0,0 @@
1
- import { IClipboardImage, IPicGo } from '../../types';
2
-
3
- declare const getClipboardImageElectron: (ctx: IPicGo) => Promise<IClipboardImage>;
4
- export { getClipboardImageElectron };
@@ -1,135 +0,0 @@
1
- import { ILogger } from 'zhi-lib-base';
2
- import { Buffer } from './nodePolyfill';
3
- import { win } from 'universal-picgo-store';
4
- import { IImgSize, IPathTransformedImgInfo, IPicGo, IPluginNameType, Undefinable } from '../types';
5
-
6
- export declare const isUrl: (url: string) => boolean;
7
- /**
8
- * 检测输入是否为 base64 编码的字符串
9
- *
10
- * @param input - 输入字符串或 Buffer
11
- * @returns- 如果是 base64 编码则返回 true,否则返回 false
12
- */
13
- export declare const isBase64: (input: any) => boolean;
14
- export declare const base64ToBuffer: (base64: string) => Buffer | typeof win.Buffer;
15
- export declare const bufferToBase64: (buffer: Buffer | typeof win.Buffer) => any;
16
- export declare const getBase64File: (base64: string) => Promise<IPathTransformedImgInfo>;
17
- export declare const getFSFile: (filePath: string) => Promise<IPathTransformedImgInfo>;
18
- export declare const isFileOrBlob: (val: any) => boolean;
19
- export declare const isBuffer: (val: any) => boolean;
20
- /**
21
- * 将 file 对象转换为 Buffer
22
- *
23
- * @param file - file
24
- * @author terwer
25
- * @version 0.9.0
26
- * @since 0.9.0
27
- */
28
- export declare const fileToBuffer: (file: any) => Promise<any>;
29
- export declare const getBlobFile: (blob: any) => Promise<IPathTransformedImgInfo>;
30
- export declare const getURLFile: (url: string, ctx: IPicGo) => Promise<IPathTransformedImgInfo>;
31
- /**
32
- * detect the input string's type
33
- * for example
34
- * 1. @xxx/picgo-plugin-xxx -> scope
35
- * 2. picgo-plugin-xxx -> normal
36
- * 3. xxx -> simple
37
- * 4. not exists or is a path -> unknown
38
- * @param name
39
- */
40
- export declare const getPluginNameType: (name: string) => IPluginNameType;
41
- /**
42
- * detect the input string is a simple plugin name or not
43
- * for example
44
- * 1. xxx -> true
45
- * 2. /Usr/xx/xxxx/picgo-plugin-xxx -> false
46
- * @param nameOrPath pluginNameOrPath
47
- */
48
- export declare const isSimpleName: (nameOrPath: string) => boolean;
49
- /**
50
- * streamline the full plugin name to a simple one
51
- * for example:
52
- * 1. picgo-plugin-xxx -> xxx
53
- * 2. @xxx/picgo-plugin-yyy -> yyy
54
- * @param name pluginFullName
55
- */
56
- export declare const handleStreamlinePluginName: (name: string) => string;
57
- /**
58
- * complete plugin name to full name
59
- * for example:
60
- * 1. xxx -> picgo-plugin-xxx
61
- * 2. picgo-plugin-xxx -> picgo-plugin-xxx
62
- * @param name pluginSimpleName
63
- * @param scope pluginScope
64
- */
65
- export declare const handleCompletePluginName: (name: string, scope?: string) => string;
66
- /**
67
- * handle transform the path to unix style
68
- * for example
69
- * 1. C:\\xxx\\xxx -> C:/xxx/xxx
70
- * 2. /xxx/xxx -> /xxx/xxx
71
- * @param pathStr
72
- */
73
- export declare const handleUnixStylePath: (pathStr: string) => string;
74
- /**
75
- * remove plugin version when register plugin name
76
- * 1. picgo-plugin-xxx@1.0.0 -> picgo-plugin-xxx
77
- * 2. @xxx/picgo-plugin-xxx@1.0.0 -> @xxx/picgo-plugin-xxx
78
- * @param nameOrPath
79
- * @param scope
80
- */
81
- export declare const removePluginVersion: (nameOrPath: string, scope?: boolean) => string;
82
- /**
83
- * the config black item list which won't be setted
84
- * only can be got
85
- */
86
- export declare const configBlackList: never[];
87
- /**
88
- * check some config key is in blackList
89
- * @param key
90
- */
91
- export declare const isConfigKeyInBlackList: (key: string) => boolean;
92
- /**
93
- * check the input config is valid
94
- * config must be object such as { xxx: 'xxx' }
95
- * && can't be array
96
- * @param config
97
- * @returns
98
- */
99
- export declare const isInputConfigValid: (config: any) => boolean;
100
- export declare function safeParse<T>(str: string): T | string;
101
- export declare const forceNumber: (num?: string | number) => number;
102
- export declare const getImageSize: (file: Buffer | typeof win.Buffer) => IImgSize;
103
- export declare const calculateMD5: (input: string) => string;
104
- /**
105
- * handle install/uninstall/update plugin name or path
106
- * for example
107
- * 1. picgo-plugin-xxx -> picgo-plugin-xxx
108
- * 2. @xxx/picgo-plugin-xxx -> @xxx/picgo-plugin-xxx
109
- * 3. xxx -> picgo-plugin-xxx
110
- * 4. ./xxxx/picgo-plugin-xxx -> /absolutePath/.../xxxx/picgo-plugin-xxx
111
- * 5. /absolutePath/.../picgo-plugin-xxx -> /absolutePath/.../picgo-plugin-xxx
112
- * @param nameOrPath pluginName or pluginPath
113
- * @param logger
114
- */
115
- export declare const getProcessPluginName: (nameOrPath: string, logger: ILogger) => string;
116
- /**
117
- * get the normal plugin name
118
- * for example:
119
- * 1. picgo-plugin-xxx -> picgo-plugin-xxx
120
- * 2. @xxx/picgo-plugin-xxx -> @xxx/picgo-plugin-xxx
121
- * 3. ./xxxx/picgo-plugin-xxx -> picgo-plugin-xxx
122
- * 4. /absolutePath/.../picgo-plugin-xxx -> picgo-plugin-xxx
123
- * 5. an exception: [package.json's name] !== [folder name]
124
- * then use [package.json's name], usually match the scope package.
125
- * 6. if plugin name has version: picgo-plugin-xxx@x.x.x then remove the version
126
- * @param nameOrPath
127
- * @param logger
128
- */
129
- export declare const getNormalPluginName: (nameOrPath: string, logger: ILogger) => string;
130
- /**
131
- * 思源笔记代理是否可用
132
- *
133
- * @param siyuanProxy
134
- */
135
- export declare const isSiyuanProxyAvailable: (siyuanProxy: Undefinable<string>) => boolean | "" | undefined;
@@ -1 +0,0 @@
1
- export declare const CLIPBOARD_IMAGE_FOLDER = "picgo-clipboard-images";
@@ -1,9 +0,0 @@
1
- import { IPicGo } from '../types';
2
-
3
- /**
4
- * create an unique context for each upload process
5
- *
6
- * @param ctx
7
- */
8
- declare const createContext: (ctx: IPicGo) => IPicGo;
9
- export { createContext };
@@ -1,32 +0,0 @@
1
- /**
2
- * these events will be catched by users
3
- */
4
- export declare enum IBuildInEvent {
5
- UPLOAD_PROGRESS = "uploadProgress",
6
- FAILED = "failed",
7
- BEFORE_TRANSFORM = "beforeTransform",
8
- BEFORE_UPLOAD = "beforeUpload",
9
- AFTER_UPLOAD = "afterUpload",
10
- FINISHED = "finished",
11
- INSTALL = "install",
12
- UNINSTALL = "uninstall",
13
- UPDATE = "update",
14
- NOTIFICATION = "notification"
15
- }
16
- /**
17
- * these events will be catched only by picgo
18
- */
19
- export declare enum IBusEvent {
20
- CONFIG_CHANGE = "CONFIG_CHANGE"
21
- }
22
- /**
23
- * PicGo 类型枚举
24
- *
25
- * @version 1.6.0
26
- * @since 1.6.0
27
- * @author terwer
28
- */
29
- export declare enum PicgoTypeEnum {
30
- Bundled = "bundled",
31
- App = "app"
32
- }
@@ -1,4 +0,0 @@
1
- import { IClipboardImage, IPicGo } from '../types';
2
-
3
- declare const getClipboardImage: (ctx: IPicGo) => Promise<IClipboardImage>;
4
- export default getClipboardImage;
@@ -1,2 +0,0 @@
1
- declare const calculateHash: (input: string) => string | number;
2
- export { calculateHash };
@@ -1,4 +0,0 @@
1
- import { win } from 'universal-picgo-store';
2
- import { imageType } from './types';
3
-
4
- export declare function detector(input: typeof win.Uint8Array): imageType | undefined;
@@ -1,12 +0,0 @@
1
- import { win } from 'universal-picgo-store';
2
- import { imageType } from './types';
3
- import { ISizeCalculationResult } from './types/interface';
4
-
5
- type CallbackFn = (e: Error | null, r?: ISizeCalculationResult) => void;
6
- export default imageSize;
7
- export declare function imageSize(input: typeof win.Uint8Array | string): ISizeCalculationResult;
8
- export declare function imageSize(input: string, callback: CallbackFn): void;
9
- export declare const disableFS: (v: boolean) => void;
10
- export declare const disableTypes: (types: imageType[]) => void;
11
- export declare const setConcurrency: (c: number) => void;
12
- export declare const types: string[];
@@ -1,3 +0,0 @@
1
- import { IImage } from './interface';
2
-
3
- export declare const BMP: IImage;
@@ -1,3 +0,0 @@
1
- import { IImage } from './interface';
2
-
3
- export declare const CUR: IImage;
@@ -1,3 +0,0 @@
1
- import { IImage } from './interface';
2
-
3
- export declare const DDS: IImage;
@@ -1,3 +0,0 @@
1
- import { IImage } from './interface';
2
-
3
- export declare const GIF: IImage;
@@ -1,3 +0,0 @@
1
- import { IImage } from './interface';
2
-
3
- export declare const HEIF: IImage;
@@ -1,3 +0,0 @@
1
- import { IImage } from './interface';
2
-
3
- export declare const ICNS: IImage;
@@ -1,3 +0,0 @@
1
- import { IImage } from './interface';
2
-
3
- export declare const ICO: IImage;
@@ -1,21 +0,0 @@
1
- export declare const typeHandlers: {
2
- bmp: import('./interface').IImage;
3
- cur: import('./interface').IImage;
4
- dds: import('./interface').IImage;
5
- gif: import('./interface').IImage;
6
- heif: import('./interface').IImage;
7
- icns: import('./interface').IImage;
8
- ico: import('./interface').IImage;
9
- j2c: import('./interface').IImage;
10
- jp2: import('./interface').IImage;
11
- jpg: import('./interface').IImage;
12
- ktx: import('./interface').IImage;
13
- png: import('./interface').IImage;
14
- pnm: import('./interface').IImage;
15
- psd: import('./interface').IImage;
16
- svg: import('./interface').IImage;
17
- tga: import('./interface').IImage;
18
- tiff: import('./interface').IImage;
19
- webp: import('./interface').IImage;
20
- };
21
- export type imageType = keyof typeof typeHandlers;
@@ -1,15 +0,0 @@
1
- import { win } from 'universal-picgo-store';
2
-
3
- export type ISize = {
4
- width: number | undefined;
5
- height: number | undefined;
6
- orientation?: number;
7
- type?: string;
8
- };
9
- export type ISizeCalculationResult = {
10
- images?: ISize[];
11
- } & ISize;
12
- export type IImage = {
13
- validate: (input: typeof win.Uint8Array) => boolean;
14
- calculate: (input: typeof win.Uint8Array, filepath?: string) => ISizeCalculationResult;
15
- };
@@ -1,3 +0,0 @@
1
- import { IImage } from './interface';
2
-
3
- export declare const J2C: IImage;
@@ -1,3 +0,0 @@
1
- import { IImage } from './interface';
2
-
3
- export declare const JP2: IImage;
@@ -1,3 +0,0 @@
1
- import { IImage } from './interface';
2
-
3
- export declare const JPG: IImage;
@@ -1,3 +0,0 @@
1
- import { IImage } from './interface';
2
-
3
- export declare const KTX: IImage;
@@ -1,3 +0,0 @@
1
- import { IImage } from './interface';
2
-
3
- export declare const PNG: IImage;
@@ -1,3 +0,0 @@
1
- import { IImage } from './interface';
2
-
3
- export declare const PNM: IImage;
@@ -1,3 +0,0 @@
1
- import { IImage } from './interface';
2
-
3
- export declare const PSD: IImage;
@@ -1,3 +0,0 @@
1
- import { IImage } from './interface';
2
-
3
- export declare const SVG: IImage;
@@ -1,3 +0,0 @@
1
- import { IImage } from './interface';
2
-
3
- export declare const TGA: IImage;
@@ -1,3 +0,0 @@
1
- import { IImage } from './interface';
2
-
3
- export declare const TIFF: IImage;
@@ -1,17 +0,0 @@
1
- import { win } from 'universal-picgo-store';
2
-
3
- export declare const toUTF8String: (input: typeof win.Uint8Array, start?: number, end?: any) => string;
4
- export declare const toHexString: (input: typeof win.Uint8Array, start?: number, end?: any) => any;
5
- export declare const readInt16LE: (input: typeof win.Uint8Array, offset?: number) => number;
6
- export declare const readUInt16BE: (input: typeof win.Uint8Array, offset?: number) => any;
7
- export declare const readUInt16LE: (input: typeof win.Uint8Array, offset?: number) => any;
8
- export declare const readUInt24LE: (input: typeof win.Uint8Array, offset?: number) => any;
9
- export declare const readInt32LE: (input: typeof win.Uint8Array, offset?: number) => any;
10
- export declare const readUInt32BE: (input: typeof win.Uint8Array, offset?: number) => any;
11
- export declare const readUInt32LE: (input: typeof win.Uint8Array, offset?: number) => any;
12
- export declare function readUInt(input: typeof win.Uint8Array, bits: 16 | 32, offset: number, isBigEndian: boolean): number;
13
- export declare function findBox(buffer: typeof win.Uint8Array, boxName: string, offset: number): {
14
- name: string;
15
- offset: number;
16
- size: any;
17
- } | undefined;
@@ -1,3 +0,0 @@
1
- import { IImage } from './interface';
2
-
3
- export declare const WEBP: IImage;
@@ -1,4 +0,0 @@
1
- import { Buffer } from 'node:buffer';
2
- import { EventEmitter } from 'node:events';
3
-
4
- export { EventEmitter, Buffer };
@@ -1,31 +0,0 @@
1
- /**
2
- * 实现 fs.pathExistsSync 函数
3
- *
4
- * @param fs
5
- * @param path
6
- * @param filePath
7
- */
8
- export declare const pathExistsSync: (fs: any, path: any, filePath: string) => boolean;
9
- /**
10
- * 实现 fs.ensureFileSync 函数
11
- *
12
- * @param fs
13
- * @param path
14
- * @param filePath
15
- */
16
- export declare const ensureFileSync: (fs: any, path: any, filePath: string) => void;
17
- /**
18
- * 确保目录存在
19
- *
20
- * @param fs
21
- * @param dir
22
- */
23
- export declare const ensureFolderSync: (fs: any, dir: string) => void;
24
- /**
25
- * 同步读取 JSON 文件的方法
26
- *
27
- * @param fs - fs 模块
28
- * @param filePath - JSON 文件路径
29
- * @returns - JSON 文件内容转换后的对象,如果出错则返回空对象 {}
30
- */
31
- export declare const readJSONSync: (fs: any, filePath: string) => any;
@@ -1,3 +0,0 @@
1
- export type Platform = "darwin" | "win32" | "win10" | "linux" | "wsl";
2
- declare const getCurrentPlatform: () => Platform;
3
- export { getCurrentPlatform };
@@ -1,2 +0,0 @@
1
- declare const isDocker: () => boolean;
2
- export { isDocker };
@@ -1 +0,0 @@
1
- export default function isInsideContainer(): boolean;
@@ -1,2 +0,0 @@
1
- declare const isWsl: () => boolean;
2
- export { isWsl };
@@ -1,4 +0,0 @@
1
- import { EventEmitter } from './nodePolyfill';
2
-
3
- declare const picgoEventBus: EventEmitter<[never]>;
4
- export { picgoEventBus };
@@ -1,2 +0,0 @@
1
- declare const _default: import('vite').UserConfig;
2
- export default _default;