@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,23 @@
|
|
|
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
|
+
export const IntTestConfig = {
|
|
19
|
+
TemplateAndData: {
|
|
20
|
+
IntTest: './TemplateData/IntTest/generateTemplateData.js'
|
|
21
|
+
},
|
|
22
|
+
Plugin: {}
|
|
23
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
export const schemaConfig = {
|
|
19
|
+
TemplateAndData: {
|
|
20
|
+
propertyValue: './TemplateData/propertyValueSchema/generateTemplateData.js'
|
|
21
|
+
},
|
|
22
|
+
Plugin: {}
|
|
23
|
+
};
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright(C) 2021 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 fs from 'fs';
|
|
19
|
+
import ejs from 'ejs';
|
|
20
|
+
import { join } from 'path';
|
|
21
|
+
import beautify from 'js-beautify/js/index.js';
|
|
22
|
+
|
|
23
|
+
const beautifySetting = {
|
|
24
|
+
indent_size: '2',
|
|
25
|
+
indent_char: ' ',
|
|
26
|
+
max_preserve_newlines: '0',
|
|
27
|
+
// "preserve_newlines": true,
|
|
28
|
+
keep_array_indentation: true,
|
|
29
|
+
indent_scripts: 'separate',
|
|
30
|
+
brace_style: ['preserve-inline', 'none'],
|
|
31
|
+
space_before_conditional: true
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const TAG_CLASSES = {
|
|
35
|
+
doubleTag: 'doubleTag',
|
|
36
|
+
singleTag: 'singleTag',
|
|
37
|
+
nameTag: 'nameTag',
|
|
38
|
+
anyTag: 'anyTag',
|
|
39
|
+
anyDoubleTag: 'anyDoubleTag',
|
|
40
|
+
ymlDoubleTag: 'ymlDoubleTag',
|
|
41
|
+
ymlAnyDoubleTag: 'ymlAnyDoubleTag'
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
function tagList(tagClass = TAG_CLASSES.singleTag, tagName) {
|
|
45
|
+
return {
|
|
46
|
+
// return regex depend on tagClass
|
|
47
|
+
[TAG_CLASSES.singleTag]: new RegExp(`\/\/\\(<${tagName}>\\)`, 'gm'), // match //(<tagName>)
|
|
48
|
+
[TAG_CLASSES.doubleTag]: new RegExp(
|
|
49
|
+
`\/\/\\(<${tagName}>\\)([\\s\\S]*?)\/\/\\(<\\/${tagName}>\\)`,
|
|
50
|
+
'gm'
|
|
51
|
+
), // get data between tag -> //(<tagName>) data //(</tagName>)
|
|
52
|
+
[TAG_CLASSES.nameTag]: new RegExp(`__${tagName}`, 'gm'), // match //(<tagName>)
|
|
53
|
+
[TAG_CLASSES.anyTag]: new RegExp(`\/\/\\(<([^>]+)>\\)`, 'g'), // match //(<anyname>)
|
|
54
|
+
[TAG_CLASSES.anyDoubleTag]: new RegExp(
|
|
55
|
+
'\/\/\\(<(\\w+)>\\)([\\s\\S]*?)\/\/\\(<\/\\1>\\)',
|
|
56
|
+
'gm'
|
|
57
|
+
),
|
|
58
|
+
[TAG_CLASSES.ymlDoubleTag]: new RegExp(
|
|
59
|
+
`\#<#${tagName}#>([\\s\\S]*?)#<#\/${tagName}#>`,
|
|
60
|
+
'gm'
|
|
61
|
+
), // match #<#tag#> #<#/tag#>
|
|
62
|
+
[TAG_CLASSES.ymlAnyDoubleTag]: new RegExp(
|
|
63
|
+
`\#<#(\\w+)#>([\\s\\S]*?)#<#\/\\1#>`,
|
|
64
|
+
'gm'
|
|
65
|
+
) // get tagName from doubleTag #<#tagName#> #<#/tagName#>
|
|
66
|
+
}[tagClass];
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
* @param {string} template
|
|
72
|
+
* @param {object} data
|
|
73
|
+
* @returns
|
|
74
|
+
*/
|
|
75
|
+
function generateDataFromTemplate(template, data) {
|
|
76
|
+
let dataToSave = ejs.compile(template)(data);
|
|
77
|
+
return dataToSave;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* generate code from template and data then save generated data
|
|
82
|
+
*
|
|
83
|
+
* @param {string} template
|
|
84
|
+
* @param {object} data
|
|
85
|
+
* @param {object} setting
|
|
86
|
+
* @param {string} setting.savePath
|
|
87
|
+
* @param {string} [setting.hookPath]
|
|
88
|
+
* @param {string} setting.saveFileName
|
|
89
|
+
* @param {string} setting.fileExtension
|
|
90
|
+
* @param {boolean} setting.isAppend
|
|
91
|
+
* @param {string} setting.initialData // initialData can use when isAppend = true
|
|
92
|
+
* @returns
|
|
93
|
+
*/
|
|
94
|
+
async function createSource(
|
|
95
|
+
template,
|
|
96
|
+
data,
|
|
97
|
+
{
|
|
98
|
+
savePath,
|
|
99
|
+
hookPath,
|
|
100
|
+
saveFileName,
|
|
101
|
+
fileExtension,
|
|
102
|
+
initialData,
|
|
103
|
+
isAppend = false,
|
|
104
|
+
checkCreateSourcePass = false,
|
|
105
|
+
generateHookFile = true
|
|
106
|
+
}
|
|
107
|
+
) {
|
|
108
|
+
try {
|
|
109
|
+
if (checkCreateSourcePass) {
|
|
110
|
+
try {
|
|
111
|
+
generateDataFromTemplate(template, data);
|
|
112
|
+
return [true, {}];
|
|
113
|
+
} catch (errors) {
|
|
114
|
+
return [false, errors];
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
let dataToSave = generateDataFromTemplate(template, data);
|
|
119
|
+
|
|
120
|
+
let anyDoubleTagClass;
|
|
121
|
+
let doubleTagClass;
|
|
122
|
+
|
|
123
|
+
if (fileExtension === '.js') {
|
|
124
|
+
anyDoubleTagClass = TAG_CLASSES.anyDoubleTag;
|
|
125
|
+
doubleTagClass = TAG_CLASSES.doubleTag;
|
|
126
|
+
} else if (fileExtension === '.yml') {
|
|
127
|
+
anyDoubleTagClass = TAG_CLASSES.ymlAnyDoubleTag;
|
|
128
|
+
doubleTagClass = TAG_CLASSES.ymlDoubleTag;
|
|
129
|
+
}
|
|
130
|
+
let hookDataPath = hookPath ? hookPath : join(savePath, '../hook/');
|
|
131
|
+
|
|
132
|
+
if (!fs.existsSync(savePath)) fs.mkdirSync(savePath, { recursive: true });
|
|
133
|
+
if (generateHookFile)
|
|
134
|
+
if (!fs.existsSync(hookDataPath))
|
|
135
|
+
fs.mkdirSync(hookDataPath, { recursive: true });
|
|
136
|
+
|
|
137
|
+
// check saveFileName for Hook exists
|
|
138
|
+
if (
|
|
139
|
+
fs.existsSync(`${hookDataPath}${saveFileName}${fileExtension}`.trim())
|
|
140
|
+
) {
|
|
141
|
+
const hookData = fs.readFileSync(
|
|
142
|
+
`${hookDataPath}${saveFileName}${fileExtension}`,
|
|
143
|
+
'utf8'
|
|
144
|
+
);
|
|
145
|
+
|
|
146
|
+
//replace data in tag from hook file to actual file
|
|
147
|
+
let dataAfterHook = dataToSave.replace(
|
|
148
|
+
tagList(anyDoubleTagClass),
|
|
149
|
+
(match, tagName, content) => {
|
|
150
|
+
let hookRegex = tagList(doubleTagClass, tagName);
|
|
151
|
+
let replaceData = hookData.match(hookRegex);
|
|
152
|
+
|
|
153
|
+
if (replaceData) {
|
|
154
|
+
return replaceData;
|
|
155
|
+
} else {
|
|
156
|
+
return match;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
);
|
|
160
|
+
|
|
161
|
+
dataAfterHook =
|
|
162
|
+
fileExtension === '.js'
|
|
163
|
+
? beautify(dataAfterHook, beautifySetting)
|
|
164
|
+
: dataAfterHook;
|
|
165
|
+
if (isAppend) {
|
|
166
|
+
if (
|
|
167
|
+
!fs.existsSync(`${savePath}${saveFileName}${fileExtension}`) &&
|
|
168
|
+
initialData
|
|
169
|
+
) {
|
|
170
|
+
fs.writeFileSync(
|
|
171
|
+
`${savePath}${saveFileName}${fileExtension}`.trim(),
|
|
172
|
+
initialData + dataAfterHook + '\n\n',
|
|
173
|
+
'utf8'
|
|
174
|
+
);
|
|
175
|
+
} else {
|
|
176
|
+
fs.appendFileSync(
|
|
177
|
+
`${savePath}${saveFileName}${fileExtension}`.trim(),
|
|
178
|
+
dataAfterHook + '\n\n',
|
|
179
|
+
'utf8'
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
} else {
|
|
183
|
+
fs.writeFileSync(
|
|
184
|
+
`${savePath}${saveFileName}${fileExtension}`.trim(),
|
|
185
|
+
dataAfterHook,
|
|
186
|
+
'utf8'
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
} else {
|
|
190
|
+
dataToSave =
|
|
191
|
+
fileExtension === '.js'
|
|
192
|
+
? beautify(dataToSave, beautifySetting)
|
|
193
|
+
: dataToSave;
|
|
194
|
+
if (isAppend) {
|
|
195
|
+
if (
|
|
196
|
+
!fs.existsSync(`${savePath}${saveFileName}${fileExtension}`) &&
|
|
197
|
+
initialData
|
|
198
|
+
) {
|
|
199
|
+
fs.writeFileSync(
|
|
200
|
+
`${savePath}${saveFileName}${fileExtension}`.trim(),
|
|
201
|
+
initialData + dataToSave + '\n\n',
|
|
202
|
+
'utf8'
|
|
203
|
+
);
|
|
204
|
+
} else {
|
|
205
|
+
fs.appendFileSync(
|
|
206
|
+
`${savePath}${saveFileName}${fileExtension}`.trim(),
|
|
207
|
+
dataToSave + '\n\n',
|
|
208
|
+
'utf8'
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
} else {
|
|
212
|
+
fs.writeFileSync(
|
|
213
|
+
`${savePath}${saveFileName}${fileExtension}`.trim(),
|
|
214
|
+
dataToSave,
|
|
215
|
+
'utf8'
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
return;
|
|
221
|
+
} catch (err) {
|
|
222
|
+
console.log('error createSource: ', err); // generate
|
|
223
|
+
throw err;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
export default createSource;
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
export const templateConfig = {
|
|
19
|
+
TemplateAndData: {
|
|
20
|
+
// ** PerActionEndpoint **
|
|
21
|
+
// perActionEndpoint: './TemplateData/perActionEndpoint/generateTemplateData.js',
|
|
22
|
+
|
|
23
|
+
// ** endpoint per service **
|
|
24
|
+
endpointPerServiceConfig:
|
|
25
|
+
'./TemplateData/EndpointPerService/generateTemplateData.js',
|
|
26
|
+
|
|
27
|
+
// ** perActionComplete **
|
|
28
|
+
perActionComplete: './TemplateData/perActionComplete/generateTemplateData.js',
|
|
29
|
+
|
|
30
|
+
// ** Resource YAML **
|
|
31
|
+
resourceYaml: './TemplateData/resourceYaml/generateTemplateData.js',
|
|
32
|
+
|
|
33
|
+
// ** External Service **
|
|
34
|
+
externalService: './TemplateData/externalService/generateTemplateData.js',
|
|
35
|
+
|
|
36
|
+
// ** Relationship Per Action **
|
|
37
|
+
relationshipPerAction: './TemplateData/relationshipPerAction/generateTemplateData.js',
|
|
38
|
+
|
|
39
|
+
// ** Find Data **
|
|
40
|
+
findData: './TemplateData/findData/generateTemplateData.js',
|
|
41
|
+
|
|
42
|
+
// ** Process Logical **
|
|
43
|
+
processLogical: './TemplateData/processLogical/generateTemplateData.js',
|
|
44
|
+
|
|
45
|
+
// ** Process Logical Paginate **
|
|
46
|
+
processLogicalPaginate: './TemplateData/processLogicalPagination/generateTemplateData.js',
|
|
47
|
+
|
|
48
|
+
// ** flowSchema **
|
|
49
|
+
flowSchema: './TemplateData/flowSchema/generateTemplateData.js',
|
|
50
|
+
|
|
51
|
+
// ** Auth **
|
|
52
|
+
auth: './TemplateData/Auth/generateTemplateData.js'
|
|
53
|
+
},
|
|
54
|
+
Plugin: {}
|
|
55
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
const { SOURCE_PATH } = consts;
|
|
25
|
+
const templatePath = path.join(__dirname, 'template.ejs');
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* receive objectSchema
|
|
29
|
+
* create data for hdrInv template
|
|
30
|
+
*
|
|
31
|
+
* @param {Object} objectSchema
|
|
32
|
+
* @return {{ templatePath, templateData, setting } }
|
|
33
|
+
*/
|
|
34
|
+
function data(_izContext, srcPath) {
|
|
35
|
+
return {
|
|
36
|
+
templatePath: templatePath,
|
|
37
|
+
templateData: {},
|
|
38
|
+
setting: {
|
|
39
|
+
savePath: path.join(srcPath, SOURCE_PATH.appYaml),
|
|
40
|
+
saveFileName: 'Authorizer',
|
|
41
|
+
fileExtension: '.yml',
|
|
42
|
+
isAppend: true
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export default data;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
authorizerServiceSchema:
|
|
2
|
+
type: request
|
|
3
|
+
functionArn: ${self:custom.iz_authorizerServiceSchemaV2}
|
|
4
|
+
identitySource:
|
|
5
|
+
- $request.header.Authorization
|
|
6
|
+
- $context.routeKey
|
|
7
|
+
resultTtlInSeconds: 300
|
|
8
|
+
|
|
9
|
+
authorizerIdentifiers:
|
|
10
|
+
type: request
|
|
11
|
+
functionArn: ${self:custom.iz_authorizerServiceSchemaV2}
|
|
12
|
+
identitySource:
|
|
13
|
+
- $request.header.Authorization
|
|
14
|
+
- $context.routeKey
|
|
15
|
+
- $request.querystring.identifiers
|
|
16
|
+
resultTtlInSeconds: 300
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
// Import handlers and generators
|
|
20
|
+
import generateAuth from './generateAuthYml/data.js';
|
|
21
|
+
|
|
22
|
+
// Import code libs generator
|
|
23
|
+
// const createGenerateCodeLibs = require('./libs/data');
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Generates code from templates based on object schemas
|
|
27
|
+
* @param {Object} _izContext - Context object
|
|
28
|
+
* @param {string} objSchemaPath - Path to object schema
|
|
29
|
+
* @returns {Promise<Array>} - Array of parameter objects for code generation
|
|
30
|
+
*/
|
|
31
|
+
async function generateCodeWithTemplate(_izContext, objSchemaPath) {
|
|
32
|
+
try {
|
|
33
|
+
const saveFilePath = join(objSchemaPath, `../`);
|
|
34
|
+
let authYamlFile = generateAuth(_izContext, saveFilePath);
|
|
35
|
+
|
|
36
|
+
const createSourceParams = [authYamlFile];
|
|
37
|
+
|
|
38
|
+
return createSourceParams;
|
|
39
|
+
} catch (error) {
|
|
40
|
+
_izContext.logger.error(
|
|
41
|
+
'Error generating code with template endpointPerService:',
|
|
42
|
+
error
|
|
43
|
+
);
|
|
44
|
+
return [];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export default generateCodeWithTemplate;
|
|
@@ -0,0 +1,127 @@
|
|
|
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
|
+
import { NoRetryError } from '@izara_project/izara-core-library-core';
|
|
20
|
+
import { getObjectSchema } from '@izara_project/izara-core-library-service-schemas';
|
|
21
|
+
// Import handlers and generators
|
|
22
|
+
|
|
23
|
+
import invHandler from './handler/inv/data.js';
|
|
24
|
+
import apiHandler from './handler/api/data.js';
|
|
25
|
+
import sqsHandler from './handler/sqs/data.js';
|
|
26
|
+
import dsqHandler from './handler/dsq/data.js';
|
|
27
|
+
import createMain from './mainFunction/create/data.js';
|
|
28
|
+
import updateMain from './mainFunction/update/data.js';
|
|
29
|
+
import getMain from './mainFunction/get/data.js';
|
|
30
|
+
import deleteMain from './mainFunction/delete/data.js';
|
|
31
|
+
import yamlGenerator from './yaml/data.js';
|
|
32
|
+
|
|
33
|
+
const modules = {
|
|
34
|
+
handlers: {
|
|
35
|
+
invHandler,
|
|
36
|
+
apiHandler,
|
|
37
|
+
sqsHandler,
|
|
38
|
+
dsqHandler
|
|
39
|
+
},
|
|
40
|
+
mainFunctions: {
|
|
41
|
+
createMain,
|
|
42
|
+
updateMain,
|
|
43
|
+
getMain,
|
|
44
|
+
deleteMain
|
|
45
|
+
},
|
|
46
|
+
// yamlGenerators: {
|
|
47
|
+
// inv: require('./yaml/inv/data'),
|
|
48
|
+
// api: require('./yaml/api/data'),
|
|
49
|
+
// sqs: require('./yaml/sqs/data'),
|
|
50
|
+
// dsq: require('./yaml/dsq/data')
|
|
51
|
+
// },
|
|
52
|
+
yamlGenerators: {
|
|
53
|
+
yamlGenerator
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
// Import code libs generator
|
|
58
|
+
// const createGenerateCodeLibs = require('./libs/data');
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Generates code from templates based on object schemas
|
|
62
|
+
* @param {Object} _izContext - Context object
|
|
63
|
+
* @param {string} objSchemaPath - Path to object schema
|
|
64
|
+
* @returns {Promise<Array>} - Array of parameter objects for code generation
|
|
65
|
+
*/
|
|
66
|
+
async function generateCodeWithTemplate(_izContext, objSchemaPath) {
|
|
67
|
+
try {
|
|
68
|
+
const saveFilePath = join(objSchemaPath, `../`);
|
|
69
|
+
const allObjSchemas =
|
|
70
|
+
await getObjectSchema.getAllLocalObjectSchemasWithHierarchy(
|
|
71
|
+
_izContext,
|
|
72
|
+
objSchemaPath
|
|
73
|
+
);
|
|
74
|
+
// console.log('allObjSchemas: ', allObjSchemas.records);
|
|
75
|
+
const createSourceParams = [];
|
|
76
|
+
|
|
77
|
+
for (const objectSchema of allObjSchemas.records) {
|
|
78
|
+
try {
|
|
79
|
+
// Generate handlers
|
|
80
|
+
const handlerParams = Object.entries(modules.handlers).flatMap(
|
|
81
|
+
([type, handlerFn]) => handlerFn(_izContext, saveFilePath)
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
// Generate main functions
|
|
85
|
+
const functionParams = (
|
|
86
|
+
await Promise.all(
|
|
87
|
+
Object.entries(modules.mainFunctions).map(([action, functionFn]) =>
|
|
88
|
+
functionFn(_izContext, saveFilePath)
|
|
89
|
+
)
|
|
90
|
+
)
|
|
91
|
+
).flat();
|
|
92
|
+
|
|
93
|
+
// Generate code libs
|
|
94
|
+
// const libsParam = createGenerateCodeLibs(_izContext, saveFilePath);
|
|
95
|
+
|
|
96
|
+
createSourceParams.push(...handlerParams, ...functionParams);
|
|
97
|
+
} catch (error) {
|
|
98
|
+
_izContext.logger.error(
|
|
99
|
+
`Error processing schema ${objectSchema.name || 'unknown'}: ${error}`
|
|
100
|
+
);
|
|
101
|
+
throw new NoRetryError(error);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
try {
|
|
105
|
+
// Generate function YAML files
|
|
106
|
+
const yamlParams = (
|
|
107
|
+
await Promise.all(
|
|
108
|
+
Object.entries(modules.yamlGenerators).map(([type, yamlFn]) =>
|
|
109
|
+
yamlFn(_izContext, allObjSchemas, saveFilePath)
|
|
110
|
+
)
|
|
111
|
+
)
|
|
112
|
+
).flat();
|
|
113
|
+
createSourceParams.push(...yamlParams);
|
|
114
|
+
} catch (error) {
|
|
115
|
+
_izContext.logger.error(`Error processing schema yaml ${error}`);
|
|
116
|
+
}
|
|
117
|
+
return createSourceParams;
|
|
118
|
+
} catch (error) {
|
|
119
|
+
_izContext.logger.error(
|
|
120
|
+
'Error generating code with template endpointPerService:',
|
|
121
|
+
error
|
|
122
|
+
);
|
|
123
|
+
return [];
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export default generateCodeWithTemplate;
|
|
@@ -0,0 +1,72 @@
|
|
|
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 { ACTIONS, HANDLER, DEFAULT_HANDLER_PER_ACTION, SOURCE_PATH } = consts;
|
|
26
|
+
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = utils;
|
|
27
|
+
|
|
28
|
+
const templatePath = path.join(__dirname, 'template.ejs');
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* receive objectSchema
|
|
32
|
+
* create data for hdrApi template
|
|
33
|
+
*
|
|
34
|
+
* @param {Object} objectSchema
|
|
35
|
+
* @return {{ templatePath, templateData, setting } }
|
|
36
|
+
*/
|
|
37
|
+
function data(_izContext, srcPath) {
|
|
38
|
+
let createSourceArray = [];
|
|
39
|
+
for (const action of Object.values(ACTIONS)) {
|
|
40
|
+
const defaultHandlers = DEFAULT_HANDLER_PER_ACTION[action];
|
|
41
|
+
for (const defaultHandler of defaultHandlers) {
|
|
42
|
+
if (defaultHandler === HANDLER.hdrApi) {
|
|
43
|
+
const createSourceParam = createParamForCreateSource(
|
|
44
|
+
action,
|
|
45
|
+
defaultHandler,
|
|
46
|
+
srcPath
|
|
47
|
+
);
|
|
48
|
+
createSourceParam && createSourceArray.push(createSourceParam);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
// console.log("createSourceArray::", JSON.stringify(createSourceArray, null, 2))
|
|
53
|
+
return createSourceArray;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function createParamForCreateSource(action, handler, srcPath) {
|
|
57
|
+
return {
|
|
58
|
+
templatePath: templatePath,
|
|
59
|
+
templateData: {
|
|
60
|
+
action: action,
|
|
61
|
+
handler
|
|
62
|
+
},
|
|
63
|
+
setting: {
|
|
64
|
+
savePath: path.join(srcPath, SOURCE_PATH.endpointPerService),
|
|
65
|
+
saveFileName: `${upperCase(action)}_${upperCase(handler)}`,
|
|
66
|
+
fileExtension: '.js',
|
|
67
|
+
isAppend: false
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export default data;
|