@izara_project/izara-core-generate-service-code 1.0.22 → 1.0.24
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/generateCode/generateFlowSchema/GenerateCodeFlowSchema.js +11 -8
- package/src/generateCode/generateFlowSchema/event/eventBridgeComponent/functionYaml/data.js +2 -2
- package/src/generateCode/generateFlowSchema/event/eventBridgeComponent/functionYaml/template.ejs +3 -10
- package/src/generateCode/generateFlowSchema/event/eventBridgeComponent/handler/inv/data.js +5 -4
- package/src/generateCode/generateFlowSchema/event/eventBridgeComponent/handler/inv/template.ejs +5 -14
- package/src/generateCode/generateFlowSchema/event/eventBridgeComponent/index.js +4 -13
- package/src/generateCode/generateFlowSchema/event/eventBridgeComponent/mainFunction/data.js +2 -2
- package/src/generateCode/generateFlowSchema/event/extTopicComponent/index.js +5 -9
- package/src/generateCode/generateFlowSchema/event/extTopicComponent/process/functionYaml/data.js +6 -10
- package/src/generateCode/generateFlowSchema/event/extTopicComponent/process/functionYaml/template.ejs +4 -11
- package/src/generateCode/generateFlowSchema/event/extTopicComponent/process/handler/data.js +2 -2
- package/src/generateCode/generateFlowSchema/event/extTopicComponent/sns-in-sqs/data.js +2 -2
- package/src/generateCode/generateFlowSchema/event/extTopicComponent/sns-out/data.js +4 -3
- package/src/generateCode/generateFlowSchema/event/lambdaSyncApiComponent/functionYaml/data.js +4 -8
- package/src/generateCode/generateFlowSchema/event/lambdaSyncApiComponent/functionYaml/template.ejs +12 -21
- package/src/generateCode/generateFlowSchema/event/lambdaSyncApiComponent/handler/data.js +2 -2
- package/src/generateCode/generateFlowSchema/event/lambdaSyncApiComponent/index.js +3 -7
- package/src/generateCode/generateFlowSchema/event/lambdaSyncInvComponent/functionYaml/data.js +11 -9
- package/src/generateCode/generateFlowSchema/event/lambdaSyncInvComponent/functionYaml/template.ejs +3 -10
- package/src/generateCode/generateFlowSchema/event/lambdaSyncInvComponent/handler/data.js +2 -2
- package/src/generateCode/generateFlowSchema/event/lambdaSyncInvComponent/index.js +3 -7
- package/src/generateCode/generateFlowSchema/event/ownTopicComponent/endpointComponent/functionYaml/data.js +4 -3
- package/src/generateCode/generateFlowSchema/event/ownTopicComponent/endpointComponent/handler/data.js +3 -3
- package/src/generateCode/generateFlowSchema/event/ownTopicComponent/flowSchemaComponent/functionYaml/data.js +8 -11
- package/src/generateCode/generateFlowSchema/event/ownTopicComponent/flowSchemaComponent/handler/data.js +2 -2
- package/src/generateCode/generateFlowSchema/event/ownTopicComponent/flowSchemaComponent/mainFunction/data.js +2 -2
- package/src/generateCode/generateFlowSchema/event/ownTopicComponent/index.js +8 -24
- package/src/generateCode/generateFlowSchema/event/ownTopicComponent/sns-in/data.js +2 -2
- package/src/generateCode/generateFlowSchema/event/ownTopicComponent/sns-out/data.js +4 -3
- package/src/generateCode/generateFlowSchema/event/s3Component/flowSchemaMainFunction/data.js +14 -12
- package/src/generateCode/generateFlowSchema/event/s3Component/flowSchemaMainFunction/template.ejs +5 -8
- package/src/generateCode/generateFlowSchema/event/s3Component/flowSchemaMainFunction/templateByStatusType/statusFieldTemplate.ejs +30 -0
- package/src/generateCode/generateFlowSchema/event/s3Component/flowSchemaMainFunction/templateByStatusType/storedCacheTemplate.ejs +26 -0
- package/src/generateCode/generateFlowSchema/event/s3Component/flowSchemaMainFunction/templateByStatusType/triggerCacheTemplate.ejs +44 -0
- package/src/generateCode/generateFlowSchema/event/s3Component/index.js +23 -55
- package/src/generateCode/generateFlowSchema/event/s3Component/upload/confirmReserved/functionYaml/data.js +3 -7
- package/src/generateCode/generateFlowSchema/event/s3Component/upload/confirmReserved/handler/data.js +3 -7
- package/src/generateCode/generateFlowSchema/event/s3Component/upload/confirmReserved/mainFunction/data.js +3 -7
- package/src/generateCode/generateFlowSchema/event/s3Component/upload/confirmReserved/queue/data.js +2 -2
- package/src/generateCode/generateFlowSchema/event/s3Component/upload/createObject/functionYaml/data.js +3 -7
- package/src/generateCode/generateFlowSchema/event/s3Component/upload/createObject/handler/data.js +3 -7
- package/src/generateCode/generateFlowSchema/event/s3Component/upload/createObject/mainFunction/data.js +3 -7
- package/src/generateCode/generateFlowSchema/event/s3Component/upload/preSignUrl/createPreSignUrl/functionYaml/data.js +3 -7
- package/src/generateCode/generateFlowSchema/event/s3Component/upload/preSignUrl/createPreSignUrl/handler/data.js +3 -7
- package/src/generateCode/generateFlowSchema/event/s3Component/upload/preSignUrl/createPreSignUrl/mainFunction/data.js +3 -7
- package/src/generateCode/generateFlowSchema/event/s3Component/upload/preSignUrl/createPreSignUrl/queue/data.js +2 -2
- package/src/generateCode/generateFlowSchema/event/s3Component/upload/preSignUrl/reservedLimit/functionYaml/data.js +6 -10
- package/src/generateCode/generateFlowSchema/event/s3Component/upload/preSignUrl/reservedLimit/handler/data.js +3 -7
- package/src/generateCode/generateFlowSchema/event/s3Component/upload/preSignUrl/reservedLimit/mainFunction/data.js +3 -7
- package/src/generateCode/generateFlowSchema/event/s3Component/upload/preSignUrl/reservedLimit/sqs/data.js +2 -2
- package/src/generateCode/generateFlowSchema/event/s3Component/upload/processFile/functionYml/HdrS3/data.js +3 -7
- package/src/generateCode/generateFlowSchema/event/s3Component/upload/processFile/handler/handlerS3/data.js +3 -7
- package/src/generateCode/generateFlowSchema/event/s3Component/upload/processFile/mainFunction/data.js +3 -7
- package/src/generateCode/generateFlowSchema/event/s3Component/upload/relate/S3/data.js +4 -4
- package/src/generateCode/generateFlowSchema/event/s3Component/upload/relate/sns-out/data.js +5 -3
- package/src/generateCode/generateFlowSchema/event/s3Component/websocket/dynamoDb/ReservedTableData.js +3 -3
- package/src/generateCode/generateFlowSchema/flowSchemaMainFunction/data.js +4 -8
- package/src/generateCode/generateFlowSchema/flowSchemaMainFunction/template.ejs +3 -5
- package/src/generateCode/generateFlowSchema/flowStep/flowStep.js +7 -2
- package/src/generateCode/generateFlowSchema/libs/data.js +3 -7
- package/src/generateCode/generateFlowSchema/statusType/statusFieldComponent/functionYaml/data.js +9 -9
- package/src/generateCode/generateFlowSchema/statusType/statusFieldComponent/handler/data.js +1 -5
- package/src/generateCode/generateFlowSchema/statusType/statusFieldComponent/index.js +6 -18
- package/src/generateCode/generateFlowSchema/statusType/statusFieldComponent/mainFunction/data.js +15 -14
- package/src/generateCode/generateFlowSchema/statusType/triggerCacheComponent/checkTriggerCacheComplete/functionYaml/data.js +4 -8
- package/src/generateCode/generateFlowSchema/statusType/triggerCacheComponent/checkTriggerCacheComplete/handler/data.js +15 -15
- package/src/generateCode/generateFlowSchema/statusType/triggerCacheComponent/checkTriggerCacheComplete/mainFunction/data.js +15 -15
- package/src/generateCode/generateFlowSchema/statusType/triggerCacheComponent/index.js +13 -33
- package/src/generateCode/generateFlowSchema/statusType/triggerCacheComponent/processTriggerCache/functionYaml/data.js +4 -8
- package/src/generateCode/generateFlowSchema/statusType/triggerCacheComponent/processTriggerCache/handler/data.js +12 -14
- package/src/generateCode/generateFlowSchema/statusType/triggerCacheComponent/processTriggerCache/mainFunction/data.js +11 -14
- package/src/generateCode/generateFlowSchema/statusType/triggerCacheComponent/triggerCacheComplete/functionYaml/dsq/data.js +4 -9
- package/src/generateCode/generateFlowSchema/statusType/triggerCacheComponent/triggerCacheComplete/functionYaml/sqs/data.js +4 -9
- package/src/generateCode/generateFlowSchema/statusType/triggerCacheComponent/triggerCacheComplete/handler/dsq/data.js +11 -14
- package/src/generateCode/generateFlowSchema/statusType/triggerCacheComponent/triggerCacheComplete/handler/sqs/data.js +11 -14
- package/src/generateCode/generateFlowSchema/statusType/triggerCacheComponent/triggerCacheComplete/mainFunction/data.js +15 -15
- package/src/generateCode/generateFlowSchema/statusType/triggerCacheComponent/triggerCacheQueue/data.js +2 -3
- package/src/generateCode/generateSchema/actionEndpointCompleteComponent/create/mainFunction/template.ejs +185 -103
- package/src/generateCode/generateSchema/actionEndpointCompleteComponent/create/sns-out/data.js +2 -1
- package/src/generateCode/generateSchema/actionEndpointCompleteComponent/delete/sns-out/data.js +2 -1
- package/src/generateCode/generateSchema/actionEndpointCompleteComponent/get/sns-out/data.js +2 -1
- package/src/generateCode/generateSchema/actionEndpointCompleteComponent/update/mainFunction/template.ejs +137 -71
- package/src/generateCode/generateSchema/actionEndpointCompleteComponent/update/sns-out/data.js +2 -1
- package/src/generateCode/generateSchema/actionEndpointComponent/mainFunction/create/main/template.ejs +1 -1
- package/src/generateCode/generateSchema/actionEndpointComponent/yaml/data.js +6 -4
- package/src/generateCode/generateSchema/findDataComponent/mainFunction/data.js +1 -1
- package/src/generateCode/generateSchema/relationshipPerActionComponent/changeRelationship/complete/sns-out/data.js +2 -1
- package/src/generateCode/generateSchema/relationshipPerActionComponent/create/action/functionYaml/data.js +1 -0
- package/src/generateCode/generateSchema/relationshipPerActionComponent/create/complete/sns-out/data.js +2 -1
- package/src/generateCode/generateSchema/relationshipPerActionComponent/delete/action/functionYaml/data.js +1 -0
- package/src/generateCode/generateSchema/relationshipPerActionComponent/delete/complete/sns-out/data.js +2 -1
- package/src/generateCode/generateSchema/relationshipPerActionComponent/get/action/functionYaml/data.js +1 -0
- package/src/generateCode/generateSchema/relationshipPerActionComponent/get/complete/sns-out/data.js +2 -1
- package/src/generateCode/generateSchema/relationshipPerActionComponent/moveRelationship/complete/sns-out/data.js +2 -1
- package/src/generateCode/generateSchema/relationshipPerActionComponent/update/action/functionYaml/data.js +1 -0
- package/src/generateCode/generateSchema/relationshipPerActionComponent/update/action/sns-out/data.js +2 -1
- package/src/generateCode/generateSchema/relationshipPerActionComponent/update/complete/sns-out/data.js +2 -1
- package/src/generateCode/resourceYamlComponent/sns-out/data.js +2 -1
- package/src/generateCode/resourceYamlComponent/sns-out/defaultSnsOutForFindDataAndProcessLogical.js +2 -1
- package/src/generateCode/resourceYamlComponent/sns-out/template.ejs +2 -6
- package/src/generateCode.js +9 -7
- package/src/libs/Consts.js +9 -12
- package/src/libs/Utils.js +26 -1
- package/src/__TemplateData/flowSchema/event/externalTopic/Process/handler/data.js +0 -64
- package/src/__TemplateData/flowSchema/event/externalTopic/sns-out/data.js +0 -75
package/src/generateCode/generateFlowSchema/statusType/statusFieldComponent/mainFunction/data.js
CHANGED
|
@@ -24,8 +24,11 @@ import consts from '#libs/Consts.js';
|
|
|
24
24
|
import utils from '#libs/Utils.js';
|
|
25
25
|
|
|
26
26
|
const { SOURCE_PATH } = consts;
|
|
27
|
-
const {
|
|
28
|
-
|
|
27
|
+
const {
|
|
28
|
+
firstLetterLowerCase: lowerCase,
|
|
29
|
+
firstLetterUpperCase: upperCase,
|
|
30
|
+
savePath
|
|
31
|
+
} = utils;
|
|
29
32
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
30
33
|
|
|
31
34
|
/**
|
|
@@ -35,11 +38,7 @@ const templatePath = path.join(__dirname, 'template.ejs');
|
|
|
35
38
|
* @return {{templatePath, templateData,setting}}
|
|
36
39
|
*/
|
|
37
40
|
|
|
38
|
-
function
|
|
39
|
-
return [createSourceParams(_izContext, flowSchema, srcPath)];
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
41
|
+
function createSourceParams(_izContext, flowSchema, appPath) {
|
|
43
42
|
let functionName = 'CompleteStatusField' + upperCase(flowSchema.flowTag);
|
|
44
43
|
|
|
45
44
|
return {
|
|
@@ -49,12 +48,14 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
49
48
|
flowType: flowSchema.flowTag
|
|
50
49
|
},
|
|
51
50
|
setting: {
|
|
52
|
-
savePath:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
savePath:
|
|
52
|
+
// path.join(
|
|
53
|
+
// appPath,
|
|
54
|
+
// SOURCE_PATH.flowSchema,
|
|
55
|
+
// upperCase(flowSchema.flowTag),
|
|
56
|
+
// 'source/'
|
|
57
|
+
// ),
|
|
58
|
+
savePath.resourceYamlFlowSchemaFlowTag(appPath, flowSchema.flowTag),
|
|
58
59
|
saveFileName: `${functionName}_Main`,
|
|
59
60
|
fileExtension: '.js',
|
|
60
61
|
isAppend: true
|
|
@@ -62,4 +63,4 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
62
63
|
};
|
|
63
64
|
}
|
|
64
65
|
|
|
65
|
-
export default
|
|
66
|
+
export default createSourceParams;
|
|
@@ -54,11 +54,7 @@ const templatePath = path.join(__dirname, 'template.ejs');
|
|
|
54
54
|
* @return {{templatePath, templateData,setting}}
|
|
55
55
|
*/
|
|
56
56
|
|
|
57
|
-
async function
|
|
58
|
-
return [await createSourceParams(_izContext, flowSchema, srcPath)];
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
async function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
57
|
+
async function createSourceParams(_izContext, flowSchema, appPath) {
|
|
62
58
|
let functionName =
|
|
63
59
|
'CheckTriggerCache' + upperCase(flowSchema.flowTag) + 'Complete';
|
|
64
60
|
let handlerType = upperCase(HANDLER.hdrSqs);
|
|
@@ -86,7 +82,7 @@ async function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
86
82
|
.getLocalObjectSchemas(
|
|
87
83
|
_izContext,
|
|
88
84
|
[flowSchema.objType.objectType],
|
|
89
|
-
path.join(
|
|
85
|
+
path.join(appPath, 'src/schemas')
|
|
90
86
|
)
|
|
91
87
|
.then(res => res.records[0]);
|
|
92
88
|
if (!objectSchema) {
|
|
@@ -129,7 +125,7 @@ async function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
129
125
|
queueName
|
|
130
126
|
},
|
|
131
127
|
setting: {
|
|
132
|
-
savePath: path.join(
|
|
128
|
+
savePath: path.join(appPath, SOURCE_PATH.appYaml),
|
|
133
129
|
saveFileName: SAVE_FILE_NAME.flowSchemaYaml,
|
|
134
130
|
fileExtension: '.yml',
|
|
135
131
|
isAppend: true
|
|
@@ -137,4 +133,4 @@ async function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
137
133
|
};
|
|
138
134
|
}
|
|
139
135
|
|
|
140
|
-
export default
|
|
136
|
+
export default createSourceParams;
|
|
@@ -23,8 +23,11 @@ import consts from '#libs/Consts.js';
|
|
|
23
23
|
import utils from '#libs/Utils.js';
|
|
24
24
|
|
|
25
25
|
const { SOURCE_PATH, HANDLER } = consts;
|
|
26
|
-
const {
|
|
27
|
-
|
|
26
|
+
const {
|
|
27
|
+
firstLetterLowerCase: lowerCase,
|
|
28
|
+
firstLetterUpperCase: upperCase,
|
|
29
|
+
savePath
|
|
30
|
+
} = utils;
|
|
28
31
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
29
32
|
|
|
30
33
|
/**
|
|
@@ -33,12 +36,7 @@ const templatePath = path.join(__dirname, 'template.ejs');
|
|
|
33
36
|
* @param {Object} objectSchema
|
|
34
37
|
* @return {{templatePath, templateData,setting}}
|
|
35
38
|
*/
|
|
36
|
-
|
|
37
|
-
function data(_izContext, flowSchema, srcPath) {
|
|
38
|
-
return [createSourceParams(_izContext, flowSchema, srcPath)];
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
39
|
+
function createSourceParams(_izContext, flowSchema, appPath) {
|
|
42
40
|
let functionName =
|
|
43
41
|
'CheckTriggerCache' + upperCase(flowSchema.flowTag) + 'Complete';
|
|
44
42
|
let handlerType = upperCase(HANDLER.hdrSqs);
|
|
@@ -55,12 +53,14 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
55
53
|
queueName
|
|
56
54
|
},
|
|
57
55
|
setting: {
|
|
58
|
-
savePath:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
56
|
+
savePath:
|
|
57
|
+
// path.join(
|
|
58
|
+
// appPath,
|
|
59
|
+
// SOURCE_PATH.flowSchema,
|
|
60
|
+
// upperCase(flowSchema.flowTag),
|
|
61
|
+
// 'source/'
|
|
62
|
+
// ),
|
|
63
|
+
savePath.resourceYamlFlowSchemaFlowTag(appPath, flowSchema.flowTag),
|
|
64
64
|
saveFileName: `${upperCase(functionName)}_${upperCase(handlerType)}`,
|
|
65
65
|
fileExtension: '.js',
|
|
66
66
|
isAppend: true
|
|
@@ -68,4 +68,4 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
export default
|
|
71
|
+
export default createSourceParams;
|
|
@@ -22,8 +22,11 @@ const __dirname = path.dirname(__filename);
|
|
|
22
22
|
import consts from '#libs/Consts.js';
|
|
23
23
|
import utils from '#libs/Utils.js';
|
|
24
24
|
const { SOURCE_PATH, HANDLER } = consts;
|
|
25
|
-
const {
|
|
26
|
-
|
|
25
|
+
const {
|
|
26
|
+
firstLetterLowerCase: lowerCase,
|
|
27
|
+
firstLetterUpperCase: upperCase,
|
|
28
|
+
savePath
|
|
29
|
+
} = utils;
|
|
27
30
|
|
|
28
31
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
29
32
|
|
|
@@ -34,12 +37,7 @@ const templatePath = path.join(__dirname, 'template.ejs');
|
|
|
34
37
|
* @param {Object} objectSchema
|
|
35
38
|
* @return {{templatePath, templateData,setting}}
|
|
36
39
|
*/
|
|
37
|
-
|
|
38
|
-
function data(_izContext, flowSchema, srcPath) {
|
|
39
|
-
return [createSourceParams(_izContext, flowSchema, srcPath)];
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
40
|
+
function createSourceParams(_izContext, flowSchema, appPath) {
|
|
43
41
|
let functionName =
|
|
44
42
|
'CheckTriggerCache' + upperCase(flowSchema.flowTag) + 'Complete';
|
|
45
43
|
let handlerType = upperCase(HANDLER.hdrSqs);
|
|
@@ -57,12 +55,14 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
57
55
|
flowTag: flowSchema.flowTag
|
|
58
56
|
},
|
|
59
57
|
setting: {
|
|
60
|
-
savePath:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
58
|
+
savePath:
|
|
59
|
+
// path.join(
|
|
60
|
+
// appPath,
|
|
61
|
+
// SOURCE_PATH.flowSchema,
|
|
62
|
+
// upperCase(flowSchema.flowTag),
|
|
63
|
+
// 'source/'
|
|
64
|
+
// ),
|
|
65
|
+
savePath.resourceYamlFlowSchemaFlowTag(appPath, flowSchema.flowTag),
|
|
66
66
|
saveFileName: `${upperCase(functionName)}_Main`,
|
|
67
67
|
fileExtension: '.js',
|
|
68
68
|
isAppend: true
|
|
@@ -70,4 +70,4 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
export default
|
|
73
|
+
export default createSourceParams;
|
|
@@ -11,47 +11,27 @@ import createCheckTriggerCacheMainFunction from './checkTriggerCacheComplete/mai
|
|
|
11
11
|
import createTriggerCacheCompleteMainFunction from './triggerCacheComplete/mainFunction/data.js';
|
|
12
12
|
import createFlowSchemaTriggerCacheQueue from './triggerCacheQueue/data.js';
|
|
13
13
|
|
|
14
|
-
async function createTriggerCacheComponent(_izContext, flowSchema,
|
|
14
|
+
async function createTriggerCacheComponent(_izContext, flowSchema, appPath) {
|
|
15
15
|
const triggerCacheComponents = [
|
|
16
16
|
// Yaml
|
|
17
|
-
await createProcessTriggerCacheYaml(_izContext, flowSchema,
|
|
18
|
-
await createCheckTriggerCacheYaml(_izContext, flowSchema,
|
|
19
|
-
await createTriggerCacheCompleteYamlSqs(_izContext, flowSchema,
|
|
20
|
-
await createTriggerCacheCompleteYamlDsq(_izContext, flowSchema,
|
|
17
|
+
await createProcessTriggerCacheYaml(_izContext, flowSchema, appPath),
|
|
18
|
+
await createCheckTriggerCacheYaml(_izContext, flowSchema, appPath),
|
|
19
|
+
await createTriggerCacheCompleteYamlSqs(_izContext, flowSchema, appPath),
|
|
20
|
+
await createTriggerCacheCompleteYamlDsq(_izContext, flowSchema, appPath),
|
|
21
21
|
|
|
22
22
|
// Main Function
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
saveFilePath
|
|
27
|
-
),
|
|
28
|
-
...createCheckTriggerCacheMainFunction(
|
|
29
|
-
_izContext,
|
|
30
|
-
flowSchema,
|
|
31
|
-
saveFilePath
|
|
32
|
-
),
|
|
33
|
-
...createTriggerCacheCompleteMainFunction(
|
|
34
|
-
_izContext,
|
|
35
|
-
flowSchema,
|
|
36
|
-
saveFilePath
|
|
37
|
-
),
|
|
23
|
+
createProcessTriggerCacheMainFunction(_izContext, flowSchema, appPath),
|
|
24
|
+
createCheckTriggerCacheMainFunction(_izContext, flowSchema, appPath),
|
|
25
|
+
createTriggerCacheCompleteMainFunction(_izContext, flowSchema, appPath),
|
|
38
26
|
|
|
39
27
|
// Handler
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
flowSchema,
|
|
45
|
-
saveFilePath
|
|
46
|
-
),
|
|
47
|
-
...createTriggerCacheCompleteHandlerDsq(
|
|
48
|
-
_izContext,
|
|
49
|
-
flowSchema,
|
|
50
|
-
saveFilePath
|
|
51
|
-
),
|
|
28
|
+
createProcessTriggerCacheHandler(_izContext, flowSchema, appPath),
|
|
29
|
+
createCheckTriggerCacheHandler(_izContext, flowSchema, appPath),
|
|
30
|
+
createTriggerCacheCompleteHandlerSqs(_izContext, flowSchema, appPath),
|
|
31
|
+
createTriggerCacheCompleteHandlerDsq(_izContext, flowSchema, appPath),
|
|
52
32
|
|
|
53
33
|
// Queue
|
|
54
|
-
...createFlowSchemaTriggerCacheQueue(_izContext, flowSchema,
|
|
34
|
+
...createFlowSchemaTriggerCacheQueue(_izContext, flowSchema, appPath)
|
|
55
35
|
];
|
|
56
36
|
|
|
57
37
|
return triggerCacheComponents.flat();
|
|
@@ -61,11 +61,7 @@ const templatePath = path.join(__dirname, './template.ejs');
|
|
|
61
61
|
* @return {{templatePath, templateData,setting}}
|
|
62
62
|
*/
|
|
63
63
|
|
|
64
|
-
async function
|
|
65
|
-
return await createSourceParams(_izContext, flowSchema, srcPath);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
async function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
64
|
+
async function createSourceParams(_izContext, flowSchema, appPath) {
|
|
69
65
|
let functionName = 'ProcessTriggerCache' + upperCase(flowSchema.flowTag);
|
|
70
66
|
// let functionName = createFlowTypeConcat(_izContext, { serviceTag: getLocalConfig("iz_serviceTag"), flowTag: upperCase(flowSchema.flowTag) })
|
|
71
67
|
let handlerType = upperCase(HANDLER.hdrDsq);
|
|
@@ -91,7 +87,7 @@ async function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
91
87
|
.getLocalObjectSchemas(
|
|
92
88
|
_izContext,
|
|
93
89
|
[flowSchema.objType.objectType],
|
|
94
|
-
path.join(
|
|
90
|
+
path.join(appPath, 'src/schemas')
|
|
95
91
|
)
|
|
96
92
|
.then(res => res.records[0]);
|
|
97
93
|
if (!objectSchema) {
|
|
@@ -134,7 +130,7 @@ async function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
134
130
|
queueName
|
|
135
131
|
},
|
|
136
132
|
setting: {
|
|
137
|
-
savePath: path.join(
|
|
133
|
+
savePath: path.join(appPath, SOURCE_PATH.appYaml),
|
|
138
134
|
saveFileName: SAVE_FILE_NAME.flowSchemaYaml,
|
|
139
135
|
fileExtension: '.yml',
|
|
140
136
|
isAppend: true
|
|
@@ -142,4 +138,4 @@ async function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
142
138
|
};
|
|
143
139
|
}
|
|
144
140
|
|
|
145
|
-
export default
|
|
141
|
+
export default createSourceParams;
|
|
@@ -30,7 +30,8 @@ const { SOURCE_PATH, HANDLER } = consts;
|
|
|
30
30
|
const {
|
|
31
31
|
firstLetterLowerCase: lowerCase,
|
|
32
32
|
firstLetterUpperCase: upperCase,
|
|
33
|
-
getLocalConfig
|
|
33
|
+
getLocalConfig,
|
|
34
|
+
savePath
|
|
34
35
|
} = utils;
|
|
35
36
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
36
37
|
|
|
@@ -40,12 +41,7 @@ const templatePath = path.join(__dirname, 'template.ejs');
|
|
|
40
41
|
* @param {Object} objectSchema
|
|
41
42
|
* @return {{templatePath, templateData,setting}}
|
|
42
43
|
*/
|
|
43
|
-
|
|
44
|
-
function data(_izContext, flowSchema, srcPath) {
|
|
45
|
-
return [createSourceParams(_izContext, flowSchema, srcPath)];
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
44
|
+
function createSourceParams(_izContext, flowSchema, appPath) {
|
|
49
45
|
let functionName = 'ProcessTriggerCache' + upperCase(flowSchema.flowTag);
|
|
50
46
|
// let functionName = createFlowTypeConcat(_izContext, { serviceTag: getLocalConfig("iz_serviceTag"), flowTag: upperCase(flowSchema.flowTag) })
|
|
51
47
|
let handlerType = upperCase(HANDLER.hdrDsq);
|
|
@@ -58,12 +54,14 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
58
54
|
queueName
|
|
59
55
|
},
|
|
60
56
|
setting: {
|
|
61
|
-
savePath:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
57
|
+
savePath:
|
|
58
|
+
// path.join(
|
|
59
|
+
// appPath,
|
|
60
|
+
// SOURCE_PATH.flowSchema,
|
|
61
|
+
// upperCase(flowSchema.flowTag),
|
|
62
|
+
// 'source/'
|
|
63
|
+
// ),
|
|
64
|
+
savePath.resourceYamlFlowSchemaFlowTag(appPath, flowSchema.flowTag),
|
|
67
65
|
saveFileName: `${upperCase(functionName)}_${upperCase(handlerType)}`,
|
|
68
66
|
fileExtension: '.js',
|
|
69
67
|
isAppend: true
|
|
@@ -71,4 +69,4 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
71
69
|
};
|
|
72
70
|
}
|
|
73
71
|
|
|
74
|
-
export default
|
|
72
|
+
export default createSourceParams;
|
|
@@ -28,7 +28,7 @@ const { SOURCE_PATH, HANDLER } = consts;
|
|
|
28
28
|
const {
|
|
29
29
|
firstLetterLowerCase: lowerCase,
|
|
30
30
|
firstLetterUpperCase: upperCase,
|
|
31
|
-
|
|
31
|
+
savePath
|
|
32
32
|
} = utils;
|
|
33
33
|
const templatePath = path.join(__dirname, './template.ejs');
|
|
34
34
|
|
|
@@ -39,12 +39,7 @@ const templatePath = path.join(__dirname, './template.ejs');
|
|
|
39
39
|
* @param {Object} objectSchema
|
|
40
40
|
* @return {{templatePath, templateData,setting}}
|
|
41
41
|
*/
|
|
42
|
-
|
|
43
|
-
function data(_izContext, flowSchema, srcPath) {
|
|
44
|
-
return [createSourceParams(_izContext, flowSchema, srcPath)];
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
42
|
+
function createSourceParams(_izContext, flowSchema, appPath) {
|
|
48
43
|
let functionName = 'ProcessTriggerCache' + upperCase(flowSchema.flowTag);
|
|
49
44
|
// let functionName = createFlowTypeConcat(_izContext, { serviceTag: getLocalConfig("iz_serviceTag"), flowTag: upperCase(flowSchema.flowTag) })
|
|
50
45
|
|
|
@@ -54,12 +49,14 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
54
49
|
functionName
|
|
55
50
|
},
|
|
56
51
|
setting: {
|
|
57
|
-
savePath:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
52
|
+
savePath:
|
|
53
|
+
// path.join(
|
|
54
|
+
// appPath,
|
|
55
|
+
// SOURCE_PATH.flowSchema,
|
|
56
|
+
// upperCase(flowSchema.flowTag),
|
|
57
|
+
// 'source/'
|
|
58
|
+
// ),
|
|
59
|
+
savePath.resourceYamlFlowSchemaFlowTag(appPath, flowSchema.flowTag),
|
|
63
60
|
saveFileName: `${upperCase(functionName)}_Main`,
|
|
64
61
|
fileExtension: '.js',
|
|
65
62
|
isAppend: true
|
|
@@ -67,4 +64,4 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
67
64
|
};
|
|
68
65
|
}
|
|
69
66
|
|
|
70
|
-
export default
|
|
67
|
+
export default createSourceParams;
|
|
@@ -51,12 +51,7 @@ const templatePath = path.join(__dirname, './template.ejs');
|
|
|
51
51
|
* @param {Object} objectSchema
|
|
52
52
|
* @return {{templatePath, templateData,setting}}
|
|
53
53
|
*/
|
|
54
|
-
|
|
55
|
-
async function data(_izContext, flowSchema, srcPath) {
|
|
56
|
-
return [await createSourceParams(_izContext, flowSchema, srcPath)];
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
async function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
54
|
+
async function createSourceParams(_izContext, flowSchema, appPath) {
|
|
60
55
|
let functionName =
|
|
61
56
|
'TriggerCache' + upperCase(flowSchema.flowTag) + 'Complete';
|
|
62
57
|
let handlerType = upperCase(HANDLER.hdrDsq);
|
|
@@ -81,7 +76,7 @@ async function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
81
76
|
.getLocalObjectSchemas(
|
|
82
77
|
_izContext,
|
|
83
78
|
[flowSchema.objType.objectType],
|
|
84
|
-
path.join(
|
|
79
|
+
path.join(appPath, 'src/schemas')
|
|
85
80
|
)
|
|
86
81
|
.then(res => res.records[0]);
|
|
87
82
|
if (!objectSchema) {
|
|
@@ -124,7 +119,7 @@ async function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
124
119
|
queueName
|
|
125
120
|
},
|
|
126
121
|
setting: {
|
|
127
|
-
savePath: path.join(
|
|
122
|
+
savePath: path.join(appPath, SOURCE_PATH.appYaml),
|
|
128
123
|
saveFileName: SAVE_FILE_NAME.flowSchemaYaml,
|
|
129
124
|
fileExtension: '.yml',
|
|
130
125
|
isAppend: true
|
|
@@ -132,4 +127,4 @@ async function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
132
127
|
};
|
|
133
128
|
}
|
|
134
129
|
|
|
135
|
-
export default
|
|
130
|
+
export default createSourceParams;
|
|
@@ -51,12 +51,7 @@ const templatePath = path.join(__dirname, './template.ejs');
|
|
|
51
51
|
* @param {Object} objectSchema
|
|
52
52
|
* @return {{templatePath, templateData,setting}}
|
|
53
53
|
*/
|
|
54
|
-
|
|
55
|
-
async function data(_izContext, flowSchema, srcPath) {
|
|
56
|
-
return [await createSourceParams(_izContext, flowSchema, srcPath)];
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
async function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
54
|
+
async function createSourceParams(_izContext, flowSchema, appPath) {
|
|
60
55
|
let functionName =
|
|
61
56
|
'TriggerCache' + upperCase(flowSchema.flowTag) + 'Complete';
|
|
62
57
|
let handlerType = upperCase(HANDLER.hdrSqs);
|
|
@@ -81,7 +76,7 @@ async function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
81
76
|
.getLocalObjectSchemas(
|
|
82
77
|
_izContext,
|
|
83
78
|
[flowSchema.objType.objectType],
|
|
84
|
-
path.join(
|
|
79
|
+
path.join(appPath, 'src/schemas')
|
|
85
80
|
)
|
|
86
81
|
.then(res => res.records[0]);
|
|
87
82
|
if (!objectSchema) {
|
|
@@ -124,7 +119,7 @@ async function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
124
119
|
queueName
|
|
125
120
|
},
|
|
126
121
|
setting: {
|
|
127
|
-
savePath: path.join(
|
|
122
|
+
savePath: path.join(appPath, SOURCE_PATH.appYaml),
|
|
128
123
|
saveFileName: SAVE_FILE_NAME.flowSchemaYaml,
|
|
129
124
|
fileExtension: '.yml',
|
|
130
125
|
isAppend: true
|
|
@@ -132,4 +127,4 @@ async function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
132
127
|
};
|
|
133
128
|
}
|
|
134
129
|
|
|
135
|
-
export default
|
|
130
|
+
export default createSourceParams;
|
|
@@ -25,7 +25,7 @@ const { SOURCE_PATH, HANDLER } = consts;
|
|
|
25
25
|
const {
|
|
26
26
|
firstLetterLowerCase: lowerCase,
|
|
27
27
|
firstLetterUpperCase: upperCase,
|
|
28
|
-
|
|
28
|
+
savePath
|
|
29
29
|
} = utils;
|
|
30
30
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
31
31
|
|
|
@@ -35,12 +35,7 @@ const templatePath = path.join(__dirname, 'template.ejs');
|
|
|
35
35
|
* @param {Object} objectSchema
|
|
36
36
|
* @return {{templatePath, templateData,setting}}
|
|
37
37
|
*/
|
|
38
|
-
|
|
39
|
-
function data(_izContext, flowSchema, srcPath) {
|
|
40
|
-
return [createSourceParams(_izContext, flowSchema, srcPath)];
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
38
|
+
function createSourceParams(_izContext, flowSchema, appPath) {
|
|
44
39
|
let functionName =
|
|
45
40
|
'TriggerCache' + upperCase(flowSchema.flowTag) + 'Complete';
|
|
46
41
|
let handlerType = upperCase(HANDLER.hdrDsq);
|
|
@@ -54,12 +49,14 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
54
49
|
queueName
|
|
55
50
|
},
|
|
56
51
|
setting: {
|
|
57
|
-
savePath:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
52
|
+
savePath:
|
|
53
|
+
// path.join(
|
|
54
|
+
// appPath,
|
|
55
|
+
// SOURCE_PATH.flowSchema,
|
|
56
|
+
// upperCase(flowSchema.flowTag),
|
|
57
|
+
// 'source/'
|
|
58
|
+
// ),
|
|
59
|
+
savePath.resourceYamlFlowSchemaFlowTag(appPath, flowSchema.flowTag),
|
|
63
60
|
saveFileName: `${upperCase(functionName)}_${upperCase(handlerType)}`,
|
|
64
61
|
fileExtension: '.js',
|
|
65
62
|
isAppend: true
|
|
@@ -67,4 +64,4 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
67
64
|
};
|
|
68
65
|
}
|
|
69
66
|
|
|
70
|
-
export default
|
|
67
|
+
export default createSourceParams;
|
|
@@ -25,7 +25,7 @@ const { SOURCE_PATH, HANDLER } = consts;
|
|
|
25
25
|
const {
|
|
26
26
|
firstLetterLowerCase: lowerCase,
|
|
27
27
|
firstLetterUpperCase: upperCase,
|
|
28
|
-
|
|
28
|
+
savePath
|
|
29
29
|
} = utils;
|
|
30
30
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
31
31
|
|
|
@@ -35,12 +35,7 @@ const templatePath = path.join(__dirname, 'template.ejs');
|
|
|
35
35
|
* @param {Object} objectSchema
|
|
36
36
|
* @return {{templatePath, templateData,setting}}
|
|
37
37
|
*/
|
|
38
|
-
|
|
39
|
-
function data(_izContext, flowSchema, srcPath) {
|
|
40
|
-
return [createSourceParams(_izContext, flowSchema, srcPath)];
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
38
|
+
function createSourceParams(_izContext, flowSchema, appPath) {
|
|
44
39
|
let functionName =
|
|
45
40
|
'TriggerCache' + upperCase(flowSchema.flowTag) + 'Complete';
|
|
46
41
|
let handlerType = upperCase(HANDLER.hdrSqs);
|
|
@@ -54,12 +49,14 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
54
49
|
queueName
|
|
55
50
|
},
|
|
56
51
|
setting: {
|
|
57
|
-
savePath:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
52
|
+
savePath:
|
|
53
|
+
// path.join(
|
|
54
|
+
// appPath,
|
|
55
|
+
// SOURCE_PATH.flowSchema,
|
|
56
|
+
// upperCase(flowSchema.flowTag),
|
|
57
|
+
// 'source/'
|
|
58
|
+
// ),
|
|
59
|
+
savePath.resourceYamlFlowSchemaFlowTag(appPath, flowSchema.flowTag),
|
|
63
60
|
saveFileName: `${upperCase(functionName)}_${upperCase(handlerType)}`,
|
|
64
61
|
fileExtension: '.js',
|
|
65
62
|
isAppend: true
|
|
@@ -67,4 +64,4 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
67
64
|
};
|
|
68
65
|
}
|
|
69
66
|
|
|
70
|
-
export default
|
|
67
|
+
export default createSourceParams;
|
|
@@ -23,8 +23,11 @@ import consts from '#libs/Consts.js';
|
|
|
23
23
|
import utils from '#libs/Utils.js';
|
|
24
24
|
|
|
25
25
|
const { SOURCE_PATH, HANDLER } = consts;
|
|
26
|
-
const {
|
|
27
|
-
|
|
26
|
+
const {
|
|
27
|
+
firstLetterLowerCase: lowerCase,
|
|
28
|
+
firstLetterUpperCase: upperCase,
|
|
29
|
+
savePath
|
|
30
|
+
} = utils;
|
|
28
31
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
29
32
|
|
|
30
33
|
/**
|
|
@@ -34,12 +37,7 @@ const templatePath = path.join(__dirname, 'template.ejs');
|
|
|
34
37
|
* @param {Object} objectSchema
|
|
35
38
|
* @return {{templatePath, templateData,setting}}
|
|
36
39
|
*/
|
|
37
|
-
|
|
38
|
-
function data(_izContext, flowSchema, srcPath) {
|
|
39
|
-
return [createSourceParams(_izContext, flowSchema, srcPath)];
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
40
|
+
function createSourceParams(_izContext, flowSchema, appPath) {
|
|
43
41
|
let functionName =
|
|
44
42
|
'TriggerCache' + upperCase(flowSchema.flowTag) + 'Complete';
|
|
45
43
|
let handlerType = upperCase(HANDLER.hdrSqs);
|
|
@@ -54,12 +52,14 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
54
52
|
flowTag: flowSchema.flowTag
|
|
55
53
|
},
|
|
56
54
|
setting: {
|
|
57
|
-
savePath:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
55
|
+
savePath:
|
|
56
|
+
// path.join(
|
|
57
|
+
// appPath,
|
|
58
|
+
// SOURCE_PATH.flowSchema,
|
|
59
|
+
// upperCase(flowSchema.flowTag),
|
|
60
|
+
// 'source/'
|
|
61
|
+
// ),
|
|
62
|
+
savePath.resourceYamlFlowSchemaFlowTag(appPath, flowSchema.flowTag),
|
|
63
63
|
saveFileName: `${upperCase(functionName)}_Main`,
|
|
64
64
|
fileExtension: '.js',
|
|
65
65
|
isAppend: true
|
|
@@ -67,4 +67,4 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
export default
|
|
70
|
+
export default createSourceParams;
|
|
@@ -42,15 +42,14 @@ const templatePath = path.join(__dirname, 'template.ejs');
|
|
|
42
42
|
* @param {String} saveFilePath
|
|
43
43
|
* @returns {Object[]} - data of multiple dynamoDb template
|
|
44
44
|
*/
|
|
45
|
-
|
|
46
|
-
function createDataForDefaultSnsInSqs(_izContext, flowSchema, srcPath) {
|
|
45
|
+
function createDataForDefaultSnsInSqs(_izContext, flowSchema, appPath) {
|
|
47
46
|
let resultsForCreateDefaultSnsInSqs = [];
|
|
48
47
|
let flowTag = upperCase(flowSchema.flowTag);
|
|
49
48
|
let serviceTag = getLocalConfig('iz_serviceTag');
|
|
50
49
|
// console.log("create topic by flowSteps", flowSteps)
|
|
51
50
|
const setting = {
|
|
52
51
|
initialData: 'Resources:\n',
|
|
53
|
-
savePath: path.join(
|
|
52
|
+
savePath: path.join(appPath, SOURCE_PATH.resourceYaml),
|
|
54
53
|
saveFileName: SAVE_FILE_NAME.snsInSqsYaml,
|
|
55
54
|
fileExtension: '.yml',
|
|
56
55
|
isAppend: true
|