picgo 1.5.0-alpha.0 → 1.5.0-alpha.10
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/.github/workflows/alpha.yml +22 -0
- package/.github/workflows/main.yml +1 -1
- package/.github/workflows/manually.yml +1 -1
- package/CHANGELOG.md +138 -3
- package/README.md +1 -1
- package/dist/core/PicGo.d.ts +4 -3
- package/dist/i18n/en.d.ts +2 -0
- package/dist/i18n/index.d.ts +18 -0
- package/dist/i18n/zh-CN.d.ts +91 -0
- package/dist/i18n/zh-TW.d.ts +2 -0
- package/dist/index.cjs.js +2 -2
- package/dist/index.esm.js +2 -2
- package/dist/lib/Commander.d.ts +10 -4
- package/dist/lib/LifecyclePlugins.d.ts +1 -0
- package/dist/lib/Logger.d.ts +3 -0
- package/dist/lib/Request.d.ts +6 -5
- package/dist/plugins/commander/i18n.d.ts +3 -0
- package/dist/plugins/uploader/aliyun.d.ts +2 -7
- package/dist/plugins/uploader/github.d.ts +2 -7
- package/dist/plugins/uploader/imgur.d.ts +2 -7
- package/dist/plugins/uploader/qiniu.d.ts +2 -7
- package/dist/plugins/uploader/smms.d.ts +2 -7
- package/dist/plugins/uploader/tcyun.d.ts +2 -7
- package/dist/plugins/uploader/upyun.d.ts +2 -7
- package/dist/types/index.d.ts +89 -8
- package/dist/utils/common.d.ts +5 -0
- package/dist/utils/db.d.ts +2 -2
- package/dist/utils/static.d.ts +1 -0
- package/package.json +14 -11
- package/rollup.config.js +7 -2
|
@@ -0,0 +1,22 @@
|
|
|
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 }}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,141 @@
|
|
|
1
|
+
# :tada: 1.5.0-alpha.10 (2022-09-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### :sparkles: Features
|
|
5
|
+
|
|
6
|
+
* add zh-TW ([#135](https://github.com/PicGo/PicGo-Core/issues/135)) ([d111d6a](https://github.com/PicGo/PicGo-Core/commit/d111d6a))
|
|
7
|
+
* update linux.sh ([#134](https://github.com/PicGo/PicGo-Core/issues/134)) ([2910c20](https://github.com/PicGo/PicGo-Core/commit/2910c20))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### :bug: Bug Fixes
|
|
11
|
+
|
|
12
|
+
* some texts in zh-TW ([#136](https://github.com/PicGo/PicGo-Core/issues/136)) ([907e6c9](https://github.com/PicGo/PicGo-Core/commit/907e6c9))
|
|
13
|
+
* url image download bug & tencent cos url encode bug ([53d54f8](https://github.com/PicGo/PicGo-Core/commit/53d54f8))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# :tada: 1.5.0-alpha.9 (2022-09-03)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### :sparkles: Features
|
|
21
|
+
|
|
22
|
+
* finish request -> axios ([b89cf1e](https://github.com/PicGo/PicGo-Core/commit/b89cf1e))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### :bug: Bug Fixes
|
|
26
|
+
|
|
27
|
+
* qiniu error msg can't show ([0e4661b](https://github.com/PicGo/PicGo-Core/commit/0e4661b))
|
|
28
|
+
* sm.ms backupDomain message text ([45424d1](https://github.com/PicGo/PicGo-Core/commit/45424d1))
|
|
29
|
+
* when request-options resolveWithFullResponse is false bug ([eb8217a](https://github.com/PicGo/PicGo-Core/commit/eb8217a))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# :tada: 1.5.0-alpha.8 (2022-08-27)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### :sparkles: Features
|
|
37
|
+
|
|
38
|
+
* add backupDomain for sm.ms ([c6d54f1](https://github.com/PicGo/PicGo-Core/commit/c6d54f1))
|
|
39
|
+
* add debug logger type ([4342268](https://github.com/PicGo/PicGo-Core/commit/4342268))
|
|
40
|
+
* add picgo.use for easily using plugin ([c0107f1](https://github.com/PicGo/PicGo-Core/commit/c0107f1))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### :bug: Bug Fixes
|
|
44
|
+
|
|
45
|
+
* sometime tencent-cloud error message is empty ([6355e1b](https://github.com/PicGo/PicGo-Core/commit/6355e1b))
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
# :tada: 1.5.0-alpha.7 (2022-08-20)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
### :sparkles: Features
|
|
53
|
+
|
|
54
|
+
* finish i18n text ([11b3197](https://github.com/PicGo/PicGo-Core/commit/11b3197))
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### :bug: Bug Fixes
|
|
58
|
+
|
|
59
|
+
* aliyun content-type -> Content-Type ([a649fcc](https://github.com/PicGo/PicGo-Core/commit/a649fcc))
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
# :tada: 1.5.0-alpha.6 (2022-08-17)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
### :bug: Bug Fixes
|
|
67
|
+
|
|
68
|
+
* tencent cos upload error ([61df53a](https://github.com/PicGo/PicGo-Core/commit/61df53a))
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
# :tada: 1.5.0-alpha.5 (2022-07-31)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
### :sparkles: Features
|
|
76
|
+
|
|
77
|
+
* add log file size limit ([158be01](https://github.com/PicGo/PicGo-Core/commit/158be01))
|
|
78
|
+
* change inner db to @picgo/store ([0e90af3](https://github.com/PicGo/PicGo-Core/commit/0e90af3))
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
### :bug: Bug Fixes
|
|
82
|
+
|
|
83
|
+
* build error ([674a6b5](https://github.com/PicGo/PicGo-Core/commit/674a6b5))
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
# :tada: 1.5.0-alpha.4 (2022-05-26)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
### :sparkles: Features
|
|
91
|
+
|
|
92
|
+
* add userAgent for tencent cloud COS ([acac59a](https://github.com/PicGo/PicGo-Core/commit/acac59a))
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
# :tada: 1.5.0-alpha.3 (2022-04-04)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
### :bug: Bug Fixes
|
|
100
|
+
|
|
101
|
+
* picgo-gui clipboard image uploading error ([1302f76](https://github.com/PicGo/PicGo-Core/commit/1302f76))
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
# :tada: 1.5.0-alpha.2 (2022-04-03)
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
### :sparkles: Features
|
|
109
|
+
|
|
110
|
+
* add wayland support for linux ([#119](https://github.com/PicGo/PicGo-Core/issues/119)) ([28905f2](https://github.com/PicGo/PicGo-Core/commit/28905f2))
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
### :bug: Bug Fixes
|
|
114
|
+
|
|
115
|
+
* qiniu && upyun errors ([587dd3f](https://github.com/PicGo/PicGo-Core/commit/587dd3f))
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
# :tada: 1.5.0-alpha.1 (2022-03-08)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
### :sparkles: Features
|
|
123
|
+
|
|
124
|
+
* add options for tencent cos ([1fccdcc](https://github.com/PicGo/PicGo-Core/commit/1fccdcc)), closes [#117](https://github.com/PicGo/PicGo-Core/issues/117)
|
|
125
|
+
* **i18n:** add i18n for picgo ([4b93a76](https://github.com/PicGo/PicGo-Core/commit/4b93a76))
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
### :bug: Bug Fixes
|
|
129
|
+
|
|
130
|
+
* build error in windows ([5616fb9](https://github.com/PicGo/PicGo-Core/commit/5616fb9))
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
### :package: Chore
|
|
134
|
+
|
|
135
|
+
* add alpha branch for alpha version ([6882022](https://github.com/PicGo/PicGo-Core/commit/6882022)), closes [#106](https://github.com/PicGo/PicGo-Core/issues/106)
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
1
139
|
# :tada: 1.5.0-alpha.0 (2021-10-26)
|
|
2
140
|
|
|
3
141
|
|
|
@@ -337,6 +475,3 @@
|
|
|
337
475
|
### :package: Chore
|
|
338
476
|
|
|
339
477
|
* add picgo bump version ([c312302](https://github.com/PicGo/PicGo-Core/commit/c312302))
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ A tool for picture uploading. Both CLI & api supports. It also supports plugin s
|
|
|
15
15
|
|
|
16
16
|
## Installation
|
|
17
17
|
|
|
18
|
-
PicGo should be installed with node.js >= 12.
|
|
18
|
+
PicGo should be installed with node.js >= 12 (v1.5.0-alpha.4 and small) & node.js >= 16 (since v1.5.0-alpha.5).
|
|
19
19
|
|
|
20
20
|
### Global install
|
|
21
21
|
|
package/dist/core/PicGo.d.ts
CHANGED
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
import { EventEmitter } from 'events';
|
|
3
3
|
import Commander from '../lib/Commander';
|
|
4
4
|
import { Logger } from '../lib/Logger';
|
|
5
|
-
import { IHelper, IImgInfo, IPicGo, IStringKeyMap, IPluginLoader } from '../types';
|
|
5
|
+
import { IHelper, IImgInfo, IPicGo, IStringKeyMap, IPluginLoader, II18nManager, IPicGoPlugin, IPicGoPluginInterface, IRequest } from '../types';
|
|
6
6
|
import Request from '../lib/Request';
|
|
7
7
|
import PluginHandler from '../lib/PluginHandler';
|
|
8
|
-
import { RequestPromiseAPI } from 'request-promise-native';
|
|
9
8
|
export declare class PicGo extends EventEmitter implements IPicGo {
|
|
10
9
|
private _config;
|
|
11
10
|
private lifecycle;
|
|
@@ -25,6 +24,7 @@ export declare class PicGo extends EventEmitter implements IPicGo {
|
|
|
25
24
|
* use request instead
|
|
26
25
|
*/
|
|
27
26
|
Request: Request;
|
|
27
|
+
i18n: II18nManager;
|
|
28
28
|
VERSION: string;
|
|
29
29
|
GUI_VERSION?: string;
|
|
30
30
|
get pluginLoader(): IPluginLoader;
|
|
@@ -32,12 +32,13 @@ export declare class PicGo extends EventEmitter implements IPicGo {
|
|
|
32
32
|
private initConfigPath;
|
|
33
33
|
private initConfig;
|
|
34
34
|
private init;
|
|
35
|
+
use(plugin: IPicGoPlugin): IPicGoPluginInterface;
|
|
35
36
|
registerCommands(): void;
|
|
36
37
|
getConfig<T>(name?: string): T;
|
|
37
38
|
saveConfig(config: IStringKeyMap<any>): void;
|
|
38
39
|
removeConfig(key: string, propName: string): void;
|
|
39
40
|
setConfig(config: IStringKeyMap<any>): void;
|
|
40
41
|
unsetConfig(key: string, propName: string): void;
|
|
41
|
-
get request():
|
|
42
|
+
get request(): IRequest['request'];
|
|
42
43
|
upload(input?: any[]): Promise<IImgInfo[] | Error>;
|
|
43
44
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ILocalesKey } from './zh-CN';
|
|
2
|
+
import { IPicGo } from '../types';
|
|
3
|
+
import { IStringKeyMap, II18nManager } from '../types/index';
|
|
4
|
+
import { ILocale } from '@picgo/i18n/dist/types';
|
|
5
|
+
declare class I18nManager implements II18nManager {
|
|
6
|
+
private readonly i18n;
|
|
7
|
+
private readonly objectAdapter;
|
|
8
|
+
private readonly ctx;
|
|
9
|
+
constructor(ctx: IPicGo);
|
|
10
|
+
private loadOutterI18n;
|
|
11
|
+
private getOutterI18nFolder;
|
|
12
|
+
translate<T extends string>(key: ILocalesKey | T, args?: IStringKeyMap<string>): string;
|
|
13
|
+
setLanguage(language: string): void;
|
|
14
|
+
addLocale(language: string, locales: ILocale): boolean;
|
|
15
|
+
addLanguage(language: string, locales: ILocale): boolean;
|
|
16
|
+
getLanguageList(): string[];
|
|
17
|
+
}
|
|
18
|
+
export { I18nManager };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export declare const ZH_CN: {
|
|
2
|
+
UPLOAD_FAILED: string;
|
|
3
|
+
CHECK_SETTINGS: string;
|
|
4
|
+
CHECK_SETTINGS_AND_NETWORK: string;
|
|
5
|
+
UPLOAD_FAILED_REASON: string;
|
|
6
|
+
SERVER_ERROR: string;
|
|
7
|
+
AUTH_FAILED: string;
|
|
8
|
+
PICBED_SMMS: string;
|
|
9
|
+
PICBED_SMMS_TOKEN: string;
|
|
10
|
+
PICBED_SMMS_BACKUP_DOMAIN: string;
|
|
11
|
+
PICBED_SMMS_MESSAGE_BACKUP_DOMAIN: string;
|
|
12
|
+
PICBED_ALICLOUD: string;
|
|
13
|
+
PICBED_ALICLOUD_ACCESSKEYID: string;
|
|
14
|
+
PICBED_ALICLOUD_ACCESSKEYSECRET: string;
|
|
15
|
+
PICBED_ALICLOUD_BUCKET: string;
|
|
16
|
+
PICBED_ALICLOUD_AREA: string;
|
|
17
|
+
PICBED_ALICLOUD_PATH: string;
|
|
18
|
+
PICBED_ALICLOUD_CUSTOMURL: string;
|
|
19
|
+
PICBED_ALICLOUD_OPTIONS: string;
|
|
20
|
+
PICBED_ALICLOUD_MESSAGE_AREA: string;
|
|
21
|
+
PICBED_ALICLOUD_MESSAGE_PATH: string;
|
|
22
|
+
PICBED_ALICLOUD_MESSAGE_OPTIONS: string;
|
|
23
|
+
PICBED_ALICLOUD_MESSAGE_CUSTOMURL: string;
|
|
24
|
+
PICBED_TENCENTCLOUD: string;
|
|
25
|
+
PICBED_TENCENTCLOUD_VERSION: string;
|
|
26
|
+
PICBED_TENCENTCLOUD_SECRETID: string;
|
|
27
|
+
PICBED_TENCENTCLOUD_SECRETKEY: string;
|
|
28
|
+
PICBED_TENCENTCLOUD_APPID: string;
|
|
29
|
+
PICBED_TENCENTCLOUD_BUCKET: string;
|
|
30
|
+
PICBED_TENCENTCLOUD_AREA: string;
|
|
31
|
+
PICBED_TENCENTCLOUD_PATH: string;
|
|
32
|
+
PICBED_TENCENTCLOUD_OPTIONS: string;
|
|
33
|
+
PICBED_TENCENTCLOUD_CUSTOMURL: string;
|
|
34
|
+
PICBED_TENCENTCLOUD_MESSAGE_APPID: string;
|
|
35
|
+
PICBED_TENCENTCLOUD_MESSAGE_AREA: string;
|
|
36
|
+
PICBED_TENCENTCLOUD_MESSAGE_PATH: string;
|
|
37
|
+
PICBED_TENCENTCLOUD_MESSAGE_CUSTOMURL: string;
|
|
38
|
+
PICBED_TENCENTCLOUD_MESSAGE_OPTIONS: string;
|
|
39
|
+
PICBED_GITHUB: string;
|
|
40
|
+
PICBED_GITHUB_TOKEN: string;
|
|
41
|
+
PICBED_GITHUB_REPO: string;
|
|
42
|
+
PICBED_GITHUB_PATH: string;
|
|
43
|
+
PICBED_GITHUB_BRANCH: string;
|
|
44
|
+
PICBED_GITHUB_CUSTOMURL: string;
|
|
45
|
+
PICBED_GITHUB_MESSAGE_REPO: string;
|
|
46
|
+
PICBED_GITHUB_MESSAGE_BRANCH: string;
|
|
47
|
+
PICBED_GITHUB_MESSAGE_PATH: string;
|
|
48
|
+
PICBED_GITHUB_MESSAGE_CUSTOMURL: string;
|
|
49
|
+
PICBED_QINIU: string;
|
|
50
|
+
PICBED_QINIU_ACCESSKEY: string;
|
|
51
|
+
PICBED_QINIU_SECRETKEY: string;
|
|
52
|
+
PICBED_QINIU_BUCKET: string;
|
|
53
|
+
PICBED_QINIU_PATH: string;
|
|
54
|
+
PICBED_QINIU_URL: string;
|
|
55
|
+
PICBED_QINIU_OPTIONS: string;
|
|
56
|
+
PICBED_QINIU_AREA: string;
|
|
57
|
+
PICBED_QINIU_MESSAGE_PATH: string;
|
|
58
|
+
PICBED_QINIU_MESSAGE_AREA: string;
|
|
59
|
+
PICBED_QINIU_MESSAGE_OPTIONS: string;
|
|
60
|
+
PICBED_QINIU_MESSAGE_URL: string;
|
|
61
|
+
PICBED_IMGUR: string;
|
|
62
|
+
PICBED_IMGUR_CLIENTID: string;
|
|
63
|
+
PICBED_IMGUR_PROXY: string;
|
|
64
|
+
PICBED_IMGUR_MESSAGE_PROXY: string;
|
|
65
|
+
PICBED_UPYUN: string;
|
|
66
|
+
PICBED_UPYUN_BUCKET: string;
|
|
67
|
+
PICBED_UPYUN_OPERATOR: string;
|
|
68
|
+
PICBED_UPYUN_PASSWORD: string;
|
|
69
|
+
PICBED_UPYUN_PATH: string;
|
|
70
|
+
PICBED_UPYUN_URL: string;
|
|
71
|
+
PICBED_UPYUN_OPTIONS: string;
|
|
72
|
+
PICBED_UPYUN_MESSAGE_OPERATOR: string;
|
|
73
|
+
PICBED_UPYUN_MESSAGE_PASSWORD: string;
|
|
74
|
+
PICBED_UPYUN_MESSAGE_URL: string;
|
|
75
|
+
PICBED_UPYUN_MESSAGE_OPTIONS: string;
|
|
76
|
+
PICBED_UPYUN_MESSAGE_PATH: string;
|
|
77
|
+
PLUGIN_HANDLER_PLUGIN_INSTALL_SUCCESS: string;
|
|
78
|
+
PLUGIN_HANDLER_PLUGIN_INSTALL_FAILED: string;
|
|
79
|
+
PLUGIN_HANDLER_PLUGIN_INSTALL_FAILED_REASON: string;
|
|
80
|
+
PLUGIN_HANDLER_PLUGIN_INSTALL_FAILED_PATH: string;
|
|
81
|
+
PLUGIN_HANDLER_PLUGIN_UNINSTALL_SUCCESS: string;
|
|
82
|
+
PLUGIN_HANDLER_PLUGIN_UNINSTALL_FAILED: string;
|
|
83
|
+
PLUGIN_HANDLER_PLUGIN_UNINSTALL_FAILED_REASON: string;
|
|
84
|
+
PLUGIN_HANDLER_PLUGIN_UNINSTALL_FAILED_VALID: string;
|
|
85
|
+
PLUGIN_HANDLER_PLUGIN_UPDATE_SUCCESS: string;
|
|
86
|
+
PLUGIN_HANDLER_PLUGIN_UPDATE_FAILED: string;
|
|
87
|
+
PLUGIN_HANDLER_PLUGIN_UPDATE_FAILED_REASON: string;
|
|
88
|
+
PLUGIN_HANDLER_PLUGIN_UPDATE_FAILED_VALID: string;
|
|
89
|
+
};
|
|
90
|
+
export declare type ILocalesKey = keyof typeof ZH_CN;
|
|
91
|
+
export declare type ILocales = typeof ZH_CN;
|