@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.
Files changed (106) hide show
  1. package/package.json +1 -1
  2. package/src/generateCode/generateFlowSchema/GenerateCodeFlowSchema.js +11 -8
  3. package/src/generateCode/generateFlowSchema/event/eventBridgeComponent/functionYaml/data.js +2 -2
  4. package/src/generateCode/generateFlowSchema/event/eventBridgeComponent/functionYaml/template.ejs +3 -10
  5. package/src/generateCode/generateFlowSchema/event/eventBridgeComponent/handler/inv/data.js +5 -4
  6. package/src/generateCode/generateFlowSchema/event/eventBridgeComponent/handler/inv/template.ejs +5 -14
  7. package/src/generateCode/generateFlowSchema/event/eventBridgeComponent/index.js +4 -13
  8. package/src/generateCode/generateFlowSchema/event/eventBridgeComponent/mainFunction/data.js +2 -2
  9. package/src/generateCode/generateFlowSchema/event/extTopicComponent/index.js +5 -9
  10. package/src/generateCode/generateFlowSchema/event/extTopicComponent/process/functionYaml/data.js +6 -10
  11. package/src/generateCode/generateFlowSchema/event/extTopicComponent/process/functionYaml/template.ejs +4 -11
  12. package/src/generateCode/generateFlowSchema/event/extTopicComponent/process/handler/data.js +2 -2
  13. package/src/generateCode/generateFlowSchema/event/extTopicComponent/sns-in-sqs/data.js +2 -2
  14. package/src/generateCode/generateFlowSchema/event/extTopicComponent/sns-out/data.js +4 -3
  15. package/src/generateCode/generateFlowSchema/event/lambdaSyncApiComponent/functionYaml/data.js +4 -8
  16. package/src/generateCode/generateFlowSchema/event/lambdaSyncApiComponent/functionYaml/template.ejs +12 -21
  17. package/src/generateCode/generateFlowSchema/event/lambdaSyncApiComponent/handler/data.js +2 -2
  18. package/src/generateCode/generateFlowSchema/event/lambdaSyncApiComponent/index.js +3 -7
  19. package/src/generateCode/generateFlowSchema/event/lambdaSyncInvComponent/functionYaml/data.js +11 -9
  20. package/src/generateCode/generateFlowSchema/event/lambdaSyncInvComponent/functionYaml/template.ejs +3 -10
  21. package/src/generateCode/generateFlowSchema/event/lambdaSyncInvComponent/handler/data.js +2 -2
  22. package/src/generateCode/generateFlowSchema/event/lambdaSyncInvComponent/index.js +3 -7
  23. package/src/generateCode/generateFlowSchema/event/ownTopicComponent/endpointComponent/functionYaml/data.js +4 -3
  24. package/src/generateCode/generateFlowSchema/event/ownTopicComponent/endpointComponent/handler/data.js +3 -3
  25. package/src/generateCode/generateFlowSchema/event/ownTopicComponent/flowSchemaComponent/functionYaml/data.js +8 -11
  26. package/src/generateCode/generateFlowSchema/event/ownTopicComponent/flowSchemaComponent/handler/data.js +2 -2
  27. package/src/generateCode/generateFlowSchema/event/ownTopicComponent/flowSchemaComponent/mainFunction/data.js +2 -2
  28. package/src/generateCode/generateFlowSchema/event/ownTopicComponent/index.js +8 -24
  29. package/src/generateCode/generateFlowSchema/event/ownTopicComponent/sns-in/data.js +2 -2
  30. package/src/generateCode/generateFlowSchema/event/ownTopicComponent/sns-out/data.js +4 -3
  31. package/src/generateCode/generateFlowSchema/event/s3Component/flowSchemaMainFunction/data.js +14 -12
  32. package/src/generateCode/generateFlowSchema/event/s3Component/flowSchemaMainFunction/template.ejs +5 -8
  33. package/src/generateCode/generateFlowSchema/event/s3Component/flowSchemaMainFunction/templateByStatusType/statusFieldTemplate.ejs +30 -0
  34. package/src/generateCode/generateFlowSchema/event/s3Component/flowSchemaMainFunction/templateByStatusType/storedCacheTemplate.ejs +26 -0
  35. package/src/generateCode/generateFlowSchema/event/s3Component/flowSchemaMainFunction/templateByStatusType/triggerCacheTemplate.ejs +44 -0
  36. package/src/generateCode/generateFlowSchema/event/s3Component/index.js +23 -55
  37. package/src/generateCode/generateFlowSchema/event/s3Component/upload/confirmReserved/functionYaml/data.js +3 -7
  38. package/src/generateCode/generateFlowSchema/event/s3Component/upload/confirmReserved/handler/data.js +3 -7
  39. package/src/generateCode/generateFlowSchema/event/s3Component/upload/confirmReserved/mainFunction/data.js +3 -7
  40. package/src/generateCode/generateFlowSchema/event/s3Component/upload/confirmReserved/queue/data.js +2 -2
  41. package/src/generateCode/generateFlowSchema/event/s3Component/upload/createObject/functionYaml/data.js +3 -7
  42. package/src/generateCode/generateFlowSchema/event/s3Component/upload/createObject/handler/data.js +3 -7
  43. package/src/generateCode/generateFlowSchema/event/s3Component/upload/createObject/mainFunction/data.js +3 -7
  44. package/src/generateCode/generateFlowSchema/event/s3Component/upload/preSignUrl/createPreSignUrl/functionYaml/data.js +3 -7
  45. package/src/generateCode/generateFlowSchema/event/s3Component/upload/preSignUrl/createPreSignUrl/handler/data.js +3 -7
  46. package/src/generateCode/generateFlowSchema/event/s3Component/upload/preSignUrl/createPreSignUrl/mainFunction/data.js +3 -7
  47. package/src/generateCode/generateFlowSchema/event/s3Component/upload/preSignUrl/createPreSignUrl/queue/data.js +2 -2
  48. package/src/generateCode/generateFlowSchema/event/s3Component/upload/preSignUrl/reservedLimit/functionYaml/data.js +6 -10
  49. package/src/generateCode/generateFlowSchema/event/s3Component/upload/preSignUrl/reservedLimit/handler/data.js +3 -7
  50. package/src/generateCode/generateFlowSchema/event/s3Component/upload/preSignUrl/reservedLimit/mainFunction/data.js +3 -7
  51. package/src/generateCode/generateFlowSchema/event/s3Component/upload/preSignUrl/reservedLimit/sqs/data.js +2 -2
  52. package/src/generateCode/generateFlowSchema/event/s3Component/upload/processFile/functionYml/HdrS3/data.js +3 -7
  53. package/src/generateCode/generateFlowSchema/event/s3Component/upload/processFile/handler/handlerS3/data.js +3 -7
  54. package/src/generateCode/generateFlowSchema/event/s3Component/upload/processFile/mainFunction/data.js +3 -7
  55. package/src/generateCode/generateFlowSchema/event/s3Component/upload/relate/S3/data.js +4 -4
  56. package/src/generateCode/generateFlowSchema/event/s3Component/upload/relate/sns-out/data.js +5 -3
  57. package/src/generateCode/generateFlowSchema/event/s3Component/websocket/dynamoDb/ReservedTableData.js +3 -3
  58. package/src/generateCode/generateFlowSchema/flowSchemaMainFunction/data.js +4 -8
  59. package/src/generateCode/generateFlowSchema/flowSchemaMainFunction/template.ejs +3 -5
  60. package/src/generateCode/generateFlowSchema/flowStep/flowStep.js +7 -2
  61. package/src/generateCode/generateFlowSchema/libs/data.js +3 -7
  62. package/src/generateCode/generateFlowSchema/statusType/statusFieldComponent/functionYaml/data.js +9 -9
  63. package/src/generateCode/generateFlowSchema/statusType/statusFieldComponent/handler/data.js +1 -5
  64. package/src/generateCode/generateFlowSchema/statusType/statusFieldComponent/index.js +6 -18
  65. package/src/generateCode/generateFlowSchema/statusType/statusFieldComponent/mainFunction/data.js +15 -14
  66. package/src/generateCode/generateFlowSchema/statusType/triggerCacheComponent/checkTriggerCacheComplete/functionYaml/data.js +4 -8
  67. package/src/generateCode/generateFlowSchema/statusType/triggerCacheComponent/checkTriggerCacheComplete/handler/data.js +15 -15
  68. package/src/generateCode/generateFlowSchema/statusType/triggerCacheComponent/checkTriggerCacheComplete/mainFunction/data.js +15 -15
  69. package/src/generateCode/generateFlowSchema/statusType/triggerCacheComponent/index.js +13 -33
  70. package/src/generateCode/generateFlowSchema/statusType/triggerCacheComponent/processTriggerCache/functionYaml/data.js +4 -8
  71. package/src/generateCode/generateFlowSchema/statusType/triggerCacheComponent/processTriggerCache/handler/data.js +12 -14
  72. package/src/generateCode/generateFlowSchema/statusType/triggerCacheComponent/processTriggerCache/mainFunction/data.js +11 -14
  73. package/src/generateCode/generateFlowSchema/statusType/triggerCacheComponent/triggerCacheComplete/functionYaml/dsq/data.js +4 -9
  74. package/src/generateCode/generateFlowSchema/statusType/triggerCacheComponent/triggerCacheComplete/functionYaml/sqs/data.js +4 -9
  75. package/src/generateCode/generateFlowSchema/statusType/triggerCacheComponent/triggerCacheComplete/handler/dsq/data.js +11 -14
  76. package/src/generateCode/generateFlowSchema/statusType/triggerCacheComponent/triggerCacheComplete/handler/sqs/data.js +11 -14
  77. package/src/generateCode/generateFlowSchema/statusType/triggerCacheComponent/triggerCacheComplete/mainFunction/data.js +15 -15
  78. package/src/generateCode/generateFlowSchema/statusType/triggerCacheComponent/triggerCacheQueue/data.js +2 -3
  79. package/src/generateCode/generateSchema/actionEndpointCompleteComponent/create/mainFunction/template.ejs +185 -103
  80. package/src/generateCode/generateSchema/actionEndpointCompleteComponent/create/sns-out/data.js +2 -1
  81. package/src/generateCode/generateSchema/actionEndpointCompleteComponent/delete/sns-out/data.js +2 -1
  82. package/src/generateCode/generateSchema/actionEndpointCompleteComponent/get/sns-out/data.js +2 -1
  83. package/src/generateCode/generateSchema/actionEndpointCompleteComponent/update/mainFunction/template.ejs +137 -71
  84. package/src/generateCode/generateSchema/actionEndpointCompleteComponent/update/sns-out/data.js +2 -1
  85. package/src/generateCode/generateSchema/actionEndpointComponent/mainFunction/create/main/template.ejs +1 -1
  86. package/src/generateCode/generateSchema/actionEndpointComponent/yaml/data.js +6 -4
  87. package/src/generateCode/generateSchema/findDataComponent/mainFunction/data.js +1 -1
  88. package/src/generateCode/generateSchema/relationshipPerActionComponent/changeRelationship/complete/sns-out/data.js +2 -1
  89. package/src/generateCode/generateSchema/relationshipPerActionComponent/create/action/functionYaml/data.js +1 -0
  90. package/src/generateCode/generateSchema/relationshipPerActionComponent/create/complete/sns-out/data.js +2 -1
  91. package/src/generateCode/generateSchema/relationshipPerActionComponent/delete/action/functionYaml/data.js +1 -0
  92. package/src/generateCode/generateSchema/relationshipPerActionComponent/delete/complete/sns-out/data.js +2 -1
  93. package/src/generateCode/generateSchema/relationshipPerActionComponent/get/action/functionYaml/data.js +1 -0
  94. package/src/generateCode/generateSchema/relationshipPerActionComponent/get/complete/sns-out/data.js +2 -1
  95. package/src/generateCode/generateSchema/relationshipPerActionComponent/moveRelationship/complete/sns-out/data.js +2 -1
  96. package/src/generateCode/generateSchema/relationshipPerActionComponent/update/action/functionYaml/data.js +1 -0
  97. package/src/generateCode/generateSchema/relationshipPerActionComponent/update/action/sns-out/data.js +2 -1
  98. package/src/generateCode/generateSchema/relationshipPerActionComponent/update/complete/sns-out/data.js +2 -1
  99. package/src/generateCode/resourceYamlComponent/sns-out/data.js +2 -1
  100. package/src/generateCode/resourceYamlComponent/sns-out/defaultSnsOutForFindDataAndProcessLogical.js +2 -1
  101. package/src/generateCode/resourceYamlComponent/sns-out/template.ejs +2 -6
  102. package/src/generateCode.js +9 -7
  103. package/src/libs/Consts.js +9 -12
  104. package/src/libs/Utils.js +26 -1
  105. package/src/__TemplateData/flowSchema/event/externalTopic/Process/handler/data.js +0 -64
  106. package/src/__TemplateData/flowSchema/event/externalTopic/sns-out/data.js +0 -75
@@ -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 { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } =
28
- utils;
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 data(_izContext, flowSchema, srcPath) {
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: path.join(
53
- srcPath,
54
- SOURCE_PATH.flowSchema,
55
- upperCase(flowSchema.flowTag),
56
- 'source/'
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 data;
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 data(_izContext, flowSchema, srcPath) {
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(srcPath, './schemas')
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(srcPath, SOURCE_PATH.appYaml),
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 data;
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 { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } =
27
- utils;
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: path.join(
59
- srcPath,
60
- SOURCE_PATH.flowSchema,
61
- upperCase(flowSchema.flowTag),
62
- 'source/'
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 data;
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 { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } =
26
- utils;
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: path.join(
61
- srcPath,
62
- SOURCE_PATH.flowSchema,
63
- upperCase(flowSchema.flowTag),
64
- 'source/'
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 data;
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, saveFilePath) {
14
+ async function createTriggerCacheComponent(_izContext, flowSchema, appPath) {
15
15
  const triggerCacheComponents = [
16
16
  // Yaml
17
- await createProcessTriggerCacheYaml(_izContext, flowSchema, saveFilePath),
18
- await createCheckTriggerCacheYaml(_izContext, flowSchema, saveFilePath),
19
- await createTriggerCacheCompleteYamlSqs(_izContext, flowSchema, saveFilePath),
20
- await createTriggerCacheCompleteYamlDsq(_izContext, flowSchema, saveFilePath),
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
- ...createProcessTriggerCacheMainFunction(
24
- _izContext,
25
- flowSchema,
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
- ...createProcessTriggerCacheHandler(_izContext, flowSchema, saveFilePath),
41
- ...createCheckTriggerCacheHandler(_izContext, flowSchema, saveFilePath),
42
- ...createTriggerCacheCompleteHandlerSqs(
43
- _izContext,
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, saveFilePath)
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 data(_izContext, flowSchema, srcPath) {
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(srcPath, './schemas')
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(srcPath, SOURCE_PATH.appYaml),
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 data;
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: path.join(
62
- srcPath,
63
- SOURCE_PATH.flowSchema,
64
- upperCase(flowSchema.flowTag),
65
- 'source/'
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 data;
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
- getLocalConfig
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: path.join(
58
- srcPath,
59
- SOURCE_PATH.flowSchema,
60
- upperCase(flowSchema.flowTag),
61
- 'source/'
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 data;
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(srcPath, './schemas')
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(srcPath, SOURCE_PATH.appYaml),
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 data;
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(srcPath, './schemas')
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(srcPath, SOURCE_PATH.appYaml),
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 data;
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
- getLocalConfig
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: path.join(
58
- srcPath,
59
- SOURCE_PATH.flowSchema,
60
- upperCase(flowSchema.flowTag),
61
- 'source/'
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 data;
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
- getLocalConfig
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: path.join(
58
- srcPath,
59
- SOURCE_PATH.flowSchema,
60
- upperCase(flowSchema.flowTag),
61
- 'source/'
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 data;
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 { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } =
27
- utils;
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: path.join(
58
- srcPath,
59
- SOURCE_PATH.flowSchema,
60
- upperCase(flowSchema.flowTag),
61
- 'source/'
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 data;
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(srcPath, SOURCE_PATH.resourceYaml),
52
+ savePath: path.join(appPath, SOURCE_PATH.resourceYaml),
54
53
  saveFileName: SAVE_FILE_NAME.snsInSqsYaml,
55
54
  fileExtension: '.yml',
56
55
  isAppend: true