@@ -46,6 +46,7 @@ class TencentWerobot extends Component {
4646 `WerobotComponent_${ random ( { length : 6 } ) } `
4747 inputs . codeUri = ensureString ( inputs . code , { isOptional : true } ) || process . cwd ( )
4848 inputs . region = ensureString ( inputs . region , { default : 'ap-guangzhou' } )
49+ inputs . namespace = ensureString ( inputs . namespace , { default : 'default' } )
4950 inputs . include = ensureIterable ( inputs . include , { default : [ ] , ensureItem : ensureString } )
5051 inputs . exclude = ensureIterable ( inputs . exclude , { default : [ ] , ensureItem : ensureString } )
5152 inputs . apigatewayConf = ensurePlainObject ( inputs . apigatewayConf , { default : { } } )
@@ -57,13 +58,9 @@ class TencentWerobot extends Component {
5758 path . join ( path . resolve ( inputs . codeUri ) , '.cache' , 'index.py' ) ,
5859 'utf8'
5960 )
60- const replacedFile = indexPyFile . replace (
61- eval ( '/{{werobot_project}}/g' ) ,
62- inputs . werobotProjectName
63- ) . replace (
64- eval ( '/{{attribute}}/g' ) ,
65- inputs . werobotAttrName
66- )
61+ const replacedFile = indexPyFile
62+ . replace ( eval ( '/{{werobot_project}}/g' ) , inputs . werobotProjectName )
63+ . replace ( eval ( '/{{attribute}}/g' ) , inputs . werobotAttrName )
6764 await fs . writeFileSync (
6865 path . join ( path . resolve ( inputs . codeUri ) , '.cache' , 'index.py' ) ,
6966 replacedFile
@@ -114,10 +111,12 @@ class TencentWerobot extends Component {
114111 method : 'ANY' ,
115112 function : {
116113 isIntegratedResponse : true ,
117- functionName : tencentCloudFunctionOutputs . Name
114+ functionName : tencentCloudFunctionOutputs . Name ,
115+ functionNamespace : inputs . namespace
118116 }
119117 }
120- ]
118+ ] ,
119+ customDomain : inputs . apigatewayConf . customDomain
121120 }
122121
123122 if ( inputs . apigatewayConf && inputs . apigatewayConf . auth ) {
0 commit comments