picgo 1.5.11 → 1.6.1
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/.node-version +1 -1
- package/README.md +2 -2
- package/dist/core/Lifecycle.d.ts +14 -15
- package/dist/core/PicGo.d.ts +48 -49
- package/dist/i18n/en.d.ts +2 -2
- package/dist/i18n/index.d.ts +18 -18
- package/dist/i18n/zh-CN.d.ts +97 -97
- package/dist/i18n/zh-TW.d.ts +2 -2
- package/dist/index.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +11 -10
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -0
- package/dist/lib/Commander.d.ts +22 -22
- package/dist/lib/LifecyclePlugins.d.ts +17 -17
- package/dist/lib/Logger.d.ts +19 -19
- package/dist/lib/PluginHandler.d.ts +10 -10
- package/dist/lib/PluginLoader.d.ts +27 -27
- package/dist/lib/Request.d.ts +12 -12
- package/dist/plugins/commander/config.d.ts +3 -3
- package/dist/plugins/commander/i18n.d.ts +3 -3
- package/dist/plugins/commander/index.d.ts +3 -3
- package/dist/plugins/commander/init.d.ts +3 -3
- package/dist/plugins/commander/pluginHandler.d.ts +3 -3
- package/dist/plugins/commander/proxy.d.ts +3 -3
- package/dist/plugins/commander/setting.d.ts +5 -5
- package/dist/plugins/commander/upload.d.ts +3 -3
- package/dist/plugins/commander/use.d.ts +3 -3
- package/dist/plugins/transformer/base64.d.ts +5 -5
- package/dist/plugins/transformer/index.d.ts +3 -3
- package/dist/plugins/transformer/path.d.ts +5 -5
- package/dist/plugins/uploader/aliyun.d.ts +2 -2
- package/dist/plugins/uploader/github.d.ts +2 -2
- package/dist/plugins/uploader/imgur.d.ts +2 -2
- package/dist/plugins/uploader/index.d.ts +3 -3
- package/dist/plugins/uploader/qiniu.d.ts +2 -2
- package/dist/plugins/uploader/smms.d.ts +2 -2
- package/dist/plugins/uploader/tcyun.d.ts +8 -8
- package/dist/plugins/uploader/upyun.d.ts +2 -2
- package/dist/types/index.d.ts +542 -542
- package/dist/types/oldRequest.d.ts +19 -19
- package/dist/utils/common.d.ts +118 -120
- package/dist/utils/createContext.d.ts +6 -6
- package/dist/utils/db.d.ts +15 -15
- package/dist/utils/enum.d.ts +27 -27
- package/dist/utils/eventBus.d.ts +3 -4
- package/dist/utils/getClipboardImage.d.ts +4 -4
- package/dist/utils/initUtils.d.ts +26 -26
- package/dist/utils/interfaces.d.ts +202 -203
- package/dist/utils/static.d.ts +1 -1
- package/package.json +40 -38
- package/.eslintignore +0 -2
- package/.eslintrc.js +0 -25
- package/.github/CODEOWNERS +0 -1
- package/.github/funding.yml +0 -1
- package/.github/workflows/alpha.yml +0 -22
- package/.github/workflows/main.yml +0 -22
- package/.github/workflows/manually.yml +0 -19
- package/CHANGELOG.md +0 -680
- package/logo.png +0 -0
- package/rollup.config.js +0 -87
|
@@ -1,203 +1,202 @@
|
|
|
1
|
-
/** This file is deprecated */
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
export
|
|
201
|
-
export
|
|
202
|
-
export
|
|
203
|
-
export declare type Undefinable<T> = T | undefined;
|
|
1
|
+
/** This file is deprecated */
|
|
2
|
+
import { PicGo } from '../core/PicGo';
|
|
3
|
+
import LifecyclePlugins from '../lib/LifecyclePlugins';
|
|
4
|
+
/**
|
|
5
|
+
* for plugin config
|
|
6
|
+
*/
|
|
7
|
+
export interface IPluginConfig {
|
|
8
|
+
name: string;
|
|
9
|
+
type: string;
|
|
10
|
+
required: boolean;
|
|
11
|
+
default?: any;
|
|
12
|
+
[propName: string]: any;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* for lifecycle plugins
|
|
16
|
+
*/
|
|
17
|
+
export interface IHelper {
|
|
18
|
+
transformer: LifecyclePlugins;
|
|
19
|
+
uploader: LifecyclePlugins;
|
|
20
|
+
beforeTransformPlugins: LifecyclePlugins;
|
|
21
|
+
beforeUploadPlugins: LifecyclePlugins;
|
|
22
|
+
afterUploadPlugins: LifecyclePlugins;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* for uploading image info
|
|
26
|
+
*/
|
|
27
|
+
export interface IImgInfo {
|
|
28
|
+
buffer?: Buffer;
|
|
29
|
+
base64Image?: string;
|
|
30
|
+
fileName?: string;
|
|
31
|
+
width?: number;
|
|
32
|
+
height?: number;
|
|
33
|
+
extname?: string;
|
|
34
|
+
[propName: string]: any;
|
|
35
|
+
}
|
|
36
|
+
export interface IPathTransformedImgInfo extends IImgInfo {
|
|
37
|
+
success: boolean;
|
|
38
|
+
}
|
|
39
|
+
/** SM.MS 图床配置项 */
|
|
40
|
+
export interface ISmmsConfig {
|
|
41
|
+
token: string;
|
|
42
|
+
}
|
|
43
|
+
/** 七牛云图床配置项 */
|
|
44
|
+
export interface IQiniuConfig {
|
|
45
|
+
accessKey: string;
|
|
46
|
+
secretKey: string;
|
|
47
|
+
/** 存储空间名 */
|
|
48
|
+
bucket: string;
|
|
49
|
+
/** 自定义域名 */
|
|
50
|
+
url: string;
|
|
51
|
+
/** 存储区域编号 */
|
|
52
|
+
area: 'z0' | 'z1' | 'z2' | 'na0' | 'as0';
|
|
53
|
+
/** 网址后缀,比如使用 `?imageslim` 可进行[图片瘦身](https://developer.qiniu.com/dora/api/1271/image-thin-body-imageslim) */
|
|
54
|
+
options: string;
|
|
55
|
+
/** 自定义存储路径,比如 `img/` */
|
|
56
|
+
path: string;
|
|
57
|
+
}
|
|
58
|
+
/** 又拍云图床配置项 */
|
|
59
|
+
export interface IUpyunConfig {
|
|
60
|
+
/** 存储空间名,及你的服务名 */
|
|
61
|
+
bucket: string;
|
|
62
|
+
/** 操作员 */
|
|
63
|
+
operator: string;
|
|
64
|
+
/** 密码 */
|
|
65
|
+
password: string;
|
|
66
|
+
/** 针对图片的一些后缀处理参数 */
|
|
67
|
+
options: string;
|
|
68
|
+
/** 自定义存储路径,比如 `img/` */
|
|
69
|
+
path: string;
|
|
70
|
+
/** 加速域名,注意要加 `http://` 或者 `https://` */
|
|
71
|
+
url: string;
|
|
72
|
+
}
|
|
73
|
+
/** 腾讯云图床配置项 */
|
|
74
|
+
export interface ITcyunConfig {
|
|
75
|
+
secretId: string;
|
|
76
|
+
secretKey: string;
|
|
77
|
+
/** 存储桶名,v4 和 v5 版本不一样 */
|
|
78
|
+
bucket: string;
|
|
79
|
+
appId: string;
|
|
80
|
+
/** 存储区域,例如 ap-beijing-1 */
|
|
81
|
+
area: string;
|
|
82
|
+
/** 自定义存储路径,比如 img/ */
|
|
83
|
+
path: string;
|
|
84
|
+
/** 自定义域名,注意要加 `http://` 或者 `https://` */
|
|
85
|
+
customUrl: string;
|
|
86
|
+
/** COS 版本,v4 或者 v5 */
|
|
87
|
+
version: 'v5' | 'v4';
|
|
88
|
+
}
|
|
89
|
+
/** GitHub 图床配置项 */
|
|
90
|
+
export interface IGithubConfig {
|
|
91
|
+
/** 仓库名,格式是 `username/reponame` */
|
|
92
|
+
repo: string;
|
|
93
|
+
/** github token */
|
|
94
|
+
token: string;
|
|
95
|
+
/** 自定义存储路径,比如 `img/` */
|
|
96
|
+
path: string;
|
|
97
|
+
/** 自定义域名,注意要加 `http://` 或者 `https://` */
|
|
98
|
+
customUrl: string;
|
|
99
|
+
/** 分支名,默认是 `master` */
|
|
100
|
+
branch: string;
|
|
101
|
+
}
|
|
102
|
+
/** 阿里云图床配置项 */
|
|
103
|
+
export interface IAliyunConfig {
|
|
104
|
+
accessKeyId: string;
|
|
105
|
+
accessKeySecret: string;
|
|
106
|
+
/** 存储空间名 */
|
|
107
|
+
bucket: string;
|
|
108
|
+
/** 存储区域代号 */
|
|
109
|
+
area: string;
|
|
110
|
+
/** 自定义存储路径 */
|
|
111
|
+
path: string;
|
|
112
|
+
/** 自定义域名,注意要加 `http://` 或者 `https://` */
|
|
113
|
+
customUrl: string;
|
|
114
|
+
/** 针对图片的一些后缀处理参数 PicGo 2.2.0+ PicGo-Core 1.4.0+ */
|
|
115
|
+
options: string;
|
|
116
|
+
}
|
|
117
|
+
/** Imgur 图床配置项 */
|
|
118
|
+
export interface IImgurConfig {
|
|
119
|
+
/** imgur 的 `clientId` */
|
|
120
|
+
clientId: string;
|
|
121
|
+
/** 代理地址,仅支持 http 代理 */
|
|
122
|
+
proxy: string;
|
|
123
|
+
}
|
|
124
|
+
/** PicGo 配置文件类型定义 */
|
|
125
|
+
export interface IConfig {
|
|
126
|
+
picBed: {
|
|
127
|
+
uploader: string;
|
|
128
|
+
current?: string;
|
|
129
|
+
smms?: ISmmsConfig;
|
|
130
|
+
qiniu?: IQiniuConfig;
|
|
131
|
+
upyun?: IUpyunConfig;
|
|
132
|
+
tcyun?: ITcyunConfig;
|
|
133
|
+
github?: IGithubConfig;
|
|
134
|
+
aliyun?: IAliyunConfig;
|
|
135
|
+
imgur?: IImgurConfig;
|
|
136
|
+
transformer?: string;
|
|
137
|
+
proxy: string;
|
|
138
|
+
};
|
|
139
|
+
picgoPlugins: {
|
|
140
|
+
[propName: string]: boolean;
|
|
141
|
+
};
|
|
142
|
+
debug?: boolean;
|
|
143
|
+
silent?: boolean;
|
|
144
|
+
settings?: {
|
|
145
|
+
logLevel: string;
|
|
146
|
+
logPath: string;
|
|
147
|
+
};
|
|
148
|
+
/** 下载插件时 npm 命令自定义的 registry */
|
|
149
|
+
registry: string;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* for plugin
|
|
153
|
+
*/
|
|
154
|
+
export interface IPlugin {
|
|
155
|
+
handle: ((ctx: PicGo) => Promise<any>) | ((ctx: PicGo) => void);
|
|
156
|
+
[propName: string]: any;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* for spawn output
|
|
160
|
+
*/
|
|
161
|
+
export interface IResult {
|
|
162
|
+
code: number;
|
|
163
|
+
data: string;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* for transformer - path
|
|
167
|
+
*/
|
|
168
|
+
export interface IImgSize {
|
|
169
|
+
width: number;
|
|
170
|
+
height: number;
|
|
171
|
+
real?: boolean;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* for initUtils
|
|
175
|
+
*/
|
|
176
|
+
export interface IOptions {
|
|
177
|
+
template: string;
|
|
178
|
+
dest: string;
|
|
179
|
+
hasSlash: boolean;
|
|
180
|
+
inPlace: boolean;
|
|
181
|
+
clone: boolean;
|
|
182
|
+
offline: boolean;
|
|
183
|
+
tmp: string;
|
|
184
|
+
project: string;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* for clipboard image
|
|
188
|
+
*/
|
|
189
|
+
export interface IClipboardImage {
|
|
190
|
+
imgPath: string;
|
|
191
|
+
isExistFile: boolean;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* for install command environment variable
|
|
195
|
+
*/
|
|
196
|
+
export interface IProcessEnv {
|
|
197
|
+
[propName: string]: Undefinable<string>;
|
|
198
|
+
}
|
|
199
|
+
export type ILogArgvType = string | number;
|
|
200
|
+
export type ILogArgvTypeWithError = ILogArgvType | Error;
|
|
201
|
+
export type Nullable<T> = T | null;
|
|
202
|
+
export type Undefinable<T> = T | undefined;
|
package/dist/utils/static.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const CLIPBOARD_IMAGE_FOLDER = "picgo-clipboard-images";
|
|
1
|
+
export declare const CLIPBOARD_IMAGE_FOLDER = "picgo-clipboard-images";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "picgo",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "A tool for picture uploading",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -11,18 +11,6 @@
|
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
14
|
-
"scripts": {
|
|
15
|
-
"start": "node ./bin/picgo",
|
|
16
|
-
"lint": "eslint src/**/*.ts && npm run build",
|
|
17
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
18
|
-
"build": "cross-env NODE_ENV=production rimraf ./dist && rollup -c rollup.config.js",
|
|
19
|
-
"dev": "cross-env NODE_ENV=development rollup -c rollup.config.js -w",
|
|
20
|
-
"patch": "npm version patch && git push origin master && git push origin --tags",
|
|
21
|
-
"minor": "npm version minor && git push origin master && git push origin --tags",
|
|
22
|
-
"major": "npm version major && git push origin master && git push origin --tags",
|
|
23
|
-
"cz": "git-cz",
|
|
24
|
-
"release": "bump-version"
|
|
25
|
-
},
|
|
26
14
|
"keywords": [
|
|
27
15
|
"picture",
|
|
28
16
|
"upload",
|
|
@@ -50,14 +38,18 @@
|
|
|
50
38
|
"author": "Molunerfinn",
|
|
51
39
|
"license": "MIT",
|
|
52
40
|
"devDependencies": {
|
|
53
|
-
"@
|
|
54
|
-
"@
|
|
55
|
-
"@rollup/plugin-
|
|
56
|
-
"@rollup/plugin-
|
|
57
|
-
"@rollup/plugin-
|
|
41
|
+
"@eslint/js": "^9.39.1",
|
|
42
|
+
"@picgo/bump-version": "^2.0.0",
|
|
43
|
+
"@rollup/plugin-commonjs": "^29.0.0",
|
|
44
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
45
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
46
|
+
"@rollup/plugin-replace": "^6.0.3",
|
|
47
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
48
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
58
49
|
"@types/cross-spawn": "^6.0.0",
|
|
59
50
|
"@types/ejs": "^3.0.5",
|
|
60
51
|
"@types/fs-extra": "^5.0.4",
|
|
52
|
+
"@types/glob": "^7.2.0",
|
|
61
53
|
"@types/image-size": "^0.0.29",
|
|
62
54
|
"@types/inquirer": "^0.0.42",
|
|
63
55
|
"@types/js-yaml": "^4.0.5",
|
|
@@ -65,32 +57,29 @@
|
|
|
65
57
|
"@types/md5": "^2.1.32",
|
|
66
58
|
"@types/mime-types": "^2.1.0",
|
|
67
59
|
"@types/minimatch": "^3.0.3",
|
|
68
|
-
"@types/node": "
|
|
60
|
+
"@types/node": "20.19.26",
|
|
69
61
|
"@types/resolve": "^0.0.8",
|
|
70
62
|
"@types/rimraf": "^3.0.0",
|
|
71
63
|
"@types/tunnel": "^0.0.3",
|
|
72
|
-
"@typescript-eslint/eslint-plugin": "
|
|
73
|
-
"@typescript-eslint/parser": "^
|
|
74
|
-
"
|
|
75
|
-
"builtins": "^4.0.0",
|
|
64
|
+
"@typescript-eslint/eslint-plugin": "^8.49.0",
|
|
65
|
+
"@typescript-eslint/parser": "^8.49.0",
|
|
66
|
+
"commitizen": "^4.3.1",
|
|
76
67
|
"conventional-changelog": "^3.0.6",
|
|
77
68
|
"copyfiles": "^2.1.0",
|
|
78
69
|
"cross-env": "^7.0.3",
|
|
79
70
|
"cz-customizable": "^5.10.0",
|
|
80
|
-
"eslint": "
|
|
81
|
-
"eslint-config-
|
|
82
|
-
"eslint-plugin-import": "2",
|
|
83
|
-
"eslint-plugin-
|
|
84
|
-
"eslint-plugin-promise": "4",
|
|
85
|
-
"eslint-plugin-standard": "4",
|
|
71
|
+
"eslint": "^9.39.1",
|
|
72
|
+
"eslint-config-prettier": "^10.1.8",
|
|
73
|
+
"eslint-plugin-import": "^2.32.0",
|
|
74
|
+
"eslint-plugin-promise": "^7.2.1",
|
|
86
75
|
"execa": "^5.1.1",
|
|
87
|
-
"
|
|
76
|
+
"globals": "^16.5.0",
|
|
77
|
+
"husky": "^9.1.7",
|
|
88
78
|
"pre-commit": "^1.2.2",
|
|
89
|
-
"rollup": "^
|
|
79
|
+
"rollup": "^4.53.3",
|
|
80
|
+
"rollup-plugin-copy": "^3.5.0",
|
|
90
81
|
"rollup-plugin-string": "^3.0.0",
|
|
91
|
-
"
|
|
92
|
-
"rollup-plugin-typescript2": "^0.30.0",
|
|
93
|
-
"typescript": "^4.8.2"
|
|
82
|
+
"typescript": "^5.9.3"
|
|
94
83
|
},
|
|
95
84
|
"dependencies": {
|
|
96
85
|
"@picgo/i18n": "^1.0.0",
|
|
@@ -103,6 +92,7 @@
|
|
|
103
92
|
"dayjs": "^1.7.4",
|
|
104
93
|
"download-git-repo": "^3.0.2",
|
|
105
94
|
"ejs": "^2.6.1",
|
|
95
|
+
"form-data": "^4.0.5",
|
|
106
96
|
"fs-extra": "^6.0.1",
|
|
107
97
|
"globby": "^11.0.4",
|
|
108
98
|
"image-size": "^0.8.3",
|
|
@@ -111,12 +101,12 @@
|
|
|
111
101
|
"js-yaml": "^4.1.0",
|
|
112
102
|
"lodash": "^4.17.21",
|
|
113
103
|
"md5": "^2.2.1",
|
|
114
|
-
"mime-types": "
|
|
104
|
+
"mime-types": "3.0.2",
|
|
115
105
|
"minimatch": "^3.0.4",
|
|
116
106
|
"minimist": "^1.2.5",
|
|
117
107
|
"qiniu": "^7.2.1",
|
|
118
108
|
"resolve": "^1.8.1",
|
|
119
|
-
"rimraf": "^
|
|
109
|
+
"rimraf": "^6.1.2",
|
|
120
110
|
"tunnel": "^0.0.6"
|
|
121
111
|
},
|
|
122
112
|
"repository": {
|
|
@@ -128,6 +118,18 @@
|
|
|
128
118
|
},
|
|
129
119
|
"plugins": {},
|
|
130
120
|
"engines": {
|
|
131
|
-
"node": ">=
|
|
121
|
+
"node": ">= 20.0.0"
|
|
122
|
+
},
|
|
123
|
+
"scripts": {
|
|
124
|
+
"start": "node ./bin/picgo",
|
|
125
|
+
"lint": "eslint src --ext .ts",
|
|
126
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
127
|
+
"build": "cross-env NODE_ENV=production rimraf ./dist && rollup -c rollup.config.js",
|
|
128
|
+
"dev": "cross-env NODE_ENV=development rollup -c rollup.config.js -w",
|
|
129
|
+
"patch": "npm version patch && git push origin master && git push origin --tags",
|
|
130
|
+
"minor": "npm version minor && git push origin master && git push origin --tags",
|
|
131
|
+
"major": "npm version major && git push origin master && git push origin --tags",
|
|
132
|
+
"cz": "git-cz",
|
|
133
|
+
"release": "bump-version"
|
|
132
134
|
}
|
|
133
|
-
}
|
|
135
|
+
}
|
package/.eslintignore
DELETED
package/.eslintrc.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
extends: 'standard-with-typescript',
|
|
3
|
-
parserOptions: {
|
|
4
|
-
project: './tsconfig.json'
|
|
5
|
-
},
|
|
6
|
-
rules: {
|
|
7
|
-
'@typescript-eslint/strict-boolean-expressions': 0,
|
|
8
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/ef88a696a157f617d38ce6d49207a4a4a089a19b/packages/eslint-plugin/docs/rules/naming-convention.md#enforce-that-interface-names-do-not-begin-with-an-i
|
|
9
|
-
'@typescript-eslint/naming-convention': [
|
|
10
|
-
'error',
|
|
11
|
-
{
|
|
12
|
-
selector: 'interface',
|
|
13
|
-
format: ['PascalCase'],
|
|
14
|
-
custom: {
|
|
15
|
-
regex: '^I[A-Z]',
|
|
16
|
-
match: true
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
],
|
|
20
|
-
'@typescript-eslint/prefer-nullish-coalescing': 0,
|
|
21
|
-
'@typescript-eslint/return-await': 0,
|
|
22
|
-
'@typescript-eslint/no-floating-promises': 0,
|
|
23
|
-
'@typescript-eslint/no-non-null-assertion': 0
|
|
24
|
-
}
|
|
25
|
-
}
|
package/.github/CODEOWNERS
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
* @Molunerfinn
|
package/.github/funding.yml
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
github: ["Molunerfinn"]
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
name: publish
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches:
|
|
5
|
-
- alpha
|
|
6
|
-
jobs:
|
|
7
|
-
build:
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
steps:
|
|
10
|
-
- name: Clone repo
|
|
11
|
-
uses: actions/checkout@v1
|
|
12
|
-
- name: Setup node
|
|
13
|
-
uses: actions/setup-node@v1
|
|
14
|
-
with:
|
|
15
|
-
node-version: '16.x'
|
|
16
|
-
registry-url: 'https://registry.npmjs.org'
|
|
17
|
-
- name: Install modules
|
|
18
|
-
run: yarn
|
|
19
|
-
- run: npm run build
|
|
20
|
-
- run: npm publish --tag alpha --access public
|
|
21
|
-
env:
|
|
22
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
name: publish
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches:
|
|
5
|
-
- master
|
|
6
|
-
jobs:
|
|
7
|
-
build:
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
steps:
|
|
10
|
-
- name: Clone repo
|
|
11
|
-
uses: actions/checkout@v1
|
|
12
|
-
- name: Setup node
|
|
13
|
-
uses: actions/setup-node@v1
|
|
14
|
-
with:
|
|
15
|
-
node-version: '16.x'
|
|
16
|
-
registry-url: 'https://registry.npmjs.org'
|
|
17
|
-
- name: Install modules
|
|
18
|
-
run: yarn
|
|
19
|
-
- run: npm run build
|
|
20
|
-
- run: npm publish --access public
|
|
21
|
-
env:
|
|
22
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
name: manually-trigger
|
|
2
|
-
on: workflow_dispatch
|
|
3
|
-
jobs:
|
|
4
|
-
build:
|
|
5
|
-
runs-on: ubuntu-latest
|
|
6
|
-
steps:
|
|
7
|
-
- name: Clone repo
|
|
8
|
-
uses: actions/checkout@v1
|
|
9
|
-
- name: Setup node
|
|
10
|
-
uses: actions/setup-node@v1
|
|
11
|
-
with:
|
|
12
|
-
node-version: '16.x'
|
|
13
|
-
registry-url: 'https://registry.npmjs.org'
|
|
14
|
-
- name: Install modules
|
|
15
|
-
run: yarn
|
|
16
|
-
- run: npm run build
|
|
17
|
-
- run: npm publish --access public
|
|
18
|
-
env:
|
|
19
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|