@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
package/src/libs/Utils.js
DELETED
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright (C) 2020 Sven Mason <http://izara.io>
|
|
3
|
-
|
|
4
|
-
This program is free software: you can redistribute it and/or modify
|
|
5
|
-
it under the terms of the GNU Affero General Public License as
|
|
6
|
-
published by the Free Software Foundation, either version 3 of the
|
|
7
|
-
License, or (at your option) any later version.
|
|
8
|
-
|
|
9
|
-
This program is distributed in the hope that it will be useful,
|
|
10
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
-
GNU Affero General Public License for more details.
|
|
13
|
-
|
|
14
|
-
You should have received a copy of the GNU Affero General Public License
|
|
15
|
-
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
import yaml from 'yaml';
|
|
19
|
-
import fs from 'fs';
|
|
20
|
-
import path from 'path';
|
|
21
|
-
|
|
22
|
-
import { objectHash as hash } from '@izara_project/izara-shared-core';
|
|
23
|
-
|
|
24
|
-
import consts from '#libs/Consts.js';
|
|
25
|
-
const { SOURCE_PATH } = consts;
|
|
26
|
-
|
|
27
|
-
function firstLetterUpperCase(text) {
|
|
28
|
-
if (!text) return text;
|
|
29
|
-
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function firstLetterLowerCase(text) {
|
|
33
|
-
if (!text) return text;
|
|
34
|
-
return text.charAt(0).toLowerCase() + text.slice(1);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function checkOverWriteGenerateMainFunction(objectSchema, action) {
|
|
38
|
-
let overWriteStatus;
|
|
39
|
-
if (
|
|
40
|
-
objectSchema.overwriteGenerateMainFunction?.length &&
|
|
41
|
-
objectSchema.overwriteGenerateMainFunction.includes(action)
|
|
42
|
-
) {
|
|
43
|
-
overWriteStatus = true;
|
|
44
|
-
} else {
|
|
45
|
-
overWriteStatus = false;
|
|
46
|
-
}
|
|
47
|
-
return overWriteStatus;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function getLocalConfig(params) {
|
|
51
|
-
const configPath = path.join(
|
|
52
|
-
process.cwd(),
|
|
53
|
-
'../config/serverless.config.yml'
|
|
54
|
-
);
|
|
55
|
-
const serverlessConfig = fs.readFileSync(configPath, 'utf8');
|
|
56
|
-
const config = yaml.parse(serverlessConfig);
|
|
57
|
-
const returnConfig = config.main_config[params];
|
|
58
|
-
|
|
59
|
-
return returnConfig;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function checkValidTableYaml(
|
|
63
|
-
_izContext,
|
|
64
|
-
currentTableSetting,
|
|
65
|
-
existsTableSetting
|
|
66
|
-
) {
|
|
67
|
-
// console.log("checkValidTableYaml", JSON.stringify(currentTableSetting, null, 2), JSON.stringify(existsTableSetting, null, 2))
|
|
68
|
-
/*
|
|
69
|
-
return table yml setting that already filter duplicate tableName that have same table setting
|
|
70
|
-
throw error when found duplicate table name but not have same table setting
|
|
71
|
-
*/
|
|
72
|
-
|
|
73
|
-
let filteredDynamoDbYamlSetting = [];
|
|
74
|
-
|
|
75
|
-
for (let i = 0, length = currentTableSetting.length; i < length; i++) {
|
|
76
|
-
let dynamoDbYamlSetting = currentTableSetting[i];
|
|
77
|
-
// console.log("dynamoDbYamlSetting", dynamoDbYamlSetting)
|
|
78
|
-
if (
|
|
79
|
-
existsTableSetting.hasOwnProperty(
|
|
80
|
-
firstLetterUpperCase(dynamoDbYamlSetting.templateData.tableName)
|
|
81
|
-
)
|
|
82
|
-
) {
|
|
83
|
-
// exists table
|
|
84
|
-
if (
|
|
85
|
-
hash(
|
|
86
|
-
existsTableSetting[
|
|
87
|
-
firstLetterUpperCase(dynamoDbYamlSetting.templateData.tableName)
|
|
88
|
-
]
|
|
89
|
-
) === hash(dynamoDbYamlSetting.templateData.attributes.sort())
|
|
90
|
-
) {
|
|
91
|
-
continue;
|
|
92
|
-
} else {
|
|
93
|
-
throw Error(
|
|
94
|
-
`tableName:${firstLetterUpperCase(dynamoDbYamlSetting.templateData.tableName)} have duplicate setting but not have same setting`
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
} else {
|
|
98
|
-
filteredDynamoDbYamlSetting.push(dynamoDbYamlSetting);
|
|
99
|
-
|
|
100
|
-
// not exists table
|
|
101
|
-
Object.assign(existsTableSetting, {
|
|
102
|
-
[firstLetterUpperCase(dynamoDbYamlSetting.templateData.tableName)]:
|
|
103
|
-
dynamoDbYamlSetting.templateData.attributes.sort()
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
// console.log("filteredDynamoDbYamlSetting: ", JSON.stringify(filteredDynamoDbYamlSetting, null, 2),
|
|
108
|
-
// "existsTableSetting:", JSON.stringify(existsTableSetting, null, 2))
|
|
109
|
-
return [filteredDynamoDbYamlSetting, existsTableSetting];
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
// empty dir
|
|
113
|
-
async function deleteFileInDir(directory) {
|
|
114
|
-
try {
|
|
115
|
-
if (fs.existsSync(directory)) {
|
|
116
|
-
fs.rmSync(directory, { recursive: true });
|
|
117
|
-
}
|
|
118
|
-
} catch (err) {
|
|
119
|
-
console.log(err);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
function deleteFile(filePath) {
|
|
124
|
-
if (fs.existsSync(filePath)) {
|
|
125
|
-
try {
|
|
126
|
-
// If the file exists, delete it
|
|
127
|
-
fs.unlinkSync(filePath);
|
|
128
|
-
console.log('File deleted successfully');
|
|
129
|
-
} catch (err) {
|
|
130
|
-
console.error(`Error deleting file: ${err.message}`);
|
|
131
|
-
}
|
|
132
|
-
} else {
|
|
133
|
-
console.log('File does not exist');
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
const savePath = {
|
|
138
|
-
resourceYamlFlowSchemaFlowTag: function (appPath, flowTag) {
|
|
139
|
-
return path.join(
|
|
140
|
-
appPath,
|
|
141
|
-
SOURCE_PATH.flowSchema,
|
|
142
|
-
firstLetterUpperCase(flowTag),
|
|
143
|
-
'source/'
|
|
144
|
-
);
|
|
145
|
-
},
|
|
146
|
-
flowSchemaFlowTag: function (flowTag) {
|
|
147
|
-
return path.join(
|
|
148
|
-
SOURCE_PATH.resourceLocationFlowSchema,
|
|
149
|
-
firstLetterUpperCase(flowTag),
|
|
150
|
-
'source/'
|
|
151
|
-
);
|
|
152
|
-
}
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
export default {
|
|
156
|
-
firstLetterUpperCase,
|
|
157
|
-
firstLetterLowerCase,
|
|
158
|
-
checkOverWriteGenerateMainFunction,
|
|
159
|
-
getLocalConfig,
|
|
160
|
-
checkValidTableYaml,
|
|
161
|
-
deleteFileInDir,
|
|
162
|
-
deleteFile,
|
|
163
|
-
savePath
|
|
164
|
-
};
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
const FUNCTION_NAME = {
|
|
2
|
-
updateRel: 'updateRelationship',
|
|
3
|
-
createRel: 'createRelationship',
|
|
4
|
-
updateRelComplete: 'updateRelationshipComplete',
|
|
5
|
-
createRelComplete: 'createRelationshipComplete',
|
|
6
|
-
deleteRel: 'deleteRelationship',
|
|
7
|
-
deleteRelComplete: 'deleteRelationshipComplete',
|
|
8
|
-
translateId: 'translateIdsRequest',
|
|
9
|
-
translateIdsProcess: 'processTranslateIds',
|
|
10
|
-
outTranslateIds: 'processTranslateIdsComplete',
|
|
11
|
-
findData: 'findData',
|
|
12
|
-
processLogical: 'processLogical',
|
|
13
|
-
updateNodeComplete: 'updateNodeComplete',
|
|
14
|
-
createObjectComplete: 'createObjectComplete',
|
|
15
|
-
getNodeComplete: 'getNodeComplete',
|
|
16
|
-
paginateProcessLogical: 'paginateProcessLogical',
|
|
17
|
-
deleteNode: 'deleteNode',
|
|
18
|
-
deleteNodeComplete: 'deleteNodeComplete',
|
|
19
|
-
createObjectS3: 'createObjectS3',
|
|
20
|
-
createObjectS3Complete: 'webSocketTaskComplete',
|
|
21
|
-
processAfterUploadS3: 'processAfterUploadS3',
|
|
22
|
-
getRel: 'getRelationship',
|
|
23
|
-
getRelComplete: 'getRelationshipComplete',
|
|
24
|
-
reservedLimit: 'reservedLimit',
|
|
25
|
-
createPresignUrl: 'createPresignUrl',
|
|
26
|
-
flowSchemaOwnTopic: 'flowSchemaOwnTopic',
|
|
27
|
-
flowSchemaOwnTopicComplete: 'flowSchemaOwnTopicComplete',
|
|
28
|
-
flowSchemaOwnTopicEndpoint: 'flowSchemaOwnTopicEndpoint',
|
|
29
|
-
flowSchemaOwnTopicEndpointComplete: 'flowSchemaOwnTopicEndpointComplete',
|
|
30
|
-
flowSchemaExternalTopic: 'externalTopic',
|
|
31
|
-
flowSchemaEventBridge: 'EventBridge',
|
|
32
|
-
createRecordComplete: 'createRecordComplete',
|
|
33
|
-
flowSchemaRegister: 'register',
|
|
34
|
-
changeRel: 'changeRelationship',
|
|
35
|
-
changeRelComplete: 'changeRelationshipComplete',
|
|
36
|
-
moveRel: 'moveRelationship',
|
|
37
|
-
moveRelComplete: 'moveRelationshipComplete'
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const SHORT_FUNCTION_NAME = functionName => {
|
|
41
|
-
return {
|
|
42
|
-
[FUNCTION_NAME.updateRel]: 'updateRel',
|
|
43
|
-
[FUNCTION_NAME.createRel]: 'createRel',
|
|
44
|
-
[FUNCTION_NAME.updateRelComplete]: 'updateRelComp',
|
|
45
|
-
[FUNCTION_NAME.createRelComplete]: 'createRelComp',
|
|
46
|
-
[FUNCTION_NAME.deleteRel]: 'deleteRel',
|
|
47
|
-
[FUNCTION_NAME.deleteRelComplete]: 'deleteRelComp',
|
|
48
|
-
[FUNCTION_NAME.findData]: 'findData',
|
|
49
|
-
[FUNCTION_NAME.processLogical]: 'processLogical',
|
|
50
|
-
[FUNCTION_NAME.updateNodeComplete]: 'updateNodeComp',
|
|
51
|
-
[FUNCTION_NAME.createObjectComplete]: 'createObjectComp',
|
|
52
|
-
[FUNCTION_NAME.getNodeComplete]: 'getNodeComp',
|
|
53
|
-
[FUNCTION_NAME.paginateProcessLogical]: 'paginateProLogical',
|
|
54
|
-
[FUNCTION_NAME.deleteNode]: 'deleteNode',
|
|
55
|
-
[FUNCTION_NAME.deleteNodeComplete]: 'deleteNodeComp',
|
|
56
|
-
[FUNCTION_NAME.createObjectS3Complete]: 'webSocketTaskComp',
|
|
57
|
-
[FUNCTION_NAME.getRel]: 'getRel',
|
|
58
|
-
[FUNCTION_NAME.getRelComplete]: 'getRelComp',
|
|
59
|
-
[FUNCTION_NAME.changeRel]: 'changeRel',
|
|
60
|
-
[FUNCTION_NAME.changeRelComplete]: 'changeRelComp',
|
|
61
|
-
[FUNCTION_NAME.moveRel]: 'moveRel',
|
|
62
|
-
[FUNCTION_NAME.moveRelComplete]: 'moveRelComp'
|
|
63
|
-
}[functionName];
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
const PREFIX = {
|
|
67
|
-
updateRel: 'updateRelationshipEndpoint',
|
|
68
|
-
createRel: 'createRelationshipEndpoint',
|
|
69
|
-
deleteRel: 'deleteRelationshipEndpoint',
|
|
70
|
-
updateNode: 'updateNodeEndpoint',
|
|
71
|
-
createNode: 'createNodeEndpoint',
|
|
72
|
-
getRel: 'getRelationshipEndpoint',
|
|
73
|
-
changeRel: 'changeRelationshipEndpoint',
|
|
74
|
-
ONE: 'one',
|
|
75
|
-
MANY: 'many',
|
|
76
|
-
CREATE_OBJECT_ASYNC: 'createObjectAsync',
|
|
77
|
-
CREATE_OBJECT_ASYNC_COMPLETE: 'createObjectAsyncComplete',
|
|
78
|
-
CREATE_OBJECT_EXTERNAL_TOPIC: 'createObjectExternalTopic'
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
const SOURCE_GENERATE_IAM_ROLE = {
|
|
82
|
-
ProcessFindDataRole: 'ProcFindData',
|
|
83
|
-
ObjectCompleteRole: 'ObjectCom',
|
|
84
|
-
NodeCompleteRole: 'NodeCom',
|
|
85
|
-
RelationshipRole: 'Relationship',
|
|
86
|
-
RelationshipCompleteRole: 'RelationshipCom',
|
|
87
|
-
FlowSchemaUploadS3Role: 'FlowSchemaUploadS3',
|
|
88
|
-
FlowSchemaOwnTopic: 'FlowSchemaOwnTopic',
|
|
89
|
-
PerActionEndpoint: 'PerActionEndpoint',
|
|
90
|
-
ExternalTopicRole: 'ExternalTopic',
|
|
91
|
-
EventBridge: 'EventBridge',
|
|
92
|
-
CreateRecordComplete: 'CreateRecordComplete',
|
|
93
|
-
RegisterRole: 'Register'
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
export { FUNCTION_NAME, SHORT_FUNCTION_NAME, PREFIX, SOURCE_GENERATE_IAM_ROLE };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { consts as coreConsts } from '@izara_project/izara-core-library-service-schemas';
|
|
2
|
-
const { HANDLER, ACTIONS, STORAGE_TYPES } = coreConsts;
|
|
3
|
-
|
|
4
|
-
const DEFAULT_HANDLER_PER_ACTION = {
|
|
5
|
-
[ACTIONS.create]: [HANDLER.hdrApi, HANDLER.hdrSqs, HANDLER.hdrInv],
|
|
6
|
-
[ACTIONS.update]: [HANDLER.hdrApi, HANDLER.hdrSqs, HANDLER.hdrInv],
|
|
7
|
-
[ACTIONS.get]: [HANDLER.hdrApi, HANDLER.hdrInv],
|
|
8
|
-
[ACTIONS.delete]: [HANDLER.hdrApi, HANDLER.hdrSqs]
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
const DEFAULT_LAMBDA_ROLE_PER_ACTION = {
|
|
12
|
-
[ACTIONS.create]: {
|
|
13
|
-
dynamoDbPermission: 'PutItem',
|
|
14
|
-
httpMethod: 'put'
|
|
15
|
-
},
|
|
16
|
-
[ACTIONS.update]: {
|
|
17
|
-
dynamoDbPermission: 'UpdateItem',
|
|
18
|
-
httpMethod: 'post'
|
|
19
|
-
},
|
|
20
|
-
[ACTIONS.get]: {
|
|
21
|
-
dynamoDbPermission: 'GetItem',
|
|
22
|
-
httpMethod: 'post'
|
|
23
|
-
},
|
|
24
|
-
[ACTIONS.delete]: {
|
|
25
|
-
dynamoDbPermission: 'DeleteItem',
|
|
26
|
-
httpMethod: 'delete'
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export { HANDLER, ACTIONS, STORAGE_TYPES, DEFAULT_HANDLER_PER_ACTION, DEFAULT_LAMBDA_ROLE_PER_ACTION };
|
package/src/libs/consts/index.js
DELETED
package/src/libs/consts/paths.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
// relative with ./app/src
|
|
2
|
-
const SOURCE_PATH = {
|
|
3
|
-
appYaml: `/sls_yaml/generatedCode/source/`,
|
|
4
|
-
resourceYaml: `../resource/sls_yaml/generatedCode/source/`,
|
|
5
|
-
externalService: '/initial_setup/generatedCode/source/',
|
|
6
|
-
lambdaPerAction: '/src/generatedCode/ObjectTypePerActionEndpoint/source/',
|
|
7
|
-
outPerActionComplete: '/src/generatedCode/OutPerActionComplete/source/',
|
|
8
|
-
resourceLocationOutPerActionComplete:
|
|
9
|
-
'src/generatedCode/OutPerActionComplete/source/',
|
|
10
|
-
relationshipPerAction: '/src/generatedCode/RelationshipPerAction/source/',
|
|
11
|
-
findData: '/src/generatedCode/FindData/source/',
|
|
12
|
-
translateIdsRequestFile: '/src/generatedCode/TranslateId/source/',
|
|
13
|
-
processLogical: '/src/generatedCode/ProcessLogical/source/',
|
|
14
|
-
resourceLocationPerAction:
|
|
15
|
-
'src/generatedCode/ObjectTypePerActionEndpoint/source/',
|
|
16
|
-
resourceLocationFindData: 'src/generatedCode/FindData/source/',
|
|
17
|
-
resourceLocationRelationshipPerAction:
|
|
18
|
-
'src/generatedCode/RelationshipPerAction/source/',
|
|
19
|
-
resourceLocationTranslateId: 'src/generatedCode/TranslateId/source/',
|
|
20
|
-
resourceLocationProcessLogical: 'src/generatedCode/ProcessLogical/source/',
|
|
21
|
-
// ** FlowSchema
|
|
22
|
-
webSocket: '/src/generatedCode/FlowSchema/UploadS3/',
|
|
23
|
-
resourceLocationWebSocket: 'src/generatedCode/FlowSchema/UploadS3/',
|
|
24
|
-
// * FlowSchema event
|
|
25
|
-
flowSchema: '/src/generatedCode/FlowSchema/',
|
|
26
|
-
resourceLocationFlowSchema: 'src/generatedCode/FlowSchema/',
|
|
27
|
-
// * FlowSchema eventBridge
|
|
28
|
-
flowSchemaEventBridge: '/src/generatedCode/FlowSchema/EventBridge/',
|
|
29
|
-
resourceLocationFlowSchemaEventBridge:
|
|
30
|
-
'src/generatedCode/FlowSchema/EventBridge/',
|
|
31
|
-
// * FlowSchema lambdaSync
|
|
32
|
-
flowSchemaLambdaSync: '/src/generatedCode/FlowSchema/lambdaSync/',
|
|
33
|
-
resourceLocationFlowSchemaLambdaSync:
|
|
34
|
-
'src/generatedCode/FlowSchema/lambdaSync/',
|
|
35
|
-
// * FlowSchema Register
|
|
36
|
-
flowSchemaRegister: '/src/generatedCode/FlowSchema/Register/',
|
|
37
|
-
resourceLocationFlowSchemaRegister: 'src/generatedCode/FlowSchema/Register/',
|
|
38
|
-
//* WebSocket Main
|
|
39
|
-
WebSocketMain: '/src/generatedCode/FlowSchema/WebSocketMain/source/',
|
|
40
|
-
resourceLocationWebSocketMain:
|
|
41
|
-
'src/generatedCode/FlowSchema/WebSocketMain/source/',
|
|
42
|
-
generateCodeLib: '/src/generatedCode/libs/source/',
|
|
43
|
-
generatedCodeHookFunction:
|
|
44
|
-
'/src/generatedCode/WebSocket/source/FlowSchemaHook/HookFunctionGeneratedCode/source/',
|
|
45
|
-
resourceLocationGeneratedCodeHookFunction:
|
|
46
|
-
'src/generatedCode/WebSocket/source/FlowSchemaHook/HookFunctionGeneratedCode/source/',
|
|
47
|
-
endpointPerService: '/src/generatedCode/ActionEndpoint/source/',
|
|
48
|
-
resourceLocationHandlerEndpointPerService:
|
|
49
|
-
'src/generatedCode/ActionEndpoint/source/',
|
|
50
|
-
createRecordComplete: '/src/generatedCode/CreateRecordComplete/',
|
|
51
|
-
resourceLocationCreateRecordComplete:
|
|
52
|
-
'src/generatedCode/CreateRecordComplete/',
|
|
53
|
-
// systemText
|
|
54
|
-
systemTextSchema: 'SystemTextSchemas/generatedCode/',
|
|
55
|
-
// rbac
|
|
56
|
-
rbac: '/src/generatedCode/Rbac/source/',
|
|
57
|
-
resourceLocationRbac: 'src/generatedCode/Rbac/source/'
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
const SAVE_FILE_NAME = {
|
|
61
|
-
dynamoDbYaml: 'generated-dynamoDB-table',
|
|
62
|
-
snsInSqsYaml: 'generated-sns-in-sqs',
|
|
63
|
-
snsOutYaml: 'generated-sns-out',
|
|
64
|
-
functionRelationshipYaml: 'relationship-per-action',
|
|
65
|
-
functionPerActionYaml: 'per-action-function',
|
|
66
|
-
processLogicalYaml: 'process-logical',
|
|
67
|
-
flowSchemaYaml: 'flow-schema',
|
|
68
|
-
roleNameConfigYaml: 'role-name-config',
|
|
69
|
-
sharedResourceYaml: 'generate-shared-resource',
|
|
70
|
-
authorizerYaml: 'authorizer',
|
|
71
|
-
findData: 'find-data',
|
|
72
|
-
rbac: 'rbac',
|
|
73
|
-
externalLambdaRole: 'generatedLambdaRoleServiceConfig',
|
|
74
|
-
snsSubscription: 'generatedSnsServiceConfig',
|
|
75
|
-
tableName: 'generatedTableNameConfig',
|
|
76
|
-
S3Bucket: 'generated-s3-bucket',
|
|
77
|
-
objectRelationship: 'ObjectRelationships',
|
|
78
|
-
refObjectRelationship: 'RefObjectRelationships',
|
|
79
|
-
objectSchema: 'ObjectFieldSchema',
|
|
80
|
-
roleNameConfig: 'RoleNameConfig',
|
|
81
|
-
systemTextSchema: 'SystemTextSchemas'
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
export { SOURCE_PATH, SAVE_FILE_NAME };
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
const RESOURCE_CLASSES = {
|
|
2
|
-
sqs: 'sqs',
|
|
3
|
-
s3: 's3',
|
|
4
|
-
dynamoDbTable: 'dynamodb',
|
|
5
|
-
dynamoDbAcrossService: 'dynamodb',
|
|
6
|
-
sns: 'sns',
|
|
7
|
-
lambda: 'lambda',
|
|
8
|
-
webSocket: 'webSocket'
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
const SQS_RESOURCE = {
|
|
12
|
-
sendMessage: 'SendMessage',
|
|
13
|
-
receiveMessage: 'ReceiveMessage',
|
|
14
|
-
deleteMessage: 'DeleteMessage',
|
|
15
|
-
getQueueAttributes: 'GetQueueAttributes',
|
|
16
|
-
deleteMessageBatch: 'DeleteMessageBatch',
|
|
17
|
-
getQueueUrl: 'GetQueueUrl'
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const SNS_RESOURCE = {
|
|
21
|
-
publish: 'Publish',
|
|
22
|
-
subscribe: 'Subscribe'
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const DYNAMO_RESOURCE = {
|
|
26
|
-
putItem: 'PutItem',
|
|
27
|
-
getItem: 'GetItem',
|
|
28
|
-
query: 'Query',
|
|
29
|
-
updateItem: 'UpdateItem',
|
|
30
|
-
deleteItem: 'DeleteItem'
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
const LAMBDA_RESOURCE = {
|
|
34
|
-
invokeFunction: 'InvokeFunction'
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const S3_RESOURCE = {
|
|
38
|
-
getObject: 'GetObject',
|
|
39
|
-
getObjectTagging: 'GetObjectTagging',
|
|
40
|
-
deleteObject: 'DeleteObject',
|
|
41
|
-
deleteObjectTagging: 'DeleteObjectTagging',
|
|
42
|
-
putObject: 'PutObject',
|
|
43
|
-
putObjectTagging: 'PutObjectTagging',
|
|
44
|
-
getObjectVersion: 'GetObjectVersion',
|
|
45
|
-
listBucket: 'ListBucket'
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export { RESOURCE_CLASSES, SQS_RESOURCE, SNS_RESOURCE, DYNAMO_RESOURCE, LAMBDA_RESOURCE, S3_RESOURCE };
|
package/src/libs/consts/tags.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
const ADD_ON_DATA_STRUCTURE_TYPE = {
|
|
2
|
-
versionedData: 'versionedData',
|
|
3
|
-
attributeTree: 'attributeTree',
|
|
4
|
-
propertyValue: 'propertyValue',
|
|
5
|
-
translation: 'translation'
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
const ATTRIBUTE_TAG = {
|
|
9
|
-
attributeTagValue: 'Value',
|
|
10
|
-
attributeTagLabel: 'Label',
|
|
11
|
-
attributeTagLink: 'Link',
|
|
12
|
-
attributeTagValueStandard: 'ValueStandard',
|
|
13
|
-
attributeTagProperty: 'Property',
|
|
14
|
-
attributeTagPropertyLabel: 'PropertyLabel'
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
const PROPERTY_VALUE_TAG = {
|
|
18
|
-
property: 'PropertyValue',
|
|
19
|
-
propertyLabel: 'PropertyLabel'
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const FIELD_NAME_TYPE = {
|
|
23
|
-
identifiers: 'identifiers',
|
|
24
|
-
nonIdentifiers: 'nonIdentifiers',
|
|
25
|
-
requiredOnCreateFieldName: 'requiredOnCreateFieldName',
|
|
26
|
-
randomOnCreateFieldName: 'randomOnCreateFieldName',
|
|
27
|
-
optionalOnCreate: 'optionalOnCreate'
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const GENERATE_SEED_DATA_TYPE = {
|
|
31
|
-
RANDOM_ON_CREATE_IDENTIFIERS: 'randomOnCreateIdentifier',
|
|
32
|
-
NON_RANDOM_ON_CREATE_IDENTIFIERS: 'notRandomOnIdentifier',
|
|
33
|
-
RELATIONSHIPS: 'relationships'
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const SEED_DATA_TAG = {
|
|
37
|
-
dynamoDBSeedDataTags: 'dynamoDBSeedDataTags',
|
|
38
|
-
graphSeedDataTags: 'graphSeedDataTags',
|
|
39
|
-
cleaningDynamoOneRecordsTags: 'cleaningDynamoOneRecordsTags',
|
|
40
|
-
cleaningDynamoManyRecordsTags: 'cleaningDynamoManyRecordsTags'
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const ACCOUNTLIMIT_TAG = {
|
|
44
|
-
staticLimit: 'staticLimit',
|
|
45
|
-
reservedDynamic: 'reservedDynamic'
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const LIMIT_TAG = {
|
|
49
|
-
uploadImage: 'uploadImageS3',
|
|
50
|
-
uploadData: 'uploadDataS3'
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
const RBAC_TYPE = {
|
|
54
|
-
appLevel: 'AppLevel',
|
|
55
|
-
userLevel: 'UserLevel'
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export {
|
|
59
|
-
ADD_ON_DATA_STRUCTURE_TYPE,
|
|
60
|
-
ATTRIBUTE_TAG,
|
|
61
|
-
PROPERTY_VALUE_TAG,
|
|
62
|
-
FIELD_NAME_TYPE,
|
|
63
|
-
GENERATE_SEED_DATA_TYPE,
|
|
64
|
-
SEED_DATA_TAG,
|
|
65
|
-
ACCOUNTLIMIT_TAG,
|
|
66
|
-
LIMIT_TAG,
|
|
67
|
-
RBAC_TYPE
|
|
68
|
-
};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
const TOPIC_NAME_GRAPH_HANDLER = {
|
|
2
|
-
inUpdateRel: 'UpdateRelationship_In',
|
|
3
|
-
inCreateRel: 'CreateRelationship_In',
|
|
4
|
-
outUpdateRel: 'UpdateRelationship_Out',
|
|
5
|
-
outCreateRel: 'CreateRelationship_Out',
|
|
6
|
-
inDeleteRel: 'DeleteRelationship_In',
|
|
7
|
-
outDeleteRel: 'DeleteRelationship_Out',
|
|
8
|
-
inUpdateNode: 'UpdateNode_In',
|
|
9
|
-
outUpdateNode: 'UpdateNode_Out',
|
|
10
|
-
inCreateNode: 'CreateNode_In',
|
|
11
|
-
outCreateNode: 'CreateNode_Out',
|
|
12
|
-
inDeleteNode: 'DeleteNode_In',
|
|
13
|
-
outDeleteNode: 'DeleteNode_Out',
|
|
14
|
-
inChangeRelationship: 'ChangeRelationshipType_In',
|
|
15
|
-
outChangeRelationship: 'ChangeRelationshipType_Out',
|
|
16
|
-
inMoveRelationship: 'MoveRelationship_In',
|
|
17
|
-
outMoveRelationship: 'MoveRelationship_Out'
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const TOPIC_NAME_GENERATE_CODE = {
|
|
21
|
-
updateRelComplete: 'UpdateRelationshipComplete',
|
|
22
|
-
createRelComplete: 'CreateRelationshipComplete',
|
|
23
|
-
deleteRelComplete: 'DeleteRelationshipComplete',
|
|
24
|
-
getRelComplete: 'GetRelationshipComplete',
|
|
25
|
-
outUpdateRelComplete: 'UpdateRelationshipComplete_Out',
|
|
26
|
-
outCreateRelComplete: 'CreateRelationshipComplete_Out',
|
|
27
|
-
outDeleteRelComplete: 'DeleteRelationshipComplete_Out',
|
|
28
|
-
outGetRelComplete: 'GetRelationshipComplete_Out',
|
|
29
|
-
updateNodeComplete: 'UpdateNodeComplete',
|
|
30
|
-
outUpdateNodeComplete: 'UpdateNodeComplete_Out',
|
|
31
|
-
createNodeComplete: 'CreateObjectComplete',
|
|
32
|
-
outCreateNodeComplete: 'CreateObjectComplete_Out',
|
|
33
|
-
deleteNodeComplete: 'DeleteNodeComplete',
|
|
34
|
-
outDeleteNodeComplete: 'DeleteNodeComplete_Out',
|
|
35
|
-
getNodeComplete: 'GetNodeComplete',
|
|
36
|
-
outGetNodeComplete: 'GetNodeComplete_Out',
|
|
37
|
-
reservedLimitComplete: 'ReservedLimitComplete',
|
|
38
|
-
createPresignUrl: 'CreatePresignUrl',
|
|
39
|
-
flowSchemaOwnTopicComplete: 'FlowSchemaOwnTopicComplete',
|
|
40
|
-
flowSchemaOwnTopicEndpointComplete: 'FlowSchemaOwnTopicEndpointComplete',
|
|
41
|
-
createRecordComplete: 'CreateRecordComplete',
|
|
42
|
-
changeRelationshipComplete: 'ChangeRelationshipComplete',
|
|
43
|
-
outChangeRelationshipComplete: 'ChangeRelationshipComplete_Out',
|
|
44
|
-
moveRelationshipComplete: 'MoveRelationshipComplete',
|
|
45
|
-
outMoveRelationshipComplete: 'MoveRelationshipComplete_Out'
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const GRAPH_HANDLER_SERVICE_NAME = {
|
|
49
|
-
graphHandler: 'GraphHandler'
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
const TOPIC_NAME_EXTERNAL_SERVICE = {
|
|
53
|
-
staticLimitProcessComplete: 'StaticLimitProcessComplete_Out',
|
|
54
|
-
reservedDynamicUsageComplete: 'ReservedDynamicUsageComplete_Out'
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
const EXTERNAL_SERVICE_NAME = {
|
|
58
|
-
accountLimits: 'AccountLimits'
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export {
|
|
62
|
-
TOPIC_NAME_GRAPH_HANDLER,
|
|
63
|
-
TOPIC_NAME_GENERATE_CODE,
|
|
64
|
-
GRAPH_HANDLER_SERVICE_NAME,
|
|
65
|
-
TOPIC_NAME_EXTERNAL_SERVICE,
|
|
66
|
-
EXTERNAL_SERVICE_NAME
|
|
67
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { getObjectSchema } from '@izara_project/izara-core-library-service-schemas';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Phase 1: Load all schema types from local filesystem in parallel.
|
|
6
|
-
* @param {Object} _izContext
|
|
7
|
-
* @param {string} rootServicePath
|
|
8
|
-
* @returns {Promise<{flowSchemas, objSchemas, relSchemas, notifSchemas}>}
|
|
9
|
-
*/
|
|
10
|
-
async function fetchSchemas(_izContext, rootServicePath) {
|
|
11
|
-
const schemasPath = path.join(rootServicePath, '/app/src/schemas');
|
|
12
|
-
|
|
13
|
-
console.info('[INFO] [generateCode] STATUS=FETCHING | schemas...');
|
|
14
|
-
const fetchStartTime = Date.now();
|
|
15
|
-
|
|
16
|
-
const [flowSchemas, objSchemas, relSchemas, notifSchemas] = await Promise.all([
|
|
17
|
-
getObjectSchema.getAllLocalFlowSchemas(_izContext, schemasPath),
|
|
18
|
-
getObjectSchema.getAllLocalObjectSchemasWithHierarchy(_izContext, schemasPath),
|
|
19
|
-
getObjectSchema.getAllLocalRelationshipSchema(_izContext, schemasPath),
|
|
20
|
-
getObjectSchema.getLocalNotificationSystemSchemas(_izContext, schemasPath)
|
|
21
|
-
]);
|
|
22
|
-
|
|
23
|
-
const fetchStr = `flow=${flowSchemas.records?.length ?? 0} obj=${objSchemas.records?.length ?? 0} rel=${relSchemas.length ?? 0}`;
|
|
24
|
-
console.info(
|
|
25
|
-
`[INFO] [generateCode] STATUS=FETCHED | ${fetchStr.padEnd(40)} | elapsedMs=${Date.now() - fetchStartTime}`
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
return { flowSchemas, objSchemas, relSchemas, notifSchemas };
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export { fetchSchemas };
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import path from 'path';
|
|
2
|
-
import generateTemplateDataFromFlowSchema from '../generators/fromFlowSchema/index.js';
|
|
3
|
-
import generateTemplateDataFromSchema from '../generators/fromObjectSchema/index.js';
|
|
4
|
-
import generateTemplateDataInitialSetup from '../generators/fromExternalService/index.js';
|
|
5
|
-
import generateTemplateDataOther from '../generators/other/index.js';
|
|
6
|
-
import generatePlugIn from '../generators/fromPlugIn/index.js';
|
|
7
|
-
import generateTemplateDataRole from '../generators/roles/index.js';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Phase 2: Run all generators against loaded schemas and return the flat source list.
|
|
11
|
-
* @param {Object} _izContext
|
|
12
|
-
* @param {string} rootServicePath
|
|
13
|
-
* @param {{flowSchemas, objSchemas, relSchemas, notifSchemas}} schemas
|
|
14
|
-
* @param {Object} settings
|
|
15
|
-
* @returns {Promise<Array>} allCreateSource items
|
|
16
|
-
*/
|
|
17
|
-
async function transformSchemas(_izContext, rootServicePath, schemas, settings = {}) {
|
|
18
|
-
const { flowSchemas, objSchemas, relSchemas, notifSchemas } = schemas;
|
|
19
|
-
const appPath = path.join(rootServicePath, '/app');
|
|
20
|
-
|
|
21
|
-
console.info('[INFO] [generateCode] STATUS=GENERATING| template data...');
|
|
22
|
-
_izContext.logger.info('[generateCode] generating template data...');
|
|
23
|
-
const genStartTime = Date.now();
|
|
24
|
-
|
|
25
|
-
const [
|
|
26
|
-
flowSchemaResult,
|
|
27
|
-
schemaResult,
|
|
28
|
-
initialSetupResult,
|
|
29
|
-
otherResult,
|
|
30
|
-
generatePlugInResult
|
|
31
|
-
] = await Promise.all([
|
|
32
|
-
generateTemplateDataFromFlowSchema(_izContext, appPath, flowSchemas.records, settings),
|
|
33
|
-
generateTemplateDataFromSchema(
|
|
34
|
-
_izContext,
|
|
35
|
-
appPath,
|
|
36
|
-
objSchemas,
|
|
37
|
-
relSchemas,
|
|
38
|
-
flowSchemas.records,
|
|
39
|
-
notifSchemas,
|
|
40
|
-
settings
|
|
41
|
-
).catch(error => {
|
|
42
|
-
console.error('[generateCode] schemaResult error:', error);
|
|
43
|
-
_izContext.logger.error('[generateCode] schemaResult error:', error);
|
|
44
|
-
return [];
|
|
45
|
-
}),
|
|
46
|
-
generateTemplateDataInitialSetup(_izContext, appPath, objSchemas.records, relSchemas, flowSchemas.records, settings),
|
|
47
|
-
generateTemplateDataOther(_izContext, appPath),
|
|
48
|
-
generatePlugIn(_izContext, rootServicePath, appPath, objSchemas.records, flowSchemas.records)
|
|
49
|
-
]);
|
|
50
|
-
|
|
51
|
-
const genStr = `flow=${flowSchemaResult.length} sch=${schemaResult.length} setup=${initialSetupResult.length} other=${otherResult.length}`;
|
|
52
|
-
console.info(
|
|
53
|
-
`[INFO] [generateCode] STATUS=GENERATED | ${genStr.padEnd(40)} | elapsedMs=${Date.now() - genStartTime}`
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
const allCreateSource = [
|
|
57
|
-
...flowSchemaResult,
|
|
58
|
-
...schemaResult,
|
|
59
|
-
...initialSetupResult,
|
|
60
|
-
...otherResult,
|
|
61
|
-
...generatePlugInResult
|
|
62
|
-
];
|
|
63
|
-
|
|
64
|
-
// Append role configs derived from the collected sources
|
|
65
|
-
console.info('[INFO] [generateCode] STATUS=GENERATING| role configs...');
|
|
66
|
-
const createSourceRole = generateTemplateDataRole(_izContext, appPath, allCreateSource);
|
|
67
|
-
allCreateSource.push(...createSourceRole);
|
|
68
|
-
|
|
69
|
-
const roleStr = `items=${allCreateSource.length} roles=${createSourceRole.length}`;
|
|
70
|
-
console.info(`[INFO] [generateCode] STATUS=ROLES_GEN | ${roleStr.padEnd(40)} |`);
|
|
71
|
-
|
|
72
|
-
return allCreateSource;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export { transformSchemas };
|