piclist 2.0.5 → 2.2.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 CHANGED
@@ -1,3 +1,18 @@
1
+ ## (2026-01-10)
2
+
3
+ * :sparkles: Feature(custom): support picbed specific compress/watermark/rename/autorename/manualrenam 74e8a6f
4
+
5
+
6
+
7
+ ## (2026-01-09)
8
+
9
+ * :arrow_up: Upgrade(custom): upgrade to piclist/store 3.0.1 c4aecc8
10
+ * :pencil: Docs(custom): update readme 587d588
11
+ * :sparkles: Feature(custom): db now support multiple config get 47314cc
12
+ * :sparkles: Feature(custom): support multiple uploader config with the same config in PicList desktop 1f145ed
13
+
14
+
15
+
1
16
  ## (2026-01-06)
2
17
 
3
18
  * :arrow_up: Upgrade(custom): upgrade deps 95477a4
package/README.md CHANGED
@@ -15,6 +15,14 @@ PicList-Core 是一个功能强大的图片上传工具,提供 CLI 和 API 两
15
15
 
16
16
  ## 增强功能
17
17
 
18
+ - **多配置支持**:
19
+ - 每个图床支持多个配置,兼容桌面版PicList配置文件
20
+ - 通过 `picgo config-list <uploader>` 列出所有配置
21
+ - 通过 `picgo config-use <uploader> <configName>` 切换默认配置
22
+ - 通过 `picgo config-remove <uploader> <configName>` 删除配置
23
+ - 通过 `picgo config-rename <uploader> <oldName> <newName>` 重命名配置
24
+ - 通过 `picgo config-show <uploader> [configName]` 查看配置详情
25
+
18
26
  - **图像处理能力**:
19
27
  - 添加水印、压缩图片和转换格式
20
28
  - 通过 `picgo set buildin watermark` 和 `picgo set buildin compress` CLI 命令进行配置
@@ -182,25 +190,30 @@ $ picgo-server -h
182
190
  ```bash
183
191
  $ picgo -h
184
192
 
185
- Usage: picgo [options] [command]
186
-
187
- Options:
188
-
189
- -v, --version 输出版本号
190
- -d, --debug 调试模式
191
- -s, --silent 静默模式
192
- -c, --config <path> 设置配置路径
193
- -h, --help 输出使用信息
194
-
195
- Commands:
196
-
197
- install|add <plugins...> 安装picgo插件
198
- uninstall|rm <plugins...> 卸载picgo插件
199
- update <plugins...> 更新picgo插件
200
- set|config <module> [name] 配置picgo模块
201
- upload|u [input...] 上传,开始上传
202
- use [module] 使用picgo模块
203
- init [options] <template> [project] 创建picgo插件的开发模板
193
+ Usage: picgo [options] [command]
194
+
195
+ Options:
196
+ -v, --version output the version number
197
+ -d, --debug debug mode
198
+ -s, --silent silent mode
199
+ -c, --config <path> set config path
200
+ -p, --proxy <url> set proxy for uploading
201
+ -h, --help display help for command
202
+
203
+ Commands:
204
+ install|add [options] <plugins...> install picgo plugin
205
+ uninstall|rm <plugins...> uninstall picgo plugin
206
+ update|up [options] <plugins...> update picgo plugin
207
+ config-list <uploader> list all configs names for an uploader
208
+ config-use <uploader> <configName> set a config as default for an uploader
209
+ config-remove <uploader> <configName> remove a config for an uploader
210
+ config-rename <uploader> <oldName> <newName> rename a config for an uploader
211
+ config-show <uploader> [configName] show details of a config
212
+ set|config <module> [name] [configName] configure config of picgo modules, uploader|transformer|plugin|buildin. For uploader, configName is optional (defaults to "Default").
213
+ upload|u [input...] upload, go go go
214
+ use [module] use modules of picgo
215
+ i18n [lang] change language, zh-CN, zh-TW, en
216
+ help [command] display help for command
204
217
  ```
205
218
 
206
219
  #### 从路径上传图片
@@ -242,7 +255,3 @@ picgo.upload(['/xxx/xxx.jpg'])
242
255
  // 从剪贴板上传图片
243
256
  picgo.upload()
244
257
  ```
245
-
246
- ## 文档
247
-
248
- 获取更多详细信息,请查看[PicGo-Core文档](https://picgo.github.io/PicGo-Core-Doc/)。
package/README_en.md CHANGED
@@ -16,6 +16,14 @@ You can refer to the [DeepWiki of PiclList-Core](https://deepwiki.com/Kuingsmile
16
16
 
17
17
  ## Enhanced Features
18
18
 
19
+ - **Multi-configuration support**:
20
+ - Each uploader supports multiple configurations, compatible with PicList-Desktop config files
21
+ - List all configurations via `picgo config-list <uploader>`
22
+ - Switch default configuration via `picgo config-use <uploader> <configName>`
23
+ - Remove configuration via `picgo config-remove <uploader> <configName>`
24
+ - Rename configuration via `picgo config-rename <uploader> <oldName> <newName>`
25
+ - View configuration details via `picgo config-show <uploader> [configName]`
26
+
19
27
  - **Image processing capabilities**:
20
28
  - Add watermarks, compress images, and convert formats
21
29
  - Configure via `picgo set buildin watermark` and `picgo set buildin compress` CLI commands
@@ -183,25 +191,30 @@ Show help:
183
191
  ```bash
184
192
  $ picgo -h
185
193
 
186
- Usage: picgo [options] [command]
187
-
188
- Options:
189
-
190
- -v, --version output the version number
191
- -d, --debug debug mode
192
- -s, --silent silent mode
193
- -c, --config <path> set config path
194
- -h, --help output usage information
195
-
196
- Commands:
197
-
198
- install|add <plugins...> install picgo plugin
199
- uninstall|rm <plugins...> uninstall picgo plugin
200
- update <plugins...> update picgo plugin
201
- set|config <module> [name] configure config of picgo modules
202
- upload|u [input...] upload, go go go
203
- use [module] use modules of picgo
204
- init [options] <template> [project] create picgo plugin\'s development templates
194
+ Usage: picgo [options] [command]
195
+
196
+ Options:
197
+ -v, --version output the version number
198
+ -d, --debug debug mode
199
+ -s, --silent silent mode
200
+ -c, --config <path> set config path
201
+ -p, --proxy <url> set proxy for uploading
202
+ -h, --help display help for command
203
+
204
+ Commands:
205
+ install|add [options] <plugins...> install picgo plugin
206
+ uninstall|rm <plugins...> uninstall picgo plugin
207
+ update|up [options] <plugins...> update picgo plugin
208
+ config-list <uploader> list all configs names for an uploader
209
+ config-use <uploader> <configName> set a config as default for an uploader
210
+ config-remove <uploader> <configName> remove a config for an uploader
211
+ config-rename <uploader> <oldName> <newName> rename a config for an uploader
212
+ config-show <uploader> [configName] show details of a config
213
+ set|config <module> [name] [configName] configure config of picgo modules, uploader|transformer|plugin|buildin. For uploader, configName is optional (defaults to "Default").
214
+ upload|u [input...] upload, go go go
215
+ use [module] use modules of picgo
216
+ i18n [lang] change language, zh-CN, zh-TW, en
217
+ help [command] display help for command
205
218
  ```
206
219
 
207
220
  #### Upload a picture from path
@@ -242,8 +255,4 @@ picgo.upload(['/xxx/xxx.jpg'])
242
255
 
243
256
  // upload a picture from clipboard
244
257
  picgo.upload()
245
- ```
246
-
247
- ## Documentation
248
-
249
- For more details, you can checkout [documentation of PicGo-Core](https://picgo.github.io/PicGo-Core-Doc/).
258
+ ```
@@ -7,7 +7,10 @@ export declare class Lifecycle extends EventEmitter {
7
7
  private initializeDirs;
8
8
  private downloadTTF;
9
9
  private getProcessingOptions;
10
- private getUploaderType;
10
+ getUploaderType(ctx: IPicGo): {
11
+ picBed: string;
12
+ id: string;
13
+ };
11
14
  private getSkipExtensions;
12
15
  start(input: any[], skipProcess?: boolean): Promise<IPicGo>;
13
16
  private initializeContext;
@@ -4,6 +4,7 @@ import { Logger } from '../lib/Logger';
4
4
  import { PluginHandler } from '../lib/PluginHandler';
5
5
  import { Request } from '../lib/Request';
6
6
  import { IHelper, II18nManager, IImgInfo, IPicGo, IPicGoPlugin, IPicGoPluginInterface, IPluginLoader, IRequest, IStringKeyMap } from '../types';
7
+ import { ConfigManager } from '../utils/configManager';
7
8
  export declare class PicGo extends EventEmitter implements IPicGo {
8
9
  private _config;
9
10
  private lifecycle;
@@ -19,6 +20,7 @@ export declare class PicGo extends EventEmitter implements IPicGo {
19
20
  rawInput: any[];
20
21
  processedInput: any[];
21
22
  pluginHandler: PluginHandler;
23
+ configManager: ConfigManager;
22
24
  /**
23
25
  * @deprecated will be removed in v1.5.0+
24
26
  *