@izara_project/izara-core-generate-service-code 1.0.2 → 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/package.json +3 -3
- package/src/GenerateCode.js +5 -4
- package/src/GenerateResources.js +4 -3
- package/src/GenerateSchema.js +5 -4
- package/src/GenerateTests.js +6 -7
- package/src/TemplateConfig.js +18 -18
- package/src/TemplateData/EndpointPerService/generateTemplateData.js +1 -1
- package/src/TemplateData/EndpointPerService/mainFunction/create/template.ejs +6 -17
- package/src/TemplateData/EndpointPerService/mainFunction/delete/template.ejs +7 -12
- package/src/TemplateData/EndpointPerService/mainFunction/get/template.ejs +7 -10
- package/src/TemplateData/EndpointPerService/mainFunction/update/template.ejs +5 -17
- package/src/TemplateData/IntTest/generateResources/generateResources.js +4 -3
- package/src/TemplateData/IntTest/generateTests/events/data.js +3 -1
- package/src/TemplateData/IntTest/generateTests/generateTemplate.js +4 -2
- package/src/TemplateData/IntTest/generateTests/pathIntTest/data.js +2 -2
- package/src/TemplateData/IntTest/generateTests/tests/data.js +9 -8
- package/src/TemplateData/IntTest/libs/libs.js +4 -35
- package/src/TemplateData/IntTest/upload/uploadIntTest.js +4 -3
- package/src/TemplateData/externalService/lambdaRole/template.ejs +1 -3
- package/src/TemplateData/externalService/snsTopicSubscriptions/template.ejs +0 -2
- package/src/TemplateData/findData/findDataYaml/data.js +2 -1
- package/src/TemplateData/findData/mainFunction/data.js +1 -1
- package/src/TemplateData/flowSchema/CreateRecordComplete/functionYaml/data.js +9 -5
- package/src/TemplateData/flowSchema/CreateRecordComplete/handler/data.js +3 -3
- package/src/TemplateData/flowSchema/CreateRecordComplete/mainFunction/data.js +3 -3
- package/src/TemplateData/flowSchema/CreateRecordComplete/queue/data.js +3 -3
- package/src/TemplateData/flowSchema/components/upload/confirmReserved/functionYaml/data.js +11 -8
- package/src/TemplateData/flowSchema/components/upload/confirmReserved/handler/data.js +3 -3
- package/src/TemplateData/flowSchema/components/upload/confirmReserved/mainFunction/data.js +1 -1
- package/src/TemplateData/flowSchema/components/upload/confirmReserved/mainFunction/template.ejs +1 -1
- package/src/TemplateData/flowSchema/components/upload/confirmReserved/queue/data.js +3 -2
- package/src/TemplateData/flowSchema/components/upload/createObject/functionYaml/data.js +11 -7
- package/src/TemplateData/flowSchema/components/upload/createObject/handler/data.js +3 -3
- package/src/TemplateData/flowSchema/components/upload/createObject/mainFunction/data.js +4 -3
- package/src/TemplateData/flowSchema/components/upload/createObject/mainFunction/template.ejs +2 -2
- package/src/TemplateData/flowSchema/components/upload/createObjectComplete/functionYaml/data.js +9 -7
- package/src/TemplateData/flowSchema/components/upload/createObjectComplete/handler/data.js +3 -3
- package/src/TemplateData/flowSchema/components/upload/createObjectComplete/mainFunction/data.js +3 -3
- package/src/TemplateData/flowSchema/components/upload/createObjectComplete/sns-sqs/data.js +3 -3
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/functionYaml/data.js +11 -7
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/handler/data.js +3 -3
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/mainFunction/data.js +3 -3
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/mainFunction/template.ejs +2 -2
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/queue/data.js +2 -4
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/functionYaml/data.js +15 -9
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/handler/data.js +3 -3
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/mainFunction/data.js +2 -1
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/mainFunction/template.ejs +1 -1
- package/src/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/sqs/data.js +3 -5
- package/src/TemplateData/flowSchema/components/upload/processFile/functionYml/HdrS3/data.js +10 -5
- package/src/TemplateData/flowSchema/components/upload/processFile/handler/handlerS3/data.js +2 -1
- package/src/TemplateData/flowSchema/components/upload/processFile/mainFunction/data.js +2 -1
- package/src/TemplateData/flowSchema/components/upload/processFile/mainFunction/template.ejs +0 -2
- package/src/TemplateData/flowSchema/components/upload/processFile/queue/data.js +1 -1
- package/src/TemplateData/flowSchema/components/upload/relate/S3/data.js +1 -1
- package/src/TemplateData/flowSchema/components/upload/relate/libs/data.js +1 -1
- package/src/TemplateData/flowSchema/components/upload/relate/sns-out/data.js +2 -1
- package/src/TemplateData/flowSchema/components/websocket/connect/functionYaml/data.js +9 -4
- package/src/TemplateData/flowSchema/components/websocket/connect/handler/data.js +1 -1
- package/src/TemplateData/flowSchema/components/websocket/dynamoDb/ReservedTableData.js +1 -2
- package/src/TemplateData/flowSchema/components/websocket/dynamoDb/WebSocketTaskData.js +1 -1
- package/src/TemplateData/flowSchema/components/websocket/dynamoDb/userUploadRecords.js +1 -1
- package/src/TemplateData/flowSchema/dynamoDb/data.js +2 -1
- package/src/TemplateData/flowSchema/eventBridge/functionYaml/data.js +9 -4
- package/src/TemplateData/flowSchema/eventBridge/handler/inv/data.js +2 -1
- package/src/TemplateData/flowSchema/eventBridge/mainFunction/data.js +2 -1
- package/src/TemplateData/flowSchema/externalTopic/Complete/functionYaml/data.js +9 -6
- package/src/TemplateData/flowSchema/externalTopic/Complete/handler/data.js +2 -19
- package/src/TemplateData/flowSchema/externalTopic/Complete/mainFunction/data.js +3 -1
- package/src/TemplateData/flowSchema/externalTopic/Process/functionYaml/data.js +12 -5
- package/src/TemplateData/flowSchema/externalTopic/Process/handler/data.js +4 -1
- package/src/TemplateData/flowSchema/externalTopic/sns-in-sqs/data.js +3 -1
- package/src/TemplateData/flowSchema/externalTopic/sns-out/data.js +5 -6
- package/src/TemplateData/flowSchema/flowSchemaMainFunction/data.js +5 -9
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/functionYaml/data.js +10 -5
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/handler/data.js +3 -3
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/mainFunction/data.js +3 -3
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/functionYaml/data.js +65 -58
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/functionYaml/template.ejs +0 -4
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/handler/DsqHandlerTemplate.ejs +91 -0
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/handler/data.js +31 -16
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/functionYaml/data.js +10 -5
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/handler/data.js +4 -3
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/handler/template.ejs +5 -6
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/mainFunction/data.js +3 -1
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/mainFunction/template.ejs +3 -3
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/sns-in/data.js +3 -3
- package/src/TemplateData/flowSchema/flowSchemaOwnTopic/sns-out/data.js +3 -3
- package/src/TemplateData/flowSchema/flowStep/functionYaml/data.js +13 -8
- package/src/TemplateData/flowSchema/flowStep/handler/data.js +3 -3
- package/src/TemplateData/flowSchema/flowStep/mainFunction/data.js +2 -1
- package/src/TemplateData/flowSchema/flowStep/sns-in/data.js +3 -3
- package/src/TemplateData/flowSchema/generateTemplateData.js +1 -6
- package/src/TemplateData/flowSchema/lambdaSync/Api/functionYaml/data.js +10 -3
- package/src/TemplateData/flowSchema/lambdaSync/Api/handler/data.js +3 -1
- package/src/TemplateData/flowSchema/lambdaSync/Inv/functionYaml/data.js +9 -3
- package/src/TemplateData/flowSchema/lambdaSync/Inv/handler/data.js +2 -1
- package/src/TemplateData/flowSchema/register/complete/functionYaml/data.js +11 -5
- package/src/TemplateData/flowSchema/register/complete/handler/data.js +2 -1
- package/src/TemplateData/flowSchema/register/complete/mainFunction/data.js +2 -1
- package/src/TemplateData/flowSchema/register/dynamoDB/register.js +2 -4
- package/src/TemplateData/flowSchema/register/sns-in/data.js +3 -4
- package/src/TemplateData/flowSchema/register/subscriptionOutAll/data.js +3 -3
- package/src/TemplateData/flowSchema/register/wbs/functionYaml/data.js +10 -5
- package/src/TemplateData/flowSchema/register/wbs/handler/data.js +2 -1
- package/src/TemplateData/flowSchema/register/wbs/mainFunction/data.js +2 -1
- package/src/TemplateData/flowSchema/statusFieldComponent/FunctionYaml/data.js +14 -6
- package/src/TemplateData/flowSchema/statusFieldComponent/Handler/data.js +4 -7
- package/src/TemplateData/flowSchema/statusFieldComponent/MainFunction/data.js +4 -3
- package/src/TemplateData/flowSchema/statusFieldComponent/sns/data.js +3 -3
- package/src/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/functionYaml/data.js +12 -8
- package/src/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/handler/data.js +3 -3
- package/src/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/mainFunction/data.js +3 -3
- package/src/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/functionYaml/data.js +12 -6
- package/src/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/handler/data.js +2 -1
- package/src/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/mainFunction/data.js +2 -1
- package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/functionYaml/data.js +11 -8
- package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/handler/data.js +2 -1
- package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/mainFunction/data.js +3 -3
- package/src/TemplateData/flowSchema/triggerCacheComponent/triggerCacheQueue/data.js +4 -11
- package/src/TemplateData/flowSchema/webSocketComplete/functionYaml/data.js +11 -8
- package/src/TemplateData/flowSchema/webSocketComplete/handler/data.js +2 -1
- package/src/TemplateData/flowSchema/webSocketComplete/mainFunction/data.js +1 -1
- package/src/TemplateData/flowSchema/webSocketComplete/sqs/data.js +3 -3
- package/src/TemplateData/generateRole/data.js +7 -2
- package/src/TemplateData/perActionComplete/create/handler/data.js +3 -3
- package/src/TemplateData/perActionComplete/create/mainFunction/data.js +3 -3
- package/src/TemplateData/perActionComplete/create/mainFunction/template.ejs +2 -2
- package/src/TemplateData/perActionComplete/create/sns-in-sqs/data.js +3 -3
- package/src/TemplateData/perActionComplete/create/sns-out/data.js +3 -3
- package/src/TemplateData/perActionComplete/create/yaml/data.js +11 -7
- package/src/TemplateData/perActionComplete/delete/handler/data.js +3 -3
- package/src/TemplateData/perActionComplete/delete/mainFunction/data.js +4 -3
- package/src/TemplateData/perActionComplete/delete/mainFunction/template.ejs +3 -4
- package/src/TemplateData/perActionComplete/delete/sns-in-sqs/data.js +4 -3
- package/src/TemplateData/perActionComplete/delete/sns-out/data.js +3 -3
- package/src/TemplateData/perActionComplete/delete/yaml/data.js +11 -7
- package/src/TemplateData/perActionComplete/get/handler/data.js +3 -3
- package/src/TemplateData/perActionComplete/get/mainFunction/data.js +3 -4
- package/src/TemplateData/perActionComplete/get/mainFunction/template.ejs +2 -2
- package/src/TemplateData/perActionComplete/get/sns-in-sqs/data.js +3 -3
- package/src/TemplateData/perActionComplete/get/sns-out/data.js +3 -3
- package/src/TemplateData/perActionComplete/get/yaml/data.js +12 -7
- package/src/TemplateData/perActionComplete/update/handler/data.js +3 -3
- package/src/TemplateData/perActionComplete/update/mainFunction/data.js +3 -3
- package/src/TemplateData/perActionComplete/update/mainFunction/template.ejs +2 -2
- package/src/TemplateData/perActionComplete/update/sns-in-sqs/data.js +3 -3
- package/src/TemplateData/perActionComplete/update/sns-out/data.js +4 -6
- package/src/TemplateData/perActionComplete/update/yaml/data.js +11 -7
- package/src/TemplateData/processLogical/handler/data.js +3 -3
- package/src/TemplateData/processLogical/mainFunction/data.js +2 -1
- package/src/TemplateData/processLogical/yaml/data.js +10 -7
- package/src/TemplateData/processLogicalPagination/DsqYaml/data.js +1 -1
- package/src/TemplateData/processLogicalPagination/handler/dsq/data.js +2 -1
- package/src/TemplateData/processLogicalPagination/handler/sqs/data.js +2 -1
- package/src/TemplateData/processLogicalPagination/mainFunction/data.js +2 -1
- package/src/TemplateData/processLogicalPagination/yaml/dsq/data.js +11 -7
- package/src/TemplateData/processLogicalPagination/yaml/sqs/data.js +9 -6
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/data.js +12 -7
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/data.js +3 -3
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/mainFunction/data.js +3 -3
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/mainFunction/template.ejs +2 -2
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/sns-in-sqs/data.js +5 -3
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/functionYaml/data.js +11 -7
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/handler/sqs/data.js +3 -3
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/mainFunction/data.js +3 -3
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/mainFunction/template.ejs +12 -11
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/sns-in-sqs/data.js +3 -3
- package/src/TemplateData/relationshipPerAction/changeRelationship/complete/sns-out/data.js +2 -1
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/data.js +20 -15
- package/src/TemplateData/relationshipPerAction/create/action/handler/data.js +4 -3
- package/src/TemplateData/relationshipPerAction/create/action/mainFunction/data.js +4 -3
- package/src/TemplateData/relationshipPerAction/create/action/mainFunction/template.ejs +2 -2
- package/src/TemplateData/relationshipPerAction/create/action/sns-in-sqs/data.js +6 -4
- package/src/TemplateData/relationshipPerAction/create/complete/functionYaml/data.js +14 -10
- package/src/TemplateData/relationshipPerAction/create/complete/handler/sqs/data.js +3 -3
- package/src/TemplateData/relationshipPerAction/create/complete/mainFunction/data.js +3 -3
- package/src/TemplateData/relationshipPerAction/create/complete/mainFunction/template.ejs +3 -2
- package/src/TemplateData/relationshipPerAction/create/complete/sns-in-sqs/data.js +3 -3
- package/src/TemplateData/relationshipPerAction/create/complete/sns-out/data.js +3 -4
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/data.js +20 -15
- package/src/TemplateData/relationshipPerAction/delete/action/handler/data.js +4 -4
- package/src/TemplateData/relationshipPerAction/delete/action/mainFunction/data.js +4 -7
- package/src/TemplateData/relationshipPerAction/delete/action/mainFunction/template.ejs +2 -2
- package/src/TemplateData/relationshipPerAction/delete/action/sns-in-sqs/data.js +5 -3
- package/src/TemplateData/relationshipPerAction/delete/complete/functionYaml/data.js +11 -7
- package/src/TemplateData/relationshipPerAction/delete/complete/handler/sqs/data.js +2 -1
- package/src/TemplateData/relationshipPerAction/delete/complete/mainFunction/data.js +3 -3
- package/src/TemplateData/relationshipPerAction/delete/complete/mainFunction/template.ejs +4 -5
- package/src/TemplateData/relationshipPerAction/delete/complete/sns-in-sqs/data.js +3 -3
- package/src/TemplateData/relationshipPerAction/delete/complete/sns-out/data.js +3 -3
- package/src/TemplateData/relationshipPerAction/generateTemplateData.js +1 -1
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/data.js +19 -16
- package/src/TemplateData/relationshipPerAction/get/action/handler/data.js +4 -4
- package/src/TemplateData/relationshipPerAction/get/action/mainFunction/data.js +3 -4
- package/src/TemplateData/relationshipPerAction/get/action/mainFunction/template.ejs +6 -3
- package/src/TemplateData/relationshipPerAction/get/action/sns-in-sqs/data.js +5 -3
- package/src/TemplateData/relationshipPerAction/get/complete/functionYaml/data.js +13 -9
- package/src/TemplateData/relationshipPerAction/get/complete/handler/sqs/data.js +2 -1
- package/src/TemplateData/relationshipPerAction/get/complete/mainFunction/data.js +3 -3
- package/src/TemplateData/relationshipPerAction/get/complete/mainFunction/template.ejs +3 -2
- package/src/TemplateData/relationshipPerAction/get/complete/sns-in-sqs/data.js +2 -1
- package/src/TemplateData/relationshipPerAction/get/complete/sns-out/data.js +3 -3
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/functionYaml/data.js +17 -13
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/handler/data.js +4 -3
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/mainFunction/data.js +6 -4
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/mainFunction/template.ejs +6 -3
- package/src/TemplateData/relationshipPerAction/moveRelationship/action/sns-in-sqs/data.js +6 -4
- package/src/TemplateData/relationshipPerAction/moveRelationship/complete/functionYaml/data.js +13 -9
- package/src/TemplateData/relationshipPerAction/moveRelationship/complete/handler/sqs/data.js +3 -3
- package/src/TemplateData/relationshipPerAction/moveRelationship/complete/mainFunction/data.js +3 -3
- package/src/TemplateData/relationshipPerAction/moveRelationship/complete/mainFunction/template.ejs +3 -2
- package/src/TemplateData/relationshipPerAction/moveRelationship/complete/sns-in-sqs/data.js +3 -3
- package/src/TemplateData/relationshipPerAction/moveRelationship/complete/sns-out/data.js +3 -3
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/data.js +20 -15
- package/src/TemplateData/relationshipPerAction/update/action/handler/data.js +4 -4
- package/src/TemplateData/relationshipPerAction/update/action/mainFunction/data.js +4 -4
- package/src/TemplateData/relationshipPerAction/update/action/mainFunction/template.ejs +6 -3
- package/src/TemplateData/relationshipPerAction/update/action/sns-in-sqs/data.js +4 -3
- package/src/TemplateData/relationshipPerAction/update/action/sns-out/data.js +5 -6
- package/src/TemplateData/relationshipPerAction/update/complete/functionYaml/data.js +13 -10
- package/src/TemplateData/relationshipPerAction/update/complete/handler/sqs/data.js +3 -3
- package/src/TemplateData/relationshipPerAction/update/complete/mainFunction/data.js +2 -1
- package/src/TemplateData/relationshipPerAction/update/complete/mainFunction/template.ejs +3 -2
- package/src/TemplateData/relationshipPerAction/update/complete/sns-in-sqs/data.js +3 -3
- package/src/TemplateData/relationshipPerAction/update/complete/sns-out/data.js +3 -3
- package/src/TemplateData/resourceYaml/dynamodb/defaultDynamoDbTable.js +1 -1
- package/src/TemplateData/resourceYaml/dynamodb/generateDynamoPerLink.js +7 -3
- package/src/TemplateData/resourceYaml/dynamodb/mainResourcePerObjectSchemaData.js +2 -1
- package/src/TemplateData/resourceYaml/filterGenerateResource/data.js +5 -3
- package/src/TemplateData/resourceYaml/generateTemplateData.js +5 -2
- package/src/TemplateData/resourceYaml/sns-in-sqs/defaultSnsInSqsForFindDataAndProcessLogical.js +3 -3
- package/src/TemplateData/resourceYaml/sns-in-sqs/snsAndSqsPerActionData.js +4 -3
- package/src/TemplateData/resourceYaml/sns-out/data.js +3 -3
- package/src/TemplateData/resourceYaml/sns-out/defaultSnsOutForFindDataAndProcessLogical.js +2 -1
- package/src/libs/GenerateCodeLibs.js +1 -1
- package/src/libs/Libs.js +22 -0
- package/src/libs/Utils.js +4 -4
- package/src/TemplateData/EndpointPerService/mainFunction/create/backupTemplate.ejs +0 -358
- package/src/TemplateData/perActionEndpoint/generateTemplateData.js +0 -112
- package/src/TemplateData/perActionEndpoint/handler/api/data.js +0 -109
- package/src/TemplateData/perActionEndpoint/handler/api/request.json +0 -7
- package/src/TemplateData/perActionEndpoint/handler/api/template.ejs +0 -36
- package/src/TemplateData/perActionEndpoint/handler/dsq/data.js +0 -118
- package/src/TemplateData/perActionEndpoint/handler/dsq/request.json +0 -7
- package/src/TemplateData/perActionEndpoint/handler/dsq/template.ejs +0 -55
- package/src/TemplateData/perActionEndpoint/handler/inv/data.js +0 -112
- package/src/TemplateData/perActionEndpoint/handler/inv/request.json +0 -7
- package/src/TemplateData/perActionEndpoint/handler/inv/template.ejs +0 -37
- package/src/TemplateData/perActionEndpoint/handler/sqs/data.js +0 -116
- package/src/TemplateData/perActionEndpoint/handler/sqs/request.json +0 -7
- package/src/TemplateData/perActionEndpoint/handler/sqs/template.ejs +0 -57
- package/src/TemplateData/perActionEndpoint/handler/webSocket/data.js +0 -94
- package/src/TemplateData/perActionEndpoint/handler/webSocket/template.ejs +0 -61
- package/src/TemplateData/perActionEndpoint/handler/webSocketConnect/data.js +0 -54
- package/src/TemplateData/perActionEndpoint/handler/webSocketConnect/template.ejs +0 -55
- package/src/TemplateData/perActionEndpoint/libs/data.js +0 -60
- package/src/TemplateData/perActionEndpoint/libs/template.ejs +0 -46
- package/src/TemplateData/perActionEndpoint/mainFunction/create/data.js +0 -91
- package/src/TemplateData/perActionEndpoint/mainFunction/create/request.json +0 -0
- package/src/TemplateData/perActionEndpoint/mainFunction/create/template.ejs +0 -339
- package/src/TemplateData/perActionEndpoint/mainFunction/delete/data.js +0 -91
- package/src/TemplateData/perActionEndpoint/mainFunction/delete/template.ejs +0 -99
- package/src/TemplateData/perActionEndpoint/mainFunction/get/data.js +0 -92
- package/src/TemplateData/perActionEndpoint/mainFunction/get/request.json +0 -5
- package/src/TemplateData/perActionEndpoint/mainFunction/get/template.ejs +0 -116
- package/src/TemplateData/perActionEndpoint/mainFunction/get/testParam.json +0 -5
- package/src/TemplateData/perActionEndpoint/mainFunction/update/data.js +0 -85
- package/src/TemplateData/perActionEndpoint/mainFunction/update/request.json +0 -0
- package/src/TemplateData/perActionEndpoint/mainFunction/update/template.ejs +0 -166
- package/src/TemplateData/perActionEndpoint/yaml/api/data.js +0 -229
- package/src/TemplateData/perActionEndpoint/yaml/api/request.json +0 -14
- package/src/TemplateData/perActionEndpoint/yaml/api/template.ejs +0 -20
- package/src/TemplateData/perActionEndpoint/yaml/dsq/data.js +0 -234
- package/src/TemplateData/perActionEndpoint/yaml/dsq/request.json +0 -19
- package/src/TemplateData/perActionEndpoint/yaml/dsq/template.ejs +0 -17
- package/src/TemplateData/perActionEndpoint/yaml/inv/data.js +0 -207
- package/src/TemplateData/perActionEndpoint/yaml/inv/example req.js +0 -15
- package/src/TemplateData/perActionEndpoint/yaml/inv/request.json +0 -14
- package/src/TemplateData/perActionEndpoint/yaml/inv/template.ejs +0 -13
- package/src/TemplateData/perActionEndpoint/yaml/sqs/data.js +0 -237
- package/src/TemplateData/perActionEndpoint/yaml/sqs/request.json +0 -19
- package/src/TemplateData/perActionEndpoint/yaml/sqs/template.ejs +0 -17
- package/src/TemplateData/perActionEndpoint/yaml/wbs/data.js +0 -204
- package/src/TemplateData/perActionEndpoint/yaml/wbs/request.json +0 -19
- package/src/TemplateData/perActionEndpoint/yaml/wbs/template.ejs +0 -29
- package/src/TemplateData/perActionEndpoint/yaml/webSocketConnect/data.js +0 -58
- package/src/TemplateData/perActionEndpoint/yaml/webSocketConnect/template.ejs +0 -10
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/api/data.js +0 -146
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/api/template.ejs +0 -20
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/dsq/data.js +0 -146
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/dsq/template.ejs +0 -17
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/inv/data.js +0 -146
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/inv/template.ejs +0 -13
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/sqs/data.js +0 -147
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/sqs/template.ejs +0 -17
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/api/data.js +0 -62
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/api/template.ejs +0 -59
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/dsq/data.js +0 -63
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/dsq/template.ejs +0 -202
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/inv/data.js +0 -64
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/inv/template.ejs +0 -144
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/sqs/data.js +0 -64
- package/src/TemplateData/relationshipPerAction/changeRelationship/action/handler/sqs/template.ejs +0 -77
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/api/data.js +0 -175
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/api/template.ejs +0 -20
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/dsq/data.js +0 -176
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/dsq/template.ejs +0 -17
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/inv/data.js +0 -175
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/inv/template.ejs +0 -13
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/sqs/data.js +0 -177
- package/src/TemplateData/relationshipPerAction/create/action/functionYaml/sqs/template.ejs +0 -17
- package/src/TemplateData/relationshipPerAction/create/action/handler/api/data.js +0 -62
- package/src/TemplateData/relationshipPerAction/create/action/handler/api/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/api/template.ejs +0 -57
- package/src/TemplateData/relationshipPerAction/create/action/handler/dsq/data.js +0 -63
- package/src/TemplateData/relationshipPerAction/create/action/handler/dsq/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/dsq/template.ejs +0 -184
- package/src/TemplateData/relationshipPerAction/create/action/handler/inv/data.js +0 -64
- package/src/TemplateData/relationshipPerAction/create/action/handler/inv/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/inv/template.ejs +0 -126
- package/src/TemplateData/relationshipPerAction/create/action/handler/sqs/data.js +0 -64
- package/src/TemplateData/relationshipPerAction/create/action/handler/sqs/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/create/action/handler/sqs/template.ejs +0 -75
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/api/data.js +0 -178
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/api/template.ejs +0 -20
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/dsq/data.js +0 -176
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/dsq/template.ejs +0 -17
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/inv/data.js +0 -178
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/inv/template.ejs +0 -13
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/sqs/data.js +0 -176
- package/src/TemplateData/relationshipPerAction/delete/action/functionYaml/sqs/template.ejs +0 -17
- package/src/TemplateData/relationshipPerAction/delete/action/handler/api/data.js +0 -62
- package/src/TemplateData/relationshipPerAction/delete/action/handler/api/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/api/template.ejs +0 -139
- package/src/TemplateData/relationshipPerAction/delete/action/handler/dsq/data.js +0 -63
- package/src/TemplateData/relationshipPerAction/delete/action/handler/dsq/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/dsq/template.ejs +0 -182
- package/src/TemplateData/relationshipPerAction/delete/action/handler/inv/data.js +0 -64
- package/src/TemplateData/relationshipPerAction/delete/action/handler/inv/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/inv/template.ejs +0 -124
- package/src/TemplateData/relationshipPerAction/delete/action/handler/sqs/data.js +0 -64
- package/src/TemplateData/relationshipPerAction/delete/action/handler/sqs/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/delete/action/handler/sqs/template.ejs +0 -162
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/api/data.js +0 -168
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/api/template.ejs +0 -20
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/dsq/data.js +0 -177
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/dsq/template.ejs +0 -17
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/inv/data.js +0 -167
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/inv/template.ejs +0 -13
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/sqs/data.js +0 -166
- package/src/TemplateData/relationshipPerAction/get/action/functionYaml/sqs/template.ejs +0 -17
- package/src/TemplateData/relationshipPerAction/get/action/handler/api/data.js +0 -62
- package/src/TemplateData/relationshipPerAction/get/action/handler/api/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/api/template.ejs +0 -138
- package/src/TemplateData/relationshipPerAction/get/action/handler/dsq/data.js +0 -63
- package/src/TemplateData/relationshipPerAction/get/action/handler/dsq/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/dsq/template.ejs +0 -185
- package/src/TemplateData/relationshipPerAction/get/action/handler/inv/data.js +0 -64
- package/src/TemplateData/relationshipPerAction/get/action/handler/inv/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/inv/template.ejs +0 -127
- package/src/TemplateData/relationshipPerAction/get/action/handler/sqs/data.js +0 -64
- package/src/TemplateData/relationshipPerAction/get/action/handler/sqs/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/get/action/handler/sqs/template.ejs +0 -165
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/api/data.js +0 -167
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/api/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/api/template.ejs +0 -20
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/dsq/data.js +0 -196
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/dsq/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/dsq/template.ejs +0 -17
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/inv/data.js +0 -186
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/inv/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/inv/template.ejs +0 -13
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/sqs/data.js +0 -187
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/sqs/request.json +0 -0
- package/src/TemplateData/relationshipPerAction/update/action/functionYaml/sqs/template.ejs +0 -17
- package/src/TemplateData/relationshipPerAction/update/action/handler/api/data.js +0 -78
- package/src/TemplateData/relationshipPerAction/update/action/handler/api/request.json +0 -7
- package/src/TemplateData/relationshipPerAction/update/action/handler/api/template.ejs +0 -142
- package/src/TemplateData/relationshipPerAction/update/action/handler/dsq/data.js +0 -79
- package/src/TemplateData/relationshipPerAction/update/action/handler/dsq/request.json +0 -7
- package/src/TemplateData/relationshipPerAction/update/action/handler/dsq/template.ejs +0 -188
- package/src/TemplateData/relationshipPerAction/update/action/handler/inv/data.js +0 -80
- package/src/TemplateData/relationshipPerAction/update/action/handler/inv/request.json +0 -5
- package/src/TemplateData/relationshipPerAction/update/action/handler/inv/template.ejs +0 -147
- package/src/TemplateData/relationshipPerAction/update/action/handler/sqs/data.js +0 -79
- package/src/TemplateData/relationshipPerAction/update/action/handler/sqs/request.json +0 -7
- package/src/TemplateData/relationshipPerAction/update/action/handler/sqs/template.ejs +0 -163
- package/src/TemplateData/resourceYaml/CreateSourceData.js +0 -79
- /package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/handler/{template.ejs → SqsHandlerTemplate.ejs} +0 -0
|
@@ -20,7 +20,8 @@ import { fileURLToPath } from 'url';
|
|
|
20
20
|
const __filename = fileURLToPath(import.meta.url);
|
|
21
21
|
const __dirname = path.dirname(__filename);
|
|
22
22
|
|
|
23
|
-
import
|
|
23
|
+
import consts from '../../../../../../libs/Consts.js';
|
|
24
|
+
import utils from '../../../../../../libs/Utils.js';
|
|
24
25
|
const { firstLetterUpperCase: upperCase } = utils;
|
|
25
26
|
const { SOURCE_PATH, SAVE_FILE_NAME } = consts;
|
|
26
27
|
|
|
@@ -20,18 +20,23 @@ import { fileURLToPath } from 'url';
|
|
|
20
20
|
const __filename = fileURLToPath(import.meta.url);
|
|
21
21
|
const __dirname = path.dirname(__filename);
|
|
22
22
|
|
|
23
|
-
import
|
|
23
|
+
import consts from '../../../../../../libs/Consts.js';
|
|
24
|
+
import utils from '../../../../../../libs/Utils.js';
|
|
25
|
+
import libs from '../../../../../../libs/Libs.js'
|
|
26
|
+
|
|
24
27
|
const { firstLetterUpperCase: upperCase } = utils;
|
|
25
28
|
const {
|
|
26
29
|
SOURCE_PATH,
|
|
27
30
|
SAVE_FILE_NAME,
|
|
28
|
-
defaultIamRolePerAction,
|
|
29
|
-
createIamRole,
|
|
30
31
|
RESOURCE_CLASSES,
|
|
31
32
|
DYNAMO_RESOURCE,
|
|
32
|
-
resourceNames
|
|
33
33
|
} = consts;
|
|
34
34
|
|
|
35
|
+
const {
|
|
36
|
+
defaultIamRolePerAction,
|
|
37
|
+
createIamRole,
|
|
38
|
+
resourceNames
|
|
39
|
+
} = libs;
|
|
35
40
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
36
41
|
|
|
37
42
|
/**
|
|
@@ -20,7 +20,7 @@ import { fileURLToPath } from 'url';
|
|
|
20
20
|
const __filename = fileURLToPath(import.meta.url);
|
|
21
21
|
const __dirname = path.dirname(__filename);
|
|
22
22
|
|
|
23
|
-
import
|
|
23
|
+
import consts from '../../../../../../libs/Consts.js';
|
|
24
24
|
|
|
25
25
|
const { SOURCE_PATH } = consts;
|
|
26
26
|
|
|
@@ -20,8 +20,7 @@ import { fileURLToPath } from 'url';
|
|
|
20
20
|
const __filename = fileURLToPath(import.meta.url);
|
|
21
21
|
const __dirname = path.dirname(__filename);
|
|
22
22
|
|
|
23
|
-
import
|
|
24
|
-
|
|
23
|
+
import consts from '../../../../../libs/Consts.js';
|
|
25
24
|
const { SOURCE_PATH, SAVE_FILE_NAME } = consts;
|
|
26
25
|
|
|
27
26
|
const templatePath = path.join(
|
|
@@ -20,7 +20,7 @@ import { fileURLToPath } from 'url';
|
|
|
20
20
|
const __filename = fileURLToPath(import.meta.url);
|
|
21
21
|
const __dirname = path.dirname(__filename);
|
|
22
22
|
|
|
23
|
-
import
|
|
23
|
+
import consts from '../../../../../libs/Consts.js';
|
|
24
24
|
|
|
25
25
|
const { SOURCE_PATH, SAVE_FILE_NAME } = consts;
|
|
26
26
|
|
|
@@ -20,7 +20,7 @@ import { fileURLToPath } from 'url';
|
|
|
20
20
|
const __filename = fileURLToPath(import.meta.url);
|
|
21
21
|
const __dirname = path.dirname(__filename);
|
|
22
22
|
|
|
23
|
-
import
|
|
23
|
+
import consts from '../../../../../libs/Consts.js';
|
|
24
24
|
|
|
25
25
|
const { SOURCE_PATH, SAVE_FILE_NAME } = consts;
|
|
26
26
|
|
|
@@ -20,7 +20,8 @@ import { fileURLToPath } from 'url';
|
|
|
20
20
|
const __filename = fileURLToPath(import.meta.url);
|
|
21
21
|
const __dirname = path.dirname(__filename);
|
|
22
22
|
|
|
23
|
-
import
|
|
23
|
+
import consts from '../../../libs/Consts.js';
|
|
24
|
+
import utils from '../../../libs/Utils.js'
|
|
24
25
|
const { SOURCE_PATH, SAVE_FILE_NAME } = consts;
|
|
25
26
|
const { firstLetterUpperCase: upperCase } = utils;
|
|
26
27
|
|
|
@@ -20,15 +20,14 @@ import { fileURLToPath } from 'url';
|
|
|
20
20
|
const __filename = fileURLToPath(import.meta.url);
|
|
21
21
|
const __dirname = path.dirname(__filename);
|
|
22
22
|
|
|
23
|
-
import
|
|
23
|
+
import consts from '../../../../libs/Consts.js';
|
|
24
|
+
import utils from '../../../../libs/Utils.js'
|
|
25
|
+
import libs from '../../../../libs/Libs.js'
|
|
24
26
|
|
|
25
27
|
const { firstLetterUpperCase: upperCase } = utils;
|
|
26
28
|
const {
|
|
27
29
|
SOURCE_PATH,
|
|
28
|
-
defaultIamRolePerAction,
|
|
29
|
-
createIamRole,
|
|
30
30
|
RESOURCE_CLASSES,
|
|
31
|
-
resourceNames,
|
|
32
31
|
DYNAMO_RESOURCE,
|
|
33
32
|
SAVE_FILE_NAME,
|
|
34
33
|
FUNCTION_NAME,
|
|
@@ -36,6 +35,12 @@ const {
|
|
|
36
35
|
HANDLER
|
|
37
36
|
} = consts;
|
|
38
37
|
|
|
38
|
+
const {
|
|
39
|
+
defaultIamRolePerAction,
|
|
40
|
+
createIamRole,
|
|
41
|
+
resourceNames
|
|
42
|
+
} = libs;
|
|
43
|
+
|
|
39
44
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
40
45
|
/**
|
|
41
46
|
* receive objectSchema
|
|
@@ -20,7 +20,8 @@ import { fileURLToPath } from 'url';
|
|
|
20
20
|
const __filename = fileURLToPath(import.meta.url);
|
|
21
21
|
const __dirname = path.dirname(__filename);
|
|
22
22
|
|
|
23
|
-
import
|
|
23
|
+
import consts from '../../../../../libs/Consts.js';
|
|
24
|
+
import utils from '../../../../../libs/Utils.js'
|
|
24
25
|
const { firstLetterUpperCase: upperCase } = utils;
|
|
25
26
|
const { SOURCE_PATH, HANDLER } = consts;
|
|
26
27
|
|
|
@@ -20,7 +20,8 @@ import { fileURLToPath } from 'url';
|
|
|
20
20
|
const __filename = fileURLToPath(import.meta.url);
|
|
21
21
|
const __dirname = path.dirname(__filename);
|
|
22
22
|
|
|
23
|
-
import
|
|
23
|
+
import consts from '../../../../libs/Consts.js';
|
|
24
|
+
import utils from '../../../../libs/Utils.js'
|
|
24
25
|
const { firstLetterUpperCase: upperCase } = utils;
|
|
25
26
|
const { SOURCE_PATH, SOURCE_GENERATE_IAM_ROLE } = consts;
|
|
26
27
|
|
|
@@ -20,23 +20,26 @@ import { fileURLToPath } from 'url';
|
|
|
20
20
|
const __filename = fileURLToPath(import.meta.url);
|
|
21
21
|
const __dirname = path.dirname(__filename);
|
|
22
22
|
|
|
23
|
-
import
|
|
23
|
+
import consts from '../../../../../libs/Consts.js';
|
|
24
|
+
import utils from '../../../../../libs/Utils.js';
|
|
25
|
+
import libs from '../../../../../libs/Libs.js'
|
|
24
26
|
|
|
25
27
|
const {
|
|
26
28
|
HANDLER,
|
|
27
29
|
SOURCE_PATH,
|
|
28
|
-
defaultIamRolePerAction,
|
|
29
|
-
createIamRole,
|
|
30
30
|
RESOURCE_CLASSES,
|
|
31
31
|
SNS_RESOURCE,
|
|
32
|
-
resourceNames,
|
|
33
32
|
SAVE_FILE_NAME,
|
|
34
|
-
shortNameHandler,
|
|
35
33
|
SQS_RESOURCE
|
|
36
34
|
} = consts;
|
|
37
35
|
|
|
38
36
|
const { firstLetterUpperCase: upperCase } = utils;
|
|
39
|
-
|
|
37
|
+
const {
|
|
38
|
+
defaultIamRolePerAction,
|
|
39
|
+
createIamRole,
|
|
40
|
+
resourceNames,
|
|
41
|
+
shortNameHandler
|
|
42
|
+
} = libs;
|
|
40
43
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
41
44
|
/**
|
|
42
45
|
* receive objectSchema
|
|
@@ -20,16 +20,12 @@ import { fileURLToPath } from 'url';
|
|
|
20
20
|
const __filename = fileURLToPath(import.meta.url);
|
|
21
21
|
const __dirname = path.dirname(__filename);
|
|
22
22
|
|
|
23
|
-
import
|
|
23
|
+
import consts from '../../../../../libs/Consts.js';
|
|
24
|
+
import utils from '../../../../../libs/Utils.js';
|
|
24
25
|
|
|
25
26
|
const {
|
|
26
27
|
HANDLER,
|
|
27
28
|
SOURCE_PATH,
|
|
28
|
-
defaultIamRolePerAction,
|
|
29
|
-
createIamRole,
|
|
30
|
-
RESOURCE_CLASSES,
|
|
31
|
-
resourceNames,
|
|
32
|
-
SQS_RESOURCE
|
|
33
29
|
} = consts;
|
|
34
30
|
|
|
35
31
|
const { firstLetterUpperCase: upperCase } = utils;
|
|
@@ -54,21 +50,8 @@ function data(_izContext, flowSchema, srcPath) {
|
|
|
54
50
|
function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
55
51
|
let functionName = upperCase(flowSchema.flowTag) + 'Complete';
|
|
56
52
|
let handlerType = upperCase(HANDLER.hdrSqs);
|
|
57
|
-
let additionalResourcePermission = defaultIamRolePerAction();
|
|
58
53
|
let queueName = functionName + handlerType;
|
|
59
54
|
|
|
60
|
-
additionalResourcePermission.push(
|
|
61
|
-
createIamRole(
|
|
62
|
-
{
|
|
63
|
-
[RESOURCE_CLASSES.sqs]: Object.values(SQS_RESOURCE)
|
|
64
|
-
},
|
|
65
|
-
[
|
|
66
|
-
resourceNames(RESOURCE_CLASSES.sqs, queueName),
|
|
67
|
-
resourceNames(RESOURCE_CLASSES.sqs, queueName + 'DLQ')
|
|
68
|
-
]
|
|
69
|
-
)
|
|
70
|
-
);
|
|
71
|
-
|
|
72
55
|
return {
|
|
73
56
|
templatePath: templatePath,
|
|
74
57
|
templateData: {
|
|
@@ -19,7 +19,9 @@ import path from 'path';
|
|
|
19
19
|
import { fileURLToPath } from 'url';
|
|
20
20
|
const __filename = fileURLToPath(import.meta.url);
|
|
21
21
|
const __dirname = path.dirname(__filename);
|
|
22
|
-
|
|
22
|
+
|
|
23
|
+
import consts from '../../../../../libs/Consts.js';
|
|
24
|
+
import utils from '../../../../../libs/Utils.js';
|
|
23
25
|
|
|
24
26
|
const { SOURCE_PATH } = consts;
|
|
25
27
|
|
|
@@ -21,27 +21,34 @@ const __filename = fileURLToPath(import.meta.url);
|
|
|
21
21
|
const __dirname = path.dirname(__filename);
|
|
22
22
|
import { NoRetryError } from '@izara_project/izara-core-library-core';
|
|
23
23
|
import { getObjectSchema } from '@izara_project/izara-core-library-service-schemas';
|
|
24
|
-
|
|
24
|
+
|
|
25
|
+
import consts from '../../../../../libs/Consts.js';
|
|
26
|
+
import utils from '../../../../../libs/Utils.js';
|
|
27
|
+
import libs from '../../../../../libs/Libs.js'
|
|
25
28
|
|
|
26
29
|
const {
|
|
27
30
|
HANDLER,
|
|
28
31
|
STORAGE_TYPES,
|
|
29
32
|
SOURCE_PATH,
|
|
30
|
-
defaultIamRolePerAction,
|
|
31
|
-
createIamRole,
|
|
32
33
|
RESOURCE_CLASSES,
|
|
33
34
|
SNS_RESOURCE,
|
|
34
|
-
resourceNames,
|
|
35
35
|
DYNAMO_RESOURCE,
|
|
36
36
|
SAVE_FILE_NAME,
|
|
37
|
-
shortNameHandler,
|
|
38
37
|
SQS_RESOURCE,
|
|
39
38
|
LAMBDA_RESOURCE
|
|
40
39
|
} = consts;
|
|
41
40
|
|
|
42
41
|
const { firstLetterUpperCase: upperCase } = utils;
|
|
43
42
|
|
|
43
|
+
const {
|
|
44
|
+
shortNameHandler,
|
|
45
|
+
resourceNames,
|
|
46
|
+
defaultIamRolePerAction,
|
|
47
|
+
createIamRole
|
|
48
|
+
} = libs;
|
|
49
|
+
|
|
44
50
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
51
|
+
|
|
45
52
|
/**
|
|
46
53
|
* receive objectSchema
|
|
47
54
|
* create data for WebScoket handler template
|
|
@@ -20,9 +20,12 @@ import { fileURLToPath } from 'url';
|
|
|
20
20
|
const __filename = fileURLToPath(import.meta.url);
|
|
21
21
|
const __dirname = path.dirname(__filename);
|
|
22
22
|
|
|
23
|
-
import
|
|
23
|
+
import consts from '../../../../../libs/Consts.js';
|
|
24
|
+
import utils from '../../../../../libs/Utils.js';
|
|
25
|
+
|
|
24
26
|
const { SOURCE_PATH, HANDLER } = consts;
|
|
25
27
|
const { firstLetterUpperCase: upperCase } = utils;
|
|
28
|
+
|
|
26
29
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
27
30
|
/**
|
|
28
31
|
* receive objectSchema
|
|
@@ -20,7 +20,9 @@ import { fileURLToPath } from 'url';
|
|
|
20
20
|
const __filename = fileURLToPath(import.meta.url);
|
|
21
21
|
const __dirname = path.dirname(__filename);
|
|
22
22
|
|
|
23
|
-
import
|
|
23
|
+
import consts from '../../../../libs/Consts.js';
|
|
24
|
+
import utils from '../../../../libs/Utils.js';
|
|
25
|
+
|
|
24
26
|
const { SOURCE_PATH, HANDLER, SAVE_FILE_NAME } = consts;
|
|
25
27
|
const { firstLetterUpperCase: upperCase } = utils;
|
|
26
28
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
@@ -20,13 +20,12 @@ import { fileURLToPath } from 'url';
|
|
|
20
20
|
const __filename = fileURLToPath(import.meta.url);
|
|
21
21
|
const __dirname = path.dirname(__filename);
|
|
22
22
|
|
|
23
|
-
import
|
|
24
|
-
|
|
23
|
+
import consts from '../../../../libs/Consts.js';
|
|
24
|
+
import utils from '../../../../libs/Utils.js';
|
|
25
|
+
const { SOURCE_PATH, SAVE_FILE_NAME } = consts;
|
|
25
26
|
const { firstLetterUpperCase: upperCase } = utils;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
'../../../resourceYaml/sns-out/template.ejs'
|
|
29
|
-
);
|
|
27
|
+
|
|
28
|
+
const templatePath = path.join(__dirname, '../../../resourceYaml/sns-out/template.ejs');
|
|
30
29
|
|
|
31
30
|
/**
|
|
32
31
|
* create data for dynamoDbYaml tempalte from objectSchema
|
|
@@ -21,12 +21,11 @@ const __filename = fileURLToPath(import.meta.url);
|
|
|
21
21
|
const __dirname = path.dirname(__filename);
|
|
22
22
|
|
|
23
23
|
import { NoRetryError } from '@izara_project/izara-core-library-core';
|
|
24
|
-
import {
|
|
25
|
-
getObjectSchema,
|
|
26
|
-
utils as coreUtils
|
|
27
|
-
} from '@izara_project/izara-core-library-service-schemas';
|
|
24
|
+
import { getObjectSchema, utils as coreUtils } from '@izara_project/izara-core-library-service-schemas';
|
|
28
25
|
const { createFlowTypeConcat } = coreUtils;
|
|
29
|
-
|
|
26
|
+
|
|
27
|
+
import consts from '../../../libs/Consts.js';
|
|
28
|
+
import utils from '../../../libs/Utils.js';
|
|
30
29
|
const { SOURCE_PATH, STORAGE_TYPES } = consts;
|
|
31
30
|
const { firstLetterUpperCase: upperCase, getLocalConfig } = utils;
|
|
32
31
|
|
|
@@ -82,10 +81,7 @@ async function createParamsForCreateSource(_izContext, flowSchema, srcPath) {
|
|
|
82
81
|
}
|
|
83
82
|
|
|
84
83
|
let triggerType;
|
|
85
|
-
if (
|
|
86
|
-
flowSchema.statusType === 'triggerCache' &&
|
|
87
|
-
flowSchema.hasOwnProperty('triggerType')
|
|
88
|
-
) {
|
|
84
|
+
if (flowSchema.statusType === 'triggerCache' && flowSchema.hasOwnProperty('triggerType')) {
|
|
89
85
|
triggerType = flowSchema.triggerType;
|
|
90
86
|
}
|
|
91
87
|
let flowSchemaComplete = upperCase(flowSchema.flowTag);
|
package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/functionYaml/data.js
CHANGED
|
@@ -20,23 +20,28 @@ import { fileURLToPath } from 'url';
|
|
|
20
20
|
const __filename = fileURLToPath(import.meta.url);
|
|
21
21
|
const __dirname = path.dirname(__filename);
|
|
22
22
|
|
|
23
|
-
import
|
|
23
|
+
import consts from '../../../../../libs/Consts.js';
|
|
24
|
+
import utils from '../../../../../libs/Utils.js';
|
|
25
|
+
import libs from '../../../../../libs/Libs.js'
|
|
24
26
|
|
|
25
27
|
const {
|
|
26
28
|
HANDLER,
|
|
27
29
|
SOURCE_PATH,
|
|
28
|
-
defaultIamRolePerAction,
|
|
29
|
-
createIamRole,
|
|
30
30
|
RESOURCE_CLASSES,
|
|
31
31
|
SNS_RESOURCE,
|
|
32
|
-
resourceNames,
|
|
33
32
|
SAVE_FILE_NAME,
|
|
34
|
-
shortNameHandler,
|
|
35
33
|
SQS_RESOURCE
|
|
36
34
|
} = consts;
|
|
37
35
|
|
|
38
36
|
const { firstLetterUpperCase: upperCase } = utils;
|
|
39
37
|
|
|
38
|
+
const {
|
|
39
|
+
defaultIamRolePerAction,
|
|
40
|
+
createIamRole,
|
|
41
|
+
resourceNames,
|
|
42
|
+
shortNameHandler
|
|
43
|
+
} = libs;
|
|
44
|
+
|
|
40
45
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
41
46
|
/**
|
|
42
47
|
* receive objectSchema
|
|
@@ -20,11 +20,11 @@ import { fileURLToPath } from 'url';
|
|
|
20
20
|
const __filename = fileURLToPath(import.meta.url);
|
|
21
21
|
const __dirname = path.dirname(__filename);
|
|
22
22
|
|
|
23
|
-
import
|
|
23
|
+
import consts from '../../../../../libs/Consts.js';
|
|
24
|
+
import utils from '../../../../../libs/Utils.js';
|
|
24
25
|
|
|
25
26
|
const { SOURCE_PATH, HANDLER } = consts;
|
|
26
|
-
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } =
|
|
27
|
-
utils;
|
|
27
|
+
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = utils;
|
|
28
28
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
29
29
|
|
|
30
30
|
/**
|
package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/mainFunction/data.js
CHANGED
|
@@ -20,12 +20,12 @@ import { fileURLToPath } from 'url';
|
|
|
20
20
|
const __filename = fileURLToPath(import.meta.url);
|
|
21
21
|
const __dirname = path.dirname(__filename);
|
|
22
22
|
|
|
23
|
-
import
|
|
23
|
+
import consts from '../../../../../libs/Consts.js';
|
|
24
|
+
import utils from '../../../../../libs/Utils.js';
|
|
24
25
|
|
|
25
26
|
const { SOURCE_PATH } = consts;
|
|
26
27
|
|
|
27
|
-
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } =
|
|
28
|
-
utils;
|
|
28
|
+
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = utils;
|
|
29
29
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
30
30
|
|
|
31
31
|
/**
|
package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/functionYaml/data.js
CHANGED
|
@@ -22,23 +22,27 @@ const __dirname = path.dirname(__filename);
|
|
|
22
22
|
|
|
23
23
|
import { NoRetryError } from '@izara_project/izara-core-library-core';
|
|
24
24
|
import { getObjectSchema } from '@izara_project/izara-core-library-service-schemas';
|
|
25
|
-
import
|
|
25
|
+
import consts from '../../../../../libs/Consts.js';
|
|
26
|
+
import utils from '../../../../../libs/Utils.js';
|
|
27
|
+
import libs from '../../../../../libs/Libs.js'
|
|
26
28
|
|
|
27
29
|
const {
|
|
28
30
|
HANDLER,
|
|
29
|
-
STORAGE_TYPES,
|
|
30
31
|
SOURCE_PATH,
|
|
31
|
-
defaultIamRolePerAction,
|
|
32
|
-
createIamRole,
|
|
33
32
|
RESOURCE_CLASSES,
|
|
34
|
-
resourceNames,
|
|
35
|
-
DYNAMO_RESOURCE,
|
|
36
33
|
SAVE_FILE_NAME,
|
|
37
|
-
shortNameHandler,
|
|
38
34
|
SQS_RESOURCE,
|
|
39
35
|
LAMBDA_RESOURCE
|
|
40
36
|
} = consts;
|
|
41
37
|
|
|
38
|
+
const {
|
|
39
|
+
defaultIamRolePerAction,
|
|
40
|
+
createIamRole,
|
|
41
|
+
shortNameHandler,
|
|
42
|
+
resourceNames,
|
|
43
|
+
tableRoleForFlowSchema
|
|
44
|
+
} = libs;
|
|
45
|
+
|
|
42
46
|
const { firstLetterUpperCase: upperCase } = utils;
|
|
43
47
|
|
|
44
48
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
@@ -51,15 +55,39 @@ const templatePath = path.join(__dirname, 'template.ejs');
|
|
|
51
55
|
*/
|
|
52
56
|
|
|
53
57
|
async function data(_izContext, flowSchema, srcPath) {
|
|
54
|
-
return
|
|
58
|
+
return await createSourceParams(_izContext, flowSchema, srcPath);
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
async function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
62
|
+
let createSources = [];
|
|
58
63
|
let functionName = 'Process' + upperCase(flowSchema.flowTag);
|
|
59
64
|
let handlerType = upperCase(HANDLER.hdrSqs);
|
|
60
65
|
let additionalResourcePermission = defaultIamRolePerAction();
|
|
61
66
|
let route = upperCase(flowSchema.flowTag);
|
|
62
67
|
let queueName = upperCase(flowSchema.flowTag) + handlerType;
|
|
68
|
+
let objectSchema;
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
let setting = {
|
|
72
|
+
savePath: path.join(srcPath, SOURCE_PATH.appYaml),
|
|
73
|
+
saveFileName: upperCase(SAVE_FILE_NAME.flowSchema),
|
|
74
|
+
fileExtension: '.yml',
|
|
75
|
+
isAppend: true
|
|
76
|
+
}
|
|
77
|
+
let baseTemplateData = {
|
|
78
|
+
resourceLocation: path.join(SOURCE_PATH.resourceLocationFlowSchema, upperCase(flowSchema.flowTag), 'source/'),
|
|
79
|
+
functionName,
|
|
80
|
+
additionalResourcePermission,
|
|
81
|
+
roleName: upperCase(flowSchema.flowTag),
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// getObjectSchema
|
|
85
|
+
if (flowSchema.statusType === 'storedCache' || flowSchema.statusType === 'triggerCache' || flowSchema.statusType === 'statusField') {
|
|
86
|
+
objectSchema = await getObjectSchema.getLocalObjectSchemas(_izContext, [flowSchema.objType.objectType], path.join(srcPath, './schemas')).then(res => res.records[0]);
|
|
87
|
+
if (!objectSchema) {
|
|
88
|
+
throw new NoRetryError('ObjectSchema not found');
|
|
89
|
+
}
|
|
90
|
+
}
|
|
63
91
|
|
|
64
92
|
additionalResourcePermission.push(
|
|
65
93
|
createIamRole(
|
|
@@ -74,37 +102,7 @@ async function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
74
102
|
);
|
|
75
103
|
|
|
76
104
|
if (flowSchema.statusType === 'storedCache') {
|
|
77
|
-
|
|
78
|
-
let objectSchema = await getObjectSchema
|
|
79
|
-
.getLocalObjectSchemas(
|
|
80
|
-
_izContext,
|
|
81
|
-
[flowSchema.objType.objectType],
|
|
82
|
-
path.join(srcPath, './schemas')
|
|
83
|
-
)
|
|
84
|
-
.then(res => res.records[0]);
|
|
85
|
-
if (!objectSchema) {
|
|
86
|
-
throw new NoRetryError('ObjectSchema not found');
|
|
87
|
-
}
|
|
88
|
-
for (const storageResource of Object.values(
|
|
89
|
-
objectSchema.storageResources
|
|
90
|
-
)) {
|
|
91
|
-
if (storageResource.storageType === STORAGE_TYPES.dynamoDB) {
|
|
92
|
-
if (!tableStoredCache.includes(storageResource.tableName)) {
|
|
93
|
-
tableStoredCache.push(storageResource.tableName);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
additionalResourcePermission.push(
|
|
99
|
-
createIamRole(
|
|
100
|
-
{
|
|
101
|
-
[RESOURCE_CLASSES.dynamoDbTable]: Object.values(DYNAMO_RESOURCE)
|
|
102
|
-
},
|
|
103
|
-
tableStoredCache.map(tableName =>
|
|
104
|
-
resourceNames(RESOURCE_CLASSES.dynamoDbTable, tableName)
|
|
105
|
-
)
|
|
106
|
-
)
|
|
107
|
-
);
|
|
105
|
+
additionalResourcePermission.push(...tableRoleForFlowSchema(objectSchema));
|
|
108
106
|
} else if (flowSchema.statusType === 'statusField') {
|
|
109
107
|
additionalResourcePermission.push(
|
|
110
108
|
createIamRole(
|
|
@@ -114,32 +112,41 @@ async function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
114
112
|
[resourceNames(RESOURCE_CLASSES.lambda, 'CreateHdrInv')]
|
|
115
113
|
)
|
|
116
114
|
);
|
|
115
|
+
} else if (flowSchema.statusType === 'triggerCache') {
|
|
116
|
+
let dsqQueueName = upperCase(flowSchema.flowTag) + upperCase(HANDLER.hdrDsq);
|
|
117
|
+
additionalResourcePermission.push(...tableRoleForFlowSchema(objectSchema));
|
|
118
|
+
additionalResourcePermission.push(
|
|
119
|
+
createIamRole({
|
|
120
|
+
[RESOURCE_CLASSES.sqs]: Object.values(SQS_RESOURCE)
|
|
121
|
+
}, [
|
|
122
|
+
resourceNames(RESOURCE_CLASSES.sqs, dsqQueueName),
|
|
123
|
+
resourceNames(RESOURCE_CLASSES.sqs, dsqQueueName + 'DLQ')
|
|
124
|
+
]
|
|
125
|
+
)
|
|
126
|
+
)
|
|
127
|
+
createSources.push({
|
|
128
|
+
templatePath: templatePath,
|
|
129
|
+
templateData: {
|
|
130
|
+
...baseTemplateData,
|
|
131
|
+
handlerType: upperCase(HANDLER.hdrDsq),
|
|
132
|
+
functionNameConfig: upperCase(functionName) + upperCase(shortNameHandler(HANDLER.hdrDsq)),
|
|
133
|
+
queueName: dsqQueueName
|
|
134
|
+
},
|
|
135
|
+
setting: setting
|
|
136
|
+
})
|
|
117
137
|
}
|
|
118
138
|
|
|
119
|
-
|
|
139
|
+
createSources.push({
|
|
120
140
|
templatePath: templatePath,
|
|
121
141
|
templateData: {
|
|
122
|
-
|
|
123
|
-
SOURCE_PATH.resourceLocationFlowSchema,
|
|
124
|
-
upperCase(flowSchema.flowTag),
|
|
125
|
-
'source/'
|
|
126
|
-
),
|
|
127
|
-
functionName,
|
|
142
|
+
...baseTemplateData,
|
|
128
143
|
handlerType,
|
|
129
|
-
|
|
130
|
-
route,
|
|
131
|
-
functionNameConfig:
|
|
132
|
-
upperCase(functionName) + upperCase(shortNameHandler(handlerType)),
|
|
133
|
-
roleName: upperCase(flowSchema.flowTag),
|
|
144
|
+
functionNameConfig: upperCase(functionName) + upperCase(shortNameHandler(handlerType)),
|
|
134
145
|
queueName
|
|
135
146
|
},
|
|
136
|
-
setting:
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
fileExtension: '.yml',
|
|
140
|
-
isAppend: true
|
|
141
|
-
}
|
|
142
|
-
};
|
|
147
|
+
setting: setting
|
|
148
|
+
});
|
|
149
|
+
return createSources;
|
|
143
150
|
}
|
|
144
151
|
|
|
145
152
|
export default data;
|
package/src/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/functionYaml/template.ejs
CHANGED
|
@@ -9,10 +9,6 @@
|
|
|
9
9
|
- sqs:
|
|
10
10
|
arn: arn:aws:sqs:${self:custom.iz_region}:${self:custom.iz_accountId}:${self:custom.iz_resourcePrefix}<%- queueName %>
|
|
11
11
|
batchSize: 10
|
|
12
|
-
filterPatterns: #**** need to update serverless framework upper v.2.69.1
|
|
13
|
-
- body: {"MessageAttributes":{"callingFlow":{"Value":["${self:custom.iz_resourcePrefix}<%- functionName %>"]}}} # functionName of callingFlow
|
|
14
|
-
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
15
|
-
|
|
16
12
|
<%_ function firstLetterUpperCase(text){
|
|
17
13
|
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
18
14
|
} _%>
|