@izara_project/izara-core-generate-service-code 1.0.52 → 1.0.54
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 +11 -17
- package/package.json +8 -8
- package/src/codeGenerators/app/initial_setup/InitialSetupGenerator.js +149 -0
- package/src/codeGenerators/app/initial_setup/templates/InitialSetup_LambdaRole.ejs +43 -0
- package/src/codeGenerators/app/initial_setup/templates/InitialSetup_SnsService.ejs +15 -0
- package/src/codeGenerators/app/initial_setup/templates/InitialSetup_TableName.ejs +9 -0
- package/src/codeGenerators/app/sls_yaml/FindDataYamlGenerator.js +23 -0
- package/src/codeGenerators/app/sls_yaml/FunctionYamlGenerator.js +230 -0
- package/src/codeGenerators/app/sls_yaml/ProcessLogicalYamlGenerator.js +21 -0
- package/src/codeGenerators/app/sls_yaml/RoleNameConfigGenerator.js +83 -0
- package/src/codeGenerators/app/sls_yaml/SharedResourceYamlGenerator.js +471 -0
- package/src/codeGenerators/app/sls_yaml/__tests__/SharedResourceYamlGenerator.test.js +176 -0
- package/src/codeGenerators/app/sls_yaml/_policy/PolicyEmitter.js +45 -0
- package/src/codeGenerators/app/sls_yaml/_policy/PolicyRegistry.js +94 -0
- package/src/codeGenerators/app/sls_yaml/_policy/__tests__/PolicyEmitter.test.js +55 -0
- package/src/codeGenerators/app/sls_yaml/_policy/__tests__/PolicyRegistry.test.js +48 -0
- package/src/codeGenerators/app/sls_yaml/_policy/templates/ManagedPolicy_Yaml.ejs +22 -0
- package/src/codeGenerators/app/sls_yaml/renderYamlTemplate.js +13 -0
- package/src/codeGenerators/app/sls_yaml/templates/FindData_Yaml.ejs +10 -0
- package/src/codeGenerators/app/sls_yaml/templates/FunctionYaml_Api.ejs +21 -0
- package/src/codeGenerators/app/sls_yaml/templates/FunctionYaml_EventBridge.ejs +14 -0
- package/src/codeGenerators/app/sls_yaml/templates/FunctionYaml_Inv.ejs +6 -0
- package/src/codeGenerators/app/sls_yaml/templates/FunctionYaml_Sqs.ejs +11 -0
- package/src/codeGenerators/app/sls_yaml/templates/FunctionYaml_Wbs.ejs +11 -0
- package/src/codeGenerators/app/sls_yaml/templates/ProcessLogical_Yaml.ejs +32 -0
- package/src/{generators/fromObjectSchema/roleNameConfig/templateYaml.ejs → codeGenerators/app/sls_yaml/templates/RoleNameConfig_Yaml.ejs} +1 -1
- package/src/codeGenerators/app/sls_yaml/templates/SharedResource_Yaml.ejs +39 -0
- package/src/codeGenerators/app/src/generatedCode/FindData/FindDataGenerator.js +238 -0
- package/src/codeGenerators/app/src/generatedCode/FindData/templates/FindData_HdrSqs.ejs +87 -0
- package/src/codeGenerators/app/src/generatedCode/FindData/templates/FindData_Main.ejs +108 -0
- package/src/codeGenerators/app/src/generatedCode/FindData/templates/GetByStorage/getByDynamo.ejs +32 -0
- package/src/{generators/fromObjectSchema/findData → codeGenerators/app/src/generatedCode/FindData/templates}/GetByStorage/getByGraph.ejs +5 -5
- package/src/codeGenerators/app/src/generatedCode/Flow/FlowEndpoints/EndpointsGenerator.js +119 -0
- package/src/{generators/fromObjectSchema/endpoint/main/beforeLogical/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowEndpoints/templates/FlowEndpointBeforeLogical_Main.ejs} +11 -16
- package/src/{generators/fromObjectSchema/endpoint/main/create/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowEndpoints/templates/crud/CreateEndpoint_Main.ejs} +6 -6
- package/src/{generators/fromObjectSchema/endpoint/main/delete/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowEndpoints/templates/crud/DeleteEndpoint_Main.ejs} +5 -5
- package/src/{generators/fromObjectSchema/endpoint/main/get/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowEndpoints/templates/crud/GetEndpoint_Main.ejs} +1 -1
- package/src/{generators/fromObjectSchema/endpoint/main/update/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowEndpoints/templates/crud/UpdateEndpoint_Main.ejs} +5 -5
- package/src/codeGenerators/app/src/generatedCode/Flow/FlowRbac/RbacFlowGenerator.js +112 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/FlowRbac/templates/rbac/CreateRolePermissions.ejs +135 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/FlowRbac/templates/rbac/CreateTargetRole.ejs +131 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/FlowRbac/templates/rbac/CreateUserRole.ejs +150 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/FlowRbac/templates/rbac/DeleteRolePermissions.ejs +132 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/FlowRbac/templates/rbac/DeleteTargetRole.ejs +132 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/FlowRbac/templates/rbac/DeleteUserFromRole.ejs +150 -0
- package/src/{generators/fromFlowSchema/events/s3/flowSchemaMainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowRbac/templates/rbac/ListRolePermissions.ejs} +70 -39
- package/src/codeGenerators/app/src/generatedCode/Flow/FlowRbac/templates/rbac/ListTargetRole.ejs +122 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/FlowRbac/templates/rbac/ListUserInRoles.ejs +117 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/FlowRelationshipEndpoints/RelationshipFlowGenerator.js +131 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/FlowSchemas/StatusFieldGenerator.js +116 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/FlowSchemas/WebSocketGenerator.js +124 -0
- package/src/{generators/fromFlowSchema/events/ownTopic/flowSchema/handler/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/endpoint/FlowEndpoint_HdrWbs.ejs} +6 -6
- package/src/{generators/fromFlowSchema/flowSchemaMainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/endpoint/FlowEndpoint_Main.ejs} +31 -25
- package/src/codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/endpoint/FlowEntryPoint_Main.ejs +38 -0
- package/src/{generators/fromFlowSchema/events/ownTopic/flowSchema/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/endpoint/FlowMain_Wbs.ejs} +20 -20
- package/src/{generators/fromFlowSchema/events/s3/upload/confirmReserved/handler/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3/ConfirmReserved_HdrSqs.ejs} +5 -5
- package/src/{generators/fromFlowSchema/events/s3/upload/createObject/handler/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3/CreateObject_HdrWbs.ejs} +2 -2
- package/src/{generators/fromFlowSchema/events/s3/upload/preSignUrl/createPreSignUrl/handler/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3/CreatePreSignUrl_HdrSqs.ejs} +5 -5
- package/src/{generators/fromFlowSchema/events/s3/upload/preSignUrl/createPreSignUrl/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3/CreatePreSignUrl_Main.ejs} +7 -7
- package/src/codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3/FlowHandler_HdrS3.ejs +66 -0
- package/src/{generators/fromFlowSchema/events/s3/upload/preSignUrl/reservedLimit/handler/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3/ReservedLimit_HdrSqs.ejs} +5 -5
- package/src/{generators/fromFlowSchema/statusTypes/statusField/handler/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/statusField/CompleteStatusField_HdrSqs.ejs} +0 -2
- package/src/{generators/fromObjectSchema/endpointComplete/create/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/step/FlowEndpointComplete_Main.ejs} +26 -24
- package/src/{generators/fromFlowSchema/flowStep/noPlugInHook/templateMain.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/step/FlowStep_Main.ejs} +13 -12
- package/src/{generators/fromFlowSchema/webSocket/webSocketComplete/functionYaml/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/webSocket/ProcessWebSocketFlow_Yaml.ejs} +5 -5
- package/src/{generators/fromFlowSchema/webSocket/webSocketComplete/sqs/templateSub.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/webSocket/ProcessWebSocketSub_Yaml.ejs} +1 -1
- package/src/{generators/fromFlowSchema/webSocket/webSocketComplete/handler/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/webSocket/ProcessWebSocket_HdrSqs.ejs} +1 -20
- package/src/{generators/fromFlowSchema/webSocket/webSocketComplete/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/webSocket/ProcessWebSocket_Main.ejs} +1 -21
- package/src/{generators/fromFlowSchema/webSocket/webSocket/connect/handler/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/webSocket/WebSocketConnect_Main.ejs} +1 -21
- package/src/{generators/fromFlowSchema/webSocket/webSocket/connect/functionYaml/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/webSocket/WebSocketConnect_Yaml.ejs} +1 -1
- package/src/codeGenerators/app/src/generatedCode/Flow/_shared/events/BaseSqsHandler.js +67 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_shared/events/eventBridge.js +25 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_shared/events/extTopic.js +6 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_shared/events/lambdaSyncApi.js +52 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_shared/events/lambdaSyncInv.js +52 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_shared/events/ownTopic.js +42 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_shared/events/registry.js +15 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_shared/events/s3.js +56 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_shared/events/s3Components/ConfirmAfterUploadS3Generator.js +46 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_shared/events/s3Components/CreateObjectGenerator.js +50 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_shared/events/s3Components/CreatePreSignUrlGenerator.js +48 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_shared/events/s3Components/ProcessAfterUploadS3Generator.js +49 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_shared/events/s3Components/ReservedLimitGenerator.js +47 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_shared/handlers/FlowHandler_HdrApi.ejs +51 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_shared/handlers/FlowHandler_HdrInv.ejs +45 -0
- package/src/{generators/fromPlugIn/firstFlowStep/handler/templateSqs.ejs → codeGenerators/app/src/generatedCode/Flow/_shared/handlers/FlowHandler_HdrSqs.ejs} +30 -9
- package/src/codeGenerators/app/src/generatedCode/Flow/_shared/shared/eventTypes.js +23 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_shared/shared/flowClassifier.js +49 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_shared/shared/flowEntryPointBase.js +102 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_shared/shared/flowMainFunctionBase.js +160 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_shared/shared/flowNaming.js +21 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_shared/shared/flowSelection.js +20 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_shared/shared/flowStepBase.js +229 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_shared/shared/flowStepNormalizer.js +28 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_shared/shared/flowValidator.js +144 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_shared/shared/registry.js +7 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_shared/shared/triggerCacheBase.js +183 -0
- package/src/{generators/fromFlowSchema/statusTypes/triggerCache/checkTriggerCacheComplete/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/_shared/triggerCache/CheckTriggerCache_Main.ejs} +0 -2
- package/src/{generators/fromObjectSchema/relationship/create/action/sns-in-sqs/sqsTemplate.ejs → codeGenerators/app/src/generatedCode/Flow/_shared/triggerCache/TriggerCacheQueue_Yaml.ejs} +6 -10
- package/src/{generators/fromFlowSchema/statusTypes/triggerCache/triggerCacheComplete/functionYaml/sqs/template.ejs → codeGenerators/app/src/generatedCode/Flow/_shared/yaml/SharedFunctionSqs_Yaml.ejs} +1 -5
- package/src/codeGenerators/app/src/generatedCode/ProcessLogical/ProcessLogicalGenerator.js +29 -0
- package/src/{generators/fromObjectSchema/processLogicalPagination/handler/sqs/template.ejs → codeGenerators/app/src/generatedCode/ProcessLogical/templates/PaginateProcessLogical_HdrSqs.ejs} +1 -1
- package/src/{generators/fromObjectSchema/processLogicalPagination/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/ProcessLogical/templates/PaginateProcessLogical_Main.ejs} +10 -10
- package/src/{generators/fromObjectSchema/processLogical/handler/template.ejs → codeGenerators/app/src/generatedCode/ProcessLogical/templates/ProcessLogical_HdrSqs.ejs} +1 -1
- package/src/{generators/fromObjectSchema/processLogical/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/ProcessLogical/templates/ProcessLogical_Main.ejs} +16 -16
- package/src/codeGenerators/app/src/generatedCode/SystemFlowSchemas/RegisterGenerator.js +150 -0
- package/src/{generators/fromFlowSchema/register/wbs/handler/template.ejs → codeGenerators/app/src/generatedCode/SystemFlowSchemas/templates/register/Register_HdrWbs.ejs} +1 -5
- package/src/codeGenerators/app/src/generatedCode/libs/ConstsGenerator.js +28 -0
- package/src/codeGenerators/app/src/generatedCode/libs/GenerateCodeLibsGenerator.js +28 -0
- package/src/codeGenerators/app/src/generatedCode/libs/templates/Consts.ejs +448 -0
- package/src/{generators/fromFlowSchema/shared/template.ejs → codeGenerators/app/src/generatedCode/libs/templates/GenerateCodeLibs.ejs} +38 -29
- package/src/codeGenerators/resource/sls_yaml/DynamoDBGenerator.js +96 -0
- package/src/codeGenerators/resource/sls_yaml/FlowOutGenerator.js +73 -0
- package/src/codeGenerators/resource/sls_yaml/FlowResourceYamlGenerator.js +199 -0
- package/src/codeGenerators/resource/sls_yaml/templates/DynamoDBTable_Yaml.ejs +20 -0
- package/src/{generators/fromObjectSchema/relationship/create/complete/sns-out/template.ejs → codeGenerators/resource/sls_yaml/templates/FlowOut_Yaml.ejs} +3 -5
- package/src/codeGenerators/resource/sls_yaml/templates/SystemDynamoDB_Yaml.ejs +138 -0
- package/src/{generators/fromObjectSchema/relationship/update/complete/sns-in-sqs/template.ejs → codeGenerators/resource/sls_yaml/templates/crud/ResourceSqsYaml.ejs} +6 -10
- package/src/{generators/fromObjectSchema/endpoint/resourceTemplate.ejs → codeGenerators/resource/sls_yaml/templates/crud/ResourceYaml.ejs} +9 -9
- package/src/core/renderTemplateFile.js +22 -0
- package/src/core/validate.js +161 -0
- package/src/generate.js +130 -0
- package/src/generateCode.js +247 -51
- package/src/generateIntTest.js +142 -0
- package/src/generateResourceIntTest.js +77 -0
- package/src/generateResources/IntTest/consts.js +36 -0
- package/src/generateResources/IntTest/generateResources/generateResources.js +11 -14
- package/src/generateResources/IntTest/generateTests/events/events.js +1 -4
- package/src/generateResources/IntTest/generateTests/generateTemplate.js +15 -16
- package/src/generateResources/IntTest/generateTests/pathIntTest/pathIntTest.js +6 -2
- package/src/generateResources/IntTest/generateTests/tests/tests.js +2 -6
- package/src/generateResources/IntTest/libs/libs.js +5 -5
- package/src/generateSchema.js +63 -0
- package/src/intTestGeneratorShared.js +36 -0
- package/src/parsers/flowSchemaParser.js +106 -0
- package/src/parsers/objectSchemaParser.js +39 -0
- package/src/parsers/relationshipSchemaParser.js +51 -0
- package/src/schemaGenerators/app/src/schemas/FlowSchemas/FlowSchemaGenerator.js +151 -0
- package/src/schemaGenerators/app/src/schemas/FlowSchemas/RbacFlowSchemaGenerator.js +84 -0
- package/src/schemaGenerators/app/src/schemas/FlowSchemas/RelationshipFlowSchemaGenerator.js +89 -0
- package/src/schemaGenerators/app/src/schemas/FlowSchemas/templates/DynamicFlowSchemaTemplate.ejs +39 -0
- package/src/schemaGenerators/app/src/schemas/FlowSchemas/templates/DynamicRbacFlowSchemaTemplate.ejs +19 -0
- package/src/schemaGenerators/app/src/schemas/FlowSchemas/templates/RelationshipFlowSchemaTemplate.ejs +32 -0
- package/src/schemaGenerators/app/src/schemas/ObjectSchemas/AttributeTreeSchemaGenerator.js +124 -0
- package/src/schemaGenerators/app/src/schemas/ObjectSchemas/PropertyValueSchemaGenerator.js +119 -0
- package/src/schemaGenerators/app/src/schemas/ObjectSchemas/templates/DynamicAttributeTreeManagerSchemaTemplate.ejs +14 -0
- package/src/schemaGenerators/app/src/schemas/ObjectSchemas/templates/DynamicAttributeTreeStandardSchemaTemplate.ejs +13 -0
- package/src/schemaGenerators/app/src/schemas/ObjectSchemas/templates/DynamicPropertyValueSchemaTemplate.ejs +15 -0
- package/src/schemaGenerators/app/src/schemas/RelationshipSchemas/AttributeTreeRelationshipSchemaGenerator.js +149 -0
- package/src/schemaGenerators/app/src/schemas/RelationshipSchemas/PropertyValueRelationshipSchemaGenerator.js +143 -0
- package/src/schemaGenerators/app/src/schemas/RelationshipSchemas/templates/DynamicAttributeTreeRelationshipSchemaTemplate.ejs +7 -0
- package/src/schemaGenerators/app/src/schemas/RelationshipSchemas/templates/DynamicPropertyValueRelationshipSchemaTemplate.ejs +7 -0
- package/src/schemaGenerators/app/src/schemas/SystemTextSchemas/SystemTextGenerator.js +102 -0
- package/src/{generators/fromObjectSchema/textTag/systemText/template.ejs → schemaGenerators/app/src/schemas/SystemTextSchemas/templates/SystemText_Template.ejs} +1 -1
- package/REFACTOR_PLAN.md +0 -172
- package/fix_array.js +0 -11
- package/fix_imports.js +0 -41
- package/fix_upper.js +0 -38
- package/src/IntTestConfig.js +0 -23
- package/src/generateResources/IntTest/upload/uploadIntTest.js +0 -96
- package/src/generateResources.js +0 -123
- package/src/generateTests.js +0 -139
- package/src/generators/fromExternalService/externalServiceComponent/functionNameConfig/functionNameConfig.js +0 -182
- package/src/generators/fromExternalService/externalServiceComponent/functionNameConfig/template.ejs +0 -14
- package/src/generators/fromExternalService/externalServiceComponent/functionNameConfig/templateIntTesting.ejs +0 -31
- package/src/generators/fromExternalService/externalServiceComponent/functionNameConfig/templateYaml.ejs +0 -10
- package/src/generators/fromExternalService/externalServiceComponent/index.js +0 -69
- package/src/generators/fromExternalService/externalServiceComponent/lambdaRole/lambdaRole.js +0 -250
- package/src/generators/fromExternalService/externalServiceComponent/lambdaRole/template.ejs +0 -58
- package/src/generators/fromExternalService/externalServiceComponent/snsTopicSubscriptions/snsTopicSubscriptions.js +0 -155
- package/src/generators/fromExternalService/externalServiceComponent/snsTopicSubscriptions/template.ejs +0 -33
- package/src/generators/fromExternalService/externalServiceComponent/tableNameConfig/tableNameConfig.js +0 -90
- package/src/generators/fromExternalService/externalServiceComponent/tableNameConfig/template.ejs +0 -43
- package/src/generators/fromExternalService/index.js +0 -65
- package/src/generators/fromFlowSchema/env/template.ejs +0 -5
- package/src/generators/fromFlowSchema/env/yaml.js +0 -73
- package/src/generators/fromFlowSchema/events/eventBridge/functionYaml/template.ejs +0 -14
- package/src/generators/fromFlowSchema/events/eventBridge/functionYaml/yaml.js +0 -168
- package/src/generators/fromFlowSchema/events/eventBridge/handler/inv/inv.js +0 -74
- package/src/generators/fromFlowSchema/events/eventBridge/handler/inv/request.json +0 -7
- package/src/generators/fromFlowSchema/events/eventBridge/handler/inv/template.ejs +0 -53
- package/src/generators/fromFlowSchema/events/eventBridge/index.js +0 -16
- package/src/generators/fromFlowSchema/events/eventBridge/mainFunction/main.js +0 -77
- package/src/generators/fromFlowSchema/events/eventBridge/mainFunction/request.json +0 -5
- package/src/generators/fromFlowSchema/events/eventBridge/mainFunction/template.ejs +0 -59
- package/src/generators/fromFlowSchema/events/extTopic/index.js +0 -18
- package/src/generators/fromFlowSchema/events/extTopic/process/functionYaml/template.ejs +0 -13
- package/src/generators/fromFlowSchema/events/extTopic/process/functionYaml/yaml.js +0 -159
- package/src/generators/fromFlowSchema/events/extTopic/process/handler/handler.js +0 -67
- package/src/generators/fromFlowSchema/events/extTopic/process/handler/template.ejs +0 -101
- package/src/generators/fromFlowSchema/events/extTopic/sns-in-sqs/snsInSqs.js +0 -79
- package/src/generators/fromFlowSchema/events/extTopic/sns-in-sqs/template.ejs +0 -44
- package/src/generators/fromFlowSchema/events/extTopic/sns-out/snsOut.js +0 -76
- package/src/generators/fromFlowSchema/events/lambdaSyncApi/functionYaml/template.ejs +0 -19
- package/src/generators/fromFlowSchema/events/lambdaSyncApi/functionYaml/yaml.js +0 -88
- package/src/generators/fromFlowSchema/events/lambdaSyncApi/handler/handler.js +0 -68
- package/src/generators/fromFlowSchema/events/lambdaSyncApi/handler/template.ejs +0 -84
- package/src/generators/fromFlowSchema/events/lambdaSyncApi/index.js +0 -14
- package/src/generators/fromFlowSchema/events/lambdaSyncInv/functionYaml/template.ejs +0 -6
- package/src/generators/fromFlowSchema/events/lambdaSyncInv/functionYaml/yaml.js +0 -75
- package/src/generators/fromFlowSchema/events/lambdaSyncInv/handler/handler.js +0 -64
- package/src/generators/fromFlowSchema/events/lambdaSyncInv/handler/template.ejs +0 -52
- package/src/generators/fromFlowSchema/events/lambdaSyncInv/index.js +0 -14
- package/src/generators/fromFlowSchema/events/ownTopic/endpoint/functionYaml/template.ejs +0 -10
- package/src/generators/fromFlowSchema/events/ownTopic/endpoint/functionYaml/yaml.js +0 -178
- package/src/generators/fromFlowSchema/events/ownTopic/endpoint/handler/DsqHandlerTemplate.ejs +0 -105
- package/src/generators/fromFlowSchema/events/ownTopic/endpoint/handler/SqsHandlerTemplate.ejs +0 -87
- package/src/generators/fromFlowSchema/events/ownTopic/endpoint/handler/handler.js +0 -93
- package/src/generators/fromFlowSchema/events/ownTopic/flowSchema/functionYaml/template.ejs +0 -11
- package/src/generators/fromFlowSchema/events/ownTopic/flowSchema/functionYaml/yaml.js +0 -127
- package/src/generators/fromFlowSchema/events/ownTopic/flowSchema/handler/handler.js +0 -65
- package/src/generators/fromFlowSchema/events/ownTopic/flowSchema/mainFunction/main.js +0 -64
- package/src/generators/fromFlowSchema/events/ownTopic/index.js +0 -32
- package/src/generators/fromFlowSchema/events/ownTopic/sns-in/snsIn.js +0 -108
- package/src/generators/fromFlowSchema/events/ownTopic/sns-out/snsOut.js +0 -77
- package/src/generators/fromFlowSchema/events/registry.js +0 -6
- package/src/generators/fromFlowSchema/events/s3/flowSchemaMainFunction/main.js +0 -121
- package/src/generators/fromFlowSchema/events/s3/flowSchemaMainFunction/templateByStatusType/statusFieldTemplate.ejs +0 -30
- package/src/generators/fromFlowSchema/events/s3/flowSchemaMainFunction/templateByStatusType/storedCacheTemplate.ejs +0 -26
- package/src/generators/fromFlowSchema/events/s3/flowSchemaMainFunction/templateByStatusType/triggerCacheTemplate.ejs +0 -44
- package/src/generators/fromFlowSchema/events/s3/index.js +0 -81
- package/src/generators/fromFlowSchema/events/s3/upload/confirmReserved/functionYaml/template.ejs +0 -13
- package/src/generators/fromFlowSchema/events/s3/upload/confirmReserved/functionYaml/yaml.js +0 -140
- package/src/generators/fromFlowSchema/events/s3/upload/confirmReserved/handler/handler.js +0 -65
- package/src/generators/fromFlowSchema/events/s3/upload/confirmReserved/mainFunction/main.js +0 -54
- package/src/generators/fromFlowSchema/events/s3/upload/confirmReserved/queue/queue.js +0 -63
- package/src/generators/fromFlowSchema/events/s3/upload/confirmReserved/queue/template.ejs +0 -42
- package/src/generators/fromFlowSchema/events/s3/upload/createObject/functionYaml/template.ejs +0 -16
- package/src/generators/fromFlowSchema/events/s3/upload/createObject/functionYaml/yaml.js +0 -133
- package/src/generators/fromFlowSchema/events/s3/upload/createObject/handler/handler.js +0 -66
- package/src/generators/fromFlowSchema/events/s3/upload/createObject/mainFunction/main.js +0 -65
- package/src/generators/fromFlowSchema/events/s3/upload/createObjectComplete/functionYaml/template.ejs +0 -13
- package/src/generators/fromFlowSchema/events/s3/upload/createObjectComplete/functionYaml/yaml.js +0 -139
- package/src/generators/fromFlowSchema/events/s3/upload/createObjectComplete/handler/handler.js +0 -68
- package/src/generators/fromFlowSchema/events/s3/upload/createObjectComplete/handler/template.ejs +0 -99
- package/src/generators/fromFlowSchema/events/s3/upload/createObjectComplete/mainFunction/main.js +0 -65
- package/src/generators/fromFlowSchema/events/s3/upload/createObjectComplete/mainFunction/template.ejs +0 -82
- package/src/generators/fromFlowSchema/events/s3/upload/createObjectComplete/sns-sqs/snsSqs.js +0 -70
- package/src/generators/fromFlowSchema/events/s3/upload/createObjectComplete/sns-sqs/template.ejs +0 -46
- package/src/generators/fromFlowSchema/events/s3/upload/preSignUrl/createPreSignUrl/functionYaml/template.ejs +0 -14
- package/src/generators/fromFlowSchema/events/s3/upload/preSignUrl/createPreSignUrl/functionYaml/yaml.js +0 -157
- package/src/generators/fromFlowSchema/events/s3/upload/preSignUrl/createPreSignUrl/handler/handler.js +0 -65
- package/src/generators/fromFlowSchema/events/s3/upload/preSignUrl/createPreSignUrl/mainFunction/main.js +0 -64
- package/src/generators/fromFlowSchema/events/s3/upload/preSignUrl/createPreSignUrl/queue/queue.js +0 -63
- package/src/generators/fromFlowSchema/events/s3/upload/preSignUrl/createPreSignUrl/queue/template.ejs +0 -42
- package/src/generators/fromFlowSchema/events/s3/upload/preSignUrl/reservedLimit/functionYaml/template.ejs +0 -10
- package/src/generators/fromFlowSchema/events/s3/upload/preSignUrl/reservedLimit/functionYaml/yaml.js +0 -164
- package/src/generators/fromFlowSchema/events/s3/upload/preSignUrl/reservedLimit/handler/handler.js +0 -66
- package/src/generators/fromFlowSchema/events/s3/upload/preSignUrl/reservedLimit/mainFunction/main.js +0 -59
- package/src/generators/fromFlowSchema/events/s3/upload/preSignUrl/reservedLimit/sqs/sqs.js +0 -67
- package/src/generators/fromFlowSchema/events/s3/upload/preSignUrl/reservedLimit/sqs/template.ejs +0 -50
- package/src/generators/fromFlowSchema/events/s3/upload/processFile/functionYml/HdrS3/template.ejs +0 -21
- package/src/generators/fromFlowSchema/events/s3/upload/processFile/functionYml/HdrS3/yaml.js +0 -156
- package/src/generators/fromFlowSchema/events/s3/upload/processFile/handler/handlerS3/handlerS3.js +0 -49
- package/src/generators/fromFlowSchema/events/s3/upload/processFile/handler/handlerS3/template.ejs +0 -50
- package/src/generators/fromFlowSchema/events/s3/upload/processFile/mainFunction/ProcessCsvtemplate.ejs +0 -182
- package/src/generators/fromFlowSchema/events/s3/upload/processFile/mainFunction/main.js +0 -49
- package/src/generators/fromFlowSchema/events/s3/upload/processFile/queue/dsqTemplatePath.ejs +0 -32
- package/src/generators/fromFlowSchema/events/s3/upload/processFile/queue/queue.js +0 -77
- package/src/generators/fromFlowSchema/events/s3/upload/processFile/queue/s3Template.ejs +0 -56
- package/src/generators/fromFlowSchema/events/s3/upload/relate/S3/s3.js +0 -61
- package/src/generators/fromFlowSchema/events/s3/upload/relate/S3/template.ejs +0 -13
- package/src/generators/fromFlowSchema/events/s3/upload/relate/sns-out/snsOut.js +0 -70
- package/src/generators/fromFlowSchema/events/s3/websocket/dynamoDb/ReservedTableData.js +0 -69
- package/src/generators/fromFlowSchema/flowSchemaMainFunction/main.js +0 -123
- package/src/generators/fromFlowSchema/flowSchemaMainFunction/templateByStatusType/statusFieldTemplate.ejs +0 -30
- package/src/generators/fromFlowSchema/flowSchemaMainFunction/templateByStatusType/storedCacheTemplate.ejs +0 -26
- package/src/generators/fromFlowSchema/flowSchemaMainFunction/templateByStatusType/triggerCacheTemplate.ejs +0 -44
- package/src/generators/fromFlowSchema/flowStep/afterPluginHook/handler/templateDsq.ejs +0 -151
- package/src/generators/fromFlowSchema/flowStep/afterPluginHook/handler/templateSqs.ejs +0 -89
- package/src/generators/fromFlowSchema/flowStep/afterPluginHook/templateMain.ejs +0 -93
- package/src/generators/fromFlowSchema/flowStep/afterPluginHook/templateResource.ejs +0 -91
- package/src/generators/fromFlowSchema/flowStep/afterPluginHook/templateYaml.ejs +0 -47
- package/src/generators/fromFlowSchema/flowStep/firstFlowStep/templateHandler.ejs +0 -95
- package/src/generators/fromFlowSchema/flowStep/firstFlowStep/templateMain.ejs +0 -95
- package/src/generators/fromFlowSchema/flowStep/firstFlowStep/templateResource.ejs +0 -56
- package/src/generators/fromFlowSchema/flowStep/firstFlowStep/templateYaml.ejs +0 -23
- package/src/generators/fromFlowSchema/flowStep/flowStep.js +0 -515
- package/src/generators/fromFlowSchema/flowStep/noPlugInHook/templateHandler.ejs +0 -95
- package/src/generators/fromFlowSchema/flowStep/noPlugInHook/templateResource.ejs +0 -52
- package/src/generators/fromFlowSchema/flowStep/noPlugInHook/templateYaml.ejs +0 -23
- package/src/generators/fromFlowSchema/index.js +0 -213
- package/src/generators/fromFlowSchema/register/complete/functionYaml/template.ejs +0 -23
- package/src/generators/fromFlowSchema/register/complete/functionYaml/yaml.js +0 -127
- package/src/generators/fromFlowSchema/register/complete/handler/handler.js +0 -61
- package/src/generators/fromFlowSchema/register/complete/mainFunction/main.js +0 -53
- package/src/generators/fromFlowSchema/register/dynamoDB/register.js +0 -74
- package/src/generators/fromFlowSchema/register/index.js +0 -50
- package/src/generators/fromFlowSchema/register/sns-in/snsIn.js +0 -59
- package/src/generators/fromFlowSchema/register/sns-in/template.ejs +0 -42
- package/src/generators/fromFlowSchema/register/subscriptionOutAll/subscriptionOutAll.js +0 -84
- package/src/generators/fromFlowSchema/register/subscriptionOutAll/template.ejs +0 -10
- package/src/generators/fromFlowSchema/register/wbs/functionYaml/template.ejs +0 -11
- package/src/generators/fromFlowSchema/register/wbs/functionYaml/yaml.js +0 -114
- package/src/generators/fromFlowSchema/register/wbs/handler/handler.js +0 -63
- package/src/generators/fromFlowSchema/register/wbs/mainFunction/main.js +0 -54
- package/src/generators/fromFlowSchema/shared/wsCodeLibs.js +0 -49
- package/src/generators/fromFlowSchema/statusTypes/registry.js +0 -2
- package/src/generators/fromFlowSchema/statusTypes/statusField/functionYaml/template.ejs +0 -18
- package/src/generators/fromFlowSchema/statusTypes/statusField/functionYaml/yaml.js +0 -169
- package/src/generators/fromFlowSchema/statusTypes/statusField/handler/handler.js +0 -68
- package/src/generators/fromFlowSchema/statusTypes/statusField/index.js +0 -22
- package/src/generators/fromFlowSchema/statusTypes/statusField/mainFunction/main.js +0 -67
- package/src/generators/fromFlowSchema/statusTypes/statusField/sns/sns.js +0 -66
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/checkTriggerCacheComplete/functionYaml/template.ejs +0 -18
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/checkTriggerCacheComplete/functionYaml/yaml.js +0 -154
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/checkTriggerCacheComplete/handler/handler.js +0 -73
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/checkTriggerCacheComplete/mainFunction/main.js +0 -75
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/index.js +0 -41
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/processTriggerCache/functionYaml/template.ejs +0 -18
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/processTriggerCache/functionYaml/yaml.js +0 -159
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/processTriggerCache/handler/handler.js +0 -74
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/processTriggerCache/mainFunction/main.js +0 -68
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/triggerCacheComplete/functionYaml/dsq/dsq.js +0 -148
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/triggerCacheComplete/functionYaml/dsq/template.ejs +0 -17
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/triggerCacheComplete/functionYaml/sqs/sqs.js +0 -148
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/triggerCacheComplete/handler/dsq/dsq.js +0 -69
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/triggerCacheComplete/handler/sqs/sqs.js +0 -69
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/triggerCacheComplete/mainFunction/main.js +0 -72
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/triggerCacheQueue/queue.js +0 -97
- package/src/generators/fromFlowSchema/statusTypes/triggerCache/triggerCacheQueue/template.ejs +0 -46
- package/src/generators/fromFlowSchema/webSocket/index.js +0 -39
- package/src/generators/fromFlowSchema/webSocket/webSocket/connect/functionYaml/yaml.js +0 -89
- package/src/generators/fromFlowSchema/webSocket/webSocket/connect/handler/handler.js +0 -55
- package/src/generators/fromFlowSchema/webSocket/webSocket/dynamoDb/WebSocketTaskData.js +0 -74
- package/src/generators/fromFlowSchema/webSocket/webSocket/dynamoDb/ttlDynamoTemplate.ejs +0 -29
- package/src/generators/fromFlowSchema/webSocket/webSocket/dynamoDb/userUploadRecords.js +0 -61
- package/src/generators/fromFlowSchema/webSocket/webSocketComplete/functionYaml/yaml.js +0 -144
- package/src/generators/fromFlowSchema/webSocket/webSocketComplete/handler/handler.js +0 -61
- package/src/generators/fromFlowSchema/webSocket/webSocketComplete/mainFunction/main.js +0 -53
- package/src/generators/fromFlowSchema/webSocket/webSocketComplete/sqs/sqs.js +0 -108
- package/src/generators/fromFlowSchema/webSocket/webSocketComplete/sqs/template.ejs +0 -40
- package/src/generators/fromObjectSchema/endpoint/handler/api.js +0 -55
- package/src/generators/fromObjectSchema/endpoint/handler/apiTemplate.ejs +0 -81
- package/src/generators/fromObjectSchema/endpoint/handler/beforeLogical.js +0 -56
- package/src/generators/fromObjectSchema/endpoint/handler/beforeLogicalTemplate.ejs +0 -123
- package/src/generators/fromObjectSchema/endpoint/handler/dsq.js +0 -55
- package/src/generators/fromObjectSchema/endpoint/handler/dsqTemplate.ejs +0 -126
- package/src/generators/fromObjectSchema/endpoint/handler/inv.js +0 -55
- package/src/generators/fromObjectSchema/endpoint/handler/invTemplate.ejs +0 -63
- package/src/generators/fromObjectSchema/endpoint/handler/sqs.js +0 -55
- package/src/generators/fromObjectSchema/endpoint/handler/sqsTemplate.ejs +0 -124
- package/src/generators/fromObjectSchema/endpoint/index.js +0 -290
- package/src/generators/fromObjectSchema/endpoint/main/beforeLogical/beforeLogical.js +0 -54
- package/src/generators/fromObjectSchema/endpoint/main/create/create.js +0 -52
- package/src/generators/fromObjectSchema/endpoint/main/delete/delete.js +0 -49
- package/src/generators/fromObjectSchema/endpoint/main/get/get.js +0 -49
- package/src/generators/fromObjectSchema/endpoint/main/update/update.js +0 -50
- package/src/generators/fromObjectSchema/endpoint/resource.js +0 -72
- package/src/generators/fromObjectSchema/endpoint/yaml.js +0 -308
- package/src/generators/fromObjectSchema/endpoint/yamlTemplate.ejs +0 -28
- package/src/generators/fromObjectSchema/endpointComplete/create/handler/handler.js +0 -63
- package/src/generators/fromObjectSchema/endpointComplete/create/handler/template.ejs +0 -126
- package/src/generators/fromObjectSchema/endpointComplete/create/mainFunction/main.js +0 -54
- package/src/generators/fromObjectSchema/endpointComplete/create/sns-in-sqs/snsInSqs.js +0 -63
- package/src/generators/fromObjectSchema/endpointComplete/create/sns-in-sqs/template.ejs +0 -44
- package/src/generators/fromObjectSchema/endpointComplete/create/sns-out/snsOut.js +0 -72
- package/src/generators/fromObjectSchema/endpointComplete/create/sns-out/template.ejs +0 -8
- package/src/generators/fromObjectSchema/endpointComplete/create/yaml/template.ejs +0 -17
- package/src/generators/fromObjectSchema/endpointComplete/create/yaml/yaml.js +0 -152
- package/src/generators/fromObjectSchema/endpointComplete/delete/handler/handler.js +0 -68
- package/src/generators/fromObjectSchema/endpointComplete/delete/handler/template.ejs +0 -122
- package/src/generators/fromObjectSchema/endpointComplete/delete/mainFunction/main.js +0 -55
- package/src/generators/fromObjectSchema/endpointComplete/delete/mainFunction/template.ejs +0 -87
- package/src/generators/fromObjectSchema/endpointComplete/delete/sns-in-sqs/snsInSqs.js +0 -64
- package/src/generators/fromObjectSchema/endpointComplete/delete/sns-in-sqs/template.ejs +0 -44
- package/src/generators/fromObjectSchema/endpointComplete/delete/sns-out/snsOut.js +0 -69
- package/src/generators/fromObjectSchema/endpointComplete/delete/yaml/template.ejs +0 -16
- package/src/generators/fromObjectSchema/endpointComplete/delete/yaml/yaml.js +0 -124
- package/src/generators/fromObjectSchema/endpointComplete/get/handler/handler.js +0 -68
- package/src/generators/fromObjectSchema/endpointComplete/get/handler/template.ejs +0 -122
- package/src/generators/fromObjectSchema/endpointComplete/get/mainFunction/main.js +0 -54
- package/src/generators/fromObjectSchema/endpointComplete/get/mainFunction/template.ejs +0 -132
- package/src/generators/fromObjectSchema/endpointComplete/get/sns-in-sqs/snsInSqs.js +0 -63
- package/src/generators/fromObjectSchema/endpointComplete/get/sns-in-sqs/template.ejs +0 -44
- package/src/generators/fromObjectSchema/endpointComplete/get/sns-out/snsOut.js +0 -69
- package/src/generators/fromObjectSchema/endpointComplete/get/yaml/template.ejs +0 -17
- package/src/generators/fromObjectSchema/endpointComplete/get/yaml/yaml.js +0 -127
- package/src/generators/fromObjectSchema/endpointComplete/index.js +0 -101
- package/src/generators/fromObjectSchema/endpointComplete/update/handler/handler.js +0 -68
- package/src/generators/fromObjectSchema/endpointComplete/update/handler/template.ejs +0 -122
- package/src/generators/fromObjectSchema/endpointComplete/update/mainFunction/main.js +0 -54
- package/src/generators/fromObjectSchema/endpointComplete/update/mainFunction/template.ejs +0 -218
- package/src/generators/fromObjectSchema/endpointComplete/update/sns-in-sqs/snsInSqs.js +0 -63
- package/src/generators/fromObjectSchema/endpointComplete/update/sns-in-sqs/template.ejs +0 -44
- package/src/generators/fromObjectSchema/endpointComplete/update/sns-out/snsOut.js +0 -66
- package/src/generators/fromObjectSchema/endpointComplete/update/yaml/template.ejs +0 -16
- package/src/generators/fromObjectSchema/endpointComplete/update/yaml/yaml.js +0 -155
- package/src/generators/fromObjectSchema/findData/GetByStorage/getByDynamo.ejs +0 -58
- package/src/generators/fromObjectSchema/findData/findDataYaml/findDataYaml.js +0 -204
- package/src/generators/fromObjectSchema/findData/findDataYaml/template.ejs +0 -10
- package/src/generators/fromObjectSchema/findData/handler/handler.js +0 -52
- package/src/generators/fromObjectSchema/findData/handler/template.ejs +0 -135
- package/src/generators/fromObjectSchema/findData/index.js +0 -70
- package/src/generators/fromObjectSchema/findData/mainFunction/main.js +0 -320
- package/src/generators/fromObjectSchema/findData/mainFunction/template.ejs +0 -156
- package/src/generators/fromObjectSchema/index.js +0 -134
- package/src/generators/fromObjectSchema/processLogical/handler/handler.js +0 -51
- package/src/generators/fromObjectSchema/processLogical/index.js +0 -50
- package/src/generators/fromObjectSchema/processLogical/mainFunction/main.js +0 -49
- package/src/generators/fromObjectSchema/processLogical/yaml/template.ejs +0 -10
- package/src/generators/fromObjectSchema/processLogical/yaml/yaml.js +0 -200
- package/src/generators/fromObjectSchema/processLogicalPagination/dsqYaml/dsqYaml.js +0 -51
- package/src/generators/fromObjectSchema/processLogicalPagination/dsqYaml/template.ejs +0 -32
- package/src/generators/fromObjectSchema/processLogicalPagination/handler/dsq/dsq.js +0 -50
- package/src/generators/fromObjectSchema/processLogicalPagination/handler/sqs/sqs.js +0 -49
- package/src/generators/fromObjectSchema/processLogicalPagination/index.js +0 -62
- package/src/generators/fromObjectSchema/processLogicalPagination/mainFunction/main.js +0 -49
- package/src/generators/fromObjectSchema/processLogicalPagination/yaml/dsq/dsq.js +0 -189
- package/src/generators/fromObjectSchema/processLogicalPagination/yaml/dsq/template.ejs +0 -10
- package/src/generators/fromObjectSchema/processLogicalPagination/yaml/sqs/sqs.js +0 -198
- package/src/generators/fromObjectSchema/processLogicalPagination/yaml/sqs/template.ejs +0 -11
- package/src/generators/fromObjectSchema/rbac/dynamoDb/dynamoDb.js +0 -74
- package/src/generators/fromObjectSchema/rbac/index.js +0 -68
- package/src/generators/fromObjectSchema/rbac/lambda/handler/handler.js +0 -72
- package/src/generators/fromObjectSchema/rbac/lambda/handler/template.ejs +0 -52
- package/src/generators/fromObjectSchema/rbac/lambda/mainFunction/main.js +0 -83
- package/src/generators/fromObjectSchema/rbac/lambda/mainFunction/template.ejs +0 -111
- package/src/generators/fromObjectSchema/rbac/lambda/yaml/template.ejs +0 -6
- package/src/generators/fromObjectSchema/rbac/lambda/yaml/yaml.js +0 -109
- package/src/generators/fromObjectSchema/relationship/changeRelationship/action/functionYaml/template.ejs +0 -29
- package/src/generators/fromObjectSchema/relationship/changeRelationship/action/functionYaml/yaml.js +0 -201
- package/src/generators/fromObjectSchema/relationship/changeRelationship/action/handler/handler.js +0 -76
- package/src/generators/fromObjectSchema/relationship/changeRelationship/action/handler/template.ejs +0 -9
- package/src/generators/fromObjectSchema/relationship/changeRelationship/action/handler/templateByHandler/apiTemplate.ejs +0 -150
- package/src/generators/fromObjectSchema/relationship/changeRelationship/action/handler/templateByHandler/dsqTemplate.ejs +0 -194
- package/src/generators/fromObjectSchema/relationship/changeRelationship/action/handler/templateByHandler/invTemplate.ejs +0 -138
- package/src/generators/fromObjectSchema/relationship/changeRelationship/action/handler/templateByHandler/sqsTemplate.ejs +0 -178
- package/src/generators/fromObjectSchema/relationship/changeRelationship/action/mainFunction/main.js +0 -61
- package/src/generators/fromObjectSchema/relationship/changeRelationship/action/sns-in-sqs/snsInSqs.js +0 -76
- package/src/generators/fromObjectSchema/relationship/changeRelationship/action/sns-in-sqs/snsTemplate.ejs +0 -56
- package/src/generators/fromObjectSchema/relationship/changeRelationship/action/sns-in-sqs/sqsTemplate.ejs +0 -40
- package/src/generators/fromObjectSchema/relationship/changeRelationship/complete/functionYaml/template.ejs +0 -16
- package/src/generators/fromObjectSchema/relationship/changeRelationship/complete/functionYaml/yaml.js +0 -139
- package/src/generators/fromObjectSchema/relationship/changeRelationship/complete/handler/sqs/sqs.js +0 -61
- package/src/generators/fromObjectSchema/relationship/changeRelationship/complete/handler/sqs/template.ejs +0 -126
- package/src/generators/fromObjectSchema/relationship/changeRelationship/complete/mainFunction/main.js +0 -56
- package/src/generators/fromObjectSchema/relationship/changeRelationship/complete/sns-in-sqs/snsInSqs.js +0 -64
- package/src/generators/fromObjectSchema/relationship/changeRelationship/complete/sns-in-sqs/template.ejs +0 -43
- package/src/generators/fromObjectSchema/relationship/changeRelationship/complete/sns-out/snsOut.js +0 -68
- package/src/generators/fromObjectSchema/relationship/changeRelationship/complete/sns-out/template.ejs +0 -8
- package/src/generators/fromObjectSchema/relationship/create/action/functionYaml/template.ejs +0 -29
- package/src/generators/fromObjectSchema/relationship/create/action/functionYaml/yaml.js +0 -238
- package/src/generators/fromObjectSchema/relationship/create/action/handler/handler.js +0 -76
- package/src/generators/fromObjectSchema/relationship/create/action/handler/template.ejs +0 -9
- package/src/generators/fromObjectSchema/relationship/create/action/handler/templateByHandler/apiTemplate.ejs +0 -134
- package/src/generators/fromObjectSchema/relationship/create/action/handler/templateByHandler/dsqTemplate.ejs +0 -176
- package/src/generators/fromObjectSchema/relationship/create/action/handler/templateByHandler/invTemplate.ejs +0 -120
- package/src/generators/fromObjectSchema/relationship/create/action/handler/templateByHandler/sqsTemplate.ejs +0 -160
- package/src/generators/fromObjectSchema/relationship/create/action/mainFunction/main.js +0 -60
- package/src/generators/fromObjectSchema/relationship/create/action/sns-in-sqs/snsInSqs.js +0 -77
- package/src/generators/fromObjectSchema/relationship/create/action/sns-in-sqs/snsTemplate.ejs +0 -56
- package/src/generators/fromObjectSchema/relationship/create/complete/functionYaml/template.ejs +0 -16
- package/src/generators/fromObjectSchema/relationship/create/complete/functionYaml/yaml.js +0 -140
- package/src/generators/fromObjectSchema/relationship/create/complete/handler/sqs/request.json +0 -0
- package/src/generators/fromObjectSchema/relationship/create/complete/handler/sqs/sqs.js +0 -61
- package/src/generators/fromObjectSchema/relationship/create/complete/handler/sqs/template.ejs +0 -126
- package/src/generators/fromObjectSchema/relationship/create/complete/mainFunction/main.js +0 -56
- package/src/generators/fromObjectSchema/relationship/create/complete/mainFunction/request.json +0 -0
- package/src/generators/fromObjectSchema/relationship/create/complete/sns-in-sqs/request.json +0 -0
- package/src/generators/fromObjectSchema/relationship/create/complete/sns-in-sqs/snsInSqs.js +0 -63
- package/src/generators/fromObjectSchema/relationship/create/complete/sns-in-sqs/template.ejs +0 -43
- package/src/generators/fromObjectSchema/relationship/create/complete/sns-out/request.json +0 -0
- package/src/generators/fromObjectSchema/relationship/create/complete/sns-out/snsOut.js +0 -67
- package/src/generators/fromObjectSchema/relationship/delete/action/functionYaml/template.ejs +0 -29
- package/src/generators/fromObjectSchema/relationship/delete/action/functionYaml/yaml.js +0 -241
- package/src/generators/fromObjectSchema/relationship/delete/action/handler/handler.js +0 -76
- package/src/generators/fromObjectSchema/relationship/delete/action/handler/template.ejs +0 -9
- package/src/generators/fromObjectSchema/relationship/delete/action/handler/templateByHandler/apiTemplate.ejs +0 -133
- package/src/generators/fromObjectSchema/relationship/delete/action/handler/templateByHandler/dsqTemplate.ejs +0 -176
- package/src/generators/fromObjectSchema/relationship/delete/action/handler/templateByHandler/invTemplate.ejs +0 -118
- package/src/generators/fromObjectSchema/relationship/delete/action/handler/templateByHandler/sqsTemplate.ejs +0 -167
- package/src/generators/fromObjectSchema/relationship/delete/action/mainFunction/main.js +0 -60
- package/src/generators/fromObjectSchema/relationship/delete/action/sns-in-sqs/snsInSqs.js +0 -77
- package/src/generators/fromObjectSchema/relationship/delete/action/sns-in-sqs/snsTemplate.ejs +0 -56
- package/src/generators/fromObjectSchema/relationship/delete/action/sns-in-sqs/sqsTemplate.ejs +0 -40
- package/src/generators/fromObjectSchema/relationship/delete/complete/functionYaml/request.json +0 -0
- package/src/generators/fromObjectSchema/relationship/delete/complete/functionYaml/template.ejs +0 -16
- package/src/generators/fromObjectSchema/relationship/delete/complete/functionYaml/yaml.js +0 -138
- package/src/generators/fromObjectSchema/relationship/delete/complete/handler/sqs/request.json +0 -0
- package/src/generators/fromObjectSchema/relationship/delete/complete/handler/sqs/sqs.js +0 -61
- package/src/generators/fromObjectSchema/relationship/delete/complete/handler/sqs/template.ejs +0 -126
- package/src/generators/fromObjectSchema/relationship/delete/complete/mainFunction/main.js +0 -56
- package/src/generators/fromObjectSchema/relationship/delete/complete/mainFunction/request.json +0 -0
- package/src/generators/fromObjectSchema/relationship/delete/complete/sns-in-sqs/request.json +0 -0
- package/src/generators/fromObjectSchema/relationship/delete/complete/sns-in-sqs/snsInSqs.js +0 -65
- package/src/generators/fromObjectSchema/relationship/delete/complete/sns-in-sqs/template.ejs +0 -44
- package/src/generators/fromObjectSchema/relationship/delete/complete/sns-out/request.json +0 -0
- package/src/generators/fromObjectSchema/relationship/delete/complete/sns-out/snsOut.js +0 -69
- package/src/generators/fromObjectSchema/relationship/delete/complete/sns-out/template.ejs +0 -8
- package/src/generators/fromObjectSchema/relationship/get/action/functionYaml/template.ejs +0 -23
- package/src/generators/fromObjectSchema/relationship/get/action/functionYaml/yaml.js +0 -235
- package/src/generators/fromObjectSchema/relationship/get/action/handler/handler.js +0 -76
- package/src/generators/fromObjectSchema/relationship/get/action/handler/template.ejs +0 -9
- package/src/generators/fromObjectSchema/relationship/get/action/handler/templateByHandler/apiTemplate.ejs +0 -134
- package/src/generators/fromObjectSchema/relationship/get/action/handler/templateByHandler/dsqTemplate.ejs +0 -175
- package/src/generators/fromObjectSchema/relationship/get/action/handler/templateByHandler/invTemplate.ejs +0 -119
- package/src/generators/fromObjectSchema/relationship/get/action/handler/templateByHandler/sqsTemplate.ejs +0 -160
- package/src/generators/fromObjectSchema/relationship/get/action/mainFunction/main.js +0 -59
- package/src/generators/fromObjectSchema/relationship/get/action/sns-in-sqs/snsInSqs.js +0 -77
- package/src/generators/fromObjectSchema/relationship/get/action/sns-in-sqs/snsTemplate.ejs +0 -56
- package/src/generators/fromObjectSchema/relationship/get/action/sns-in-sqs/sqsTemplate.ejs +0 -40
- package/src/generators/fromObjectSchema/relationship/get/complete/functionYaml/request.json +0 -0
- package/src/generators/fromObjectSchema/relationship/get/complete/functionYaml/template.ejs +0 -16
- package/src/generators/fromObjectSchema/relationship/get/complete/functionYaml/yaml.js +0 -139
- package/src/generators/fromObjectSchema/relationship/get/complete/handler/sqs/request.json +0 -0
- package/src/generators/fromObjectSchema/relationship/get/complete/handler/sqs/sqs.js +0 -62
- package/src/generators/fromObjectSchema/relationship/get/complete/handler/sqs/template.ejs +0 -127
- package/src/generators/fromObjectSchema/relationship/get/complete/mainFunction/main.js +0 -57
- package/src/generators/fromObjectSchema/relationship/get/complete/mainFunction/request.json +0 -0
- package/src/generators/fromObjectSchema/relationship/get/complete/sns-in-sqs/request.json +0 -0
- package/src/generators/fromObjectSchema/relationship/get/complete/sns-in-sqs/snsInSqs.js +0 -65
- package/src/generators/fromObjectSchema/relationship/get/complete/sns-in-sqs/template.ejs +0 -44
- package/src/generators/fromObjectSchema/relationship/get/complete/sns-out/request.json +0 -0
- package/src/generators/fromObjectSchema/relationship/get/complete/sns-out/snsOut.js +0 -70
- package/src/generators/fromObjectSchema/relationship/get/complete/sns-out/template.ejs +0 -8
- package/src/generators/fromObjectSchema/relationship/index.js +0 -164
- package/src/generators/fromObjectSchema/relationship/moveRelationship/action/functionYaml/template.ejs +0 -29
- package/src/generators/fromObjectSchema/relationship/moveRelationship/action/functionYaml/yaml.js +0 -204
- package/src/generators/fromObjectSchema/relationship/moveRelationship/action/handler/handler.js +0 -76
- package/src/generators/fromObjectSchema/relationship/moveRelationship/action/handler/template.ejs +0 -9
- package/src/generators/fromObjectSchema/relationship/moveRelationship/action/handler/templateByHandler/apiTemplate.ejs +0 -152
- package/src/generators/fromObjectSchema/relationship/moveRelationship/action/handler/templateByHandler/dsqTemplate.ejs +0 -195
- package/src/generators/fromObjectSchema/relationship/moveRelationship/action/handler/templateByHandler/invTemplate.ejs +0 -140
- package/src/generators/fromObjectSchema/relationship/moveRelationship/action/handler/templateByHandler/sqsTemplate.ejs +0 -179
- package/src/generators/fromObjectSchema/relationship/moveRelationship/action/mainFunction/main.js +0 -61
- package/src/generators/fromObjectSchema/relationship/moveRelationship/action/sns-in-sqs/snsInSqs.js +0 -76
- package/src/generators/fromObjectSchema/relationship/moveRelationship/action/sns-in-sqs/snsTemplate.ejs +0 -56
- package/src/generators/fromObjectSchema/relationship/moveRelationship/action/sns-in-sqs/sqsTemplate.ejs +0 -40
- package/src/generators/fromObjectSchema/relationship/moveRelationship/complete/functionYaml/template.ejs +0 -16
- package/src/generators/fromObjectSchema/relationship/moveRelationship/complete/functionYaml/yaml.js +0 -138
- package/src/generators/fromObjectSchema/relationship/moveRelationship/complete/handler/sqs/sqs.js +0 -61
- package/src/generators/fromObjectSchema/relationship/moveRelationship/complete/handler/sqs/template.ejs +0 -126
- package/src/generators/fromObjectSchema/relationship/moveRelationship/complete/mainFunction/main.js +0 -60
- package/src/generators/fromObjectSchema/relationship/moveRelationship/complete/sns-in-sqs/snsInSqs.js +0 -65
- package/src/generators/fromObjectSchema/relationship/moveRelationship/complete/sns-in-sqs/template.ejs +0 -43
- package/src/generators/fromObjectSchema/relationship/moveRelationship/complete/sns-out/snsOut.js +0 -69
- package/src/generators/fromObjectSchema/relationship/moveRelationship/complete/sns-out/template.ejs +0 -8
- package/src/generators/fromObjectSchema/relationship/update/action/functionYaml/template.ejs +0 -29
- package/src/generators/fromObjectSchema/relationship/update/action/functionYaml/yaml.js +0 -234
- package/src/generators/fromObjectSchema/relationship/update/action/handler/handler.js +0 -77
- package/src/generators/fromObjectSchema/relationship/update/action/handler/template.ejs +0 -9
- package/src/generators/fromObjectSchema/relationship/update/action/handler/templateByHandler/apiTemplate.ejs +0 -131
- package/src/generators/fromObjectSchema/relationship/update/action/handler/templateByHandler/dsqTemplate.ejs +0 -173
- package/src/generators/fromObjectSchema/relationship/update/action/handler/templateByHandler/invTemplate.ejs +0 -117
- package/src/generators/fromObjectSchema/relationship/update/action/handler/templateByHandler/sqsTemplate.ejs +0 -166
- package/src/generators/fromObjectSchema/relationship/update/action/mainFunction/main.js +0 -62
- package/src/generators/fromObjectSchema/relationship/update/action/mainFunction/request.json +0 -1
- package/src/generators/fromObjectSchema/relationship/update/action/sns-in-sqs/request.json +0 -3
- package/src/generators/fromObjectSchema/relationship/update/action/sns-in-sqs/snsInSqs.js +0 -85
- package/src/generators/fromObjectSchema/relationship/update/action/sns-in-sqs/snsTemplate.ejs +0 -56
- package/src/generators/fromObjectSchema/relationship/update/action/sns-in-sqs/sqsTemplate.ejs +0 -40
- package/src/generators/fromObjectSchema/relationship/update/action/sns-out/request.json +0 -3
- package/src/generators/fromObjectSchema/relationship/update/action/sns-out/snsOut.js +0 -69
- package/src/generators/fromObjectSchema/relationship/update/complete/functionYaml/request.json +0 -3
- package/src/generators/fromObjectSchema/relationship/update/complete/functionYaml/template.ejs +0 -17
- package/src/generators/fromObjectSchema/relationship/update/complete/functionYaml/yaml.js +0 -139
- package/src/generators/fromObjectSchema/relationship/update/complete/handler/sqs/request.json +0 -0
- package/src/generators/fromObjectSchema/relationship/update/complete/handler/sqs/sqs.js +0 -61
- package/src/generators/fromObjectSchema/relationship/update/complete/handler/sqs/template.ejs +0 -128
- package/src/generators/fromObjectSchema/relationship/update/complete/mainFunction/main.js +0 -56
- package/src/generators/fromObjectSchema/relationship/update/complete/mainFunction/request.json +0 -1
- package/src/generators/fromObjectSchema/relationship/update/complete/sns-in-sqs/request.json +0 -3
- package/src/generators/fromObjectSchema/relationship/update/complete/sns-in-sqs/snsInSqs.js +0 -64
- package/src/generators/fromObjectSchema/relationship/update/complete/sns-out/request.json +0 -3
- package/src/generators/fromObjectSchema/relationship/update/complete/sns-out/snsOut.js +0 -59
- package/src/generators/fromObjectSchema/relationship/update/complete/sns-out/template.ejs +0 -8
- package/src/generators/fromObjectSchema/roleNameConfig/roleNameConfig.js +0 -77
- package/src/generators/fromObjectSchema/textTag/index.js +0 -58
- package/src/generators/fromObjectSchema/textTag/systemText/systemText.js +0 -148
- package/src/generators/fromPlugIn/afterFirstFlowStep/recievePlugIn/handler/handler.js +0 -66
- package/src/generators/fromPlugIn/afterFirstFlowStep/recievePlugIn/handler/templateApi.ejs +0 -84
- package/src/generators/fromPlugIn/afterFirstFlowStep/recievePlugIn/handler/templateWebSocket.ejs +0 -66
- package/src/generators/fromPlugIn/afterFirstFlowStep/recievePlugIn/mainFunction/main.js +0 -58
- package/src/generators/fromPlugIn/afterFirstFlowStep/recievePlugIn/yaml/template.ejs +0 -18
- package/src/generators/fromPlugIn/afterFirstFlowStep/recievePlugIn/yaml/yaml.js +0 -91
- package/src/generators/fromPlugIn/afterFirstFlowStep/sendPlugIn/handler/handler.js +0 -0
- package/src/generators/fromPlugIn/afterFirstFlowStep/sendPlugIn/handler/template.ejs +0 -0
- package/src/generators/fromPlugIn/afterFirstFlowStep/sendPlugIn/mainFunction/main.js +0 -45
- package/src/generators/fromPlugIn/afterFirstFlowStep/sendPlugIn/mainFunction/template.ejs +0 -82
- package/src/generators/fromPlugIn/afterFirstFlowStep/sendPlugIn/yaml/template.ejs +0 -0
- package/src/generators/fromPlugIn/afterFirstFlowStep/sendPlugIn/yaml/yaml.js +0 -0
- package/src/generators/fromPlugIn/byConfig/handler/handler.js +0 -55
- package/src/generators/fromPlugIn/byConfig/handler/templateAwaitingStep.ejs +0 -105
- package/src/generators/fromPlugIn/byConfig/handler/templatePaginated.ejs +0 -137
- package/src/generators/fromPlugIn/byConfig/mainFunction/main.js +0 -54
- package/src/generators/fromPlugIn/byConfig/sns-sqs/queueNoTopic.ejs +0 -40
- package/src/generators/fromPlugIn/byConfig/sns-sqs/snsSqs.js +0 -56
- package/src/generators/fromPlugIn/byConfig/sns-sqs/snsTemplate.ejs +0 -55
- package/src/generators/fromPlugIn/byConfig/sns-sqs/sqsTemplate.ejs +0 -40
- package/src/generators/fromPlugIn/byConfig/yaml/template.ejs +0 -43
- package/src/generators/fromPlugIn/byConfig/yaml/yaml.js +0 -47
- package/src/generators/fromPlugIn/firstFlowStep/handler/handler.js +0 -58
- package/src/generators/fromPlugIn/firstFlowStep/handler/templateApi.ejs +0 -84
- package/src/generators/fromPlugIn/firstFlowStep/handler/templateDsq.ejs +0 -105
- package/src/generators/fromPlugIn/firstFlowStep/handler/templateInv.ejs +0 -53
- package/src/generators/fromPlugIn/firstFlowStep/mainFunction/main.js +0 -67
- package/src/generators/fromPlugIn/firstFlowStep/queueNtopic/dsqTemplate.ejs +0 -40
- package/src/generators/fromPlugIn/firstFlowStep/queueNtopic/queueNtopic.js +0 -54
- package/src/generators/fromPlugIn/firstFlowStep/queueNtopic/snsTemplate.ejs +0 -55
- package/src/generators/fromPlugIn/firstFlowStep/queueNtopic/sqsTemplate.ejs +0 -40
- package/src/generators/fromPlugIn/firstFlowStep/topicOut/topicOut.js +0 -48
- package/src/generators/fromPlugIn/firstFlowStep/yaml/template.ejs +0 -40
- package/src/generators/fromPlugIn/firstFlowStep/yaml/yaml.js +0 -47
- package/src/generators/fromPlugIn/index.js +0 -518
- package/src/generators/other/generateAuthYml/template.ejs +0 -18
- package/src/generators/other/generateAuthYml/yaml.js +0 -49
- package/src/generators/other/index.js +0 -41
- package/src/generators/resourceYamlComponent/dynamodb/defaultDynamoDbTable.js +0 -145
- package/src/generators/resourceYamlComponent/dynamodb/generateDynamoPerLink.js +0 -108
- package/src/generators/resourceYamlComponent/dynamodb/mainResourcePerObjectSchemaData.js +0 -166
- package/src/generators/resourceYamlComponent/dynamodb/template.ejs +0 -23
- package/src/generators/resourceYamlComponent/filterGenerateResource/filter.js +0 -125
- package/src/generators/resourceYamlComponent/index.js +0 -96
- package/src/generators/resourceYamlComponent/sns-in-sqs/defaultSnsInSqsForFindDataAndProcessLogical.js +0 -92
- package/src/generators/resourceYamlComponent/sns-in-sqs/request.json +0 -4
- package/src/generators/resourceYamlComponent/sns-in-sqs/snsAndSqsPerActionData.js +0 -86
- package/src/generators/resourceYamlComponent/sns-in-sqs/snsTemplate.ejs +0 -56
- package/src/generators/resourceYamlComponent/sns-in-sqs/sqsTemplate.ejs +0 -40
- package/src/generators/resourceYamlComponent/sns-out/defaultSnsOutForFindDataAndProcessLogical.js +0 -66
- package/src/generators/resourceYamlComponent/sns-out/request.json +0 -3
- package/src/generators/resourceYamlComponent/sns-out/snsOut.js +0 -80
- package/src/generators/resourceYamlComponent/sns-out/template.ejs +0 -10
- package/src/generators/roles/index.js +0 -31
- package/src/generators/roles/roleNameConfig/roleNameConfig.js +0 -181
- package/src/generators/roles/roleNameConfig/template.ejs +0 -14
- package/src/generators/roles/roleNameConfig/templateIntTesting.ejs +0 -31
- package/src/generators/roles/roleNameConfig/templateYaml.ejs +0 -10
- package/src/generators/roles/sharedResource/sharedResource.js +0 -103
- package/src/generators/roles/sharedResource/template.ejs +0 -33
- package/src/libs/Consts.js +0 -96
- package/src/libs/GenerateCodeLibs.js +0 -32
- package/src/libs/Libs.js +0 -585
- package/src/libs/Utils.js +0 -164
- package/src/libs/consts/functions.js +0 -96
- package/src/libs/consts/handlers.js +0 -30
- package/src/libs/consts/index.js +0 -6
- package/src/libs/consts/paths.js +0 -84
- package/src/libs/consts/resources.js +0 -48
- package/src/libs/consts/tags.js +0 -68
- package/src/libs/consts/topics.js +0 -67
- package/src/pipeline/fetchSchemas.js +0 -31
- package/src/pipeline/transformSchemas.js +0 -75
- package/src/pipeline/validateSources.js +0 -47
- package/src/pipeline/writeSources.js +0 -24
- package/src/sourceManager/CreateSource.js +0 -174
- /package/src/{generators/fromFlowSchema/events/generatedCode/index.js → codeGenerators/app/src/generatedCode/Flow/FlowEndpoints/.gitkeep} +0 -0
- /package/src/{generators/fromObjectSchema/relationship/changeRelationship/complete/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowRelationshipEndpoints/templates/relationship/ProcessChangeRelationshipComplete_Main.ejs} +0 -0
- /package/src/{generators/fromObjectSchema/relationship/changeRelationship/action/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowRelationshipEndpoints/templates/relationship/ProcessChangeRelationship_Main.ejs} +0 -0
- /package/src/{generators/fromObjectSchema/relationship/create/complete/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowRelationshipEndpoints/templates/relationship/ProcessCreateRelationshipComplete_Main.ejs} +0 -0
- /package/src/{generators/fromObjectSchema/relationship/create/action/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowRelationshipEndpoints/templates/relationship/ProcessCreateRelationship_Main.ejs} +0 -0
- /package/src/{generators/fromObjectSchema/relationship/delete/complete/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowRelationshipEndpoints/templates/relationship/ProcessDeleteRelationshipComplete_Main.ejs} +0 -0
- /package/src/{generators/fromObjectSchema/relationship/delete/action/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowRelationshipEndpoints/templates/relationship/ProcessDeleteRelationship_Main.ejs} +0 -0
- /package/src/{generators/fromObjectSchema/relationship/get/complete/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowRelationshipEndpoints/templates/relationship/ProcessGetRelationshipComplete_Main.ejs} +0 -0
- /package/src/{generators/fromObjectSchema/relationship/get/action/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowRelationshipEndpoints/templates/relationship/ProcessGetRelationship_Main.ejs} +0 -0
- /package/src/{generators/fromObjectSchema/relationship/moveRelationship/complete/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowRelationshipEndpoints/templates/relationship/ProcessMoveRelationshipComplete_Main.ejs} +0 -0
- /package/src/{generators/fromObjectSchema/relationship/moveRelationship/action/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowRelationshipEndpoints/templates/relationship/ProcessMoveRelationship_Main.ejs} +0 -0
- /package/src/{generators/fromObjectSchema/relationship/update/complete/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowRelationshipEndpoints/templates/relationship/ProcessUpdateRelationshipComplete_Main.ejs} +0 -0
- /package/src/{generators/fromObjectSchema/relationship/update/action/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowRelationshipEndpoints/templates/relationship/ProcessUpdateRelationship_Main.ejs} +0 -0
- /package/src/{generators/fromObjectSchema/relationship/create/complete/functionYaml/request.json → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/.gitkeep} +0 -0
- /package/src/{generators/fromFlowSchema/events/s3/upload/confirmReserved/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3/ConfirmReserved_Main.ejs} +0 -0
- /package/src/{generators/fromFlowSchema/events/s3/upload/createObject/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3/CreateObject_Main.ejs} +0 -0
- /package/src/{generators/fromFlowSchema/events/s3/upload/processFile/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3/ProcessS3File_Main.ejs} +0 -0
- /package/src/{generators/fromFlowSchema/events/s3/upload/preSignUrl/reservedLimit/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3/ReservedLimit_Main.ejs} +0 -0
- /package/src/{generators/fromFlowSchema/statusTypes/statusField/sns/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/statusField/CompleteStatusFieldSns_Yaml.ejs} +0 -0
- /package/src/{generators/fromFlowSchema/statusTypes/statusField/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/statusField/CompleteStatusField_Main.ejs} +0 -0
- /package/src/{generators/fromPlugIn/byConfig/mainFunction/templateAwaitingStep.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/step/plugIns/FlowStep_ByConfig_Awaiting_Main.ejs} +0 -0
- /package/src/{generators/fromPlugIn/byConfig/mainFunction/templatePaginated.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/step/plugIns/FlowStep_ByConfig_Paginated_Main.ejs} +0 -0
- /package/src/{generators/fromPlugIn/firstFlowStep/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/step/plugIns/FlowStep_PlugIn_Main.ejs} +0 -0
- /package/src/{generators/fromPlugIn/afterFirstFlowStep/recievePlugIn/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/step/plugIns/FlowStep_RecievePlugIn_Main.ejs} +0 -0
- /package/src/{generators/fromPlugIn/firstFlowStep/mainFunction/templateByConfig/awaitingSteps.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/step/plugIns/templateAwaitingStep.ejs} +0 -0
- /package/src/{generators/fromPlugIn/firstFlowStep/mainFunction/templateByConfig → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/step/plugIns}/templateSendPlugin.ejs +0 -0
- /package/src/{generators/fromFlowSchema/events/ownTopic/sns-in/sqsTemplate.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/webSocket/ProcessWebSocket_Yaml.ejs} +0 -0
- /package/src/{generators/fromFlowSchema/webSocket/webSocket/dynamoDb/template.ejs → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/webSocket/WebSocketDynamoDb_Yaml.ejs} +0 -0
- /package/src/{generators/fromFlowSchema/statusTypes/triggerCache/checkTriggerCacheComplete/handler/template.ejs → codeGenerators/app/src/generatedCode/Flow/_shared/triggerCache/CheckTriggerCache_HdrSqs.ejs} +0 -0
- /package/src/{generators/fromFlowSchema/statusTypes/triggerCache/processTriggerCache/handler/template.ejs → codeGenerators/app/src/generatedCode/Flow/_shared/triggerCache/ProcessTriggerCache_HdrSqs.ejs} +0 -0
- /package/src/{generators/fromFlowSchema/statusTypes/triggerCache/processTriggerCache/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/_shared/triggerCache/ProcessTriggerCache_Main.ejs} +0 -0
- /package/src/{generators/fromFlowSchema/statusTypes/triggerCache/triggerCacheComplete/handler/dsq/template.ejs → codeGenerators/app/src/generatedCode/Flow/_shared/triggerCache/TriggerCacheComplete_HdrDsq.ejs} +0 -0
- /package/src/{generators/fromFlowSchema/statusTypes/triggerCache/triggerCacheComplete/handler/sqs/template.ejs → codeGenerators/app/src/generatedCode/Flow/_shared/triggerCache/TriggerCacheComplete_HdrSqs.ejs} +0 -0
- /package/src/{generators/fromFlowSchema/statusTypes/triggerCache/triggerCacheComplete/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/_shared/triggerCache/TriggerCacheComplete_Main.ejs} +0 -0
- /package/src/{generators/fromObjectSchema/processLogicalPagination/handler/dsq/template.ejs → codeGenerators/app/src/generatedCode/ProcessLogical/templates/PaginateProcessLogical_HdrDsq.ejs} +0 -0
- /package/src/{generators/fromFlowSchema/register/complete/handler/template.ejs → codeGenerators/app/src/generatedCode/SystemFlowSchemas/templates/register/RegisterComplete_HdrSqs.ejs} +0 -0
- /package/src/{generators/fromFlowSchema/register/complete/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/SystemFlowSchemas/templates/register/RegisterComplete_Main.ejs} +0 -0
- /package/src/{generators/fromFlowSchema/register/wbs/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/SystemFlowSchemas/templates/register/Register_Main.ejs} +0 -0
- /package/src/{generators/fromObjectSchema/endpoint/resourceBeforeLogicalTemplate.ejs → codeGenerators/resource/sls_yaml/templates/crud/ResourceBeforeLogicalYaml.ejs} +0 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// src/codeGenerators/app/sls_yaml/_policy/PolicyRegistry.js
|
|
2
|
+
//
|
|
3
|
+
// In-memory IAM permission registry. Decoupled generators register
|
|
4
|
+
// (roleName, action, resource) tuples at any point during generation.
|
|
5
|
+
// PolicyEmitter reads the registry after all generators have run and
|
|
6
|
+
// emits one AWS::IAM::ManagedPolicy per role with deduplicated statements.
|
|
7
|
+
//
|
|
8
|
+
// Internal shape:
|
|
9
|
+
// Map<roleName, Map<action, Set<resource>>>
|
|
10
|
+
// The action→resource-set grouping means adding the same resource twice
|
|
11
|
+
// is a no-op (Set semantics), and multiple resources for one action get
|
|
12
|
+
// rendered as a Resource: [ ... ] array (required by IAM policy syntax).
|
|
13
|
+
|
|
14
|
+
export class PolicyRegistry {
|
|
15
|
+
constructor() {
|
|
16
|
+
/** @type {Map<string, Map<string, Set<string>>>} */
|
|
17
|
+
this._roles = new Map();
|
|
18
|
+
/** @type {Set<string>} Roles whose entries have been fully replaced via .set() */
|
|
19
|
+
this._replaced = new Set();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
add(roleName, action, resource) {
|
|
23
|
+
if (this._replaced.has(roleName)) {
|
|
24
|
+
throw new Error(
|
|
25
|
+
`PolicyRegistry.add("${roleName}", ...): role was previously replaced via .set(); ` +
|
|
26
|
+
`use .set() again or call .resetRole() first.`
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
if (!this._roles.has(roleName)) this._roles.set(roleName, new Map());
|
|
30
|
+
const actions = this._roles.get(roleName);
|
|
31
|
+
if (!actions.has(action)) actions.set(action, new Set());
|
|
32
|
+
actions.get(action).add(resource);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
addMany(roleName, perms) {
|
|
36
|
+
for (const p of perms) this.add(roleName, p.action, p.resource);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Fully replace a role's permission set (discards anything previously added). */
|
|
40
|
+
set(roleName, perms) {
|
|
41
|
+
this._roles.set(roleName, new Map());
|
|
42
|
+
this._replaced.add(roleName);
|
|
43
|
+
for (const p of perms) {
|
|
44
|
+
const actions = this._roles.get(roleName);
|
|
45
|
+
if (!actions.has(p.action)) actions.set(p.action, new Set());
|
|
46
|
+
actions.get(p.action).add(p.resource);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** Forget all registrations for a role (allows re-add). */
|
|
51
|
+
resetRole(roleName) {
|
|
52
|
+
this._roles.delete(roleName);
|
|
53
|
+
this._replaced.delete(roleName);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** Forget every role. Used between test cases or if a caller wants a clean slate. */
|
|
57
|
+
clear() {
|
|
58
|
+
this._roles.clear();
|
|
59
|
+
this._replaced.clear();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Return a serializable view of the registry grouped by role, with each role's
|
|
64
|
+
* permissions rendered as IAM-style statements (action + resource arrays).
|
|
65
|
+
* @returns {Record<string, { statements: Array<{ action: string[], resource: string[] }> }>}
|
|
66
|
+
*/
|
|
67
|
+
toGroupedByRole() {
|
|
68
|
+
const out = {};
|
|
69
|
+
for (const [roleName, actions] of this._roles.entries()) {
|
|
70
|
+
const statements = [];
|
|
71
|
+
for (const [action, resources] of actions.entries()) {
|
|
72
|
+
if (resources.size === 0) continue;
|
|
73
|
+
statements.push({
|
|
74
|
+
action: [action],
|
|
75
|
+
resource: [...resources]
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
if (statements.length > 0) out[roleName] = { statements };
|
|
79
|
+
}
|
|
80
|
+
return out;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** List of role names currently registered (useful for the emitter to iterate). */
|
|
84
|
+
registeredRoles() {
|
|
85
|
+
return [...this._roles.keys()];
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Module-level singleton — most callers want the shared registry across
|
|
91
|
+
* the whole generation run. Tests instantiate PolicyRegistry directly
|
|
92
|
+
* to avoid cross-test pollution.
|
|
93
|
+
*/
|
|
94
|
+
export const policyRegistry = new PolicyRegistry();
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { describe, it, expect, beforeEach, afterEach } from '@jest/globals';
|
|
2
|
+
import fs from 'fs/promises';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import os from 'os';
|
|
5
|
+
import { PolicyRegistry } from '../PolicyRegistry.js';
|
|
6
|
+
import { emitManagedPolicies } from '../PolicyEmitter.js';
|
|
7
|
+
|
|
8
|
+
describe('emitManagedPolicies', () => {
|
|
9
|
+
let tmpDir, reg;
|
|
10
|
+
beforeEach(async () => {
|
|
11
|
+
tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), 'iz-policy-emitter-'));
|
|
12
|
+
reg = new PolicyRegistry();
|
|
13
|
+
});
|
|
14
|
+
afterEach(async () => { await fs.rm(tmpDir, { recursive: true, force: true }); });
|
|
15
|
+
|
|
16
|
+
it('emits one .yml file per registered role', async () => {
|
|
17
|
+
reg.add('FindDataRole', 's3:GetObject', 'arn:aws:s3:::a/*');
|
|
18
|
+
reg.add('RegisterRole', 'dynamodb:GetItem', 'arn:aws:dynamodb:*:*:table/x');
|
|
19
|
+
await emitManagedPolicies(reg, { outputPath: tmpDir });
|
|
20
|
+
const files = await fs.readdir(path.join(tmpDir, 'app', 'sls_yaml', 'generatedCode', 'source', 'iam-managed-policies'));
|
|
21
|
+
expect(files.sort()).toEqual(['FindDataRolePolicy.yml', 'RegisterRolePolicy.yml']);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it('emits empty dir + no files when registry is empty', async () => {
|
|
25
|
+
await emitManagedPolicies(reg, { outputPath: tmpDir });
|
|
26
|
+
const outDir = path.join(tmpDir, 'app', 'sls_yaml', 'generatedCode', 'source', 'iam-managed-policies');
|
|
27
|
+
const stat = await fs.stat(outDir);
|
|
28
|
+
expect(stat.isDirectory()).toBe(true);
|
|
29
|
+
const files = await fs.readdir(outDir);
|
|
30
|
+
expect(files).toEqual([]);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('writes YAML that references the role via !Ref', async () => {
|
|
34
|
+
reg.add('FindDataRole', 's3:GetObject', 'arn:aws:s3:::a/*');
|
|
35
|
+
await emitManagedPolicies(reg, { outputPath: tmpDir });
|
|
36
|
+
const content = await fs.readFile(
|
|
37
|
+
path.join(tmpDir, 'app', 'sls_yaml', 'generatedCode', 'source', 'iam-managed-policies', 'FindDataRolePolicy.yml'),
|
|
38
|
+
'utf8'
|
|
39
|
+
);
|
|
40
|
+
expect(content).toContain('Type: AWS::IAM::ManagedPolicy');
|
|
41
|
+
expect(content).toContain('Roles:');
|
|
42
|
+
expect(content).toContain('!Ref FindDataRole');
|
|
43
|
+
expect(content).toContain('s3:GetObject');
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it('does NOT crash on roles with statements containing Serverless CFN variables', async () => {
|
|
47
|
+
reg.add('FindDataRole', 's3:GetObject', 'arn:aws:s3:::${self:custom.iz_serviceSchemaBucketName}/*');
|
|
48
|
+
await emitManagedPolicies(reg, { outputPath: tmpDir });
|
|
49
|
+
const content = await fs.readFile(
|
|
50
|
+
path.join(tmpDir, 'app', 'sls_yaml', 'generatedCode', 'source', 'iam-managed-policies', 'FindDataRolePolicy.yml'),
|
|
51
|
+
'utf8'
|
|
52
|
+
);
|
|
53
|
+
expect(content).toContain('${self:custom.iz_serviceSchemaBucketName}');
|
|
54
|
+
});
|
|
55
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { describe, it, expect, beforeEach } from '@jest/globals';
|
|
2
|
+
import { policyRegistry, PolicyRegistry } from '../PolicyRegistry.js';
|
|
3
|
+
|
|
4
|
+
describe('PolicyRegistry', () => {
|
|
5
|
+
let reg;
|
|
6
|
+
beforeEach(() => { reg = new PolicyRegistry(); });
|
|
7
|
+
|
|
8
|
+
it('add() dedupes identical (role, action, resource) tuples', () => {
|
|
9
|
+
reg.add('Role1', 's3:GetObject', 'arn:aws:s3:::bucket/*');
|
|
10
|
+
reg.add('Role1', 's3:GetObject', 'arn:aws:s3:::bucket/*');
|
|
11
|
+
expect(reg.toGroupedByRole().Role1.statements).toHaveLength(1);
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('add() groups multiple resources under one (role, action)', () => {
|
|
15
|
+
reg.add('Role1', 's3:GetObject', 'arn:aws:s3:::a/*');
|
|
16
|
+
reg.add('Role1', 's3:GetObject', 'arn:aws:s3:::b/*');
|
|
17
|
+
const stmt = reg.toGroupedByRole().Role1.statements[0];
|
|
18
|
+
expect(stmt.action).toEqual(['s3:GetObject']);
|
|
19
|
+
expect(stmt.resource).toEqual(['arn:aws:s3:::a/*', 'arn:aws:s3:::b/*']);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('addMany() inserts batch in one call', () => {
|
|
23
|
+
reg.addMany('Role1', [
|
|
24
|
+
{ action: 's3:GetObject', resource: 'arn:aws:s3:::a/*' },
|
|
25
|
+
{ action: 's3:ListBucket', resource: 'arn:aws:s3:::a' }
|
|
26
|
+
]);
|
|
27
|
+
expect(reg.toGroupedByRole().Role1.statements).toHaveLength(2);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it('set() replaces baseline for a role (full override)', () => {
|
|
31
|
+
reg.add('Role1', 's3:GetObject', 'arn:aws:s3:::a/*'); // baseline
|
|
32
|
+
reg.set('Role1', [{ action: 'dynamodb:GetItem', resource: 'arn:aws:dynamodb:*:*:table/x' }]);
|
|
33
|
+
expect(reg.toGroupedByRole().Role1.statements).toHaveLength(1);
|
|
34
|
+
expect(reg.toGroupedByRole().Role1.statements[0].action).toEqual(['dynamodb:GetItem']);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it('toGroupedByRole() returns empty object when nothing registered', () => {
|
|
38
|
+
expect(reg.toGroupedByRole()).toEqual({});
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
it('toGroupedByRole() preserves insertion order within a role', () => {
|
|
42
|
+
reg.add('Role1', 's3:GetObject', 'arn:aws:s3:::a/*');
|
|
43
|
+
reg.add('Role1', 'dynamodb:GetItem', 'arn:aws:dynamodb:*:*:table/x');
|
|
44
|
+
reg.add('Role1', 's3:ListBucket', 'arn:aws:s3:::a');
|
|
45
|
+
const stmts = reg.toGroupedByRole().Role1.statements;
|
|
46
|
+
expect(stmts.map(s => s.action[0])).toEqual(['s3:GetObject', 'dynamodb:GetItem', 's3:ListBucket']);
|
|
47
|
+
});
|
|
48
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Resources:
|
|
2
|
+
<%- roleName %>Policy:
|
|
3
|
+
Type: AWS::IAM::ManagedPolicy
|
|
4
|
+
Properties:
|
|
5
|
+
ManagedPolicyName: ${self:custom.iz_resourcePrefix}<%- roleName %>Policy
|
|
6
|
+
Description: "Managed policy for <%- roleName %> (auto-generated by PolicyEmitter)"
|
|
7
|
+
PolicyDocument:
|
|
8
|
+
Version: "2012-10-17"
|
|
9
|
+
Statement:
|
|
10
|
+
<% statements.forEach((stmt) => { -%>
|
|
11
|
+
- Effect: Allow
|
|
12
|
+
Action:
|
|
13
|
+
<% stmt.action.forEach((a) => { -%>
|
|
14
|
+
- <%- a %>
|
|
15
|
+
<% }) -%>
|
|
16
|
+
Resource:
|
|
17
|
+
<% stmt.resource.forEach((r) => { -%>
|
|
18
|
+
- "<%- r %>"
|
|
19
|
+
<% }) -%>
|
|
20
|
+
<% }) -%>
|
|
21
|
+
Roles:
|
|
22
|
+
- !Ref <%- roleName %>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import { writeRenderedTemplate } from '../../../core/renderTemplateFile.js';
|
|
3
|
+
|
|
4
|
+
async function renderYamlTemplate(templatePath, outputPath, templateData, logLabel) {
|
|
5
|
+
try {
|
|
6
|
+
await writeRenderedTemplate(templatePath, outputPath, templateData);
|
|
7
|
+
console.log(` [${logLabel}] Wrote ${path.basename(outputPath)} to ${outputPath}`);
|
|
8
|
+
} catch (error) {
|
|
9
|
+
console.error(` [${logLabel}] Error rendering ${path.basename(templatePath)}:`, error);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { renderYamlTemplate };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<%- functionName %>:
|
|
2
|
+
handler: <%- handlerPath %>
|
|
3
|
+
name: ${self:custom.iz_resourcePrefix}<%- functionName %>
|
|
4
|
+
role: <%- roleName %>Role
|
|
5
|
+
#<#<%- functionName %>FunctionSetting#>
|
|
6
|
+
#<#/<%- functionName %>FunctionSetting#>
|
|
7
|
+
events:
|
|
8
|
+
- sqs:
|
|
9
|
+
arn: arn:aws:sqs:${self:custom.iz_region}:${self:custom.iz_accountId}:${self:custom.iz_resourcePrefix}<%- functionName %>
|
|
10
|
+
batchSize: 10
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<%- functionNameConfig %>:
|
|
2
|
+
handler: <%- handlerPath %>
|
|
3
|
+
name: ${self:custom.iz_resourcePrefix}<%- functionNameConfig %>
|
|
4
|
+
role: <%- roleName %>
|
|
5
|
+
#<#<%- functionNameConfig %>FunctionSetting#>
|
|
6
|
+
#<#/<%- functionNameConfig %>FunctionSetting#>
|
|
7
|
+
events:
|
|
8
|
+
<% for (const route of apiRoutes) { -%>
|
|
9
|
+
- httpApi:
|
|
10
|
+
path: <%- route.path %>
|
|
11
|
+
method: post
|
|
12
|
+
#<#<%- route.upperName %>AppLevelAuthorizer#>
|
|
13
|
+
# authorizer: authorizerServiceSchema
|
|
14
|
+
#<#/<%- route.upperName %>AppLevelAuthorizer#>
|
|
15
|
+
- httpApi:
|
|
16
|
+
path: <%- route.path %>/{targetUserId}
|
|
17
|
+
method: post
|
|
18
|
+
#<#<%- route.upperName %>UserLevelAuthorizer#>
|
|
19
|
+
# authorizer: authorizerIdentifiers
|
|
20
|
+
#<#/<%- route.upperName %>UserLevelAuthorizer#>
|
|
21
|
+
<% } -%>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
${self:custom.iz_resourcePrefix}<%= functionNameConfig %>:
|
|
2
|
+
handler: <%= handlerPath %>
|
|
3
|
+
role: <%= roleName %>
|
|
4
|
+
description: <%= flowTag %> (EventBridge Schedule)
|
|
5
|
+
<% if (locals.schedules && schedules.length > 0) { -%>
|
|
6
|
+
events:
|
|
7
|
+
<% schedules.forEach(function(sched) { -%>
|
|
8
|
+
- schedule:
|
|
9
|
+
name: ${self:custom.iz_resourcePrefix}<%= sched.name %>
|
|
10
|
+
description: '<%= sched.description %>'
|
|
11
|
+
rate: <%= sched.rate[0] %>
|
|
12
|
+
enabled: true
|
|
13
|
+
<% }); -%>
|
|
14
|
+
<% } -%>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<%- functionNameConfig %>:
|
|
2
|
+
handler: <%- handlerPath %>
|
|
3
|
+
name: ${self:custom.iz_resourcePrefix}<%- functionNameConfig %>
|
|
4
|
+
role: <%- roleName %>
|
|
5
|
+
#<#<%- functionNameConfig %>FunctionSetting#>
|
|
6
|
+
#<#/<%- functionNameConfig %>FunctionSetting#>
|
|
7
|
+
events:
|
|
8
|
+
- sqs:
|
|
9
|
+
arn: arn:aws:sqs:${self:custom.iz_region}:${self:custom.iz_accountId}:${self:custom.iz_resourcePrefix}<%- queueName %>
|
|
10
|
+
batchSize: 10
|
|
11
|
+
<%- filterPatterns %>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<%- functionNameConfig %>:
|
|
2
|
+
handler: <%- handlerPath %>
|
|
3
|
+
name: ${self:custom.iz_resourcePrefix}<%- functionNameConfig %>
|
|
4
|
+
role: <%- roleName %>
|
|
5
|
+
#<#<%- functionNameConfig %>FunctionSetting#>
|
|
6
|
+
#<#/<%- functionNameConfig %>FunctionSetting#>
|
|
7
|
+
events:
|
|
8
|
+
- websocket:
|
|
9
|
+
route: <%- routeName %>
|
|
10
|
+
# authorizer: ${self:custom.iz_authorizerAppLevel}
|
|
11
|
+
# identifierResource: 'route.request.header.Auth'
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
ProcessLogicalSqs:
|
|
2
|
+
handler: src/generatedCode/ProcessLogical/source/ProcessLogical_HdrSqs.main
|
|
3
|
+
name: ${self:custom.iz_resourcePrefix}ProcessLogicalHdrSqs
|
|
4
|
+
role: ProcFindDataRole
|
|
5
|
+
#<#ProcessLogicalhdrSqsFunctionSetting#>
|
|
6
|
+
#<#/ProcessLogicalhdrSqsFunctionSetting#>
|
|
7
|
+
events:
|
|
8
|
+
- sqs:
|
|
9
|
+
arn: arn:aws:sqs:${self:custom.iz_region}:${self:custom.iz_accountId}:${self:custom.iz_resourcePrefix}ProcessLogicalHdrSqs
|
|
10
|
+
batchSize: 10
|
|
11
|
+
|
|
12
|
+
PaginateProLogicalDsq:
|
|
13
|
+
handler: src/generatedCode/ProcessLogical/source/PaginateProcessLogical_HdrDsq.main
|
|
14
|
+
name: ${self:custom.iz_resourcePrefix}PaginateProcessLogicalHdrDsq
|
|
15
|
+
role: ProcFindDataRole
|
|
16
|
+
#<#PaginateProcessLogicalhdrDsqFunctionSetting#>
|
|
17
|
+
#<#/PaginateProcessLogicalhdrDsqFunctionSetting#>
|
|
18
|
+
events:
|
|
19
|
+
- sqs:
|
|
20
|
+
arn: arn:aws:sqs:${self:custom.iz_region}:${self:custom.iz_accountId}:${self:custom.iz_resourcePrefix}PaginateProcessLogicalHdrDsq
|
|
21
|
+
batchSize: 10
|
|
22
|
+
|
|
23
|
+
PaginateProLogicalSqs:
|
|
24
|
+
handler: src/generatedCode/ProcessLogical/source/PaginateProcessLogical_HdrSqs.main
|
|
25
|
+
name: ${self:custom.iz_resourcePrefix}PaginateProcessLogicalHdrSqs
|
|
26
|
+
role: ProcFindDataRole
|
|
27
|
+
#<#PaginateProcessLogicalHdrSqsFunctionSetting#>
|
|
28
|
+
#<#/PaginateProcessLogicalHdrSqsFunctionSetting#>
|
|
29
|
+
events:
|
|
30
|
+
- sqs:
|
|
31
|
+
arn: arn:aws:sqs:${self:custom.iz_region}:${self:custom.iz_accountId}:${self:custom.iz_resourcePrefix}PaginateProcessLogicalHdrSqs
|
|
32
|
+
batchSize: 10
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
Resources:
|
|
2
|
+
<% roles.forEach(({ roleName, statements }) => { %>
|
|
3
|
+
<%- roleName %>:
|
|
4
|
+
Type: AWS::IAM::Role
|
|
5
|
+
Properties:
|
|
6
|
+
RoleName: ${self:custom.iz_resourcePrefix}<%- roleName %>
|
|
7
|
+
AssumeRolePolicyDocument:
|
|
8
|
+
Version: "2012-10-17"
|
|
9
|
+
Statement:
|
|
10
|
+
- Effect: Allow
|
|
11
|
+
Principal:
|
|
12
|
+
Service: "lambda.amazonaws.com"
|
|
13
|
+
Action: sts:AssumeRole
|
|
14
|
+
#<#<%- roleName %>AssumeRoleStatementHookCode#>
|
|
15
|
+
#<#/<%- roleName %>AssumeRoleStatementHookCode#>
|
|
16
|
+
ManagedPolicyArns:
|
|
17
|
+
- arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole
|
|
18
|
+
#<#<%- roleName %>ManagedPolicyArns#>
|
|
19
|
+
#<#/<%- roleName %>ManagedPolicyArns#>
|
|
20
|
+
Policies:
|
|
21
|
+
- PolicyName: ${self:custom.iz_resourcePrefix}<%- roleName %>Policy
|
|
22
|
+
PolicyDocument:
|
|
23
|
+
Version: "2012-10-17"
|
|
24
|
+
Statement:
|
|
25
|
+
<% statements.forEach((stmt) => { %>
|
|
26
|
+
- Effect: Allow
|
|
27
|
+
Action:
|
|
28
|
+
<% stmt.action.forEach((a) => { %>
|
|
29
|
+
- <%- a %>
|
|
30
|
+
<% }) %>
|
|
31
|
+
Resource:
|
|
32
|
+
<% stmt.resource.forEach((r) => { %>
|
|
33
|
+
- "<%- r %>"
|
|
34
|
+
<% }) %>
|
|
35
|
+
<% }) %>
|
|
36
|
+
#<#<%- roleName %>StatementHookCode#>
|
|
37
|
+
#<#/<%- roleName %>StatementHookCode#>
|
|
38
|
+
|
|
39
|
+
<% }) %>
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import fs from 'fs/promises';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import ejs from 'ejs';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
import { writeRenderedTemplate } from '../../../../../core/renderTemplateFile.js';
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = path.dirname(__filename);
|
|
9
|
+
|
|
10
|
+
const STORAGE_TYPES = {
|
|
11
|
+
dynamoDB: 'dynamoDB',
|
|
12
|
+
graph: 'graph'
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export async function generateFindData(allSchemas, generatorOptions) {
|
|
16
|
+
console.log(' [FindDataGenerator] Generating FindData logic...');
|
|
17
|
+
|
|
18
|
+
const outputPath = path.join(
|
|
19
|
+
generatorOptions.outputPath,
|
|
20
|
+
'app',
|
|
21
|
+
'src',
|
|
22
|
+
'generatedCode',
|
|
23
|
+
'FindData',
|
|
24
|
+
'source'
|
|
25
|
+
);
|
|
26
|
+
await fs.mkdir(outputPath, { recursive: true });
|
|
27
|
+
|
|
28
|
+
const datas = [];
|
|
29
|
+
|
|
30
|
+
// Parse allSchemas.objects to extract fields for FindData
|
|
31
|
+
if (allSchemas && allSchemas.objects) {
|
|
32
|
+
allSchemas.objects.forEach(obj => {
|
|
33
|
+
const objectType = obj.objectType;
|
|
34
|
+
let fieldNameDatas = [];
|
|
35
|
+
|
|
36
|
+
// Identify identifiers for checking 'getInIdentifiers'
|
|
37
|
+
const identifierFields = [];
|
|
38
|
+
if (obj.identifiers) {
|
|
39
|
+
obj.identifiers.forEach(id => {
|
|
40
|
+
if (id.fieldName) identifierFields.push(id.fieldName);
|
|
41
|
+
if (id.fieldNames) identifierFields.push(...id.fieldNames);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (obj.fieldNames) {
|
|
46
|
+
Object.entries(obj.fieldNames).forEach(([field, schemas]) => {
|
|
47
|
+
if (schemas.type === 'string' || schemas.type === 'number') {
|
|
48
|
+
let collectStorageDetail = {};
|
|
49
|
+
let storageResourceTags = schemas.storageResourceTags || [];
|
|
50
|
+
|
|
51
|
+
storageResourceTags.forEach(tag => {
|
|
52
|
+
if (obj.storageResources && obj.storageResources[tag]) {
|
|
53
|
+
let storageDetail = obj.storageResources[tag];
|
|
54
|
+
|
|
55
|
+
if (storageDetail.storageType === STORAGE_TYPES.graph) {
|
|
56
|
+
if (!collectStorageDetail[STORAGE_TYPES.graph]) {
|
|
57
|
+
collectStorageDetail[STORAGE_TYPES.graph] = {
|
|
58
|
+
graphServerTag: storageDetail.graphServerTag,
|
|
59
|
+
getInIdentifiers: identifierFields.includes(field)
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
} else if (
|
|
63
|
+
storageDetail.storageType === STORAGE_TYPES.dynamoDB
|
|
64
|
+
) {
|
|
65
|
+
if (!collectStorageDetail[STORAGE_TYPES.dynamoDB]) {
|
|
66
|
+
collectStorageDetail[STORAGE_TYPES.dynamoDB] = {
|
|
67
|
+
tableName: storageDetail.tableName
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
// Priority: DynamoDB over Graph
|
|
75
|
+
if (
|
|
76
|
+
collectStorageDetail[STORAGE_TYPES.graph] &&
|
|
77
|
+
collectStorageDetail[STORAGE_TYPES.dynamoDB]
|
|
78
|
+
) {
|
|
79
|
+
delete collectStorageDetail[STORAGE_TYPES.graph];
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (Object.keys(collectStorageDetail).length > 0) {
|
|
83
|
+
fieldNameDatas.push({ [field]: collectStorageDetail });
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Parse addOnDataStructure for versionedData
|
|
90
|
+
if (obj.addOnDataStructure) {
|
|
91
|
+
obj.addOnDataStructure.forEach(versionedData => {
|
|
92
|
+
if (
|
|
93
|
+
versionedData.type === 'versionedData' &&
|
|
94
|
+
versionedData.fieldNames
|
|
95
|
+
) {
|
|
96
|
+
let versionedStorageDetail = {};
|
|
97
|
+
let storageTag = versionedData.storageResourceTag;
|
|
98
|
+
|
|
99
|
+
if (obj.storageResources && obj.storageResources[storageTag]) {
|
|
100
|
+
let storageDetail = obj.storageResources[storageTag];
|
|
101
|
+
if (storageDetail.storageType === STORAGE_TYPES.graph) {
|
|
102
|
+
versionedStorageDetail = {
|
|
103
|
+
[STORAGE_TYPES.graph]: {
|
|
104
|
+
graphServerTag: storageDetail.graphServerTag,
|
|
105
|
+
versionedDataLabel: versionedData.versionedDataLabel
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
Object.entries(versionedData.fieldNames).forEach(
|
|
112
|
+
([key, schema]) => {
|
|
113
|
+
if (schema.type === 'string' || schema.type === 'number') {
|
|
114
|
+
if (Object.keys(versionedStorageDetail).length > 0) {
|
|
115
|
+
fieldNameDatas.push({ [key]: versionedStorageDetail });
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (fieldNameDatas.length > 0) {
|
|
125
|
+
datas.push({
|
|
126
|
+
objectType: objectType,
|
|
127
|
+
fieldNames: fieldNameDatas
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// Pre-build the if-else-if blocks as a string, then pass to template
|
|
134
|
+
const getByDynamoTemplate = await fs.readFile(
|
|
135
|
+
path.join(__dirname, 'templates', 'GetByStorage', 'getByDynamo.ejs'),
|
|
136
|
+
'utf8'
|
|
137
|
+
);
|
|
138
|
+
const getByGraphTemplate = await fs.readFile(
|
|
139
|
+
path.join(__dirname, 'templates', 'GetByStorage', 'getByGraph.ejs'),
|
|
140
|
+
'utf8'
|
|
141
|
+
);
|
|
142
|
+
const templateViews = [path.join(__dirname, 'templates')];
|
|
143
|
+
|
|
144
|
+
// Helper: prefix every line of a block with `spaces`
|
|
145
|
+
const indent = (str, spaces) => {
|
|
146
|
+
const pad = ' '.repeat(spaces);
|
|
147
|
+
return str
|
|
148
|
+
.split('\n')
|
|
149
|
+
.map(line => (line.trim() === '' ? '' : pad + line))
|
|
150
|
+
.join('\n');
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
let objectTypeBlocks = '';
|
|
154
|
+
if (datas.length === 0) {
|
|
155
|
+
objectTypeBlocks = [
|
|
156
|
+
' //(<additionalObjectType>)',
|
|
157
|
+
' //(</additionalObjectType>)',
|
|
158
|
+
" errorsFound.push('unrecognized objectType');",
|
|
159
|
+
' standardErrorParams.push(errorsFound);',
|
|
160
|
+
' await findDataSharedLib.completeFindDataMain(...standardErrorParams);',
|
|
161
|
+
" return { returnResponse: 'Function FindData Error' };"
|
|
162
|
+
].join('\n');
|
|
163
|
+
} else {
|
|
164
|
+
const objBlocks = datas.map((data, idx) => {
|
|
165
|
+
const objectType = data.objectType;
|
|
166
|
+
const fieldNames = data.fieldNames;
|
|
167
|
+
const keyword = idx === 0 ? 'if' : '} else if';
|
|
168
|
+
|
|
169
|
+
let fieldBlocks = '';
|
|
170
|
+
if (fieldNames && fieldNames.length > 0) {
|
|
171
|
+
const fBlocks = fieldNames.map((fieldEntry, fIdx) => {
|
|
172
|
+
const fieldObj = Object.keys(fieldEntry)[0];
|
|
173
|
+
const storageDetails = Object.values(fieldEntry)[0];
|
|
174
|
+
const fKeyword = fIdx === 0 ? 'if' : '} else if';
|
|
175
|
+
|
|
176
|
+
let storageCode = '';
|
|
177
|
+
for (const [storage, details] of Object.entries(storageDetails)) {
|
|
178
|
+
const versionedDataLabel =
|
|
179
|
+
storage === STORAGE_TYPES.graph && details.versionedDataLabel
|
|
180
|
+
? [details.versionedDataLabel]
|
|
181
|
+
: [];
|
|
182
|
+
if (storage === STORAGE_TYPES.dynamoDB) {
|
|
183
|
+
const raw = ejs.render(
|
|
184
|
+
getByDynamoTemplate,
|
|
185
|
+
{
|
|
186
|
+
tableName: details.tableName,
|
|
187
|
+
fieldName: { fieldName: fieldObj },
|
|
188
|
+
objectType
|
|
189
|
+
},
|
|
190
|
+
{ views: templateViews }
|
|
191
|
+
);
|
|
192
|
+
storageCode += indent(raw.trimStart(), 8);
|
|
193
|
+
}
|
|
194
|
+
if (storage === STORAGE_TYPES.graph) {
|
|
195
|
+
const raw = ejs.render(
|
|
196
|
+
getByGraphTemplate,
|
|
197
|
+
{
|
|
198
|
+
graphServerTag: details.graphServerTag,
|
|
199
|
+
versionedDataLabel,
|
|
200
|
+
fieldName: { fieldName: fieldObj },
|
|
201
|
+
objectType,
|
|
202
|
+
getInIdentifiers: details.getInIdentifiers
|
|
203
|
+
},
|
|
204
|
+
{ views: templateViews }
|
|
205
|
+
);
|
|
206
|
+
storageCode += indent(raw.trimStart(), 8);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
return ` ${fKeyword} (fieldName.fieldName == ${JSON.stringify(fieldObj)}) {\n _izContext.logger.debug('fieldName: ', fieldName.fieldName);\n${storageCode}`;
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
fieldBlocks = fBlocks.join('\n');
|
|
214
|
+
fieldBlocks += `\n }\n //(<additional${objectType}FieldNames>)\n //(</additional${objectType}FieldNames>)\n else {\n errorsFound.push('unrecognized fieldName');\n standardErrorParams.push(errorsFound);\n await findDataSharedLib.completeFindDataMain(...standardErrorParams);\n return;\n }`;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
return ` ${keyword} (objType.objectType === ${JSON.stringify(objectType)}) {\n _izContext.logger.debug('objectType: ', objType.objectType);\n\n${fieldBlocks}`;
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
objectTypeBlocks = objBlocks.join('\n');
|
|
221
|
+
objectTypeBlocks += `\n }\n //(<additionalObjectType>)\n //(</additionalObjectType>)\n else {\n errorsFound.push('unrecognized objectType');\n standardErrorParams.push(errorsFound);\n await findDataSharedLib.completeFindDataMain(...standardErrorParams);\n return { returnResponse: 'Function FindData Error' };\n }`;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
await writeRenderedTemplate(
|
|
225
|
+
path.join(__dirname, 'templates', 'FindData_Main.ejs'),
|
|
226
|
+
path.join(outputPath, 'FindData_Main.js'),
|
|
227
|
+
{ objectTypeBlocks }
|
|
228
|
+
);
|
|
229
|
+
await writeRenderedTemplate(
|
|
230
|
+
path.join(__dirname, 'templates', 'FindData_HdrSqs.ejs'),
|
|
231
|
+
path.join(outputPath, 'FindData_HdrSqs.js'),
|
|
232
|
+
{}
|
|
233
|
+
);
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
console.log(' [FindDataGenerator] Finished generating FindData logic.');
|
|
238
|
+
}
|