@izara_project/izara-core-generate-service-code 1.0.1 → 1.0.3
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/index.js +41 -0
- package/package.json +10 -10
- package/src/GenerateCode.js +185 -0
- package/src/GenerateResources.js +122 -0
- package/src/GenerateSchema.js +165 -0
- package/src/GenerateTests.js +137 -0
- package/src/IntTestConfig.js +23 -0
- package/src/SchemaConfig.js +23 -0
- package/src/SourceManager/CreateSource.js +226 -0
- package/src/TemplateConfig.js +55 -0
- package/src/TemplateData/Auth/generateAuthYml/data.js +47 -0
- package/src/TemplateData/Auth/generateAuthYml/template.ejs +16 -0
- package/src/TemplateData/Auth/generateTemplateData.js +48 -0
- package/src/TemplateData/EndpointPerService/generateTemplateData.js +127 -0
- package/src/TemplateData/EndpointPerService/handler/api/data.js +72 -0
- package/src/TemplateData/EndpointPerService/handler/api/request.json +7 -0
- package/src/TemplateData/EndpointPerService/handler/api/template.ejs +73 -0
- package/src/TemplateData/EndpointPerService/handler/dsq/data.js +76 -0
- package/src/TemplateData/EndpointPerService/handler/dsq/request.json +7 -0
- package/src/TemplateData/EndpointPerService/handler/dsq/template.ejs +129 -0
- package/src/TemplateData/EndpointPerService/handler/inv/data.js +78 -0
- package/src/TemplateData/EndpointPerService/handler/inv/request.json +7 -0
- package/src/TemplateData/EndpointPerService/handler/inv/template.ejs +73 -0
- package/src/TemplateData/EndpointPerService/handler/sqs/data.js +76 -0
- package/src/TemplateData/EndpointPerService/handler/sqs/request.json +7 -0
- package/src/TemplateData/EndpointPerService/handler/sqs/template.ejs +131 -0
- package/src/TemplateData/EndpointPerService/mainFunction/create/data.js +51 -0
- package/src/TemplateData/EndpointPerService/mainFunction/create/template.ejs +616 -0
- package/src/TemplateData/EndpointPerService/mainFunction/delete/data.js +51 -0
- package/src/TemplateData/EndpointPerService/mainFunction/delete/template.ejs +158 -0
- package/src/TemplateData/EndpointPerService/mainFunction/get/data.js +52 -0
- package/src/TemplateData/EndpointPerService/mainFunction/get/template.ejs +270 -0
- package/src/TemplateData/EndpointPerService/mainFunction/update/data.js +52 -0
- package/src/TemplateData/EndpointPerService/mainFunction/update/template.ejs +434 -0
- package/src/TemplateData/EndpointPerService/yaml/data.js +311 -0
- package/src/TemplateData/EndpointPerService/yaml/template.ejs +35 -0
- package/src/TemplateData/IntTest/generateResources/generateResources.js +113 -0
- package/src/TemplateData/IntTest/generateResources/templateResources.ejs +33 -0
- package/src/TemplateData/IntTest/generateTests/events/data.js +137 -0
- package/src/TemplateData/IntTest/generateTests/events/templateEvents.ejs +11 -0
- package/src/TemplateData/IntTest/generateTests/generateTemplate.js +69 -0
- package/src/TemplateData/IntTest/generateTests/pathIntTest/data.js +56 -0
- package/src/TemplateData/IntTest/generateTests/pathIntTest/template.ejs +5 -0
- package/src/TemplateData/IntTest/generateTests/tests/data.js +212 -0
- package/src/TemplateData/IntTest/generateTests/tests/templateTests.ejs +3 -0
- package/src/TemplateData/IntTest/libs/libs.js +385 -0
- package/src/TemplateData/IntTest/upload/uploadIntTest.js +96 -0
- package/src/TemplateData/externalService/functionNameConfig/data.js +178 -0
- package/src/TemplateData/externalService/functionNameConfig/template.ejs +14 -0
- package/src/TemplateData/externalService/functionNameConfig/templateIntTesting.ejs +31 -0
- package/src/TemplateData/externalService/functionNameConfig/templateYaml.ejs +10 -0
- package/src/TemplateData/externalService/generateTemplateData.js +79 -0
- package/src/TemplateData/externalService/lambdaRole/data.js +448 -0
- package/src/TemplateData/externalService/lambdaRole/request.json +18 -0
- package/src/TemplateData/externalService/lambdaRole/template.ejs +57 -0
- package/src/TemplateData/externalService/snsTopicSubscriptions/data.js +271 -0
- package/src/TemplateData/externalService/snsTopicSubscriptions/request.json +12 -0
- package/src/TemplateData/externalService/snsTopicSubscriptions/template.ejs +33 -0
- package/src/TemplateData/findData/GetByStorage/getByDynamo.ejs +54 -0
- package/src/TemplateData/findData/GetByStorage/getByGraph.ejs +81 -0
- package/src/TemplateData/findData/findDataYaml/data.js +188 -0
- package/src/TemplateData/findData/findDataYaml/template.ejs +14 -0
- package/src/TemplateData/findData/generateTemplateData.js +69 -0
- package/src/TemplateData/findData/handler/data.js +51 -0
- package/src/TemplateData/findData/handler/template.ejs +136 -0
- package/src/TemplateData/findData/mainFunction/data.js +316 -0
- package/src/TemplateData/findData/mainFunction/template.ejs +149 -0
- package/src/TemplateData/flowSchema/CreateRecordComplete/functionYaml/data.js +133 -0
- package/src/TemplateData/flowSchema/CreateRecordComplete/functionYaml/template.ejs +20 -0
- package/src/TemplateData/flowSchema/CreateRecordComplete/handler/data.js +68 -0
- package/src/TemplateData/flowSchema/CreateRecordComplete/handler/template.ejs +84 -0
- package/src/TemplateData/flowSchema/CreateRecordComplete/mainFunction/data.js +71 -0
- package/src/TemplateData/flowSchema/CreateRecordComplete/mainFunction/template.ejs +118 -0
- package/src/TemplateData/flowSchema/CreateRecordComplete/queue/data.js +73 -0
- package/src/TemplateData/flowSchema/CreateRecordComplete/queue/template.ejs +49 -0
- package/src/TemplateData/flowSchema/components/upload/confirmReserved/functionYaml/data.js +131 -0
- package/src/TemplateData/flowSchema/components/upload/confirmReserved/functionYaml/template.ejs +17 -0
- package/src/TemplateData/flowSchema/components/upload/confirmReserved/handler/data.js +66 -0
- package/src/TemplateData/flowSchema/components/upload/confirmReserved/handler/template.ejs +123 -0
- package/src/TemplateData/flowSchema/components/upload/confirmReserved/mainFunction/data.js +58 -0
- package/src/TemplateData/flowSchema/components/upload/confirmReserved/mainFunction/template.ejs +129 -0
- package/src/TemplateData/flowSchema/components/upload/confirmReserved/queue/data.js +63 -0
- package/src/TemplateData/flowSchema/components/upload/confirmReserved/queue/template.ejs +45 -0
- package/src/TemplateData/flowSchema/components/upload/createObject/functionYaml/data.js +120 -0
- package/src/TemplateData/flowSchema/components/upload/createObject/functionYaml/template.ejs +20 -0
- package/src/TemplateData/flowSchema/components/upload/createObject/handler/data.js +67 -0
- package/src/TemplateData/flowSchema/components/upload/createObject/handler/template.ejs +83 -0
- package/src/TemplateData/flowSchema/components/upload/createObject/mainFunction/data.js +68 -0
- package/src/TemplateData/flowSchema/components/upload/createObject/mainFunction/template.ejs +131 -0
- package/src/TemplateData/flowSchema/components/upload/createObjectComplete/functionYaml/data.js +120 -0
- package/src/TemplateData/flowSchema/components/upload/createObjectComplete/functionYaml/template.ejs +17 -0
- package/src/TemplateData/flowSchema/components/upload/createObjectComplete/handler/data.js +65 -0
- package/src/TemplateData/flowSchema/components/upload/createObjectComplete/handler/template.ejs +99 -0
- package/src/TemplateData/flowSchema/components/upload/createObjectComplete/mainFunction/data.js +63 -0
- package/src/TemplateData/flowSchema/components/upload/createObjectComplete/mainFunction/template.ejs +81 -0
- package/src/TemplateData/flowSchema/components/upload/createObjectComplete/sns-sqs/data.js +69 -0
- package/src/TemplateData/flowSchema/components/upload/createObjectComplete/sns-sqs/template.ejs +49 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/functionYaml/data.js +142 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/functionYaml/template.ejs +18 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/handler/data.js +66 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/handler/template.ejs +123 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/mainFunction/data.js +66 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/mainFunction/template.ejs +262 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/queue/data.js +64 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/queue/template.ejs +45 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/functionYaml/data.js +150 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/functionYaml/template.ejs +14 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/handler/data.js +66 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/handler/template.ejs +121 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/mainFunction/data.js +62 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/mainFunction/template.ejs +172 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/sqs/data.js +66 -0
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/sqs/template.ejs +53 -0
- package/src/TemplateData/flowSchema/components/upload/processFile/functionYml/HdrS3/data.js +144 -0
- package/src/TemplateData/flowSchema/components/upload/processFile/functionYml/HdrS3/template.ejs +25 -0
- package/src/TemplateData/flowSchema/components/upload/processFile/handler/handlerS3/data.js +53 -0
- package/src/TemplateData/flowSchema/components/upload/processFile/handler/handlerS3/template.ejs +50 -0
- package/src/TemplateData/flowSchema/components/upload/processFile/mainFunction/ProcessCsvtemplate.ejs +182 -0
- package/src/TemplateData/flowSchema/components/upload/processFile/mainFunction/data.js +52 -0
- package/src/TemplateData/flowSchema/components/upload/processFile/mainFunction/template.ejs +66 -0
- package/src/TemplateData/flowSchema/components/upload/processFile/queue/data.js +77 -0
- package/src/TemplateData/flowSchema/components/upload/processFile/queue/dsqTemplatePath.ejs +32 -0
- package/src/TemplateData/flowSchema/components/upload/processFile/queue/s3Template.ejs +59 -0
- package/src/TemplateData/flowSchema/components/upload/relate/S3/data.js +60 -0
- package/src/TemplateData/flowSchema/components/upload/relate/S3/template.ejs +13 -0
- package/src/TemplateData/flowSchema/components/upload/relate/libs/data.js +53 -0
- package/src/TemplateData/flowSchema/components/upload/relate/libs/template.ejs +97 -0
- package/src/TemplateData/flowSchema/components/upload/relate/sns-out/data.js +67 -0
- package/src/TemplateData/flowSchema/components/websocket/connect/functionYaml/data.js +96 -0
- package/src/TemplateData/flowSchema/components/websocket/connect/functionYaml/template.ejs +17 -0
- package/src/TemplateData/flowSchema/components/websocket/connect/handler/data.js +58 -0
- package/src/TemplateData/flowSchema/components/websocket/connect/handler/template.ejs +72 -0
- package/src/TemplateData/flowSchema/components/websocket/dynamoDb/ReservedTableData.js +68 -0
- package/src/TemplateData/flowSchema/components/websocket/dynamoDb/WebSocketTaskData.js +69 -0
- package/src/TemplateData/flowSchema/components/websocket/dynamoDb/ttlDynamoTemplate.ejs +32 -0
- package/src/TemplateData/flowSchema/components/websocket/dynamoDb/userUploadRecords.js +61 -0
- package/src/TemplateData/flowSchema/dynamoDb/data.js +117 -0
- package/src/TemplateData/flowSchema/eventBridge/functionYaml/data.js +172 -0
- package/src/TemplateData/flowSchema/eventBridge/functionYaml/template.ejs +21 -0
- package/src/TemplateData/flowSchema/eventBridge/handler/inv/data.js +70 -0
- package/src/TemplateData/flowSchema/eventBridge/handler/inv/request.json +7 -0
- package/src/TemplateData/flowSchema/eventBridge/handler/inv/template.ejs +60 -0
- package/src/TemplateData/flowSchema/eventBridge/mainFunction/data.js +68 -0
- package/src/TemplateData/flowSchema/eventBridge/mainFunction/request.json +5 -0
- package/src/TemplateData/flowSchema/eventBridge/mainFunction/template.ejs +59 -0
- package/src/TemplateData/flowSchema/externalTopic/Complete/functionYaml/data.js +114 -0
- package/src/TemplateData/flowSchema/externalTopic/Complete/functionYaml/template.ejs +20 -0
- package/src/TemplateData/flowSchema/externalTopic/Complete/handler/data.js +76 -0
- package/src/TemplateData/flowSchema/externalTopic/Complete/handler/template.ejs +81 -0
- package/src/TemplateData/flowSchema/externalTopic/Complete/mainFunction/data.js +70 -0
- package/src/TemplateData/flowSchema/externalTopic/Complete/mainFunction/template.ejs +58 -0
- package/src/TemplateData/flowSchema/externalTopic/Process/functionYaml/data.js +163 -0
- package/src/TemplateData/flowSchema/externalTopic/Process/functionYaml/template.ejs +20 -0
- package/src/TemplateData/flowSchema/externalTopic/Process/handler/data.js +68 -0
- package/src/TemplateData/flowSchema/externalTopic/Process/handler/template.ejs +101 -0
- package/src/TemplateData/flowSchema/externalTopic/sns-in-sqs/data.js +79 -0
- package/src/TemplateData/flowSchema/externalTopic/sns-in-sqs/template.ejs +47 -0
- package/src/TemplateData/flowSchema/externalTopic/sns-out/data.js +71 -0
- package/src/TemplateData/flowSchema/flowSchemaMainFunction/data.js +116 -0
- package/src/TemplateData/flowSchema/flowSchemaMainFunction/template.ejs +92 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/functionYaml/data.js +116 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/functionYaml/template.ejs +21 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/handler/data.js +70 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/handler/template.ejs +81 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/mainFunction/data.js +70 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/mainFunction/template.ejs +61 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/functionYaml/data.js +152 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/functionYaml/template.ejs +17 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/handler/DsqHandlerTemplate.ejs +91 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/handler/SqsHandlerTemplate.ejs +87 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/handler/data.js +83 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/functionYaml/data.js +116 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/functionYaml/template.ejs +18 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/handler/data.js +66 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/handler/template.ejs +107 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/mainFunction/data.js +67 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/mainFunction/template.ejs +106 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/sns-in/data.js +100 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/sns-in/sqsTemplate.ejs +43 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/sns-out/data.js +74 -0
- package/src/TemplateData/flowSchema/flowStep/functionYaml/data.js +157 -0
- package/src/TemplateData/flowSchema/flowStep/functionYaml/template.ejs +20 -0
- package/src/TemplateData/flowSchema/flowStep/handler/data.js +102 -0
- package/src/TemplateData/flowSchema/flowStep/handler/template.ejs +89 -0
- package/src/TemplateData/flowSchema/flowStep/mainFunction/data.js +101 -0
- package/src/TemplateData/flowSchema/flowStep/mainFunction/template.ejs +58 -0
- package/src/TemplateData/flowSchema/flowStep/sns-in/data.js +98 -0
- package/src/TemplateData/flowSchema/flowStep/sns-in/template.ejs +59 -0
- package/src/TemplateData/flowSchema/generateTemplateData.js +803 -0
- package/src/TemplateData/flowSchema/lambdaSync/Api/functionYaml/data.js +92 -0
- package/src/TemplateData/flowSchema/lambdaSync/Api/functionYaml/template.ejs +28 -0
- package/src/TemplateData/flowSchema/lambdaSync/Api/handler/data.js +69 -0
- package/src/TemplateData/flowSchema/lambdaSync/Api/handler/template.ejs +86 -0
- package/src/TemplateData/flowSchema/lambdaSync/Inv/functionYaml/data.js +80 -0
- package/src/TemplateData/flowSchema/lambdaSync/Inv/functionYaml/template.ejs +13 -0
- package/src/TemplateData/flowSchema/lambdaSync/Inv/handler/data.js +65 -0
- package/src/TemplateData/flowSchema/lambdaSync/Inv/handler/template.ejs +52 -0
- package/src/TemplateData/flowSchema/register/complete/functionYaml/data.js +119 -0
- package/src/TemplateData/flowSchema/register/complete/functionYaml/template.ejs +22 -0
- package/src/TemplateData/flowSchema/register/complete/handler/data.js +59 -0
- package/src/TemplateData/flowSchema/register/complete/handler/template.ejs +85 -0
- package/src/TemplateData/flowSchema/register/complete/mainFunction/data.js +63 -0
- package/src/TemplateData/flowSchema/register/complete/mainFunction/template.ejs +176 -0
- package/src/TemplateData/flowSchema/register/dynamoDB/register.js +71 -0
- package/src/TemplateData/flowSchema/register/sns-in/data.js +57 -0
- package/src/TemplateData/flowSchema/register/sns-in/template.ejs +45 -0
- package/src/TemplateData/flowSchema/register/subscriptionOutAll/data.js +82 -0
- package/src/TemplateData/flowSchema/register/subscriptionOutAll/template.ejs +13 -0
- package/src/TemplateData/flowSchema/register/wbs/functionYaml/data.js +112 -0
- package/src/TemplateData/flowSchema/register/wbs/functionYaml/template.ejs +19 -0
- package/src/TemplateData/flowSchema/register/wbs/handler/data.js +66 -0
- package/src/TemplateData/flowSchema/register/wbs/handler/template.ejs +83 -0
- package/src/TemplateData/flowSchema/register/wbs/mainFunction/data.js +57 -0
- package/src/TemplateData/flowSchema/register/wbs/mainFunction/template.ejs +165 -0
- package/src/TemplateData/flowSchema/statusFieldComponent/FunctionYaml/data.js +151 -0
- package/src/TemplateData/flowSchema/statusFieldComponent/FunctionYaml/template.ejs +22 -0
- package/src/TemplateData/flowSchema/statusFieldComponent/Handler/data.js +70 -0
- package/src/TemplateData/flowSchema/statusFieldComponent/Handler/template.ejs +86 -0
- package/src/TemplateData/flowSchema/statusFieldComponent/MainFunction/data.js +63 -0
- package/src/TemplateData/flowSchema/statusFieldComponent/MainFunction/template.ejs +80 -0
- package/src/TemplateData/flowSchema/statusFieldComponent/sns/data.js +63 -0
- package/src/TemplateData/flowSchema/statusFieldComponent/sns/template.ejs +59 -0
- package/src/TemplateData/flowSchema/templateByStatusType/statusFieldTemplate.ejs +30 -0
- package/src/TemplateData/flowSchema/templateByStatusType/storedCacheTemplate.ejs +26 -0
- package/src/TemplateData/flowSchema/templateByStatusType/triggerCacheTemplate.ejs +44 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/functionYaml/data.js +139 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/functionYaml/template.ejs +22 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/handler/data.js +70 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/handler/template.ejs +89 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/mainFunction/data.js +72 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/mainFunction/template.ejs +85 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/functionYaml/data.js +145 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/functionYaml/template.ejs +22 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/handler/data.js +74 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/handler/template.ejs +89 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/mainFunction/data.js +70 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/mainFunction/template.ejs +58 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/functionYaml/data.js +134 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/functionYaml/template.ejs +21 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/handler/data.js +70 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/handler/template.ejs +88 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/mainFunction/data.js +69 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/mainFunction/template.ejs +74 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheQueue/data.js +83 -0
- package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheQueue/template.ejs +49 -0
- package/src/TemplateData/flowSchema/webSocketComplete/functionYaml/data.js +140 -0
- package/src/TemplateData/flowSchema/webSocketComplete/functionYaml/template.ejs +21 -0
- package/src/TemplateData/flowSchema/webSocketComplete/handler/data.js +62 -0
- package/src/TemplateData/flowSchema/webSocketComplete/handler/template.ejs +85 -0
- package/src/TemplateData/flowSchema/webSocketComplete/mainFunction/data.js +55 -0
- package/src/TemplateData/flowSchema/webSocketComplete/mainFunction/template.ejs +134 -0
- package/src/TemplateData/flowSchema/webSocketComplete/sqs/data.js +100 -0
- package/src/TemplateData/flowSchema/webSocketComplete/sqs/template.ejs +43 -0
- package/src/TemplateData/flowSchema/webSocketComplete/sqs/templateSub.ejs +7 -0
- package/src/TemplateData/generateRole/createSharedResource.js +469 -0
- package/src/TemplateData/generateRole/data.js +97 -0
- package/src/TemplateData/generateRole/sharedResourceTemplate.ejs +32 -0
- package/src/TemplateData/generateRole/template.ejs +33 -0
- package/src/TemplateData/perActionComplete/create/handler/data.js +61 -0
- package/src/TemplateData/perActionComplete/create/handler/template.ejs +126 -0
- package/src/TemplateData/perActionComplete/create/mainFunction/createObjectComplete_main.js +196 -0
- package/src/TemplateData/perActionComplete/create/mainFunction/data.js +53 -0
- package/src/TemplateData/perActionComplete/create/mainFunction/template.ejs +187 -0
- package/src/TemplateData/perActionComplete/create/sns-in-sqs/data.js +62 -0
- package/src/TemplateData/perActionComplete/create/sns-in-sqs/template.ejs +47 -0
- package/src/TemplateData/perActionComplete/create/sns-out/data.js +67 -0
- package/src/TemplateData/perActionComplete/create/sns-out/template.ejs +10 -0
- package/src/TemplateData/perActionComplete/create/yaml/data.js +110 -0
- package/src/TemplateData/perActionComplete/create/yaml/template.ejs +21 -0
- package/src/TemplateData/perActionComplete/delete/handler/data.js +61 -0
- package/src/TemplateData/perActionComplete/delete/handler/template.ejs +125 -0
- package/src/TemplateData/perActionComplete/delete/mainFunction/data.js +54 -0
- package/src/TemplateData/perActionComplete/delete/mainFunction/template.ejs +87 -0
- package/src/TemplateData/perActionComplete/delete/sns-in-sqs/data.js +63 -0
- package/src/TemplateData/perActionComplete/delete/sns-in-sqs/template.ejs +47 -0
- package/src/TemplateData/perActionComplete/delete/sns-out/data.js +67 -0
- package/src/TemplateData/perActionComplete/delete/yaml/data.js +108 -0
- package/src/TemplateData/perActionComplete/delete/yaml/template.ejs +20 -0
- package/src/TemplateData/perActionComplete/generateTemplateData.js +162 -0
- package/src/TemplateData/perActionComplete/get/handler/data.js +61 -0
- package/src/TemplateData/perActionComplete/get/handler/template.ejs +125 -0
- package/src/TemplateData/perActionComplete/get/mainFunction/data.js +53 -0
- package/src/TemplateData/perActionComplete/get/mainFunction/template.ejs +131 -0
- package/src/TemplateData/perActionComplete/get/sns-in-sqs/data.js +62 -0
- package/src/TemplateData/perActionComplete/get/sns-in-sqs/template.ejs +47 -0
- package/src/TemplateData/perActionComplete/get/sns-out/data.js +67 -0
- package/src/TemplateData/perActionComplete/get/yaml/data.js +111 -0
- package/src/TemplateData/perActionComplete/get/yaml/template.ejs +21 -0
- package/src/TemplateData/perActionComplete/update/handler/data.js +61 -0
- package/src/TemplateData/perActionComplete/update/handler/template.ejs +125 -0
- package/src/TemplateData/perActionComplete/update/mainFunction/data.js +53 -0
- package/src/TemplateData/perActionComplete/update/mainFunction/template.ejs +133 -0
- package/src/TemplateData/perActionComplete/update/sns-in-sqs/data.js +62 -0
- package/src/TemplateData/perActionComplete/update/sns-in-sqs/template.ejs +47 -0
- package/src/TemplateData/perActionComplete/update/sns-out/data.js +64 -0
- package/src/TemplateData/perActionComplete/update/yaml/data.js +111 -0
- package/src/TemplateData/perActionComplete/update/yaml/template.ejs +20 -0
- package/src/TemplateData/processLogical/generateTemplateData.js +60 -0
- package/src/TemplateData/processLogical/handler/data.js +50 -0
- package/src/TemplateData/processLogical/handler/template.ejs +127 -0
- package/src/TemplateData/processLogical/mainFunction/data.js +50 -0
- package/src/TemplateData/processLogical/mainFunction/template.ejs +424 -0
- package/src/TemplateData/processLogical/yaml/data.js +175 -0
- package/src/TemplateData/processLogical/yaml/template.ejs +12 -0
- package/src/TemplateData/processLogicalPagination/DsqYaml/data.js +50 -0
- package/src/TemplateData/processLogicalPagination/DsqYaml/template.ejs +32 -0
- package/src/TemplateData/processLogicalPagination/generateTemplateData.js +68 -0
- package/src/TemplateData/processLogicalPagination/handler/dsq/data.js +50 -0
- package/src/TemplateData/processLogicalPagination/handler/dsq/template.ejs +160 -0
- package/src/TemplateData/processLogicalPagination/handler/sqs/data.js +49 -0
- package/src/TemplateData/processLogicalPagination/handler/sqs/template.ejs +143 -0
- package/src/TemplateData/processLogicalPagination/mainFunction/data.js +49 -0
- package/src/TemplateData/processLogicalPagination/mainFunction/template.ejs +210 -0
- package/src/TemplateData/processLogicalPagination/yaml/dsq/data.js +166 -0
- package/src/TemplateData/processLogicalPagination/yaml/dsq/template.ejs +12 -0
- package/src/TemplateData/processLogicalPagination/yaml/sqs/data.js +174 -0
- package/src/TemplateData/processLogicalPagination/yaml/sqs/template.ejs +13 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/data.js +166 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/template.ejs +9 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/templateByHandler/apiTemplate.ejs +20 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/templateByHandler/dsqTemplate.ejs +17 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/templateByHandler/invTemplate.ejs +13 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/templateByHandler/sqsTemplate.ejs +18 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/data.js +72 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/template.ejs +9 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/templateByHandler/apiTemplate.ejs +153 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/templateByHandler/dsqTemplate.ejs +197 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/templateByHandler/invTemplate.ejs +141 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/templateByHandler/sqsTemplate.ejs +181 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/mainFunction/data.js +59 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/mainFunction/template.ejs +377 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/sns-in-sqs/data.js +75 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/sns-in-sqs/snsTemplate.ejs +59 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/sns-in-sqs/sqsTemplate.ejs +43 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/functionYaml/data.js +120 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/functionYaml/template.ejs +20 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/handler/sqs/data.js +60 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/handler/sqs/template.ejs +126 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/mainFunction/data.js +55 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/mainFunction/template.ejs +151 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/sns-in-sqs/data.js +63 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/sns-in-sqs/template.ejs +46 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/sns-out/data.js +64 -0
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/sns-out/template.ejs +10 -0
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/data.js +206 -0
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/template.ejs +9 -0
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/templateByHandler/apiTemplate.ejs +21 -0
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/templateByHandler/dsqTemplate.ejs +17 -0
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/templateByHandler/invTemplate.ejs +13 -0
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/templateByHandler/sqsTemplate.ejs +17 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/data.js +72 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/template.ejs +9 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/templateByHandler/apiTemplate.ejs +137 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/templateByHandler/dsqTemplate.ejs +179 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/templateByHandler/invTemplate.ejs +123 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/templateByHandler/sqsTemplate.ejs +163 -0
- package/src/TemplateData/relationshipPerAction/create/action/mainFunction/data.js +58 -0
- package/src/TemplateData/relationshipPerAction/create/action/mainFunction/template.ejs +443 -0
- package/src/TemplateData/relationshipPerAction/create/action/sns-in-sqs/data.js +76 -0
- package/src/TemplateData/relationshipPerAction/create/action/sns-in-sqs/snsTemplate.ejs +59 -0
- package/src/TemplateData/relationshipPerAction/create/action/sns-in-sqs/sqsTemplate.ejs +43 -0
- package/src/TemplateData/relationshipPerAction/create/complete/functionYaml/data.js +121 -0
- package/src/TemplateData/relationshipPerAction/create/complete/functionYaml/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/create/complete/functionYaml/template.ejs +20 -0
- package/src/TemplateData/relationshipPerAction/create/complete/handler/sqs/data.js +60 -0
- package/src/TemplateData/relationshipPerAction/create/complete/handler/sqs/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/create/complete/handler/sqs/template.ejs +126 -0
- package/src/TemplateData/relationshipPerAction/create/complete/mainFunction/data.js +55 -0
- package/src/TemplateData/relationshipPerAction/create/complete/mainFunction/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/create/complete/mainFunction/template.ejs +152 -0
- package/src/TemplateData/relationshipPerAction/create/complete/sns-in-sqs/data.js +62 -0
- package/src/TemplateData/relationshipPerAction/create/complete/sns-in-sqs/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/create/complete/sns-in-sqs/template.ejs +46 -0
- package/src/TemplateData/relationshipPerAction/create/complete/sns-out/data.js +62 -0
- package/src/TemplateData/relationshipPerAction/create/complete/sns-out/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/create/complete/sns-out/template.ejs +10 -0
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/data.js +206 -0
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/template.ejs +9 -0
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/templateByHandler/apiTemplate.ejs +21 -0
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/templateByHandler/dsqTemplate.ejs +17 -0
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/templateByHandler/invTemplate.ejs +13 -0
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/templateByHandler/sqsTemplate.ejs +18 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/data.js +72 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/template.ejs +9 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/templateByHandler/apiTemplate.ejs +139 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/templateByHandler/dsqTemplate.ejs +182 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/templateByHandler/invTemplate.ejs +124 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/templateByHandler/sqsTemplate.ejs +162 -0
- package/src/TemplateData/relationshipPerAction/delete/action/mainFunction/data.js +58 -0
- package/src/TemplateData/relationshipPerAction/delete/action/mainFunction/template.ejs +365 -0
- package/src/TemplateData/relationshipPerAction/delete/action/sns-in-sqs/data.js +76 -0
- package/src/TemplateData/relationshipPerAction/delete/action/sns-in-sqs/snsTemplate.ejs +59 -0
- package/src/TemplateData/relationshipPerAction/delete/action/sns-in-sqs/sqsTemplate.ejs +43 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/functionYaml/data.js +119 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/functionYaml/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/functionYaml/template.ejs +20 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/handler/sqs/data.js +61 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/handler/sqs/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/handler/sqs/template.ejs +126 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/mainFunction/data.js +55 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/mainFunction/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/mainFunction/template.ejs +142 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/sns-in-sqs/data.js +64 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/sns-in-sqs/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/sns-in-sqs/template.ejs +47 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/sns-out/data.js +64 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/sns-out/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/delete/complete/sns-out/template.ejs +10 -0
- package/src/TemplateData/relationshipPerAction/generateTemplateData.js +547 -0
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/data.js +205 -0
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/template.ejs +9 -0
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/templateByHandler/apiTemplate.ejs +21 -0
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/templateByHandler/dsqTemplate.ejs +17 -0
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/templateByHandler/invTemplate.ejs +13 -0
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/templateByHandler/sqsTemplate.ejs +18 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/data.js +72 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/template.ejs +9 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/templateByHandler/apiTemplate.ejs +137 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/templateByHandler/dsqTemplate.ejs +178 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/templateByHandler/invTemplate.ejs +122 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/templateByHandler/sqsTemplate.ejs +163 -0
- package/src/TemplateData/relationshipPerAction/get/action/mainFunction/data.js +57 -0
- package/src/TemplateData/relationshipPerAction/get/action/mainFunction/template.ejs +320 -0
- package/src/TemplateData/relationshipPerAction/get/action/sns-in-sqs/data.js +76 -0
- package/src/TemplateData/relationshipPerAction/get/action/sns-in-sqs/snsTemplate.ejs +59 -0
- package/src/TemplateData/relationshipPerAction/get/action/sns-in-sqs/sqsTemplate.ejs +43 -0
- package/src/TemplateData/relationshipPerAction/get/complete/functionYaml/data.js +120 -0
- package/src/TemplateData/relationshipPerAction/get/complete/functionYaml/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/get/complete/functionYaml/template.ejs +20 -0
- package/src/TemplateData/relationshipPerAction/get/complete/handler/sqs/data.js +62 -0
- package/src/TemplateData/relationshipPerAction/get/complete/handler/sqs/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/get/complete/handler/sqs/template.ejs +127 -0
- package/src/TemplateData/relationshipPerAction/get/complete/mainFunction/data.js +56 -0
- package/src/TemplateData/relationshipPerAction/get/complete/mainFunction/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/get/complete/mainFunction/template.ejs +144 -0
- package/src/TemplateData/relationshipPerAction/get/complete/sns-in-sqs/data.js +65 -0
- package/src/TemplateData/relationshipPerAction/get/complete/sns-in-sqs/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/get/complete/sns-in-sqs/template.ejs +47 -0
- package/src/TemplateData/relationshipPerAction/get/complete/sns-out/data.js +65 -0
- package/src/TemplateData/relationshipPerAction/get/complete/sns-out/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/get/complete/sns-out/template.ejs +10 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/functionYaml/data.js +172 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/functionYaml/template.ejs +9 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/functionYaml/templateByHandler/apiTemplate.ejs +20 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/functionYaml/templateByHandler/dsqTemplate.ejs +17 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/functionYaml/templateByHandler/invTemplate.ejs +13 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/functionYaml/templateByHandler/sqsTemplate.ejs +17 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/handler/data.js +72 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/handler/template.ejs +9 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/handler/templateByHandler/apiTemplate.ejs +155 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/handler/templateByHandler/dsqTemplate.ejs +198 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/handler/templateByHandler/invTemplate.ejs +143 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/handler/templateByHandler/sqsTemplate.ejs +182 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/mainFunction/data.js +59 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/mainFunction/template.ejs +382 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/sns-in-sqs/data.js +75 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/sns-in-sqs/snsTemplate.ejs +59 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/sns-in-sqs/sqsTemplate.ejs +43 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/complete/functionYaml/data.js +119 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/complete/functionYaml/template.ejs +20 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/complete/handler/sqs/data.js +60 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/complete/handler/sqs/template.ejs +126 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/complete/mainFunction/data.js +58 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/complete/mainFunction/template.ejs +156 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/complete/sns-in-sqs/data.js +64 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/complete/sns-in-sqs/template.ejs +46 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/complete/sns-out/data.js +64 -0
- package/src/TemplateData/relationshipPerAction/moveRelationship/complete/sns-out/template.ejs +10 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/data.js +196 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/template.ejs +9 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/templateByHandler/apiTemplate.ejs +20 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/templateByHandler/dsqTemplate.ejs +18 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/templateByHandler/invTemplate.ejs +13 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/templateByHandler/sqsTemplate.ejs +17 -0
- package/src/TemplateData/relationshipPerAction/update/action/handler/data.js +73 -0
- package/src/TemplateData/relationshipPerAction/update/action/handler/template.ejs +9 -0
- package/src/TemplateData/relationshipPerAction/update/action/handler/templateByHandler/apiTemplate.ejs +138 -0
- package/src/TemplateData/relationshipPerAction/update/action/handler/templateByHandler/dsqTemplate.ejs +180 -0
- package/src/TemplateData/relationshipPerAction/update/action/handler/templateByHandler/invTemplate.ejs +124 -0
- package/src/TemplateData/relationshipPerAction/update/action/handler/templateByHandler/sqsTemplate.ejs +163 -0
- package/src/TemplateData/relationshipPerAction/update/action/mainFunction/data.js +60 -0
- package/src/TemplateData/relationshipPerAction/update/action/mainFunction/request.json +1 -0
- package/src/TemplateData/relationshipPerAction/update/action/mainFunction/template.ejs +387 -0
- package/src/TemplateData/relationshipPerAction/update/action/sns-in-sqs/data.js +84 -0
- package/src/TemplateData/relationshipPerAction/update/action/sns-in-sqs/request.json +3 -0
- package/src/TemplateData/relationshipPerAction/update/action/sns-in-sqs/snsTemplate.ejs +59 -0
- package/src/TemplateData/relationshipPerAction/update/action/sns-in-sqs/sqsTemplate.ejs +43 -0
- package/src/TemplateData/relationshipPerAction/update/action/sns-out/data.js +67 -0
- package/src/TemplateData/relationshipPerAction/update/action/sns-out/request.json +3 -0
- package/src/TemplateData/relationshipPerAction/update/complete/functionYaml/data.js +120 -0
- package/src/TemplateData/relationshipPerAction/update/complete/functionYaml/request.json +3 -0
- package/src/TemplateData/relationshipPerAction/update/complete/functionYaml/template.ejs +21 -0
- package/src/TemplateData/relationshipPerAction/update/complete/handler/sqs/data.js +60 -0
- package/src/TemplateData/relationshipPerAction/update/complete/handler/sqs/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/update/complete/handler/sqs/template.ejs +128 -0
- package/src/TemplateData/relationshipPerAction/update/complete/mainFunction/data.js +56 -0
- package/src/TemplateData/relationshipPerAction/update/complete/mainFunction/request.json +1 -0
- package/src/TemplateData/relationshipPerAction/update/complete/mainFunction/template.ejs +146 -0
- package/src/TemplateData/relationshipPerAction/update/complete/sns-in-sqs/data.js +63 -0
- package/src/TemplateData/relationshipPerAction/update/complete/sns-in-sqs/request.json +3 -0
- package/src/TemplateData/relationshipPerAction/update/complete/sns-in-sqs/template.ejs +46 -0
- package/src/TemplateData/relationshipPerAction/update/complete/sns-out/data.js +62 -0
- package/src/TemplateData/relationshipPerAction/update/complete/sns-out/request.json +3 -0
- package/src/TemplateData/relationshipPerAction/update/complete/sns-out/template.ejs +10 -0
- package/src/TemplateData/resourceYaml/dynamodb/defaultDynamoDbTable.js +145 -0
- package/src/TemplateData/resourceYaml/dynamodb/generateDynamoPerLink.js +115 -0
- package/src/TemplateData/resourceYaml/dynamodb/mainResourcePerObjectSchemaData.js +166 -0
- package/src/TemplateData/resourceYaml/dynamodb/template.ejs +29 -0
- package/src/TemplateData/resourceYaml/filterGenerateResource/data.js +126 -0
- package/src/TemplateData/resourceYaml/generateTemplateData.js +149 -0
- package/src/TemplateData/resourceYaml/sns-in-sqs/defaultSnsInSqsForFindDataAndProcessLogical.js +91 -0
- package/src/TemplateData/resourceYaml/sns-in-sqs/request.json +4 -0
- package/src/TemplateData/resourceYaml/sns-in-sqs/snsAndSqsPerActionData.js +85 -0
- package/src/TemplateData/resourceYaml/sns-in-sqs/snsTemplate.ejs +59 -0
- package/src/TemplateData/resourceYaml/sns-in-sqs/sqsTemplate.ejs +43 -0
- package/src/TemplateData/resourceYaml/sns-out/data.js +78 -0
- package/src/TemplateData/resourceYaml/sns-out/defaultSnsOutForFindDataAndProcessLogical.js +65 -0
- package/src/TemplateData/resourceYaml/sns-out/request.json +3 -0
- package/src/TemplateData/resourceYaml/sns-out/template.ejs +10 -0
- package/src/libs/Consts.js +432 -0
- package/src/libs/GenerateCodeLibs.js +32 -0
- package/src/libs/Libs.js +379 -0
- package/src/libs/Utils.js +140 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (C) 2020 Sven Mason <http://izara.io>
|
|
3
|
+
|
|
4
|
+
This program is free software: you can redistribute it and/or modify
|
|
5
|
+
it under the terms of the GNU Affero General Public License as
|
|
6
|
+
published by the Free Software Foundation, either version 3 of the
|
|
7
|
+
License, or (at your option) any later version.
|
|
8
|
+
|
|
9
|
+
This program is distributed in the hope that it will be useful,
|
|
10
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
GNU Affero General Public License for more details.
|
|
13
|
+
|
|
14
|
+
You should have received a copy of the GNU Affero General Public License
|
|
15
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { join } from 'path';
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
import { getObjectSchema } from '@izara_project/izara-core-library-service-schemas';
|
|
23
|
+
|
|
24
|
+
const {
|
|
25
|
+
getAllLocalObjectSchemasWithHierarchy,
|
|
26
|
+
// getAllLocalRelationshipSchemas,
|
|
27
|
+
getAllLocalRelationshipSchema,
|
|
28
|
+
getAllLocalFlowSchemas
|
|
29
|
+
} = getObjectSchema;
|
|
30
|
+
// Resource generators
|
|
31
|
+
import createSourceDataDynamoDB from './dynamodb/mainResourcePerObjectSchemaData.js';
|
|
32
|
+
import createDefaultDynamoDb from './dynamodb/defaultDynamoDbTable.js';
|
|
33
|
+
import createSourceSnsAndSqs from './sns-in-sqs/snsAndSqsPerActionData.js';
|
|
34
|
+
import createDefaultSnsOutForFindDataAndProcessLogical from './sns-out/defaultSnsOutForFindDataAndProcessLogical.js';
|
|
35
|
+
import createDataForCreateSourceSnsOut from './sns-out/data.js';
|
|
36
|
+
import createFindDataAndProcessLogicalDefaultSnsInSqs from './sns-in-sqs/defaultSnsInSqsForFindDataAndProcessLogical.js';
|
|
37
|
+
import createDynamoPerRelationshipLink from './dynamodb/generateDynamoPerLink.js';
|
|
38
|
+
import filterCreateResourceYaml from './filterGenerateResource/data.js';
|
|
39
|
+
|
|
40
|
+
// lib of generateCode
|
|
41
|
+
import libs from '../../libs/Utils.js';
|
|
42
|
+
const { checkValidTableYaml } = libs;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Generates code from templates based on object schemas
|
|
46
|
+
* @param {Object} _izContext - Context object
|
|
47
|
+
* @param {string} objSchemaPath - Path to object schema
|
|
48
|
+
* @returns {Promise<Array>} - Array of parameter objects for code generation
|
|
49
|
+
*/
|
|
50
|
+
async function generateCodeWithTemplate(_izContext, objSchemaPath) {
|
|
51
|
+
try {
|
|
52
|
+
const saveFilePath = join(objSchemaPath, '../');
|
|
53
|
+
const allObjSchemas = await getAllLocalObjectSchemasWithHierarchy(
|
|
54
|
+
_izContext,
|
|
55
|
+
objSchemaPath
|
|
56
|
+
);
|
|
57
|
+
const allLocalRelationshipSchema = await getAllLocalRelationshipSchema(
|
|
58
|
+
_izContext,
|
|
59
|
+
objSchemaPath
|
|
60
|
+
);
|
|
61
|
+
const allLocalFlowSchema = await getAllLocalFlowSchemas(
|
|
62
|
+
_izContext,
|
|
63
|
+
objSchemaPath
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
let createSourceParams = [];
|
|
67
|
+
let createdTableYaml = {}; // Declare createdTableYaml
|
|
68
|
+
|
|
69
|
+
// Process all object schemas
|
|
70
|
+
if (allObjSchemas && allObjSchemas.records) {
|
|
71
|
+
for (const objectSchema of allObjSchemas.records) {
|
|
72
|
+
try {
|
|
73
|
+
let createSourceDynamoDb = createSourceDataDynamoDB(
|
|
74
|
+
_izContext,
|
|
75
|
+
objectSchema,
|
|
76
|
+
saveFilePath
|
|
77
|
+
);
|
|
78
|
+
const [dynamoResources, updatedTableYaml] = checkValidTableYaml(
|
|
79
|
+
_izContext,
|
|
80
|
+
createSourceDynamoDb,
|
|
81
|
+
createdTableYaml
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
createdTableYaml = updatedTableYaml;
|
|
85
|
+
_izContext.logger.debug('dynamoResources: ', dynamoResources);
|
|
86
|
+
|
|
87
|
+
// Accumulate resources
|
|
88
|
+
createSourceParams.push(...dynamoResources);
|
|
89
|
+
} catch (schemaError) {
|
|
90
|
+
_izContext.logger.error(
|
|
91
|
+
`Error processing schema: ${objectSchema?.name || 'unknown'}`,
|
|
92
|
+
schemaError
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
// Add default resources
|
|
98
|
+
const defaultDynamoDbResources = createDefaultDynamoDb(
|
|
99
|
+
_izContext,
|
|
100
|
+
saveFilePath
|
|
101
|
+
);
|
|
102
|
+
const defaultSnsInSqsResources =
|
|
103
|
+
createFindDataAndProcessLogicalDefaultSnsInSqs(_izContext, saveFilePath);
|
|
104
|
+
const defaultSnsOutResources =
|
|
105
|
+
createDefaultSnsOutForFindDataAndProcessLogical(_izContext, saveFilePath);
|
|
106
|
+
const snsInSqsResources = createSourceSnsAndSqs(_izContext, saveFilePath);
|
|
107
|
+
const snsOutResources = createDataForCreateSourceSnsOut(
|
|
108
|
+
_izContext,
|
|
109
|
+
saveFilePath
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
const dynamoDbResourcePerRelationshipLink = createDynamoPerRelationshipLink(
|
|
113
|
+
_izContext,
|
|
114
|
+
allLocalRelationshipSchema,
|
|
115
|
+
saveFilePath
|
|
116
|
+
);
|
|
117
|
+
// Add default resources to parameter list
|
|
118
|
+
createSourceParams.push(
|
|
119
|
+
...defaultDynamoDbResources,
|
|
120
|
+
...defaultSnsInSqsResources,
|
|
121
|
+
...defaultSnsOutResources,
|
|
122
|
+
...snsInSqsResources,
|
|
123
|
+
...snsOutResources
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
if (allLocalRelationshipSchema.length) {
|
|
127
|
+
createSourceParams.push(...dynamoDbResourcePerRelationshipLink);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// console.log("createSourceParams before filter", createSourceParams)
|
|
131
|
+
const filteredCreateSourceParams = await filterCreateResourceYaml(
|
|
132
|
+
_izContext,
|
|
133
|
+
createSourceParams,
|
|
134
|
+
objSchemaPath
|
|
135
|
+
);
|
|
136
|
+
|
|
137
|
+
// console.log("filteredCreateSourceParams", filteredCreateSourceParams);
|
|
138
|
+
|
|
139
|
+
return filteredCreateSourceParams;
|
|
140
|
+
} catch (error) {
|
|
141
|
+
_izContext.logger.error(
|
|
142
|
+
'Error generating code with template resourceYaml: ',
|
|
143
|
+
error
|
|
144
|
+
);
|
|
145
|
+
return [];
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export default generateCodeWithTemplate;
|
package/src/TemplateData/resourceYaml/sns-in-sqs/defaultSnsInSqsForFindDataAndProcessLogical.js
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (C) 2020 Sven Mason <http://izara.io>
|
|
3
|
+
|
|
4
|
+
This program is free software: you can redistribute it and/or modify
|
|
5
|
+
it under the terms of the GNU Affero General Public License as
|
|
6
|
+
published by the Free Software Foundation, either version 3 of the
|
|
7
|
+
License, or (at your option) any later version.
|
|
8
|
+
|
|
9
|
+
This program is distributed in the hope that it will be useful,
|
|
10
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
GNU Affero General Public License for more details.
|
|
13
|
+
|
|
14
|
+
You should have received a copy of the GNU Affero General Public License
|
|
15
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import path from 'path';
|
|
19
|
+
import { fileURLToPath } from 'url';
|
|
20
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
21
|
+
const __dirname = path.dirname(__filename);
|
|
22
|
+
|
|
23
|
+
import consts from '../../../libs/Consts.js';
|
|
24
|
+
import utils from '../../../libs/Utils.js';
|
|
25
|
+
|
|
26
|
+
const { SOURCE_PATH, SAVE_FILE_NAME, FUNCTION_NAME, HANDLER } = consts;
|
|
27
|
+
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = utils;
|
|
28
|
+
|
|
29
|
+
const snsTemplatePath = path.join(__dirname, './snsTemplate.ejs');
|
|
30
|
+
const sqsTemplatePath = path.join(__dirname, './sqsTemplate.ejs');
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* create data for dynamoDbYaml tempalte from objectSchema
|
|
34
|
+
* return array of dynamoDb data
|
|
35
|
+
* because one objectSchema can create multiple dynamoDb table
|
|
36
|
+
*
|
|
37
|
+
* @param {Object} _izContext
|
|
38
|
+
* @param {String} saveFilePath
|
|
39
|
+
* @returns {Object[]} - data of multiple dynamoDb template
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
function createDataForDefaultSnsInSqs(_izContext, srcPath) {
|
|
43
|
+
let resultsForCreateDefaultSnsInSqs = [];
|
|
44
|
+
const defaultSnsInSqsDataList = [];
|
|
45
|
+
const setting = {
|
|
46
|
+
initialData: 'Resources:\n',
|
|
47
|
+
savePath: path.join(srcPath, SOURCE_PATH.resourceYaml),
|
|
48
|
+
saveFileName: SAVE_FILE_NAME.snsInSqsYaml,
|
|
49
|
+
fileExtension: '.yml',
|
|
50
|
+
isAppend: true
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
// GCTpBasTestInPersonCreate => GCTpBas_Test_PersonCreate_In
|
|
54
|
+
defaultSnsInSqsDataList.push(
|
|
55
|
+
{
|
|
56
|
+
queueName: upperCase(FUNCTION_NAME.findData)
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
queueName: upperCase(FUNCTION_NAME.processLogical)
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
queueName: upperCase(FUNCTION_NAME.paginateProcessLogical)
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
for (let defaultSnsInSqsData of defaultSnsInSqsDataList) {
|
|
67
|
+
resultsForCreateDefaultSnsInSqs.push({
|
|
68
|
+
templatePath: snsTemplatePath,
|
|
69
|
+
templateData: defaultSnsInSqsData,
|
|
70
|
+
setting: setting
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
let defaultDsqQueueDataList = [
|
|
75
|
+
{
|
|
76
|
+
queueName:
|
|
77
|
+
upperCase(FUNCTION_NAME.paginateProcessLogical) +
|
|
78
|
+
upperCase(HANDLER.hdrDsq)
|
|
79
|
+
}
|
|
80
|
+
];
|
|
81
|
+
for (let defaultDsqQueueData of defaultDsqQueueDataList) {
|
|
82
|
+
resultsForCreateDefaultSnsInSqs.push({
|
|
83
|
+
templatePath: sqsTemplatePath,
|
|
84
|
+
templateData: defaultDsqQueueData,
|
|
85
|
+
setting: setting
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
return resultsForCreateDefaultSnsInSqs;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export default createDataForDefaultSnsInSqs;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (C) 2020 Sven Mason <http://izara.io>
|
|
3
|
+
|
|
4
|
+
This program is free software: you can redistribute it and/or modify
|
|
5
|
+
it under the terms of the GNU Affero General Public License as
|
|
6
|
+
published by the Free Software Foundation, either version 3 of the
|
|
7
|
+
License, or (at your option) any later version.
|
|
8
|
+
|
|
9
|
+
This program is distributed in the hope that it will be useful,
|
|
10
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
GNU Affero General Public License for more details.
|
|
13
|
+
|
|
14
|
+
You should have received a copy of the GNU Affero General Public License
|
|
15
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import path from 'path';
|
|
19
|
+
import { fileURLToPath } from 'url';
|
|
20
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
21
|
+
const __dirname = path.dirname(__filename);
|
|
22
|
+
|
|
23
|
+
import consts from '../../../libs/Consts.js';
|
|
24
|
+
import utils from '../../../libs/Utils.js';
|
|
25
|
+
const {
|
|
26
|
+
ACTIONS,
|
|
27
|
+
HANDLER,
|
|
28
|
+
SOURCE_PATH,
|
|
29
|
+
DEFAULT_HANDLER_PER_ACTION,
|
|
30
|
+
SAVE_FILE_NAME
|
|
31
|
+
} = consts;
|
|
32
|
+
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = utils;
|
|
33
|
+
|
|
34
|
+
const snsTemplatePath = path.join(__dirname, './snsTemplate.ejs');
|
|
35
|
+
const sqsTemplatePath = path.join(__dirname, './sqsTemplate.ejs');
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* create data for dynamoDbYaml tempalte from objectSchema
|
|
39
|
+
* return array of dynamoDb data
|
|
40
|
+
* because one objectSchema can create multiple dynamoDb table
|
|
41
|
+
*
|
|
42
|
+
* @param {Object} _izContext
|
|
43
|
+
* @param {Object} objectSchema
|
|
44
|
+
* @returns {Object[]} - data of multiple dynamoDb template
|
|
45
|
+
*/
|
|
46
|
+
|
|
47
|
+
function dataForCreateSnsAndSqsQueueFromObjectSchema(_izContext) {
|
|
48
|
+
const snsAndSqsDataArray = [];
|
|
49
|
+
for (const action of Object.values(ACTIONS)) {
|
|
50
|
+
for (const handler of DEFAULT_HANDLER_PER_ACTION[action]) {
|
|
51
|
+
if (handler === HANDLER.hdrSqs) {
|
|
52
|
+
const snsAndSqsData = {
|
|
53
|
+
queueName: upperCase(action)
|
|
54
|
+
};
|
|
55
|
+
snsAndSqsData.queueName && snsAndSqsDataArray.push(snsAndSqsData);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return snsAndSqsDataArray;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const createSourceSnsAndSqs = (_izContext, srcPath) => {
|
|
63
|
+
let resultsForCreateSnsAndSqsSource = new Set();
|
|
64
|
+
const snsAndSqsDataList = dataForCreateSnsAndSqsQueueFromObjectSchema(
|
|
65
|
+
_izContext,
|
|
66
|
+
srcPath
|
|
67
|
+
);
|
|
68
|
+
for (let snsAndSqsData of snsAndSqsDataList) {
|
|
69
|
+
resultsForCreateSnsAndSqsSource.add({
|
|
70
|
+
templatePath: snsTemplatePath,
|
|
71
|
+
templateData: snsAndSqsData,
|
|
72
|
+
setting: {
|
|
73
|
+
initialData: 'Resources:\n',
|
|
74
|
+
savePath: path.join(srcPath, SOURCE_PATH.resourceYaml),
|
|
75
|
+
saveFileName: SAVE_FILE_NAME.snsInSqsYaml,
|
|
76
|
+
fileExtension: '.yml',
|
|
77
|
+
isAppend: true
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
// console.log("resultsForCreateSnsAndSqsSource", resultsForCreateSnsAndSqsSource)
|
|
82
|
+
return [...resultsForCreateSnsAndSqsSource];
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export default createSourceSnsAndSqs;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
##===== [Create topic in]
|
|
2
|
+
In<%- queueName %>:
|
|
3
|
+
Type: AWS::SNS::Topic
|
|
4
|
+
Properties:
|
|
5
|
+
DisplayName: "SNS Message in"
|
|
6
|
+
TopicName: ${self:custom.iz_serviceTag}_${self:custom.iz_stage}_<%- queueName %>_In
|
|
7
|
+
##===== SNS Subscription
|
|
8
|
+
##===== [Topic In]
|
|
9
|
+
SubscriptionIn<%- queueName %>:
|
|
10
|
+
Type: AWS::SNS::Subscription
|
|
11
|
+
Properties:
|
|
12
|
+
TopicArn: !Ref In<%- queueName %>
|
|
13
|
+
Endpoint: "arn:aws:sqs:${self:custom.iz_region}:${self:custom.iz_accountId}:${self:custom.iz_resourcePrefix}<%- queueName %>HdrSqs"
|
|
14
|
+
Protocol: "sqs"
|
|
15
|
+
##===== [Queue]
|
|
16
|
+
<%- queueName %>HdrSqs:
|
|
17
|
+
Type: "AWS::SQS::Queue"
|
|
18
|
+
Properties:
|
|
19
|
+
QueueName: ${self:custom.iz_resourcePrefix}<%- queueName %>HdrSqs
|
|
20
|
+
RedrivePolicy:
|
|
21
|
+
deadLetterTargetArn:
|
|
22
|
+
# !GetAtt
|
|
23
|
+
Fn::GetAtt:
|
|
24
|
+
- <%- queueName %>HdrSqsDLQ
|
|
25
|
+
- Arn
|
|
26
|
+
maxReceiveCount: 3
|
|
27
|
+
VisibilityTimeout: 120
|
|
28
|
+
##==== [QueueDLQ]
|
|
29
|
+
<%- queueName %>HdrSqsDLQ:
|
|
30
|
+
Type: AWS::SQS::Queue
|
|
31
|
+
Properties:
|
|
32
|
+
QueueName: ${self:custom.iz_resourcePrefix}<%- queueName %>HdrSqsDLQ
|
|
33
|
+
##==== [QueuePolicy]
|
|
34
|
+
<%- queueName %>HdrSqsPolicy:
|
|
35
|
+
Type: AWS::SQS::QueuePolicy
|
|
36
|
+
Properties:
|
|
37
|
+
PolicyDocument:
|
|
38
|
+
Version: "2012-10-17"
|
|
39
|
+
Statement:
|
|
40
|
+
- Sid: "allow-sns-messages"
|
|
41
|
+
Effect: Allow
|
|
42
|
+
Principal: "*"
|
|
43
|
+
Resource:
|
|
44
|
+
# !GetAtt
|
|
45
|
+
Fn::GetAtt:
|
|
46
|
+
- <%- queueName %>HdrSqs
|
|
47
|
+
- Arn
|
|
48
|
+
Action: "SQS:SendMessage"
|
|
49
|
+
Queues:
|
|
50
|
+
- Ref: <%- queueName %>HdrSqs
|
|
51
|
+
#<#<%- firstLetterUpperCase(queueName) %>QueueSetting#>
|
|
52
|
+
#<#/<%- firstLetterUpperCase(queueName) %>QueueSetting#>
|
|
53
|
+
|
|
54
|
+
<%_ function firstLetterUpperCase(text){
|
|
55
|
+
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
56
|
+
} _%>
|
|
57
|
+
<%_ function firstLetterLowerCase(str) {
|
|
58
|
+
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
59
|
+
} _%>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#------- queue ---------
|
|
2
|
+
<%- queueName %>:
|
|
3
|
+
Type: "AWS::SQS::Queue"
|
|
4
|
+
Properties:
|
|
5
|
+
QueueName: ${self:custom.iz_resourcePrefix}<%- queueName %>
|
|
6
|
+
RedrivePolicy:
|
|
7
|
+
deadLetterTargetArn: #!GetAtt
|
|
8
|
+
Fn::GetAtt:
|
|
9
|
+
- <%- queueName %>DLQ
|
|
10
|
+
- Arn
|
|
11
|
+
maxReceiveCount: 3
|
|
12
|
+
VisibilityTimeout: 120
|
|
13
|
+
|
|
14
|
+
<%- queueName %>DLQ:
|
|
15
|
+
Type: AWS::SQS::Queue
|
|
16
|
+
Properties:
|
|
17
|
+
QueueName: ${self:custom.iz_resourcePrefix}<%- queueName %>DLQ
|
|
18
|
+
|
|
19
|
+
<%- queueName %>Policy:
|
|
20
|
+
Type: AWS::SQS::QueuePolicy
|
|
21
|
+
Properties:
|
|
22
|
+
PolicyDocument:
|
|
23
|
+
Version: "2012-10-17"
|
|
24
|
+
Statement:
|
|
25
|
+
- Sid: "allow-sns-messages"
|
|
26
|
+
Effect: Allow
|
|
27
|
+
Principal: "*"
|
|
28
|
+
Resource: #!GetAtt
|
|
29
|
+
Fn::GetAtt:
|
|
30
|
+
- <%- queueName %>
|
|
31
|
+
- Arn
|
|
32
|
+
Action: "SQS:SendMessage"
|
|
33
|
+
Queues:
|
|
34
|
+
- Ref: <%- queueName %>
|
|
35
|
+
#<#<%- firstLetterUpperCase(queueName) %>QueueSetting#>
|
|
36
|
+
#<#/<%- firstLetterUpperCase(queueName) %>QueueSetting#>
|
|
37
|
+
|
|
38
|
+
<%_ function firstLetterUpperCase(text){
|
|
39
|
+
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
40
|
+
} _%>
|
|
41
|
+
<%_ function firstLetterLowerCase(str) {
|
|
42
|
+
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
43
|
+
} _%>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (C) 2020 Sven Mason <http://izara.io>
|
|
3
|
+
|
|
4
|
+
This program is free software: you can redistribute it and/or modify
|
|
5
|
+
it under the terms of the GNU Affero General Public License as
|
|
6
|
+
published by the Free Software Foundation, either version 3 of the
|
|
7
|
+
License, or (at your option) any later version.
|
|
8
|
+
|
|
9
|
+
This program is distributed in the hope that it will be useful,
|
|
10
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
GNU Affero General Public License for more details.
|
|
13
|
+
|
|
14
|
+
You should have received a copy of the GNU Affero General Public License
|
|
15
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import path from 'path';
|
|
19
|
+
import { fileURLToPath } from 'url';
|
|
20
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
21
|
+
const __dirname = path.dirname(__filename);
|
|
22
|
+
|
|
23
|
+
import consts from '../../../libs/Consts.js';
|
|
24
|
+
import utils from '../../../libs/Utils.js';
|
|
25
|
+
|
|
26
|
+
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = utils;
|
|
27
|
+
const {
|
|
28
|
+
DEFAULT_HANDLER_PER_ACTION,
|
|
29
|
+
SOURCE_PATH,
|
|
30
|
+
SAVE_FILE_NAME,
|
|
31
|
+
ACTIONS,
|
|
32
|
+
HANDLER
|
|
33
|
+
} = consts;
|
|
34
|
+
|
|
35
|
+
const templatePath = path.join(__dirname, 'template.ejs');
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* receive objectSchema
|
|
39
|
+
* create data for hdrInv template
|
|
40
|
+
*
|
|
41
|
+
* @return {{ templatePath, templateData, setting } }
|
|
42
|
+
*/
|
|
43
|
+
function createDataForCreateSourceSnsOut(_izContext) {
|
|
44
|
+
const createSourceArray = [];
|
|
45
|
+
for (const action of Object.values(ACTIONS)) {
|
|
46
|
+
for (const handler of DEFAULT_HANDLER_PER_ACTION[action]) {
|
|
47
|
+
if (handler === HANDLER.hdrSqs) {
|
|
48
|
+
const snsOut = {
|
|
49
|
+
queueName: upperCase(action)
|
|
50
|
+
};
|
|
51
|
+
snsOut.queueName && createSourceArray.push(snsOut);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
// console.log("createSourceArray", createSourceArray)
|
|
56
|
+
return createSourceArray;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function createSourceSnsOut(_izContext, srcPath) {
|
|
60
|
+
let resultsForCreateSnsOut = [];
|
|
61
|
+
const snsOutDataList = createDataForCreateSourceSnsOut(_izContext);
|
|
62
|
+
for (let snsOutData of snsOutDataList) {
|
|
63
|
+
resultsForCreateSnsOut.push({
|
|
64
|
+
templatePath: templatePath,
|
|
65
|
+
templateData: snsOutData,
|
|
66
|
+
setting: {
|
|
67
|
+
initialData: 'Resources:\n',
|
|
68
|
+
savePath: path.join(srcPath, SOURCE_PATH.resourceYaml),
|
|
69
|
+
saveFileName: SAVE_FILE_NAME.snsOutYaml,
|
|
70
|
+
fileExtension: '.yml',
|
|
71
|
+
isAppend: true
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
return resultsForCreateSnsOut;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export default createSourceSnsOut;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (C) 2020 Sven Mason <http://izara.io>
|
|
3
|
+
|
|
4
|
+
This program is free software: you can redistribute it and/or modify
|
|
5
|
+
it under the terms of the GNU Affero General Public License as
|
|
6
|
+
published by the Free Software Foundation, either version 3 of the
|
|
7
|
+
License, or (at your option) any later version.
|
|
8
|
+
|
|
9
|
+
This program is distributed in the hope that it will be useful,
|
|
10
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
GNU Affero General Public License for more details.
|
|
13
|
+
|
|
14
|
+
You should have received a copy of the GNU Affero General Public License
|
|
15
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import path from 'path';
|
|
19
|
+
import { fileURLToPath } from 'url';
|
|
20
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
21
|
+
const __dirname = path.dirname(__filename);
|
|
22
|
+
|
|
23
|
+
import consts from '../../../libs/Consts.js';
|
|
24
|
+
|
|
25
|
+
const { SOURCE_PATH, SAVE_FILE_NAME } = consts;
|
|
26
|
+
const templatePath = path.join(__dirname, 'template.ejs');
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* create data for template.ejs
|
|
30
|
+
* return array of defaultSnsOutData
|
|
31
|
+
* because must create for FindData and ProcessLogical
|
|
32
|
+
*
|
|
33
|
+
* @param {Object} _izContext
|
|
34
|
+
* @param {String} saveFilePath
|
|
35
|
+
* @returns {Object[]} - data of multiple defaultSnsOutData
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
function createDataForDefaultSnsOut(_izContext, srcPath) {
|
|
39
|
+
let resultsForCreateDefaultSnsOut = [];
|
|
40
|
+
const defaultSnsOutDataList = [
|
|
41
|
+
{
|
|
42
|
+
queueName: 'FindDataComplete'
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
queueName: 'ProcessLogicalComplete'
|
|
46
|
+
}
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
for (let defaultSnsOutData of defaultSnsOutDataList) {
|
|
50
|
+
resultsForCreateDefaultSnsOut.push({
|
|
51
|
+
templatePath: templatePath,
|
|
52
|
+
templateData: defaultSnsOutData,
|
|
53
|
+
setting: {
|
|
54
|
+
initialData: 'Resources:\n',
|
|
55
|
+
savePath: path.join(srcPath, SOURCE_PATH.resourceYaml),
|
|
56
|
+
saveFileName: SAVE_FILE_NAME.snsOutYaml,
|
|
57
|
+
fileExtension: '.yml',
|
|
58
|
+
isAppend: true
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
return resultsForCreateDefaultSnsOut;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export default createDataForDefaultSnsOut;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
##--------- [Create Topic Out]
|
|
2
|
+
Out<%- firstLetterUpperCase(queueName) %>:
|
|
3
|
+
Type: AWS::SNS::Topic
|
|
4
|
+
Properties:
|
|
5
|
+
DisplayName: "SNS Message out"
|
|
6
|
+
TopicName: ${self:custom.iz_serviceTag}_${self:custom.iz_stage}_<%- firstLetterUpperCase(queueName) %>_Out
|
|
7
|
+
|
|
8
|
+
<%_ function firstLetterUpperCase(text) {
|
|
9
|
+
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
10
|
+
} _%>
|