@@ -23,7 +23,7 @@ const generateId = () =>
23
23
. substring ( 6 )
24
24
25
25
const getCodeZipPath = async ( instance , inputs ) => {
26
- console . log ( `Packaging ${ CONFIGS . frameworkFullname } application...` )
26
+ console . log ( `Packaging ${ CONFIGS . compFullname } application...` )
27
27
28
28
// unzip source zip file
29
29
let zipPath
@@ -32,7 +32,7 @@ const getCodeZipPath = async (instance, inputs) => {
32
32
const downloadPath = `/tmp/${ generateId ( ) } `
33
33
const filename = 'template'
34
34
35
- console . log ( `Installing Default ${ CONFIGS . frameworkFullname } App...` )
35
+ console . log ( `Installing Default ${ CONFIGS . compFullname } App...` )
36
36
try {
37
37
await download ( CONFIGS . templateUrl , downloadPath , {
38
38
filename : `${ filename } .zip`
@@ -180,7 +180,7 @@ const deleteRecord = (newRecords, historyRcords) => {
180
180
const prepareInputs = async ( instance , credentials , inputs = { } ) => {
181
181
// 对function inputs进行标准化
182
182
const tempFunctionConf = inputs . functionConf ? inputs . functionConf : { }
183
- const fromClientRemark = `tencent-${ CONFIGS . framework } `
183
+ const fromClientRemark = `tencent-${ CONFIGS . compName } `
184
184
const regionList = inputs . region
185
185
? typeof inputs . region == 'string'
186
186
? [ inputs . region ]
@@ -202,7 +202,7 @@ const prepareInputs = async (instance, credentials, inputs = {}) => {
202
202
name :
203
203
ensureString ( inputs . functionName , { isOptional : true } ) ||
204
204
stateFunctionName ||
205
- `${ CONFIGS . framework } _component_${ generateId ( ) } ` ,
205
+ `${ CONFIGS . compName } _component_${ generateId ( ) } ` ,
206
206
region : regionList ,
207
207
role : ensureString ( tempFunctionConf . role ? tempFunctionConf . role : inputs . role , {
208
208
default : ''
@@ -261,7 +261,7 @@ const prepareInputs = async (instance, credentials, inputs = {}) => {
261
261
apigatewayConf . fromClientRemark = fromClientRemark
262
262
apigatewayConf . serviceName = inputs . serviceName
263
263
apigatewayConf . description = `Serverless Framework Tencent-${ capitalString (
264
- CONFIGS . framework
264
+ CONFIGS . compName
265
265
) } Component`
266
266
apigatewayConf . serviceId = inputs . serviceId || stateServiceId
267
267
apigatewayConf . region = functionConf . region
@@ -277,6 +277,16 @@ const prepareInputs = async (instance, credentials, inputs = {}) => {
277
277
isIntegratedResponse : apigatewayConf . isIntegratedResponse === false ? false : true ,
278
278
functionName : functionConf . name ,
279
279
functionNamespace : functionConf . namespace
280
+ } ,
281
+ usagePlan : {
282
+ usagePlanId : apigatewayConf . usagePlan && apigatewayConf . usagePlan . usagePlanId ,
283
+ usagePlanName : apigatewayConf . usagePlan && apigatewayConf . usagePlan . usagePlanName ,
284
+ usagePlanDesc : apigatewayConf . usagePlan && apigatewayConf . usagePlan . usagePlanDesc ,
285
+ maxRequestNum : apigatewayConf . usagePlan && apigatewayConf . usagePlan . maxRequestNum
286
+ } ,
287
+ auth : {
288
+ secretName : apigatewayConf . auth && apigatewayConf . auth . secretName ,
289
+ secretIds : apigatewayConf . auth && apigatewayConf . auth . secretIds
280
290
}
281
291
}
282
292
]
0 commit comments