@izara_project/izara-market-library-service-schemas 1.0.41 → 1.0.44
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/MainLibs/src/Consts.js +1 -1
- package/src/reStructure/GenerateCode.js +2 -2
- package/src/reStructure/GenerateSchema.js +8 -8
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/create/template.ejs +23 -13
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/delete/template.ejs +25 -8
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/update/template.ejs +30 -21
- package/src/reStructure/TemplateData/externalService/snsTopicSubscriptions/data.js +0 -32
- package/src/reStructure/TemplateData/findData/mainFunction/template.ejs +4 -4
- package/src/reStructure/TemplateData/flowSchema/CreateRecordComplete/functionYaml/data.js +1 -1
- package/src/reStructure/TemplateData/flowSchema/CreateRecordComplete/functionYaml/template.ejs +1 -0
- package/src/reStructure/TemplateData/flowSchema/components/upload/confirmReserved/functionYaml/template.ejs +1 -0
- package/src/reStructure/TemplateData/flowSchema/components/upload/createObject/mainFunction/template.ejs +2 -3
- package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/functionYaml/template.ejs +1 -0
- package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/functionYaml/template.ejs +1 -0
- package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/createPresignUrl/mainFunction/template.ejs +1 -1
- package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/handler/template.ejs +1 -1
- package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/mainFunction/template.ejs +5 -5
- package/src/reStructure/TemplateData/flowSchema/components/upload/processFile/mainFunction/template.ejs +1 -1
- package/src/reStructure/TemplateData/flowSchema/components/websocket/connect/functionYaml/data.js +5 -2
- package/src/reStructure/TemplateData/flowSchema/dynamoDb/data.js +0 -20
- package/src/reStructure/TemplateData/flowSchema/eventBridge/functionYaml/data.js +7 -16
- package/src/reStructure/TemplateData/flowSchema/eventBridge/handler/inv/data.js +2 -2
- package/src/reStructure/TemplateData/flowSchema/eventBridge/handler/inv/template.ejs +0 -1
- package/src/reStructure/TemplateData/flowSchema/externalTopic/Complete/functionYaml/data.js +112 -0
- package/src/reStructure/TemplateData/flowSchema/externalTopic/{functionYaml → Complete/functionYaml}/template.ejs +1 -0
- package/src/reStructure/TemplateData/flowSchema/externalTopic/Complete/handler/data.js +93 -0
- package/src/reStructure/TemplateData/flowSchema/externalTopic/Complete/mainFunction/data.js +61 -0
- package/src/reStructure/TemplateData/flowSchema/externalTopic/Complete/mainFunction/template.ejs +96 -0
- package/src/reStructure/TemplateData/flowSchema/externalTopic/{functionYaml → Process/functionYaml}/data.js +20 -4
- package/src/reStructure/TemplateData/flowSchema/{flowSchemaOwnTopic/flowStep → externalTopic/Process}/functionYaml/template.ejs +1 -0
- package/src/reStructure/TemplateData/flowSchema/externalTopic/{handler → Process/handler}/data.js +3 -3
- package/src/reStructure/TemplateData/flowSchema/externalTopic/Process/handler/template.ejs +87 -0
- package/src/reStructure/TemplateData/flowSchema/externalTopic/{mainFunction → Process/mainFunction}/data.js +2 -2
- package/src/reStructure/TemplateData/flowSchema/externalTopic/{mainFunction → Process/mainFunction}/template.ejs +2 -2
- package/src/reStructure/TemplateData/flowSchema/externalTopic/sns-in-sqs/data.js +14 -4
- package/src/reStructure/TemplateData/flowSchema/externalTopic/sns-in-sqs/sqsTemplate.ejs +52 -0
- package/src/reStructure/TemplateData/flowSchema/externalTopic/sns-out/data.js +1 -1
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/functionYaml/data.js +4 -4
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/functionYaml/template.ejs +1 -0
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/handler/data.js +1 -2
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/handler/template.ejs +1 -1
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/mainFunction/data.js +5 -5
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/mainFunction/template.ejs +5 -2
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/functionYaml/data.js +1 -1
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/functionYaml/template.ejs +1 -0
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/handler/data.js +1 -1
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/handler/template.ejs +2 -0
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/mainFunction/data.js +3 -2
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/mainFunction/template.ejs +2 -2
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/functionYaml/data.js +1 -1
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/mainFunction/data.js +1 -1
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/mainFunction/template.ejs +2 -2
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/sns-in/data.js +9 -21
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/sns-in/sqsTemplate.ejs +0 -10
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/sns-out/data.js +1 -1
- package/src/reStructure/TemplateData/flowSchema/{flowSchemaOwnTopic/flowStep → flowStep}/functionYaml/data.js +36 -23
- package/src/reStructure/TemplateData/flowSchema/flowStep/functionYaml/template.ejs +20 -0
- package/src/reStructure/TemplateData/flowSchema/{flowSchemaOwnTopic/flowStep → flowStep}/handler/data.js +22 -18
- package/src/reStructure/TemplateData/flowSchema/{flowSchemaOwnTopic/flowStep → flowStep}/mainFunction/data.js +22 -18
- package/src/reStructure/TemplateData/flowSchema/flowStep/sns-in/data.js +90 -0
- package/src/reStructure/TemplateData/flowSchema/flowStep/sns-in/template.ejs +45 -0
- package/src/reStructure/TemplateData/flowSchema/generateTemplateData.js +41 -25
- package/src/reStructure/TemplateData/flowSchema/register/complete/functionYaml/data.js +1 -0
- package/src/reStructure/TemplateData/flowSchema/register/complete/functionYaml/template.ejs +1 -0
- package/src/reStructure/TemplateData/flowSchema/register/complete/handler/data.js +0 -1
- package/src/reStructure/TemplateData/flowSchema/register/complete/mainFunction/template.ejs +17 -18
- package/src/reStructure/TemplateData/flowSchema/register/dynamoDB/register.js +0 -17
- package/src/reStructure/TemplateData/flowSchema/register/sns-in/data.js +0 -1
- package/src/reStructure/TemplateData/flowSchema/register/subscriptionOutAll/data.js +1 -3
- package/src/reStructure/TemplateData/flowSchema/register/subscriptionOutAll/template.ejs +2 -2
- package/src/reStructure/TemplateData/flowSchema/register/wbs/functionYaml/data.js +0 -29
- package/src/reStructure/TemplateData/flowSchema/register/wbs/handler/data.js +0 -1
- package/src/reStructure/TemplateData/flowSchema/register/wbs/handler/template.ejs +0 -5
- package/src/reStructure/TemplateData/flowSchema/register/wbs/mainFunction/template.ejs +16 -15
- package/src/reStructure/TemplateData/flowSchema/templateBystatusType/triggerCacheTemplate.ejs +7 -1
- package/src/reStructure/TemplateData/flowSchema/webSocketComplete/functionYaml/data.js +1 -1
- package/src/reStructure/TemplateData/flowSchema/webSocketComplete/functionYaml/template.ejs +2 -1
- package/src/reStructure/TemplateData/flowSchema/webSocketComplete/sqs/data.js +97 -0
- package/src/reStructure/TemplateData/flowSchema/webSocketComplete/sqs/template.ejs +52 -0
- package/src/reStructure/TemplateData/perActionComplete/create/handler/template.ejs +3 -3
- package/src/reStructure/TemplateData/perActionComplete/create/mainFunction/template.ejs +6 -0
- package/src/reStructure/TemplateData/perActionComplete/create/yaml/template.ejs +1 -0
- package/src/reStructure/TemplateData/perActionComplete/delete/handler/template.ejs +3 -3
- package/src/reStructure/TemplateData/perActionComplete/delete/yaml/template.ejs +1 -0
- package/src/reStructure/TemplateData/perActionComplete/get/handler/template.ejs +3 -3
- package/src/reStructure/TemplateData/perActionComplete/get/yaml/template.ejs +1 -0
- package/src/reStructure/TemplateData/perActionComplete/update/handler/template.ejs +3 -3
- package/src/reStructure/TemplateData/perActionComplete/update/yaml/template.ejs +1 -0
- package/src/reStructure/TemplateData/perActionEndpoint/mainFunction/update/template.ejs +12 -12
- package/src/reStructure/TemplateData/propertyValueSchema/generateTemplateData.js +19 -19
- package/src/reStructure/TemplateData/propertyValueSchema/objectPropertyValueSchema/data.js +82 -79
- package/src/reStructure/TemplateData/propertyValueSchema/relationshipPropertyValueSchema/data.js +33 -37
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/mainFunction/template.ejs +7 -5
- package/src/reStructure/TemplateData/relationshipPerAction/create/complete/functionYaml/data.js +4 -2
- package/src/reStructure/TemplateData/relationshipPerAction/create/complete/functionYaml/template.ejs +1 -0
- package/src/reStructure/TemplateData/relationshipPerAction/create/complete/mainFunction/template.ejs +4 -4
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/mainFunction/template.ejs +7 -5
- package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/functionYaml/data.js +6 -3
- package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/functionYaml/template.ejs +1 -0
- package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/mainFunction/template.ejs +4 -4
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/mainFunction/template.ejs +3 -3
- package/src/reStructure/TemplateData/relationshipPerAction/get/complete/functionYaml/data.js +6 -3
- package/src/reStructure/TemplateData/relationshipPerAction/get/complete/functionYaml/template.ejs +1 -0
- package/src/reStructure/TemplateData/relationshipPerAction/get/complete/mainFunction/template.ejs +1 -1
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/mainFunction/template.ejs +5 -3
- package/src/reStructure/TemplateData/relationshipPerAction/update/complete/functionYaml/data.js +6 -3
- package/src/reStructure/TemplateData/relationshipPerAction/update/complete/functionYaml/template.ejs +1 -0
- package/src/reStructure/TemplateData/relationshipPerAction/update/complete/mainFunction/template.ejs +4 -4
- package/src/reStructure/libs/ValidateAddOnDataStructure.js +5 -5
- /package/src/reStructure/TemplateData/flowSchema/externalTopic/{handler → Complete/handler}/template.ejs +0 -0
- /package/src/reStructure/TemplateData/flowSchema/{flowSchemaOwnTopic/flowStep → flowStep}/handler/template.ejs +0 -0
- /package/src/reStructure/TemplateData/flowSchema/{flowSchemaOwnTopic/flowStep → flowStep}/mainFunction/template.ejs +0 -0
package/package.json
CHANGED
|
@@ -276,7 +276,7 @@ const FUNCTION_NAME = {
|
|
|
276
276
|
flowSchemaOwnTopicEndpoint: "flowSchemaOwnTopicEndpoint",
|
|
277
277
|
flowSchemaOwnTopicEndpointComplete: "flowSchemaOwnTopicEndpointComplete",
|
|
278
278
|
flowSchemaExternalTopic: "externalTopic",
|
|
279
|
-
flowSchemaEventBridge: "
|
|
279
|
+
flowSchemaEventBridge: "EventBridge",
|
|
280
280
|
createRecordComplete: "createRecordComplete",
|
|
281
281
|
flowSchemaRegister: "register",
|
|
282
282
|
};
|
|
@@ -36,7 +36,7 @@ const { createSharedResource } = require('./TemplateData/generateRole/createShar
|
|
|
36
36
|
|
|
37
37
|
async function generateCodeWithTemplate(_izContext, objSchemaPath) {
|
|
38
38
|
try {
|
|
39
|
-
console.log('objSchemaPath', objSchemaPath);
|
|
39
|
+
// console.log('objSchemaPath', objSchemaPath);
|
|
40
40
|
// --------- Prepare path -------------
|
|
41
41
|
// point to app/src
|
|
42
42
|
let saveFilePath = join(objSchemaPath, `../`);
|
|
@@ -65,7 +65,7 @@ async function generateCodeWithTemplate(_izContext, objSchemaPath) {
|
|
|
65
65
|
// * iterate templateConfig for generate data
|
|
66
66
|
for (const templateName in templateConfig.TemplateAndData) {
|
|
67
67
|
// Display log indicating which template is being loaded
|
|
68
|
-
console.log('Loading template:', templateName);
|
|
68
|
+
// console.log('Loading template:', templateName);
|
|
69
69
|
|
|
70
70
|
let generateTemplateData = require(join(__dirname, templateConfig.TemplateAndData[templateName]));
|
|
71
71
|
let createSourceResult = await generateTemplateData(_izContext, objSchemaPath);
|
|
@@ -34,15 +34,15 @@ const { validatePathWithRootServicePath } = require("./libs/GenerateCodeLibs");
|
|
|
34
34
|
|
|
35
35
|
async function generateSchema(_izContext, objSchemaPath, generateSchemaSettings) {
|
|
36
36
|
try {
|
|
37
|
-
console.log('
|
|
37
|
+
// console.log('generateSchema', { objSchemaPath, generateSchemaSettings });
|
|
38
38
|
// --------- Prepare path -------------
|
|
39
39
|
// point to app/src
|
|
40
40
|
let saveFilePath = join(objSchemaPath, `../`);
|
|
41
|
-
console.log("saveFilePath: ", saveFilePath);
|
|
41
|
+
// console.log("saveFilePath: ", saveFilePath);
|
|
42
42
|
|
|
43
43
|
// point to root folder of service
|
|
44
44
|
let localServicePath = join(saveFilePath, "../../");
|
|
45
|
-
console.log("localServicePath: ", localServicePath);
|
|
45
|
+
// console.log("localServicePath: ", localServicePath);
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
//------ Start Create Source ------
|
|
@@ -70,14 +70,14 @@ async function generateSchema(_izContext, objSchemaPath, generateSchemaSettings)
|
|
|
70
70
|
for (const generateSetting of generateSchemaSettings) {
|
|
71
71
|
console.log('Loading template:', generateSetting.generateName);
|
|
72
72
|
console.log('Setting data:', generateSetting);
|
|
73
|
-
console.log('schemaPath:', schemaConfig.TemplateAndData[generateSetting.generateName]);
|
|
74
|
-
console.log('schemaPath:', join(__dirname, schemaConfig.TemplateAndData[generateSetting.generateName]));
|
|
73
|
+
// console.log('schemaPath:', schemaConfig.TemplateAndData[generateSetting.generateName]);
|
|
74
|
+
// console.log('schemaPath:', join(__dirname, schemaConfig.TemplateAndData[generateSetting.generateName]));
|
|
75
75
|
|
|
76
76
|
// get generateSchema template depend on generateName
|
|
77
77
|
let generateSchemaData = require(join(__dirname, schemaConfig.TemplateAndData[generateSetting.generateName]));
|
|
78
|
-
console.log("generateSchemaData: ", generateSchemaData);
|
|
78
|
+
// console.log("generateSchemaData: ", generateSchemaData);
|
|
79
79
|
|
|
80
|
-
let createSourceResult = await generateSchemaData(_izContext, objSchemaPath,
|
|
80
|
+
let createSourceResult = await generateSchemaData(_izContext, objSchemaPath, generateSchemaSettings);
|
|
81
81
|
|
|
82
82
|
// Filter out empty or invalid objects before adding to allCreateSource
|
|
83
83
|
if (Array.isArray(createSourceResult)) {
|
|
@@ -115,7 +115,7 @@ async function generateSchema(_izContext, objSchemaPath, generateSchemaSettings)
|
|
|
115
115
|
|
|
116
116
|
// validate path before empty folder
|
|
117
117
|
for (let emptyPath of allEmptyPath) {
|
|
118
|
-
console.log("emptyPath: ", emptyPath);
|
|
118
|
+
// console.log("emptyPath: ", emptyPath);
|
|
119
119
|
validatePathWithRootServicePath(localServicePath, emptyPath)
|
|
120
120
|
}
|
|
121
121
|
|
|
@@ -84,15 +84,6 @@ module.exports.createMain = async (
|
|
|
84
84
|
|
|
85
85
|
let errorsFound = [];
|
|
86
86
|
|
|
87
|
-
const userId = _izContext.correlationIds.get(coreConsts.BASE_USER_ID);
|
|
88
|
-
const targetId = _izContext.correlationIds.get(coreConsts.TARGET_ID)
|
|
89
|
-
if (!userId) {
|
|
90
|
-
errorsFound.push("Not have userId")
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
//(<beforeQuery>)
|
|
94
|
-
//(</beforeQuery>)
|
|
95
|
-
|
|
96
87
|
const objType = createObjType(requestParams.objectType);
|
|
97
88
|
|
|
98
89
|
let objectSchema = await getObjectSchema.getObjSchemaS3WithHierarchy(
|
|
@@ -101,15 +92,32 @@ module.exports.createMain = async (
|
|
|
101
92
|
);
|
|
102
93
|
_izContext.logger.debug("objectSchema", objectSchema);
|
|
103
94
|
|
|
95
|
+
let userId;
|
|
96
|
+
let targetId;
|
|
97
|
+
if (objectSchema.generatedBy === "userGenerated") {
|
|
98
|
+
userId = _izContext.correlationIds.get(coreConsts.BASE_USER_ID);
|
|
99
|
+
targetId = _izContext.correlationIds.get(coreConsts.TARGET_ID)
|
|
100
|
+
|
|
101
|
+
if (!userId) {
|
|
102
|
+
errorsFound.push("Not have userId")
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (objectSchema.hasOwnProperty("belongTo") && !targetId) {
|
|
106
|
+
errorsFound.push('not have targetId')
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
//(<beforeQuery>)
|
|
111
|
+
//(</beforeQuery>)
|
|
112
|
+
|
|
113
|
+
|
|
104
114
|
let objectSchemas = uploadUseCase.generateObjectSchemaForCombineFieldNames(
|
|
105
115
|
_izContext,
|
|
106
116
|
objectSchema
|
|
107
117
|
);
|
|
108
118
|
_izContext.logger.debug("objectSchemas", objectSchemas);
|
|
109
119
|
|
|
110
|
-
|
|
111
|
-
errorsFound.push('not have targetId')
|
|
112
|
-
}
|
|
120
|
+
|
|
113
121
|
|
|
114
122
|
let createDataDetails = await createDataDetailsLib(_izContext, objectSchemas);
|
|
115
123
|
_izContext.logger.debug("createDataDetails is =", createDataDetails);
|
|
@@ -412,8 +420,10 @@ module.exports.createMain = async (
|
|
|
412
420
|
messageObject,
|
|
413
421
|
callingFlowSharedLib.addParentCallingFlowConfig(
|
|
414
422
|
callingFlowConfig, // resive parent callingFlowConfig.
|
|
415
|
-
callingFlowSharedLib.createCallingFlowConfig( //
|
|
423
|
+
callingFlowSharedLib.createCallingFlowConfig( // calling flow own service
|
|
424
|
+
//(<callingFlowProperties>)
|
|
416
425
|
await lambdaSharedLib.lambdaFunctionName(_izContext, TOPIC_NAME_GENERATE_CODE.createNodeComplete), {}
|
|
426
|
+
//(</callingFlowProperties>)
|
|
417
427
|
)
|
|
418
428
|
)
|
|
419
429
|
);
|
|
@@ -70,18 +70,33 @@ module.exports.deleteMain = async (
|
|
|
70
70
|
callingFlowConfig: callingFlowConfig
|
|
71
71
|
});
|
|
72
72
|
|
|
73
|
-
let errorsFound = []
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
let errorsFound = [];
|
|
74
|
+
|
|
75
|
+
const objType = createObjType(requestParams.objectType);
|
|
76
|
+
|
|
77
|
+
let objectSchema = await getObjectSchema.getObjSchemaS3WithHierarchy(
|
|
78
|
+
_izContext,
|
|
79
|
+
objType
|
|
80
|
+
);
|
|
81
|
+
_izContext.logger.debug("objectSchema", objectSchema);
|
|
82
|
+
|
|
83
|
+
let userId;
|
|
84
|
+
let targetId;
|
|
85
|
+
if (objectSchema.generatedBy === "userGenerated") {
|
|
86
|
+
userId = _izContext.correlationIds.get(coreConsts.BASE_USER_ID);
|
|
87
|
+
targetId = _izContext.correlationIds.get(coreConsts.TARGET_ID)
|
|
88
|
+
|
|
89
|
+
if (!userId) {
|
|
90
|
+
errorsFound.push("Not have userId")
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if (objectSchema.hasOwnProperty("belongTo") && !targetId) {
|
|
94
|
+
errorsFound.push('not have targetId')
|
|
95
|
+
}
|
|
77
96
|
}
|
|
78
97
|
|
|
79
98
|
//(<beforeQuery>)
|
|
80
99
|
//(</beforeQuery>)
|
|
81
|
-
const objType = createObjType(requestParams.objectType);
|
|
82
|
-
let objectSchema = await getObjectSchema.getObjSchemaS3WithCache(_izContext,
|
|
83
|
-
objType)
|
|
84
|
-
_izContext.logger.debug("objectSchema", objectSchema)
|
|
85
100
|
|
|
86
101
|
/*
|
|
87
102
|
create deleteDataDetail that decade what storage that have to access or not
|
|
@@ -150,7 +165,9 @@ module.exports.deleteMain = async (
|
|
|
150
165
|
callingFlowSharedLib.addParentCallingFlowConfig(
|
|
151
166
|
callingFlowConfig,
|
|
152
167
|
callingFlowSharedLib.createCallingFlowConfig(
|
|
168
|
+
//(<callingFlowProperties>)
|
|
153
169
|
await lambdaSharedLib.lambdaFunctionName(_izContext, TOPIC_NAME_GENERATE_CODE.deleteNodeComplete), {}
|
|
170
|
+
//(</callingFlowProperties>)
|
|
154
171
|
)
|
|
155
172
|
)
|
|
156
173
|
)
|
|
@@ -71,12 +71,29 @@ module.exports.updateMain = async (
|
|
|
71
71
|
callingFlowConfig
|
|
72
72
|
});
|
|
73
73
|
|
|
74
|
-
let
|
|
75
|
-
const userId = _izContext.correlationIds.get(coreConsts.BASE_USER_ID);
|
|
76
|
-
const targetId = _izContext.correlationIds.get(coreConsts.TARGET_ID);
|
|
74
|
+
let errorsFound = [];
|
|
77
75
|
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
const objType = createObjType(requestParams.objectType);
|
|
77
|
+
|
|
78
|
+
let objectSchema = await getObjectSchema.getObjSchemaS3WithHierarchy(
|
|
79
|
+
_izContext,
|
|
80
|
+
objType
|
|
81
|
+
);
|
|
82
|
+
_izContext.logger.debug("objectSchema", objectSchema);
|
|
83
|
+
|
|
84
|
+
let userId;
|
|
85
|
+
let targetId;
|
|
86
|
+
if (objectSchema.generatedBy === "userGenerated") {
|
|
87
|
+
userId = _izContext.correlationIds.get(coreConsts.BASE_USER_ID);
|
|
88
|
+
targetId = _izContext.correlationIds.get(coreConsts.TARGET_ID)
|
|
89
|
+
|
|
90
|
+
if (!userId) {
|
|
91
|
+
errorsFound.push("Not have userId")
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (objectSchema.hasOwnProperty("belongTo") && !targetId) {
|
|
95
|
+
errorsFound.push('not have targetId')
|
|
96
|
+
}
|
|
80
97
|
}
|
|
81
98
|
|
|
82
99
|
//(<beforeQuery>)
|
|
@@ -91,16 +108,6 @@ module.exports.updateMain = async (
|
|
|
91
108
|
fields: fields,
|
|
92
109
|
versionedDataIds: versionedDataIds
|
|
93
110
|
})
|
|
94
|
-
const objType = createObjType(requestParams.objectType);
|
|
95
|
-
let objectSchema = await getObjSchemaS3WithHierarchy(
|
|
96
|
-
_izContext,
|
|
97
|
-
objType
|
|
98
|
-
)
|
|
99
|
-
_izContext.logger.debug("objectSchema", objectSchema);
|
|
100
|
-
|
|
101
|
-
if (objectSchema.hasOwnProperty("belongTo") && !targetId) {
|
|
102
|
-
errorFounds.push('not have targetId')
|
|
103
|
-
}
|
|
104
111
|
|
|
105
112
|
let updateDataDetails = await createUpdateDataDetail(_izContext, objectSchema);
|
|
106
113
|
|
|
@@ -143,23 +150,23 @@ module.exports.updateMain = async (
|
|
|
143
150
|
_izContext.logger.debug("missingVersionedDataIdLabels:: ", missingVersionedDataIdLabels);
|
|
144
151
|
|
|
145
152
|
if (missingVersionedDataIdLabels.length) {
|
|
146
|
-
|
|
153
|
+
errorsFound.push(`missing versionedDataIds of versionedDataLabel '${missingVersionedDataIdLabels.join(", ")}'`)
|
|
147
154
|
}
|
|
148
155
|
|
|
149
156
|
// check missing update data of versionedDataLabels
|
|
150
157
|
const missingDataVersionedDataLabels = versionedDataIdLabelKeys.filter(label => !versionedDataIdLabelKeys.includes(label))
|
|
151
158
|
if (missingDataVersionedDataLabels.length) {
|
|
152
|
-
|
|
159
|
+
errorsFound.push(`missing data of versionedDataLabels '${missingDataVersionedDataLabels.join(", ")}'`);
|
|
153
160
|
}
|
|
154
161
|
// check mainNode Data should not exists
|
|
155
162
|
if (Object.keys(updateMainNodeData).length) {
|
|
156
|
-
|
|
163
|
+
errorsFound.push("cannot update mainNode if have versionedDataIds");
|
|
157
164
|
}
|
|
158
165
|
}
|
|
159
166
|
|
|
160
167
|
let messageAttributes
|
|
161
168
|
|
|
162
|
-
if (
|
|
169
|
+
if (errorsFound.length) {
|
|
163
170
|
let updateNodeCompleteMessage = {
|
|
164
171
|
objType: objType,
|
|
165
172
|
objInstanceFull: {
|
|
@@ -168,7 +175,7 @@ module.exports.updateMain = async (
|
|
|
168
175
|
},
|
|
169
176
|
versionedDataIds: versionedDataIds,
|
|
170
177
|
status: 'error',
|
|
171
|
-
|
|
178
|
+
errorsFound: errorsFound
|
|
172
179
|
};
|
|
173
180
|
|
|
174
181
|
|
|
@@ -240,7 +247,9 @@ module.exports.updateMain = async (
|
|
|
240
247
|
callingFlowSharedLib.addParentCallingFlowConfig(
|
|
241
248
|
callingFlowConfig,
|
|
242
249
|
callingFlowSharedLib.createCallingFlowConfig(
|
|
250
|
+
//(<callingFlowProperties>)
|
|
243
251
|
await lambdaSharedLib.lambdaFunctionName(_izContext, TOPIC_NAME_GENERATE_CODE.updateNodeComplete), {}
|
|
252
|
+
//(</callingFlowProperties>)
|
|
244
253
|
)
|
|
245
254
|
)
|
|
246
255
|
)
|
|
@@ -345,7 +354,7 @@ module.exports.updateMain = async (
|
|
|
345
354
|
versionedDataIds: versionedDataIds
|
|
346
355
|
},
|
|
347
356
|
status: "complete",
|
|
348
|
-
|
|
357
|
+
errorsFound
|
|
349
358
|
}
|
|
350
359
|
} catch (err) {
|
|
351
360
|
_izContext.logger.error('error AddressUpdate: ', err)
|
|
@@ -75,14 +75,6 @@ const createExternalSnsSubscriptions = async (_izContext, allObjSchemas, allRelS
|
|
|
75
75
|
const snsServiceConfigForConfirmReserved = await snsSubscriptionConfirmReserved(_izContext);
|
|
76
76
|
snsServiceConfigForConfirmReserved && snsServiceConfigArray.push(snsServiceConfigForConfirmReserved);
|
|
77
77
|
}
|
|
78
|
-
if (event.includes("extTopic")) {
|
|
79
|
-
const snsServiceConfigForExtTopic = await snsSubscriptionFlowSchemaExternalTopic(_izContext, localFlowSchema);
|
|
80
|
-
snsServiceConfigForExtTopic && snsServiceConfigArray.push(snsServiceConfigForExtTopic);
|
|
81
|
-
}
|
|
82
|
-
if (!localFlowSchema.statusType === "none") {
|
|
83
|
-
const snsServiceConfigForCreateRecordByStatusType = await createFlowSchemaRegisterSnsTopicSubscriptions(_izContext, localFlowSchema);
|
|
84
|
-
snsServiceConfigForCreateRecordByStatusType && snsServiceConfigArray.push(snsServiceConfigForCreateRecordByStatusType);
|
|
85
|
-
}
|
|
86
78
|
}
|
|
87
79
|
}
|
|
88
80
|
}
|
|
@@ -184,28 +176,4 @@ function snsSubscriptionConfirmReserved(_izContext) {
|
|
|
184
176
|
}
|
|
185
177
|
}
|
|
186
178
|
|
|
187
|
-
function snsSubscriptionFlowSchemaExternalTopic(_izContext, localFlowSchema) {
|
|
188
|
-
const flowStepOut = Object.keys(localFlowSchema.flowSteps)[1]
|
|
189
|
-
const splitFlowStepOutKey = flowStepOut.split("_");
|
|
190
|
-
const queueNameExtTopic = upperCase(FUNCTION_NAME.flowSchemaExternalTopic)
|
|
191
|
-
|
|
192
|
-
return {
|
|
193
|
-
serviceTag: [splitFlowStepOutKey[0]],
|
|
194
|
-
topicName: splitFlowStepOutKey[2] + '_' + splitFlowStepOutKey[3],
|
|
195
|
-
sqsEndpoint: queueNameExtTopic
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
function createFlowSchemaRegisterSnsTopicSubscriptions(_izContext, localFlowSchema) {
|
|
200
|
-
const flowStepKeys = Object.keys(localFlowSchema.flowSteps)[1];
|
|
201
|
-
const flowStepKeySplit = flowStepKeys.split("_");
|
|
202
|
-
const registerCompleteSqs = upperCase(FUNCTION_NAME.flowSchemaRegister);
|
|
203
|
-
|
|
204
|
-
return {
|
|
205
|
-
serviceTag: [flowStepKeySplit[0]],
|
|
206
|
-
topicName: flowStepKeySplit[2],
|
|
207
|
-
sqsEndpoint: registerCompleteSqs,
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
|
|
211
179
|
module.exports = createExternalSnsSubscriptions;
|
|
@@ -121,17 +121,17 @@ exports.findData = async (
|
|
|
121
121
|
<%- createAdditionalFieldNamesTag(objectType) %>
|
|
122
122
|
<% } _%>
|
|
123
123
|
else <% } _%> {
|
|
124
|
-
errorsFound.push("
|
|
124
|
+
errorsFound.push("unrecognized fieldName")
|
|
125
125
|
standardErrorParams.push(errorsFound)
|
|
126
126
|
await findDataSharedLib.completeFindDataMain(...standardErrorParams);
|
|
127
127
|
return;
|
|
128
128
|
}
|
|
129
129
|
} <% if (idx + 1 == datas.length) { %>
|
|
130
|
-
//(<
|
|
131
|
-
//(</
|
|
130
|
+
//(<additionalObjectType>)
|
|
131
|
+
//(</additionalObjectType>)
|
|
132
132
|
<% } _%>
|
|
133
133
|
else<% } %> {
|
|
134
|
-
errorsFound.push("
|
|
134
|
+
errorsFound.push("unrecognized objectType")
|
|
135
135
|
standardErrorParams.push(errorsFound)
|
|
136
136
|
await findDataSharedLib.completeFindDataMain(...standardErrorParams);
|
|
137
137
|
return;
|
|
@@ -99,7 +99,7 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
99
99
|
// )
|
|
100
100
|
// )
|
|
101
101
|
// }
|
|
102
|
-
console.log({ additionalResourcePermission: JSON.stringify(additionalResourcePermission, null, 2) })
|
|
102
|
+
// console.log({ additionalResourcePermission: JSON.stringify(additionalResourcePermission, null, 2) })
|
|
103
103
|
|
|
104
104
|
return {
|
|
105
105
|
templatePath: templatePath,
|
package/src/reStructure/TemplateData/flowSchema/CreateRecordComplete/functionYaml/template.ejs
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
batchSize: 10
|
|
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
|
+
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
11
12
|
role: <%- roleName %>Role
|
|
12
13
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
13
14
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
batchSize: 10
|
|
9
9
|
filterPatterns: #**** need to update serverless framwork upper v.2.69.1
|
|
10
10
|
- body: {"MessageAttributes":{"callingFlow":{"Value":["${self:custom.iz_resourcePrefix}<%- firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handlerType) %>"]}}} # functionName of callingFlow
|
|
11
|
+
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
11
12
|
role: <%- roleName %>Role
|
|
12
13
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
13
14
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
|
@@ -69,9 +69,8 @@ module.exports.createObject = async (
|
|
|
69
69
|
_izContext.correlationIds.set(coreConsts.TARGET_ID, "BasDevTarget");
|
|
70
70
|
|
|
71
71
|
let flowSchema = await getObjectSchema.getFlowSchemaS3WithCache(_izContext, {
|
|
72
|
-
flowTag:
|
|
72
|
+
flowTag: "<%- flowTag %>",
|
|
73
73
|
serviceTag: process.env.iz_serviceTag
|
|
74
|
-
// serviceTag: "GenerateCodeTamplateBas002"
|
|
75
74
|
})
|
|
76
75
|
|
|
77
76
|
_izContext.logger.debug("getFlowSchema", flowSchema)
|
|
@@ -89,7 +88,7 @@ module.exports.createObject = async (
|
|
|
89
88
|
|
|
90
89
|
// get objectType
|
|
91
90
|
let objectSchema = await getObjectSchema.getObjSchemaS3WithHierarchy(_izContext, flowSchema.objType)
|
|
92
|
-
_izContext.logger.debug("objectSchema in
|
|
91
|
+
_izContext.logger.debug("objectSchema in flowSchema mainFunction", objectSchema)
|
|
93
92
|
|
|
94
93
|
_izContext.correlationIds.get(coreConsts.X_CORRELATION_ID)
|
|
95
94
|
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
batchSize: 10
|
|
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
|
+
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
11
12
|
role: <%- roleName %>Role
|
|
12
13
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
13
14
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
batchSize: 10
|
|
9
9
|
filterPatterns: #**** need to update serverless framwork upper v.2.69.1
|
|
10
10
|
- body: {"MessageAttributes":{"callingFlow":{"Value":["${self:custom.iz_resourcePrefix}<%- firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handlerType) %>"]}}} # functionName of callingFlow
|
|
11
|
+
- body: {"MessageAttributes":{"callingFlow":{"Value":[{"exists":false}]}}}
|
|
11
12
|
role: <%- roleName %>Role
|
|
12
13
|
#<#<%- functionName %><%- handlerType %>IamRole#>
|
|
13
14
|
#<#/<%- functionName %><%- handlerType %>IamRole#>
|
|
@@ -222,7 +222,7 @@ module.exports.createPresignUrl = async (
|
|
|
222
222
|
updateImportBatchMainMsg,
|
|
223
223
|
callingFlowSharedLib.addParentCallingFlowConfig(
|
|
224
224
|
returnMessage, // resive parent callingFlowConfig.
|
|
225
|
-
callingFlowSharedLib.createCallingFlowConfig( //
|
|
225
|
+
callingFlowSharedLib.createCallingFlowConfig( // calling flow own service
|
|
226
226
|
await lambdaSharedLib.lambdaFunctionName(_izContext, `WebSocketTaskComplete`), {}
|
|
227
227
|
)
|
|
228
228
|
)
|
|
@@ -44,7 +44,7 @@ const importDataLibs = require('../../../../libs/source/GenerateCodeLibs');
|
|
|
44
44
|
module.exports.reservedLimit = async (
|
|
45
45
|
_izContext,
|
|
46
46
|
objType,
|
|
47
|
-
|
|
47
|
+
objInstanceFull,
|
|
48
48
|
callingFlowConfig = {}
|
|
49
49
|
) => {
|
|
50
50
|
|
|
@@ -52,7 +52,7 @@ module.exports.reservedLimit = async (
|
|
|
52
52
|
|
|
53
53
|
_izContext.logger.debug('----- reservedLimit event params ----- ', {
|
|
54
54
|
objType,
|
|
55
|
-
|
|
55
|
+
objInstanceFull,
|
|
56
56
|
callingFlowConfig
|
|
57
57
|
});
|
|
58
58
|
const {
|
|
@@ -64,10 +64,10 @@ module.exports.reservedLimit = async (
|
|
|
64
64
|
fileName,
|
|
65
65
|
fileSize,
|
|
66
66
|
startTime
|
|
67
|
-
} =
|
|
67
|
+
} = objInstanceFull.fields
|
|
68
68
|
const {
|
|
69
69
|
importBatchId
|
|
70
|
-
} =
|
|
70
|
+
} = objInstanceFull.identifiers
|
|
71
71
|
|
|
72
72
|
let connectionId = _izContext.correlationIds.get(coreConsts.CONNECTION_ID)
|
|
73
73
|
//* hard code
|
|
@@ -154,7 +154,7 @@ module.exports.reservedLimit = async (
|
|
|
154
154
|
|
|
155
155
|
return {
|
|
156
156
|
objType,
|
|
157
|
-
|
|
157
|
+
objInstanceFull,
|
|
158
158
|
}
|
|
159
159
|
} catch (err) {
|
|
160
160
|
_izContext.logger.error('error GetSignedUrlAccountLimit: ', err);
|
|
@@ -150,7 +150,7 @@ module.exports.processAfterUpload = async (
|
|
|
150
150
|
fileS3Buffer = Buffer.concat(await fileS3Body.toArray());
|
|
151
151
|
_izContext.logger.debug("fileS3Buffer", fileS3Buffer)
|
|
152
152
|
} else {
|
|
153
|
-
errorsFound.push('
|
|
153
|
+
errorsFound.push('unknown object stream type');
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
// check file type
|
package/src/reStructure/TemplateData/flowSchema/components/websocket/connect/functionYaml/data.js
CHANGED
|
@@ -46,7 +46,10 @@ function createWebSocketConnectYaml(_izContext, srcPath) {
|
|
|
46
46
|
{
|
|
47
47
|
[RESOURCE_CLASSES.dynamoDbTable]: [
|
|
48
48
|
DYNAMO_RESOURCE.putItem,
|
|
49
|
-
DYNAMO_RESOURCE.
|
|
49
|
+
DYNAMO_RESOURCE.getItem,
|
|
50
|
+
DYNAMO_RESOURCE.query,
|
|
51
|
+
DYNAMO_RESOURCE.deleteItem,
|
|
52
|
+
DYNAMO_RESOURCE.updateItem
|
|
50
53
|
]
|
|
51
54
|
},
|
|
52
55
|
[
|
|
@@ -71,7 +74,7 @@ function createWebSocketConnectYaml(_izContext, srcPath) {
|
|
|
71
74
|
functionName,
|
|
72
75
|
resourceLocation: SOURCE_PATH.resourceLocationWebSocketMain,
|
|
73
76
|
additionalResourcePermission,
|
|
74
|
-
roleName: "
|
|
77
|
+
roleName: "WebSocketMain"
|
|
75
78
|
|
|
76
79
|
},
|
|
77
80
|
setting: {
|
|
@@ -80,32 +80,12 @@ const createAwaitingMultipleStepDynamoDbData = (_izContext, flowSchema, allLocal
|
|
|
80
80
|
AttributeType: "S"
|
|
81
81
|
}));
|
|
82
82
|
|
|
83
|
-
let additionalResourcePermission = defaultIamRolePerAction();
|
|
84
|
-
additionalResourcePermission.push(
|
|
85
|
-
createIamRole(
|
|
86
|
-
{
|
|
87
|
-
[RESOURCE_CLASSES.dynamoDbTable]: [
|
|
88
|
-
DYNAMO_RESOURCE.putItem,
|
|
89
|
-
DYNAMO_RESOURCE.getItem,
|
|
90
|
-
DYNAMO_RESOURCE.query,
|
|
91
|
-
DYNAMO_RESOURCE.deleteItem,
|
|
92
|
-
DYNAMO_RESOURCE.updateItem
|
|
93
|
-
]
|
|
94
|
-
},
|
|
95
|
-
[
|
|
96
|
-
resourceNames(RESOURCE_CLASSES.dynamoDbTable, tableName)
|
|
97
|
-
]
|
|
98
|
-
)
|
|
99
|
-
);
|
|
100
|
-
|
|
101
83
|
return [{
|
|
102
84
|
templatePath,
|
|
103
85
|
templateData: {
|
|
104
86
|
tableName,
|
|
105
87
|
resourceName: tableName,
|
|
106
88
|
attributes,
|
|
107
|
-
additionalResourcePermission,
|
|
108
|
-
roleName: SOURCE_GENERATE_IAM_ROLE.RegisterRole,
|
|
109
89
|
},
|
|
110
90
|
setting: {
|
|
111
91
|
initialData: 'Resources:\n',
|
|
@@ -67,7 +67,9 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
// Validate rate format for each schedule and Validate each schedule in the array
|
|
71
73
|
for (const schedule of schedules) {
|
|
72
74
|
if (!schedule.name || schedule.name.length === 0) {
|
|
73
75
|
console.error("A schedule's name is not defined");
|
|
@@ -81,10 +83,7 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
81
83
|
console.error("A schedule's input is not defined");
|
|
82
84
|
return;
|
|
83
85
|
}
|
|
84
|
-
}
|
|
85
86
|
|
|
86
|
-
// Validate rate format for each schedule
|
|
87
|
-
for (const schedule of schedules) {
|
|
88
87
|
if (Array.isArray(schedule.rate) && schedule.rate.length <= 1) {
|
|
89
88
|
const rate = schedule.rate[0];
|
|
90
89
|
|
|
@@ -113,9 +112,12 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
113
112
|
console.error(`Invalid rate expression: ${rate} - must start with 'rate' or 'cron'`);
|
|
114
113
|
return;
|
|
115
114
|
}
|
|
115
|
+
// add input for trigger event source
|
|
116
|
+
Object.assign(schedule.input, {
|
|
117
|
+
eventType: "eventBridgeSchedule"
|
|
118
|
+
})
|
|
116
119
|
}
|
|
117
120
|
|
|
118
|
-
|
|
119
121
|
let additionalResourcePermission = defaultIamRolePerAction();
|
|
120
122
|
additionalResourcePermission.push(
|
|
121
123
|
createIamRole(
|
|
@@ -132,16 +134,6 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
132
134
|
resourceNames(RESOURCE_CLASSES.dynamoDbTable, "WebSocketTask")
|
|
133
135
|
]
|
|
134
136
|
),
|
|
135
|
-
createIamRole(
|
|
136
|
-
{
|
|
137
|
-
"execute-api": [
|
|
138
|
-
"ManageConnections"
|
|
139
|
-
]
|
|
140
|
-
},
|
|
141
|
-
[
|
|
142
|
-
resourceNames(RESOURCE_CLASSES.webSocket)
|
|
143
|
-
]
|
|
144
|
-
)
|
|
145
137
|
)
|
|
146
138
|
|
|
147
139
|
// console.log("additionalResourcePermission in createObjectS3", JSON.stringify(additionalResourcePermission))
|
|
@@ -150,7 +142,6 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
150
142
|
templateData: {
|
|
151
143
|
resourceLocation: path.join(SOURCE_PATH.resourceLocationFlowSchemaEventBridge, flowSchema.flowTag, "source/"),
|
|
152
144
|
functionName,
|
|
153
|
-
// action,
|
|
154
145
|
functionNameConfig: functionNameConfig,
|
|
155
146
|
additionalResourcePermission,
|
|
156
147
|
roleName: SOURCE_GENERATE_IAM_ROLE.EventBridge,
|
|
@@ -52,7 +52,7 @@ function data(_izContext, flowSchema, srcPath) {
|
|
|
52
52
|
const handler = HANDLER.hdrInv;
|
|
53
53
|
const flowTag = flowSchema.flowTag;
|
|
54
54
|
// const action = SOURCE_GENERATE_IAM_ROLE.EventBridge;
|
|
55
|
-
const functionName = "EventBridge"
|
|
55
|
+
const functionName = "EventBridge"
|
|
56
56
|
// const fileName = `${upperCase(flowTag)}${upperCase(action)}_${upperCase(handler)}`;
|
|
57
57
|
return [{
|
|
58
58
|
templatePath: templatePath,
|
|
@@ -66,7 +66,7 @@ function data(_izContext, flowSchema, srcPath) {
|
|
|
66
66
|
},
|
|
67
67
|
setting: {
|
|
68
68
|
savePath: path.join(srcPath, SOURCE_PATH.flowSchemaEventBridge, flowSchema.flowTag, "source/"),
|
|
69
|
-
saveFileName:
|
|
69
|
+
saveFileName: `${upperCase(functionName)}_${upperCase(handler)}`,
|
|
70
70
|
fileExtension: '.js',
|
|
71
71
|
isAppend: false
|
|
72
72
|
}
|
|
@@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
19
19
|
|
|
20
20
|
const { middlewareHandler } = require("@izara_project/izara-middleware");
|
|
21
21
|
const callingFlowSharedLib = require('@izara_project/izara-core-library-calling-flow');
|
|
22
|
-
validateSchemaMiddleware
|
|
23
22
|
const {
|
|
24
23
|
validateSchemaMiddleware
|
|
25
24
|
} = require('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/GenerateCodeLibs');
|