@izara_project/izara-core-generate-service-code 1.0.95 → 1.0.97
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 +17 -318
- 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/{custom → application/custom}/customFlowS3.js +1 -1
- package/src/emit/{custom → application/custom}/customFlowSteps.js +34 -5
- 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/FlowEndpoint_Main.ejs +66 -4
- package/src/emit/{custom → application/custom}/templates/FlowStep_Main.ejs +27 -0
- 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/{system → application/system}/emitSystemFindDataArtifacts.js +1 -1
- package/src/emit/{resource → infrastructure/resources}/generateResourceArtifacts.js +2 -2
- package/src/emit/{resource → infrastructure/resources}/iamResourceArtifacts.js +2 -2
- package/src/emit/{resource → infrastructure/resources}/resourceState.js +4 -4
- package/src/emit/{attributeTree → schemas/attributeTree}/emitAttributeTreeSchemas.js +29 -48
- package/src/emit/schemas/attributeTree/emitAttributeTreeTargetSchemas.js +153 -0
- package/src/emit/schemas/attributeTree/resolveTargetServicePath.js +111 -0
- package/src/emit/schemas/ledger/emitLedgerSchemas.js +370 -0
- package/src/emit/{systemText → schemas/systemText}/emitSystemTextSchemas.js +1 -1
- package/src/generate.js +81 -240
- package/src/{generateIntTest.js → intTest/generateIntTest.js} +2 -2
- package/src/{generateResourceIntTest.js → intTest/generateResourceIntTest.js} +2 -2
- package/src/plan/domainRegistry.js +271 -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} +1 -1
- 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} +139 -9
- package/test/{relationshipApplicationArtifacts.test.js → unit/application/relationshipApplicationArtifacts.test.js} +1 -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} +1 -1
- package/test/{attributeTreeSchemas.test.js → unit/schemas/attributeTreeSchemas.test.js} +127 -50
- 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 +263 -0
- package/test/{systemTextSchemas.test.js → unit/schemas/systemTextSchemas.test.js} +24 -36
- 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/FlowEndpoint_HdrWbs.ejs +0 -0
- /package/src/emit/{crud → application/crud}/templates/FlowMain_Wbs.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/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/CreateObject_Main.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/CheckTriggerCache_Main.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/ChangeRelationship_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/CreateRelationship_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/DeleteRelationship_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/GetRelationship_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/MoveRelationship_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/{relationship → application/relationship}/templates/UpdateRelationship_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_Main.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/Register_Main.ejs +0 -0
- /package/src/emit/{system → application/system}/templates/WebSocketComplete_HdrSqs.ejs +0 -0
- /package/src/emit/{system → application/system}/templates/WebSocketComplete_Main.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
|
|
@@ -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`;
|
|
@@ -53,10 +53,19 @@ export async function emitExtTopicStep({ flow, step, flowTag, stepName }) {
|
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
const flowSteps = flow?.flowSteps ?? [];
|
|
57
|
+
const isLastStep =
|
|
58
|
+
flowSteps.length > 1 &&
|
|
59
|
+
flowSteps[flowSteps.length - 1]?.stepName === step?.stepName;
|
|
60
|
+
|
|
56
61
|
const artifacts = [
|
|
57
62
|
{
|
|
58
63
|
path: `${source}/${mainFileName}.js`,
|
|
59
|
-
content: await renderStepMain(functionName, _startConfig(flow)
|
|
64
|
+
content: await renderStepMain(functionName, _startConfig(flow), {
|
|
65
|
+
flow,
|
|
66
|
+
flowTag: flow.flowTag,
|
|
67
|
+
isLastStep
|
|
68
|
+
})
|
|
60
69
|
}
|
|
61
70
|
];
|
|
62
71
|
const functions = [];
|
|
@@ -107,10 +116,19 @@ export async function emitDsqStep({ flow, step, flowTag, stepName }) {
|
|
|
107
116
|
stepEvents = step.event;
|
|
108
117
|
}
|
|
109
118
|
const artifacts = [];
|
|
119
|
+
const flowSteps = flow?.flowSteps ?? [];
|
|
120
|
+
const isLastStep =
|
|
121
|
+
flowSteps.length > 1 &&
|
|
122
|
+
flowSteps[flowSteps.length - 1]?.stepName === step?.stepName;
|
|
123
|
+
|
|
110
124
|
if (!stepEvents.includes('extTopic')) {
|
|
111
125
|
artifacts.push({
|
|
112
126
|
path: `${source}/${mainFileName}.js`,
|
|
113
|
-
content: await renderStepMain(functionName, startConfig
|
|
127
|
+
content: await renderStepMain(functionName, startConfig, {
|
|
128
|
+
flow,
|
|
129
|
+
flowTag: flow.flowTag,
|
|
130
|
+
isLastStep
|
|
131
|
+
})
|
|
114
132
|
});
|
|
115
133
|
}
|
|
116
134
|
const functions = [];
|
|
@@ -343,8 +361,19 @@ export function storedCacheTableName(flow, objects) {
|
|
|
343
361
|
);
|
|
344
362
|
}
|
|
345
363
|
|
|
346
|
-
export async function renderStepMain(
|
|
347
|
-
|
|
364
|
+
export async function renderStepMain(
|
|
365
|
+
functionName,
|
|
366
|
+
startConfig = null,
|
|
367
|
+
options = {}
|
|
368
|
+
) {
|
|
369
|
+
const { flow, flowTag, isLastStep } = options;
|
|
370
|
+
return renderCustom('FlowStep_Main.ejs', {
|
|
371
|
+
functionName,
|
|
372
|
+
startConfig,
|
|
373
|
+
flow,
|
|
374
|
+
flowTag: flowTag || flow?.flowTag,
|
|
375
|
+
isLastStep: Boolean(isLastStep)
|
|
376
|
+
});
|
|
348
377
|
}
|
|
349
378
|
|
|
350
379
|
export function renderMain(functionName) {
|
|
@@ -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
|
|
@@ -26,6 +26,9 @@ import lambdaSharedLib from '@izara_project/izara-core-library-lambda';
|
|
|
26
26
|
<% if (typeof flow !== 'undefined' && flow.statusType === 'storedCache') { %>
|
|
27
27
|
import storedCacheSharedLib from '@izara_project/izara-core-library-stored-cache';
|
|
28
28
|
<% } %>
|
|
29
|
+
<% if (typeof flow !== 'undefined' && flow.statusType === 'statusField') { %>
|
|
30
|
+
import statusFieldSharedLib from '@izara_project/izara-core-library-status-field';
|
|
31
|
+
<% } %>
|
|
29
32
|
<% if (typeof flow !== 'undefined' && flow.statusType === 'triggerCache') { %>
|
|
30
33
|
import { triggeredCacheSharedLibV2 } from '@izara_project/izara-core-library-trigger-cache';
|
|
31
34
|
<% } %>
|
|
@@ -69,13 +72,48 @@ export default async function <%- typeof functionName !== 'undefined' ? function
|
|
|
69
72
|
//(</additionalParams>)
|
|
70
73
|
) {
|
|
71
74
|
try {
|
|
72
|
-
_izContext.logger.debug(
|
|
73
|
-
|
|
74
|
-
_izContext.logger.debug(
|
|
75
|
-
`[${process.env.iz_serviceTag}:<%- typeof functionName !== 'undefined' ? functionName : upperCaseFlowTag %>] callingFlowConfig:`,
|
|
75
|
+
_izContext.logger.debug('[<%- typeof functionName !== 'undefined' ? functionName : upperCaseFlowTag %>] started', {
|
|
76
|
+
requestParams,
|
|
76
77
|
callingFlowConfig
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
<% if (typeof flow !== 'undefined' && flow.statusType === 'statusField') { -%>
|
|
81
|
+
|
|
82
|
+
//(<beforeCheckedStatusField>)
|
|
83
|
+
//(</beforeCheckedStatusField>)
|
|
84
|
+
|
|
85
|
+
let [status, flowStatusFieldRecord] = await statusFieldSharedLib.checkStatusField(
|
|
86
|
+
_izContext,
|
|
87
|
+
{
|
|
88
|
+
flowTag: '<%= flowTag %>',
|
|
89
|
+
serviceTag: process.env.iz_serviceTag
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
//(<identifiers>)
|
|
93
|
+
//(</identifiers>)
|
|
94
|
+
},
|
|
95
|
+
//(<overwriteUniqueRequestId>)
|
|
96
|
+
//(</overwriteUniqueRequestId>)
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
_izContext.logger.debug(
|
|
100
|
+
`[${process.env.iz_serviceTag}:<%- typeof functionName !== 'undefined' ? functionName : upperCaseFlowTag %>] checkStatusField result:`,
|
|
101
|
+
{ status, flowStatusFieldRecord }
|
|
77
102
|
);
|
|
78
103
|
|
|
104
|
+
//(<afterCheckStatusField>)
|
|
105
|
+
//(</afterCheckStatusField>)
|
|
106
|
+
|
|
107
|
+
if (status !== 'process') {
|
|
108
|
+
if (status === 'error' || status === 'complete') {
|
|
109
|
+
//(<afterValidateStatusField>)
|
|
110
|
+
//(</afterValidateStatusField>)
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
//(<checkStatusFieldHook>)
|
|
114
|
+
//(</checkStatusFieldHook>)
|
|
115
|
+
}
|
|
116
|
+
<% } -%>
|
|
79
117
|
<% if (typeof flow !== 'undefined' && flow.statusType === 'triggerCache') { -%>
|
|
80
118
|
|
|
81
119
|
//(<beforeCheckTriggeredCache>)
|
|
@@ -217,6 +255,30 @@ export default async function <%- typeof functionName !== 'undefined' ? function
|
|
|
217
255
|
|
|
218
256
|
//(<endpointHook>)
|
|
219
257
|
//(</endpointHook>)
|
|
258
|
+
<% if (typeof flow !== 'undefined' && flow.statusType === 'statusField' && (!flow.flowSteps || flow.flowSteps.length <= 1)) { -%>
|
|
259
|
+
|
|
260
|
+
//(<beforeCompleteStatusField>)
|
|
261
|
+
//(</beforeCompleteStatusField>)
|
|
262
|
+
|
|
263
|
+
await statusFieldSharedLib.completeStatusField(
|
|
264
|
+
_izContext,
|
|
265
|
+
{
|
|
266
|
+
flowTag: '<%= flowTag %>',
|
|
267
|
+
serviceTag: process.env.iz_serviceTag
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
//(<identifiers>)
|
|
271
|
+
//(</identifiers>)
|
|
272
|
+
},
|
|
273
|
+
//(<statusField>)
|
|
274
|
+
//(</statusField>)
|
|
275
|
+
//(<errorFounds>)
|
|
276
|
+
//(</errorFounds>)
|
|
277
|
+
);
|
|
278
|
+
|
|
279
|
+
//(<afterCompleteStatusField>)
|
|
280
|
+
//(</afterCompleteStatusField>)
|
|
281
|
+
<% } -%>
|
|
220
282
|
<% } -%>
|
|
221
283
|
|
|
222
284
|
} catch (err) {
|
|
@@ -16,6 +16,9 @@ along with this program. If not, see
|
|
|
16
16
|
<http: //www.gnu.org/licenses />.
|
|
17
17
|
*/
|
|
18
18
|
import { identifierUuid } from '@izara_project/izara-shared-core';
|
|
19
|
+
<% if (typeof flow !== 'undefined' && flow.statusType === 'statusField' && typeof isLastStep !== 'undefined' && isLastStep) { %>
|
|
20
|
+
import statusFieldSharedLib from '@izara_project/izara-core-library-status-field';
|
|
21
|
+
<% } %>
|
|
19
22
|
|
|
20
23
|
//(<optionalRequire>)
|
|
21
24
|
//(</optionalRequire>)
|
|
@@ -51,6 +54,30 @@ export default async function <%= functionName %>(
|
|
|
51
54
|
|
|
52
55
|
//(<hookCode>)
|
|
53
56
|
//(</hookCode>)
|
|
57
|
+
<% if (typeof flow !== 'undefined' && flow.statusType === 'statusField' && typeof isLastStep !== 'undefined' && isLastStep) { -%>
|
|
58
|
+
|
|
59
|
+
//(<beforeCompleteStatusField>)
|
|
60
|
+
//(</beforeCompleteStatusField>)
|
|
61
|
+
|
|
62
|
+
await statusFieldSharedLib.completeStatusField(
|
|
63
|
+
_izContext,
|
|
64
|
+
{
|
|
65
|
+
flowTag: '<%= flowTag %>',
|
|
66
|
+
serviceTag: process.env.iz_serviceTag
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
//(<identifiers>)
|
|
70
|
+
//(</identifiers>)
|
|
71
|
+
},
|
|
72
|
+
//(<statusField>)
|
|
73
|
+
//(</statusField>)
|
|
74
|
+
//(<errorFounds>)
|
|
75
|
+
//(</errorFounds>)
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
//(<afterCompleteStatusField>)
|
|
79
|
+
//(</afterCompleteStatusField>)
|
|
80
|
+
<% } -%>
|
|
54
81
|
} catch (err) {
|
|
55
82
|
_izContext.logger.error(`[${process.env.iz_serviceTag}:<%= functionName %>] error:`, err);
|
|
56
83
|
throw err;
|
|
@@ -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
|
|
@@ -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,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,
|
|
@@ -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',
|