@izara_project/izara-core-generate-service-code 1.0.46 → 1.0.48
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/fix_array.js +11 -0
- package/fix_imports.js +41 -0
- package/fix_upper.js +38 -0
- package/package.json +1 -1
- package/src/generators/fromExternalService/externalServiceComponent/functionNameConfig/template.ejs +2 -2
- package/src/generators/fromExternalService/externalServiceComponent/functionNameConfig/templateIntTesting.ejs +1 -1
- package/src/generators/fromExternalService/externalServiceComponent/functionNameConfig/templateYaml.ejs +1 -1
- package/src/generators/fromFlowSchema/events/eventBridge/functionYaml/yaml.js +5 -1
- package/src/generators/fromFlowSchema/events/eventBridge/handler/inv/inv.js +5 -1
- package/src/generators/fromFlowSchema/events/eventBridge/mainFunction/main.js +13 -3
- package/src/generators/fromFlowSchema/events/eventBridge/mainFunction/template.ejs +1 -1
- package/src/generators/fromFlowSchema/events/extTopic/process/functionYaml/yaml.js +6 -1
- package/src/generators/fromFlowSchema/events/extTopic/process/handler/handler.js +4 -1
- package/src/generators/fromFlowSchema/events/extTopic/sns-in-sqs/template.ejs +3 -6
- package/src/generators/fromFlowSchema/events/lambdaSyncApi/functionYaml/yaml.js +6 -1
- package/src/generators/fromFlowSchema/events/lambdaSyncApi/handler/handler.js +5 -1
- package/src/generators/fromFlowSchema/events/lambdaSyncInv/functionYaml/yaml.js +5 -1
- package/src/generators/fromFlowSchema/events/lambdaSyncInv/handler/handler.js +3 -1
- package/src/generators/fromFlowSchema/events/ownTopic/endpoint/functionYaml/yaml.js +5 -1
- package/src/generators/fromFlowSchema/events/ownTopic/endpoint/handler/handler.js +5 -2
- package/src/generators/fromFlowSchema/events/ownTopic/flowSchema/handler/handler.js +3 -1
- package/src/generators/fromFlowSchema/events/ownTopic/flowSchema/handler/template.ejs +1 -1
- package/src/generators/fromFlowSchema/events/ownTopic/flowSchema/mainFunction/main.js +2 -1
- package/src/generators/fromFlowSchema/events/s3/flowSchemaMainFunction/main.js +3 -1
- package/src/generators/fromFlowSchema/events/s3/upload/confirmReserved/functionYaml/template.ejs +5 -9
- package/src/generators/fromFlowSchema/events/s3/upload/confirmReserved/functionYaml/yaml.js +20 -9
- package/src/generators/fromFlowSchema/events/s3/upload/confirmReserved/handler/handler.js +3 -1
- package/src/generators/fromFlowSchema/events/s3/upload/confirmReserved/queue/template.ejs +2 -5
- package/src/generators/fromFlowSchema/events/s3/upload/createObject/functionYaml/template.ejs +3 -7
- package/src/generators/fromFlowSchema/events/s3/upload/createObject/functionYaml/yaml.js +24 -8
- package/src/generators/fromFlowSchema/events/s3/upload/createObject/handler/handler.js +3 -1
- package/src/generators/fromFlowSchema/events/s3/upload/createObject/mainFunction/main.js +2 -1
- package/src/generators/fromFlowSchema/events/s3/upload/createObjectComplete/functionYaml/template.ejs +4 -8
- package/src/generators/fromFlowSchema/events/s3/upload/createObjectComplete/functionYaml/yaml.js +26 -9
- package/src/generators/fromFlowSchema/events/s3/upload/createObjectComplete/handler/handler.js +3 -1
- package/src/generators/fromFlowSchema/events/s3/upload/createObjectComplete/mainFunction/main.js +2 -1
- package/src/generators/fromFlowSchema/events/s3/upload/createObjectComplete/sns-sqs/template.ejs +2 -5
- package/src/generators/fromFlowSchema/events/s3/upload/preSignUrl/createPreSignUrl/functionYaml/template.ejs +5 -9
- package/src/generators/fromFlowSchema/events/s3/upload/preSignUrl/createPreSignUrl/functionYaml/yaml.js +27 -9
- package/src/generators/fromFlowSchema/events/s3/upload/preSignUrl/createPreSignUrl/handler/handler.js +3 -1
- package/src/generators/fromFlowSchema/events/s3/upload/preSignUrl/createPreSignUrl/mainFunction/main.js +2 -1
- package/src/generators/fromFlowSchema/events/s3/upload/preSignUrl/createPreSignUrl/queue/template.ejs +2 -5
- package/src/generators/fromFlowSchema/events/s3/upload/preSignUrl/reservedLimit/functionYaml/template.ejs +4 -8
- package/src/generators/fromFlowSchema/events/s3/upload/preSignUrl/reservedLimit/functionYaml/yaml.js +27 -9
- package/src/generators/fromFlowSchema/events/s3/upload/preSignUrl/reservedLimit/handler/handler.js +3 -1
- package/src/generators/fromFlowSchema/events/s3/upload/preSignUrl/reservedLimit/sqs/template.ejs +3 -6
- package/src/generators/fromFlowSchema/events/s3/upload/processFile/functionYml/HdrS3/template.ejs +3 -7
- package/src/generators/fromFlowSchema/events/s3/upload/processFile/functionYml/HdrS3/yaml.js +24 -8
- package/src/generators/fromFlowSchema/events/s3/upload/processFile/queue/s3Template.ejs +2 -5
- package/src/generators/fromFlowSchema/flowSchemaMainFunction/main.js +3 -1
- package/src/generators/fromFlowSchema/flowStep/firstFlowStep/templateResource.ejs +2 -5
- package/src/generators/fromFlowSchema/flowStep/flowStep.js +14 -3
- package/src/generators/fromFlowSchema/index.js +58 -21
- package/src/generators/fromFlowSchema/register/complete/functionYaml/yaml.js +6 -1
- package/src/generators/fromFlowSchema/register/complete/handler/handler.js +5 -1
- package/src/generators/fromFlowSchema/register/complete/handler/template.ejs +3 -3
- package/src/generators/fromFlowSchema/register/dynamoDB/register.js +6 -1
- package/src/generators/fromFlowSchema/register/sns-in/snsIn.js +5 -2
- package/src/generators/fromFlowSchema/register/sns-in/template.ejs +3 -6
- package/src/generators/fromFlowSchema/register/subscriptionOutAll/subscriptionOutAll.js +2 -1
- package/src/generators/fromFlowSchema/register/subscriptionOutAll/template.ejs +0 -3
- package/src/generators/fromFlowSchema/register/wbs/functionYaml/yaml.js +4 -1
- package/src/generators/fromFlowSchema/register/wbs/handler/handler.js +2 -1
- package/src/generators/fromFlowSchema/statusTypes/statusField/functionYaml/template.ejs +3 -7
- package/src/generators/fromFlowSchema/statusTypes/statusField/functionYaml/yaml.js +27 -9
- package/src/generators/fromFlowSchema/statusTypes/statusField/handler/handler.js +4 -1
- package/src/generators/fromFlowSchema/statusTypes/statusField/mainFunction/main.js +2 -1
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/checkTriggerCacheComplete/functionYaml/template.ejs +3 -7
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/checkTriggerCacheComplete/functionYaml/yaml.js +27 -9
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/checkTriggerCacheComplete/handler/handler.js +3 -1
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/checkTriggerCacheComplete/mainFunction/main.js +3 -1
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/processTriggerCache/functionYaml/template.ejs +3 -7
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/processTriggerCache/functionYaml/yaml.js +27 -9
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/processTriggerCache/handler/handler.js +3 -1
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/processTriggerCache/mainFunction/main.js +2 -1
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/triggerCacheComplete/functionYaml/dsq/dsq.js +27 -9
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/triggerCacheComplete/functionYaml/dsq/template.ejs +3 -7
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/triggerCacheComplete/functionYaml/sqs/sqs.js +27 -9
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/triggerCacheComplete/functionYaml/sqs/template.ejs +3 -7
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/triggerCacheComplete/handler/dsq/dsq.js +3 -1
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/triggerCacheComplete/handler/sqs/sqs.js +3 -1
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/triggerCacheComplete/mainFunction/main.js +3 -1
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/triggerCacheQueue/template.ejs +2 -5
- package/src/generators/fromFlowSchema/webSocket/webSocket/connect/functionYaml/yaml.js +4 -1
- package/src/generators/fromFlowSchema/webSocket/webSocket/connect/handler/handler.js +4 -1
- package/src/generators/fromFlowSchema/webSocket/webSocket/dynamoDb/WebSocketTaskData.js +3 -4
- package/src/generators/fromFlowSchema/webSocket/webSocket/dynamoDb/template.ejs +28 -0
- package/src/generators/fromFlowSchema/webSocket/webSocket/dynamoDb/ttlDynamoTemplate.ejs +2 -5
- package/src/generators/fromFlowSchema/webSocket/webSocketComplete/functionYaml/yaml.js +7 -1
- package/src/generators/fromFlowSchema/webSocket/webSocketComplete/handler/handler.js +4 -1
- package/src/generators/fromFlowSchema/webSocket/webSocketComplete/mainFunction/main.js +4 -1
- package/src/generators/fromFlowSchema/webSocket/webSocketComplete/sqs/sqs.js +8 -2
- package/src/generators/fromFlowSchema/webSocket/webSocketComplete/sqs/template.ejs +3 -6
- package/src/generators/fromObjectSchema/endpoint/index.js +2 -1
- package/src/generators/fromObjectSchema/endpoint/main/beforeLogical/beforeLogical.js +4 -1
- package/src/generators/fromObjectSchema/endpoint/main/create/create.js +4 -1
- package/src/generators/fromObjectSchema/endpoint/main/delete/delete.js +2 -1
- package/src/generators/fromObjectSchema/endpoint/main/get/get.js +2 -1
- package/src/generators/fromObjectSchema/endpoint/main/update/update.js +2 -1
- package/src/generators/fromObjectSchema/endpointComplete/create/handler/handler.js +2 -1
- package/src/generators/fromObjectSchema/endpointComplete/create/sns-in-sqs/template.ejs +3 -6
- package/src/generators/fromObjectSchema/endpointComplete/create/sns-out/snsOut.js +4 -1
- package/src/generators/fromObjectSchema/endpointComplete/create/sns-out/template.ejs +3 -5
- package/src/generators/fromObjectSchema/endpointComplete/create/yaml/template.ejs +5 -9
- package/src/generators/fromObjectSchema/endpointComplete/create/yaml/yaml.js +17 -2
- package/src/generators/fromObjectSchema/endpointComplete/delete/handler/handler.js +8 -2
- package/src/generators/fromObjectSchema/endpointComplete/delete/handler/template.ejs +3 -6
- package/src/generators/fromObjectSchema/endpointComplete/delete/sns-in-sqs/template.ejs +3 -6
- package/src/generators/fromObjectSchema/endpointComplete/delete/yaml/template.ejs +5 -9
- package/src/generators/fromObjectSchema/endpointComplete/delete/yaml/yaml.js +17 -2
- package/src/generators/fromObjectSchema/endpointComplete/get/handler/handler.js +8 -2
- package/src/generators/fromObjectSchema/endpointComplete/get/handler/template.ejs +3 -6
- package/src/generators/fromObjectSchema/endpointComplete/get/sns-in-sqs/template.ejs +3 -6
- package/src/generators/fromObjectSchema/endpointComplete/get/yaml/template.ejs +5 -9
- package/src/generators/fromObjectSchema/endpointComplete/get/yaml/yaml.js +17 -2
- package/src/generators/fromObjectSchema/endpointComplete/update/handler/handler.js +8 -2
- package/src/generators/fromObjectSchema/endpointComplete/update/handler/template.ejs +3 -6
- package/src/generators/fromObjectSchema/endpointComplete/update/sns-in-sqs/template.ejs +3 -6
- package/src/generators/fromObjectSchema/endpointComplete/update/yaml/template.ejs +5 -9
- package/src/generators/fromObjectSchema/endpointComplete/update/yaml/yaml.js +17 -2
- package/src/generators/fromObjectSchema/findData/findDataYaml/findDataYaml.js +12 -3
- package/src/generators/fromObjectSchema/findData/findDataYaml/template.ejs +7 -11
- package/src/generators/fromObjectSchema/processLogical/yaml/template.ejs +4 -6
- package/src/generators/fromObjectSchema/processLogical/yaml/yaml.js +24 -6
- package/src/generators/fromObjectSchema/processLogicalPagination/yaml/dsq/dsq.js +24 -6
- package/src/generators/fromObjectSchema/processLogicalPagination/yaml/dsq/template.ejs +4 -6
- package/src/generators/fromObjectSchema/processLogicalPagination/yaml/sqs/sqs.js +24 -6
- package/src/generators/fromObjectSchema/processLogicalPagination/yaml/sqs/template.ejs +6 -8
- package/src/generators/fromObjectSchema/rbac/lambda/handler/handler.js +4 -1
- package/src/generators/fromObjectSchema/rbac/lambda/mainFunction/main.js +3 -2
- package/src/generators/fromObjectSchema/rbac/lambda/yaml/yaml.js +4 -1
- package/src/generators/fromObjectSchema/relationship/changeRelationship/action/functionYaml/template.ejs +5 -9
- package/src/generators/fromObjectSchema/relationship/changeRelationship/action/functionYaml/yaml.js +25 -6
- package/src/generators/fromObjectSchema/relationship/changeRelationship/action/handler/handler.js +4 -1
- package/src/generators/fromObjectSchema/relationship/changeRelationship/action/handler/templateByHandler/apiTemplate.ejs +1 -4
- package/src/generators/fromObjectSchema/relationship/changeRelationship/action/handler/templateByHandler/dsqTemplate.ejs +2 -5
- package/src/generators/fromObjectSchema/relationship/changeRelationship/action/handler/templateByHandler/invTemplate.ejs +2 -5
- package/src/generators/fromObjectSchema/relationship/changeRelationship/action/handler/templateByHandler/sqsTemplate.ejs +4 -7
- package/src/generators/fromObjectSchema/relationship/changeRelationship/action/mainFunction/main.js +2 -1
- package/src/generators/fromObjectSchema/relationship/changeRelationship/action/sns-in-sqs/snsTemplate.ejs +2 -5
- package/src/generators/fromObjectSchema/relationship/changeRelationship/action/sns-in-sqs/sqsTemplate.ejs +2 -5
- package/src/generators/fromObjectSchema/relationship/changeRelationship/complete/functionYaml/template.ejs +7 -11
- package/src/generators/fromObjectSchema/relationship/changeRelationship/complete/functionYaml/yaml.js +23 -5
- package/src/generators/fromObjectSchema/relationship/changeRelationship/complete/sns-in-sqs/template.ejs +3 -6
- package/src/generators/fromObjectSchema/relationship/changeRelationship/complete/sns-out/snsOut.js +4 -1
- package/src/generators/fromObjectSchema/relationship/changeRelationship/complete/sns-out/template.ejs +3 -5
- package/src/generators/fromObjectSchema/relationship/create/action/functionYaml/template.ejs +5 -9
- package/src/generators/fromObjectSchema/relationship/create/action/functionYaml/yaml.js +25 -6
- package/src/generators/fromObjectSchema/relationship/create/action/handler/handler.js +4 -1
- package/src/generators/fromObjectSchema/relationship/create/action/handler/templateByHandler/apiTemplate.ejs +1 -4
- package/src/generators/fromObjectSchema/relationship/create/action/handler/templateByHandler/dsqTemplate.ejs +2 -5
- package/src/generators/fromObjectSchema/relationship/create/action/handler/templateByHandler/invTemplate.ejs +2 -5
- package/src/generators/fromObjectSchema/relationship/create/action/handler/templateByHandler/sqsTemplate.ejs +4 -7
- package/src/generators/fromObjectSchema/relationship/create/action/mainFunction/main.js +2 -1
- package/src/generators/fromObjectSchema/relationship/create/action/sns-in-sqs/snsTemplate.ejs +2 -5
- package/src/generators/fromObjectSchema/relationship/create/action/sns-in-sqs/sqsTemplate.ejs +2 -5
- package/src/generators/fromObjectSchema/relationship/create/complete/functionYaml/template.ejs +7 -11
- package/src/generators/fromObjectSchema/relationship/create/complete/functionYaml/yaml.js +23 -5
- package/src/generators/fromObjectSchema/relationship/create/complete/sns-in-sqs/template.ejs +3 -6
- package/src/generators/fromObjectSchema/relationship/create/complete/sns-out/snsOut.js +4 -1
- package/src/generators/fromObjectSchema/relationship/create/complete/sns-out/template.ejs +3 -5
- package/src/generators/fromObjectSchema/relationship/delete/action/functionYaml/template.ejs +5 -9
- package/src/generators/fromObjectSchema/relationship/delete/action/functionYaml/yaml.js +26 -6
- package/src/generators/fromObjectSchema/relationship/delete/action/handler/handler.js +4 -1
- package/src/generators/fromObjectSchema/relationship/delete/action/handler/templateByHandler/apiTemplate.ejs +1 -4
- package/src/generators/fromObjectSchema/relationship/delete/action/handler/templateByHandler/dsqTemplate.ejs +2 -5
- package/src/generators/fromObjectSchema/relationship/delete/action/handler/templateByHandler/invTemplate.ejs +2 -5
- package/src/generators/fromObjectSchema/relationship/delete/action/handler/templateByHandler/sqsTemplate.ejs +3 -6
- package/src/generators/fromObjectSchema/relationship/delete/action/mainFunction/main.js +2 -1
- package/src/generators/fromObjectSchema/relationship/delete/action/sns-in-sqs/snsTemplate.ejs +2 -5
- package/src/generators/fromObjectSchema/relationship/delete/action/sns-in-sqs/sqsTemplate.ejs +2 -5
- package/src/generators/fromObjectSchema/relationship/delete/complete/functionYaml/template.ejs +7 -11
- package/src/generators/fromObjectSchema/relationship/delete/complete/functionYaml/yaml.js +23 -5
- package/src/generators/fromObjectSchema/relationship/delete/complete/sns-in-sqs/template.ejs +3 -6
- package/src/generators/fromObjectSchema/relationship/delete/complete/sns-out/snsOut.js +4 -1
- package/src/generators/fromObjectSchema/relationship/delete/complete/sns-out/template.ejs +3 -5
- package/src/generators/fromObjectSchema/relationship/get/action/functionYaml/template.ejs +5 -9
- package/src/generators/fromObjectSchema/relationship/get/action/functionYaml/yaml.js +25 -6
- package/src/generators/fromObjectSchema/relationship/get/action/handler/handler.js +4 -1
- package/src/generators/fromObjectSchema/relationship/get/action/handler/templateByHandler/apiTemplate.ejs +1 -4
- package/src/generators/fromObjectSchema/relationship/get/action/handler/templateByHandler/dsqTemplate.ejs +2 -5
- package/src/generators/fromObjectSchema/relationship/get/action/handler/templateByHandler/invTemplate.ejs +2 -5
- package/src/generators/fromObjectSchema/relationship/get/action/handler/templateByHandler/sqsTemplate.ejs +4 -7
- package/src/generators/fromObjectSchema/relationship/get/action/mainFunction/main.js +2 -1
- package/src/generators/fromObjectSchema/relationship/get/action/sns-in-sqs/snsTemplate.ejs +2 -5
- package/src/generators/fromObjectSchema/relationship/get/action/sns-in-sqs/sqsTemplate.ejs +2 -5
- package/src/generators/fromObjectSchema/relationship/get/complete/functionYaml/template.ejs +7 -11
- package/src/generators/fromObjectSchema/relationship/get/complete/functionYaml/yaml.js +23 -5
- package/src/generators/fromObjectSchema/relationship/get/complete/sns-in-sqs/template.ejs +3 -6
- package/src/generators/fromObjectSchema/relationship/get/complete/sns-out/snsOut.js +4 -1
- package/src/generators/fromObjectSchema/relationship/get/complete/sns-out/template.ejs +3 -5
- package/src/generators/fromObjectSchema/relationship/moveRelationship/action/functionYaml/template.ejs +5 -9
- package/src/generators/fromObjectSchema/relationship/moveRelationship/action/functionYaml/yaml.js +25 -6
- package/src/generators/fromObjectSchema/relationship/moveRelationship/action/handler/handler.js +4 -1
- package/src/generators/fromObjectSchema/relationship/moveRelationship/action/handler/templateByHandler/apiTemplate.ejs +1 -4
- package/src/generators/fromObjectSchema/relationship/moveRelationship/action/handler/templateByHandler/dsqTemplate.ejs +2 -5
- package/src/generators/fromObjectSchema/relationship/moveRelationship/action/handler/templateByHandler/invTemplate.ejs +2 -5
- package/src/generators/fromObjectSchema/relationship/moveRelationship/action/handler/templateByHandler/sqsTemplate.ejs +4 -7
- package/src/generators/fromObjectSchema/relationship/moveRelationship/action/mainFunction/main.js +2 -1
- package/src/generators/fromObjectSchema/relationship/moveRelationship/action/sns-in-sqs/snsTemplate.ejs +2 -5
- package/src/generators/fromObjectSchema/relationship/moveRelationship/action/sns-in-sqs/sqsTemplate.ejs +2 -5
- package/src/generators/fromObjectSchema/relationship/moveRelationship/complete/functionYaml/template.ejs +7 -11
- package/src/generators/fromObjectSchema/relationship/moveRelationship/complete/functionYaml/yaml.js +23 -5
- package/src/generators/fromObjectSchema/relationship/moveRelationship/complete/mainFunction/main.js +2 -1
- package/src/generators/fromObjectSchema/relationship/moveRelationship/complete/sns-in-sqs/template.ejs +3 -6
- package/src/generators/fromObjectSchema/relationship/moveRelationship/complete/sns-out/snsOut.js +4 -1
- package/src/generators/fromObjectSchema/relationship/moveRelationship/complete/sns-out/template.ejs +3 -5
- package/src/generators/fromObjectSchema/relationship/update/action/functionYaml/template.ejs +5 -9
- package/src/generators/fromObjectSchema/relationship/update/action/functionYaml/yaml.js +25 -6
- package/src/generators/fromObjectSchema/relationship/update/action/handler/handler.js +4 -1
- package/src/generators/fromObjectSchema/relationship/update/action/handler/templateByHandler/apiTemplate.ejs +1 -4
- package/src/generators/fromObjectSchema/relationship/update/action/handler/templateByHandler/dsqTemplate.ejs +2 -5
- package/src/generators/fromObjectSchema/relationship/update/action/handler/templateByHandler/invTemplate.ejs +2 -5
- package/src/generators/fromObjectSchema/relationship/update/action/handler/templateByHandler/sqsTemplate.ejs +1 -4
- package/src/generators/fromObjectSchema/relationship/update/action/mainFunction/main.js +2 -1
- package/src/generators/fromObjectSchema/relationship/update/action/sns-in-sqs/snsTemplate.ejs +2 -5
- package/src/generators/fromObjectSchema/relationship/update/action/sns-in-sqs/sqsTemplate.ejs +2 -5
- package/src/generators/fromObjectSchema/relationship/update/complete/functionYaml/template.ejs +7 -11
- package/src/generators/fromObjectSchema/relationship/update/complete/functionYaml/yaml.js +23 -5
- package/src/generators/fromObjectSchema/relationship/update/complete/sns-in-sqs/template.ejs +2 -5
- package/src/generators/fromObjectSchema/relationship/update/complete/sns-out/template.ejs +3 -5
- package/src/generators/fromObjectSchema/textTag/systemText/systemText.js +13 -13
- package/src/generators/fromPlugIn/afterFirstFlowStep/recievePlugIn/mainFunction/main.js +3 -2
- package/src/generators/fromPlugIn/afterFirstFlowStep/recievePlugIn/yaml/yaml.js +3 -1
- package/src/generators/fromPlugIn/byConfig/mainFunction/templateAwaitingStep.ejs +1 -4
- package/src/generators/fromPlugIn/byConfig/sns-sqs/queueNoTopic.ejs +2 -5
- package/src/generators/fromPlugIn/byConfig/sns-sqs/snsSqs.js +8 -2
- package/src/generators/fromPlugIn/byConfig/sns-sqs/snsTemplate.ejs +2 -5
- package/src/generators/fromPlugIn/byConfig/sns-sqs/sqsTemplate.ejs +2 -5
- package/src/generators/fromPlugIn/firstFlowStep/mainFunction/templateByConfig/awaitingSteps.ejs +3 -6
- package/src/generators/fromPlugIn/firstFlowStep/queueNtopic/dsqTemplate.ejs +2 -5
- package/src/generators/fromPlugIn/firstFlowStep/queueNtopic/queueNtopic.js +5 -1
- package/src/generators/fromPlugIn/firstFlowStep/queueNtopic/snsTemplate.ejs +15 -18
- package/src/generators/fromPlugIn/firstFlowStep/queueNtopic/sqsTemplate.ejs +2 -5
- package/src/generators/fromPlugIn/firstFlowStep/topicOut/topicOut.js +5 -2
- package/src/generators/fromPlugIn/index.js +150 -155
- package/src/generators/resourceYamlComponent/dynamodb/template.ejs +2 -8
- package/src/generators/resourceYamlComponent/sns-in-sqs/snsTemplate.ejs +2 -5
- package/src/generators/resourceYamlComponent/sns-in-sqs/sqsTemplate.ejs +2 -5
- package/src/generators/roles/roleNameConfig/template.ejs +2 -2
- package/src/generators/roles/roleNameConfig/templateIntTesting.ejs +1 -1
- package/src/generators/roles/roleNameConfig/templateYaml.ejs +1 -1
- package/src/generators/roles/sharedResource/sharedResource.js +7 -1
- package/src/libs/Utils.js +4 -2
|
@@ -38,13 +38,17 @@ function data(_izContext, srcPath) {
|
|
|
38
38
|
let queueName = FUNCTION_NAME.flowSchemaRegister;
|
|
39
39
|
let functionName = FUNCTION_NAME.flowSchemaRegister + 'Complete';
|
|
40
40
|
let handlerType = upperCase(HANDLER.hdrSqs);
|
|
41
|
+
const upperFunctionName = upperCase(functionName);
|
|
42
|
+
const upperQueueName = upperCase(queueName);
|
|
41
43
|
return {
|
|
42
44
|
templatePath: templatePath,
|
|
43
45
|
templateData: {
|
|
44
46
|
queueName,
|
|
45
47
|
functionName: functionName,
|
|
46
48
|
handler: HANDLER.hdrSqs,
|
|
47
|
-
firstLetterUpperCase: upperCase
|
|
49
|
+
firstLetterUpperCase: upperCase,
|
|
50
|
+
upperFunctionName,
|
|
51
|
+
upperQueueName
|
|
48
52
|
},
|
|
49
53
|
setting: {
|
|
50
54
|
savePath: path.join(srcPath, SOURCE_PATH.flowSchemaRegister, 'source/'),
|
|
@@ -22,7 +22,7 @@ import Logger from '@izara_project/izara-core-library-logger';
|
|
|
22
22
|
import callingFlowSharedLib from '@izara_project/izara-core-library-calling-flow';
|
|
23
23
|
import { recordHandlerSharedLib } from "@izara_project/izara-core-library-record-handler";
|
|
24
24
|
|
|
25
|
-
import <%- functionName %> from './<%-
|
|
25
|
+
import <%- functionName %> from './<%- upperFunctionName %>_Main.js';
|
|
26
26
|
|
|
27
27
|
// validate event properties in body.Message of sqs event
|
|
28
28
|
middlewareHandler.setValidatorSchema(recordHandlerSharedLib.baseValidatorSchema());
|
|
@@ -42,7 +42,7 @@ export const main = middlewareHandler.wrap(async (event, context) => {
|
|
|
42
42
|
//validate message (and MessageAttributes)
|
|
43
43
|
await recordHandlerSharedLib.validateRecord(
|
|
44
44
|
record, // one record will send to mainFunction
|
|
45
|
-
"<%-
|
|
45
|
+
"<%- queueName %>", // queue name that need to retry or send to dlq
|
|
46
46
|
perRecordsValidatorSchema, // schema for record.Message
|
|
47
47
|
// messageAttributeValidatorSchema // ----- for msgAttr default is null -> do not send this parameter if not want to validate msgAtt
|
|
48
48
|
);
|
|
@@ -59,7 +59,7 @@ export const main = middlewareHandler.wrap(async (event, context) => {
|
|
|
59
59
|
let recordPromise = recordHandlerSharedLib.recordHandler(
|
|
60
60
|
record, // one record will send to mainFunction
|
|
61
61
|
<%- functionName %>Main, // mainFunction that need to invoke.
|
|
62
|
-
'<%-
|
|
62
|
+
'<%- queueName %>', // queue name that need to retry or send to dlq
|
|
63
63
|
passOnProperties, // all parameters that mainFunction needed.
|
|
64
64
|
);
|
|
65
65
|
record._izContext.logger.debug('after recordPromise in handler');
|
|
@@ -20,6 +20,8 @@ import { fileURLToPath } from 'url';
|
|
|
20
20
|
const __filename = fileURLToPath(import.meta.url);
|
|
21
21
|
const __dirname = path.dirname(__filename);
|
|
22
22
|
import consts from '#libs/Consts.js';
|
|
23
|
+
import utils from '#libs/Utils.js';
|
|
24
|
+
const { firstLetterUpperCase: upperCase } = utils;
|
|
23
25
|
|
|
24
26
|
const { SOURCE_PATH, SAVE_FILE_NAME } = consts;
|
|
25
27
|
|
|
@@ -43,6 +45,7 @@ const createRegisterTable = (_izContext, srcPath) => {
|
|
|
43
45
|
templateData: {
|
|
44
46
|
tableName: tableName,
|
|
45
47
|
resourceName: tableName,
|
|
48
|
+
|
|
46
49
|
attributes: [
|
|
47
50
|
{
|
|
48
51
|
keyType: 'partitionKey',
|
|
@@ -54,7 +57,9 @@ const createRegisterTable = (_izContext, srcPath) => {
|
|
|
54
57
|
AttributeName: 'connectionId',
|
|
55
58
|
AttributeType: 'S'
|
|
56
59
|
}
|
|
57
|
-
]
|
|
60
|
+
],
|
|
61
|
+
|
|
62
|
+
upperTableName: upperCase(tableName)
|
|
58
63
|
},
|
|
59
64
|
setting: {
|
|
60
65
|
initialData: 'Resources:\n',
|
|
@@ -38,11 +38,14 @@ const templatePath = path.join(__dirname, 'template.ejs');
|
|
|
38
38
|
*/
|
|
39
39
|
|
|
40
40
|
function createDataForSnsIn(_izContext, srcPath) {
|
|
41
|
+
const queueName = upperCase(FUNCTION_NAME.flowSchemaRegister);
|
|
42
|
+
const upperQueueName = upperCase(queueName);
|
|
41
43
|
return {
|
|
42
44
|
templatePath: templatePath,
|
|
43
45
|
templateData: {
|
|
44
|
-
queueName
|
|
45
|
-
firstLetterUpperCase: upperCase
|
|
46
|
+
queueName,
|
|
47
|
+
firstLetterUpperCase: upperCase,
|
|
48
|
+
upperQueueName
|
|
46
49
|
},
|
|
47
50
|
setting: {
|
|
48
51
|
initialData: 'Resources:\n',
|
|
@@ -33,13 +33,10 @@
|
|
|
33
33
|
Action: "SQS:SendMessage"
|
|
34
34
|
Queues:
|
|
35
35
|
- Ref: <%- queueName %>
|
|
36
|
-
#<#<%-
|
|
37
|
-
#<#/<%-
|
|
36
|
+
#<#<%- queueName %>QueueSetting#>
|
|
37
|
+
#<#/<%- queueName %>QueueSetting#>
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
42
|
-
} _%>
|
|
43
|
-
<%_ function firstLetterLowerCase(str) {
|
|
40
|
+
<%_ function firstLetterLowerCase(str) {
|
|
44
41
|
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
45
42
|
} _%>
|
|
@@ -63,7 +63,8 @@ function createDataForSubscriptionOutAll(
|
|
|
63
63
|
templateData: {
|
|
64
64
|
queueName: queueName,
|
|
65
65
|
endpoint: 'Register',
|
|
66
|
-
firstLetterUpperCase: upperCase
|
|
66
|
+
firstLetterUpperCase: upperCase,
|
|
67
|
+
upperQueueName: upperCase(queueName)
|
|
67
68
|
},
|
|
68
69
|
setting: {
|
|
69
70
|
initialData: 'Resources:\n',
|
|
@@ -5,9 +5,6 @@
|
|
|
5
5
|
TopicArn: !Ref Out<%- queueName %>
|
|
6
6
|
Endpoint: "arn:aws:sqs:${self:custom.iz_region}:${self:custom.iz_accountId}:${self:custom.iz_resourcePrefix}<%- endpoint %>"
|
|
7
7
|
Protocol: "sqs"
|
|
8
|
-
<%_ function firstLetterUpperCase(text){
|
|
9
|
-
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
10
|
-
} _%>
|
|
11
8
|
<%_ function firstLetterLowerCase(str) {
|
|
12
9
|
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
13
10
|
} _%>
|
|
@@ -93,11 +93,14 @@ function data(_izContext, allLocalFlowSchemas, srcPath) {
|
|
|
93
93
|
'source/',
|
|
94
94
|
`${upperCase(functionName)}_${upperCase(handlerType)}`
|
|
95
95
|
),
|
|
96
|
+
|
|
96
97
|
additionalResourcePermission,
|
|
97
98
|
functionName: upperCase(functionName),
|
|
98
99
|
handlerType,
|
|
99
100
|
roleName: SOURCE_GENERATE_IAM_ROLE.RegisterRole,
|
|
100
|
-
functionNameConfig
|
|
101
|
+
functionNameConfig,
|
|
102
|
+
upperHandlerType: upperCase(handlerType),
|
|
103
|
+
upperFunctionNameConfig: upperCase(functionNameConfig)
|
|
101
104
|
},
|
|
102
105
|
setting: {
|
|
103
106
|
savePath: path.join(srcPath, SOURCE_PATH.appYaml),
|
|
@@ -49,7 +49,8 @@ function createParamsForCreateSource(_izContext, srcPath) {
|
|
|
49
49
|
isAsync,
|
|
50
50
|
functionName: functionName,
|
|
51
51
|
firstLetterUpperCase: upperCase,
|
|
52
|
-
routeName: FUNCTION_NAME.flowSchemaRegister
|
|
52
|
+
routeName: FUNCTION_NAME.flowSchemaRegister,
|
|
53
|
+
upperFunctionName: upperCase(functionName)
|
|
53
54
|
},
|
|
54
55
|
setting: {
|
|
55
56
|
savePath: path.join(srcPath, SOURCE_PATH.flowSchemaRegister, 'source/'),
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
<%-
|
|
3
|
-
|
|
4
|
-
name: ${self:custom.iz_resourcePrefix}<%- firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handlerType) %>
|
|
1
|
+
<%- functionNameConfig %>:
|
|
2
|
+
handler: <%- handlerPathUpperFunctionName %>
|
|
3
|
+
name: ${self:custom.iz_resourcePrefix}<%- upperFunctionName %><%- upperHandlerType %>
|
|
5
4
|
role: <%- roleName %>Role
|
|
6
5
|
#<#<%- functionName %><%- handlerType %>FunctionSetting#>
|
|
7
6
|
#<#/<%- functionName %><%- handlerType %>FunctionSetting#>
|
|
@@ -14,9 +13,6 @@
|
|
|
14
13
|
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
15
14
|
|
|
16
15
|
|
|
17
|
-
<%_ function firstLetterUpperCase(text){
|
|
18
|
-
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
19
|
-
} _%>
|
|
20
16
|
<%_ function firstLetterLowerCase(str) {
|
|
21
17
|
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
22
18
|
} _%>
|
|
@@ -123,21 +123,39 @@ async function createSourceParams(_izContext, flowSchema, appPath) {
|
|
|
123
123
|
);
|
|
124
124
|
|
|
125
125
|
additionalResourcePermission.push(awaitingMultipleStepsRole());
|
|
126
|
+
|
|
127
|
+
const resourceLocation = path.join(
|
|
128
|
+
SOURCE_PATH.resourceLocationFlowSchema,
|
|
129
|
+
upperCase(flowSchema.flowTag),
|
|
130
|
+
'source/'
|
|
131
|
+
);
|
|
132
|
+
|
|
133
|
+
const functionNameConfig = upperCase(functionName) + upperCase(shortNameHandler(handlerType));
|
|
134
|
+
const roleName = upperCase(flowSchema.flowTag);
|
|
135
|
+
const upperFunctionName = upperCase(functionName);
|
|
136
|
+
const upperHandlerType = upperCase(handlerType);
|
|
137
|
+
const upperFunctionNameConfig = upperCase(functionNameConfig);
|
|
138
|
+
const upperRoleName = upperCase(roleName);
|
|
139
|
+
const upperQueueName = upperCase(queueName);
|
|
140
|
+
const handlerPath = path.join(resourceLocation, `${functionName}_${upperHandlerType}.main`);
|
|
141
|
+
const handlerPathUpperFunctionName = path.join(resourceLocation, `${upperFunctionName}_${upperHandlerType}.main`);
|
|
126
142
|
return {
|
|
127
143
|
templatePath: templatePath,
|
|
128
144
|
templateData: {
|
|
129
|
-
resourceLocation
|
|
130
|
-
SOURCE_PATH.resourceLocationFlowSchema,
|
|
131
|
-
upperCase(flowSchema.flowTag),
|
|
132
|
-
'source/'
|
|
133
|
-
),
|
|
145
|
+
resourceLocation,
|
|
134
146
|
functionName,
|
|
135
147
|
handlerType,
|
|
136
148
|
additionalResourcePermission,
|
|
137
|
-
functionNameConfig
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
149
|
+
functionNameConfig,
|
|
150
|
+
roleName,
|
|
151
|
+
queueName,
|
|
152
|
+
upperFunctionName,
|
|
153
|
+
upperHandlerType,
|
|
154
|
+
upperFunctionNameConfig,
|
|
155
|
+
upperRoleName,
|
|
156
|
+
upperQueueName,
|
|
157
|
+
handlerPath,
|
|
158
|
+
handlerPathUpperFunctionName
|
|
141
159
|
},
|
|
142
160
|
setting: {
|
|
143
161
|
savePath: path.join(appPath, SOURCE_PATH.appYaml),
|
|
@@ -46,7 +46,10 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
46
46
|
templateData: {
|
|
47
47
|
functionName,
|
|
48
48
|
handlerType,
|
|
49
|
-
queueName
|
|
49
|
+
queueName,
|
|
50
|
+
upperFunctionName: upperCase(functionName),
|
|
51
|
+
upperHandlerType: upperCase(handlerType),
|
|
52
|
+
upperQueueName: upperCase(queueName)
|
|
50
53
|
},
|
|
51
54
|
setting: {
|
|
52
55
|
savePath: path.join(
|
|
@@ -45,7 +45,8 @@ function createSourceParams(_izContext, flowSchema, appPath) {
|
|
|
45
45
|
templatePath: templatePath,
|
|
46
46
|
templateData: {
|
|
47
47
|
functionName,
|
|
48
|
-
flowType: flowSchema.flowTag
|
|
48
|
+
flowType: flowSchema.flowTag,
|
|
49
|
+
upperFunctionName: upperCase(functionName)
|
|
49
50
|
},
|
|
50
51
|
setting: {
|
|
51
52
|
savePath:
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
<%-
|
|
3
|
-
|
|
4
|
-
name: ${self:custom.iz_resourcePrefix}<%- firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handlerType) %>
|
|
1
|
+
<%- functionNameConfig %>:
|
|
2
|
+
handler: <%- handlerPathUpperFunctionName %>
|
|
3
|
+
name: ${self:custom.iz_resourcePrefix}<%- upperFunctionName %><%- upperHandlerType %>
|
|
5
4
|
role: <%- roleName %>Role
|
|
6
5
|
#<#<%- functionName %><%- handlerType %>FunctionSetting#>
|
|
7
6
|
#<#/<%- functionName %><%- handlerType %>FunctionSetting#>
|
|
@@ -14,9 +13,6 @@
|
|
|
14
13
|
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
15
14
|
|
|
16
15
|
|
|
17
|
-
<%_ function firstLetterUpperCase(text){
|
|
18
|
-
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
19
|
-
} _%>
|
|
20
16
|
<%_ function firstLetterLowerCase(str) {
|
|
21
17
|
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
22
18
|
} _%>
|
|
@@ -108,21 +108,39 @@ async function createSourceParams(_izContext, flowSchema, appPath) {
|
|
|
108
108
|
);
|
|
109
109
|
|
|
110
110
|
additionalResourcePermission.push(awaitingMultipleStepsRole());
|
|
111
|
+
|
|
112
|
+
const resourceLocation = path.join(
|
|
113
|
+
SOURCE_PATH.resourceLocationFlowSchema,
|
|
114
|
+
upperCase(flowSchema.flowTag),
|
|
115
|
+
'source/'
|
|
116
|
+
);
|
|
117
|
+
|
|
118
|
+
const functionNameConfig = upperCase(functionName) + upperCase(shortNameHandler(handlerType));
|
|
119
|
+
const roleName = upperCase(flowSchema.flowTag);
|
|
120
|
+
const upperFunctionName = upperCase(functionName);
|
|
121
|
+
const upperHandlerType = upperCase(handlerType);
|
|
122
|
+
const upperFunctionNameConfig = upperCase(functionNameConfig);
|
|
123
|
+
const upperRoleName = upperCase(roleName);
|
|
124
|
+
const upperQueueName = upperCase(queueName);
|
|
125
|
+
const handlerPath = path.join(resourceLocation, `${functionName}_${upperHandlerType}.main`);
|
|
126
|
+
const handlerPathUpperFunctionName = path.join(resourceLocation, `${upperFunctionName}_${upperHandlerType}.main`);
|
|
111
127
|
return {
|
|
112
128
|
templatePath: templatePath,
|
|
113
129
|
templateData: {
|
|
114
|
-
resourceLocation
|
|
115
|
-
SOURCE_PATH.resourceLocationFlowSchema,
|
|
116
|
-
upperCase(flowSchema.flowTag),
|
|
117
|
-
'source/'
|
|
118
|
-
),
|
|
130
|
+
resourceLocation,
|
|
119
131
|
functionName,
|
|
120
132
|
handlerType,
|
|
121
133
|
additionalResourcePermission,
|
|
122
|
-
functionNameConfig
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
134
|
+
functionNameConfig,
|
|
135
|
+
roleName,
|
|
136
|
+
queueName,
|
|
137
|
+
upperFunctionName,
|
|
138
|
+
upperHandlerType,
|
|
139
|
+
upperFunctionNameConfig,
|
|
140
|
+
upperRoleName,
|
|
141
|
+
upperQueueName,
|
|
142
|
+
handlerPath,
|
|
143
|
+
handlerPathUpperFunctionName
|
|
126
144
|
},
|
|
127
145
|
setting: {
|
|
128
146
|
savePath: path.join(appPath, SOURCE_PATH.appYaml),
|
|
@@ -50,7 +50,9 @@ function createSourceParams(_izContext, flowSchema, appPath) {
|
|
|
50
50
|
templatePath: templatePath,
|
|
51
51
|
templateData: {
|
|
52
52
|
functionName,
|
|
53
|
-
queueName
|
|
53
|
+
queueName,
|
|
54
|
+
upperFunctionName: upperCase(functionName),
|
|
55
|
+
upperQueueName: upperCase(queueName)
|
|
54
56
|
},
|
|
55
57
|
setting: {
|
|
56
58
|
savePath:
|
|
@@ -52,7 +52,9 @@ function createSourceParams(_izContext, flowSchema, appPath) {
|
|
|
52
52
|
templateData: {
|
|
53
53
|
functionName,
|
|
54
54
|
queueName,
|
|
55
|
-
flowTag: flowSchema.flowTag
|
|
55
|
+
flowTag: flowSchema.flowTag,
|
|
56
|
+
upperFunctionName: upperCase(functionName),
|
|
57
|
+
upperQueueName: upperCase(queueName)
|
|
56
58
|
},
|
|
57
59
|
setting: {
|
|
58
60
|
savePath:
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
<%-
|
|
3
|
-
|
|
4
|
-
name: ${self:custom.iz_resourcePrefix}<%- firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handlerType) %>
|
|
1
|
+
<%- functionNameConfig %>:
|
|
2
|
+
handler: <%- handlerPathUpperFunctionName %>
|
|
3
|
+
name: ${self:custom.iz_resourcePrefix}<%- upperFunctionName %><%- upperHandlerType %>
|
|
5
4
|
role: <%- roleName %>Role
|
|
6
5
|
#<#<%- functionName %><%- handlerType %>FunctionSetting#>
|
|
7
6
|
#<#/<%- functionName %><%- handlerType %>FunctionSetting#>
|
|
@@ -14,9 +13,6 @@
|
|
|
14
13
|
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
15
14
|
|
|
16
15
|
|
|
17
|
-
<%_ function firstLetterUpperCase(text){
|
|
18
|
-
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
19
|
-
} _%>
|
|
20
16
|
<%_ function firstLetterLowerCase(str) {
|
|
21
17
|
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
22
18
|
} _%>
|
|
@@ -113,21 +113,39 @@ async function createSourceParams(_izContext, flowSchema, appPath) {
|
|
|
113
113
|
);
|
|
114
114
|
|
|
115
115
|
additionalResourcePermission.push(awaitingMultipleStepsRole());
|
|
116
|
+
|
|
117
|
+
const resourceLocation = path.join(
|
|
118
|
+
SOURCE_PATH.resourceLocationFlowSchema,
|
|
119
|
+
upperCase(flowSchema.flowTag),
|
|
120
|
+
'source/'
|
|
121
|
+
);
|
|
122
|
+
|
|
123
|
+
const functionNameConfig = upperCase(functionName) + upperCase(shortNameHandler(handlerType));
|
|
124
|
+
const roleName = upperCase(flowSchema.flowTag);
|
|
125
|
+
const upperFunctionName = upperCase(functionName);
|
|
126
|
+
const upperHandlerType = upperCase(handlerType);
|
|
127
|
+
const upperFunctionNameConfig = upperCase(functionNameConfig);
|
|
128
|
+
const upperRoleName = upperCase(roleName);
|
|
129
|
+
const upperQueueName = upperCase(queueName);
|
|
130
|
+
const handlerPath = path.join(resourceLocation, `${functionName}_${upperHandlerType}.main`);
|
|
131
|
+
const handlerPathUpperFunctionName = path.join(resourceLocation, `${upperFunctionName}_${upperHandlerType}.main`);
|
|
116
132
|
return {
|
|
117
133
|
templatePath: templatePath,
|
|
118
134
|
templateData: {
|
|
119
|
-
resourceLocation
|
|
120
|
-
SOURCE_PATH.resourceLocationFlowSchema,
|
|
121
|
-
upperCase(flowSchema.flowTag),
|
|
122
|
-
'source/'
|
|
123
|
-
),
|
|
135
|
+
resourceLocation,
|
|
124
136
|
functionName,
|
|
125
137
|
handlerType,
|
|
126
138
|
additionalResourcePermission,
|
|
127
|
-
functionNameConfig
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
139
|
+
functionNameConfig,
|
|
140
|
+
roleName,
|
|
141
|
+
queueName,
|
|
142
|
+
upperFunctionName,
|
|
143
|
+
upperHandlerType,
|
|
144
|
+
upperFunctionNameConfig,
|
|
145
|
+
upperRoleName,
|
|
146
|
+
upperQueueName,
|
|
147
|
+
handlerPath,
|
|
148
|
+
handlerPathUpperFunctionName
|
|
131
149
|
},
|
|
132
150
|
setting: {
|
|
133
151
|
savePath: path.join(appPath, SOURCE_PATH.appYaml),
|
|
@@ -51,7 +51,9 @@ function createSourceParams(_izContext, flowSchema, appPath) {
|
|
|
51
51
|
templatePath: templatePath,
|
|
52
52
|
templateData: {
|
|
53
53
|
functionName,
|
|
54
|
-
queueName
|
|
54
|
+
queueName,
|
|
55
|
+
upperFunctionName: upperCase(functionName),
|
|
56
|
+
upperQueueName: upperCase(queueName)
|
|
55
57
|
},
|
|
56
58
|
setting: {
|
|
57
59
|
savePath:
|
|
@@ -102,21 +102,39 @@ async function createSourceParams(_izContext, flowSchema, appPath) {
|
|
|
102
102
|
);
|
|
103
103
|
|
|
104
104
|
additionalResourcePermission.push(awaitingMultipleStepsRole());
|
|
105
|
+
|
|
106
|
+
const resourceLocation = path.join(
|
|
107
|
+
SOURCE_PATH.resourceLocationFlowSchema,
|
|
108
|
+
upperCase(flowSchema.flowTag),
|
|
109
|
+
'source/'
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
const functionNameConfig = upperCase(functionName) + upperCase(shortNameHandler(handlerType));
|
|
113
|
+
const roleName = upperCase(flowSchema.flowTag);
|
|
114
|
+
const upperFunctionName = upperCase(functionName);
|
|
115
|
+
const upperHandlerType = upperCase(handlerType);
|
|
116
|
+
const upperFunctionNameConfig = upperCase(functionNameConfig);
|
|
117
|
+
const upperRoleName = upperCase(roleName);
|
|
118
|
+
const upperQueueName = upperCase(queueName);
|
|
119
|
+
const handlerPath = path.join(resourceLocation, `${functionName}_${upperHandlerType}.main`);
|
|
120
|
+
const handlerPathUpperFunctionName = path.join(resourceLocation, `${upperFunctionName}_${upperHandlerType}.main`);
|
|
105
121
|
return {
|
|
106
122
|
templatePath: templatePath,
|
|
107
123
|
templateData: {
|
|
108
|
-
resourceLocation
|
|
109
|
-
SOURCE_PATH.resourceLocationFlowSchema,
|
|
110
|
-
upperCase(flowSchema.flowTag),
|
|
111
|
-
'source/'
|
|
112
|
-
),
|
|
124
|
+
resourceLocation,
|
|
113
125
|
functionName,
|
|
114
126
|
handlerType,
|
|
115
127
|
additionalResourcePermission,
|
|
116
|
-
functionNameConfig
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
128
|
+
functionNameConfig,
|
|
129
|
+
roleName,
|
|
130
|
+
queueName,
|
|
131
|
+
upperFunctionName,
|
|
132
|
+
upperHandlerType,
|
|
133
|
+
upperFunctionNameConfig,
|
|
134
|
+
upperRoleName,
|
|
135
|
+
upperQueueName,
|
|
136
|
+
handlerPath,
|
|
137
|
+
handlerPathUpperFunctionName
|
|
120
138
|
},
|
|
121
139
|
setting: {
|
|
122
140
|
savePath: path.join(appPath, SOURCE_PATH.appYaml),
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
<%-
|
|
3
|
-
|
|
4
|
-
name: ${self:custom.iz_resourcePrefix}<%- firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handlerType) %>
|
|
1
|
+
<%- functionNameConfig %>:
|
|
2
|
+
handler: <%- handlerPathUpperFunctionName %>
|
|
3
|
+
name: ${self:custom.iz_resourcePrefix}<%- upperFunctionName %><%- upperHandlerType %>
|
|
5
4
|
role: <%- roleName %>Role
|
|
6
5
|
#<#<%- functionName %><%- handlerType %>FunctionSetting#>
|
|
7
6
|
#<#/<%- functionName %><%- handlerType %>FunctionSetting#>
|
|
@@ -13,9 +12,6 @@
|
|
|
13
12
|
- body: {"MessageAttributes":{"callingFlow":{"Value":["${self:custom.iz_resourcePrefix}<%- functionName %>"]}}} # functionName of callingFlow
|
|
14
13
|
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
15
14
|
|
|
16
|
-
<%_ function firstLetterUpperCase(text){
|
|
17
|
-
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
18
|
-
} _%>
|
|
19
15
|
<%_ function firstLetterLowerCase(str) {
|
|
20
16
|
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
21
17
|
} _%>
|
|
@@ -102,21 +102,39 @@ async function createSourceParams(_izContext, flowSchema, appPath) {
|
|
|
102
102
|
);
|
|
103
103
|
|
|
104
104
|
additionalResourcePermission.push(awaitingMultipleStepsRole());
|
|
105
|
+
|
|
106
|
+
const resourceLocation = path.join(
|
|
107
|
+
SOURCE_PATH.resourceLocationFlowSchema,
|
|
108
|
+
upperCase(flowSchema.flowTag),
|
|
109
|
+
'source/'
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
const functionNameConfig = upperCase(functionName) + upperCase(shortNameHandler(handlerType));
|
|
113
|
+
const roleName = upperCase(flowSchema.flowTag);
|
|
114
|
+
const upperFunctionName = upperCase(functionName);
|
|
115
|
+
const upperHandlerType = upperCase(handlerType);
|
|
116
|
+
const upperFunctionNameConfig = upperCase(functionNameConfig);
|
|
117
|
+
const upperRoleName = upperCase(roleName);
|
|
118
|
+
const upperQueueName = upperCase(queueName);
|
|
119
|
+
const handlerPath = path.join(resourceLocation, `${functionName}_${upperHandlerType}.main`);
|
|
120
|
+
const handlerPathUpperFunctionName = path.join(resourceLocation, `${upperFunctionName}_${upperHandlerType}.main`);
|
|
105
121
|
return {
|
|
106
122
|
templatePath: templatePath,
|
|
107
123
|
templateData: {
|
|
108
|
-
resourceLocation
|
|
109
|
-
SOURCE_PATH.resourceLocationFlowSchema,
|
|
110
|
-
upperCase(flowSchema.flowTag),
|
|
111
|
-
'source/'
|
|
112
|
-
),
|
|
124
|
+
resourceLocation,
|
|
113
125
|
functionName,
|
|
114
126
|
handlerType,
|
|
115
127
|
additionalResourcePermission,
|
|
116
|
-
functionNameConfig
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
128
|
+
functionNameConfig,
|
|
129
|
+
roleName,
|
|
130
|
+
queueName,
|
|
131
|
+
upperFunctionName,
|
|
132
|
+
upperHandlerType,
|
|
133
|
+
upperFunctionNameConfig,
|
|
134
|
+
upperRoleName,
|
|
135
|
+
upperQueueName,
|
|
136
|
+
handlerPath,
|
|
137
|
+
handlerPathUpperFunctionName
|
|
120
138
|
},
|
|
121
139
|
setting: {
|
|
122
140
|
savePath: path.join(appPath, SOURCE_PATH.appYaml),
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
<%-
|
|
3
|
-
|
|
4
|
-
name: ${self:custom.iz_resourcePrefix}<%- firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handlerType) %>
|
|
1
|
+
<%- functionNameConfig %>:
|
|
2
|
+
handler: <%- handlerPathUpperFunctionName %>
|
|
3
|
+
name: ${self:custom.iz_resourcePrefix}<%- upperFunctionName %><%- upperHandlerType %>
|
|
5
4
|
role: <%- roleName %>Role
|
|
6
5
|
#<#<%- functionName %><%- handlerType %>FunctionSetting#>
|
|
7
6
|
#<#/<%- functionName %><%- handlerType %>FunctionSetting#>
|
|
@@ -13,9 +12,6 @@
|
|
|
13
12
|
- body: {"MessageAttributes":{"callingFlow":{"Value":["${self:custom.iz_resourcePrefix}<%- functionName %>"]}}} # functionName of callingFlow
|
|
14
13
|
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
15
14
|
|
|
16
|
-
<%_ function firstLetterUpperCase(text){
|
|
17
|
-
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
18
|
-
} _%>
|
|
19
15
|
<%_ function firstLetterLowerCase(str) {
|
|
20
16
|
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
21
17
|
} _%>
|
|
@@ -46,7 +46,9 @@ function createSourceParams(_izContext, flowSchema, appPath) {
|
|
|
46
46
|
templatePath: templatePath,
|
|
47
47
|
templateData: {
|
|
48
48
|
functionName,
|
|
49
|
-
queueName
|
|
49
|
+
queueName,
|
|
50
|
+
upperFunctionName: upperCase(functionName),
|
|
51
|
+
upperQueueName: upperCase(queueName)
|
|
50
52
|
},
|
|
51
53
|
setting: {
|
|
52
54
|
savePath:
|
|
@@ -46,7 +46,9 @@ function createSourceParams(_izContext, flowSchema, appPath) {
|
|
|
46
46
|
templatePath: templatePath,
|
|
47
47
|
templateData: {
|
|
48
48
|
functionName,
|
|
49
|
-
queueName
|
|
49
|
+
queueName,
|
|
50
|
+
upperFunctionName: upperCase(functionName),
|
|
51
|
+
upperQueueName: upperCase(queueName)
|
|
50
52
|
},
|
|
51
53
|
setting: {
|
|
52
54
|
savePath:
|
|
@@ -49,7 +49,9 @@ function createSourceParams(_izContext, flowSchema, appPath) {
|
|
|
49
49
|
templateData: {
|
|
50
50
|
functionName,
|
|
51
51
|
queueName,
|
|
52
|
-
flowTag: flowSchema.flowTag
|
|
52
|
+
flowTag: flowSchema.flowTag,
|
|
53
|
+
upperFunctionName: upperCase(functionName),
|
|
54
|
+
upperQueueName: upperCase(queueName)
|
|
53
55
|
},
|
|
54
56
|
setting: {
|
|
55
57
|
savePath:
|
package/src/generators/fromFlowSchema/statusTypes/triggerCache/triggerCacheQueue/template.ejs
CHANGED
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
Action: "SQS:SendMessage"
|
|
33
33
|
Queues:
|
|
34
34
|
- Ref: <%- resourceNameFromQueueName(queueName) %>
|
|
35
|
-
#<#<%-
|
|
36
|
-
#<#/<%-
|
|
35
|
+
#<#<%- queueName %>QueueSetting#>
|
|
36
|
+
#<#/<%- queueName %>QueueSetting#>
|
|
37
37
|
|
|
38
38
|
<% function resourceNameFromQueueName(queueName) {
|
|
39
39
|
if (queueName.includes("_")) {
|
|
@@ -41,9 +41,6 @@
|
|
|
41
41
|
}
|
|
42
42
|
return queueName
|
|
43
43
|
} %>
|
|
44
|
-
<%_ function firstLetterUpperCase(text){
|
|
45
|
-
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
46
|
-
} _%>
|
|
47
44
|
<%_ function firstLetterLowerCase(str) {
|
|
48
45
|
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
49
46
|
} _%>
|