piclist 2.2.2 → 2.3.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 +7 -0
- package/bin/picgo-server +4 -4
- package/dist/core/Lifecycle.d.ts +2 -1
- package/dist/core/PicGo.d.ts +3 -2
- package/dist/index.js +2 -2
- package/dist/types/index.d.ts +5 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## (2026-01-12)
|
|
2
|
+
|
|
3
|
+
* :sparkles: Feature(custom): support secondary picbed upload in cli 1083185, closes #26
|
|
4
|
+
* :sparkles: Feature(custom): support secondary upload for server 2fd6a6f
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
1
8
|
## (2026-01-10)
|
|
2
9
|
|
|
3
10
|
* :bug: Fix(custom): specific sharp to 0.34.4 dee8fac
|
package/bin/picgo-server
CHANGED
|
@@ -226,8 +226,8 @@ router.post('/upload', async ({ response, list = [], urlparams }) => {
|
|
|
226
226
|
if (list.length === 0) {
|
|
227
227
|
// upload with clipboard
|
|
228
228
|
console.log('[PicList Server] upload clipboard file')
|
|
229
|
-
const result = await picgo.
|
|
230
|
-
const res = result[0].imgUrl
|
|
229
|
+
const result = await picgo.uploadReturnCtx()
|
|
230
|
+
const res = result.output[0].imgUrl
|
|
231
231
|
console.log('[PicList Server] upload result:', res)
|
|
232
232
|
if (res) {
|
|
233
233
|
handleResponse({
|
|
@@ -249,8 +249,8 @@ router.post('/upload', async ({ response, list = [], urlparams }) => {
|
|
|
249
249
|
} else {
|
|
250
250
|
console.log('[PicList Server] upload files in list')
|
|
251
251
|
// upload with files
|
|
252
|
-
const result = await picgo.
|
|
253
|
-
const res = result.map(item => {
|
|
252
|
+
const result = await picgo.uploadReturnCtx(list)
|
|
253
|
+
const res = result.output.map(item => {
|
|
254
254
|
return item.imgUrl
|
|
255
255
|
})
|
|
256
256
|
console.log('[PicList Server] upload result\n', res.join('\n'))
|
package/dist/core/Lifecycle.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from 'node:events';
|
|
2
|
-
import { IPicGo } from '../types';
|
|
2
|
+
import { IPicGo, IStringKeyMap } from '../types';
|
|
3
3
|
export declare class Lifecycle extends EventEmitter {
|
|
4
4
|
private readonly ctx;
|
|
5
5
|
ttfPath: string;
|
|
@@ -10,6 +10,7 @@ export declare class Lifecycle extends EventEmitter {
|
|
|
10
10
|
getUploaderType(ctx: IPicGo): {
|
|
11
11
|
picBed: string;
|
|
12
12
|
id: string;
|
|
13
|
+
config?: IStringKeyMap<any>;
|
|
13
14
|
};
|
|
14
15
|
private getSkipExtensions;
|
|
15
16
|
start(input: any[], skipProcess?: boolean): Promise<IPicGo>;
|
package/dist/core/PicGo.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Commander } from '../lib/Commander';
|
|
|
3
3
|
import { Logger } from '../lib/Logger';
|
|
4
4
|
import { PluginHandler } from '../lib/PluginHandler';
|
|
5
5
|
import { Request } from '../lib/Request';
|
|
6
|
-
import { IHelper, II18nManager, IImgInfo, IPicGo, IPicGoPlugin, IPicGoPluginInterface, IPluginLoader, IRequest, IStringKeyMap } from '../types';
|
|
6
|
+
import { IHelper, II18nManager, IImgInfo, IPicGo, IPicGoPlugin, IPicGoPluginInterface, IPluginLoader, IRequest, IStringKeyMap, IUploadResultWithBackup } from '../types';
|
|
7
7
|
import { ConfigManager } from '../utils/configManager';
|
|
8
8
|
export declare class PicGo extends EventEmitter implements IPicGo {
|
|
9
9
|
private _config;
|
|
@@ -50,5 +50,6 @@ export declare class PicGo extends EventEmitter implements IPicGo {
|
|
|
50
50
|
unsetConfig(key: string, propName: string): void;
|
|
51
51
|
get request(): IRequest['request'];
|
|
52
52
|
upload(input?: any[]): Promise<IImgInfo[] | Error>;
|
|
53
|
-
|
|
53
|
+
changeCurrentUploader(type: string, config: IStringKeyMap<any>): void;
|
|
54
|
+
uploadReturnCtx(input?: any[]): Promise<IUploadResultWithBackup>;
|
|
54
55
|
}
|