Skip to content

Commit 2e551db

Browse files
committed
fix: update deps
1 parent ed2d3ab commit 2e551db

File tree

3 files changed

+10
-15
lines changed

3 files changed

+10
-15
lines changed

example/serverless.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
1-
org: orgDemo # (optional) serverless dashboard org. default is the first org you created during signup.
2-
app: appDemo # (optional) serverless dashboard app. default is the same as the name property.
3-
stage: dev # (optional) serverless dashboard stage. default is dev.
4-
component: express # (required) name of the component. In that case, it's express.
5-
name: expressDemo # (required) name of your express component instance.
1+
org: orgDemo
2+
app: appDemo
3+
stage: dev
4+
component: express
5+
name: expressDemo
66

77
inputs:
88
src:
9-
src: ./ # (optional) path to the source folder. default is a hello world app.
9+
src: ./
1010
exclude:
1111
- .env
12-
region: ap-guangzhou
13-
runtime: Nodejs10.15
1412
apigatewayConf:
1513
protocols:
1614
- http
1715
- https
18-
environment: release

src/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"dependencies": {
33
"download": "^8.0.0",
4-
"tencent-component-toolkit": "^1.14.4",
4+
"tencent-component-toolkit": "^1.15.4",
55
"type": "^2.0.0"
66
}
77
}

src/utils.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ const capitalString = (str) => {
161161
}
162162

163163
const getDefaultProtocol = (protocols) => {
164+
if (!protocols || protocols.length < 1) {
165+
return 'http'
166+
}
164167
if (protocols.map((i) => i.toLowerCase()).includes('https')) {
165168
return 'https'
166169
}
@@ -277,13 +280,8 @@ const prepareInputs = async (instance, credentials, inputs = {}) => {
277280
apigatewayConf.isDisabled = apigatewayConf.isDisabled === true
278281
apigatewayConf.fromClientRemark = fromClientRemark
279282
apigatewayConf.serviceName = inputs.serviceName
280-
apigatewayConf.description = `Serverless Framework Tencent-${capitalString(
281-
CONFIGS.compName
282-
)} Component`
283283
apigatewayConf.serviceId = inputs.serviceId || stateServiceId
284284
apigatewayConf.region = functionConf.region
285-
apigatewayConf.protocols = apigatewayConf.protocols || ['http']
286-
apigatewayConf.environment = apigatewayConf.environment ? apigatewayConf.environment : 'release'
287285
apigatewayConf.endpoints = [
288286
{
289287
path: '/',

0 commit comments

Comments
 (0)