@izara_project/izara-market-library-service-schemas 1.0.33 → 1.0.35
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/package.json +1 -1
- package/src/GenerateCodeLibs/src/Consts.js +2 -1
- package/src/GenerateCodeLibs/src/GenerateCodeLibs.js +20 -6
- package/src/MainLibs/src/Consts.js +43 -10
- package/src/TemplateManager/src/attributeTree/relationshipSchema/data.js +1 -1
- package/src/reStructure/GenerateCode.js +1 -0
- package/src/reStructure/SchemaConfig.js +1 -0
- package/src/reStructure/TemplateData/EndpointPerService/handler/api/template.ejs +2 -2
- package/src/reStructure/TemplateData/EndpointPerService/handler/inv/template.ejs +2 -2
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/create/template.ejs +3 -0
- package/src/reStructure/TemplateData/attributeTreeSchema/generateTemplateData.js +28 -44
- package/src/reStructure/TemplateData/attributeTreeSchema/{mainAttributeTreeSchema → mainAttributeTree}/attributeLinkTemplate.ejs +3 -7
- package/src/reStructure/TemplateData/attributeTreeSchema/mainAttributeTree/data.js +134 -0
- package/src/reStructure/TemplateData/attributeTreeSchema/relationshipSchema/data.js +172 -0
- package/src/reStructure/TemplateData/attributeTreeSchema/relationshipSchema/template.ejs +7 -0
- package/src/reStructure/TemplateData/externalService/lambdaRole/data.js +1 -1
- package/src/reStructure/TemplateData/flowSchema/CreateRecordComplete/functionYaml/data.js +123 -0
- package/src/reStructure/TemplateData/flowSchema/CreateRecordComplete/functionYaml/template.ejs +20 -0
- package/src/reStructure/TemplateData/flowSchema/CreateRecordComplete/handler/data.js +57 -0
- package/src/reStructure/TemplateData/flowSchema/CreateRecordComplete/handler/template.ejs +85 -0
- package/src/reStructure/TemplateData/flowSchema/CreateRecordComplete/mainFunction/data.js +68 -0
- package/src/reStructure/TemplateData/flowSchema/CreateRecordComplete/mainFunction/template.ejs +96 -0
- package/src/reStructure/TemplateData/flowSchema/CreateRecordComplete/queue/data.js +77 -0
- package/src/reStructure/TemplateData/flowSchema/CreateRecordComplete/queue/template.ejs +49 -0
- package/src/reStructure/TemplateData/flowSchema/components/websocket/connect/handler/template.ejs +4 -4
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/complete/functionYaml/data.js +138 -0
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/complete/functionYaml/template.ejs +20 -0
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/complete/handler/data.js +55 -0
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/complete/handler/template.ejs +83 -0
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/complete/mainFunction/data.js +55 -0
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/complete/mainFunction/template.ejs +133 -0
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/sns-in/data.js +64 -0
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/sns-in/template.ejs +12 -0
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/statusFieldTemplate.ejs +27 -0
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/storedCacheTemplate.ejs +34 -0
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/subscriptionOutAll/data.js +76 -0
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/subscriptionOutAll/template.ejs +13 -0
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/wbs/functionYaml/data.js +142 -0
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/wbs/functionYaml/template.ejs +18 -0
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/wbs/handler/data.js +64 -0
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/wbs/handler/template.ejs +89 -0
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/wbs/mainFunction/data.js +55 -0
- package/src/reStructure/TemplateData/flowSchema/createRecordByStatusType/wbs/mainFunction/template.ejs +120 -0
- package/src/reStructure/TemplateData/flowSchema/eventBridge/functionYaml/data.js +26 -59
- package/src/reStructure/TemplateData/flowSchema/eventBridge/functionYaml/template.ejs +3 -3
- package/src/reStructure/TemplateData/flowSchema/eventBridge/handler/inv/data.js +8 -8
- package/src/reStructure/TemplateData/flowSchema/eventBridge/mainFunction/data.js +11 -9
- package/src/reStructure/TemplateData/flowSchema/eventBridge/mainFunction/template.ejs +3 -3
- package/src/reStructure/TemplateData/flowSchema/externalTopic/sns-in-sqs/data.js +3 -6
- package/src/reStructure/TemplateData/flowSchema/externalTopic/sqs/functionYaml/data.js +7 -9
- package/src/reStructure/TemplateData/flowSchema/externalTopic/sqs/functionYaml/template.ejs +2 -2
- package/src/reStructure/TemplateData/flowSchema/externalTopic/sqs/handler/data.js +2 -2
- package/src/reStructure/TemplateData/flowSchema/externalTopic/sqs/mainFunction/data.js +1 -1
- package/src/reStructure/TemplateData/flowSchema/externalTopic/websocket/functionYaml/data.js +8 -43
- package/src/reStructure/TemplateData/flowSchema/externalTopic/websocket/functionYaml/template.ejs +1 -1
- package/src/reStructure/TemplateData/flowSchema/externalTopic/websocket/handler/data.js +2 -2
- package/src/reStructure/TemplateData/flowSchema/externalTopic/websocket/handler/template.ejs +1 -0
- package/src/reStructure/TemplateData/flowSchema/externalTopic/websocket/mainFunction/data.js +7 -1
- package/src/reStructure/TemplateData/flowSchema/externalTopic/websocket/mainFunction/template.ejs +18 -7
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/mainFunction/data.js +3 -1
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/mainFunction/data.js +7 -1
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/mainFunction/template.ejs +52 -13
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaCompleteComponent/functionYaml/template.ejs +2 -0
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/mainFunction/data.js +3 -1
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/mainFunction/template.ejs +18 -18
- package/src/reStructure/TemplateData/flowSchema/generateTemplateData.js +67 -6
- package/src/reStructure/TemplateData/generateRole/createSharedResource.js +20 -0
- package/src/reStructure/TemplateData/perActionComplete/create/mainFunction/template.ejs +3 -3
- package/src/reStructure/TemplateData/perActionComplete/create/yaml/data.js +9 -3
- package/src/reStructure/TemplateData/perActionComplete/delete/mainFunction/template.ejs +1 -1
- package/src/reStructure/TemplateData/perActionComplete/delete/yaml/data.js +9 -3
- package/src/reStructure/TemplateData/perActionComplete/get/mainFunction/template.ejs +1 -1
- package/src/reStructure/TemplateData/perActionComplete/get/yaml/data.js +10 -4
- package/src/reStructure/TemplateData/perActionComplete/update/mainFunction/template.ejs +1 -1
- package/src/reStructure/TemplateData/perActionComplete/update/yaml/data.js +9 -3
- package/src/reStructure/TemplateData/propertyNodeSchema/generateTemplateData.js +66 -0
- package/src/reStructure/TemplateData/propertyNodeSchema/objectPropertyNodeSchema/data.js +151 -0
- package/src/reStructure/TemplateData/propertyNodeSchema/objectPropertyNodeSchema/templateObjectPropertyNodeSchema.ejs +16 -0
- package/src/reStructure/TemplateData/propertyNodeSchema/relationshipPropertyNodeSchema/data.js +179 -0
- package/src/reStructure/TemplateData/propertyNodeSchema/relationshipPropertyNodeSchema/templateRelationshipPropertyNodeSchema.ejs +7 -0
- package/src/reStructure/TemplateData/relationshipPerAction/create/complete/mainFunction/template.ejs +1 -1
- package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/mainFunction/template.ejs +5 -5
- package/src/reStructure/TemplateData/relationshipPerAction/get/complete/mainFunction/template.ejs +5 -5
- package/src/reStructure/TemplateData/relationshipPerAction/update/complete/mainFunction/template.ejs +1 -1
- package/src/reStructure/libs/ValidateAddOnDataStructure.js +62 -0
- package/src/reStructure/TemplateData/attributeTreeSchema/mainAttributeTreeSchema/data.js +0 -188
- /package/src/reStructure/TemplateData/attributeTreeSchema/{mainAttributeTreeSchema → mainAttributeTree}/request.json +0 -0
|
@@ -22,6 +22,8 @@ const { SOURCE_PATH, FUNCTION_NAME } = require('../../../../../../MainLibs/src/C
|
|
|
22
22
|
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = require("../../../../../../MainLibs/src/Utils")
|
|
23
23
|
const templatePath = path.join(__dirname, "template.ejs");
|
|
24
24
|
const getObjectSchema = require('@izara_project/izara-core-library-service-schemas/src/GetObjectSchema')
|
|
25
|
+
const statusFieldTemplate = path.join(__dirname, "../../../createRecordByStatusType/statusFieldTemplate.ejs")
|
|
26
|
+
const storedCacheTemplate = path.join(__dirname, "../../../createRecordByStatusType/storedCacheTemplate.ejs")
|
|
25
27
|
|
|
26
28
|
/**
|
|
27
29
|
* receive objectSchema
|
|
@@ -40,7 +42,11 @@ function createParamsForCreateSource(_izContext, flowSchema, srcPath) {
|
|
|
40
42
|
let functionName = upperCase(FUNCTION_NAME.flowSchemaOwnTopicEndpoint)
|
|
41
43
|
return {
|
|
42
44
|
templatePath: templatePath,
|
|
43
|
-
templateData: {
|
|
45
|
+
templateData: {
|
|
46
|
+
statusType: flowSchema.statusType,
|
|
47
|
+
statusFieldTemplate,
|
|
48
|
+
storedCacheTemplate,
|
|
49
|
+
},
|
|
44
50
|
setting: {
|
|
45
51
|
savePath: path.join(srcPath, SOURCE_PATH.flowSchemaOwnTopic, flowSchema.flowTag, "source/"),
|
|
46
52
|
saveFileName: `${functionName}_Main`,
|
|
@@ -23,12 +23,14 @@ const getObjectSchema = require('@izara_project/izara-core-library-service-schem
|
|
|
23
23
|
|
|
24
24
|
const dynamodbSharedLib = require('@izara_project/izara-core-library-dynamodb');
|
|
25
25
|
const snsSharedLib = require('@izara_project/izara-core-library-sns');
|
|
26
|
+
const sqsSharedLib = require('@izara_project/izara-core-library-sqs');
|
|
26
27
|
const asyncFlowSharedLib = require('@izara_project/izara-core-library-asynchronous-flow');
|
|
27
28
|
const callingFlowSharedLib = require('@izara_project/izara-core-library-calling-flow');
|
|
28
29
|
const lambdaSharedLib = require('@izara_project/izara-core-library-lambda');
|
|
29
30
|
|
|
30
31
|
const externalRequest = require('@izara_project/izara-core-library-external-request');
|
|
31
32
|
const sns = externalRequest.sns
|
|
33
|
+
const sqs = externalRequest.sqs
|
|
32
34
|
const { postToConnection } = require("../../../../libs/source/GenerateCodeLibs");
|
|
33
35
|
const utils = require('@izara_project/izara-market-library-service-schemas/src/MainLibs/src/Utils')
|
|
34
36
|
const NoRetryError = require('@izara_project/izara-core-library-core').NoRetryError
|
|
@@ -66,31 +68,68 @@ module.exports.FlowSchemaOwnTopicEndpoint = async (
|
|
|
66
68
|
//(<endpointHookMainFunction>)
|
|
67
69
|
//(</endpointHookMainFunction>)
|
|
68
70
|
|
|
71
|
+
<% if (statusType === "statusField") { %>
|
|
72
|
+
<%- include(statusFieldTemplate) %>
|
|
73
|
+
<% } else if (statusType === "storedCache") { %>
|
|
74
|
+
<%- include(storedCacheTemplate) %>
|
|
69
75
|
let messageObject = {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
};
|
|
76
|
+
requestParams:requestParams
|
|
77
|
+
}
|
|
73
78
|
|
|
74
|
-
|
|
75
|
-
|
|
79
|
+
//(<beforeSendMessage>)
|
|
80
|
+
//(</beforeSendMessage>)
|
|
81
|
+
// create callingFlow
|
|
82
|
+
messageObject = callingFlowSharedLib.addCallingFlowToSnsRequestMessageObject(
|
|
83
|
+
messageObject,
|
|
76
84
|
callingFlowSharedLib.addParentCallingFlowConfig(
|
|
77
|
-
|
|
85
|
+
callingFlowConfig,
|
|
78
86
|
callingFlowSharedLib.createCallingFlowConfig(
|
|
79
87
|
await lambdaSharedLib.lambdaFunctionName(_izContext, TOPIC_NAME_GENERATE_CODE.flowSchemaOwnTopicComplete), {}
|
|
80
88
|
)
|
|
81
89
|
)
|
|
82
90
|
)
|
|
83
91
|
|
|
84
|
-
let
|
|
85
|
-
|
|
86
|
-
QueueUrl: await sqsSharedLib.sqsQueueUrl(_izContext, "
|
|
92
|
+
let sendMessageToEndpointComplete = {
|
|
93
|
+
Message:JSON.stringify(messageObject),
|
|
94
|
+
QueueUrl: await sqsSharedLib.sqsQueueUrl(_izContext, "FlowSchemaOwnTopicEndpointCompleteHdrSqs")
|
|
95
|
+
}
|
|
96
|
+
_izContext.logger.debug("sendMessageToEndpointComplete", sendMessageToEndpointComplete)
|
|
97
|
+
await sqs.sendMessage(_izContext, sendMessageToEndpointComplete)
|
|
98
|
+
|
|
99
|
+
<% } else if (statusType === "none") { %>
|
|
100
|
+
let messageObject = {
|
|
101
|
+
requestParams:requestParams
|
|
102
|
+
}
|
|
103
|
+
// create callingFlow
|
|
104
|
+
messageObject = callingFlowSharedLib.addCallingFlowToSnsRequestMessageObject(
|
|
105
|
+
messageObject,
|
|
106
|
+
callingFlowSharedLib.addParentCallingFlowConfig(
|
|
107
|
+
callingFlowConfig,
|
|
108
|
+
callingFlowSharedLib.createCallingFlowConfig(
|
|
109
|
+
await lambdaSharedLib.lambdaFunctionName(_izContext, TOPIC_NAME_GENERATE_CODE.flowSchemaOwnTopicComplete), {}
|
|
110
|
+
)
|
|
111
|
+
)
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
let sendMessageToEndpointComplete = {
|
|
115
|
+
Message:JSON.stringify(messageObject),
|
|
116
|
+
QueueUrl: await sqsSharedLib.sqsQueueUrl(_izContext, "FlowSchemaOwnTopicEndpointCompleteHdrSqs")
|
|
117
|
+
}
|
|
118
|
+
_izContext.logger.debug("sendMessageToEndpointComplete", sendMessageToEndpointComplete)
|
|
119
|
+
await sqs.sendMessage(_izContext, sendMessageToEndpointComplete)
|
|
120
|
+
|
|
121
|
+
<% } %>
|
|
122
|
+
|
|
123
|
+
let sendMessageToEndpointComplete = {
|
|
124
|
+
Message:JSON.stringify(messageObject),
|
|
125
|
+
QueueUrl: await sqsSharedLib.sqsQueueUrl(_izContext, "FlowSchemaOwnTopicEndpointCompleteHdrSqs")
|
|
87
126
|
}
|
|
88
|
-
_izContext.logger.debug("
|
|
89
|
-
await sqs.sendMessage(_izContext,
|
|
127
|
+
_izContext.logger.debug("sendMessageToEndpointComplete", sendMessageToEndpointComplete)
|
|
128
|
+
await sqs.sendMessage(_izContext, sendMessageToEndpointComplete)
|
|
90
129
|
|
|
91
130
|
return {
|
|
92
|
-
//(<
|
|
93
|
-
//(</
|
|
131
|
+
//(<endpointReturn>)
|
|
132
|
+
//(</endpointReturn>)
|
|
94
133
|
}
|
|
95
134
|
} catch (err) {
|
|
96
135
|
_izContext.logger.error('error WebSocketInvoke: ', err)
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
filterPatterns: #**** need to update serverless framwork upper v.2.69.1
|
|
10
10
|
- body: {"MessageAttributes":{"callingFlow":{"Value":["${self:custom.iz_resourcePrefix}<%- functionName %>"]}}} # functionName of callingFlow
|
|
11
11
|
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
12
|
+
- body: {"MessageAttributes":{"_izContext":{"Value":["x-correlation-connectionId"]}}} # functionName of callingFlow
|
|
13
|
+
- body: {"MessageAttributes":{"_izContext":{"Value":[{"exists":true}]}}}
|
|
12
14
|
role: <%- roleName %>Role
|
|
13
15
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
14
16
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
|
@@ -34,6 +34,7 @@ const {
|
|
|
34
34
|
} = require('../../../../../../MainLibs/src/Consts');
|
|
35
35
|
const templatePath = path.join(__dirname, "template.ejs");
|
|
36
36
|
|
|
37
|
+
|
|
37
38
|
/**
|
|
38
39
|
* receive objectSchema
|
|
39
40
|
* create data for WebScoket handler template
|
|
@@ -53,7 +54,8 @@ function createParamsForCreateSource(_izContext, flowSchema, srcPath) {
|
|
|
53
54
|
return {
|
|
54
55
|
templatePath: templatePath,
|
|
55
56
|
templateData: {
|
|
56
|
-
topicArn
|
|
57
|
+
topicArn,
|
|
58
|
+
flowTag: flowSchema.flowTag,
|
|
57
59
|
},
|
|
58
60
|
setting: {
|
|
59
61
|
savePath: path.join(srcPath, SOURCE_PATH.flowSchemaOwnTopic, flowSchema.flowTag, "source/"),
|
|
@@ -32,9 +32,9 @@ const sns = externalRequest.sns
|
|
|
32
32
|
|
|
33
33
|
const utils = require('@izara_project/izara-market-library-service-schemas/src/MainLibs/src/Utils')
|
|
34
34
|
const NoRetryError = require('@izara_project/izara-core-library-core').NoRetryError
|
|
35
|
-
const { v4: uuidv4 } = require('uuid')
|
|
36
35
|
const coreConsts = require("@izara_project/izara-core-library-core/src/Consts");
|
|
37
36
|
const { TOPIC_NAME_GENERATE_CODE } = require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/Consts')
|
|
37
|
+
|
|
38
38
|
/**
|
|
39
39
|
*
|
|
40
40
|
*
|
|
@@ -75,26 +75,26 @@ module.exports.flowSchemaOwnTopic = async (
|
|
|
75
75
|
throw new NoRetryError(`flowTag not found ${requestParams.action}`)
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
78
|
+
let messageObject = {
|
|
79
|
+
requestParams:requestParams
|
|
80
|
+
}
|
|
81
|
+
// create callingFlow
|
|
82
|
+
messageObject = callingFlowSharedLib.addCallingFlowToSnsRequestMessageObject(
|
|
83
|
+
messageObject,
|
|
84
|
+
callingFlowSharedLib.addParentCallingFlowConfig(
|
|
85
|
+
callingFlowConfig,
|
|
86
|
+
callingFlowSharedLib.createCallingFlowConfig(
|
|
87
|
+
await lambdaSharedLib.lambdaFunctionName(_izContext, TOPIC_NAME_GENERATE_CODE.flowSchemaOwnTopicComplete), {}
|
|
88
|
+
)
|
|
88
89
|
)
|
|
89
90
|
)
|
|
90
|
-
)
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
92
|
+
let sendMessageToCreateEndpoint = {
|
|
93
|
+
Message: JSON.stringify(messageObject),
|
|
94
|
+
TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, "<%- topicArn %>")
|
|
95
|
+
}
|
|
96
|
+
_izContext.logger.debug("sendMessageToCreateEndpoint", sendMessageToCreateEndpoint);
|
|
97
|
+
await sns.publishAsync(_izContext, sendMessageToCreateEndpoint);
|
|
98
98
|
|
|
99
99
|
} catch (err) {
|
|
100
100
|
_izContext.logger.error('error WebSocketInvoke: ', err)
|
|
@@ -70,7 +70,7 @@ const createConfirmAfterUploadS3Handler = require('./components/upload/confirmRe
|
|
|
70
70
|
const createConfirmAfterUploadS3MainFunction = require('./components/upload/confirmReserved/mainFunction/data');
|
|
71
71
|
const createConfirmAfterUploadS3Queue = require('./components/upload/confirmReserved/queue/data');
|
|
72
72
|
|
|
73
|
-
//
|
|
73
|
+
// flowSchema ExternalTopic components //
|
|
74
74
|
const createExternalWebsocketFunctionYaml = require('./externalTopic/websocket/functionYaml/data');
|
|
75
75
|
const createExternalWebsocketHandler = require('./externalTopic/websocket/handler/data');
|
|
76
76
|
const createExternalWebsocketMainFunction = require('./externalTopic/websocket/mainFunction/data');
|
|
@@ -102,13 +102,26 @@ const createFlowSchemaOwnTopicEndpointCompleteMainFunction = require('./flowSche
|
|
|
102
102
|
|
|
103
103
|
const createFlowSchemaOwnTopicQueue = require('./flowSchemaOwnTopic/sns-in/data');
|
|
104
104
|
const createFlowSchemaOwnTopicSnsOut = require('./flowSchemaOwnTopic/sns-out/data');
|
|
105
|
-
//
|
|
105
|
+
// flowSchema EventBridge components //
|
|
106
106
|
const createFlowSchemaEventBridgeFunctionYaml = require('./eventBridge/functionYaml/data');
|
|
107
107
|
const createFlowSchemaEventBridgeHandler = require('./eventBridge/handler/inv/data');
|
|
108
108
|
const createFlowSchemaEventBridgeMainFunction = require('./eventBridge/mainFunction/data');
|
|
109
109
|
|
|
110
|
-
const createFlowSchemaDynamoDb = require('./dynamoDb/data')
|
|
111
|
-
|
|
110
|
+
const createFlowSchemaDynamoDb = require('./dynamoDb/data');
|
|
111
|
+
// create record status Field Complete
|
|
112
|
+
const createCreateObjectCompleteFuntionYaml = require('./CreateRecordComplete/functionYaml/data');
|
|
113
|
+
const createCreateObjectCompleteHandler = require('./CreateRecordComplete/handler/data');
|
|
114
|
+
const createCreateObjectCompleteMainFunction = require('./CreateRecordComplete/mainFunction/data');
|
|
115
|
+
const createCreateObjectCompleteQueue = require('./CreateRecordComplete/queue/data');// flowSchema Register component //
|
|
116
|
+
|
|
117
|
+
const createFlowSchemaRegisterHandlerComplete = require('./createRecordByStatusType/complete/handler/data');
|
|
118
|
+
const createFlowSchemaRegisterMainCompleteFunc = require('./createRecordByStatusType/complete/mainFunction/data');
|
|
119
|
+
const createFlowSchemaRegisterHandlerWbsFunc = require('./createRecordByStatusType/wbs/handler/data');
|
|
120
|
+
const createFlowSchemaRegisterMainWbsFunc = require('./createRecordByStatusType/wbs/mainFunction/data');
|
|
121
|
+
const createFlowSchemaRegisterMainCompleteFuncYaml = require('./createRecordByStatusType/complete/functionYaml/data');
|
|
122
|
+
const createFlowSchemaRegisterMainWbsFuncYaml = require('./createRecordByStatusType/wbs/functionYaml/data');
|
|
123
|
+
const createFlowSchemaRegisterSubscribeOutAll = require('./createRecordByStatusType/subscriptionOutAll/data');
|
|
124
|
+
const createFlowSchemaRegisterSnsInSqs = require('./createRecordByStatusType/sns-in/data');
|
|
112
125
|
|
|
113
126
|
/**
|
|
114
127
|
* Generates code with templates for different actions
|
|
@@ -134,12 +147,18 @@ async function generateCodeWithTemplate(_izContext, objSchemaPath) {
|
|
|
134
147
|
createSourceParams.push(
|
|
135
148
|
...webSocketResource,
|
|
136
149
|
...webSocketGenerateCodeLibs
|
|
137
|
-
|
|
138
150
|
)
|
|
139
151
|
}
|
|
140
152
|
|
|
153
|
+
// get flowsteps out form all local object schemas
|
|
154
|
+
|
|
155
|
+
|
|
141
156
|
for (const flowSchema of allLocalFlowSchemas.records) {
|
|
142
157
|
console.log("flowSchema in Generate TemplateData", flowSchema);
|
|
158
|
+
|
|
159
|
+
if (flowSchema.statusType === "none" || flowSchema.handlerObj === "multi") {
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
143
162
|
for (const event of flowSchema.event) {
|
|
144
163
|
if (event.includes("s3")) {
|
|
145
164
|
const reservedDataTable = createReservedDataMainTable(_izContext, saveFilePath);
|
|
@@ -312,10 +331,52 @@ async function generateCodeWithTemplate(_izContext, objSchemaPath) {
|
|
|
312
331
|
|
|
313
332
|
if (flowSchema.statusType === "storedCache") {
|
|
314
333
|
const flowSchemaDynamoDb = createFlowSchemaDynamoDb(_izContext, flowSchema, saveFilePath)
|
|
334
|
+
console.log("generated code storedCache flowSchema")
|
|
315
335
|
createSourceParams.push(...flowSchemaDynamoDb);
|
|
316
|
-
}
|
|
336
|
+
} else if (flowSchema.statusType === "statusField") {
|
|
337
|
+
// wait
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
// if (flowSchema.statusType === "statusField") {
|
|
341
|
+
// const createRecordCompleteFunctionYaml = createCreateObjectCompleteFuntionYaml(_izContext, flowSchema, saveFilePath);
|
|
342
|
+
// const createRecordCompleteHandler = createCreateObjectCompleteHandler(_izContext, flowSchema, saveFilePath);
|
|
343
|
+
// const createRecordCompleteMainFunction = createCreateObjectCompleteMainFunction(_izContext, flowSchema, saveFilePath);
|
|
344
|
+
// const createRecordCompleteQueue = createCreateObjectCompleteQueue(_izContext, flowSchema, saveFilePath);
|
|
345
|
+
|
|
346
|
+
// const recordCompleteResources = [
|
|
347
|
+
// ...createRecordCompleteFunctionYaml,
|
|
348
|
+
// ...createRecordCompleteHandler,
|
|
349
|
+
// ...createRecordCompleteMainFunction,
|
|
350
|
+
// ...createRecordCompleteQueue
|
|
351
|
+
// ];
|
|
352
|
+
// console.log("generated Code createRecordComplete")
|
|
353
|
+
// createSourceParams.push(...recordCompleteResources);
|
|
354
|
+
// }
|
|
355
|
+
}
|
|
317
356
|
}
|
|
318
357
|
}
|
|
358
|
+
console.log("flowSchema Register");
|
|
359
|
+
const flowSchemaRegisterHandlerComplete = createFlowSchemaRegisterHandlerComplete(_izContext, saveFilePath);
|
|
360
|
+
const flowSchemaRegisterMainComplete = createFlowSchemaRegisterMainCompleteFunc(_izContext, saveFilePath);
|
|
361
|
+
const flowSchemaRegisterHandlerWbs = createFlowSchemaRegisterHandlerWbsFunc(_izContext, saveFilePath);
|
|
362
|
+
const flowSchemaRegisterMainWbs = createFlowSchemaRegisterMainWbsFunc(_izContext, saveFilePath);
|
|
363
|
+
const flowSchemaRegisterFunctionYamlComplete = createFlowSchemaRegisterMainCompleteFuncYaml(_izContext, saveFilePath);
|
|
364
|
+
const flowSchemaRegisterFunctionYamlWbs = createFlowSchemaRegisterMainWbsFuncYaml(_izContext, saveFilePath);
|
|
365
|
+
const flowSchemaRegisterSubscribeOutAll = createFlowSchemaRegisterSubscribeOutAll(_izContext, allLocalFlowSchemas, saveFilePath);
|
|
366
|
+
const flowSchemaRegisterSnsInSqs = createFlowSchemaRegisterSnsInSqs(_izContext, saveFilePath);
|
|
367
|
+
|
|
368
|
+
const flowSchemaRegisters = [
|
|
369
|
+
...flowSchemaRegisterHandlerComplete,
|
|
370
|
+
...flowSchemaRegisterMainComplete,
|
|
371
|
+
...flowSchemaRegisterHandlerWbs,
|
|
372
|
+
...flowSchemaRegisterMainWbs,
|
|
373
|
+
...flowSchemaRegisterFunctionYamlComplete,
|
|
374
|
+
...flowSchemaRegisterFunctionYamlWbs,
|
|
375
|
+
...flowSchemaRegisterSnsInSqs,
|
|
376
|
+
...flowSchemaRegisterSubscribeOutAll,
|
|
377
|
+
];
|
|
378
|
+
createSourceParams.push(...flowSchemaRegisters);
|
|
379
|
+
|
|
319
380
|
return createSourceParams;
|
|
320
381
|
} catch (error) {
|
|
321
382
|
_izContext.logger.error('Error generating code with template flowSchema:', error);
|
|
@@ -126,6 +126,14 @@ const createSharedResource = (_izContext, createSourceParams, srcPath) => {
|
|
|
126
126
|
handlerType: [],
|
|
127
127
|
resources: {}
|
|
128
128
|
},
|
|
129
|
+
[SOURCE_GENERATE_IAM_ROLE.CreateRecordComplete]: {
|
|
130
|
+
handlerType: [],
|
|
131
|
+
resources: {}
|
|
132
|
+
},
|
|
133
|
+
[SOURCE_GENERATE_IAM_ROLE.RegisterRole]: {
|
|
134
|
+
handlerType: [],
|
|
135
|
+
resources: {}
|
|
136
|
+
},
|
|
129
137
|
Other: []
|
|
130
138
|
};
|
|
131
139
|
const objectTypeList = [];
|
|
@@ -237,6 +245,18 @@ const createSharedResource = (_izContext, createSourceParams, srcPath) => {
|
|
|
237
245
|
templateData.additionalResourcePermission,
|
|
238
246
|
groupedByObjectType[SOURCE_GENERATE_IAM_ROLE.EventBridge].resources
|
|
239
247
|
)
|
|
248
|
+
} else if (templateData?.roleName?.includes(SOURCE_GENERATE_IAM_ROLE.CreateRecordComplete)) {
|
|
249
|
+
groupedByObjectType[SOURCE_GENERATE_IAM_ROLE.CreateRecordComplete].handlerType.push(templateData);
|
|
250
|
+
processResourcePermissions(
|
|
251
|
+
templateData.additionalResourcePermission,
|
|
252
|
+
groupedByObjectType[SOURCE_GENERATE_IAM_ROLE.CreateRecordComplete].resources
|
|
253
|
+
)
|
|
254
|
+
} else if (templateData.roleName.includes(SOURCE_GENERATE_IAM_ROLE.RegisterRole)) {
|
|
255
|
+
groupedByObjectType[SOURCE_GENERATE_IAM_ROLE.RegisterRole].handlerType.push(templateData);
|
|
256
|
+
processResourcePermissions(
|
|
257
|
+
templateData.additionalResourcePermission,
|
|
258
|
+
groupedByObjectType[SOURCE_GENERATE_IAM_ROLE.RegisterRole].resources
|
|
259
|
+
)
|
|
240
260
|
}
|
|
241
261
|
else {
|
|
242
262
|
// Handle other items
|
|
@@ -22,7 +22,7 @@ const snsSharedLib = require('@izara_project/izara-core-library-sns');
|
|
|
22
22
|
const sns = require('@izara_project/izara-core-library-external-request/src/resources/Sns');
|
|
23
23
|
const _ = require('lodash');
|
|
24
24
|
const hash = require("object-hash")
|
|
25
|
-
|
|
25
|
+
const { TOPIC_NAME_GENERATE_CODE } = require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/Consts')
|
|
26
26
|
const PREFIX = {
|
|
27
27
|
CREATE_OBJECT_ASYNC: "createObjectAsync",
|
|
28
28
|
CREATE_OBJECT_ASYNC_COMPLETE: "createObjectAsyncComplete"
|
|
@@ -77,7 +77,7 @@ module.exports.createObjectComplete = async (
|
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
if (status == "error" && errorsFound.length > 0) {
|
|
80
|
-
errorsFound.push(
|
|
80
|
+
errorsFound.push("error before validate");
|
|
81
81
|
} else if (status == "error" && errorsFound.length == 0) {
|
|
82
82
|
errorsFound.push("[invalid]statur is error not have errorfound form graphService");
|
|
83
83
|
|
|
@@ -141,7 +141,7 @@ module.exports.createObjectComplete = async (
|
|
|
141
141
|
let sendMessageOutCreateObjectComplete = {
|
|
142
142
|
Message: JSON.stringify(messageObject),
|
|
143
143
|
MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
|
|
144
|
-
TopicArn: await snsSharedLib.
|
|
144
|
+
TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GENERATE_CODE.outCreateNodeComplete)
|
|
145
145
|
};
|
|
146
146
|
_izContext.logger.debug("Send message to OutCreateObjectComplete :::>", sendMessageOutCreateObjectComplete)
|
|
147
147
|
await sns.publishAsync(_izContext, sendMessageOutCreateObjectComplete);
|
|
@@ -89,15 +89,21 @@ function createFunctionYamlOutUpdateComplete(_izContext, srcPath) {
|
|
|
89
89
|
SQS_RESOURCE.getQueueUrl,
|
|
90
90
|
SQS_RESOURCE.receiveMessage,
|
|
91
91
|
SQS_RESOURCE.sendMessage
|
|
92
|
-
]
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
[
|
|
95
|
+
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName)),
|
|
96
|
+
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName) + "DLQ")
|
|
97
|
+
]
|
|
98
|
+
),
|
|
99
|
+
createIamRole(
|
|
100
|
+
{
|
|
93
101
|
[RESOURCE_CLASSES.sns]: [
|
|
94
102
|
SNS_RESOURCE.publish,
|
|
95
103
|
SNS_RESOURCE.subscribe
|
|
96
104
|
]
|
|
97
105
|
},
|
|
98
106
|
[
|
|
99
|
-
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName)),
|
|
100
|
-
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName) + "DLQ"),
|
|
101
107
|
resourceNames(RESOURCE_CLASSES.sns, upperCase(functionName) + "_In"),
|
|
102
108
|
resourceNames(RESOURCE_CLASSES.sns, upperCase(functionName) + "_Out")
|
|
103
109
|
]
|
|
@@ -72,7 +72,7 @@ module.exports.deleteNodeComplete = async (
|
|
|
72
72
|
let sendMessageToOutUpdateNodeComplete = {
|
|
73
73
|
Message: JSON.stringify(deleteNodeComplete),
|
|
74
74
|
MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
|
|
75
|
-
TopicArn: await snsSharedLib.
|
|
75
|
+
TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GENERATE_CODE.outUpdateNodeComplete)
|
|
76
76
|
};
|
|
77
77
|
_izContext.logger.debug("Send Message to DeleteNodeComplete::", sendMessageToOutUpdateNodeComplete);
|
|
78
78
|
await sns.publishAsync(_izContext, sendMessageToOutUpdateNodeComplete)
|
|
@@ -87,15 +87,21 @@ function createFunctionYamlOutUpdateComplete(_izContext, srcPath) {
|
|
|
87
87
|
SQS_RESOURCE.getQueueUrl,
|
|
88
88
|
SQS_RESOURCE.receiveMessage,
|
|
89
89
|
SQS_RESOURCE.sendMessage
|
|
90
|
-
]
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
[
|
|
93
|
+
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName)),
|
|
94
|
+
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName) + "DLQ")
|
|
95
|
+
]
|
|
96
|
+
),
|
|
97
|
+
createIamRole(
|
|
98
|
+
{
|
|
91
99
|
[RESOURCE_CLASSES.sns]: [
|
|
92
100
|
SNS_RESOURCE.publish,
|
|
93
101
|
SNS_RESOURCE.subscribe
|
|
94
102
|
]
|
|
95
103
|
},
|
|
96
104
|
[
|
|
97
|
-
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName)),
|
|
98
|
-
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName) + "DLQ"),
|
|
99
105
|
resourceNames(RESOURCE_CLASSES.sns, upperCase(functionName) + "_In"),
|
|
100
106
|
resourceNames(RESOURCE_CLASSES.sns, upperCase(functionName) + "_Out")
|
|
101
107
|
]
|
|
@@ -101,7 +101,7 @@ module.exports.updateNodeComplete = async (
|
|
|
101
101
|
let sendMessageToOutUpdateNodeComplete = {
|
|
102
102
|
Message: JSON.stringify(updateCompleteMsg),
|
|
103
103
|
MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
|
|
104
|
-
TopicArn: await snsSharedLib.
|
|
104
|
+
TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GENERATE_CODE.outUpdateNodeComplete)
|
|
105
105
|
};
|
|
106
106
|
_izContext.logger.debug("Send Message to OutUpdateNodeComplete::", sendMessageToOutUpdateNodeComplete);
|
|
107
107
|
await sns.publishAsync(_izContext, sendMessageToOutUpdateNodeComplete)
|
|
@@ -67,15 +67,21 @@ function createFunctionYamlOutUpdateComplete(_izContext, srcPath) {
|
|
|
67
67
|
SQS_RESOURCE.getQueueUrl,
|
|
68
68
|
SQS_RESOURCE.receiveMessage,
|
|
69
69
|
SQS_RESOURCE.sendMessage
|
|
70
|
-
]
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
[
|
|
73
|
+
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName)),
|
|
74
|
+
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName) + "DLQ")
|
|
75
|
+
]
|
|
76
|
+
),
|
|
77
|
+
createIamRole(
|
|
78
|
+
{
|
|
71
79
|
[RESOURCE_CLASSES.sns]: [
|
|
72
80
|
SNS_RESOURCE.publish,
|
|
73
81
|
SNS_RESOURCE.subscribe
|
|
74
82
|
]
|
|
75
83
|
},
|
|
76
84
|
[
|
|
77
|
-
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName)),
|
|
78
|
-
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName) + "DLQ"),
|
|
79
85
|
resourceNames(RESOURCE_CLASSES.sns, upperCase(functionName) + "_In"),
|
|
80
86
|
resourceNames(RESOURCE_CLASSES.sns, upperCase(functionName) + "_Out")
|
|
81
87
|
]
|
|
@@ -93,7 +99,7 @@ function createFunctionYamlOutUpdateComplete(_izContext, srcPath) {
|
|
|
93
99
|
additionalResourcePermission,
|
|
94
100
|
resourceLocation: SOURCE_PATH.resourceLocationOutPerActionComplete,
|
|
95
101
|
functionNameConfig,
|
|
96
|
-
roleName: SOURCE_GENERATE_IAM_ROLE.
|
|
102
|
+
roleName: SOURCE_GENERATE_IAM_ROLE.ObjectCompleteRole,
|
|
97
103
|
},
|
|
98
104
|
setting: {
|
|
99
105
|
savePath: path.join(srcPath, SOURCE_PATH.appYaml),
|
|
@@ -101,7 +101,7 @@ module.exports.updateNodeComplete = async (
|
|
|
101
101
|
let sendMessageToOutUpdateNodeComplete = {
|
|
102
102
|
Message: JSON.stringify(updateCompleteMsg),
|
|
103
103
|
MessageAttributes: sns.createStringMessageAttributes(_izContext, messageAttributes),
|
|
104
|
-
TopicArn: await snsSharedLib.
|
|
104
|
+
TopicArn: await snsSharedLib.snsTopicArnByFlowSchema(_izContext, TOPIC_NAME_GENERATE_CODE.outUpdateNodeComplete)
|
|
105
105
|
};
|
|
106
106
|
_izContext.logger.debug("Send Message to OutUpdateNodeComplete::", sendMessageToOutUpdateNodeComplete);
|
|
107
107
|
await sns.publishAsync(_izContext, sendMessageToOutUpdateNodeComplete)
|
|
@@ -91,15 +91,21 @@ function createFunctionYamlOutUpdateComplete(_izContext, srcPath) {
|
|
|
91
91
|
SQS_RESOURCE.getQueueUrl,
|
|
92
92
|
SQS_RESOURCE.receiveMessage,
|
|
93
93
|
SQS_RESOURCE.sendMessage
|
|
94
|
-
]
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
[
|
|
97
|
+
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName)),
|
|
98
|
+
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName) + "DLQ")
|
|
99
|
+
]
|
|
100
|
+
),
|
|
101
|
+
createIamRole(
|
|
102
|
+
{
|
|
95
103
|
[RESOURCE_CLASSES.sns]: [
|
|
96
104
|
SNS_RESOURCE.publish,
|
|
97
105
|
SNS_RESOURCE.subscribe
|
|
98
106
|
]
|
|
99
107
|
},
|
|
100
108
|
[
|
|
101
|
-
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName)),
|
|
102
|
-
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName) + "DLQ"),
|
|
103
109
|
resourceNames(RESOURCE_CLASSES.sns, upperCase(functionName) + "_In"),
|
|
104
110
|
resourceNames(RESOURCE_CLASSES.sns, upperCase(functionName) + "_Out")
|
|
105
111
|
]
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
'use strict';
|
|
19
|
+
|
|
20
|
+
// Import required modules
|
|
21
|
+
console.log("generate main PropertySchema");
|
|
22
|
+
const { join } = require('path');
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
const modules = {
|
|
26
|
+
objectPropertyNodeSchema: require('@izara_project/izara-market-library-service-schemas/src/reStructure/TemplateData/propertyNodeSchema/objectPropertyNodeSchema/data'),
|
|
27
|
+
relationshipPropertyNodeSchema: require('@izara_project/izara-market-library-service-schemas/src/reStructure/TemplateData/propertyNodeSchema/relationshipPropertyNodeSchema/data')
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Generates code with templates for different actions
|
|
31
|
+
* @param {Object} _izContext - Context object
|
|
32
|
+
* @param {string} objSchemaPath - Path to the schema
|
|
33
|
+
* @returns {Array} Array of generated code parameters
|
|
34
|
+
*/
|
|
35
|
+
async function generateCodeWithTemplate(_izContext, objSchemaPath, settings) {
|
|
36
|
+
try {
|
|
37
|
+
let allCreateSource = [];
|
|
38
|
+
const srcPath = join(objSchemaPath, '../');
|
|
39
|
+
|
|
40
|
+
if (settings.generateName === "propertyNode") {
|
|
41
|
+
let objSchemaPropertyNode = await modules.objectPropertyNodeSchema(
|
|
42
|
+
_izContext,
|
|
43
|
+
settings,
|
|
44
|
+
srcPath
|
|
45
|
+
);
|
|
46
|
+
allCreateSource.push(...objSchemaPropertyNode);
|
|
47
|
+
|
|
48
|
+
let relationshipSchemaPropertyNode = await modules.relationshipPropertyNodeSchema(
|
|
49
|
+
_izContext,
|
|
50
|
+
settings,
|
|
51
|
+
srcPath
|
|
52
|
+
);
|
|
53
|
+
allCreateSource.push(relationshipSchemaPropertyNode);
|
|
54
|
+
|
|
55
|
+
} else {
|
|
56
|
+
throw Error(`Generate propertyNode schema Invalid generateName:${settings.generateName} `);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return allCreateSource;
|
|
60
|
+
} catch (error) {
|
|
61
|
+
_izContext.logger.error('Error generating code with template propertyNode schema:', error);
|
|
62
|
+
return [];
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
module.exports = generateCodeWithTemplate;
|