@izara_project/izara-core-generate-service-code 1.0.46 → 1.0.47
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 +11 -7
- 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
package/src/generators/fromObjectSchema/relationship/update/complete/sns-in-sqs/template.ejs
CHANGED
|
@@ -34,13 +34,10 @@
|
|
|
34
34
|
Action: "SQS:SendMessage"
|
|
35
35
|
Queues:
|
|
36
36
|
- Ref: <%- queueName %>
|
|
37
|
-
#<#<%-
|
|
38
|
-
#<#/<%-
|
|
37
|
+
#<#<%- queueName %>QueueSetting#>
|
|
38
|
+
#<#/<%- queueName %>QueueSetting#>
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
<%_ function firstLetterUpperCase(text){
|
|
42
|
-
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
43
|
-
} _%>
|
|
44
41
|
<%_ function firstLetterLowerCase(str) {
|
|
45
42
|
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
46
43
|
} _%>
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
##--------- [Create Topic Out]
|
|
2
|
-
Out<%-
|
|
2
|
+
Out<%- queueName %>:
|
|
3
3
|
Type: AWS::SNS::Topic
|
|
4
4
|
Properties:
|
|
5
5
|
DisplayName: "SNS Message out"
|
|
6
|
-
TopicName: ${self:custom.iz_serviceTag}_${self:custom.iz_stage}_<%-
|
|
6
|
+
TopicName: ${self:custom.iz_serviceTag}_${self:custom.iz_stage}_<%- queueName %>_Out
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
10
|
-
} _%>
|
|
8
|
+
|
|
@@ -68,10 +68,10 @@ function createSourceSystemText(
|
|
|
68
68
|
serviceTag: getLocalConfig('iz_serviceTag')
|
|
69
69
|
};
|
|
70
70
|
const systemTextObjectSchemas = {
|
|
71
|
-
nameSpace: `${coreUtils.createObjTypeConcat(_izContext, objType, '
|
|
72
|
-
systemTextTag: `${fieldName}
|
|
73
|
-
openHook: `//(<${coreUtils.createObjTypeConcat(_izContext, objType, '
|
|
74
|
-
closeHook: `//(</${coreUtils.createObjTypeConcat(_izContext, objType, '
|
|
71
|
+
nameSpace: `${coreUtils.createObjTypeConcat(_izContext, objType, '_')}_description`, // for each objectType
|
|
72
|
+
systemTextTag: `${fieldName}_${coreUtils.createObjTypeConcat(_izContext, objType, '_')}`, // for each fieldName
|
|
73
|
+
openHook: `//(<${coreUtils.createObjTypeConcat(_izContext, objType, '_')}${fieldName}Hook>)`,
|
|
74
|
+
closeHook: `//(</${coreUtils.createObjTypeConcat(_izContext, objType, '_')}${fieldName}Hook>)`
|
|
75
75
|
};
|
|
76
76
|
createSourceArray.push(systemTextObjectSchemas);
|
|
77
77
|
}
|
|
@@ -85,10 +85,10 @@ function createSourceSystemText(
|
|
|
85
85
|
serviceTag: getLocalConfig('iz_serviceTag')
|
|
86
86
|
};
|
|
87
87
|
const systemTextFlowSchemas = {
|
|
88
|
-
nameSpace: `${coreUtils.createFlowTypeConcat(_izContext, flowType, '
|
|
89
|
-
systemTextTag: `
|
|
90
|
-
openHook: `//(<${coreUtils.createFlowTypeConcat(_izContext, flowType, '
|
|
91
|
-
closeHook: `//(</${coreUtils.createFlowTypeConcat(_izContext, flowType, '
|
|
88
|
+
nameSpace: `${coreUtils.createFlowTypeConcat(_izContext, flowType, '_')}`, // for each flowType
|
|
89
|
+
systemTextTag: `errors_${coreUtils.createFlowTypeConcat(_izContext, flowType, '_')}`,
|
|
90
|
+
openHook: `//(<${coreUtils.createFlowTypeConcat(_izContext, flowType, '_')}Hook>)`,
|
|
91
|
+
closeHook: `//(</${coreUtils.createFlowTypeConcat(_izContext, flowType, '_')}Hook>)`
|
|
92
92
|
};
|
|
93
93
|
createSourceArray.push(systemTextFlowSchemas);
|
|
94
94
|
}
|
|
@@ -105,10 +105,10 @@ function createSourceSystemText(
|
|
|
105
105
|
if (relSchema[relTag].hasOwnProperty('fieldNames') && Object.keys(relSchema[relTag].fieldNames).length > 0) {
|
|
106
106
|
for (const fieldName of Object.keys(relSchema[relTag].fieldNames)) {
|
|
107
107
|
const systemTextRelSchemas = {
|
|
108
|
-
nameSpace: `${coreUtils.createRelTypeConcat(_izContext, relType, '
|
|
109
|
-
systemTextTag: `${fieldName}_${coreUtils.createRelTypeConcat(_izContext, relType, '
|
|
110
|
-
openHook: `//(<${coreUtils.createRelTypeConcat(_izContext, relType, '
|
|
111
|
-
closeHook: `//(</${coreUtils.createRelTypeConcat(_izContext, relType, '
|
|
108
|
+
nameSpace: `${coreUtils.createRelTypeConcat(_izContext, relType, '_')}_description`,
|
|
109
|
+
systemTextTag: `${fieldName}_${coreUtils.createRelTypeConcat(_izContext, relType, '_')}`,
|
|
110
|
+
openHook: `//(<${coreUtils.createRelTypeConcat(_izContext, relType, '_')}${fieldName}Hook>)`,
|
|
111
|
+
closeHook: `//(</${coreUtils.createRelTypeConcat(_izContext, relType, '_')}${fieldName}Hook>)`
|
|
112
112
|
}
|
|
113
113
|
createSourceArray.push(systemTextRelSchemas);
|
|
114
114
|
}
|
|
@@ -119,7 +119,7 @@ function createSourceSystemText(
|
|
|
119
119
|
if (notificationSchemas.length > 0) {
|
|
120
120
|
for (const notification of notificationSchemas) {
|
|
121
121
|
const notificationSystemText = {
|
|
122
|
-
nameSpace: `
|
|
122
|
+
nameSpace: `sysNotification_${notification.notificationGrouping}`,
|
|
123
123
|
systemTextTag: notification.notificationTag,
|
|
124
124
|
openHook: `//(<${notification.notificationTag}Hook>)`,
|
|
125
125
|
closeHook: `//(</${notification.notificationTag}Hook>)`
|
|
@@ -38,7 +38,8 @@ async function data(_izContext, data, appPath) {
|
|
|
38
38
|
recieveType: data.recieveType,
|
|
39
39
|
flowTag: flowType ? flowType.flowTag : null,
|
|
40
40
|
serviceTag: flowType ? flowType.serviceTag : null,
|
|
41
|
-
functionName
|
|
41
|
+
functionName,
|
|
42
|
+
upperFunctionName: upperCase(functionName)
|
|
42
43
|
},
|
|
43
44
|
setting: {
|
|
44
45
|
savePath: path.join(
|
|
@@ -52,7 +53,7 @@ async function data(_izContext, data, appPath) {
|
|
|
52
53
|
fileExtension: '.js',
|
|
53
54
|
isAppend: false
|
|
54
55
|
}
|
|
55
|
-
}
|
|
56
|
+
};
|
|
56
57
|
}
|
|
57
58
|
|
|
58
59
|
export default data;
|
|
@@ -70,7 +70,9 @@ async function data(_izContext, data, appPath) {
|
|
|
70
70
|
resourceLocation: path.join(SOURCE_PATH.resourceLocationFlowSchema, `${data.flowTag}`, `${data.flowStepName}`, 'source/'),
|
|
71
71
|
handlerType: upperCase(handlerType),
|
|
72
72
|
lowerCase,
|
|
73
|
-
route: functionName
|
|
73
|
+
route: functionName,
|
|
74
|
+
upperFunctionNameConfig: upperCase(functionNameConfig),
|
|
75
|
+
upperRoleName: upperCase(roleName)
|
|
74
76
|
},
|
|
75
77
|
setting: {
|
|
76
78
|
savePath: path.join(appPath, SOURCE_PATH.appYaml),
|
|
@@ -70,7 +70,7 @@ export default async function <%- functionName %>(
|
|
|
70
70
|
|
|
71
71
|
const awaitingStepId = await asyncFlowSharedLib.createAwaitingStepId(
|
|
72
72
|
returnValue.parentFlowId,
|
|
73
|
-
"<%-
|
|
73
|
+
"<%- upperFlowStepName %>"
|
|
74
74
|
);
|
|
75
75
|
_izContext.logger.debug('awaitingStepId:', awaitingStepId);
|
|
76
76
|
|
|
@@ -121,6 +121,3 @@ export default async function <%- functionName %>(
|
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
<%_ function firstLetterUpperCase(text) {
|
|
125
|
-
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
126
|
-
} -%>
|
|
@@ -32,12 +32,9 @@
|
|
|
32
32
|
Action: "SQS:SendMessage"
|
|
33
33
|
Queues:
|
|
34
34
|
- Ref: <%- queueName %>HdrSqs
|
|
35
|
-
#<#<%-
|
|
36
|
-
#<#/<%-
|
|
35
|
+
#<#<%- queueName %>QueueSetting#>
|
|
36
|
+
#<#/<%- queueName %>QueueSetting#>
|
|
37
37
|
|
|
38
|
-
<%_ function firstLetterUpperCase(text){
|
|
39
|
-
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
40
|
-
} _%>
|
|
41
38
|
<%_ function firstLetterLowerCase(str) {
|
|
42
39
|
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
43
40
|
} _%>
|
|
@@ -34,16 +34,22 @@ function data(_izContext, data, appPath) {
|
|
|
34
34
|
upperCase(data.flowStepName) +
|
|
35
35
|
upperCase(data.handleLogic)
|
|
36
36
|
|
|
37
|
+
const upperQueueName = upperCase(queueName);
|
|
38
|
+
|
|
37
39
|
return {
|
|
38
40
|
templatePath: templatePathByHandler[data.handlerType],
|
|
39
|
-
templateData: {
|
|
41
|
+
templateData: {
|
|
42
|
+
...data,
|
|
43
|
+
queueName,
|
|
44
|
+
upperQueueName
|
|
45
|
+
},
|
|
40
46
|
setting: {
|
|
41
47
|
savePath: path.join(appPath, SOURCE_PATH.resourceYaml),
|
|
42
48
|
saveFileName: SAVE_FILE_NAME.snsInSqsYaml,
|
|
43
49
|
fileExtension: '.yml',
|
|
44
50
|
isAppend: true
|
|
45
51
|
}
|
|
46
|
-
}
|
|
52
|
+
};
|
|
47
53
|
}
|
|
48
54
|
|
|
49
55
|
|
|
@@ -47,12 +47,9 @@
|
|
|
47
47
|
Action: "SQS:SendMessage"
|
|
48
48
|
Queues:
|
|
49
49
|
- Ref: <%- queueName %>HdrSqs
|
|
50
|
-
#<#<%-
|
|
51
|
-
#<#/<%-
|
|
50
|
+
#<#<%- queueName %>QueueSetting#>
|
|
51
|
+
#<#/<%- queueName %>QueueSetting#>
|
|
52
52
|
|
|
53
|
-
<%_ function firstLetterUpperCase(text){
|
|
54
|
-
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
55
|
-
} _%>
|
|
56
53
|
<%_ function firstLetterLowerCase(str) {
|
|
57
54
|
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
58
55
|
} _%>
|
|
@@ -32,12 +32,9 @@
|
|
|
32
32
|
Action: "SQS:SendMessage"
|
|
33
33
|
Queues:
|
|
34
34
|
- Ref: <%- queueName %>HdrDsq
|
|
35
|
-
#<#<%-
|
|
36
|
-
#<#/<%-
|
|
35
|
+
#<#<%- queueName %>QueueSetting#>
|
|
36
|
+
#<#/<%- queueName %>QueueSetting#>
|
|
37
37
|
|
|
38
|
-
<%_ function firstLetterUpperCase(text){
|
|
39
|
-
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
40
|
-
} _%>
|
|
41
38
|
<%_ function firstLetterLowerCase(str) {
|
|
42
39
|
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
43
40
|
} _%>
|
package/src/generators/fromPlugIn/firstFlowStep/mainFunction/templateByConfig/awaitingSteps.ejs
CHANGED
|
@@ -5,7 +5,7 @@ allAwaitingStepsId.push(
|
|
|
5
5
|
{
|
|
6
6
|
awaitingStepId: asyncFlowSharedLib.createAwaitingStepId(
|
|
7
7
|
parentFlowId,
|
|
8
|
-
"<%-
|
|
8
|
+
"<%- upperFlowStepName %>"
|
|
9
9
|
)
|
|
10
10
|
}
|
|
11
11
|
)
|
|
@@ -28,7 +28,7 @@ await asyncFlowSharedLib.createAwaitingMultipleStepsWithAdditionalAttributes(
|
|
|
28
28
|
//(</createPendingStepIds>)
|
|
29
29
|
<% } %>
|
|
30
30
|
}),
|
|
31
|
-
"<%-
|
|
31
|
+
"<%- upperFlowTag %><%- upperFlowStepName %><%- upperHandleLogic %>"
|
|
32
32
|
)
|
|
33
33
|
);
|
|
34
34
|
|
|
@@ -47,7 +47,7 @@ await asyncFlowSharedLib.createAwaitingMultipleStepsWithAdditionalAttributes(
|
|
|
47
47
|
callingFlowConfig,
|
|
48
48
|
callingFlowSharedLib.createCallingFlowConfig(
|
|
49
49
|
//(<callingFlowProperties>)
|
|
50
|
-
await lambdaSharedLib.lambdaFunctionName(_izContext, "<%-
|
|
50
|
+
await lambdaSharedLib.lambdaFunctionName(_izContext, "<%- upperFlowTag %><%- upperFlowStepName %><%- upperHandleLogic %>"), {}
|
|
51
51
|
//(</callingFlowProperties>)
|
|
52
52
|
)
|
|
53
53
|
)
|
|
@@ -55,6 +55,3 @@ await asyncFlowSharedLib.createAwaitingMultipleStepsWithAdditionalAttributes(
|
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
<%_ function firstLetterUpperCase(text) {
|
|
59
|
-
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
60
|
-
} -%>
|
|
@@ -32,12 +32,9 @@
|
|
|
32
32
|
Action: "SQS:SendMessage"
|
|
33
33
|
Queues:
|
|
34
34
|
- Ref: <%- queueName %>HdrDsq
|
|
35
|
-
#<#<%-
|
|
36
|
-
#<#/<%-
|
|
35
|
+
#<#<%- queueName %>QueueSetting#>
|
|
36
|
+
#<#/<%- queueName %>QueueSetting#>
|
|
37
37
|
|
|
38
|
-
<%_ function firstLetterUpperCase(text){
|
|
39
|
-
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
40
|
-
} _%>
|
|
41
38
|
<%_ function firstLetterLowerCase(str) {
|
|
42
39
|
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
43
40
|
} _%>
|
|
@@ -32,12 +32,16 @@ const templatePathByHandler = {
|
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
async function data(_izContext, data, appPath) {
|
|
35
|
+
console.log('data queue,topic ', data)
|
|
35
36
|
if (data.eventFlow === 'extTopic') {
|
|
36
37
|
data.handlerType = 'queueNoTopic';
|
|
37
38
|
}
|
|
38
39
|
return {
|
|
39
40
|
templatePath: templatePathByHandler[data.handlerType],
|
|
40
|
-
templateData: {
|
|
41
|
+
templateData: {
|
|
42
|
+
...data,
|
|
43
|
+
queueNameUpper: upperCase(data.queueName || '')
|
|
44
|
+
},
|
|
41
45
|
setting: {
|
|
42
46
|
savePath: path.join(appPath, SOURCE_PATH.resourceYaml),
|
|
43
47
|
saveFileName: SAVE_FILE_NAME.snsInSqsYaml,
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
##===== [Create topic in]
|
|
2
|
-
In<%-
|
|
2
|
+
In<%- topicName %>:
|
|
3
3
|
Type: AWS::SNS::Topic
|
|
4
4
|
Properties:
|
|
5
5
|
DisplayName: "SNS Message in"
|
|
6
|
-
TopicName: ${self:custom.iz_serviceTag}_${self:custom.iz_stage}_<%-
|
|
6
|
+
TopicName: ${self:custom.iz_serviceTag}_${self:custom.iz_stage}_<%- topicName %>_In
|
|
7
7
|
##===== SNS Subscription [Topic In] =====##
|
|
8
|
-
SubscriptionIn<%-
|
|
8
|
+
SubscriptionIn<%- topicName %>:
|
|
9
9
|
Type: AWS::SNS::Subscription
|
|
10
10
|
Properties:
|
|
11
|
-
TopicArn: !Ref In<%-
|
|
12
|
-
Endpoint: "arn:aws:sqs:${self:custom.iz_region}:${self:custom.iz_accountId}:${self:custom.iz_resourcePrefix}<%- queueName %>
|
|
11
|
+
TopicArn: !Ref In<%- topicName %>
|
|
12
|
+
Endpoint: "arn:aws:sqs:${self:custom.iz_region}:${self:custom.iz_accountId}:${self:custom.iz_resourcePrefix}<%- queueName %>"
|
|
13
13
|
Protocol: "sqs"
|
|
14
14
|
##===== [Queue]
|
|
15
|
-
<%- queueName
|
|
15
|
+
<%- queueName %>:
|
|
16
16
|
Type: "AWS::SQS::Queue"
|
|
17
17
|
Properties:
|
|
18
|
-
QueueName: ${self:custom.iz_resourcePrefix}<%- queueName %>
|
|
18
|
+
QueueName: ${self:custom.iz_resourcePrefix}<%- queueName %>
|
|
19
19
|
RedrivePolicy:
|
|
20
20
|
deadLetterTargetArn:
|
|
21
21
|
# !GetAtt
|
|
22
22
|
Fn::GetAtt:
|
|
23
|
-
- <%- queueName %>
|
|
23
|
+
- <%- queueName %>DLQ
|
|
24
24
|
- Arn
|
|
25
25
|
maxReceiveCount: 3
|
|
26
26
|
VisibilityTimeout: 120
|
|
27
27
|
##==== [QueueDLQ]
|
|
28
|
-
<%- queueName %>
|
|
28
|
+
<%- queueName %>DLQ:
|
|
29
29
|
Type: AWS::SQS::Queue
|
|
30
30
|
Properties:
|
|
31
|
-
QueueName: ${self:custom.iz_resourcePrefix}<%- queueName %>
|
|
31
|
+
QueueName: ${self:custom.iz_resourcePrefix}<%- queueName %>DLQ
|
|
32
32
|
##==== [QueuePolicy]
|
|
33
|
-
<%- queueName %>
|
|
33
|
+
<%- queueName %>Policy:
|
|
34
34
|
Type: AWS::SQS::QueuePolicy
|
|
35
35
|
Properties:
|
|
36
36
|
PolicyDocument:
|
|
@@ -42,17 +42,14 @@
|
|
|
42
42
|
Resource:
|
|
43
43
|
# !GetAtt
|
|
44
44
|
Fn::GetAtt:
|
|
45
|
-
- <%- queueName %>
|
|
45
|
+
- <%- queueName %>
|
|
46
46
|
- Arn
|
|
47
47
|
Action: "SQS:SendMessage"
|
|
48
48
|
Queues:
|
|
49
|
-
- Ref: <%- queueName %>
|
|
50
|
-
#<#<%-
|
|
51
|
-
#<#/<%-
|
|
49
|
+
- Ref: <%- queueName %>
|
|
50
|
+
#<#<%- queueNameUpper %>QueueSetting#>
|
|
51
|
+
#<#/<%- queueNameUpper %>QueueSetting#>
|
|
52
52
|
|
|
53
|
-
<%_ function firstLetterUpperCase(text){
|
|
54
|
-
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
55
|
-
} _%>
|
|
56
53
|
<%_ function firstLetterLowerCase(str) {
|
|
57
54
|
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
58
55
|
} _%>
|
|
@@ -32,12 +32,9 @@
|
|
|
32
32
|
Action: "SQS:SendMessage"
|
|
33
33
|
Queues:
|
|
34
34
|
- Ref: <%- queueName %>
|
|
35
|
-
#<#<%-
|
|
36
|
-
#<#/<%-
|
|
35
|
+
#<#<%- queueName %>QueueSetting#>
|
|
36
|
+
#<#/<%- queueName %>QueueSetting#>
|
|
37
37
|
|
|
38
|
-
<%_ function firstLetterUpperCase(text){
|
|
39
|
-
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
40
|
-
} _%>
|
|
41
38
|
<%_ function firstLetterLowerCase(str) {
|
|
42
39
|
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
43
40
|
} _%>
|
|
@@ -32,14 +32,17 @@ async function data(_izContext, data, appPath) {
|
|
|
32
32
|
|
|
33
33
|
return {
|
|
34
34
|
templatePath: templatePath,
|
|
35
|
-
templateData: {
|
|
35
|
+
templateData: {
|
|
36
|
+
queueName,
|
|
37
|
+
upperQueueName: upperCase(queueName)
|
|
38
|
+
},
|
|
36
39
|
setting: {
|
|
37
40
|
savePath: path.join(appPath, SOURCE_PATH.resourceYaml),
|
|
38
41
|
saveFileName: SAVE_FILE_NAME.snsOutYaml,
|
|
39
42
|
fileExtension: '.yml',
|
|
40
43
|
isAppend: true
|
|
41
44
|
}
|
|
42
|
-
}
|
|
45
|
+
};
|
|
43
46
|
}
|
|
44
47
|
|
|
45
48
|
export default data;
|
|
@@ -112,7 +112,9 @@ async function generatePlunIg(
|
|
|
112
112
|
flowStepConfig,
|
|
113
113
|
additionalResourcePermission,
|
|
114
114
|
resourceApis,
|
|
115
|
-
serviceTag
|
|
115
|
+
serviceTag,
|
|
116
|
+
flowSchema.event
|
|
117
|
+
);
|
|
116
118
|
|
|
117
119
|
Object.assign(data, {
|
|
118
120
|
handlerType: data.handlerType,
|
|
@@ -132,6 +134,7 @@ async function generatePlunIg(
|
|
|
132
134
|
upperCase(flowStepName) +
|
|
133
135
|
upperCase(data.handlerType)),
|
|
134
136
|
queueName: upperCase(flowSchema.flowTag) + upperCase(flowStepName) + upperCase(data.handlerType),
|
|
137
|
+
topicName: upperCase(flowSchema.flowTag) + upperCase(flowStepName)
|
|
135
138
|
});
|
|
136
139
|
|
|
137
140
|
|
|
@@ -377,11 +380,12 @@ async function buildRecievePluginHookResource(_izContext, data, appPath, allObjS
|
|
|
377
380
|
}
|
|
378
381
|
|
|
379
382
|
// Extracted from the original if/else chain — mutates data, additionalResourcePermission, resourceApis in place
|
|
380
|
-
function resolveHandlerConfig(data, flowStepConfig, additionalResourcePermission, resourceApis, serviceTag) {
|
|
383
|
+
function resolveHandlerConfig(data, flowStepConfig, additionalResourcePermission, resourceApis, serviceTag, fallbackEvent = []) {
|
|
381
384
|
const { flowTag, flowStepName } = data;
|
|
382
385
|
let handler;
|
|
386
|
+
const events = flowStepConfig.event || fallbackEvent || [];
|
|
383
387
|
|
|
384
|
-
if (
|
|
388
|
+
if (events.includes("ownTopic")) {
|
|
385
389
|
data.eventFlow = 'ownTopic';
|
|
386
390
|
handler = HANDLER.hdrSqs;
|
|
387
391
|
additionalResourcePermission.push(
|
|
@@ -396,7 +400,7 @@ function resolveHandlerConfig(data, flowStepConfig, additionalResourcePermission
|
|
|
396
400
|
upperCase(handler) + "DLQ",
|
|
397
401
|
])
|
|
398
402
|
);
|
|
399
|
-
} else if (
|
|
403
|
+
} else if (events.includes("extTopic")) {
|
|
400
404
|
data.eventFlow = 'extTopic';
|
|
401
405
|
handler = HANDLER.hdrSqs;
|
|
402
406
|
additionalResourcePermission.push(
|
|
@@ -409,9 +413,9 @@ function resolveHandlerConfig(data, flowStepConfig, additionalResourcePermission
|
|
|
409
413
|
upperCase(handler) + "DLQ",
|
|
410
414
|
])
|
|
411
415
|
);
|
|
412
|
-
} else if (
|
|
416
|
+
} else if (events.includes("lambdaSyncInv")) {
|
|
413
417
|
handler = HANDLER.hdrInv;
|
|
414
|
-
} else if (
|
|
418
|
+
} else if (events.includes("lambdaSyncApi")) {
|
|
415
419
|
handler = HANDLER.hdrApi;
|
|
416
420
|
resourceApis.push({
|
|
417
421
|
path: `${serviceTag}/${lowerCase(flowTag)}${lowerCase(flowStepName)}`,
|
|
@@ -420,7 +424,7 @@ function resolveHandlerConfig(data, flowStepConfig, additionalResourcePermission
|
|
|
420
424
|
hookTagApp: `${upperCase(flowStepName)}${upperCase(handler)}AppLevelAuthorizer`,
|
|
421
425
|
hookTagUser: `${upperCase(flowStepName)}${upperCase(handler)}UserLevelAuthorizer`,
|
|
422
426
|
});
|
|
423
|
-
} else if (
|
|
427
|
+
} else if (events.includes("queue")) {
|
|
424
428
|
handler = HANDLER.hdrDsq;
|
|
425
429
|
additionalResourcePermission.push(
|
|
426
430
|
createSqsResource([
|
|
@@ -19,11 +19,5 @@
|
|
|
19
19
|
KeyType: RANGE
|
|
20
20
|
<%_ } -%>
|
|
21
21
|
<%_ }) _%>
|
|
22
|
-
#<#<%-
|
|
23
|
-
#<#/<%-
|
|
24
|
-
<%_ function firstLetterUpperCase(text){
|
|
25
|
-
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
26
|
-
} _%>
|
|
27
|
-
<%_ function firstLetterLowerCase(str) {
|
|
28
|
-
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
29
|
-
} _%>
|
|
22
|
+
#<#<%- tableName %>DynamoDbSetting#>
|
|
23
|
+
#<#/<%- tableName %>DynamoDbSetting#>
|
|
@@ -48,12 +48,9 @@
|
|
|
48
48
|
Action: "SQS:SendMessage"
|
|
49
49
|
Queues:
|
|
50
50
|
- Ref: <%- queueName %>HdrSqs
|
|
51
|
-
#<#<%-
|
|
52
|
-
#<#/<%-
|
|
51
|
+
#<#<%- queueName %>QueueSetting#>
|
|
52
|
+
#<#/<%- queueName %>QueueSetting#>
|
|
53
53
|
|
|
54
|
-
<%_ function firstLetterUpperCase(text){
|
|
55
|
-
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
56
|
-
} _%>
|
|
57
54
|
<%_ function firstLetterLowerCase(str) {
|
|
58
55
|
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
59
56
|
} _%>
|
|
@@ -32,12 +32,9 @@
|
|
|
32
32
|
Action: "SQS:SendMessage"
|
|
33
33
|
Queues:
|
|
34
34
|
- Ref: <%- queueName %>
|
|
35
|
-
#<#<%-
|
|
36
|
-
#<#/<%-
|
|
35
|
+
#<#<%- queueName %>QueueSetting#>
|
|
36
|
+
#<#/<%- queueName %>QueueSetting#>
|
|
37
37
|
|
|
38
|
-
<%_ function firstLetterUpperCase(text){
|
|
39
|
-
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
40
|
-
} _%>
|
|
41
38
|
<%_ function firstLetterLowerCase(str) {
|
|
42
39
|
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
43
40
|
} _%>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# for createIamRole
|
|
2
2
|
|
|
3
3
|
<% functionNameConfigs.forEach(functionNameConfig => { _%>
|
|
4
|
-
- ${self:custom.iz_prefixIamRole}<%-
|
|
4
|
+
- ${self:custom.iz_prefixIamRole}<%- functionNameConfig %>${self:custom.iz_suffixIamRole}
|
|
5
5
|
<% }) _%>
|
|
6
6
|
|
|
7
7
|
# for createIntTest
|
|
8
8
|
<% functionNameConfigs.forEach(functionNameConfig => { _%>
|
|
9
|
-
"<%-
|
|
9
|
+
"<%- functionNameConfig %>",
|
|
10
10
|
<% }) _%>
|
|
11
11
|
|
|
12
12
|
<%_function firstLetterUpperCase(text) {
|
|
@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
20
20
|
export function generatedIntTestRoleNameConfig () {
|
|
21
21
|
let roleNameConfigIntTest = [
|
|
22
22
|
<% roleNameConfigs.forEach(roleNameConfig => { _%>
|
|
23
|
-
"<%-
|
|
23
|
+
"<%- roleNameConfig %>",
|
|
24
24
|
<% }) _%>
|
|
25
25
|
]
|
|
26
26
|
return roleNameConfigIntTest
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# for createIamRole
|
|
2
2
|
|
|
3
3
|
<% roleNameConfigs.forEach(roleNameConfig => { _%>
|
|
4
|
-
- arn:aws:iam::${self:custom.iz_accountId}:role/${self:custom.iz_resourcePrefix}<%-
|
|
4
|
+
- arn:aws:iam::${self:custom.iz_accountId}:role/${self:custom.iz_resourcePrefix}<%- roleNameConfig %>
|
|
5
5
|
<% }) _%>
|
|
6
6
|
|
|
7
7
|
|
|
@@ -17,6 +17,8 @@ import { fileURLToPath } from 'url';
|
|
|
17
17
|
const __filename = fileURLToPath(import.meta.url);
|
|
18
18
|
const __dirname = path.dirname(__filename);
|
|
19
19
|
import consts from '#libs/Consts.js';
|
|
20
|
+
import utils from '#libs/Utils.js';
|
|
21
|
+
const { firstLetterUpperCase: upperCase } = utils;
|
|
20
22
|
const { SOURCE_PATH, SAVE_FILE_NAME } = consts;
|
|
21
23
|
|
|
22
24
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
@@ -80,7 +82,11 @@ function generateRole(_izContext, createSourceParams, appPath) {
|
|
|
80
82
|
for (const [roleName, roleData] of Object.entries(reformCreateSourceParams)) {
|
|
81
83
|
createSourceRole.add({
|
|
82
84
|
templatePath: templatePath,
|
|
83
|
-
templateData: {
|
|
85
|
+
templateData: {
|
|
86
|
+
roleName,
|
|
87
|
+
roleData,
|
|
88
|
+
upperRoleName: upperCase(roleName)
|
|
89
|
+
},
|
|
84
90
|
setting: {
|
|
85
91
|
initialData: 'Resources:\n',
|
|
86
92
|
savePath: path.join(appPath, SOURCE_PATH.appYaml),
|
package/src/libs/Utils.js
CHANGED
|
@@ -25,11 +25,13 @@ import consts from '#libs/Consts.js';
|
|
|
25
25
|
const { SOURCE_PATH } = consts;
|
|
26
26
|
|
|
27
27
|
function firstLetterUpperCase(text) {
|
|
28
|
+
if (!text) return text;
|
|
28
29
|
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
29
30
|
}
|
|
30
31
|
|
|
31
|
-
function firstLetterLowerCase(
|
|
32
|
-
|
|
32
|
+
function firstLetterLowerCase(text) {
|
|
33
|
+
if (!text) return text;
|
|
34
|
+
return text.charAt(0).toLowerCase() + text.slice(1);
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
function checkOverWriteGenerateMainFunction(objectSchema, action) {
|