@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
package/src/generators/fromFlowSchema/events/s3/upload/createObjectComplete/functionYaml/yaml.js
CHANGED
|
@@ -94,21 +94,38 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
94
94
|
)
|
|
95
95
|
);
|
|
96
96
|
|
|
97
|
+
const resourceLocation = path.join(
|
|
98
|
+
SOURCE_PATH.resourceLocationWebSocket,
|
|
99
|
+
flowSchema.flowTag,
|
|
100
|
+
'source/'
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
const functionNameConfig = upperCase(SHORT_FUNCTION_NAME(FUNCTION_NAME.createObjectS3Complete)) +
|
|
104
|
+
upperCase(shortNameHandler(handlerType));
|
|
105
|
+
|
|
106
|
+
const roleName = SOURCE_GENERATE_IAM_ROLE.FlowSchemaUploadS3Role;
|
|
107
|
+
const upperFunctionName = upperCase(functionName);
|
|
108
|
+
const upperHandlerType = upperCase(handlerType);
|
|
109
|
+
const upperFunctionNameConfig = upperCase(functionNameConfig);
|
|
110
|
+
const upperRoleName = upperCase(roleName);
|
|
111
|
+
const handlerPath = path.join(resourceLocation, `${functionName}_${upperHandlerType}.main`);
|
|
112
|
+
const handlerPathUpperFunctionName = path.join(resourceLocation, `${upperFunctionName}_${upperHandlerType}.main`);
|
|
113
|
+
|
|
97
114
|
return {
|
|
98
115
|
templatePath: templatePath,
|
|
99
116
|
templateData: {
|
|
100
|
-
resourceLocation
|
|
101
|
-
SOURCE_PATH.resourceLocationWebSocket,
|
|
102
|
-
flowSchema.flowTag,
|
|
103
|
-
'source/'
|
|
104
|
-
),
|
|
117
|
+
resourceLocation,
|
|
105
118
|
functionName: functionName,
|
|
106
119
|
handlerType: handlerType,
|
|
107
120
|
additionalResourcePermission: additionalResourcePermission,
|
|
108
|
-
functionNameConfig
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
121
|
+
functionNameConfig,
|
|
122
|
+
roleName,
|
|
123
|
+
upperFunctionName,
|
|
124
|
+
upperHandlerType,
|
|
125
|
+
upperFunctionNameConfig,
|
|
126
|
+
upperRoleName,
|
|
127
|
+
handlerPath,
|
|
128
|
+
handlerPathUpperFunctionName
|
|
112
129
|
},
|
|
113
130
|
setting: {
|
|
114
131
|
savePath: path.join(srcPath, SOURCE_PATH.appYaml),
|
package/src/generators/fromFlowSchema/events/s3/upload/createObjectComplete/handler/handler.js
CHANGED
|
@@ -47,7 +47,9 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
47
47
|
templatePath: templatePath,
|
|
48
48
|
templateData: {
|
|
49
49
|
functionName,
|
|
50
|
-
handlerType
|
|
50
|
+
handlerType,
|
|
51
|
+
upperFunctionName: upperCase(functionName),
|
|
52
|
+
upperHandlerType: upperCase(handlerType)
|
|
51
53
|
},
|
|
52
54
|
setting: {
|
|
53
55
|
savePath: path.join(
|
package/src/generators/fromFlowSchema/events/s3/upload/createObjectComplete/sns-sqs/template.ejs
CHANGED
|
@@ -38,12 +38,9 @@
|
|
|
38
38
|
Action: "SQS:SendMessage"
|
|
39
39
|
Queues:
|
|
40
40
|
- Ref: <%- queueName %>
|
|
41
|
-
#<#<%-
|
|
42
|
-
#<#/<%-
|
|
41
|
+
#<#<%- queueName %>QueueSetting#>
|
|
42
|
+
#<#/<%- queueName %>QueueSetting#>
|
|
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
|
} _%>
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
<%-
|
|
3
|
-
|
|
4
|
-
name: ${self:custom.iz_resourcePrefix}<%- functionName %><%- firstLetterUpperCase(handlerType) %>
|
|
1
|
+
<%- functionNameConfig %>:
|
|
2
|
+
handler: <%- handlerPath %>
|
|
3
|
+
name: ${self:custom.iz_resourcePrefix}<%- functionName %><%- upperHandlerType %>
|
|
5
4
|
role: <%- roleName %>Role
|
|
6
5
|
#<#<%- functionName %><%- handlerType %>FunctionSetting#>
|
|
7
6
|
#<#/<%- functionName %><%- handlerType %>FunctionSetting#>
|
|
8
7
|
events:
|
|
9
8
|
- sqs:
|
|
10
|
-
arn: arn:aws:sqs:${self:custom.iz_region}:${self:custom.iz_accountId}:${self:custom.iz_resourcePrefix}<%- functionName %><%-
|
|
9
|
+
arn: arn:aws:sqs:${self:custom.iz_region}:${self:custom.iz_accountId}:${self:custom.iz_resourcePrefix}<%- functionName %><%- upperHandlerType %>
|
|
11
10
|
batchSize: 10
|
|
12
11
|
filterPatterns: #**** need to update serverless framework upper v.2.69.1
|
|
13
|
-
- body: {"MessageAttributes":{"callingFlow":{"Value":["${self:custom.iz_resourcePrefix}<%-
|
|
12
|
+
- body: {"MessageAttributes":{"callingFlow":{"Value":["${self:custom.iz_resourcePrefix}<%- upperFunctionName %><%- upperHandlerType %>"]}}} # 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
|
-
} _%>
|
|
@@ -111,21 +111,39 @@ function createSourceParams(_izContext, flowSchema, appPath) {
|
|
|
111
111
|
)
|
|
112
112
|
);
|
|
113
113
|
|
|
114
|
+
functionNameConfig = functionName + upperCase(handlerType);
|
|
115
|
+
|
|
116
|
+
const resourceLocation = path.join(
|
|
117
|
+
SOURCE_PATH.resourceLocationWebSocket,
|
|
118
|
+
flowSchema.flowTag,
|
|
119
|
+
'source/'
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
functionNameConfig = functionName + upperCase(shortNameHandler(handlerType));
|
|
123
|
+
const roleName = SOURCE_GENERATE_IAM_ROLE.FlowSchemaUploadS3Role;
|
|
124
|
+
const upperFunctionName = upperCase(functionName);
|
|
125
|
+
const upperHandlerType = upperCase(handlerType);
|
|
126
|
+
const upperFunctionNameConfig = upperCase(functionNameConfig);
|
|
127
|
+
const upperRoleName = upperCase(roleName);
|
|
128
|
+
const handlerPath = path.join(resourceLocation, `${functionName}_${upperHandlerType}.main`);
|
|
129
|
+
const handlerPathUpperFunctionName = path.join(resourceLocation, `${upperFunctionName}_${upperHandlerType}.main`);
|
|
130
|
+
|
|
114
131
|
return {
|
|
115
132
|
templatePath: templatePath,
|
|
116
133
|
templateData: {
|
|
117
134
|
functionName,
|
|
118
135
|
handlerType,
|
|
119
|
-
functionNameConfig
|
|
120
|
-
resourceLocation
|
|
121
|
-
SOURCE_PATH.resourceLocationWebSocket,
|
|
122
|
-
flowSchema.flowTag,
|
|
123
|
-
'source/'
|
|
124
|
-
),
|
|
136
|
+
functionNameConfig,
|
|
137
|
+
resourceLocation,
|
|
125
138
|
additionalResourcePermission,
|
|
126
|
-
functionNameConfig
|
|
127
|
-
|
|
128
|
-
|
|
139
|
+
functionNameConfig,
|
|
140
|
+
roleName,
|
|
141
|
+
upperFunctionName,
|
|
142
|
+
upperHandlerType,
|
|
143
|
+
upperFunctionNameConfig,
|
|
144
|
+
upperRoleName,
|
|
145
|
+
handlerPath,
|
|
146
|
+
handlerPathUpperFunctionName
|
|
129
147
|
},
|
|
130
148
|
setting: {
|
|
131
149
|
saveFileName: SAVE_FILE_NAME.flowSchemaYaml,
|
|
@@ -44,7 +44,9 @@ function createSourceParams(_izContext, flowSchema, appPath) {
|
|
|
44
44
|
templatePath: templatePath,
|
|
45
45
|
templateData: {
|
|
46
46
|
functionName,
|
|
47
|
-
handlerType
|
|
47
|
+
handlerType,
|
|
48
|
+
upperFunctionName: upperCase(functionName),
|
|
49
|
+
upperHandlerType: upperCase(handlerType)
|
|
48
50
|
},
|
|
49
51
|
setting: {
|
|
50
52
|
saveFileName: `${functionName}_${handlerType}`,
|
|
@@ -34,12 +34,9 @@
|
|
|
34
34
|
Action: "SQS:SendMessage"
|
|
35
35
|
Queues:
|
|
36
36
|
- Ref: <%- queueName %>HdrSqs
|
|
37
|
-
#<#<%-
|
|
38
|
-
#<#/<%-
|
|
37
|
+
#<#<%- queueName %>QueueSetting#>
|
|
38
|
+
#<#/<%- queueName %>QueueSetting#>
|
|
39
39
|
|
|
40
|
-
<%_ function firstLetterUpperCase(text){
|
|
41
|
-
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
42
|
-
} _%>
|
|
43
40
|
<%_ function firstLetterLowerCase(str) {
|
|
44
41
|
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
45
42
|
} _%>
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
<%-
|
|
3
|
-
|
|
4
|
-
name: ${self:custom.iz_resourcePrefix}<%- functionName %><%- firstLetterUpperCase(handlerType) %>
|
|
1
|
+
<%- functionNameConfig %>:
|
|
2
|
+
handler: <%- handlerPath %>
|
|
3
|
+
name: ${self:custom.iz_resourcePrefix}<%- functionName %><%- upperHandlerType %>
|
|
5
4
|
role: <%- roleName %>Role
|
|
6
5
|
#<#<%- functionName %><%- handlerType %>FunctionSetting#>
|
|
7
6
|
#<#/<%- functionName %><%- handlerType %>FunctionSetting#>
|
|
8
7
|
events:
|
|
9
8
|
- sqs:
|
|
10
|
-
arn: arn:aws:sqs:${self:custom.iz_region}:${self:custom.iz_accountId}:${self:custom.iz_resourcePrefix}<%- functionName %><%-
|
|
9
|
+
arn: arn:aws:sqs:${self:custom.iz_region}:${self:custom.iz_accountId}:${self:custom.iz_resourcePrefix}<%- functionName %><%- upperHandlerType %>
|
|
11
10
|
batchSize: 10
|
|
12
|
-
<%_ function firstLetterUpperCase(text){
|
|
13
|
-
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
14
|
-
} _%>
|
package/src/generators/fromFlowSchema/events/s3/upload/preSignUrl/reservedLimit/functionYaml/yaml.js
CHANGED
|
@@ -118,21 +118,39 @@ async function createSourceParams(_izContext, flowSchema, appPath) {
|
|
|
118
118
|
)
|
|
119
119
|
);
|
|
120
120
|
|
|
121
|
+
functionNameConfig = functionName + upperCase(handlerType);
|
|
122
|
+
|
|
123
|
+
const resourceLocation = path.join(
|
|
124
|
+
SOURCE_PATH.resourceLocationWebSocket,
|
|
125
|
+
flowSchema.flowTag,
|
|
126
|
+
'/source/'
|
|
127
|
+
);
|
|
128
|
+
|
|
129
|
+
functionNameConfig = upperCase(functionName) + upperCase(shortNameHandler(handlerType));
|
|
130
|
+
const roleName = SOURCE_GENERATE_IAM_ROLE.FlowSchemaUploadS3Role;
|
|
131
|
+
const upperFunctionName = upperCase(functionName);
|
|
132
|
+
const upperHandlerType = upperCase(handlerType);
|
|
133
|
+
const upperFunctionNameConfig = upperCase(functionNameConfig);
|
|
134
|
+
const upperRoleName = upperCase(roleName);
|
|
135
|
+
const handlerPath = path.join(resourceLocation, `${functionName}_${upperHandlerType}.main`);
|
|
136
|
+
const handlerPathUpperFunctionName = path.join(resourceLocation, `${upperFunctionName}_${upperHandlerType}.main`);
|
|
137
|
+
|
|
121
138
|
return {
|
|
122
139
|
templatePath: templatePath,
|
|
123
140
|
templateData: {
|
|
124
141
|
functionName,
|
|
125
142
|
handlerType,
|
|
126
|
-
functionNameConfig
|
|
127
|
-
resourceLocation
|
|
128
|
-
SOURCE_PATH.resourceLocationWebSocket,
|
|
129
|
-
flowSchema.flowTag,
|
|
130
|
-
'/source/'
|
|
131
|
-
),
|
|
143
|
+
functionNameConfig,
|
|
144
|
+
resourceLocation,
|
|
132
145
|
additionalResourcePermission,
|
|
133
|
-
functionNameConfig
|
|
134
|
-
|
|
135
|
-
|
|
146
|
+
functionNameConfig,
|
|
147
|
+
roleName,
|
|
148
|
+
upperFunctionName,
|
|
149
|
+
upperHandlerType,
|
|
150
|
+
upperFunctionNameConfig,
|
|
151
|
+
upperRoleName,
|
|
152
|
+
handlerPath,
|
|
153
|
+
handlerPathUpperFunctionName
|
|
136
154
|
},
|
|
137
155
|
setting: {
|
|
138
156
|
saveFileName: SAVE_FILE_NAME.flowSchemaYaml,
|
package/src/generators/fromFlowSchema/events/s3/upload/preSignUrl/reservedLimit/handler/handler.js
CHANGED
|
@@ -45,7 +45,9 @@ function createSourceParams(_izContext, flowSchema, appPath) {
|
|
|
45
45
|
templatePath: templatePath,
|
|
46
46
|
templateData: {
|
|
47
47
|
functionName,
|
|
48
|
-
handlerType
|
|
48
|
+
handlerType,
|
|
49
|
+
upperFunctionName: upperCase(functionName),
|
|
50
|
+
upperHandlerType: upperCase(handlerType)
|
|
49
51
|
},
|
|
50
52
|
setting: {
|
|
51
53
|
saveFileName: `${functionName}_${handlerType}`,
|
package/src/generators/fromFlowSchema/events/s3/upload/preSignUrl/reservedLimit/sqs/template.ejs
CHANGED
|
@@ -41,13 +41,10 @@
|
|
|
41
41
|
Action: "SQS:SendMessage"
|
|
42
42
|
Queues:
|
|
43
43
|
- Ref: <%- queueName %>
|
|
44
|
-
#<#<%-
|
|
45
|
-
#<#/<%-
|
|
44
|
+
#<#<%- queueName %>QueueSetting#>
|
|
45
|
+
#<#/<%- queueName %>QueueSetting#>
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
50
|
-
} _%>
|
|
51
|
-
<%_ function firstLetterLowerCase(str) {
|
|
48
|
+
<%_ function firstLetterLowerCase(str) {
|
|
52
49
|
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
53
50
|
} _%>
|
package/src/generators/fromFlowSchema/events/s3/upload/processFile/functionYml/HdrS3/template.ejs
CHANGED
|
@@ -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#>
|
|
@@ -17,9 +16,6 @@
|
|
|
17
16
|
- suffix: .csv
|
|
18
17
|
forceDeploy: true
|
|
19
18
|
|
|
20
|
-
<%_ function firstLetterUpperCase(text){
|
|
21
|
-
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
22
|
-
} _%>
|
|
23
19
|
<%_ function firstLetterLowerCase(str) {
|
|
24
20
|
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
25
21
|
} _%>
|
package/src/generators/fromFlowSchema/events/s3/upload/processFile/functionYml/HdrS3/yaml.js
CHANGED
|
@@ -112,21 +112,37 @@ function createSourceParam(_izContext, flowSchema, appPath) {
|
|
|
112
112
|
[resourceNames(RESOURCE_CLASSES.dynamoDbTable, 'ReservedDataMain')]
|
|
113
113
|
)
|
|
114
114
|
);
|
|
115
|
+
|
|
116
|
+
const resourceLocation = path.join(
|
|
117
|
+
SOURCE_PATH.resourceLocationWebSocket,
|
|
118
|
+
flowSchema.flowTag,
|
|
119
|
+
'source/'
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
const functionNameConfig = upperCase(functionName) + upperCase(shortNameHandler(handlerType));
|
|
123
|
+
const roleName = SOURCE_GENERATE_IAM_ROLE.FlowSchemaUploadS3Role;
|
|
124
|
+
const upperFunctionName = upperCase(functionName);
|
|
125
|
+
const upperHandlerType = upperCase(handlerType);
|
|
126
|
+
const upperFunctionNameConfig = upperCase(functionNameConfig);
|
|
127
|
+
const upperRoleName = upperCase(roleName);
|
|
128
|
+
const handlerPath = path.join(resourceLocation, `${functionName}_${upperHandlerType}.main`);
|
|
129
|
+
const handlerPathUpperFunctionName = path.join(resourceLocation, `${upperFunctionName}_${upperHandlerType}.main`);
|
|
115
130
|
return {
|
|
116
131
|
templatePath: templatePath,
|
|
117
132
|
templateData: {
|
|
118
133
|
functionName,
|
|
119
134
|
handlerType,
|
|
120
135
|
additionalResourcePermission,
|
|
121
|
-
resourceLocation
|
|
122
|
-
SOURCE_PATH.resourceLocationWebSocket,
|
|
123
|
-
flowSchema.flowTag,
|
|
124
|
-
'source/'
|
|
125
|
-
),
|
|
136
|
+
resourceLocation,
|
|
126
137
|
bucketName,
|
|
127
|
-
functionNameConfig
|
|
128
|
-
|
|
129
|
-
|
|
138
|
+
functionNameConfig,
|
|
139
|
+
roleName,
|
|
140
|
+
upperFunctionName,
|
|
141
|
+
upperHandlerType,
|
|
142
|
+
upperFunctionNameConfig,
|
|
143
|
+
upperRoleName,
|
|
144
|
+
handlerPath,
|
|
145
|
+
handlerPathUpperFunctionName
|
|
130
146
|
},
|
|
131
147
|
setting: {
|
|
132
148
|
savePath: path.join(appPath, SOURCE_PATH.appYaml),
|
|
@@ -48,12 +48,9 @@
|
|
|
48
48
|
Action: "SQS:SendMessage"
|
|
49
49
|
Queues:
|
|
50
50
|
- Ref: <%- queueName %>
|
|
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
|
} _%>
|
|
@@ -103,7 +103,9 @@ async function createParamsForCreateSource(_izContext, flowSchema, appPath) {
|
|
|
103
103
|
tableName,
|
|
104
104
|
flowSchemaComplete,
|
|
105
105
|
triggerType,
|
|
106
|
-
queueName: `${createFlowTypeConcat(_izContext, { serviceTag: getLocalConfig('iz_serviceTag'), flowTag: upperCase(flowSchema.flowTag) })}_Main
|
|
106
|
+
queueName: `${createFlowTypeConcat(_izContext, { serviceTag: getLocalConfig('iz_serviceTag'), flowTag: upperCase(flowSchema.flowTag) })}_Main`,
|
|
107
|
+
upperFunctionName: upperCase(functionName),
|
|
108
|
+
upperTableName: upperCase(tableName)
|
|
107
109
|
},
|
|
108
110
|
setting: {
|
|
109
111
|
savePath: path.join(
|
|
@@ -48,12 +48,9 @@
|
|
|
48
48
|
Action: "SQS:SendMessage"
|
|
49
49
|
Queues:
|
|
50
50
|
- Ref: <%- resourceName %>
|
|
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
|
} _%>
|
|
@@ -121,7 +121,9 @@ function buildFirstPluginHookResources(
|
|
|
121
121
|
flowTag,
|
|
122
122
|
flowStepName,
|
|
123
123
|
flowStepIndex: firstIndex,
|
|
124
|
-
queueNameDsq: `${upperCase(flowTag)}${upperCase(flowStepName)}${currentIndex}HdrDsq
|
|
124
|
+
queueNameDsq: `${upperCase(flowTag)}${upperCase(flowStepName)}${currentIndex}HdrDsq`,
|
|
125
|
+
upperFlowTag: upperCase(flowTag),
|
|
126
|
+
upperFlowStepName: upperCase(flowStepName)
|
|
125
127
|
},
|
|
126
128
|
setting: {
|
|
127
129
|
savePath: flowSchemaSourcePath,
|
|
@@ -256,7 +258,9 @@ function buildAfterPluginHookResources(
|
|
|
256
258
|
flowTag,
|
|
257
259
|
flowStepName,
|
|
258
260
|
flowStepIndex: currentIndex - 1,
|
|
259
|
-
plugHookTag: pluginHook.plugInHookTag
|
|
261
|
+
plugHookTag: pluginHook.plugInHookTag,
|
|
262
|
+
upperFlowTag: upperCase(flowTag),
|
|
263
|
+
upperFlowStepName: upperCase(flowStepName)
|
|
260
264
|
},
|
|
261
265
|
setting: {
|
|
262
266
|
savePath: flowSchemaSourcePath,
|
|
@@ -275,6 +279,7 @@ function buildAfterPluginHookResources(
|
|
|
275
279
|
'source/',
|
|
276
280
|
`${upperCase(flowStepName)}_${currentIndex}_HdrSqs`
|
|
277
281
|
),
|
|
282
|
+
|
|
278
283
|
handlerFilePathDsq: path.join(
|
|
279
284
|
SOURCE_PATH.resourceLocationFlowSchema,
|
|
280
285
|
upperCase(flowTag),
|
|
@@ -282,21 +287,27 @@ function buildAfterPluginHookResources(
|
|
|
282
287
|
'source/',
|
|
283
288
|
`${upperCase(flowStepName)}_${currentIndex}_HdrDsq`
|
|
284
289
|
),
|
|
290
|
+
|
|
285
291
|
functionNameConfigSqs:
|
|
286
292
|
upperCase(flowStepName) +
|
|
287
293
|
currentIndex +
|
|
288
294
|
upperCase(shortNameHandler(upperCase(HANDLER.hdrSqs))),
|
|
295
|
+
|
|
289
296
|
functionNameConfigDsq:
|
|
290
297
|
upperCase(flowStepName) +
|
|
291
298
|
currentIndex +
|
|
292
299
|
upperCase(shortNameHandler(upperCase(HANDLER.hdrDsq))),
|
|
300
|
+
|
|
293
301
|
functionNameSqs:
|
|
294
302
|
upperCase(flowStepName) + currentIndex + upperCase(HANDLER.hdrSqs),
|
|
303
|
+
|
|
295
304
|
functionNameDsq:
|
|
296
305
|
upperCase(flowStepName) + currentIndex + upperCase(HANDLER.hdrDsq),
|
|
306
|
+
|
|
297
307
|
additionalResourcePermission: iamRole,
|
|
298
308
|
roleName,
|
|
299
|
-
queueName: upperCase(flowTag) + upperCase(flowStepName) + currentIndex
|
|
309
|
+
queueName: upperCase(flowTag) + upperCase(flowStepName) + currentIndex,
|
|
310
|
+
upperRoleName: upperCase(roleName)
|
|
300
311
|
},
|
|
301
312
|
setting: {
|
|
302
313
|
savePath: path.join(saveFilePath, SOURCE_PATH.appYaml),
|
|
@@ -15,18 +15,18 @@ You should have received a copy of the GNU Affero General Public License
|
|
|
15
15
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import * as eventRegistry
|
|
18
|
+
import * as eventRegistry from './events/registry.js';
|
|
19
19
|
import * as statusTypeRegistry from './statusTypes/registry.js';
|
|
20
20
|
|
|
21
|
-
import createWebSocketComponent
|
|
22
|
-
import createRegisterComponent
|
|
23
|
-
import createWebSocketGenerateCodeLibs
|
|
21
|
+
import createWebSocketComponent from './webSocket/index.js';
|
|
22
|
+
import createRegisterComponent from './register/index.js';
|
|
23
|
+
import createWebSocketGenerateCodeLibs from './shared/wsCodeLibs.js';
|
|
24
24
|
import createFlowSchemaEndpointMainFunction from './flowSchemaMainFunction/main.js';
|
|
25
25
|
|
|
26
26
|
import libs from '#libs/Libs.js';
|
|
27
27
|
|
|
28
28
|
// Build handler maps from registry export names (key = export alias in registry.js)
|
|
29
|
-
const EVENT_HANDLERS
|
|
29
|
+
const EVENT_HANDLERS = { ...eventRegistry };
|
|
30
30
|
const STATUS_HANDLERS = { ...statusTypeRegistry };
|
|
31
31
|
|
|
32
32
|
// 'generatedCode' is intentionally a no-op placeholder
|
|
@@ -72,7 +72,11 @@ async function generateTemplateDataFromFlowSchema(
|
|
|
72
72
|
|
|
73
73
|
if (!flowSchema.event.includes('s3')) {
|
|
74
74
|
perFlowParams.push(
|
|
75
|
-
await createFlowSchemaEndpointMainFunction(
|
|
75
|
+
await createFlowSchemaEndpointMainFunction(
|
|
76
|
+
_izContext,
|
|
77
|
+
flowSchema,
|
|
78
|
+
appPath
|
|
79
|
+
)
|
|
76
80
|
);
|
|
77
81
|
}
|
|
78
82
|
|
|
@@ -84,13 +88,17 @@ async function generateTemplateDataFromFlowSchema(
|
|
|
84
88
|
return false;
|
|
85
89
|
}
|
|
86
90
|
if (!(event in EVENT_HANDLERS)) {
|
|
87
|
-
console.warn(
|
|
91
|
+
console.warn(
|
|
92
|
+
`[FlowSchema:${flowTag}] skip unsupported event=${event}`
|
|
93
|
+
);
|
|
88
94
|
return false;
|
|
89
95
|
}
|
|
90
96
|
return true;
|
|
91
97
|
})
|
|
92
98
|
.map(event =>
|
|
93
|
-
Promise.resolve(
|
|
99
|
+
Promise.resolve(
|
|
100
|
+
EVENT_HANDLERS[event](_izContext, flowSchema, appPath)
|
|
101
|
+
).then(result => {
|
|
94
102
|
console.info(
|
|
95
103
|
`[FlowSchema:${flowTag}] done event=${event} generated=${Array.isArray(result) ? result.flat(5).length : 0}`
|
|
96
104
|
);
|
|
@@ -101,20 +109,34 @@ async function generateTemplateDataFromFlowSchema(
|
|
|
101
109
|
// ── statusType handler (driven by registry) ──────────────────────────
|
|
102
110
|
const { statusType, event } = flowSchema;
|
|
103
111
|
const statusPromise = (() => {
|
|
104
|
-
if (
|
|
105
|
-
|
|
106
|
-
|
|
112
|
+
if (
|
|
113
|
+
statusType === 'statusField' &&
|
|
114
|
+
event.includes('ownTopic') &&
|
|
115
|
+
event.includes('extTopic')
|
|
116
|
+
) {
|
|
117
|
+
return Promise.resolve(
|
|
118
|
+
STATUS_HANDLERS.statusField(_izContext, flowSchema, appPath)
|
|
119
|
+
).then(result => {
|
|
120
|
+
console.info(
|
|
121
|
+
`[FlowSchema:${flowTag}] done statusType=statusField generated=${Array.isArray(result) ? result.flat(5).length : 0}`
|
|
122
|
+
);
|
|
107
123
|
return result;
|
|
108
124
|
});
|
|
109
125
|
}
|
|
110
126
|
if (statusType in STATUS_HANDLERS) {
|
|
111
|
-
return Promise.resolve(
|
|
112
|
-
|
|
127
|
+
return Promise.resolve(
|
|
128
|
+
STATUS_HANDLERS[statusType](_izContext, flowSchema, appPath)
|
|
129
|
+
).then(result => {
|
|
130
|
+
console.info(
|
|
131
|
+
`[FlowSchema:${flowTag}] done statusType=${statusType} generated=${Array.isArray(result) ? result.flat(5).length : 0}`
|
|
132
|
+
);
|
|
113
133
|
return result;
|
|
114
134
|
});
|
|
115
135
|
}
|
|
116
136
|
if (statusType === 'storedCache' || statusType === 'none') {
|
|
117
|
-
console.info(
|
|
137
|
+
console.info(
|
|
138
|
+
`[FlowSchema:${flowTag}] skip statusType=${statusType} (noop)`
|
|
139
|
+
);
|
|
118
140
|
return Promise.resolve([]);
|
|
119
141
|
}
|
|
120
142
|
if (statusType === 'statusField') {
|
|
@@ -129,8 +151,11 @@ async function generateTemplateDataFromFlowSchema(
|
|
|
129
151
|
];
|
|
130
152
|
|
|
131
153
|
const targetFiles = libs.toUniqueFilePaths(results);
|
|
132
|
-
console.info(
|
|
133
|
-
|
|
154
|
+
console.info(
|
|
155
|
+
`[FlowSchema:${flowTag}] completed generated=${results.length} elapsedMs=${Date.now() - flowStartMs}`
|
|
156
|
+
);
|
|
157
|
+
if (targetFiles.length)
|
|
158
|
+
console.info(`[FlowSchema:${flowTag}] targetFiles: `, targetFiles);
|
|
134
159
|
|
|
135
160
|
return results;
|
|
136
161
|
})
|
|
@@ -140,16 +165,28 @@ async function generateTemplateDataFromFlowSchema(
|
|
|
140
165
|
|
|
141
166
|
if (shouldGenerateWebSocketAndRegister) {
|
|
142
167
|
const [webSocketResults, registerResults] = await Promise.all([
|
|
143
|
-
Promise.resolve(
|
|
144
|
-
|
|
168
|
+
Promise.resolve(
|
|
169
|
+
createWebSocketComponent(_izContext, appPath, allLocalFlowSchemas)
|
|
170
|
+
),
|
|
171
|
+
Promise.resolve(
|
|
172
|
+
createRegisterComponent(_izContext, allLocalFlowSchemas, appPath)
|
|
173
|
+
)
|
|
145
174
|
]);
|
|
146
175
|
|
|
147
176
|
createSourceParams.push(...webSocketResults, ...registerResults);
|
|
148
177
|
|
|
149
|
-
const wsAndRegisterFiles = libs.toUniqueFilePaths([
|
|
150
|
-
|
|
178
|
+
const wsAndRegisterFiles = libs.toUniqueFilePaths([
|
|
179
|
+
...webSocketResults,
|
|
180
|
+
...registerResults
|
|
181
|
+
]);
|
|
182
|
+
console.info(
|
|
183
|
+
`[FlowSchema:*] completed webSocket+register generated=${webSocketResults.length + registerResults.length}`
|
|
184
|
+
);
|
|
151
185
|
if (wsAndRegisterFiles.length)
|
|
152
|
-
console.info(
|
|
186
|
+
console.info(
|
|
187
|
+
'[FlowSchema:*] targetFiles (webSocket+register) : ',
|
|
188
|
+
wsAndRegisterFiles
|
|
189
|
+
);
|
|
153
190
|
}
|
|
154
191
|
|
|
155
192
|
console.info(
|
|
@@ -100,15 +100,20 @@ function data(_izContext, srcPath) {
|
|
|
100
100
|
'source/',
|
|
101
101
|
`${functionName}_${handlerType}`
|
|
102
102
|
),
|
|
103
|
+
|
|
103
104
|
resourceLocation: path.join(
|
|
104
105
|
SOURCE_PATH.resourceLocationFlowSchemaRegister,
|
|
105
106
|
'source/'
|
|
106
107
|
),
|
|
108
|
+
|
|
107
109
|
additionalResourcePermission,
|
|
108
110
|
functionName,
|
|
109
111
|
handlerType,
|
|
110
112
|
roleName: SOURCE_GENERATE_IAM_ROLE.RegisterRole,
|
|
111
|
-
functionNameConfig
|
|
113
|
+
functionNameConfig,
|
|
114
|
+
upperFunctionName: upperCase(functionName),
|
|
115
|
+
upperHandlerType: upperCase(handlerType),
|
|
116
|
+
upperFunctionNameConfig: upperCase(functionNameConfig)
|
|
112
117
|
},
|
|
113
118
|
setting: {
|
|
114
119
|
savePath: path.join(srcPath, SOURCE_PATH.appYaml),
|