Skip to content

Commit fa0674a

Browse files
committed
fix: change bucketName to bucket
1 parent 22d59d3 commit fa0674a

File tree

8 files changed

+12
-11
lines changed

8 files changed

+12
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ inputs:
9292
# hook: npm run build
9393
# websitePath: ./
9494
region: ap-guangzhou
95-
bucketName: my-bucket
95+
bucket: my-bucket
9696
protocol: https
9797
```
9898

__tests__/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const instanceYaml = {
2222
index: 'index.html',
2323
error: 'index.html'
2424
},
25-
bucketName: 'website-integration-test',
25+
bucket: 'website-integration-test',
2626
region: 'ap-guangzhou',
2727
}
2828
}

docs/advance.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ inputs:
1919
index: index.html
2020
error: index.html
2121
region: ap-guangzhou
22-
bucketName: website-demo
22+
bucket: website-demo
2323
protocol: https
2424
# env 配置
2525
env:
@@ -53,7 +53,7 @@ inputs:
5353
index: index.html
5454
error: index.html
5555
region: ap-guangzhou
56-
bucketName: website-demo
56+
bucket: website-demo
5757
protocol: https
5858
```
5959

docs/configure.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ inputs:
1919
index: index.html
2020
error: index.html
2121
region: ap-guangzhou
22-
bucketName: my-bucket
22+
bucket: my-bucket
2323
protocol: http
2424
replace: false # 是否覆盖式部署
2525
ignoreHtmlExt: false # 是否是否忽略 html 扩展名,默认 false
@@ -96,7 +96,7 @@ inputs:
9696
| 参数名称 | 必选 | 类型 | 默认值 | 描述 |
9797
| ------------------ | :--: | :-------------- | :------------: | :---------------------------------------------------------------------------------------- |
9898
| src | 是 | [Src](#Src)[] | | 该项目的代码信息,参数参考执行目录 |
99-
| bucketName | 是 | string | | Bucket 名称。 不允许大写字母。如果你不加 AppId 后缀,则默认自动会为你加上。 |
99+
| bucket | 是 | string | | Bucket 名称。 不允许大写字母。如果你不加 AppId 后缀,则默认自动会为你加上。 |
100100
| region | 否 | string | `ap-guangzhou` | 代码上传所在的 cos 区域。区。 |
101101
| replace | 否 | boolean | `false` | 是否是替换式部署,如果为 `true`,部署时将 `先删除对应 bucket 的所有旧文件`。 |
102102
| protocol | 否 | string | `https` | 请求协议。`https` 或 `http` |

docs/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ inputs:
2525
index: index.html
2626
error: index.html
2727
region: ap-guangzhou
28-
bucketName: my-bucket
28+
bucket: my-bucket
2929
protocol: https
3030
# 添加以下配置
3131
autoSetupAcl: false

example/serverless.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
app: appDemo
22
stage: dev
33

4-
component: website
4+
component: website@dev
55
name: websiteDemo
66

77
inputs:
@@ -10,5 +10,5 @@ inputs:
1010
index: index.html
1111
error: index.html
1212
region: ap-guangzhou
13-
bucketName: website-demo
13+
bucket: website-demo-1303241281
1414
protocol: https

src/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"dependencies": {
33
"download": "^8.0.0",
4-
"tencent-component-toolkit": "^2.5.6"
4+
"tencent-component-toolkit": "^2.5.7"
55
}
66
}

src/utils.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ const prepareInputs = async (instance, inputs) => {
6363

6464
const region = inputs.region || CONFIGS.region
6565
const bucketName =
66-
removeAppid(inputs.bucketName || state.bucket, appId) || `sls-website-${region}-${generateId()}`
66+
removeAppid(inputs.bucketName || inputs.bucket || state.bucket, appId) ||
67+
`sls-website-${region}-${generateId()}`
6768

6869
const websiteInputs = Object.assign(inputs, {
6970
replace: inputs.replace,

0 commit comments

Comments
 (0)