@izara_project/izara-core-generate-service-code 1.0.96 → 1.0.98
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 +2 -2
- package/package.json +2 -1
- package/src/compile/loadSchemas.js +44 -322
- package/src/compile/loadSchemasRemote.js +195 -0
- package/src/compile/schemaValidatorSetup.js +143 -0
- package/src/emit/{crud → application/crud}/emitCrudApplicationArtifacts.js +2 -2
- package/src/emit/{crud → application/crud}/generateCrudApplicationArtifacts.js +2 -2
- package/src/emit/{crud → application/crud}/generateDynamicCrudFlowSchemas.js +2 -2
- package/src/emit/{crud → application/crud}/templates/FlowEndpoint_HdrWbs.ejs +2 -2
- package/src/emit/{crud → application/crud}/templates/FlowMain_Wbs.ejs +2 -2
- package/src/emit/{custom → application/custom}/customFlowS3.js +1 -1
- package/src/emit/{custom → application/custom}/customFlowSteps.js +1 -1
- package/src/emit/{custom → application/custom}/customFlowTemplates.js +1 -1
- package/src/emit/{custom → application/custom}/emitCustomFlowApplicationArtifacts.js +1 -1
- package/src/emit/{custom → application/custom}/generateCustomFlowApplicationArtifacts.js +2 -2
- package/src/emit/{custom → application/custom}/templates/s3/CreateObject_Main.ejs +5 -2
- package/src/emit/{custom → application/custom}/templates/triggerCache/CheckTriggerCache_Main.ejs +2 -2
- package/src/emit/{rbac → application/rbac}/emitRbacApplicationArtifacts.js +2 -2
- package/src/emit/{rbac → application/rbac}/generateCreateTargetRoleHandler.js +2 -2
- package/src/emit/{rbac → application/rbac}/generateDynamicRbacFlowSchemas.js +2 -2
- package/src/emit/{relationship → application/relationship}/emitRelationshipApplicationArtifacts.js +3 -3
- package/src/emit/{relationship → application/relationship}/generateDynamicRelationshipFlowSchemas.js +2 -2
- package/src/emit/{relationship → application/relationship}/generateRelationshipApplicationArtifacts.js +2 -2
- package/src/emit/{relationship → application/relationship}/templates/ChangeRelationship_Main.ejs +3 -2
- package/src/emit/{relationship → application/relationship}/templates/CreateRelationship_Main.ejs +3 -2
- package/src/emit/{relationship → application/relationship}/templates/DeleteRelationship_Main.ejs +3 -2
- package/src/emit/{relationship → application/relationship}/templates/GetRelationship_Main.ejs +3 -2
- package/src/emit/{relationship → application/relationship}/templates/MoveRelationship_Main.ejs +3 -2
- package/src/emit/{relationship → application/relationship}/templates/UpdateRelationship_Main.ejs +3 -2
- package/src/emit/{system → application/system}/emitSystemFindDataArtifacts.js +1 -1
- package/src/emit/{system → application/system}/templates/RegisterComplete_Main.ejs +6 -2
- package/src/emit/{system → application/system}/templates/Register_Main.ejs +6 -2
- package/src/emit/{system → application/system}/templates/WebSocketComplete_Main.ejs +3 -3
- package/src/emit/{resource → infrastructure/resources}/generateResourceArtifacts.js +2 -2
- package/src/emit/{resource → infrastructure/resources}/iamResourceArtifacts.js +3 -3
- package/src/emit/{resource → infrastructure/resources}/resourceState.js +4 -4
- package/src/emit/{attributeTree → schemas/attributeTree}/emitAttributeTreeSchemas.js +14 -22
- package/src/emit/schemas/attributeTree/emitAttributeTreeTargetValueStandard.js +132 -0
- package/src/emit/schemas/ledger/emitLedgerSchemas.js +392 -0
- package/src/emit/schemas/ledger/templates/LedgerObjectSchema.ejs +3 -0
- package/src/emit/schemas/ledger/templates/LedgerRelationshipSchema.ejs +1 -0
- package/src/emit/schemas/propertyValue/emitPropertyValueSchemas.js +329 -0
- package/src/emit/{systemText → schemas/systemText}/emitSystemTextSchemas.js +1 -1
- package/src/generate.js +34 -308
- package/src/{generateIntTest.js → intTest/generateIntTest.js} +2 -2
- package/src/{generateResourceIntTest.js → intTest/generateResourceIntTest.js} +2 -2
- package/src/output/mergeHooks.js +69 -15
- package/src/plan/domainRegistry.js +307 -0
- package/task.md +132 -0
- package/test/helpers/testProject.js +127 -0
- package/test/helpers/testProject.test.js +57 -0
- package/test/{core.test.js → integration/core.test.js} +3 -3
- package/test/{graphDrivenFlowSchema.test.js → integration/graphDrivenFlowSchema.test.js} +1 -1
- package/test/{intTestApi.test.js → integration/intTestApi.test.js} +1 -1
- package/test/{publicApi.test.js → integration/publicApi.test.js} +55 -2
- package/test/{createTargetRoleHandler.test.js → unit/application/createTargetRoleHandler.test.js} +1 -1
- package/test/{crudApplicationArtifacts.test.js → unit/application/crudApplicationArtifacts.test.js} +1 -1
- package/test/{customFlowApplicationArtifacts.test.js → unit/application/customFlowApplicationArtifacts.test.js} +18 -9
- package/test/{relationshipApplicationArtifacts.test.js → unit/application/relationshipApplicationArtifacts.test.js} +31 -1
- package/test/{systemFindDataArtifacts.test.js → unit/application/systemFindDataArtifacts.test.js} +1 -1
- package/test/{functionYamlArtifact.test.js → unit/infrastructure/functionYamlArtifact.test.js} +1 -1
- package/test/{resourceArtifacts.test.js → unit/infrastructure/resourceArtifacts.test.js} +2 -1
- package/test/unit/output/mergeHooks.test.js +268 -0
- package/test/unit/schemas/attributeTreeDirectives.test.js +177 -0
- package/test/{attributeTreeSchemas.test.js → unit/schemas/attributeTreeSchemas.test.js} +46 -102
- package/test/{dynamicCrudFlowSchemas.test.js → unit/schemas/dynamicCrudFlowSchemas.test.js} +2 -2
- package/test/{dynamicRbacFlowSchemas.test.js → unit/schemas/dynamicRbacFlowSchemas.test.js} +1 -1
- package/test/{dynamicRelationshipFlowSchemas.test.js → unit/schemas/dynamicRelationshipFlowSchemas.test.js} +11 -1
- package/test/{errorSchemas.test.js → unit/schemas/errorSchemas.test.js} +2 -2
- package/test/unit/schemas/ledgerSchemas.test.js +289 -0
- package/test/unit/schemas/propertyValueSchemas.test.js +265 -0
- package/test/{systemTextSchemas.test.js → unit/schemas/systemTextSchemas.test.js} +24 -36
- package/src/emit/attributeTree/emitAttributeTreeTargetSchemas.js +0 -153
- package/src/emit/attributeTree/resolveTargetServicePath.js +0 -111
- package/src/emit/crud/loadLocalSchemaArrays.js +0 -4
- /package/src/emit/{coreFunction → application/coreFunction}/emitCoreFunctionArtifacts.js +0 -0
- /package/src/emit/{coreFunction → application/coreFunction}/templates/CoreFunction_Yaml.ejs +0 -0
- /package/src/emit/{coreFunction → application/coreFunction}/templates/CoreResource_Yaml.ejs +0 -0
- /package/src/emit/{coreFunction → application/coreFunction}/templates/GenerateSeedDataDynamo_HdrInv.ejs +0 -0
- /package/src/emit/{coreFunction → application/coreFunction}/templates/GenerateSeedDataDynamo_Main.ejs +0 -0
- /package/src/emit/{coreFunction → application/coreFunction}/templates/GenerateSeedDataGraphData_HdrInv.ejs +0 -0
- /package/src/emit/{coreFunction → application/coreFunction}/templates/GenerateSeedDataGraphData_Main.ejs +0 -0
- /package/src/emit/{coreFunction → application/coreFunction}/templates/GenerateSeedDataGraphSchema_HdrInv.ejs +0 -0
- /package/src/emit/{coreFunction → application/coreFunction}/templates/GenerateSeedDataGraphSchema_Main.ejs +0 -0
- /package/src/emit/{coreFunction → application/coreFunction}/templates/GeneratedGraphNodeSchemas.ejs +0 -0
- /package/src/emit/{coreFunction → application/coreFunction}/templates/GeneratedGraphRelSchemas.ejs +0 -0
- /package/src/emit/{coreFunction → application/coreFunction}/templates/GeneratedTableConfigs.ejs +0 -0
- /package/src/emit/{coreFunction → application/coreFunction}/templates/InitialSetupConfig.ejs +0 -0
- /package/src/emit/{coreFunction → application/coreFunction}/templates/InitialSetupRunner.ejs +0 -0
- /package/src/emit/{coreFunction → application/coreFunction}/templates/InitialSetupRunner_initialSetup.ejs +0 -0
- /package/src/emit/{coreFunction → application/coreFunction}/templates/InitialSetupRunner_seedDynamo.ejs +0 -0
- /package/src/emit/{coreFunction → application/coreFunction}/templates/InitialSetupRunner_seedGraph.ejs +0 -0
- /package/src/emit/{coreFunction → application/coreFunction}/templates/InitialSetupRunner_seedRemove.ejs +0 -0
- /package/src/emit/{coreFunction → application/coreFunction}/templates/InitialSetupRunner_uploadSchema.ejs +0 -0
- /package/src/emit/{coreFunction → application/coreFunction}/templates/InitialSetup_HdrInv.ejs +0 -0
- /package/src/emit/{coreFunction → application/coreFunction}/templates/InitialSetup_Main.ejs +0 -0
- /package/src/emit/{coreFunction → application/coreFunction}/templates/RemoveSeedDataDynamo_HdrInv.ejs +0 -0
- /package/src/emit/{coreFunction → application/coreFunction}/templates/RemoveSeedDataDynamo_Main.ejs +0 -0
- /package/src/emit/{coreFunction → application/coreFunction}/templates/UploadSchema_HdrInv.ejs +0 -0
- /package/src/emit/{coreFunction → application/coreFunction}/templates/UploadSchema_Main.ejs +0 -0
- /package/src/emit/{crud → application/crud}/crudActionPlan.js +0 -0
- /package/src/emit/{crud → application/crud}/dynamicCrudFlowSchemaTemplate.js +0 -0
- /package/src/emit/{crud → application/crud}/emitDynamicCrudFlowSchemas.js +0 -0
- /package/src/emit/{crud → application/crud}/templates/CreateAfterHookCallback_Main.ejs +0 -0
- /package/src/emit/{crud → application/crud}/templates/CreateBeforeHookCallback_Main.ejs +0 -0
- /package/src/emit/{crud → application/crud}/templates/CreateComplete_Main.ejs +0 -0
- /package/src/emit/{crud → application/crud}/templates/CreateConfirmComplete_Main.ejs +0 -0
- /package/src/emit/{crud → application/crud}/templates/CreateEndpoint_Main.ejs +0 -0
- /package/src/emit/{crud → application/crud}/templates/CreateLogicalLib.ejs +0 -0
- /package/src/emit/{crud → application/crud}/templates/CreateNodeCallback_Main.ejs +0 -0
- /package/src/emit/{crud → application/crud}/templates/DeleteAfterHookCallback_Main.ejs +0 -0
- /package/src/emit/{crud → application/crud}/templates/DeleteBeforeHookCallback_Main.ejs +0 -0
- /package/src/emit/{crud → application/crud}/templates/DeleteComplete_Main.ejs +0 -0
- /package/src/emit/{crud → application/crud}/templates/DeleteEndpoint_Main.ejs +0 -0
- /package/src/emit/{crud → application/crud}/templates/DeleteLogicalLib.ejs +0 -0
- /package/src/emit/{crud → application/crud}/templates/FlowEndpointRbacCallback_Main.ejs +0 -0
- /package/src/emit/{crud → application/crud}/templates/GetEndpoint_Main.ejs +0 -0
- /package/src/emit/{crud → application/crud}/templates/GetRangeEndpoint_Main.ejs +0 -0
- /package/src/emit/{crud → application/crud}/templates/UpdateAfterHookCallback_Main.ejs +0 -0
- /package/src/emit/{crud → application/crud}/templates/UpdateBeforeHookCallback_Main.ejs +0 -0
- /package/src/emit/{crud → application/crud}/templates/UpdateComplete_Main.ejs +0 -0
- /package/src/emit/{crud → application/crud}/templates/UpdateEndpoint_Main.ejs +0 -0
- /package/src/emit/{crud → application/crud}/templates/UpdateLogicalLib.ejs +0 -0
- /package/src/emit/{custom → application/custom}/customFlowPaths.js +0 -0
- /package/src/emit/{custom → application/custom}/customFlows.js +0 -0
- /package/src/emit/{custom → application/custom}/templates/FlowEndpointRbacCallback_Main.ejs +0 -0
- /package/src/emit/{custom → application/custom}/templates/FlowEndpoint_Main.ejs +0 -0
- /package/src/emit/{custom → application/custom}/templates/FlowStep_Main.ejs +0 -0
- /package/src/emit/{custom → application/custom}/templates/s3/ConfirmReserved_HdrSqs.ejs +0 -0
- /package/src/emit/{custom → application/custom}/templates/s3/ConfirmReserved_Main.ejs +0 -0
- /package/src/emit/{custom → application/custom}/templates/s3/CreateObject_HdrWbs.ejs +0 -0
- /package/src/emit/{custom → application/custom}/templates/s3/CreatePreSignUrl_HdrSqs.ejs +0 -0
- /package/src/emit/{custom → application/custom}/templates/s3/CreatePreSignUrl_Main.ejs +0 -0
- /package/src/emit/{custom → application/custom}/templates/s3/FlowHandler_HdrS3.ejs +0 -0
- /package/src/emit/{custom → application/custom}/templates/s3/ProcessS3File_Main.ejs +0 -0
- /package/src/emit/{custom → application/custom}/templates/s3/ReservedLimit_HdrSqs.ejs +0 -0
- /package/src/emit/{custom → application/custom}/templates/s3/ReservedLimit_Main.ejs +0 -0
- /package/src/emit/{custom → application/custom}/templates/triggerCache/CheckTriggerCache_HdrSqs.ejs +0 -0
- /package/src/emit/{custom → application/custom}/templates/triggerCache/TriggerCacheComplete_Main.ejs +0 -0
- /package/src/emit/{custom → application/custom}/templates/triggerCache/TriggerCache_Main.ejs +0 -0
- /package/src/emit/{rbac → application/rbac}/emitDynamicRbacFlowSchemas.js +0 -0
- /package/src/emit/{rbac → application/rbac}/rbacFlowTag.js +0 -0
- /package/src/emit/{rbac → application/rbac}/templates/CancelUsage_Main.ejs +0 -0
- /package/src/emit/{rbac → application/rbac}/templates/ConfirmUsage_Main.ejs +0 -0
- /package/src/emit/{rbac → application/rbac}/templates/CreateTargetRole_HdrSqs.ejs +0 -0
- /package/src/emit/{rbac → application/rbac}/templates/CreateTargetRole_Main.ejs +0 -0
- /package/src/emit/{rbac → application/rbac}/templates/DeleteTargetRole_Main.ejs +0 -0
- /package/src/emit/{rbac → application/rbac}/templates/DynamicRbacFlowSchema.ejs +0 -0
- /package/src/emit/{rbac → application/rbac}/templates/GetMyPermissions_Main.ejs +0 -0
- /package/src/emit/{rbac → application/rbac}/templates/GetTargetRole_Main.ejs +0 -0
- /package/src/emit/{rbac → application/rbac}/templates/ListRbac_HdrApi.ejs +0 -0
- /package/src/emit/{rbac → application/rbac}/templates/ListRbac_HdrSqs.ejs +0 -0
- /package/src/emit/{rbac → application/rbac}/templates/ListRbac_Main.ejs +0 -0
- /package/src/emit/{rbac → application/rbac}/templates/RbacMutation_Main.ejs +0 -0
- /package/src/emit/{rbac → application/rbac}/templates/ReservedDynamicUsage_Main.ejs +0 -0
- /package/src/emit/{rbac → application/rbac}/templates/UpdateTargetRole_Main.ejs +0 -0
- /package/src/emit/{rbac → application/rbac}/templates/UserRbacFlow_HdrSqs.ejs +0 -0
- /package/src/emit/{rbac → application/rbac}/templates/UserRbacFlow_Main.ejs +0 -0
- /package/src/emit/{rbac → application/rbac}/templates/UserRoleMutation_Main.ejs +0 -0
- /package/src/emit/{relationship → application/relationship}/emitDynamicRelationshipFlowSchemas.js +0 -0
- /package/src/emit/{relationship → application/relationship}/templates/ChangeRelationshipComplete_HdrSqs.ejs +0 -0
- /package/src/emit/{relationship → application/relationship}/templates/ChangeRelationshipComplete_Main.ejs +0 -0
- /package/src/emit/{relationship → application/relationship}/templates/CreateRelationshipComplete_HdrSqs.ejs +0 -0
- /package/src/emit/{relationship → application/relationship}/templates/CreateRelationshipComplete_Main.ejs +0 -0
- /package/src/emit/{relationship → application/relationship}/templates/DeleteRelationshipComplete_HdrSqs.ejs +0 -0
- /package/src/emit/{relationship → application/relationship}/templates/DeleteRelationshipComplete_Main.ejs +0 -0
- /package/src/emit/{relationship → application/relationship}/templates/GetRelationshipComplete_HdrSqs.ejs +0 -0
- /package/src/emit/{relationship → application/relationship}/templates/GetRelationshipComplete_Main.ejs +0 -0
- /package/src/emit/{relationship → application/relationship}/templates/MoveRelationshipComplete_HdrSqs.ejs +0 -0
- /package/src/emit/{relationship → application/relationship}/templates/MoveRelationshipComplete_Main.ejs +0 -0
- /package/src/emit/{relationship → application/relationship}/templates/UpdateRelationshipComplete_HdrSqs.ejs +0 -0
- /package/src/emit/{relationship → application/relationship}/templates/UpdateRelationshipComplete_Main.ejs +0 -0
- /package/src/emit/{system → application/system}/emitSystemWebSocketArtifacts.js +0 -0
- /package/src/emit/{system → application/system}/templates/RegisterComplete_HdrSqs.ejs +0 -0
- /package/src/emit/{system → application/system}/templates/RegisterComplete_Yaml.ejs +0 -0
- /package/src/emit/{system → application/system}/templates/RegisterWbs_Yaml.ejs +0 -0
- /package/src/emit/{system → application/system}/templates/Register_HdrWbs.ejs +0 -0
- /package/src/emit/{system → application/system}/templates/WebSocketComplete_HdrSqs.ejs +0 -0
- /package/src/emit/{system → application/system}/templates/WebSocketComplete_Yaml.ejs +0 -0
- /package/src/emit/{system → application/system}/templates/WebSocketConnect.ejs +0 -0
- /package/src/emit/{system → application/system}/templates/WebSocketConnect_Yaml.ejs +0 -0
- /package/src/emit/{function → infrastructure/functions}/functionYamlArtifact.js +0 -0
- /package/src/emit/{function → infrastructure/functions}/templates/ApiFunction_Yaml.ejs +0 -0
- /package/src/emit/{function → infrastructure/functions}/templates/EventBridgeFunction_Yaml.ejs +0 -0
- /package/src/emit/{function → infrastructure/functions}/templates/InvFunction_Yaml.ejs +0 -0
- /package/src/emit/{function → infrastructure/functions}/templates/S3Function_Yaml.ejs +0 -0
- /package/src/emit/{function → infrastructure/functions}/templates/SqsFunction_Yaml.ejs +0 -0
- /package/src/emit/{function → infrastructure/functions}/templates/WbsFunction_Yaml.ejs +0 -0
- /package/src/emit/{resource → infrastructure/resources}/dynamoResourceArtifacts.js +0 -0
- /package/src/emit/{resource → infrastructure/resources}/emitResourceArtifacts.js +0 -0
- /package/src/emit/{resource → infrastructure/resources}/resourceTemplate.js +0 -0
- /package/src/emit/{resource → infrastructure/resources}/s3ResourceArtifacts.js +0 -0
- /package/src/emit/{resource → infrastructure/resources}/sqsResourceArtifacts.js +0 -0
- /package/src/emit/{resource → infrastructure/resources}/templates/DynamoDBTable_Yaml.ejs +0 -0
- /package/src/emit/{resource → infrastructure/resources}/templates/FlowOut_Yaml.ejs +0 -0
- /package/src/emit/{resource → infrastructure/resources}/templates/GeneratedLambdaRoleServiceConfig.ejs +0 -0
- /package/src/emit/{resource → infrastructure/resources}/templates/ResourceSqsYaml.ejs +0 -0
- /package/src/emit/{resource → infrastructure/resources}/templates/ResourceYaml.ejs +0 -0
- /package/src/emit/{resource → infrastructure/resources}/templates/S3Bucket_Yaml.ejs +0 -0
- /package/src/emit/{resource → infrastructure/resources}/templates/S3Subscription_Yaml.ejs +0 -0
- /package/src/emit/{resource → infrastructure/resources}/templates/SharedResource_Yaml.ejs +0 -0
- /package/src/emit/{resource → infrastructure/resources}/templates/SystemDynamoDB_Yaml.ejs +0 -0
- /package/src/emit/{resource → infrastructure/resources}/templates/WebSocketSubscription_Yaml.ejs +0 -0
- /package/src/emit/{error → schemas/error}/emitErrorSchemas.js +0 -0
- /package/src/emit/{error → schemas/error}/templates/errorSchema.ejs +0 -0
- /package/src/emit/{systemText → schemas/systemText}/templates/SystemTextSchemas.ejs +0 -0
- /package/src/{generateResources/IntTest → intTest/generators}/consts.js +0 -0
- /package/src/{generateResources/IntTest → intTest/generators}/generateResources/generateResources.js +0 -0
- /package/src/{generateResources/IntTest → intTest/generators}/generateResources/templateResources.ejs +0 -0
- /package/src/{generateResources/IntTest → intTest/generators}/generateTests/events/events.js +0 -0
- /package/src/{generateResources/IntTest → intTest/generators}/generateTests/events/templateEvents.ejs +0 -0
- /package/src/{generateResources/IntTest → intTest/generators}/generateTests/generateTemplate.js +0 -0
- /package/src/{generateResources/IntTest → intTest/generators}/generateTests/pathIntTest/pathIntTest.js +0 -0
- /package/src/{generateResources/IntTest → intTest/generators}/generateTests/pathIntTest/template.ejs +0 -0
- /package/src/{generateResources/IntTest → intTest/generators}/generateTests/tests/templateTests.ejs +0 -0
- /package/src/{generateResources/IntTest → intTest/generators}/generateTests/tests/tests.js +0 -0
- /package/src/{generateResources/IntTest → intTest/generators}/libs/IntTestGenerateLib.js +0 -0
- /package/src/{generateResources/IntTest → intTest/generators}/upload/uploadIntTest.js +0 -0
- /package/src/{intTestGeneratorShared.js → intTest/intTestGeneratorShared.js} +0 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { basicValidatorSchema } from '@izara_project/izara-shared-service-schemas';
|
|
2
|
+
|
|
3
|
+
export const VALID_INITIATE_BY_ENUM = ['user', 'systemWithUser', 'systemNoUser'];
|
|
4
|
+
export const VALID_EVENT_ENUM = [
|
|
5
|
+
'ownTopic',
|
|
6
|
+
'extTopic',
|
|
7
|
+
's3',
|
|
8
|
+
'eventBridge',
|
|
9
|
+
'lambdaSyncInv',
|
|
10
|
+
'lambdaSyncApi',
|
|
11
|
+
'dsq',
|
|
12
|
+
'generateCode'
|
|
13
|
+
];
|
|
14
|
+
export const VALID_CODE_HOOK_TAG_ENUM = ['before', 'after'];
|
|
15
|
+
export const VALID_GENERATE_CODE_TAG_ENUM = ['create', 'update', 'delete'];
|
|
16
|
+
export const VALID_INVOCATION_TYPE_ENUM = ['ownTopic', 'lambdaSyncInv'];
|
|
17
|
+
export const VALID_GENERATED_BY_ENUM = [
|
|
18
|
+
'user',
|
|
19
|
+
'systemWithUser',
|
|
20
|
+
'systemNoUser',
|
|
21
|
+
'searchResultGenerated'
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
let isConfigured = false;
|
|
25
|
+
|
|
26
|
+
export function setupBasicValidatorSchema(targetSchema = basicValidatorSchema) {
|
|
27
|
+
if (!targetSchema) {
|
|
28
|
+
return targetSchema;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (targetSchema.basicFlowSchema?.properties?.initiateBy) {
|
|
32
|
+
targetSchema.basicFlowSchema.properties.initiateBy.enum =
|
|
33
|
+
VALID_INITIATE_BY_ENUM;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (targetSchema.basicFlowSchema?.properties?.event?.items) {
|
|
37
|
+
targetSchema.basicFlowSchema.properties.event.items.enum =
|
|
38
|
+
VALID_EVENT_ENUM;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (
|
|
42
|
+
targetSchema.basicFlowSchema?.properties?.generatedCodeConfig
|
|
43
|
+
?.properties?.codeHookTag
|
|
44
|
+
) {
|
|
45
|
+
targetSchema.basicFlowSchema.properties.generatedCodeConfig.properties.codeHookTag.enum =
|
|
46
|
+
VALID_CODE_HOOK_TAG_ENUM;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (
|
|
50
|
+
targetSchema.basicFlowSchema?.properties?.generatedCodeConfig
|
|
51
|
+
?.properties?.invocationType
|
|
52
|
+
) {
|
|
53
|
+
targetSchema.basicFlowSchema.properties.generatedCodeConfig.properties.invocationType.enum =
|
|
54
|
+
VALID_INVOCATION_TYPE_ENUM;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (
|
|
58
|
+
targetSchema.basicFlowSchema?.properties?.generatedCodeConfig
|
|
59
|
+
?.properties?.generateCodeTag
|
|
60
|
+
) {
|
|
61
|
+
targetSchema.basicFlowSchema.properties.generatedCodeConfig.properties.generateCodeTag =
|
|
62
|
+
{
|
|
63
|
+
anyOf: [
|
|
64
|
+
{
|
|
65
|
+
type: 'array',
|
|
66
|
+
items: {
|
|
67
|
+
type: 'string',
|
|
68
|
+
enum: VALID_GENERATE_CODE_TAG_ENUM
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
type: 'string',
|
|
73
|
+
enum: VALID_GENERATE_CODE_TAG_ENUM
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (
|
|
80
|
+
targetSchema.basicFlowSchema?.properties?.generatedCodeConfig
|
|
81
|
+
?.properties
|
|
82
|
+
) {
|
|
83
|
+
targetSchema.basicFlowSchema.properties.generatedCodeConfig.properties.objType =
|
|
84
|
+
{
|
|
85
|
+
anyOf: [
|
|
86
|
+
{ type: 'string' },
|
|
87
|
+
{
|
|
88
|
+
type: 'array',
|
|
89
|
+
items: { type: 'string' }
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
type: 'object',
|
|
93
|
+
properties: {
|
|
94
|
+
objectType: { type: 'string' },
|
|
95
|
+
serviceTag: { type: 'string' }
|
|
96
|
+
},
|
|
97
|
+
required: ['objectType']
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (targetSchema.basicObjectSchema?.properties?.generatedBy) {
|
|
104
|
+
targetSchema.basicObjectSchema.properties.generatedBy.enum =
|
|
105
|
+
VALID_GENERATED_BY_ENUM;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (targetSchema.basicExtendObjectSchema?.properties?.generatedBy) {
|
|
109
|
+
targetSchema.basicExtendObjectSchema.properties.generatedBy.enum =
|
|
110
|
+
VALID_GENERATED_BY_ENUM;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const objectSchemasToPatch = [
|
|
114
|
+
targetSchema.basicObjectSchema,
|
|
115
|
+
targetSchema.basicExtendObjectSchema
|
|
116
|
+
];
|
|
117
|
+
|
|
118
|
+
for (const objSchema of objectSchemasToPatch) {
|
|
119
|
+
const addOnItems = objSchema?.properties?.addOnDataStructure?.items?.anyOf;
|
|
120
|
+
if (Array.isArray(addOnItems)) {
|
|
121
|
+
for (const item of addOnItems) {
|
|
122
|
+
if (item?.properties?.type?.enum?.includes('rbac')) {
|
|
123
|
+
if (item.properties.billalble) {
|
|
124
|
+
delete item.properties.billalble;
|
|
125
|
+
}
|
|
126
|
+
item.properties.billable = { type: 'boolean' };
|
|
127
|
+
if (Array.isArray(item.required)) {
|
|
128
|
+
item.required = item.required.filter((r) => r !== 'billalble');
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
isConfigured = true;
|
|
136
|
+
return targetSchema;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function ensureBasicValidatorConfigured() {
|
|
140
|
+
if (!isConfigured) {
|
|
141
|
+
setupBasicValidatorSchema(basicValidatorSchema);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
renderInvFunctionYaml,
|
|
7
7
|
renderSqsFunctionYaml,
|
|
8
8
|
renderWbsFunctionYaml
|
|
9
|
-
} from '
|
|
9
|
+
} from '../../infrastructure/functions/functionYamlArtifact.js';
|
|
10
10
|
|
|
11
11
|
import {
|
|
12
12
|
CRUD_ACTIONS,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
const ACTIONS = CRUD_ACTIONS;
|
|
19
19
|
const YAML_PATH = 'app/sls_yaml/generatedCode/source/flow-objects.yml';
|
|
20
20
|
const TEMPLATE_URL = new URL('./templates/', import.meta.url);
|
|
21
|
-
const SHARED_TEMPLATE_URL = new URL('
|
|
21
|
+
const SHARED_TEMPLATE_URL = new URL('../../shared/templates/', import.meta.url);
|
|
22
22
|
|
|
23
23
|
export async function emitCrudApplicationArtifacts({
|
|
24
24
|
objects,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { loadLocalSchemaArrays } from '
|
|
2
|
-
import { runSubsystemGeneration } from '
|
|
1
|
+
import { loadLocalSchemaArrays } from '../../../compile/loadSchemas.js';
|
|
2
|
+
import { runSubsystemGeneration } from '../../shared/runSubsystemGeneration.js';
|
|
3
3
|
import {
|
|
4
4
|
crudApplicationManagedPaths,
|
|
5
5
|
emitCrudApplicationArtifacts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { loadLocalSchemaArrays } from '
|
|
2
|
-
import { runSubsystemGeneration } from '
|
|
1
|
+
import { loadLocalSchemaArrays } from '../../../compile/loadSchemas.js';
|
|
2
|
+
import { runSubsystemGeneration } from '../../shared/runSubsystemGeneration.js';
|
|
3
3
|
import {
|
|
4
4
|
dynamicCrudFlowSchemaPaths,
|
|
5
5
|
emitDynamicCrudFlowSchemas
|
|
@@ -26,7 +26,7 @@ import callingFlowSharedLib from '@izara_project/izara-core-library-calling-flow
|
|
|
26
26
|
import { objectHash as hash } from '@izara_project/izara-shared-core';
|
|
27
27
|
import {
|
|
28
28
|
utils,
|
|
29
|
-
|
|
29
|
+
getFlowSchema
|
|
30
30
|
} from '@izara_project/izara-core-library-service-schemas';
|
|
31
31
|
const { createFlowTypeConcat } = utils;
|
|
32
32
|
|
|
@@ -70,7 +70,7 @@ export const main = middleware.wrap(async (event, context) => {
|
|
|
70
70
|
let identifiers = '';
|
|
71
71
|
//(</createIdentifiersFlow>)
|
|
72
72
|
|
|
73
|
-
let flowSchema = await
|
|
73
|
+
let flowSchema = await getFlowSchema.getFlowSchemaS3WithCache(
|
|
74
74
|
event._izContext,
|
|
75
75
|
{
|
|
76
76
|
flowTag: '<%- flowTag %>',
|
|
@@ -16,7 +16,7 @@ along with this program. If not, see
|
|
|
16
16
|
<http: //www.gnu.org/licenses />.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import {
|
|
19
|
+
import { getFlowSchema } from '@izara_project/izara-core-library-service-schemas';
|
|
20
20
|
import snsSharedLib from '@izara_project/izara-core-library-sns';
|
|
21
21
|
import callingFlowSharedLib from '@izara_project/izara-core-library-calling-flow';
|
|
22
22
|
import lambdaSharedLib from '@izara_project/izara-core-library-lambda';
|
|
@@ -53,7 +53,7 @@ export default async function <%- typeof functionName !== 'undefined' ? function
|
|
|
53
53
|
callingFlowConfig
|
|
54
54
|
);
|
|
55
55
|
|
|
56
|
-
const flowSchema = await
|
|
56
|
+
const flowSchema = await getFlowSchema.getFlowSchemaS3WithCache(
|
|
57
57
|
_izContext,
|
|
58
58
|
{
|
|
59
59
|
flowTag: '<%- flowTag %>',
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
renderS3FunctionYaml,
|
|
6
6
|
renderSqsFunctionYaml,
|
|
7
7
|
renderWbsFunctionYaml
|
|
8
|
-
} from '
|
|
8
|
+
} from '../../infrastructure/functions/functionYamlArtifact.js';
|
|
9
9
|
|
|
10
10
|
export async function emitS3Flow(flow, source, handlerRoot) {
|
|
11
11
|
const tag = upperFirst(flow.flowTag);
|
|
@@ -8,7 +8,7 @@ import { customFlowRoleName, upperFirst, flowHasRbac } from './customFlows.js';
|
|
|
8
8
|
import {
|
|
9
9
|
renderSqsFunctionYaml,
|
|
10
10
|
renderWbsFunctionYaml
|
|
11
|
-
} from '
|
|
11
|
+
} from '../../infrastructure/functions/functionYamlArtifact.js';
|
|
12
12
|
|
|
13
13
|
export async function emitExtTopicStep({ flow, step, flowTag, stepName }) {
|
|
14
14
|
const source = `app/src/generatedCode/FlowSchemas/${flowTag}/source`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import ejsLib from 'ejs';
|
|
2
2
|
import { readFile } from 'node:fs/promises';
|
|
3
3
|
|
|
4
|
-
const SHARED_TEMPLATE_URL = new URL('
|
|
4
|
+
const SHARED_TEMPLATE_URL = new URL('../../shared/templates/', import.meta.url);
|
|
5
5
|
const CRUD_TEMPLATE_URL = new URL('../crud/templates/', import.meta.url);
|
|
6
6
|
const CUSTOM_TEMPLATE_URL = new URL('./templates/', import.meta.url);
|
|
7
7
|
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
renderEventBridgeFunctionYaml,
|
|
30
30
|
renderInvFunctionYaml,
|
|
31
31
|
renderSqsFunctionYaml
|
|
32
|
-
} from '
|
|
32
|
+
} from '../../infrastructure/functions/functionYamlArtifact.js';
|
|
33
33
|
|
|
34
34
|
export { customFlowApplicationManagedPaths };
|
|
35
35
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { loadLocalSchemaDirectory } from '
|
|
2
|
-
import { runSubsystemGeneration } from '
|
|
1
|
+
import { loadLocalSchemaDirectory } from '../../../compile/loadSchemas.js';
|
|
2
|
+
import { runSubsystemGeneration } from '../../shared/runSubsystemGeneration.js';
|
|
3
3
|
import {
|
|
4
4
|
customFlowApplicationManagedPaths,
|
|
5
5
|
emitCustomFlowApplicationArtifacts
|
|
@@ -16,7 +16,10 @@ along with this program. If not, see
|
|
|
16
16
|
<http: //www.gnu.org/licenses />.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import {
|
|
19
|
+
import {
|
|
20
|
+
getObjectSchema,
|
|
21
|
+
getFlowSchema
|
|
22
|
+
} from '@izara_project/izara-core-library-service-schemas';
|
|
20
23
|
import { consts } from '@izara_project/izara-middleware';
|
|
21
24
|
|
|
22
25
|
import dynamodbSharedLib from '@izara_project/izara-core-library-dynamodb';
|
|
@@ -65,7 +68,7 @@ export default async function createObject(
|
|
|
65
68
|
|
|
66
69
|
let connectionId = _izContext.correlationIds.get(consts.CONNECTION_ID);
|
|
67
70
|
|
|
68
|
-
let flowSchema = await
|
|
71
|
+
let flowSchema = await getFlowSchema.getFlowSchemaS3WithCache(
|
|
69
72
|
_izContext,
|
|
70
73
|
{
|
|
71
74
|
flowTag: '<%- flowTag %>',
|
package/src/emit/{custom → application/custom}/templates/triggerCache/CheckTriggerCache_Main.ejs
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getFlowSchema } from '@izara_project/izara-core-library-service-schemas';
|
|
2
2
|
import { triggeredCacheSharedLibV2 } from '@izara_project/izara-core-library-trigger-cache';
|
|
3
3
|
|
|
4
4
|
//(<optionalRequire>)
|
|
@@ -19,7 +19,7 @@ export default async function <%- functionName %>(
|
|
|
19
19
|
);
|
|
20
20
|
|
|
21
21
|
const topicName = topicArn.split(':')[5].split('_');
|
|
22
|
-
const flowSchema = await
|
|
22
|
+
const flowSchema = await getFlowSchema.getFlowSchemaS3WithCache(
|
|
23
23
|
_izContext,
|
|
24
24
|
{
|
|
25
25
|
flowTag: topicName[2],
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
renderInvFunctionYaml,
|
|
7
7
|
renderSqsFunctionYaml,
|
|
8
8
|
renderWbsFunctionYaml
|
|
9
|
-
} from '
|
|
9
|
+
} from '../../infrastructure/functions/functionYamlArtifact.js';
|
|
10
10
|
import { rbacFlowTag } from './rbacFlowTag.js';
|
|
11
11
|
|
|
12
12
|
const FLOW_RBAC_YAML_PATH = 'app/sls_yaml/generatedCode/source/flow-rbac.yml';
|
|
13
13
|
const FLOW_LIMITS_YAML_PATH = 'app/sls_yaml/generatedCode/source/flow-limits.yml';
|
|
14
14
|
const CRUD_TEMPLATE_URL = new URL('../crud/templates/', import.meta.url);
|
|
15
15
|
const RBAC_TEMPLATE_URL = new URL('./templates/', import.meta.url);
|
|
16
|
-
const SHARED_TEMPLATE_URL = new URL('
|
|
16
|
+
const SHARED_TEMPLATE_URL = new URL('../../shared/templates/', import.meta.url);
|
|
17
17
|
|
|
18
18
|
export async function emitRbacApplicationArtifacts(objects) {
|
|
19
19
|
if (!Array.isArray(objects)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { loadLocalSchemaDirectory } from '
|
|
2
|
-
import { runSubsystemGeneration } from '
|
|
1
|
+
import { loadLocalSchemaDirectory } from '../../../compile/loadSchemas.js';
|
|
2
|
+
import { runSubsystemGeneration } from '../../shared/runSubsystemGeneration.js';
|
|
3
3
|
import {
|
|
4
4
|
emitRbacApplicationArtifacts,
|
|
5
5
|
rbacApplicationManagedPaths
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { loadLocalSchemaDirectory } from '
|
|
2
|
-
import { runSubsystemGeneration } from '
|
|
1
|
+
import { loadLocalSchemaDirectory } from '../../../compile/loadSchemas.js';
|
|
2
|
+
import { runSubsystemGeneration } from '../../shared/runSubsystemGeneration.js';
|
|
3
3
|
import {
|
|
4
4
|
emitDynamicRbacFlowSchemas,
|
|
5
5
|
rbacFlowSchemaManagedPaths
|
package/src/emit/{relationship → application/relationship}/emitRelationshipApplicationArtifacts.js
RENAMED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
renderInvFunctionYaml,
|
|
7
7
|
renderSqsFunctionYaml,
|
|
8
8
|
renderWbsFunctionYaml
|
|
9
|
-
} from '
|
|
9
|
+
} from '../../infrastructure/functions/functionYamlArtifact.js';
|
|
10
10
|
|
|
11
11
|
const ACTIONS = [
|
|
12
12
|
'CreateRelationship',
|
|
@@ -18,7 +18,7 @@ const ACTIONS = [
|
|
|
18
18
|
];
|
|
19
19
|
const YAML_PATH = 'app/sls_yaml/generatedCode/source/flow-relationships.yml';
|
|
20
20
|
const TEMPLATE_URL = new URL('./templates/', import.meta.url);
|
|
21
|
-
const SHARED_TEMPLATE_URL = new URL('
|
|
21
|
+
const SHARED_TEMPLATE_URL = new URL('../../shared/templates/', import.meta.url);
|
|
22
22
|
const CRUD_TEMPLATE_URL = new URL('../crud/templates/', import.meta.url);
|
|
23
23
|
|
|
24
24
|
export async function emitRelationshipApplicationArtifacts({
|
|
@@ -278,7 +278,7 @@ async function render(templateName, data) {
|
|
|
278
278
|
|
|
279
279
|
async function renderShared(templateName, data) {
|
|
280
280
|
const template = await readFile(
|
|
281
|
-
new URL(
|
|
281
|
+
new URL(`../../shared/templates/${templateName}`, import.meta.url),
|
|
282
282
|
'utf8'
|
|
283
283
|
);
|
|
284
284
|
return ejsLib.render(template, data);
|
package/src/emit/{relationship → application/relationship}/generateDynamicRelationshipFlowSchemas.js
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { loadLocalSchemaDirectory } from '
|
|
2
|
-
import { runSubsystemGeneration } from '
|
|
1
|
+
import { loadLocalSchemaDirectory } from '../../../compile/loadSchemas.js';
|
|
2
|
+
import { runSubsystemGeneration } from '../../shared/runSubsystemGeneration.js';
|
|
3
3
|
import {
|
|
4
4
|
dynamicRelationshipFlowSchemaManagedPaths,
|
|
5
5
|
emitDynamicRelationshipFlowSchemas
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { loadLocalSchemaDirectory } from '
|
|
2
|
-
import { runSubsystemGeneration } from '
|
|
1
|
+
import { loadLocalSchemaDirectory } from '../../../compile/loadSchemas.js';
|
|
2
|
+
import { runSubsystemGeneration } from '../../shared/runSubsystemGeneration.js';
|
|
3
3
|
import {
|
|
4
4
|
emitRelationshipApplicationArtifacts,
|
|
5
5
|
relationshipApplicationManagedPaths
|
package/src/emit/{relationship → application/relationship}/templates/ChangeRelationship_Main.ejs
RENAMED
|
@@ -29,14 +29,15 @@ import { sns } from '@izara_project/izara-core-library-external-request';
|
|
|
29
29
|
|
|
30
30
|
import {
|
|
31
31
|
getObjectSchema,
|
|
32
|
+
getRelSchema,
|
|
32
33
|
utils,
|
|
33
34
|
serviceConfig,
|
|
34
35
|
consts,
|
|
35
36
|
relSchemaLib
|
|
36
37
|
} from '@izara_project/izara-core-library-service-schemas';
|
|
37
38
|
|
|
38
|
-
const { getRelationshipSchemaWithCache
|
|
39
|
-
|
|
39
|
+
const { getRelationshipSchemaWithCache } = getRelSchema;
|
|
40
|
+
const { getObjSchemaS3WithHierarchy } = getObjectSchema;
|
|
40
41
|
|
|
41
42
|
const { createLinkTypeId } = utils;
|
|
42
43
|
|
package/src/emit/{relationship → application/relationship}/templates/CreateRelationship_Main.ejs
RENAMED
|
@@ -29,6 +29,7 @@ import dynamodbSharedLib from '@izara_project/izara-core-library-dynamodb';
|
|
|
29
29
|
import { sns } from '@izara_project/izara-core-library-external-request';
|
|
30
30
|
import {
|
|
31
31
|
getObjectSchema,
|
|
32
|
+
getRelSchema,
|
|
32
33
|
utils,
|
|
33
34
|
serviceConfig,
|
|
34
35
|
consts,
|
|
@@ -36,8 +37,8 @@ import {
|
|
|
36
37
|
identifiersObject
|
|
37
38
|
} from '@izara_project/izara-core-library-service-schemas';
|
|
38
39
|
const { findLinksByObjTypes } = relSchemaLib;
|
|
39
|
-
const { getRelationshipSchemaWithCache
|
|
40
|
-
|
|
40
|
+
const { getRelationshipSchemaWithCache } = getRelSchema;
|
|
41
|
+
const { getObjSchemaS3WithHierarchy } = getObjectSchema;
|
|
41
42
|
|
|
42
43
|
const { createLinkTypeId } = utils;
|
|
43
44
|
|
package/src/emit/{relationship → application/relationship}/templates/DeleteRelationship_Main.ejs
RENAMED
|
@@ -29,14 +29,15 @@ import dynamodbSharedLib from '@izara_project/izara-core-library-dynamodb';
|
|
|
29
29
|
import { sns } from '@izara_project/izara-core-library-external-request';
|
|
30
30
|
import {
|
|
31
31
|
getObjectSchema,
|
|
32
|
+
getRelSchema,
|
|
32
33
|
utils,
|
|
33
34
|
serviceConfig,
|
|
34
35
|
consts,
|
|
35
36
|
identifiersObject
|
|
36
37
|
} from '@izara_project/izara-core-library-service-schemas';
|
|
37
38
|
|
|
38
|
-
const { getRelationshipSchemaWithCache
|
|
39
|
-
|
|
39
|
+
const { getRelationshipSchemaWithCache } = getRelSchema;
|
|
40
|
+
const { getObjSchemaS3WithHierarchy } = getObjectSchema;
|
|
40
41
|
|
|
41
42
|
const { createLinkTypeId } = utils;
|
|
42
43
|
|
package/src/emit/{relationship → application/relationship}/templates/GetRelationship_Main.ejs
RENAMED
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
} from '@izara_project/izara-core-library-external-request';
|
|
28
28
|
import {
|
|
29
29
|
getObjectSchema,
|
|
30
|
+
getRelSchema,
|
|
30
31
|
utils,
|
|
31
32
|
serviceConfig,
|
|
32
33
|
consts,
|
|
@@ -36,8 +37,8 @@ import {
|
|
|
36
37
|
import { consts as coreConsts } from '@izara_project/izara-core-library-core';
|
|
37
38
|
|
|
38
39
|
const { findLinksByObjTypes } = relSchemaLib;
|
|
39
|
-
const { getRelationshipSchemaWithCache
|
|
40
|
-
|
|
40
|
+
const { getRelationshipSchemaWithCache } = getRelSchema;
|
|
41
|
+
const { getObjSchemaS3WithHierarchy } = getObjectSchema;
|
|
41
42
|
const { createLinkTypeId } = utils;
|
|
42
43
|
const { getGraphServiceTagWithCache } = serviceConfig;
|
|
43
44
|
const { PREFIX, TOPIC_NAME_GENERATE_CODE, TOPIC_NAME_GRAPH_HANDLER } = consts;
|
package/src/emit/{relationship → application/relationship}/templates/MoveRelationship_Main.ejs
RENAMED
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
|
|
34
34
|
import {
|
|
35
35
|
getObjectSchema,
|
|
36
|
+
getRelSchema,
|
|
36
37
|
utils,
|
|
37
38
|
serviceConfig,
|
|
38
39
|
consts,
|
|
@@ -41,8 +42,8 @@ import {
|
|
|
41
42
|
} from '@izara_project/izara-core-library-service-schemas';
|
|
42
43
|
const { findLinksByObjTypes } = relSchemaLib;
|
|
43
44
|
|
|
44
|
-
const { getRelationshipSchemaWithCache
|
|
45
|
-
|
|
45
|
+
const { getRelationshipSchemaWithCache } = getRelSchema;
|
|
46
|
+
const { getObjSchemaS3WithHierarchy } = getObjectSchema;
|
|
46
47
|
|
|
47
48
|
const { createLinkTypeId } = utils;
|
|
48
49
|
|
package/src/emit/{relationship → application/relationship}/templates/UpdateRelationship_Main.ejs
RENAMED
|
@@ -30,14 +30,15 @@ import { sns } from '@izara_project/izara-core-library-external-request';
|
|
|
30
30
|
|
|
31
31
|
import {
|
|
32
32
|
getObjectSchema,
|
|
33
|
+
getRelSchema,
|
|
33
34
|
utils,
|
|
34
35
|
serviceConfig,
|
|
35
36
|
consts,
|
|
36
37
|
identifiersObject
|
|
37
38
|
} from '@izara_project/izara-core-library-service-schemas';
|
|
38
39
|
|
|
39
|
-
const { getRelationshipSchemaWithCache
|
|
40
|
-
|
|
40
|
+
const { getRelationshipSchemaWithCache } = getRelSchema;
|
|
41
|
+
const { getObjSchemaS3WithHierarchy } = getObjectSchema;
|
|
41
42
|
|
|
42
43
|
const { createLinkTypeId } = utils;
|
|
43
44
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import ejsLib from 'ejs';
|
|
2
2
|
import { readFile } from 'node:fs/promises';
|
|
3
3
|
|
|
4
|
-
const SHARED_TEMPLATE_URL = new URL('
|
|
4
|
+
const SHARED_TEMPLATE_URL = new URL('../../shared/templates/', import.meta.url);
|
|
5
5
|
const FIND_DATA_SOURCE = 'app/src/generatedCode/FindData/source';
|
|
6
6
|
const FIND_DATA_HANDLER_ROOT = 'src/generatedCode/FindData/source';
|
|
7
7
|
const PROCESS_LOGICAL_SOURCE = 'app/src/generatedCode/ProcessLogical/source';
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { NoRetryError } from '@izara_project/izara-core-library-core';
|
|
2
2
|
import { objectHash as hash } from '@izara_project/izara-shared-core';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
getObjectSchema,
|
|
5
|
+
getFlowSchema,
|
|
6
|
+
identifiersObject
|
|
7
|
+
} from '@izara_project/izara-core-library-service-schemas';
|
|
4
8
|
import dynamodbSharedLib from '@izara_project/izara-core-library-dynamodb';
|
|
5
9
|
import lambdaSharedLib from '@izara_project/izara-core-library-lambda';
|
|
6
10
|
import { lambda, webSocket } from '@izara_project/izara-core-library-external-request';
|
|
@@ -29,7 +33,7 @@ export default async function registerCompleteMain(
|
|
|
29
33
|
}
|
|
30
34
|
|
|
31
35
|
let topicName = topicArn.split(':')[5].split('_');
|
|
32
|
-
let flowSchema = await
|
|
36
|
+
let flowSchema = await getFlowSchema.getFlowSchemaS3WithCache(_izContext, {
|
|
33
37
|
flowTag: topicName[2],
|
|
34
38
|
serviceTag: topicName[0]
|
|
35
39
|
});
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { objectHash as hash } from '@izara_project/izara-shared-core';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
getObjectSchema,
|
|
4
|
+
getFlowSchema,
|
|
5
|
+
identifiersObject
|
|
6
|
+
} from '@izara_project/izara-core-library-service-schemas';
|
|
3
7
|
import dynamodbSharedLib from '@izara_project/izara-core-library-dynamodb';
|
|
4
8
|
import lambdaSharedLib from '@izara_project/izara-core-library-lambda';
|
|
5
9
|
import { lambda, webSocket } from '@izara_project/izara-core-library-external-request';
|
|
@@ -20,7 +24,7 @@ export default async function registerMain(
|
|
|
20
24
|
) {
|
|
21
25
|
try {
|
|
22
26
|
let connectionId = _izContext.correlationIds.get(consts.CONNECTION_ID);
|
|
23
|
-
let flowSchema = await
|
|
27
|
+
let flowSchema = await getFlowSchema.getFlowSchemaS3WithCache(_izContext, {
|
|
24
28
|
flowTag: requestParams.flowTag,
|
|
25
29
|
serviceTag: process.env.iz_serviceTag
|
|
26
30
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NoRetryError } from '@izara_project/izara-core-library-core';
|
|
2
2
|
import { consts } from '@izara_project/izara-middleware';
|
|
3
3
|
import {
|
|
4
|
-
|
|
4
|
+
getFlowSchema,
|
|
5
5
|
utils
|
|
6
6
|
} from '@izara_project/izara-core-library-service-schemas';
|
|
7
7
|
import dynamodbSharedLib from '@izara_project/izara-core-library-dynamodb';
|
|
@@ -30,7 +30,7 @@ export default async function WebSocketComplete(
|
|
|
30
30
|
throw new NoRetryError('not have TopicArn for get FlowSchemas');
|
|
31
31
|
const topicName = topicArn.split(':')[5].split('_');
|
|
32
32
|
let flowTag = topicName[2];
|
|
33
|
-
let flowSchema = await
|
|
33
|
+
let flowSchema = await getFlowSchema.getFlowSchemaS3WithCache(
|
|
34
34
|
_izContext,
|
|
35
35
|
{ flowTag, serviceTag: topicName[0] }
|
|
36
36
|
);
|
|
@@ -40,7 +40,7 @@ export default async function WebSocketComplete(
|
|
|
40
40
|
'Could not find flowSchema from topicArn or requestParams.flowTag'
|
|
41
41
|
);
|
|
42
42
|
flowTag = requestParams.flowTag;
|
|
43
|
-
flowSchema = await
|
|
43
|
+
flowSchema = await getFlowSchema.getFlowSchemaS3WithCache(_izContext, {
|
|
44
44
|
flowTag,
|
|
45
45
|
serviceTag: process.env.iz_serviceTag
|
|
46
46
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { loadLocalSchemaDirectory } from '
|
|
2
|
-
import { runSubsystemGeneration } from '
|
|
1
|
+
import { loadLocalSchemaDirectory } from '../../../compile/loadSchemas.js';
|
|
2
|
+
import { runSubsystemGeneration } from '../../shared/runSubsystemGeneration.js';
|
|
3
3
|
import {
|
|
4
4
|
emitResourceArtifacts,
|
|
5
5
|
resourceArtifactPaths
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { renderResourceTemplate } from './resourceTemplate.js';
|
|
2
|
-
import { CRUD_ACTIONS } from '
|
|
2
|
+
import { CRUD_ACTIONS } from '../../application/crud/crudActionPlan.js';
|
|
3
3
|
import {
|
|
4
4
|
customFlowRoleName,
|
|
5
5
|
flowDsqSteps,
|
|
6
6
|
flowExtTopicSteps
|
|
7
|
-
} from '
|
|
7
|
+
} from '../../application/custom/customFlows.js';
|
|
8
8
|
import {
|
|
9
9
|
RELATIONSHIP_ACTIONS,
|
|
10
10
|
RBAC_ACTIONS,
|
|
@@ -369,7 +369,7 @@ export function roleDlqQueueNames(state, roleName) {
|
|
|
369
369
|
export function roleTopicNames(state, roleName) {
|
|
370
370
|
if (roleName === 'ProcFindDataRole') {
|
|
371
371
|
return state.outTopics
|
|
372
|
-
.filter((topic) => topic === 'FindData')
|
|
372
|
+
.filter((topic) => topic === 'FindData' || topic === 'ProcessLogical')
|
|
373
373
|
.map((t) => `${t}_Out`);
|
|
374
374
|
}
|
|
375
375
|
if (roleName === 'FlowObjectsRole') {
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
generatedDsqFlows,
|
|
6
6
|
generatedOwnTopicFlows,
|
|
7
7
|
supportedCustomFlows
|
|
8
|
-
} from '
|
|
9
|
-
import { hasSystemWebSocket } from '
|
|
10
|
-
import { rbacFlowTag } from '
|
|
11
|
-
import { CRUD_ACTIONS, createCrudActionPlans } from '
|
|
8
|
+
} from '../../application/custom/customFlows.js';
|
|
9
|
+
import { hasSystemWebSocket } from '../../application/system/emitSystemWebSocketArtifacts.js';
|
|
10
|
+
import { rbacFlowTag } from '../../application/rbac/rbacFlowTag.js';
|
|
11
|
+
import { CRUD_ACTIONS, createCrudActionPlans } from '../../application/crud/crudActionPlan.js';
|
|
12
12
|
|
|
13
13
|
export const RELATIONSHIP_ACTIONS = [
|
|
14
14
|
'CreateRelationship',
|