@izara_project/izara-core-generate-service-code 1.0.52 → 1.0.53
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 +9 -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/FunctionYamlGenerator.js +230 -0
- package/src/codeGenerators/app/sls_yaml/ProcessLogicalYamlGenerator.js +35 -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/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 +35 -0
- package/src/codeGenerators/app/src/generatedCode/FindData/FindDataGenerator.js +272 -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/FindData_Yaml.ejs +10 -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/{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 +73 -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/codeGenerators/app/src/generatedCode/Flow/FlowRbac/templates/rbac/ListRolePermissions.ejs +120 -0
- 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 +127 -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/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/flowSchemaMainFunction/main.js → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/flowSchemaMainFunction/data.js} +1 -3
- package/src/{generators/fromFlowSchema/events/s3 → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy}/index.js +21 -22
- package/src/{generators/fromFlowSchema/events/s3/upload/confirmReserved/functionYaml/yaml.js → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/confirmReserved/functionYaml/data.js} +9 -20
- package/src/codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/confirmReserved/functionYaml/template.ejs +17 -0
- package/src/{generators/fromFlowSchema/events/s3/upload/confirmReserved/handler/handler.js → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/confirmReserved/handler/data.js} +1 -3
- package/src/{generators/fromFlowSchema/events/s3 → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy}/upload/confirmReserved/handler/template.ejs +5 -5
- package/src/codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/confirmReserved/mainFunction/template.ejs +129 -0
- package/src/{generators/fromFlowSchema/events/s3 → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy}/upload/confirmReserved/queue/template.ejs +5 -2
- package/src/{generators/fromFlowSchema/events/s3/upload/createObject/functionYaml/yaml.js → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/createObject/functionYaml/data.js} +8 -24
- package/src/{generators/fromFlowSchema/events/s3 → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy}/upload/createObject/functionYaml/template.ejs +7 -3
- package/src/{generators/fromFlowSchema/events/s3/upload/createObject/handler/handler.js → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/createObject/handler/data.js} +1 -3
- package/src/{generators/fromFlowSchema/events/s3 → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy}/upload/createObject/handler/template.ejs +2 -2
- package/src/{generators/fromFlowSchema/events/s3/upload/createObject/mainFunction/main.js → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/createObject/mainFunction/data.js} +1 -2
- package/src/codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/createObject/mainFunction/template.ejs +131 -0
- package/src/{generators/fromFlowSchema/events/s3/upload/createObjectComplete/functionYaml/yaml.js → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/createObjectComplete/functionYaml/data.js} +9 -26
- package/src/{generators/fromFlowSchema/events/s3 → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy}/upload/createObjectComplete/functionYaml/template.ejs +8 -4
- package/src/{generators/fromFlowSchema/events/s3/upload/createObjectComplete/handler/handler.js → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/createObjectComplete/handler/data.js} +1 -3
- package/src/{generators/fromFlowSchema/events/s3/upload/createObjectComplete/mainFunction/main.js → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/createObjectComplete/mainFunction/data.js} +1 -2
- package/src/{generators/fromFlowSchema/events/s3 → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy}/upload/createObjectComplete/sns-sqs/template.ejs +5 -2
- package/src/{generators/fromFlowSchema/events/s3/upload/preSignUrl/createPreSignUrl/functionYaml/yaml.js → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/preSignUrl/createPreSignUrl/functionYaml/data.js} +10 -28
- package/src/codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/preSignUrl/createPreSignUrl/functionYaml/template.ejs +18 -0
- package/src/{generators/fromFlowSchema/events/s3/upload/preSignUrl/createPreSignUrl/handler/handler.js → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/preSignUrl/createPreSignUrl/handler/data.js} +2 -4
- package/src/{generators/fromFlowSchema/events/s3 → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy}/upload/preSignUrl/createPreSignUrl/handler/template.ejs +5 -5
- package/src/{generators/fromFlowSchema/events/s3/upload/preSignUrl/createPreSignUrl/mainFunction/main.js → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/preSignUrl/createPreSignUrl/mainFunction/data.js} +2 -3
- package/src/codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/preSignUrl/createPreSignUrl/mainFunction/template.ejs +262 -0
- package/src/{generators/fromFlowSchema/events/s3/upload/preSignUrl/createPreSignUrl/queue/queue.js → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/preSignUrl/createPreSignUrl/queue/data.js} +1 -1
- package/src/{generators/fromFlowSchema/events/s3 → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy}/upload/preSignUrl/createPreSignUrl/queue/template.ejs +5 -2
- package/src/{generators/fromFlowSchema/events/s3/upload/preSignUrl/reservedLimit/functionYaml/yaml.js → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/preSignUrl/reservedLimit/functionYaml/data.js} +10 -28
- package/src/codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/preSignUrl/reservedLimit/functionYaml/template.ejs +14 -0
- package/src/{generators/fromFlowSchema/events/s3/upload/preSignUrl/reservedLimit/handler/handler.js → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/preSignUrl/reservedLimit/handler/data.js} +1 -3
- package/src/{generators/fromFlowSchema/events/s3 → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy}/upload/preSignUrl/reservedLimit/handler/template.ejs +5 -5
- package/src/codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/preSignUrl/reservedLimit/mainFunction/template.ejs +173 -0
- package/src/{generators/fromFlowSchema/events/s3 → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy}/upload/preSignUrl/reservedLimit/sqs/template.ejs +6 -3
- package/src/{generators/fromFlowSchema/events/s3/upload/processFile/functionYml/HdrS3/yaml.js → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/processFile/functionYml/HdrS3/data.js} +8 -24
- package/src/{generators/fromFlowSchema/events/s3 → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy}/upload/processFile/functionYml/HdrS3/template.ejs +7 -3
- package/src/{generators/fromFlowSchema/events/s3 → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy}/upload/processFile/handler/handlerS3/template.ejs +3 -3
- package/src/codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/processFile/mainFunction/template.ejs +66 -0
- package/src/{generators/fromFlowSchema/events/s3 → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy}/upload/processFile/queue/s3Template.ejs +5 -2
- package/src/{generators/fromFlowSchema/events/s3/upload/relate/sns-out/snsOut.js → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/relate/sns-out/data.js} +1 -1
- 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/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/SystemFlowDescriptorBuilder.js +151 -0
- package/src/{generators/fromObjectSchema/endpoint/main/beforeLogical/template.ejs → codeGenerators/app/src/generatedCode/Flow/_internal/_shared/endpoint/FlowEndpointBeforeLogical_Main.ejs} +11 -16
- package/src/{generators/fromFlowSchema/events/ownTopic/flowSchema/handler/template.ejs → codeGenerators/app/src/generatedCode/Flow/_internal/_shared/endpoint/FlowEndpoint_HdrWbs.ejs} +6 -6
- package/src/{generators/fromFlowSchema/flowSchemaMainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/_internal/_shared/endpoint/FlowEndpoint_Main.ejs} +31 -25
- package/src/codeGenerators/app/src/generatedCode/Flow/_internal/_shared/endpoint/FlowEntryPoint_Main.ejs +38 -0
- package/src/{generators/fromFlowSchema/events/ownTopic/flowSchema/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/_internal/_shared/endpoint/FlowMain_Wbs.ejs} +20 -20
- package/src/codeGenerators/app/src/generatedCode/Flow/_internal/_shared/handlers/FlowHandler_HdrApi.ejs +51 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_internal/_shared/handlers/FlowHandler_HdrInv.ejs +45 -0
- package/src/{generators/fromPlugIn/firstFlowStep/handler/templateSqs.ejs → codeGenerators/app/src/generatedCode/Flow/_internal/_shared/handlers/FlowHandler_HdrSqs.ejs} +30 -9
- package/src/{generators/fromObjectSchema/endpointComplete/create/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/_internal/_shared/step/FlowEndpointComplete_Main.ejs} +26 -24
- package/src/{generators/fromFlowSchema/flowStep/noPlugInHook/templateMain.ejs → codeGenerators/app/src/generatedCode/Flow/_internal/_shared/step/FlowStep_Main.ejs} +13 -12
- package/src/{generators/fromFlowSchema/statusTypes/triggerCache/checkTriggerCacheComplete/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/_internal/_shared/triggerCache/CheckTriggerCache_Main.ejs} +0 -2
- package/src/{generators/fromObjectSchema/relationship/create/action/sns-in-sqs/sqsTemplate.ejs → codeGenerators/app/src/generatedCode/Flow/_internal/_shared/triggerCache/TriggerCacheQueue_Yaml.ejs} +6 -10
- package/src/{generators/fromFlowSchema/statusTypes/triggerCache/triggerCacheComplete/functionYaml/sqs/template.ejs → codeGenerators/app/src/generatedCode/Flow/_internal/_shared/yaml/SharedFunctionSqs_Yaml.ejs} +1 -5
- package/src/codeGenerators/app/src/generatedCode/Flow/_internal/events/BaseSqsHandler.js +67 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_internal/events/eventBridge.js +25 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_internal/events/extTopic.js +6 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_internal/events/lambdaSyncApi.js +52 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_internal/events/lambdaSyncInv.js +52 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_internal/events/ownTopic.js +42 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_internal/events/registry.js +15 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_internal/events/s3.js +56 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_internal/events/s3Components/ConfirmAfterUploadS3Generator.js +48 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_internal/events/s3Components/CreateObjectGenerator.js +52 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_internal/events/s3Components/CreatePreSignUrlGenerator.js +50 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_internal/events/s3Components/ProcessAfterUploadS3Generator.js +49 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_internal/events/s3Components/ReservedLimitGenerator.js +49 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_internal/shared/eventTypes.js +23 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_internal/shared/flowClassifier.js +49 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_internal/shared/flowEntryPointBase.js +102 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_internal/shared/flowMainFunctionBase.js +160 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_internal/shared/flowNaming.js +21 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_internal/shared/flowSelection.js +20 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_internal/shared/flowStepBase.js +229 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_internal/shared/flowStepNormalizer.js +28 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_internal/shared/flowValidator.js +144 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_internal/shared/registry.js +7 -0
- package/src/codeGenerators/app/src/generatedCode/Flow/_internal/shared/triggerCacheBase.js +183 -0
- package/src/codeGenerators/app/src/generatedCode/ProcessLogical/ProcessLogicalGenerator.js +26 -0
- package/src/{generators/fromObjectSchema/processLogicalPagination/handler/dsq/template.ejs → codeGenerators/app/src/generatedCode/ProcessLogical/templates/PaginateProcessLogical_HdrDsq.js} +1 -1
- package/src/{generators/fromObjectSchema/processLogicalPagination/handler/sqs/template.ejs → codeGenerators/app/src/generatedCode/ProcessLogical/templates/PaginateProcessLogical_HdrSqs.js} +1 -1
- package/src/{generators/fromObjectSchema/processLogicalPagination/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/ProcessLogical/templates/PaginateProcessLogical_Main.js} +10 -10
- package/src/{generators/fromObjectSchema/processLogical/handler/template.ejs → codeGenerators/app/src/generatedCode/ProcessLogical/templates/ProcessLogical_HdrSqs.js} +1 -1
- package/src/{generators/fromObjectSchema/processLogical/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/ProcessLogical/templates/ProcessLogical_Main.js} +16 -16
- package/src/codeGenerators/app/src/generatedCode/SystemFlowSchemas/RegisterGenerator.js +166 -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 +20 -0
- package/src/codeGenerators/app/src/generatedCode/libs/GenerateCodeLibsGenerator.js +20 -0
- package/src/codeGenerators/app/src/generatedCode/libs/templates/Consts.js +448 -0
- package/src/{generators/fromFlowSchema/shared/template.ejs → codeGenerators/app/src/generatedCode/libs/templates/GenerateCodeLibs.js} +38 -29
- package/src/codeGenerators/resource/sls_yaml/DynamoDBGenerator.js +96 -0
- package/src/codeGenerators/resource/sls_yaml/FlowOutGenerator.js +64 -0
- package/src/codeGenerators/resource/sls_yaml/FlowResourceYamlGenerator.js +172 -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/validate.js +161 -0
- package/src/generate.js +130 -0
- package/src/generateCode.js +212 -49
- package/src/generateIntTest.js +166 -0
- package/src/generateResourceIntTest.js +102 -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/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/upload/confirmReserved/functionYaml/template.ejs +0 -13
- package/src/generators/fromFlowSchema/events/s3/upload/preSignUrl/createPreSignUrl/functionYaml/template.ejs +0 -14
- package/src/generators/fromFlowSchema/events/s3/upload/preSignUrl/reservedLimit/functionYaml/template.ejs +0 -10
- 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/events/s3 → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy}/flowSchemaMainFunction/template.ejs +0 -0
- /package/src/{generators/fromFlowSchema/events/s3 → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy}/flowSchemaMainFunction/templateByStatusType/statusFieldTemplate.ejs +0 -0
- /package/src/{generators/fromFlowSchema/events/s3 → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy}/flowSchemaMainFunction/templateByStatusType/storedCacheTemplate.ejs +0 -0
- /package/src/{generators/fromFlowSchema/events/s3 → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy}/flowSchemaMainFunction/templateByStatusType/triggerCacheTemplate.ejs +0 -0
- /package/src/{generators/fromFlowSchema/events/s3/upload/confirmReserved/mainFunction/main.js → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/confirmReserved/mainFunction/data.js} +0 -0
- /package/src/{generators/fromFlowSchema/events/s3/upload/confirmReserved/queue/queue.js → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/confirmReserved/queue/data.js} +0 -0
- /package/src/{generators/fromFlowSchema/events/s3 → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy}/upload/createObjectComplete/handler/template.ejs +0 -0
- /package/src/{generators/fromFlowSchema/events/s3 → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy}/upload/createObjectComplete/mainFunction/template.ejs +0 -0
- /package/src/{generators/fromFlowSchema/events/s3/upload/createObjectComplete/sns-sqs/snsSqs.js → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/createObjectComplete/sns-sqs/data.js} +0 -0
- /package/src/{generators/fromFlowSchema/events/s3/upload/preSignUrl/reservedLimit/mainFunction/main.js → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/preSignUrl/reservedLimit/mainFunction/data.js} +0 -0
- /package/src/{generators/fromFlowSchema/events/s3/upload/preSignUrl/reservedLimit/sqs/sqs.js → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/preSignUrl/reservedLimit/sqs/data.js} +0 -0
- /package/src/{generators/fromFlowSchema/events/s3/upload/processFile/handler/handlerS3/handlerS3.js → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/processFile/handler/handlerS3/data.js} +0 -0
- /package/src/{generators/fromFlowSchema/events/s3 → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy}/upload/processFile/mainFunction/ProcessCsvtemplate.ejs +0 -0
- /package/src/{generators/fromFlowSchema/events/s3/upload/processFile/mainFunction/main.js → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/processFile/mainFunction/data.js} +0 -0
- /package/src/{generators/fromFlowSchema/events/s3/upload/processFile/queue/queue.js → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/processFile/queue/data.js} +0 -0
- /package/src/{generators/fromFlowSchema/events/s3 → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy}/upload/processFile/queue/dsqTemplatePath.ejs +0 -0
- /package/src/{generators/fromFlowSchema/events/s3/upload/relate/S3/s3.js → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy/upload/relate/S3/data.js} +0 -0
- /package/src/{generators/fromFlowSchema/events/s3 → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy}/upload/relate/S3/template.ejs +0 -0
- /package/src/{generators/fromFlowSchema/events/s3 → codeGenerators/app/src/generatedCode/Flow/FlowSchemas/templates/s3Legacy}/websocket/dynamoDb/ReservedTableData.js +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/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/fromPlugIn/byConfig/mainFunction/templateAwaitingStep.ejs → codeGenerators/app/src/generatedCode/Flow/_internal/_shared/step/plugIns/FlowStep_ByConfig_Awaiting_Main.ejs} +0 -0
- /package/src/{generators/fromPlugIn/byConfig/mainFunction/templatePaginated.ejs → codeGenerators/app/src/generatedCode/Flow/_internal/_shared/step/plugIns/FlowStep_ByConfig_Paginated_Main.ejs} +0 -0
- /package/src/{generators/fromPlugIn/firstFlowStep/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/_internal/_shared/step/plugIns/FlowStep_PlugIn_Main.ejs} +0 -0
- /package/src/{generators/fromPlugIn/afterFirstFlowStep/recievePlugIn/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/_internal/_shared/step/plugIns/FlowStep_RecievePlugIn_Main.ejs} +0 -0
- /package/src/{generators/fromPlugIn/firstFlowStep/mainFunction/templateByConfig/awaitingSteps.ejs → codeGenerators/app/src/generatedCode/Flow/_internal/_shared/step/plugIns/templateAwaitingStep.ejs} +0 -0
- /package/src/{generators/fromPlugIn/firstFlowStep/mainFunction/templateByConfig → codeGenerators/app/src/generatedCode/Flow/_internal/_shared/step/plugIns}/templateSendPlugin.ejs +0 -0
- /package/src/{generators/fromFlowSchema/statusTypes/triggerCache/checkTriggerCacheComplete/handler/template.ejs → codeGenerators/app/src/generatedCode/Flow/_internal/_shared/triggerCache/CheckTriggerCache_HdrSqs.ejs} +0 -0
- /package/src/{generators/fromFlowSchema/statusTypes/triggerCache/processTriggerCache/handler/template.ejs → codeGenerators/app/src/generatedCode/Flow/_internal/_shared/triggerCache/ProcessTriggerCache_HdrSqs.ejs} +0 -0
- /package/src/{generators/fromFlowSchema/statusTypes/triggerCache/processTriggerCache/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/_internal/_shared/triggerCache/ProcessTriggerCache_Main.ejs} +0 -0
- /package/src/{generators/fromFlowSchema/statusTypes/triggerCache/triggerCacheComplete/handler/dsq/template.ejs → codeGenerators/app/src/generatedCode/Flow/_internal/_shared/triggerCache/TriggerCacheComplete_HdrDsq.ejs} +0 -0
- /package/src/{generators/fromFlowSchema/statusTypes/triggerCache/triggerCacheComplete/handler/sqs/template.ejs → codeGenerators/app/src/generatedCode/Flow/_internal/_shared/triggerCache/TriggerCacheComplete_HdrSqs.ejs} +0 -0
- /package/src/{generators/fromFlowSchema/statusTypes/triggerCache/triggerCacheComplete/mainFunction/template.ejs → codeGenerators/app/src/generatedCode/Flow/_internal/_shared/triggerCache/TriggerCacheComplete_Main.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,64 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import fs from 'fs/promises';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
4
|
+
import ejs from 'ejs';
|
|
5
|
+
import { getFlowsForGeneration } from '../../app/src/generatedCode/Flow/_internal/shared/flowSelection.js';
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = path.dirname(__filename);
|
|
9
|
+
|
|
10
|
+
async function appendToFile(filePath, content) {
|
|
11
|
+
try {
|
|
12
|
+
await fs.mkdir(path.dirname(filePath), { recursive: true });
|
|
13
|
+
await fs.appendFile(filePath, content + '\n', 'utf-8');
|
|
14
|
+
} catch (error) {
|
|
15
|
+
console.error(`[Error] Failed to append to file: ${filePath}`, error);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export async function generateFlowOut(allSchemas, options) {
|
|
20
|
+
console.log(' [FlowOutGenerator] Generating Flow Out nodes (SNS Topics)...');
|
|
21
|
+
|
|
22
|
+
const resourceYamlDir = path.join(options.outputPath, 'resource', 'sls_yaml', 'generatedCode', 'source');
|
|
23
|
+
await fs.mkdir(resourceYamlDir, { recursive: true });
|
|
24
|
+
|
|
25
|
+
const yamlTplPath = path.join(__dirname, 'templates', 'FlowOut_Yaml.ejs');
|
|
26
|
+
const yamlTpl = await fs.readFile(yamlTplPath, 'utf-8');
|
|
27
|
+
|
|
28
|
+
let generatedCount = 0;
|
|
29
|
+
const yamlOutputPath = path.join(resourceYamlDir, 'generated-sns-out.yml');
|
|
30
|
+
|
|
31
|
+
const flows = getFlowsForGeneration(allSchemas);
|
|
32
|
+
for (const flow of flows) {
|
|
33
|
+
if (flow.outputTopic === true) {
|
|
34
|
+
const upperCase = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
|
35
|
+
const topicName = upperCase(flow.flowTag);
|
|
36
|
+
|
|
37
|
+
const yamlContent = ejs.render(yamlTpl, {
|
|
38
|
+
topicName: topicName
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
await appendToFile(yamlOutputPath, yamlContent);
|
|
42
|
+
generatedCount++;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const systemTopics = [
|
|
47
|
+
'CreateObjectComplete',
|
|
48
|
+
'DeleteNodeComplete',
|
|
49
|
+
'UpdateNodeComplete',
|
|
50
|
+
'GetNodeComplete',
|
|
51
|
+
'ProcessLogicalComplete',
|
|
52
|
+
'FindDataComplete'
|
|
53
|
+
];
|
|
54
|
+
|
|
55
|
+
for (const topic of systemTopics) {
|
|
56
|
+
const yamlContent = ejs.render(yamlTpl, {
|
|
57
|
+
topicName: topic
|
|
58
|
+
});
|
|
59
|
+
await appendToFile(yamlOutputPath, yamlContent);
|
|
60
|
+
generatedCount++;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
console.log(` [FlowOutGenerator] Generated ${generatedCount} SNS Topics for Flow Out nodes.`);
|
|
64
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import fs from 'fs/promises';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
4
|
+
import ejs from 'ejs';
|
|
5
|
+
import { getFlowsForGeneration } from '../../app/src/generatedCode/Flow/_internal/shared/flowSelection.js';
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = path.dirname(__filename);
|
|
9
|
+
|
|
10
|
+
async function appendToFile(filePath, content) {
|
|
11
|
+
try {
|
|
12
|
+
await fs.mkdir(path.dirname(filePath), { recursive: true });
|
|
13
|
+
await fs.appendFile(filePath, content + '\n', 'utf-8');
|
|
14
|
+
} catch (error) {
|
|
15
|
+
console.error(`[Error] Failed to append to file: ${filePath}`, error);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export async function generateFlowResourceYaml(allSchemas, options) {
|
|
20
|
+
console.log(' [FlowResourceYamlGenerator] Generating SQS/SNS YAML resources for flows...');
|
|
21
|
+
|
|
22
|
+
const resourceYamlDir = path.join(options.outputPath, 'resource', 'sls_yaml', 'generatedCode', 'source');
|
|
23
|
+
await fs.mkdir(resourceYamlDir, { recursive: true });
|
|
24
|
+
|
|
25
|
+
const resourceYamlTplPath = path.join(__dirname, 'templates', 'crud', 'ResourceYaml.ejs');
|
|
26
|
+
const resourceBeforeLogicalYamlTplPath = path.join(__dirname, 'templates', 'crud', 'ResourceBeforeLogicalYaml.ejs');
|
|
27
|
+
|
|
28
|
+
const resourceYamlTpl = await fs.readFile(resourceYamlTplPath, 'utf-8');
|
|
29
|
+
const resourceBeforeLogicalYamlTpl = await fs.readFile(resourceBeforeLogicalYamlTplPath, 'utf-8');
|
|
30
|
+
|
|
31
|
+
let generatedCount = 0;
|
|
32
|
+
const yamlOutputPath = path.join(resourceYamlDir, 'generated-sns-in-sqs.yml');
|
|
33
|
+
|
|
34
|
+
const flows = getFlowsForGeneration(allSchemas);
|
|
35
|
+
for (const flow of flows) {
|
|
36
|
+
const flowTag = flow.flowTag;
|
|
37
|
+
|
|
38
|
+
// Generate In-Queue resources for any flow that listens on its own topic
|
|
39
|
+
if (flow.event && flow.event.includes('ownTopic')) {
|
|
40
|
+
// Render main ResourceYaml.ejs (e.g., InCreate, CreateHdrSqs)
|
|
41
|
+
const yamlContent = ejs.render(resourceYamlTpl, {
|
|
42
|
+
queueName: flowTag
|
|
43
|
+
});
|
|
44
|
+
await appendToFile(yamlOutputPath, yamlContent);
|
|
45
|
+
generatedCount++;
|
|
46
|
+
|
|
47
|
+
// Check if there are beforeLogical configs for this flow
|
|
48
|
+
const generateCodeConfigs = flows
|
|
49
|
+
.filter(f => f.generatedCodeConfig && f.generatedCodeConfig.generatedCodeTag.toLowerCase() === flowTag.toLowerCase())
|
|
50
|
+
.map(f => ({
|
|
51
|
+
...f.generatedCodeConfig,
|
|
52
|
+
flowTag: f.flowTag
|
|
53
|
+
}));
|
|
54
|
+
|
|
55
|
+
const beforeLogicalConfigs = generateCodeConfigs.filter(c => c.codeHookTag === 'beforeLogical');
|
|
56
|
+
|
|
57
|
+
if (beforeLogicalConfigs.length > 0) {
|
|
58
|
+
// Collect unique flowTags (like ValidateUnitTrackedProperty) from the beforeLogical configs
|
|
59
|
+
const uniqueFlowTags = [...new Set(beforeLogicalConfigs.map(c => c.flowTag))];
|
|
60
|
+
|
|
61
|
+
const beforeLogicalYamlContent = ejs.render(resourceBeforeLogicalYamlTpl, {
|
|
62
|
+
queueName: `${flowTag}BeforeLogical`,
|
|
63
|
+
flowTags: uniqueFlowTags
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
await appendToFile(yamlOutputPath, beforeLogicalYamlContent);
|
|
67
|
+
generatedCount++;
|
|
68
|
+
}
|
|
69
|
+
} else if (flow.event && flow.event.includes('extTopic')) {
|
|
70
|
+
// Custom flows using extTopic do not have ownTopic, but need an entry queue
|
|
71
|
+
const resourceSqsYamlTplPath = path.join(__dirname, 'templates', 'crud', 'ResourceSqsYaml.ejs');
|
|
72
|
+
const resourceSqsYamlTpl = await fs.readFile(resourceSqsYamlTplPath, 'utf-8');
|
|
73
|
+
const yamlContent = ejs.render(resourceSqsYamlTpl, {
|
|
74
|
+
queueName: `Process${flowTag}Sqs`
|
|
75
|
+
});
|
|
76
|
+
await appendToFile(yamlOutputPath, yamlContent);
|
|
77
|
+
generatedCount++;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Generate Complete queues for custom FlowSchema
|
|
81
|
+
// Also generate queues for any flowStep that uses sqs, dsq, or extTopic
|
|
82
|
+
if (flow.flowSteps && Array.isArray(flow.flowSteps)) {
|
|
83
|
+
for (const stepConfig of flow.flowSteps) {
|
|
84
|
+
const stepName = stepConfig.stepName;
|
|
85
|
+
if (stepName === 'InTag') continue;
|
|
86
|
+
|
|
87
|
+
const events = stepConfig.event || ['sqs'];
|
|
88
|
+
for (const ev of events) {
|
|
89
|
+
let queueName = flowTag + stepName;
|
|
90
|
+
if (stepName === 'Complete') {
|
|
91
|
+
queueName = flowTag + 'Complete';
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (ev === 'sqs' || ev === 'ownTopic') {
|
|
95
|
+
// sqs and ownTopic create SNS Topic + Subscription + SQS Queue
|
|
96
|
+
const yamlContent = ejs.render(resourceYamlTpl, {
|
|
97
|
+
queueName: queueName
|
|
98
|
+
});
|
|
99
|
+
await appendToFile(yamlOutputPath, yamlContent);
|
|
100
|
+
generatedCount++;
|
|
101
|
+
} else if (ev === 'dsq' || ev === 'extTopic') {
|
|
102
|
+
// extTopic and dsq create ONLY SQS Queue
|
|
103
|
+
const resourceSqsYamlTplPath = path.join(__dirname, 'templates', 'crud', 'ResourceSqsYaml.ejs');
|
|
104
|
+
const resourceSqsYamlTpl = await fs.readFile(resourceSqsYamlTplPath, 'utf-8');
|
|
105
|
+
const yamlContent = ejs.render(resourceSqsYamlTpl, {
|
|
106
|
+
queueName: queueName
|
|
107
|
+
});
|
|
108
|
+
await appendToFile(yamlOutputPath, yamlContent);
|
|
109
|
+
generatedCount++;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// Generate SQS queues for S3 Event flows
|
|
116
|
+
if (flow.event && flow.event.includes('s3')) {
|
|
117
|
+
const queueNames = [
|
|
118
|
+
`${flowTag}CreatePreSignUrlSqs`,
|
|
119
|
+
`${flowTag}ReservedLimitSqs`
|
|
120
|
+
];
|
|
121
|
+
|
|
122
|
+
for (const qName of queueNames) {
|
|
123
|
+
const resourceSqsYamlTplPath = path.join(__dirname, 'templates', 'crud', 'ResourceSqsYaml.ejs');
|
|
124
|
+
const resourceSqsYamlTpl = await fs.readFile(resourceSqsYamlTplPath, 'utf-8');
|
|
125
|
+
const yamlContent = ejs.render(resourceSqsYamlTpl, {
|
|
126
|
+
queueName: qName
|
|
127
|
+
});
|
|
128
|
+
await appendToFile(yamlOutputPath, yamlContent);
|
|
129
|
+
generatedCount++;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// Generate Dsq queues for Relationship
|
|
134
|
+
if (flow.isDynamicRelationshipType) {
|
|
135
|
+
// Usually Relationship has dead-letter queue processing
|
|
136
|
+
const resourceSqsYamlTplPath = path.join(__dirname, 'templates', 'crud', 'ResourceSqsYaml.ejs');
|
|
137
|
+
const resourceSqsYamlTpl = await fs.readFile(resourceSqsYamlTplPath, 'utf-8');
|
|
138
|
+
const queueName = flowTag + 'Dsq';
|
|
139
|
+
const yamlContent = ejs.render(resourceSqsYamlTpl, {
|
|
140
|
+
queueName: queueName
|
|
141
|
+
});
|
|
142
|
+
await appendToFile(yamlOutputPath, yamlContent);
|
|
143
|
+
generatedCount++;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Add System Queues
|
|
148
|
+
const systemQueues = [
|
|
149
|
+
'ProcessLogical',
|
|
150
|
+
'PaginateProcessLogical',
|
|
151
|
+
'FindData',
|
|
152
|
+
'Register',
|
|
153
|
+
'WebSocket',
|
|
154
|
+
'CreateObjectComplete',
|
|
155
|
+
'UpdateNodeComplete',
|
|
156
|
+
'DeleteNodeComplete',
|
|
157
|
+
'GetNodeComplete'
|
|
158
|
+
];
|
|
159
|
+
|
|
160
|
+
const resourceSqsYamlTplPath = path.join(__dirname, 'templates', 'crud', 'ResourceSqsYaml.ejs');
|
|
161
|
+
const resourceSqsYamlTpl = await fs.readFile(resourceSqsYamlTplPath, 'utf-8');
|
|
162
|
+
|
|
163
|
+
for (const sysQueue of systemQueues) {
|
|
164
|
+
const yamlContent = ejs.render(resourceSqsYamlTpl, {
|
|
165
|
+
queueName: sysQueue
|
|
166
|
+
});
|
|
167
|
+
await appendToFile(yamlOutputPath, yamlContent);
|
|
168
|
+
generatedCount++;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
console.log(` [FlowResourceYamlGenerator] Appended ${generatedCount} sections to generated-sns-in-sqs.yml.`);
|
|
172
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
##===== [DynamoDB Table: <%- tableName %>]
|
|
2
|
+
<%- tableName %>Table:
|
|
3
|
+
Type: AWS::DynamoDB::Table
|
|
4
|
+
Properties:
|
|
5
|
+
TableName: ${self:custom.iz_serviceTag}_${self:custom.iz_stage}_<%- tableName %>
|
|
6
|
+
BillingMode: PAY_PER_REQUEST
|
|
7
|
+
AttributeDefinitions:
|
|
8
|
+
- AttributeName: "<%- pk %>"
|
|
9
|
+
AttributeType: "S"
|
|
10
|
+
<% if (sk) { %>
|
|
11
|
+
- AttributeName: "<%- sk %>"
|
|
12
|
+
AttributeType: "S"
|
|
13
|
+
<% } %>
|
|
14
|
+
KeySchema:
|
|
15
|
+
- AttributeName: "<%- pk %>"
|
|
16
|
+
KeyType: "HASH"
|
|
17
|
+
<% if (sk) { %>
|
|
18
|
+
- AttributeName: "<%- sk %>"
|
|
19
|
+
KeyType: "RANGE"
|
|
20
|
+
<% } %>
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
Out<%-
|
|
1
|
+
##===== [Topic Out]
|
|
2
|
+
Out<%- topicName %>:
|
|
3
3
|
Type: AWS::SNS::Topic
|
|
4
4
|
Properties:
|
|
5
5
|
DisplayName: "SNS Message out"
|
|
6
|
-
TopicName: ${self:custom.iz_serviceTag}_${self:custom.iz_stage}_<%-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
TopicName: ${self:custom.iz_serviceTag}_${self:custom.iz_stage}_<%- topicName %>_Out
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
Resources:
|
|
2
|
+
WebSocketTaskTable:
|
|
3
|
+
Type: "AWS::DynamoDB::Table"
|
|
4
|
+
Properties:
|
|
5
|
+
TableName: ${self:custom.iz_resourcePrefix}WebSocketTask
|
|
6
|
+
BillingMode: PAY_PER_REQUEST
|
|
7
|
+
AttributeDefinitions:
|
|
8
|
+
- AttributeName: taskKey
|
|
9
|
+
AttributeType: S
|
|
10
|
+
- AttributeName: connectionId
|
|
11
|
+
AttributeType: S
|
|
12
|
+
KeySchema:
|
|
13
|
+
- AttributeName: taskKey
|
|
14
|
+
KeyType: HASH
|
|
15
|
+
- AttributeName: connectionId
|
|
16
|
+
KeyType: RANGE
|
|
17
|
+
TimeToLiveSpecification:
|
|
18
|
+
AttributeName: expirationTime
|
|
19
|
+
Enabled: true
|
|
20
|
+
|
|
21
|
+
UserUploadRecordsTable:
|
|
22
|
+
Type: "AWS::DynamoDB::Table"
|
|
23
|
+
Properties:
|
|
24
|
+
TableName: ${self:custom.iz_resourcePrefix}UserUploadRecords
|
|
25
|
+
BillingMode: PAY_PER_REQUEST
|
|
26
|
+
AttributeDefinitions:
|
|
27
|
+
- AttributeName: connectionId
|
|
28
|
+
AttributeType: S
|
|
29
|
+
KeySchema:
|
|
30
|
+
- AttributeName: connectionId
|
|
31
|
+
KeyType: HASH
|
|
32
|
+
TimeToLiveSpecification:
|
|
33
|
+
AttributeName: expirationTime
|
|
34
|
+
Enabled: true
|
|
35
|
+
|
|
36
|
+
RegisterRecordsTable:
|
|
37
|
+
Type: "AWS::DynamoDB::Table"
|
|
38
|
+
Properties:
|
|
39
|
+
TableName: ${self:custom.iz_resourcePrefix}RegisterRecords
|
|
40
|
+
BillingMode: PAY_PER_REQUEST
|
|
41
|
+
AttributeDefinitions:
|
|
42
|
+
- AttributeName: identifiersTask
|
|
43
|
+
AttributeType: S
|
|
44
|
+
- AttributeName: connectionId
|
|
45
|
+
AttributeType: S
|
|
46
|
+
KeySchema:
|
|
47
|
+
- AttributeName: identifiersTask
|
|
48
|
+
KeyType: HASH
|
|
49
|
+
- AttributeName: connectionId
|
|
50
|
+
KeyType: RANGE
|
|
51
|
+
|
|
52
|
+
AwaitingMultipleStepsTable:
|
|
53
|
+
Type: "AWS::DynamoDB::Table"
|
|
54
|
+
Properties:
|
|
55
|
+
TableName: ${self:custom.iz_resourcePrefix}AwaitingMultipleSteps
|
|
56
|
+
BillingMode: PAY_PER_REQUEST
|
|
57
|
+
AttributeDefinitions:
|
|
58
|
+
- AttributeName: awaitingStepId
|
|
59
|
+
AttributeType: S
|
|
60
|
+
- AttributeName: pendingStepId
|
|
61
|
+
AttributeType: S
|
|
62
|
+
KeySchema:
|
|
63
|
+
- AttributeName: awaitingStepId
|
|
64
|
+
KeyType: HASH
|
|
65
|
+
- AttributeName: pendingStepId
|
|
66
|
+
KeyType: RANGE
|
|
67
|
+
|
|
68
|
+
AwaitingMultipleStepByPendingTable:
|
|
69
|
+
Type: "AWS::DynamoDB::Table"
|
|
70
|
+
Properties:
|
|
71
|
+
TableName: ${self:custom.iz_resourcePrefix}AwaitingMultipleStepByPending
|
|
72
|
+
BillingMode: PAY_PER_REQUEST
|
|
73
|
+
AttributeDefinitions:
|
|
74
|
+
- AttributeName: pendingStepId
|
|
75
|
+
AttributeType: S
|
|
76
|
+
- AttributeName: awaitingStepId
|
|
77
|
+
AttributeType: S
|
|
78
|
+
KeySchema:
|
|
79
|
+
- AttributeName: pendingStepId
|
|
80
|
+
KeyType: HASH
|
|
81
|
+
- AttributeName: awaitingStepId
|
|
82
|
+
KeyType: RANGE
|
|
83
|
+
|
|
84
|
+
FindDataMainTable:
|
|
85
|
+
Type: "AWS::DynamoDB::Table"
|
|
86
|
+
Properties:
|
|
87
|
+
TableName: ${self:custom.iz_resourcePrefix}FindDataMain
|
|
88
|
+
BillingMode: PAY_PER_REQUEST
|
|
89
|
+
AttributeDefinitions:
|
|
90
|
+
- AttributeName: findDataId
|
|
91
|
+
AttributeType: S
|
|
92
|
+
KeySchema:
|
|
93
|
+
- AttributeName: findDataId
|
|
94
|
+
KeyType: HASH
|
|
95
|
+
|
|
96
|
+
LogicalResultsMainTable:
|
|
97
|
+
Type: "AWS::DynamoDB::Table"
|
|
98
|
+
Properties:
|
|
99
|
+
TableName: ${self:custom.iz_resourcePrefix}LogicalResultsMain
|
|
100
|
+
BillingMode: PAY_PER_REQUEST
|
|
101
|
+
AttributeDefinitions:
|
|
102
|
+
- AttributeName: logicalResultId
|
|
103
|
+
AttributeType: S
|
|
104
|
+
KeySchema:
|
|
105
|
+
- AttributeName: logicalResultId
|
|
106
|
+
KeyType: HASH
|
|
107
|
+
|
|
108
|
+
LogicalResultsDataTable:
|
|
109
|
+
Type: "AWS::DynamoDB::Table"
|
|
110
|
+
Properties:
|
|
111
|
+
TableName: ${self:custom.iz_resourcePrefix}LogicalResultsData
|
|
112
|
+
BillingMode: PAY_PER_REQUEST
|
|
113
|
+
AttributeDefinitions:
|
|
114
|
+
- AttributeName: logicalResultId
|
|
115
|
+
AttributeType: S
|
|
116
|
+
- AttributeName: identifiersId
|
|
117
|
+
AttributeType: S
|
|
118
|
+
KeySchema:
|
|
119
|
+
- AttributeName: logicalResultId
|
|
120
|
+
KeyType: HASH
|
|
121
|
+
- AttributeName: identifiersId
|
|
122
|
+
KeyType: RANGE
|
|
123
|
+
|
|
124
|
+
AwaitingStepTable:
|
|
125
|
+
Type: "AWS::DynamoDB::Table"
|
|
126
|
+
Properties:
|
|
127
|
+
TableName: ${self:custom.iz_resourcePrefix}AwaitingStep
|
|
128
|
+
BillingMode: PAY_PER_REQUEST
|
|
129
|
+
AttributeDefinitions:
|
|
130
|
+
- AttributeName: awaitingStepId
|
|
131
|
+
AttributeType: S
|
|
132
|
+
- AttributeName: pendingStepId
|
|
133
|
+
AttributeType: S
|
|
134
|
+
KeySchema:
|
|
135
|
+
- AttributeName: awaitingStepId
|
|
136
|
+
KeyType: HASH
|
|
137
|
+
- AttributeName: pendingStepId
|
|
138
|
+
KeyType: RANGE
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
##===== [Queue]
|
|
1
|
+
##===== [Queue]
|
|
2
2
|
<%- queueName %>:
|
|
3
3
|
Type: "AWS::SQS::Queue"
|
|
4
4
|
Properties:
|
|
5
5
|
QueueName: ${self:custom.iz_resourcePrefix}<%- queueName %>
|
|
6
6
|
RedrivePolicy:
|
|
7
7
|
deadLetterTargetArn:
|
|
8
|
-
# !GetAtt
|
|
9
8
|
Fn::GetAtt:
|
|
10
9
|
- <%- queueName %>DLQ
|
|
11
10
|
- Arn
|
|
12
11
|
maxReceiveCount: 3
|
|
13
12
|
VisibilityTimeout: 120
|
|
14
|
-
|
|
13
|
+
|
|
14
|
+
##===== [Queue DLQ]
|
|
15
15
|
<%- queueName %>DLQ:
|
|
16
16
|
Type: AWS::SQS::Queue
|
|
17
17
|
Properties:
|
|
18
18
|
QueueName: ${self:custom.iz_resourcePrefix}<%- queueName %>DLQ
|
|
19
|
-
|
|
19
|
+
|
|
20
|
+
##===== [Queue Policy]
|
|
20
21
|
<%- queueName %>Policy:
|
|
21
22
|
Type: AWS::SQS::QueuePolicy
|
|
22
23
|
Properties:
|
|
@@ -27,17 +28,12 @@
|
|
|
27
28
|
Effect: Allow
|
|
28
29
|
Principal: "*"
|
|
29
30
|
Resource:
|
|
30
|
-
# !GetAtt
|
|
31
31
|
Fn::GetAtt:
|
|
32
32
|
- <%- queueName %>
|
|
33
33
|
- Arn
|
|
34
34
|
Action: "SQS:SendMessage"
|
|
35
35
|
Queues:
|
|
36
36
|
- Ref: <%- queueName %>
|
|
37
|
+
|
|
37
38
|
#<#<%- queueName %>QueueSetting#>
|
|
38
39
|
#<#/<%- queueName %>QueueSetting#>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<%_ function firstLetterLowerCase(str) {
|
|
42
|
-
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
43
|
-
} _%>
|
|
@@ -10,30 +10,30 @@
|
|
|
10
10
|
Type: AWS::SNS::Subscription
|
|
11
11
|
Properties:
|
|
12
12
|
TopicArn: !Ref In<%- queueName %>
|
|
13
|
-
Endpoint: "arn:aws:sqs:${self:custom.iz_region}:${self:custom.iz_accountId}:${self:custom.iz_resourcePrefix}<%- queueName %>
|
|
13
|
+
Endpoint: "arn:aws:sqs:${self:custom.iz_region}:${self:custom.iz_accountId}:${self:custom.iz_resourcePrefix}<%- queueName %>Sqs"
|
|
14
14
|
Protocol: "sqs"
|
|
15
15
|
|
|
16
16
|
##===== [Queue]
|
|
17
|
-
<%- queueName %>
|
|
17
|
+
<%- queueName %>Sqs:
|
|
18
18
|
Type: "AWS::SQS::Queue"
|
|
19
19
|
Properties:
|
|
20
|
-
QueueName: ${self:custom.iz_resourcePrefix}<%- queueName %>
|
|
20
|
+
QueueName: ${self:custom.iz_resourcePrefix}<%- queueName %>Sqs
|
|
21
21
|
RedrivePolicy:
|
|
22
22
|
deadLetterTargetArn:
|
|
23
23
|
Fn::GetAtt:
|
|
24
|
-
- <%- queueName %>
|
|
24
|
+
- <%- queueName %>SqsDLQ
|
|
25
25
|
- Arn
|
|
26
26
|
maxReceiveCount: 3
|
|
27
27
|
VisibilityTimeout: 120
|
|
28
28
|
|
|
29
29
|
##===== [Queue DLQ]
|
|
30
|
-
<%- queueName %>
|
|
30
|
+
<%- queueName %>SqsDLQ:
|
|
31
31
|
Type: AWS::SQS::Queue
|
|
32
32
|
Properties:
|
|
33
|
-
QueueName: ${self:custom.iz_resourcePrefix}<%- queueName %>
|
|
33
|
+
QueueName: ${self:custom.iz_resourcePrefix}<%- queueName %>SqsDLQ
|
|
34
34
|
|
|
35
35
|
##===== [Queue Policy]
|
|
36
|
-
<%- queueName %>
|
|
36
|
+
<%- queueName %>SqsPolicy:
|
|
37
37
|
Type: AWS::SQS::QueuePolicy
|
|
38
38
|
Properties:
|
|
39
39
|
PolicyDocument:
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
Principal: "*"
|
|
45
45
|
Resource:
|
|
46
46
|
Fn::GetAtt:
|
|
47
|
-
- <%- queueName %>
|
|
47
|
+
- <%- queueName %>Sqs
|
|
48
48
|
- Arn
|
|
49
49
|
Action: "SQS:SendMessage"
|
|
50
50
|
Queues:
|
|
51
|
-
- Ref: <%- queueName %>
|
|
51
|
+
- Ref: <%- queueName %>Sqs
|
|
52
52
|
|
|
53
53
|
#<#<%- queueName %>QueueSetting#>
|
|
54
54
|
#<#/<%- queueName %>QueueSetting#>
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { getObjectSchema, utils } from '@izara_project/izara-core-library-service-schemas';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import fs from 'fs/promises';
|
|
4
|
+
import yaml from 'yaml';
|
|
5
|
+
|
|
6
|
+
export async function validateSchemas(rootPath) {
|
|
7
|
+
const schemasPath = path.join(rootPath, 'app', 'src', 'schemas');
|
|
8
|
+
const serviceConfigPath = path.join(rootPath, 'config', 'serverless.config.yml');
|
|
9
|
+
const _izContext = { reqId: 'validate-sandbox', logger: console };
|
|
10
|
+
|
|
11
|
+
console.log(' [Validator] Validating local schemas with Safe Two-Way S3 Validation...');
|
|
12
|
+
|
|
13
|
+
let validateStatus = {
|
|
14
|
+
status: true,
|
|
15
|
+
validateErrors: [],
|
|
16
|
+
referenceErrors: [],
|
|
17
|
+
warning: []
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// 1. Read config for bucket name and service tag
|
|
21
|
+
let configStr = '';
|
|
22
|
+
let iz_serviceTag = '';
|
|
23
|
+
let iz_serviceSchemaBucketName = '';
|
|
24
|
+
try {
|
|
25
|
+
configStr = await fs.readFile(serviceConfigPath, 'utf8');
|
|
26
|
+
const config = yaml.parse(configStr);
|
|
27
|
+
iz_serviceTag = config?.main_config?.iz_serviceTag;
|
|
28
|
+
iz_serviceSchemaBucketName = config?.main_config?.iz_serviceSchemaBucketName || 'unknown-bucket';
|
|
29
|
+
|
|
30
|
+
if (!iz_serviceTag) {
|
|
31
|
+
validateStatus.validateErrors.push('Missing iz_serviceTag in serverless.config.yml. This is a critical configuration field.');
|
|
32
|
+
} else if (!/^[a-zA-Z0-9]+$/.test(iz_serviceTag)) {
|
|
33
|
+
validateStatus.validateErrors.push(`iz_serviceTag '${iz_serviceTag}' must contain only alphanumeric characters ([a-zA-Z0-9]).`);
|
|
34
|
+
}
|
|
35
|
+
} catch (e) {
|
|
36
|
+
validateStatus.validateErrors.push(`Could not read or parse serverless.config.yml at ${serviceConfigPath}: ${e.message}`);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// 2. Fetch local FlowSchemas (Basic validation)
|
|
40
|
+
try {
|
|
41
|
+
const flowsResponse = await getObjectSchema.getAllLocalFlowSchemas(_izContext, schemasPath);
|
|
42
|
+
const flows = flowsResponse.records || [];
|
|
43
|
+
for (const flow of flows) {
|
|
44
|
+
if (flow && flow.flowTag && !/^[A-Z]/.test(flow.flowTag)) {
|
|
45
|
+
validateStatus.validateErrors.push(`flowTag '${flow.flowTag}' must start with an uppercase letter.`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
} catch (e) {
|
|
49
|
+
validateStatus.warning.push(`Failed to load local flows: ${e.message}`);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// 3. Fetch local Reference Object Relationships for Two-Way Validation
|
|
53
|
+
console.log(' [Validator] Checking Cross-Service Reference Relationships...');
|
|
54
|
+
try {
|
|
55
|
+
const allReferenceObjectRelationships = await getObjectSchema.getAllLocalRefObjectRelationshipSchema(_izContext, schemasPath);
|
|
56
|
+
|
|
57
|
+
await Promise.all(
|
|
58
|
+
allReferenceObjectRelationships.map(async refRelSchema => {
|
|
59
|
+
if (!refRelSchema) return;
|
|
60
|
+
try {
|
|
61
|
+
// Try to fetch relationship schema from S3
|
|
62
|
+
const relSchemaFromRef = await getObjectSchema.getRelationshipSchema(
|
|
63
|
+
_izContext,
|
|
64
|
+
{
|
|
65
|
+
serviceTag: refRelSchema.relationshipServiceTag,
|
|
66
|
+
relationshipTag: refRelSchema.relationshipTag
|
|
67
|
+
},
|
|
68
|
+
iz_serviceSchemaBucketName
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
if (!relSchemaFromRef) {
|
|
72
|
+
validateStatus.referenceErrors.push(`[Safe] Invalid reference: '${refRelSchema.objectType}' -> '${refRelSchema.relationshipTag}' not found in service '${refRelSchema.relationshipServiceTag}' on S3.`);
|
|
73
|
+
} else {
|
|
74
|
+
// Two-way validation logic via utils
|
|
75
|
+
const linkRecords = utils.findLinkByObjTypeV2(
|
|
76
|
+
_izContext,
|
|
77
|
+
{ objectType: refRelSchema.objectType, serviceTag: iz_serviceTag },
|
|
78
|
+
{ serviceTag: refRelSchema.relationshipServiceTag, relationshipTag: refRelSchema.relationshipTag },
|
|
79
|
+
relSchemaFromRef
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
if (!linkRecords || !linkRecords.length) {
|
|
83
|
+
validateStatus.referenceErrors.push(`[Safe] Two-way validation failed: '${refRelSchema.relationshipTag}' in service '${refRelSchema.relationshipServiceTag}' does not link back to '${refRelSchema.objectType}'.`);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
} catch (s3Error) {
|
|
87
|
+
// ROBUSTNESS: Catch S3 NoSuchKey or any other SDK errors without crashing
|
|
88
|
+
validateStatus.referenceErrors.push(`[Safe] S3 Fetch Error for '${refRelSchema.relationshipServiceTag}': ${s3Error.message || s3Error.Code}`);
|
|
89
|
+
}
|
|
90
|
+
})
|
|
91
|
+
);
|
|
92
|
+
} catch (e) {
|
|
93
|
+
validateStatus.warning.push(`Failed to check cross-service relationships: ${e.message}`);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// 4. Validate FlowSchemas Cache Fields and Custom Events (Developer Explanations)
|
|
97
|
+
try {
|
|
98
|
+
console.log(' [Validator] Checking FlowSchemas for strict compatibility issues (Soft Validation)...');
|
|
99
|
+
const allObjectSchemas = await getObjectSchema.getAllLocalObjectSchemasWithoutHierarchy(_izContext, schemasPath);
|
|
100
|
+
const objectSchemasMap = {};
|
|
101
|
+
if (allObjectSchemas && allObjectSchemas.records) {
|
|
102
|
+
allObjectSchemas.records.forEach(schema => {
|
|
103
|
+
if(schema) objectSchemasMap[schema.objectType] = schema;
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const flowsResponse = await getObjectSchema.getAllLocalFlowSchemas(_izContext, schemasPath);
|
|
108
|
+
const flows = flowsResponse.records || [];
|
|
109
|
+
for (const flow of flows) {
|
|
110
|
+
if (!flow) continue;
|
|
111
|
+
|
|
112
|
+
// Check unsupported Enum (like dsq)
|
|
113
|
+
if (flow.event && Array.isArray(flow.event)) {
|
|
114
|
+
if (flow.event.includes('dsq')) {
|
|
115
|
+
const errMsg = `\n [Developer Error] FlowTag: '${flow.flowTag}' uses Event: 'dsq'\n` +
|
|
116
|
+
` 💡 Detailed Explanation: 'dsq' is a non-standard Event Type not found in the legacy validator enum.\n` +
|
|
117
|
+
` Please change it to a supported event type (e.g., 'sqs') or update the allowed enums to proceed.`;
|
|
118
|
+
validateStatus.validateErrors.push(errMsg);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Check triggerCache expectations
|
|
123
|
+
if (flow.statusType === 'triggerCache' || flow.statusType === 'storedCache' || flow.statusType === 'statusField') {
|
|
124
|
+
if (flow.objType && flow.objType.objectType) {
|
|
125
|
+
const targetObj = objectSchemasMap[flow.objType.objectType];
|
|
126
|
+
if (targetObj) {
|
|
127
|
+
const expectedPrefix = `TST_${flow.flowTag}`; // Example prefix logic
|
|
128
|
+
const isMissingFields = !targetObj.fieldNames || !targetObj.fieldNames[`${expectedPrefix}Status`];
|
|
129
|
+
|
|
130
|
+
if (isMissingFields) {
|
|
131
|
+
const errMsg = `\n [Developer Error] FlowTag: '${flow.flowTag}' has Cache enabled (statusType: '${flow.statusType}')\n` +
|
|
132
|
+
` 💡 Detailed Explanation: The validator requires Object '${targetObj.objectType}' to define specific cache status fields in DynamoDB when caching is enabled.\n` +
|
|
133
|
+
` (e.g., Fields: ${expectedPrefix}Status, ${expectedPrefix}ErrorsFound, ${expectedPrefix}CacheComplete, etc.)\n` +
|
|
134
|
+
` Please add these fields to ${targetObj.objectType}.js before continuing.`;
|
|
135
|
+
validateStatus.validateErrors.push(errMsg);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
} catch (e) {
|
|
142
|
+
console.warn(` [Validator] Failed to run developer explanations: ${e.message}`);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// 5. Summarize Validation
|
|
146
|
+
if (validateStatus.validateErrors.length > 0) {
|
|
147
|
+
console.error(' [Validator] VALIDATION ERRORS:', validateStatus.validateErrors);
|
|
148
|
+
throw new Error(`Validation failed with ${validateStatus.validateErrors.length} critical errors.`);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (validateStatus.referenceErrors.length > 0) {
|
|
152
|
+
console.warn(' [Validator] REFERENCE WARNINGS (S3/Cross-Service):', validateStatus.referenceErrors);
|
|
153
|
+
console.warn(' [Validator] Continuing generation despite reference warnings (Offline-friendly mode).');
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if (validateStatus.warning.length > 0) {
|
|
157
|
+
console.warn(' [Validator] WARNINGS:', validateStatus.warning);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
console.log(' [Validator] All local critical validations passed successfully.');
|
|
161
|
+
}
|