picgo-plugin-s3 1.1.4 → 1.2.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/.eslintrc +21 -0
- package/README.md +13 -12
- package/dist/config.d.ts +13 -0
- package/dist/config.js +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +70 -61
- package/dist/uploader.d.ts +5 -4
- package/dist/uploader.js +50 -34
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +21 -23
- package/package.json +9 -11
package/.eslintrc
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"parser": "@typescript-eslint/parser",
|
|
3
|
+
"extends": [
|
|
4
|
+
"eslint:recommended",
|
|
5
|
+
"plugin:@typescript-eslint/recommended",
|
|
6
|
+
"prettier"
|
|
7
|
+
],
|
|
8
|
+
"plugins": ["prettier", "@typescript-eslint"],
|
|
9
|
+
"env": {
|
|
10
|
+
"es6": true,
|
|
11
|
+
"node": true
|
|
12
|
+
},
|
|
13
|
+
"rules": {
|
|
14
|
+
"prettier/prettier": [
|
|
15
|
+
"error",
|
|
16
|
+
{
|
|
17
|
+
"semi": false
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
}
|
package/README.md
CHANGED
|
@@ -19,18 +19,19 @@ GUI 直接搜索 _S3_ 下载即可,Core 版执行 `picgo add s3` 安装。
|
|
|
19
19
|
picgo set uploader aws-s3
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
| Key
|
|
23
|
-
|
|
|
24
|
-
| `accessKeyID`
|
|
25
|
-
| `secretAccessKey`
|
|
26
|
-
| `bucketName`
|
|
27
|
-
| `uploadPath`
|
|
28
|
-
| `urlPrefix`
|
|
29
|
-
| `endpoint`
|
|
30
|
-
| `region`
|
|
31
|
-
| `pathStyleAccess`
|
|
32
|
-
| `rejectUnauthorized` | 是否拒绝无效TLS证书连接
|
|
33
|
-
| `
|
|
22
|
+
| Key | 说明 | 例子 |
|
|
23
|
+
| -------------------- | ----------------------------------------------------------------------- | -------------------------------------------------------- |
|
|
24
|
+
| `accessKeyID` | AWS 凭证 ID | |
|
|
25
|
+
| `secretAccessKey` | AWS 凭证密钥 | |
|
|
26
|
+
| `bucketName` | S3 桶名称 | `gallery` |
|
|
27
|
+
| `uploadPath` | 上传路径 | `{year}/{month}/{fullName}` |
|
|
28
|
+
| `urlPrefix` | 最终生成图片 URL 的自定义前缀 | `https://img.example.com/my-blog/` |
|
|
29
|
+
| `endpoint` | 指定自定义终端节点 | `s3.us-west-2.amazonaws.com` |
|
|
30
|
+
| `region` | 指定执行服务请求的区域 | `us-west-1` |
|
|
31
|
+
| `pathStyleAccess` | 是否启用 S3 Path style | 默认为 `false`,使用 minio 请设置为 `true` |
|
|
32
|
+
| `rejectUnauthorized` | 是否拒绝无效 TLS 证书连接 | 默认为 `true`,如上传失败日志显示证书问题可设置为`false` |
|
|
33
|
+
| `bucketEndpoint` | 提供的 Endpoint 是否针对单个存储桶(如果它针对根 API 端点,则为 false) | 默认为 `false` |
|
|
34
|
+
| `acl` | 访问控制列表,上传资源的访问策略 | 默认为 `public-read` |
|
|
34
35
|
|
|
35
36
|
**上传路径支持 payload:**
|
|
36
37
|
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface IS3UserConfig {
|
|
2
|
+
accessKeyID: string;
|
|
3
|
+
secretAccessKey: string;
|
|
4
|
+
bucketName: string;
|
|
5
|
+
uploadPath: string;
|
|
6
|
+
region?: string;
|
|
7
|
+
endpoint?: string;
|
|
8
|
+
urlPrefix?: string;
|
|
9
|
+
pathStyleAccess?: boolean;
|
|
10
|
+
rejectUnauthorized?: boolean;
|
|
11
|
+
bucketEndpoint?: boolean;
|
|
12
|
+
acl?: string;
|
|
13
|
+
}
|
package/dist/config.js
ADDED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -7,117 +7,126 @@ const utils_1 = require("./utils");
|
|
|
7
7
|
module.exports = (ctx) => {
|
|
8
8
|
const config = (ctx) => {
|
|
9
9
|
const defaultConfig = {
|
|
10
|
-
accessKeyID:
|
|
11
|
-
secretAccessKey:
|
|
12
|
-
bucketName:
|
|
13
|
-
uploadPath:
|
|
10
|
+
accessKeyID: "",
|
|
11
|
+
secretAccessKey: "",
|
|
12
|
+
bucketName: "",
|
|
13
|
+
uploadPath: "{year}/{month}/{md5}.{extName}",
|
|
14
14
|
pathStyleAccess: false,
|
|
15
15
|
rejectUnauthorized: true,
|
|
16
|
-
|
|
16
|
+
bucketEndpoint: false,
|
|
17
|
+
acl: "public-read",
|
|
17
18
|
};
|
|
18
|
-
let userConfig = ctx.getConfig(
|
|
19
|
+
let userConfig = ctx.getConfig("picBed.aws-s3");
|
|
19
20
|
userConfig = Object.assign(Object.assign({}, defaultConfig), (userConfig || {}));
|
|
20
21
|
return [
|
|
21
22
|
{
|
|
22
|
-
name:
|
|
23
|
-
type:
|
|
23
|
+
name: "accessKeyID",
|
|
24
|
+
type: "input",
|
|
24
25
|
default: userConfig.accessKeyID,
|
|
25
26
|
required: true,
|
|
26
|
-
message:
|
|
27
|
-
alias:
|
|
27
|
+
message: "access key id",
|
|
28
|
+
alias: "应用密钥 ID",
|
|
28
29
|
},
|
|
29
30
|
{
|
|
30
|
-
name:
|
|
31
|
-
type:
|
|
31
|
+
name: "secretAccessKey",
|
|
32
|
+
type: "password",
|
|
32
33
|
default: userConfig.secretAccessKey,
|
|
33
34
|
required: true,
|
|
34
|
-
message:
|
|
35
|
-
alias:
|
|
35
|
+
message: "secret access key",
|
|
36
|
+
alias: "应用密钥",
|
|
36
37
|
},
|
|
37
38
|
{
|
|
38
|
-
name:
|
|
39
|
-
type:
|
|
39
|
+
name: "bucketName",
|
|
40
|
+
type: "input",
|
|
40
41
|
default: userConfig.bucketName,
|
|
41
42
|
required: true,
|
|
42
|
-
alias:
|
|
43
|
+
alias: "桶",
|
|
43
44
|
},
|
|
44
45
|
{
|
|
45
|
-
name:
|
|
46
|
-
type:
|
|
46
|
+
name: "uploadPath",
|
|
47
|
+
type: "input",
|
|
47
48
|
default: userConfig.uploadPath,
|
|
48
49
|
required: true,
|
|
49
|
-
alias:
|
|
50
|
+
alias: "文件路径",
|
|
50
51
|
},
|
|
51
52
|
{
|
|
52
|
-
name:
|
|
53
|
-
type:
|
|
53
|
+
name: "acl",
|
|
54
|
+
type: "input",
|
|
54
55
|
default: userConfig.acl,
|
|
55
|
-
message:
|
|
56
|
+
message: "文件访问权限",
|
|
56
57
|
required: true,
|
|
57
|
-
alias:
|
|
58
|
+
alias: "权限",
|
|
58
59
|
},
|
|
59
60
|
{
|
|
60
|
-
name:
|
|
61
|
-
type:
|
|
61
|
+
name: "region",
|
|
62
|
+
type: "input",
|
|
62
63
|
default: userConfig.region,
|
|
63
64
|
required: false,
|
|
64
|
-
alias:
|
|
65
|
+
alias: "地区",
|
|
65
66
|
},
|
|
66
67
|
{
|
|
67
|
-
name:
|
|
68
|
-
type:
|
|
68
|
+
name: "endpoint",
|
|
69
|
+
type: "input",
|
|
69
70
|
default: userConfig.endpoint,
|
|
70
71
|
required: false,
|
|
71
|
-
alias:
|
|
72
|
+
alias: "自定义节点",
|
|
72
73
|
},
|
|
73
74
|
{
|
|
74
|
-
name:
|
|
75
|
-
type:
|
|
75
|
+
name: "urlPrefix",
|
|
76
|
+
type: "input",
|
|
76
77
|
default: userConfig.urlPrefix,
|
|
77
|
-
message:
|
|
78
|
+
message: "https://img.example.com/bucket-name/",
|
|
78
79
|
required: false,
|
|
79
|
-
alias:
|
|
80
|
+
alias: "自定义域名",
|
|
80
81
|
},
|
|
81
82
|
{
|
|
82
|
-
name:
|
|
83
|
-
type:
|
|
83
|
+
name: "pathStyleAccess",
|
|
84
|
+
type: "confirm",
|
|
84
85
|
default: userConfig.pathStyleAccess || false,
|
|
85
|
-
message:
|
|
86
|
+
message: "enable path-style-access or not",
|
|
86
87
|
required: false,
|
|
87
|
-
alias:
|
|
88
|
+
alias: "PathStyleAccess",
|
|
88
89
|
},
|
|
89
90
|
{
|
|
90
|
-
name:
|
|
91
|
-
type:
|
|
91
|
+
name: "rejectUnauthorized",
|
|
92
|
+
type: "confirm",
|
|
92
93
|
default: userConfig.rejectUnauthorized || true,
|
|
93
|
-
message:
|
|
94
|
+
message: "是否拒绝无效TLS证书连接",
|
|
94
95
|
required: false,
|
|
95
|
-
alias:
|
|
96
|
+
alias: "rejectUnauthorized",
|
|
96
97
|
},
|
|
97
98
|
{
|
|
98
|
-
name:
|
|
99
|
-
type:
|
|
100
|
-
default: userConfig.
|
|
101
|
-
message:
|
|
99
|
+
name: "bucketEndpoint",
|
|
100
|
+
type: "confirm",
|
|
101
|
+
default: userConfig.bucketEndpoint || false,
|
|
102
|
+
message: "提供的Endpoint是否针对单个存储桶(如果它针对根 API 端点,则为 false)",
|
|
102
103
|
required: false,
|
|
103
|
-
alias:
|
|
104
|
-
}
|
|
104
|
+
alias: "bucketEndpoint",
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
name: "acl",
|
|
108
|
+
type: "input",
|
|
109
|
+
default: userConfig.acl || "public-read",
|
|
110
|
+
message: "上传资源的访问策略",
|
|
111
|
+
required: false,
|
|
112
|
+
alias: "ACL 访问控制列表",
|
|
113
|
+
},
|
|
105
114
|
];
|
|
106
115
|
};
|
|
107
116
|
const handle = async (ctx) => {
|
|
108
|
-
|
|
117
|
+
const userConfig = ctx.getConfig("picBed.aws-s3");
|
|
109
118
|
if (!userConfig) {
|
|
110
119
|
throw new Error("Can't find amazon s3 uploader config");
|
|
111
120
|
}
|
|
112
121
|
if (userConfig.urlPrefix) {
|
|
113
|
-
userConfig.urlPrefix = userConfig.urlPrefix.replace(/\/?$/,
|
|
122
|
+
userConfig.urlPrefix = userConfig.urlPrefix.replace(/\/?$/, "");
|
|
114
123
|
}
|
|
115
|
-
const client = uploader_1.default.createS3Client(userConfig
|
|
124
|
+
const client = uploader_1.default.createS3Client(userConfig);
|
|
116
125
|
const output = ctx.output;
|
|
117
|
-
const tasks = output.map((item, idx) => uploader_1.default.createUploadTask(client, userConfig.bucketName, utils_1.formatPath(item, userConfig.uploadPath), item, idx, userConfig.acl));
|
|
126
|
+
const tasks = output.map((item, idx) => uploader_1.default.createUploadTask(client, userConfig.bucketName, (0, utils_1.formatPath)(item, userConfig.uploadPath), item, idx, userConfig.acl));
|
|
118
127
|
try {
|
|
119
128
|
const results = await Promise.all(tasks);
|
|
120
|
-
for (
|
|
129
|
+
for (const result of results) {
|
|
121
130
|
const { index, url, imgURL } = result;
|
|
122
131
|
delete output[index].buffer;
|
|
123
132
|
delete output[index].base64Image;
|
|
@@ -131,24 +140,24 @@ module.exports = (ctx) => {
|
|
|
131
140
|
return ctx;
|
|
132
141
|
}
|
|
133
142
|
catch (err) {
|
|
134
|
-
ctx.log.error(
|
|
143
|
+
ctx.log.error("上传到 Amazon S3 发生错误,请检查配置是否正确");
|
|
135
144
|
ctx.log.error(err);
|
|
136
|
-
ctx.emit(
|
|
137
|
-
title:
|
|
138
|
-
body:
|
|
139
|
-
text:
|
|
145
|
+
ctx.emit("notification", {
|
|
146
|
+
title: "Amazon S3 上传错误",
|
|
147
|
+
body: "请检查配置是否正确",
|
|
148
|
+
text: "",
|
|
140
149
|
});
|
|
141
150
|
throw err;
|
|
142
151
|
}
|
|
143
152
|
};
|
|
144
153
|
const register = () => {
|
|
145
|
-
ctx.helper.uploader.register(
|
|
154
|
+
ctx.helper.uploader.register("aws-s3", {
|
|
146
155
|
handle,
|
|
147
156
|
config,
|
|
148
|
-
name:
|
|
157
|
+
name: "Amazon S3",
|
|
149
158
|
});
|
|
150
159
|
};
|
|
151
160
|
return {
|
|
152
|
-
register
|
|
161
|
+
register,
|
|
153
162
|
};
|
|
154
163
|
};
|
package/dist/uploader.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { IImgInfo } from
|
|
1
|
+
import { S3 } from "aws-sdk";
|
|
2
|
+
import { IImgInfo } from "picgo/dist/src/types";
|
|
3
|
+
import { IS3UserConfig } from "./config";
|
|
3
4
|
export interface IUploadResult {
|
|
4
5
|
url: string;
|
|
5
6
|
imgURL: string;
|
|
6
7
|
index: number;
|
|
7
8
|
}
|
|
8
|
-
declare function createS3Client(
|
|
9
|
-
declare function createUploadTask(s3:
|
|
9
|
+
declare function createS3Client(opts: IS3UserConfig): S3;
|
|
10
|
+
declare function createUploadTask(s3: S3, bucketName: string, path: string, item: IImgInfo, index: number, acl: string): Promise<IUploadResult>;
|
|
10
11
|
declare const _default: {
|
|
11
12
|
createS3Client: typeof createS3Client;
|
|
12
13
|
createUploadTask: typeof createUploadTask;
|
package/dist/uploader.js
CHANGED
|
@@ -3,51 +3,67 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const aws_sdk_1 =
|
|
7
|
-
const https_1 = __importDefault(require("https"));
|
|
6
|
+
const aws_sdk_1 = require("aws-sdk");
|
|
8
7
|
const utils_1 = require("./utils");
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
const url_1 = __importDefault(require("url"));
|
|
9
|
+
function createS3Client(opts) {
|
|
10
|
+
let sslEnabled = true;
|
|
11
|
+
try {
|
|
12
|
+
const u = url_1.default.parse(opts.endpoint);
|
|
13
|
+
sslEnabled = u.protocol === "https:";
|
|
14
|
+
}
|
|
15
|
+
catch (_a) {
|
|
16
|
+
// eslint-disable-next-line no-empty
|
|
17
|
+
}
|
|
18
|
+
const http = sslEnabled ? require("https") : require("http");
|
|
19
|
+
const s3 = new aws_sdk_1.S3({
|
|
20
|
+
region: opts.region,
|
|
21
|
+
endpoint: opts.endpoint,
|
|
22
|
+
accessKeyId: opts.accessKeyID,
|
|
23
|
+
secretAccessKey: opts.secretAccessKey,
|
|
24
|
+
s3ForcePathStyle: opts.pathStyleAccess,
|
|
25
|
+
s3BucketEndpoint: opts.bucketEndpoint,
|
|
26
|
+
sslEnabled: sslEnabled,
|
|
16
27
|
httpOptions: {
|
|
17
|
-
agent: new
|
|
18
|
-
rejectUnauthorized: rejectUnauthorized,
|
|
19
|
-
})
|
|
20
|
-
}
|
|
28
|
+
agent: new http.Agent({
|
|
29
|
+
rejectUnauthorized: opts.rejectUnauthorized,
|
|
30
|
+
}),
|
|
31
|
+
},
|
|
21
32
|
});
|
|
22
33
|
return s3;
|
|
23
34
|
}
|
|
24
35
|
function createUploadTask(s3, bucketName, path, item, index, acl) {
|
|
25
|
-
return new Promise(
|
|
36
|
+
return new Promise((resolve, reject) => {
|
|
26
37
|
if (!item.buffer && !item.base64Image) {
|
|
27
|
-
reject(new Error(
|
|
38
|
+
reject(new Error("undefined image"));
|
|
28
39
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
.
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
(0, utils_1.extractInfo)(item)
|
|
41
|
+
.then(({ body, contentType, contentEncoding }) => {
|
|
42
|
+
const opts = {
|
|
43
|
+
Key: path,
|
|
44
|
+
Bucket: bucketName,
|
|
45
|
+
ACL: acl,
|
|
46
|
+
Body: body,
|
|
47
|
+
ContentType: contentType,
|
|
48
|
+
ContentEncoding: contentEncoding,
|
|
49
|
+
};
|
|
50
|
+
s3.upload(opts)
|
|
51
|
+
.promise()
|
|
52
|
+
.then((result) => {
|
|
53
|
+
resolve({
|
|
54
|
+
url: result.Location,
|
|
55
|
+
imgURL: result.Key,
|
|
56
|
+
index,
|
|
57
|
+
});
|
|
58
|
+
})
|
|
59
|
+
.catch((err) => reject(err));
|
|
46
60
|
})
|
|
47
|
-
.catch((err) =>
|
|
61
|
+
.catch((err) => {
|
|
62
|
+
reject(err);
|
|
63
|
+
});
|
|
48
64
|
});
|
|
49
65
|
}
|
|
50
66
|
exports.default = {
|
|
51
67
|
createS3Client,
|
|
52
|
-
createUploadTask
|
|
68
|
+
createUploadTask,
|
|
53
69
|
};
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { IImgInfo } from
|
|
2
|
+
import { IImgInfo } from "picgo/dist/src/types";
|
|
3
3
|
export declare function formatPath(info: IImgInfo, format?: string): string;
|
|
4
4
|
export declare function extractInfo(info: IImgInfo): Promise<{
|
|
5
5
|
body?: Buffer;
|
package/dist/utils.js
CHANGED
|
@@ -29,36 +29,34 @@ class FileNameGenerator {
|
|
|
29
29
|
return this.info.fileName;
|
|
30
30
|
}
|
|
31
31
|
fileName() {
|
|
32
|
-
return this.info.fileName.replace(this.info.extname,
|
|
32
|
+
return this.info.fileName.replace(this.info.extname, "");
|
|
33
33
|
}
|
|
34
34
|
extName() {
|
|
35
|
-
return this.info.extname.replace(
|
|
35
|
+
return this.info.extname.replace(".", "");
|
|
36
36
|
}
|
|
37
37
|
md5() {
|
|
38
|
-
return crypto_1.default.createHash(
|
|
38
|
+
return crypto_1.default.createHash("md5").update(this.imgBuffer()).digest("hex");
|
|
39
39
|
}
|
|
40
40
|
sha1() {
|
|
41
|
-
return crypto_1.default.createHash(
|
|
41
|
+
return crypto_1.default.createHash("sha1").update(this.imgBuffer()).digest("hex");
|
|
42
42
|
}
|
|
43
43
|
sha256() {
|
|
44
|
-
return crypto_1.default.createHash(
|
|
44
|
+
return crypto_1.default.createHash("sha256").update(this.imgBuffer()).digest("hex");
|
|
45
45
|
}
|
|
46
46
|
imgBuffer() {
|
|
47
|
-
return this.info.base64Image
|
|
48
|
-
? this.info.base64Image
|
|
49
|
-
: this.info.buffer;
|
|
47
|
+
return this.info.base64Image ? this.info.base64Image : this.info.buffer;
|
|
50
48
|
}
|
|
51
49
|
}
|
|
52
50
|
FileNameGenerator.fields = [
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
51
|
+
"year",
|
|
52
|
+
"month",
|
|
53
|
+
"day",
|
|
54
|
+
"fullName",
|
|
55
|
+
"fileName",
|
|
56
|
+
"extName",
|
|
57
|
+
"md5",
|
|
58
|
+
"sha1",
|
|
59
|
+
"sha256",
|
|
62
60
|
];
|
|
63
61
|
function formatPath(info, format) {
|
|
64
62
|
if (!format) {
|
|
@@ -66,8 +64,8 @@ function formatPath(info, format) {
|
|
|
66
64
|
}
|
|
67
65
|
const fileNameGenerator = new FileNameGenerator(info);
|
|
68
66
|
let formatPath = format;
|
|
69
|
-
for (
|
|
70
|
-
const re = new RegExp(`{${key}}`,
|
|
67
|
+
for (const key of FileNameGenerator.fields) {
|
|
68
|
+
const re = new RegExp(`{${key}}`, "g");
|
|
71
69
|
formatPath = formatPath.replace(re, fileNameGenerator[key]());
|
|
72
70
|
}
|
|
73
71
|
return formatPath;
|
|
@@ -75,12 +73,12 @@ function formatPath(info, format) {
|
|
|
75
73
|
exports.formatPath = formatPath;
|
|
76
74
|
async function extractInfo(info) {
|
|
77
75
|
var _a;
|
|
78
|
-
|
|
76
|
+
const result = {};
|
|
79
77
|
if (info.base64Image) {
|
|
80
|
-
const body = info.base64Image.replace(/^data:[/\w]+;base64,/,
|
|
78
|
+
const body = info.base64Image.replace(/^data:[/\w]+;base64,/, "");
|
|
81
79
|
result.contentType = (_a = info.base64Image.match(/[^:]\w+\/[\w-+\d.]+(?=;|,)/)) === null || _a === void 0 ? void 0 : _a[0];
|
|
82
|
-
result.body = Buffer.from(body,
|
|
83
|
-
result.contentEncoding =
|
|
80
|
+
result.body = Buffer.from(body, "base64");
|
|
81
|
+
result.contentEncoding = "base64";
|
|
84
82
|
}
|
|
85
83
|
else {
|
|
86
84
|
if (info.extname) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "picgo-plugin-s3",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "picgo amazon s3 uploader",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -27,17 +27,15 @@
|
|
|
27
27
|
"author": "WayJam So",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@types/node": "^
|
|
31
|
-
"eslint": "^5.
|
|
32
|
-
"eslint
|
|
33
|
-
"eslint
|
|
34
|
-
"eslint-
|
|
35
|
-
"eslint-plugin-
|
|
36
|
-
"eslint-plugin-standard": "^3.1.0",
|
|
30
|
+
"@types/node": "^18.7.23",
|
|
31
|
+
"@typescript-eslint/eslint-plugin": "^5.38.1",
|
|
32
|
+
"@typescript-eslint/parser": "^5.38.1",
|
|
33
|
+
"eslint": "^8.25.0",
|
|
34
|
+
"eslint-config-prettier": "^8.5.0",
|
|
35
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
37
36
|
"picgo": "^1.4.0 >1.4.16",
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"typescript": "^3.7.3"
|
|
37
|
+
"prettier": "^2.7.1",
|
|
38
|
+
"typescript": "^4.8.4"
|
|
41
39
|
},
|
|
42
40
|
"dependencies": {
|
|
43
41
|
"aws-sdk": "^2.839.0",
|