@izara_project/izara-core-generate-service-code 1.0.51 → 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 -252
- 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
|
@@ -1,320 +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 path from 'path';
|
|
19
|
-
import { fileURLToPath } from 'url';
|
|
20
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
21
|
-
const __dirname = path.dirname(__filename);
|
|
22
|
-
|
|
23
|
-
import { NoRetryError } from '@izara_project/izara-core-library-core';
|
|
24
|
-
import {
|
|
25
|
-
getObjectSchema,
|
|
26
|
-
utils
|
|
27
|
-
} from '@izara_project/izara-core-library-service-schemas';
|
|
28
|
-
|
|
29
|
-
import generateCodeConsts from '#libs/Consts.js';
|
|
30
|
-
import generateCodeUtils from '#libs/Utils.js';
|
|
31
|
-
|
|
32
|
-
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } =
|
|
33
|
-
generateCodeUtils;
|
|
34
|
-
const {
|
|
35
|
-
SOURCE_PATH,
|
|
36
|
-
FUNCTION_NAME,
|
|
37
|
-
ADD_ON_DATA_STRUCTURE_TYPE,
|
|
38
|
-
STORAGE_TYPES
|
|
39
|
-
} = generateCodeConsts;
|
|
40
|
-
|
|
41
|
-
const templatePath = path.join(__dirname, 'template.ejs');
|
|
42
|
-
const getByDynamoTemplate = path.join(
|
|
43
|
-
__dirname,
|
|
44
|
-
'../GetByStorage/getByDynamo.ejs'
|
|
45
|
-
);
|
|
46
|
-
const getByGraphTemplate = path.join(
|
|
47
|
-
__dirname,
|
|
48
|
-
'../GetByStorage/getByGraph.ejs'
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* receive objectSchema
|
|
53
|
-
* create data for FindDataMain template
|
|
54
|
-
*
|
|
55
|
-
* @param {Object} objectSchema
|
|
56
|
-
* @return {{ templatePath, templateData, setting } }
|
|
57
|
-
*/
|
|
58
|
-
|
|
59
|
-
async function data(_izContext, appPath, getObjectTypes) {
|
|
60
|
-
const schemaPath = path.join(appPath, '/src/schemas');
|
|
61
|
-
const datas = [];
|
|
62
|
-
|
|
63
|
-
// 1. get objectTypes for check objType param
|
|
64
|
-
|
|
65
|
-
// console.log(("getObjectTypes: ", getObjectTypes.fieldLookup)
|
|
66
|
-
|
|
67
|
-
for (const objectType of Object.keys(getObjectTypes.fieldLookup)) {
|
|
68
|
-
// console.log(("objectType: ", objectType)
|
|
69
|
-
|
|
70
|
-
// 2. get local object schema
|
|
71
|
-
let objectSchemaRecord =
|
|
72
|
-
await getObjectSchema.getLocalObjectSchemasWithHierarchy(
|
|
73
|
-
_izContext,
|
|
74
|
-
objectType,
|
|
75
|
-
schemaPath
|
|
76
|
-
);
|
|
77
|
-
// console.log('#### objectSchemaRecord: ', objectSchemaRecord);
|
|
78
|
-
|
|
79
|
-
let objectSchema = objectSchemaRecord.records[0];
|
|
80
|
-
// console.log(("objectSchema: ", objectSchema)
|
|
81
|
-
|
|
82
|
-
const identifiersNames = utils.getUsedFieldNamesOfIdentifiers(
|
|
83
|
-
_izContext,
|
|
84
|
-
objectSchema.identifiers
|
|
85
|
-
);
|
|
86
|
-
// _izContext.logger.debug("identifiersNames: ", identifiersNames);
|
|
87
|
-
|
|
88
|
-
let storageResources = objectSchema.storageResources;
|
|
89
|
-
let fieldNames = objectSchema.fieldNames; // object
|
|
90
|
-
let fieldNameDatas = [];
|
|
91
|
-
|
|
92
|
-
// loop for each main fieldNames
|
|
93
|
-
Object.entries(fieldNames).map(([field, schemas]) => {
|
|
94
|
-
// console.log(("field: ", field)
|
|
95
|
-
// console.log(("schemas: ", schemas)
|
|
96
|
-
|
|
97
|
-
let getInIdentifiers = false;
|
|
98
|
-
|
|
99
|
-
for (const identifierName of identifiersNames) {
|
|
100
|
-
if (field === identifierName) {
|
|
101
|
-
getInIdentifiers = true;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
//* set field as key of object
|
|
106
|
-
//* use schemas for find storageType, graphServiceTag, tableName
|
|
107
|
-
|
|
108
|
-
// check type (use only string and number)
|
|
109
|
-
if (schemas.type === 'string' || schemas.type === 'number') {
|
|
110
|
-
let collectStorageDetail = {};
|
|
111
|
-
let storageResourceTags = schemas.storageResourceTags; // array
|
|
112
|
-
|
|
113
|
-
if (storageResourceTags) {
|
|
114
|
-
for (const storageResourceTag of storageResourceTags) {
|
|
115
|
-
// console.log(("storageResources: ", storageResources)
|
|
116
|
-
|
|
117
|
-
if (Object.values(storageResources).length > 0) {
|
|
118
|
-
Object.entries(storageResources).map(
|
|
119
|
-
([storageTag, storageDetail]) => {
|
|
120
|
-
if (storageResourceTag === storageTag) {
|
|
121
|
-
// console.log(("storageTag: ", storageTag)
|
|
122
|
-
// console.log(("storageDetail: ", storageDetail)
|
|
123
|
-
|
|
124
|
-
if (storageDetail.storageType === STORAGE_TYPES.graph) {
|
|
125
|
-
if (
|
|
126
|
-
collectStorageDetail.hasOwnProperty(STORAGE_TYPES.graph)
|
|
127
|
-
) {
|
|
128
|
-
// console.log(("collectStorageDetail already have graph storageType")
|
|
129
|
-
} else {
|
|
130
|
-
Object.assign(collectStorageDetail, {
|
|
131
|
-
[storageDetail.storageType]: {
|
|
132
|
-
graphServerTag: storageDetail.graphServerTag,
|
|
133
|
-
getInIdentifiers: getInIdentifiers
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
} else if (
|
|
138
|
-
storageDetail.storageType === STORAGE_TYPES.dynamoDB
|
|
139
|
-
) {
|
|
140
|
-
if (
|
|
141
|
-
collectStorageDetail.hasOwnProperty(
|
|
142
|
-
STORAGE_TYPES.dynamoDB
|
|
143
|
-
)
|
|
144
|
-
) {
|
|
145
|
-
// console.log(("collectStorageDetail already have dynamoDB storageType")
|
|
146
|
-
} else {
|
|
147
|
-
Object.assign(collectStorageDetail, {
|
|
148
|
-
[storageDetail.storageType]: {
|
|
149
|
-
tableName: storageDetail.tableName
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
// console.log(("collectStorageDetail: ", collectStorageDetail)
|
|
162
|
-
|
|
163
|
-
//* Q: chooooooose get data from dynamoDB or graph if this fieldName have both of dynamoDB and graph storageTypes ???
|
|
164
|
-
//* A: choose dynamoDB
|
|
165
|
-
// collectStorageDetail: {
|
|
166
|
-
// graph: { graphServerTag: 'GraphHandler' },
|
|
167
|
-
// dynamoDB: { tableName: 'NotificationHello' }
|
|
168
|
-
// }
|
|
169
|
-
if (
|
|
170
|
-
collectStorageDetail.hasOwnProperty(STORAGE_TYPES.graph) &&
|
|
171
|
-
collectStorageDetail.hasOwnProperty(STORAGE_TYPES.dynamoDB)
|
|
172
|
-
) {
|
|
173
|
-
delete collectStorageDetail[STORAGE_TYPES.graph];
|
|
174
|
-
// console.log(("collectStorageDetail after delete graph: ", collectStorageDetail)
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
fieldNameDatas.push({ [field]: collectStorageDetail });
|
|
178
|
-
// console.log(("fieldNameDatasMain: ", fieldNameDatas)
|
|
179
|
-
}
|
|
180
|
-
});
|
|
181
|
-
|
|
182
|
-
// fieldName in versionedData
|
|
183
|
-
if (objectSchema.hasOwnProperty('addOnDataStructure')) {
|
|
184
|
-
// array
|
|
185
|
-
// console.log("objectSchemas have addOnDataStructure: ", objectSchema.addOnDataStructure)
|
|
186
|
-
for (const versionedData of objectSchema.addOnDataStructure) {
|
|
187
|
-
// object // loop versionedData
|
|
188
|
-
// console.log("versionedData: ", versionedData)
|
|
189
|
-
if (versionedData.type === ADD_ON_DATA_STRUCTURE_TYPE.versionedData) {
|
|
190
|
-
let versionedStorageDetail = {};
|
|
191
|
-
let versioendStorageResourceTag = versionedData.storageResourceTag;
|
|
192
|
-
let versionedFieldNames = versionedData.fieldNames; // object
|
|
193
|
-
|
|
194
|
-
Object.entries(storageResources).map(
|
|
195
|
-
([storageTag, storageDetail]) => {
|
|
196
|
-
if (versioendStorageResourceTag === storageTag) {
|
|
197
|
-
if (storageDetail.storageType === STORAGE_TYPES.graph) {
|
|
198
|
-
versionedStorageDetail = {
|
|
199
|
-
[storageDetail.storageType]: {
|
|
200
|
-
graphServerTag: storageDetail.graphServerTag,
|
|
201
|
-
versionedDataLabel: versionedData.versionedDataLabel
|
|
202
|
-
}
|
|
203
|
-
};
|
|
204
|
-
} else {
|
|
205
|
-
throw new NoRetryError(
|
|
206
|
-
`storageType of versionedData isn't graph`
|
|
207
|
-
);
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
);
|
|
212
|
-
// console.log('versionedStorageDetail: ', versionedStorageDetail);
|
|
213
|
-
|
|
214
|
-
Object.keys(versionedFieldNames).forEach(key => {
|
|
215
|
-
// console.log("key", key)
|
|
216
|
-
if (
|
|
217
|
-
versionedFieldNames[key].type === 'string' ||
|
|
218
|
-
versionedFieldNames[key].type === 'number'
|
|
219
|
-
) {
|
|
220
|
-
fieldNameDatas.push({ [key]: versionedStorageDetail });
|
|
221
|
-
}
|
|
222
|
-
});
|
|
223
|
-
|
|
224
|
-
// for (const versionedFieldName of versionedFieldNames) { // object // loop versionedFieldNames
|
|
225
|
-
|
|
226
|
-
// if (versionedFieldName.type === "string" || versionedFieldName.type === "number") {
|
|
227
|
-
// fieldNameDatas.push({ [versionedFieldName.fieldName]: versionedStorageDetail })
|
|
228
|
-
// }
|
|
229
|
-
|
|
230
|
-
// } // end loop versionedFieldNames
|
|
231
|
-
} // end loop versionedData
|
|
232
|
-
//fieldNameDatas.push(collectVersionedFieldNames)
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
// console.log(("fieldNameDatas: ", fieldNameDatas)
|
|
236
|
-
|
|
237
|
-
let fieldNameDatasPerObjectType = {
|
|
238
|
-
objectType: objectType,
|
|
239
|
-
fieldNames: fieldNameDatas
|
|
240
|
-
};
|
|
241
|
-
// console.log("fieldNameDatasPerObjectType: ", fieldNameDatasPerObjectType)
|
|
242
|
-
|
|
243
|
-
datas.push(fieldNameDatasPerObjectType);
|
|
244
|
-
} // end loop objectType
|
|
245
|
-
|
|
246
|
-
// console.log(("datas: ", datas)
|
|
247
|
-
|
|
248
|
-
// fieldNameDatas: [
|
|
249
|
-
// { notificationId: { graph: [Object], dynamoDB: [Object] } },
|
|
250
|
-
// { notificationIdHello: { dynamoDB: {tableName: "NotificationHello"}} },
|
|
251
|
-
// { notificationName: { graph: {graphServerTag: 'GraphHandler', versionedDataLabel: 'notificationSettings' }},
|
|
252
|
-
// { notificationNameeeeeeeeeee: { graph: {graphServerTag: 'GraphHandler', versionedDataLabel: 'notificationSettingssssssssss'}}
|
|
253
|
-
// ]
|
|
254
|
-
|
|
255
|
-
// fieldNameDatasPerObjectType: {
|
|
256
|
-
// objectType: 'notification',
|
|
257
|
-
// fieldNames: [
|
|
258
|
-
// { notificationId: [Object] },
|
|
259
|
-
// { notificationIdHello: [Object] },
|
|
260
|
-
// { notificationName: [Object]},
|
|
261
|
-
// { notificationNameeeeeeeeeee: [Object] }
|
|
262
|
-
// ]
|
|
263
|
-
// }
|
|
264
|
-
|
|
265
|
-
return {
|
|
266
|
-
templatePath: templatePath,
|
|
267
|
-
templateData: {
|
|
268
|
-
functionName: upperCase(FUNCTION_NAME.findData),
|
|
269
|
-
datas: datas,
|
|
270
|
-
getByDynamoTemplate: getByDynamoTemplate,
|
|
271
|
-
getByGraphTemplate: getByGraphTemplate,
|
|
272
|
-
storageDynamo: STORAGE_TYPES.dynamoDB,
|
|
273
|
-
storageTypeGraph: STORAGE_TYPES.graph
|
|
274
|
-
},
|
|
275
|
-
setting: {
|
|
276
|
-
savePath: path.join(appPath, SOURCE_PATH.findData),
|
|
277
|
-
saveFileName: `FindData_Main`,
|
|
278
|
-
fileExtension: '.js',
|
|
279
|
-
isAppend: false
|
|
280
|
-
}
|
|
281
|
-
};
|
|
282
|
-
|
|
283
|
-
// datas: [
|
|
284
|
-
// {
|
|
285
|
-
// objectType: 'consolidated',
|
|
286
|
-
// fieldNames: [ {notificationGroupId: [Object], time: [Object]}]
|
|
287
|
-
// },
|
|
288
|
-
// {
|
|
289
|
-
// objectType: 'notificationGroup',
|
|
290
|
-
// fieldNames: [
|
|
291
|
-
// {notificationGroupId: [Object]},
|
|
292
|
-
// {notificationGroupName: [Object]},
|
|
293
|
-
// {consolidatedType: [Object]},
|
|
294
|
-
// {consolidatedFrequency: [Object]},
|
|
295
|
-
// {consolidatedNextSendDue: [Object]}
|
|
296
|
-
// ]
|
|
297
|
-
// },
|
|
298
|
-
// {
|
|
299
|
-
// objectType: 'notification',
|
|
300
|
-
// fieldNames: [
|
|
301
|
-
// {notificationId: [Object]},
|
|
302
|
-
// {notificationIdHello: [Object]},
|
|
303
|
-
// {notificationName: [Object]},
|
|
304
|
-
// {notificationNameeeeeeeeeee: [Object]}
|
|
305
|
-
// ]
|
|
306
|
-
// },
|
|
307
|
-
// {
|
|
308
|
-
// objectType: 'notificationTrigger',
|
|
309
|
-
// fieldNames: [
|
|
310
|
-
// {notificationTriggerId: [Object]},
|
|
311
|
-
// {propertyName: [Object]},
|
|
312
|
-
// {valueType: [Object]},
|
|
313
|
-
// {valueString: [Object]},
|
|
314
|
-
// {valueNumber: [Object]}
|
|
315
|
-
// ]
|
|
316
|
-
// }
|
|
317
|
-
// ]
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
export default data;
|
|
@@ -1,156 +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 findDataSharedLib from '@izara_project/izara-core-library-find-data';
|
|
19
|
-
import graphSharedLib from '@izara_project/izara-core-library-graph-service';
|
|
20
|
-
import dynamodbSharedLib from '@izara_project/izara-core-library-dynamodb'
|
|
21
|
-
|
|
22
|
-
import { serviceConfig, identifiersObject as identifierObj } from '@izara_project/izara-core-library-service-schemas';
|
|
23
|
-
|
|
24
|
-
//(<additionalModule>)
|
|
25
|
-
//(</additionalModule>)
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* triggered from searchResult for each requiredData field per one identifiers
|
|
29
|
-
* @param {Object} _izContext
|
|
30
|
-
* @param {string} fieldName
|
|
31
|
-
* @param {Object} objType
|
|
32
|
-
* @param {Object} identifiers
|
|
33
|
-
* @param {Boolean} overWriteCache
|
|
34
|
-
*
|
|
35
|
-
* @returns {object} description of return value
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
export default async function findData(
|
|
39
|
-
_izContext,
|
|
40
|
-
fieldName,
|
|
41
|
-
objType,
|
|
42
|
-
identifiers,
|
|
43
|
-
overWriteCache,
|
|
44
|
-
callingFlow,
|
|
45
|
-
|
|
46
|
-
//(<additionalParams>)
|
|
47
|
-
//(</additionalParams>)
|
|
48
|
-
) {
|
|
49
|
-
|
|
50
|
-
try {
|
|
51
|
-
|
|
52
|
-
_izContext.logger.debug('----- findData event params -----', {
|
|
53
|
-
fieldName: fieldName,
|
|
54
|
-
objType: objType,
|
|
55
|
-
identifiers: identifiers,
|
|
56
|
-
overWriteCache: overWriteCache,
|
|
57
|
-
callingFlow: callingFlow
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
// removeAttributes on expired
|
|
61
|
-
let removeAttributes = [];
|
|
62
|
-
//(<removeAttributes>)
|
|
63
|
-
//(</removeAttributes>)
|
|
64
|
-
|
|
65
|
-
let deleteDataTableOnExpired = [];
|
|
66
|
-
|
|
67
|
-
// Check/create FindDataMain status
|
|
68
|
-
let [findDataMainStatus, findDataId, findDataMain] = await findDataSharedLib.checkFindDataMainStatus(
|
|
69
|
-
_izContext,
|
|
70
|
-
fieldName,
|
|
71
|
-
objType,
|
|
72
|
-
identifiers,
|
|
73
|
-
callingFlow,
|
|
74
|
-
removeAttributes,
|
|
75
|
-
overWriteCache
|
|
76
|
-
);
|
|
77
|
-
_izContext.logger.debug('result after checkFindDataMainStatus is', {
|
|
78
|
-
findDataMainStatus: findDataMainStatus,
|
|
79
|
-
findDataId: findDataId,
|
|
80
|
-
findDataMain: findDataMain
|
|
81
|
-
})
|
|
82
|
-
|
|
83
|
-
if (findDataMainStatus != 'process') {
|
|
84
|
-
_izContext.logger.debug(`findDataMainStatus status isn't process :${findDataMainStatus}`)
|
|
85
|
-
return {
|
|
86
|
-
returnResponse: 'Function FindData not process'
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
let errorsFound = [];
|
|
91
|
-
|
|
92
|
-
let standardErrorParams = [
|
|
93
|
-
_izContext,
|
|
94
|
-
fieldName,
|
|
95
|
-
objType,
|
|
96
|
-
identifiers,
|
|
97
|
-
null,
|
|
98
|
-
overWriteCache,
|
|
99
|
-
callingFlow,
|
|
100
|
-
'error'
|
|
101
|
-
];
|
|
102
|
-
|
|
103
|
-
<% for (let idx = 0; idx < datas.length; idx++) { _%>
|
|
104
|
-
<% let objectType = datas[idx].objectType _%>
|
|
105
|
-
if (objType.objectType === <%- JSON.stringify(objectType) %>) {
|
|
106
|
-
_izContext.logger.debug('objectType: ', objType.objectType)
|
|
107
|
-
|
|
108
|
-
<% let fieldNames = datas[idx].fieldNames _%>
|
|
109
|
-
<% for (let idx = 0; idx < fieldNames.length; idx++) { _%>
|
|
110
|
-
<% let fieldName = Object.keys(fieldNames[idx])[0] _%>
|
|
111
|
-
<% let storageDetails = (Object.values(fieldNames[idx])[0]) _%>
|
|
112
|
-
if (fieldName.fieldName == <%- JSON.stringify(fieldName) %>) {
|
|
113
|
-
_izContext.logger.debug('fieldName: ', fieldName.fieldName)
|
|
114
|
-
|
|
115
|
-
<% Object.entries(storageDetails).map(([storage, details]) => { _%>
|
|
116
|
-
<% let versionedDataLabel = [] _%>
|
|
117
|
-
<% if (storage === storageTypeGraph && details.hasOwnProperty('versionedDataLabel')){ versionedDataLabel.push(details.versionedDataLabel) } _%>
|
|
118
|
-
<% if (storage === storageDynamo){ %><%- include(getByDynamoTemplate, {tableName: details.tableName, fieldName: fieldName, objectType: objectType}) %><% } _%>
|
|
119
|
-
<% if (storage === storageTypeGraph){ %><%- include(getByGraphTemplate, {graphServerTag: details.graphServerTag, versionedDataLabel: versionedDataLabel, fieldName: fieldName, objectType: objectType, getInIdentifiers: details.getInIdentifiers}) %><% } _%>
|
|
120
|
-
<% }) _%>
|
|
121
|
-
}<% if (idx + 1 == fieldNames.length) { %>
|
|
122
|
-
<%- createAdditionalFieldNamesTag(objectType) %>
|
|
123
|
-
<% } _%>
|
|
124
|
-
else <% } _%> {
|
|
125
|
-
errorsFound.push('unrecognized fieldName')
|
|
126
|
-
standardErrorParams.push(errorsFound)
|
|
127
|
-
await findDataSharedLib.completeFindDataMain(...standardErrorParams);
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
} <% if (idx + 1 == datas.length) { %>
|
|
131
|
-
//(<additionalObjectType>)
|
|
132
|
-
//(</additionalObjectType>)
|
|
133
|
-
<% } _%>
|
|
134
|
-
else<% } %> {
|
|
135
|
-
errorsFound.push('unrecognized objectType')
|
|
136
|
-
standardErrorParams.push(errorsFound)
|
|
137
|
-
await findDataSharedLib.completeFindDataMain(...standardErrorParams);
|
|
138
|
-
return {
|
|
139
|
-
returnResponse: 'Function FindData Error'
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
return {
|
|
144
|
-
returnResponse: 'Function FindData Finish'
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
} catch (err) {
|
|
148
|
-
_izContext.logger.error('error FindDataMain: ', err)
|
|
149
|
-
throw (err)
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
<%_ function createAdditionalFieldNamesTag(objectType) {
|
|
154
|
-
return `//(<additional${objectType}FieldNames>)
|
|
155
|
-
//(</additional${objectType}FieldNames>)`
|
|
156
|
-
} _%>
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import endpointComponent from './endpoint/index.js';
|
|
2
|
-
import endpointCompleteComponent from './endpointComplete/index.js';
|
|
3
|
-
import resourceYamlComponent from '../resourceYamlComponent/index.js';
|
|
4
|
-
import relationshipPerActionComponent from './relationship/index.js';
|
|
5
|
-
import processLogicalComponent from './processLogical/index.js';
|
|
6
|
-
import processLogicalPaginateComponent from './processLogicalPagination/index.js';
|
|
7
|
-
import findDataComponent from './findData/index.js';
|
|
8
|
-
import systemTextTagComponent from './textTag/index.js';
|
|
9
|
-
import rbacComponent from './rbac/index.js'
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Generates code from templates based on object schemas
|
|
13
|
-
* @param {Object} _izContext
|
|
14
|
-
* @param {string} appPath
|
|
15
|
-
* @param {Array} allObjSchemas
|
|
16
|
-
* @param {Array} allRelationshipSchemas
|
|
17
|
-
* @param {Object} settings
|
|
18
|
-
* @returns {Promise<Array>}
|
|
19
|
-
*/
|
|
20
|
-
async function generateTemplateDataFromSchema(
|
|
21
|
-
_izContext,
|
|
22
|
-
appPath,
|
|
23
|
-
allObjSchemas,
|
|
24
|
-
allRelationshipSchemas,
|
|
25
|
-
allLocalFlowSchemas,
|
|
26
|
-
localNotificationSystem,
|
|
27
|
-
settings
|
|
28
|
-
) {
|
|
29
|
-
try {
|
|
30
|
-
const startAllMs = Date.now();
|
|
31
|
-
const totalSchemas = Array.isArray(allObjSchemas.records)
|
|
32
|
-
? allObjSchemas.records.length
|
|
33
|
-
: 0;
|
|
34
|
-
|
|
35
|
-
console.info(`[Schema] start totalSchemas=${totalSchemas}`);
|
|
36
|
-
if (totalSchemas === 0) return [];
|
|
37
|
-
|
|
38
|
-
const generatedCodeConfigFromFlowSchemas = allLocalFlowSchemas.map(
|
|
39
|
-
flowSchema => ({
|
|
40
|
-
flowTag: flowSchema?.flowTag ?? '(unknownFlowTag)',
|
|
41
|
-
generatedCodeConfig: flowSchema?.generatedCodeConfig
|
|
42
|
-
})
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
console.info(
|
|
46
|
-
`[Schema] generatedCodeConfigs=${generatedCodeConfigFromFlowSchemas.filter(f => f.generatedCodeConfig).length}`
|
|
47
|
-
);
|
|
48
|
-
|
|
49
|
-
const [
|
|
50
|
-
endpointParams,
|
|
51
|
-
endpointCompleteParams,
|
|
52
|
-
resourceYamlParams,
|
|
53
|
-
relationshipParams,
|
|
54
|
-
processLogicalParams,
|
|
55
|
-
processLogicalPaginateParams,
|
|
56
|
-
findDataParams,
|
|
57
|
-
systemTextParams,
|
|
58
|
-
rbacParams,
|
|
59
|
-
] = await Promise.all([
|
|
60
|
-
endpointComponent(
|
|
61
|
-
_izContext,
|
|
62
|
-
appPath,
|
|
63
|
-
allObjSchemas.records,
|
|
64
|
-
generatedCodeConfigFromFlowSchemas
|
|
65
|
-
).catch(error => {
|
|
66
|
-
console.error('[Schema] endpointComponent error:', error);
|
|
67
|
-
return [];
|
|
68
|
-
}),
|
|
69
|
-
endpointCompleteComponent(_izContext, allObjSchemas, appPath),
|
|
70
|
-
resourceYamlComponent(
|
|
71
|
-
_izContext,
|
|
72
|
-
appPath,
|
|
73
|
-
allObjSchemas.records,
|
|
74
|
-
allRelationshipSchemas
|
|
75
|
-
),
|
|
76
|
-
relationshipPerActionComponent(
|
|
77
|
-
_izContext,
|
|
78
|
-
appPath,
|
|
79
|
-
allRelationshipSchemas
|
|
80
|
-
),
|
|
81
|
-
processLogicalComponent(_izContext, appPath, allObjSchemas.records),
|
|
82
|
-
processLogicalPaginateComponent(
|
|
83
|
-
_izContext,
|
|
84
|
-
appPath,
|
|
85
|
-
allObjSchemas.records
|
|
86
|
-
),
|
|
87
|
-
findDataComponent(_izContext, appPath, allObjSchemas, settings),
|
|
88
|
-
systemTextTagComponent(_izContext, appPath, allObjSchemas, allRelationshipSchemas, allLocalFlowSchemas, localNotificationSystem),
|
|
89
|
-
rbacComponent(_izContext, appPath, allObjSchemas, settings)
|
|
90
|
-
]);
|
|
91
|
-
|
|
92
|
-
console.info(
|
|
93
|
-
`[Schema] components generated endpoint=${endpointParams.length} \nendpointComplete=${endpointCompleteParams.length} \nresourceYaml=${resourceYamlParams.length} \nrelationship=${relationshipParams.length} \nprocessLogical=${processLogicalParams.length} \nprocessLogicalPaginate=${processLogicalPaginateParams.length} \nfindData=${findDataParams.length} \nsystemText=${systemTextParams.length} \nrbac=${rbacParams.length}`
|
|
94
|
-
);
|
|
95
|
-
|
|
96
|
-
const allCreateSourceParams = [
|
|
97
|
-
...endpointParams,
|
|
98
|
-
...endpointCompleteParams,
|
|
99
|
-
...resourceYamlParams,
|
|
100
|
-
...relationshipParams,
|
|
101
|
-
...processLogicalParams,
|
|
102
|
-
...processLogicalPaginateParams,
|
|
103
|
-
...findDataParams,
|
|
104
|
-
...systemTextParams,
|
|
105
|
-
...rbacParams
|
|
106
|
-
];
|
|
107
|
-
|
|
108
|
-
const uniqueSortedTargetFiles = Array.from(
|
|
109
|
-
new Set(
|
|
110
|
-
allCreateSourceParams
|
|
111
|
-
.filter(
|
|
112
|
-
item => item?.setting?.savePath && item?.setting?.saveFileName
|
|
113
|
-
)
|
|
114
|
-
.map(
|
|
115
|
-
item =>
|
|
116
|
-
`${item.setting.savePath.replace(/\/+$/, '')}/${item.setting.saveFileName}${item.setting.fileExtension || ''}`
|
|
117
|
-
)
|
|
118
|
-
)
|
|
119
|
-
).sort();
|
|
120
|
-
|
|
121
|
-
console.info(
|
|
122
|
-
`[Schema] completed total=${allCreateSourceParams.length} uniqueFiles=${uniqueSortedTargetFiles.length} elapsedMs=${Date.now() - startAllMs}`
|
|
123
|
-
);
|
|
124
|
-
if (uniqueSortedTargetFiles.length > 0 && _izContext.logger?.debug)
|
|
125
|
-
_izContext.logger.debug('[Schema] targetFiles=', uniqueSortedTargetFiles);
|
|
126
|
-
|
|
127
|
-
return allCreateSourceParams;
|
|
128
|
-
} catch (error) {
|
|
129
|
-
console.error('[Schema] error:', error);
|
|
130
|
-
return [];
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
export default generateTemplateDataFromSchema;
|
|
@@ -1,51 +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 path from 'path';
|
|
19
|
-
import { fileURLToPath } from 'url';
|
|
20
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
21
|
-
const __dirname = path.dirname(__filename);
|
|
22
|
-
import consts from '#libs/Consts.js';
|
|
23
|
-
import utils from '#libs/Utils.js';
|
|
24
|
-
|
|
25
|
-
const { SOURCE_PATH, FUNCTION_NAME, HANDLER } = consts;
|
|
26
|
-
|
|
27
|
-
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } =
|
|
28
|
-
utils;
|
|
29
|
-
|
|
30
|
-
const templatePath = path.join(__dirname, 'template.ejs');
|
|
31
|
-
/**
|
|
32
|
-
* receive srcPath
|
|
33
|
-
* not create data for ProcessLogical Handler template
|
|
34
|
-
*
|
|
35
|
-
* @param {string} appPath
|
|
36
|
-
* @return {{ templatePath, templateData, setting } }
|
|
37
|
-
*/
|
|
38
|
-
function data(_izContext, appPath) {
|
|
39
|
-
return {
|
|
40
|
-
templatePath: templatePath,
|
|
41
|
-
templateData: {},
|
|
42
|
-
setting: {
|
|
43
|
-
savePath: path.join(appPath, SOURCE_PATH.processLogical),
|
|
44
|
-
saveFileName: `${upperCase(FUNCTION_NAME.processLogical)}_${upperCase(HANDLER.hdrSqs)}`,
|
|
45
|
-
fileExtension: '.js',
|
|
46
|
-
isAppend: false
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export default data;
|