piclist 1.9.0 → 1.9.3
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/.prettierrc +1 -2
- package/CHANGELOG.md +37 -0
- package/Dockerfile +15 -14
- package/README.md +9 -0
- package/dist/core/Lifecycle.d.ts +2 -0
- package/dist/i18n/zh-CN.d.ts +15 -0
- package/dist/index.cjs.js +2 -2
- package/dist/index.esm.js +2 -2
- package/dist/plugins/uploader/advancedplist.d.ts +2 -0
- package/dist/plugins/uploader/s3/uploader.d.ts +2 -5
- package/dist/plugins/uploader/utils.d.ts +18 -0
- package/dist/types/index.d.ts +10 -0
- package/package.json +3 -3
|
@@ -1,27 +1,24 @@
|
|
|
1
|
+
import { S3Client } from '@aws-sdk/client-s3';
|
|
1
2
|
import { IAwsS3PListUserConfig, IImgInfo } from '../../../types';
|
|
2
3
|
export interface IUploadResult {
|
|
3
|
-
index: number;
|
|
4
4
|
key: string;
|
|
5
5
|
url: string;
|
|
6
6
|
imgURL: string;
|
|
7
7
|
versionId?: string;
|
|
8
8
|
eTag?: string;
|
|
9
9
|
}
|
|
10
|
-
declare function createS3Client(opts: IAwsS3PListUserConfig):
|
|
10
|
+
declare function createS3Client(opts: IAwsS3PListUserConfig): S3Client;
|
|
11
11
|
interface ICreateUploadTaskOpts {
|
|
12
12
|
client: any;
|
|
13
13
|
bucketName: string;
|
|
14
14
|
path: string;
|
|
15
15
|
item: IImgInfo;
|
|
16
|
-
index: number;
|
|
17
16
|
acl: string;
|
|
18
17
|
urlPrefix?: string;
|
|
19
18
|
}
|
|
20
19
|
declare function createUploadTask(opts: ICreateUploadTaskOpts): Promise<IUploadResult>;
|
|
21
|
-
declare function getFileURL(opts: ICreateUploadTaskOpts, eTag: string, versionId: string): Promise<string>;
|
|
22
20
|
declare const _default: {
|
|
23
21
|
createS3Client: typeof createS3Client;
|
|
24
22
|
createUploadTask: typeof createUploadTask;
|
|
25
|
-
getFileURL: typeof getFileURL;
|
|
26
23
|
};
|
|
27
24
|
export default _default;
|
|
@@ -5,3 +5,21 @@ export declare function formatPathHelper({ path, startSlash, endSlash, rootToEmp
|
|
|
5
5
|
rootToEmpty?: boolean;
|
|
6
6
|
}): string;
|
|
7
7
|
export declare function encodePath(path: string): string;
|
|
8
|
+
export declare const buildInUploaderNames: {
|
|
9
|
+
advancedplist: string;
|
|
10
|
+
alistplist: string;
|
|
11
|
+
aliyun: string;
|
|
12
|
+
'aws-s3-plist': string;
|
|
13
|
+
github: string;
|
|
14
|
+
imgur: string;
|
|
15
|
+
local: string;
|
|
16
|
+
lskyplist: string;
|
|
17
|
+
piclist: string;
|
|
18
|
+
qiniu: string;
|
|
19
|
+
sftpplist: string;
|
|
20
|
+
smms: string;
|
|
21
|
+
tcyun: string;
|
|
22
|
+
telegraphplist: string;
|
|
23
|
+
upyun: string;
|
|
24
|
+
webdavplist: string;
|
|
25
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -248,6 +248,16 @@ export interface ISmmsConfig {
|
|
|
248
248
|
token: string;
|
|
249
249
|
backupDomain?: string;
|
|
250
250
|
}
|
|
251
|
+
/** 内置高级自定义图床 */
|
|
252
|
+
export interface IAdvancedPlistConfig {
|
|
253
|
+
endpoint: string;
|
|
254
|
+
method?: string;
|
|
255
|
+
formDataKey?: string;
|
|
256
|
+
headers?: string;
|
|
257
|
+
body?: string;
|
|
258
|
+
resDataPath?: string;
|
|
259
|
+
customPrefix?: string;
|
|
260
|
+
}
|
|
251
261
|
/** 内置alist 图床配置项 */
|
|
252
262
|
export interface IAlistConfig {
|
|
253
263
|
url: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "piclist",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.3",
|
|
4
4
|
"description": "Modified PicGo core, A tool for picture uploading",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Kuingsmile",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"server": "node ./bin/picgo-server",
|
|
27
27
|
"lint": "eslint src/**/*.ts",
|
|
28
28
|
"lint:fix": "eslint src/**/*.ts --fix",
|
|
29
|
-
"
|
|
29
|
+
"lint:dpdm": "dpdm -T --tsconfig ./tsconfig.json --no-tree --no-warning --exit-code circular:1 src/index.ts",
|
|
30
30
|
"dev": "cross-env NODE_ENV=development rollup -c rollup.config.js -w",
|
|
31
|
+
"build": "cross-env NODE_ENV=production rimraf ./dist && rollup -c rollup.config.js",
|
|
31
32
|
"cz": "git-cz",
|
|
32
33
|
"release": "bump-version",
|
|
33
|
-
"lint:dpdm": "dpdm -T --tsconfig ./tsconfig.json --no-tree --no-warning --exit-code circular:1 src/index.ts",
|
|
34
34
|
"publish:npm": "cross-env NODE_ENV=production rimraf ./dist && rollup -c rollup.config.js && npm publish"
|
|
35
35
|
},
|
|
36
36
|
"keywords": [
|