@izara_project/izara-core-generate-service-code 1.0.2 → 1.0.4
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 +0 -2
- package/package.json +3 -3
- package/src/GenerateCode.js +5 -4
- package/src/GenerateResources.js +4 -3
- 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 +37 -39
- 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 +24 -31
- 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/triggerCacheComplete/mainFunction/template.ejs +10 -4
- 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/GenerateSchema.js +0 -164
- package/src/SchemaConfig.js +0 -23
- 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
package/src/TemplateData/relationshipPerAction/moveRelationship/complete/mainFunction/template.ejs
CHANGED
|
@@ -26,11 +26,12 @@ import asyncFlowSharedLib from "@izara_project/izara-core-library-asynchronous-f
|
|
|
26
26
|
import { sns } from "@izara_project/izara-core-library-external-request";
|
|
27
27
|
import { utils } from '@izara_project/izara-core-library-service-schemas';
|
|
28
28
|
const { createLinkTypeId } = utils;
|
|
29
|
-
import {
|
|
29
|
+
import { consts as generateCodeConsts } from '@izara_project/izara-core-generate-service-code';
|
|
30
|
+
|
|
30
31
|
const {
|
|
31
32
|
TOPIC_NAME_GENERATE_CODE,
|
|
32
33
|
PREFIX
|
|
33
|
-
} =
|
|
34
|
+
} = generateCodeConsts;
|
|
34
35
|
|
|
35
36
|
//(<optionalRequire>)
|
|
36
37
|
//(</optionalRequire>)
|
|
@@ -20,10 +20,10 @@ 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
|
-
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } =
|
|
26
|
-
utils;
|
|
26
|
+
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = utils;
|
|
27
27
|
const { SOURCE_PATH, FUNCTION_NAME, SAVE_FILE_NAME } = consts;
|
|
28
28
|
|
|
29
29
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
@@ -19,10 +19,10 @@ 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
|
-
import
|
|
22
|
+
import consts from '../../../../../libs/Consts.js';
|
|
23
|
+
import utils from '../../../../../libs/Utils.js';
|
|
23
24
|
|
|
24
|
-
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } =
|
|
25
|
-
utils;
|
|
25
|
+
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = utils;
|
|
26
26
|
const { SOURCE_PATH, SAVE_FILE_NAME, FUNCTION_NAME } = consts;
|
|
27
27
|
|
|
28
28
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
@@ -19,32 +19,37 @@ 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
|
-
import
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
getLocalConfig
|
|
27
|
-
} = utils;
|
|
22
|
+
import consts from '../../../../../libs/Consts.js';
|
|
23
|
+
import utils from '../../../../../libs/Utils.js';
|
|
24
|
+
import libs from '../../../../../libs/Libs.js'
|
|
25
|
+
|
|
28
26
|
const {
|
|
29
|
-
HANDLER,
|
|
30
27
|
STORAGE_TYPES,
|
|
31
|
-
DYNAMO_RESOURCE,
|
|
32
|
-
FUNCTION_NAME,
|
|
33
28
|
RESOURCE_CLASSES,
|
|
29
|
+
SOURCE_PATH,
|
|
34
30
|
SAVE_FILE_NAME,
|
|
35
|
-
|
|
31
|
+
FUNCTION_NAME,
|
|
36
32
|
SNS_RESOURCE,
|
|
37
|
-
|
|
33
|
+
SHORT_FUNCTION_NAME,
|
|
34
|
+
SOURCE_GENERATE_IAM_ROLE,
|
|
38
35
|
SQS_RESOURCE,
|
|
39
|
-
|
|
36
|
+
HANDLER
|
|
37
|
+
} = consts;
|
|
38
|
+
|
|
39
|
+
const {
|
|
40
|
+
firstLetterUpperCase: upperCase,
|
|
41
|
+
getLocalConfig
|
|
42
|
+
} = utils;
|
|
43
|
+
|
|
44
|
+
const {
|
|
40
45
|
createIamRole,
|
|
41
|
-
defaultIamRolePerAction,
|
|
42
46
|
resourceNames,
|
|
47
|
+
defaultIamRolePerAction,
|
|
48
|
+
awaitingMultipleStepsRole,
|
|
43
49
|
shortNameHandler,
|
|
44
|
-
SOURCE_GENERATE_IAM_ROLE,
|
|
45
50
|
checkDynamoTypeRelationship,
|
|
46
51
|
createDynamoDbComponentByLinks
|
|
47
|
-
} =
|
|
52
|
+
} = libs;
|
|
48
53
|
|
|
49
54
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
50
55
|
const apiTemplate = path.join(__dirname, 'templateByHandler/apiTemplate.ejs');
|
|
@@ -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
|
|
24
|
-
|
|
25
|
-
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } =
|
|
26
|
-
utils;
|
|
23
|
+
import consts from '../../../../../libs/Consts.js';
|
|
24
|
+
import utils from '../../../../../libs/Utils.js';
|
|
27
25
|
const { SOURCE_PATH, FUNCTION_NAME, HANDLER } = consts;
|
|
28
26
|
|
|
27
|
+
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = utils;
|
|
28
|
+
|
|
29
29
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
30
30
|
const apiTemplate = path.join(__dirname, 'templateByHandler/apiTemplate.ejs');
|
|
31
31
|
const dsqTemplate = path.join(__dirname, 'templateByHandler/dsqTemplate.ejs');
|
|
@@ -19,12 +19,12 @@ 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
|
-
import
|
|
23
|
-
|
|
24
|
-
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } =
|
|
25
|
-
utils;
|
|
22
|
+
import consts from '../../../../../libs/Consts.js';
|
|
23
|
+
import utils from '../../../../../libs/Utils.js';
|
|
26
24
|
const { SOURCE_PATH, FUNCTION_NAME } = consts;
|
|
27
25
|
|
|
26
|
+
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = utils;
|
|
27
|
+
|
|
28
28
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
29
29
|
|
|
30
30
|
/**
|
|
@@ -43,10 +43,13 @@ const {
|
|
|
43
43
|
getGraphServiceTagWithCache
|
|
44
44
|
} = serviceConfig;
|
|
45
45
|
|
|
46
|
-
import {
|
|
47
|
-
const {
|
|
46
|
+
import { consts as generateCodeConsts } from '@izara_project/izara-core-generate-service-code';
|
|
47
|
+
const {
|
|
48
|
+
PREFIX,
|
|
48
49
|
TOPIC_NAME_GENERATE_CODE,
|
|
49
|
-
TOPIC_NAME_GRAPH_HANDLER
|
|
50
|
+
TOPIC_NAME_GRAPH_HANDLER
|
|
51
|
+
} = generateCodeConsts;
|
|
52
|
+
|
|
50
53
|
import { consts as coreConsts } from '@izara_project/izara-core-library-core';
|
|
51
54
|
|
|
52
55
|
//(<optionalRequire>)
|
|
@@ -20,12 +20,13 @@ 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
|
-
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } =
|
|
26
|
-
utils;
|
|
27
26
|
const { SOURCE_PATH, SAVE_FILE_NAME, FUNCTION_NAME, HANDLER } = consts;
|
|
28
27
|
|
|
28
|
+
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = utils;
|
|
29
|
+
|
|
29
30
|
const snsTemplatePath = path.join(__dirname, './snsTemplate.ejs');
|
|
30
31
|
const sqsTemplatePath = path.join(__dirname, './sqsTemplate.ejs');
|
|
31
32
|
|
|
@@ -20,14 +20,13 @@ 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
|
-
const {
|
|
26
|
-
firstLetterLowerCase: lowerCase,
|
|
27
|
-
firstLetterUpperCase: upperCase,
|
|
28
|
-
firstLetterUpperCase
|
|
29
|
-
} = utils;
|
|
30
26
|
const { SOURCE_PATH, SAVE_FILE_NAME, FUNCTION_NAME } = consts;
|
|
27
|
+
|
|
28
|
+
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = utils;
|
|
29
|
+
|
|
31
30
|
const templatePath = path.join(
|
|
32
31
|
__dirname,
|
|
33
32
|
'../../../ResourceYaml/sns-out/template.ejs'
|
|
@@ -19,27 +19,30 @@ 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
|
-
import
|
|
22
|
+
import consts from '../../../../../libs/Consts.js';
|
|
23
|
+
import utils from '../../../../../libs/Utils.js';
|
|
24
|
+
import libs from '../../../../../libs/Libs.js';
|
|
23
25
|
|
|
24
|
-
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } =
|
|
25
|
-
utils;
|
|
26
26
|
const {
|
|
27
|
-
|
|
28
|
-
resourceNames,
|
|
27
|
+
HANDLER,
|
|
29
28
|
RESOURCE_CLASSES,
|
|
30
29
|
SQS_RESOURCE,
|
|
31
30
|
SOURCE_PATH,
|
|
32
31
|
SAVE_FILE_NAME,
|
|
33
32
|
FUNCTION_NAME,
|
|
34
|
-
defaultIamRolePerAction,
|
|
35
|
-
awaitingMultipleStepsRole,
|
|
36
33
|
SNS_RESOURCE,
|
|
37
|
-
shortNameHandler,
|
|
38
34
|
SHORT_FUNCTION_NAME,
|
|
39
|
-
SOURCE_GENERATE_IAM_ROLE
|
|
40
|
-
HANDLER
|
|
35
|
+
SOURCE_GENERATE_IAM_ROLE
|
|
41
36
|
} = consts;
|
|
42
37
|
|
|
38
|
+
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = utils;
|
|
39
|
+
|
|
40
|
+
const {
|
|
41
|
+
defaultIamRolePerAction,
|
|
42
|
+
awaitingMultipleStepsRole,
|
|
43
|
+
createIamRole,
|
|
44
|
+
resourceNames
|
|
45
|
+
} = libs;
|
|
43
46
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
44
47
|
|
|
45
48
|
/**
|
|
@@ -19,9 +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
|
-
import
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
import consts from '../../../../../../libs/Consts.js';
|
|
23
|
+
import utils from '../../../../../../libs/Utils.js';
|
|
24
|
+
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = utils;
|
|
25
25
|
const { SOURCE_PATH, FUNCTION_NAME, HANDLER } = consts;
|
|
26
26
|
|
|
27
27
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
@@ -19,7 +19,8 @@ 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
|
-
import
|
|
22
|
+
import consts from '../../../../../libs/Consts.js';
|
|
23
|
+
import utils from '../../../../../libs/Utils.js';
|
|
23
24
|
|
|
24
25
|
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } =
|
|
25
26
|
utils;
|
|
@@ -26,11 +26,12 @@ import asyncFlowSharedLib from "@izara_project/izara-core-library-asynchronous-f
|
|
|
26
26
|
import { sns } from "@izara_project/izara-core-library-external-request";
|
|
27
27
|
import { utils } from '@izara_project/izara-core-library-service-schemas';
|
|
28
28
|
const { createLinkTypeId } = utils;
|
|
29
|
-
import {
|
|
29
|
+
import { consts as generateCodeConsts } from '@izara_project/izara-core-generate-service-code';
|
|
30
|
+
|
|
30
31
|
const {
|
|
31
32
|
TOPIC_NAME_GENERATE_CODE,
|
|
32
33
|
PREFIX
|
|
33
|
-
} =
|
|
34
|
+
} = generateCodeConsts;
|
|
34
35
|
|
|
35
36
|
//(<optionalRequire>)
|
|
36
37
|
//(</optionalRequire>)
|
|
@@ -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 templatePath = path.join(__dirname, 'template.ejs');
|
|
26
27
|
const { SOURCE_PATH, FUNCTION_NAME, SAVE_FILE_NAME } = consts;
|
|
27
|
-
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } =
|
|
28
|
-
utils;
|
|
28
|
+
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = utils;
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* create data for dynamoDbYaml tempalte from objectSchema
|
|
@@ -20,9 +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
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
import consts from '../../../../../libs/Consts.js';
|
|
24
|
+
import utils from '../../../../../libs/Utils.js';
|
|
25
|
+
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = utils;
|
|
26
26
|
const { SOURCE_PATH, SAVE_FILE_NAME, FUNCTION_NAME } = consts;
|
|
27
27
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
28
28
|
|
|
@@ -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
|
const { SOURCE_PATH, SAVE_FILE_NAME } = consts;
|
|
25
25
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
26
26
|
|
|
@@ -20,14 +20,18 @@ 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 libs from '../../../libs/Libs.js';
|
|
24
25
|
const {
|
|
25
26
|
SOURCE_PATH,
|
|
26
27
|
SAVE_FILE_NAME,
|
|
27
|
-
checkDynamoTypeRelationship,
|
|
28
|
-
createDynamoDbComponentByLinks,
|
|
29
28
|
STORAGE_TYPES
|
|
30
29
|
} = consts;
|
|
30
|
+
|
|
31
|
+
const {
|
|
32
|
+
checkDynamoTypeRelationship,
|
|
33
|
+
createDynamoDbComponentByLinks
|
|
34
|
+
} = libs
|
|
31
35
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
32
36
|
|
|
33
37
|
/**
|
|
@@ -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
|
|
|
25
26
|
const { firstLetterUpperCase: upperCase } = utils;
|
|
26
27
|
const { SOURCE_PATH, SAVE_FILE_NAME, STORAGE_TYPES } = consts;
|
|
@@ -16,12 +16,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import path from 'path';
|
|
19
|
+
import { getObjectSchema } from '@izara_project/izara-core-library-service-schemas';
|
|
20
|
+
import { NoRetryError } from '@izara_project/izara-core-library-core';
|
|
19
21
|
|
|
20
|
-
import
|
|
22
|
+
import consts from '../../../libs/Consts.js';
|
|
23
|
+
import utils from '../../../libs/Utils.js';
|
|
21
24
|
const { STORAGE_TYPES } = consts;
|
|
22
25
|
const { firstLetterUpperCase: upperCase, getLocalConfig } = utils;
|
|
23
|
-
|
|
24
|
-
import { NoRetryError } from '@izara_project/izara-core-library-core';
|
|
26
|
+
|
|
25
27
|
|
|
26
28
|
async function filterCreateResourceYaml(
|
|
27
29
|
_izContext,
|
|
@@ -17,8 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
17
17
|
|
|
18
18
|
import { join } from 'path';
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
import { generateCodeUtils as checkValidTableYaml } from '../../../MainLibs/index.js';
|
|
20
|
+
|
|
22
21
|
|
|
23
22
|
import { getObjectSchema } from '@izara_project/izara-core-library-service-schemas';
|
|
24
23
|
|
|
@@ -38,6 +37,10 @@ import createFindDataAndProcessLogicalDefaultSnsInSqs from './sns-in-sqs/default
|
|
|
38
37
|
import createDynamoPerRelationshipLink from './dynamodb/generateDynamoPerLink.js';
|
|
39
38
|
import filterCreateResourceYaml from './filterGenerateResource/data.js';
|
|
40
39
|
|
|
40
|
+
// lib of generateCode
|
|
41
|
+
import libs from '../../libs/Utils.js';
|
|
42
|
+
const { checkValidTableYaml } = libs;
|
|
43
|
+
|
|
41
44
|
/**
|
|
42
45
|
* Generates code from templates based on object schemas
|
|
43
46
|
* @param {Object} _izContext - Context object
|
package/src/TemplateData/resourceYaml/sns-in-sqs/defaultSnsInSqsForFindDataAndProcessLogical.js
CHANGED
|
@@ -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, SAVE_FILE_NAME, FUNCTION_NAME, HANDLER } = consts;
|
|
26
|
-
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } =
|
|
27
|
-
utils;
|
|
27
|
+
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = utils;
|
|
28
28
|
|
|
29
29
|
const snsTemplatePath = path.join(__dirname, './snsTemplate.ejs');
|
|
30
30
|
const sqsTemplatePath = path.join(__dirname, './sqsTemplate.ejs');
|
|
@@ -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 {
|
|
25
26
|
ACTIONS,
|
|
26
27
|
HANDLER,
|
|
@@ -28,8 +29,8 @@ const {
|
|
|
28
29
|
DEFAULT_HANDLER_PER_ACTION,
|
|
29
30
|
SAVE_FILE_NAME
|
|
30
31
|
} = consts;
|
|
31
|
-
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } =
|
|
32
|
-
|
|
32
|
+
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = utils;
|
|
33
|
+
|
|
33
34
|
const snsTemplatePath = path.join(__dirname, './snsTemplate.ejs');
|
|
34
35
|
const sqsTemplatePath = path.join(__dirname, './sqsTemplate.ejs');
|
|
35
36
|
|
|
@@ -20,10 +20,10 @@ 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
|
-
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } =
|
|
26
|
-
utils;
|
|
26
|
+
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = utils;
|
|
27
27
|
const {
|
|
28
28
|
DEFAULT_HANDLER_PER_ACTION,
|
|
29
29
|
SOURCE_PATH,
|
|
@@ -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
|
+
|
|
24
25
|
const { SOURCE_PATH, SAVE_FILE_NAME } = consts;
|
|
25
26
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
26
27
|
|
package/src/libs/Libs.js
CHANGED
|
@@ -338,6 +338,27 @@ async function getExternalTopicComponentFromAllObjectSchemas(_izContext, allObjS
|
|
|
338
338
|
return externalTopicComponents
|
|
339
339
|
};
|
|
340
340
|
|
|
341
|
+
function tableRoleForFlowSchema(objectSchema) {
|
|
342
|
+
let tableNames = [];
|
|
343
|
+
let resourcePermission = [];
|
|
344
|
+
for (const storageResource of Object.values(objectSchema.storageResources)) {
|
|
345
|
+
if (storageResource.storageType === STORAGE_TYPES.dynamoDB) {
|
|
346
|
+
tableNames.push(storageResource.tableName)
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
resourcePermission.push(
|
|
351
|
+
createIamRole(
|
|
352
|
+
{
|
|
353
|
+
[RESOURCE_CLASSES.dynamoDbTable]: Object.values(DYNAMO_RESOURCE)
|
|
354
|
+
},
|
|
355
|
+
tableNames.map(tableName =>
|
|
356
|
+
resourceNames(RESOURCE_CLASSES.dynamoDbTable, tableName)
|
|
357
|
+
)
|
|
358
|
+
)
|
|
359
|
+
)
|
|
360
|
+
return resourcePermission;
|
|
361
|
+
};
|
|
341
362
|
|
|
342
363
|
export default {
|
|
343
364
|
resourceNames,
|
|
@@ -354,4 +375,5 @@ export default {
|
|
|
354
375
|
createDynamoDbComponentByLinks,
|
|
355
376
|
getStorageResourceFromObjectSchemas,
|
|
356
377
|
getExternalTopicComponentFromAllObjectSchemas,
|
|
378
|
+
tableRoleForFlowSchema
|
|
357
379
|
}
|
package/src/libs/Utils.js
CHANGED
|
@@ -70,21 +70,21 @@ function checkValidTableYaml(
|
|
|
70
70
|
// console.log("dynamoDbYamlSetting", dynamoDbYamlSetting)
|
|
71
71
|
if (
|
|
72
72
|
existsTableSetting.hasOwnProperty(
|
|
73
|
-
|
|
73
|
+
firstLetterUpperCase(dynamoDbYamlSetting.templateData.tableName)
|
|
74
74
|
)
|
|
75
75
|
) {
|
|
76
76
|
// exists table
|
|
77
77
|
if (
|
|
78
78
|
hash(
|
|
79
79
|
existsTableSetting[
|
|
80
|
-
|
|
80
|
+
firstLetterUpperCase(dynamoDbYamlSetting.templateData.tableName)
|
|
81
81
|
]
|
|
82
82
|
) === hash(dynamoDbYamlSetting.templateData.attributes.sort())
|
|
83
83
|
) {
|
|
84
84
|
continue;
|
|
85
85
|
} else {
|
|
86
86
|
throw Error(
|
|
87
|
-
`tableName:${
|
|
87
|
+
`tableName:${firstLetterUpperCase(dynamoDbYamlSetting.templateData.tableName)} have duplicate setting but not have same setting`
|
|
88
88
|
);
|
|
89
89
|
}
|
|
90
90
|
} else {
|
|
@@ -92,7 +92,7 @@ function checkValidTableYaml(
|
|
|
92
92
|
|
|
93
93
|
// not exists table
|
|
94
94
|
Object.assign(existsTableSetting, {
|
|
95
|
-
[
|
|
95
|
+
[firstLetterUpperCase(dynamoDbYamlSetting.templateData.tableName)]:
|
|
96
96
|
dynamoDbYamlSetting.templateData.attributes.sort()
|
|
97
97
|
});
|
|
98
98
|
}
|