@izara_project/izara-core-generate-service-code 1.0.22 → 1.0.23
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 +3 -3
- package/src/generateCode/generateFlowSchema/event/eventBridgeComponent/functionYaml/data.js +2 -2
- package/src/generateCode/generateFlowSchema/event/eventBridgeComponent/handler/inv/data.js +3 -3
- 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 +4 -4
- 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 +2 -2
- package/src/generateCode/generateFlowSchema/event/lambdaSyncApiComponent/functionYaml/data.js +3 -3
- 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 +2 -2
- 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 +3 -3
- package/src/generateCode/generateFlowSchema/event/ownTopicComponent/endpointComponent/handler/data.js +3 -3
- package/src/generateCode/generateFlowSchema/event/ownTopicComponent/flowSchemaComponent/functionYaml/data.js +3 -3
- 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 +2 -2
- package/src/generateCode/generateFlowSchema/event/s3Component/flowSchemaMainFunction/data.js +3 -3
- 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 +2 -2
- package/src/generateCode/generateFlowSchema/event/s3Component/websocket/dynamoDb/ReservedTableData.js +2 -2
- package/src/generateCode/generateFlowSchema/flowSchemaMainFunction/data.js +4 -8
- package/src/generateCode/generateFlowSchema/flowStep/flowStep.js +7 -2
- package/src/generateCode/generateFlowSchema/libs/data.js +3 -7
- package/src/generateCode/generateSchema/actionEndpointComponent/mainFunction/create/main/template.ejs +1 -1
- package/src/libs/Consts.js +9 -12
|
@@ -32,78 +32,46 @@ import createSnsTopicForUploadS3 from './upload/relate/sns-out/data.js';
|
|
|
32
32
|
//
|
|
33
33
|
import createFlowSchemaEndpointMainFunction from './flowSchemaMainFunction/data.js';
|
|
34
34
|
|
|
35
|
-
async function createS3Component(_izContext, flowSchema,
|
|
35
|
+
async function createS3Component(_izContext, flowSchema, appPath) {
|
|
36
36
|
const component = [
|
|
37
37
|
// * Create Object WebSocket
|
|
38
|
-
...createFunctionYamlCreateObjectWebSocket(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
saveFilePath
|
|
42
|
-
),
|
|
43
|
-
...createHandlerCreateObjectWebSocket(_izContext, flowSchema, saveFilePath),
|
|
44
|
-
...createMainFunctionCreateObjectWebSocket(
|
|
45
|
-
_izContext,
|
|
46
|
-
flowSchema,
|
|
47
|
-
saveFilePath
|
|
48
|
-
),
|
|
38
|
+
...createFunctionYamlCreateObjectWebSocket(_izContext, flowSchema, appPath),
|
|
39
|
+
...createHandlerCreateObjectWebSocket(_izContext, flowSchema, appPath),
|
|
40
|
+
...createMainFunctionCreateObjectWebSocket(_izContext, flowSchema, appPath),
|
|
49
41
|
|
|
50
42
|
// * PreSigned URL WebSocket
|
|
51
43
|
// reservedLimit
|
|
52
|
-
...(await createReservedLimitFunctionYaml(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
)),
|
|
57
|
-
...createReservedLimitHandler(_izContext, flowSchema, saveFilePath),
|
|
58
|
-
...createReservedLimitMainFunction(_izContext, flowSchema, saveFilePath),
|
|
59
|
-
...createReservedLimitQueueName(_izContext, saveFilePath),
|
|
44
|
+
...(await createReservedLimitFunctionYaml(_izContext, flowSchema, appPath)),
|
|
45
|
+
...createReservedLimitHandler(_izContext, flowSchema, appPath),
|
|
46
|
+
...createReservedLimitMainFunction(_izContext, flowSchema, appPath),
|
|
47
|
+
...createReservedLimitQueueName(_izContext, appPath),
|
|
60
48
|
|
|
61
49
|
// createPreSignUrl
|
|
62
|
-
...createPreSignUrlFunctionYaml(_izContext, flowSchema,
|
|
63
|
-
...createPreSignUrlHandler(_izContext, flowSchema,
|
|
64
|
-
...createPreSignUrlMainFunction(_izContext, flowSchema,
|
|
65
|
-
...createPreSignUrlQueueName(_izContext,
|
|
50
|
+
...createPreSignUrlFunctionYaml(_izContext, flowSchema, appPath),
|
|
51
|
+
...createPreSignUrlHandler(_izContext, flowSchema, appPath),
|
|
52
|
+
...createPreSignUrlMainFunction(_izContext, flowSchema, appPath),
|
|
53
|
+
...createPreSignUrlQueueName(_izContext, appPath),
|
|
66
54
|
|
|
67
55
|
// * Process After Upload S3
|
|
68
|
-
...createProcessAfterUploadS3FunctionYmlS3(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
saveFilePath
|
|
72
|
-
),
|
|
73
|
-
...createProcessAfterUploadS3HandlerS3(
|
|
74
|
-
_izContext,
|
|
75
|
-
flowSchema,
|
|
76
|
-
saveFilePath
|
|
77
|
-
),
|
|
78
|
-
...createProcessAfterUploadS3MainFunction(
|
|
79
|
-
_izContext,
|
|
80
|
-
flowSchema,
|
|
81
|
-
saveFilePath
|
|
82
|
-
),
|
|
56
|
+
...createProcessAfterUploadS3FunctionYmlS3(_izContext, flowSchema, appPath),
|
|
57
|
+
...createProcessAfterUploadS3HandlerS3(_izContext, flowSchema, appPath),
|
|
58
|
+
...createProcessAfterUploadS3MainFunction(_izContext, flowSchema, appPath),
|
|
83
59
|
|
|
84
60
|
// * confirm After Upload S3
|
|
85
|
-
...createConfirmAfterUploadS3FunctionYaml(
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
),
|
|
90
|
-
...createConfirmAfterUploadS3Handler(_izContext, flowSchema, saveFilePath),
|
|
91
|
-
...createConfirmAfterUploadS3MainFunction(
|
|
92
|
-
_izContext,
|
|
93
|
-
flowSchema,
|
|
94
|
-
saveFilePath
|
|
95
|
-
),
|
|
96
|
-
...createConfirmAfterUploadS3Queue(_izContext, saveFilePath),
|
|
61
|
+
...createConfirmAfterUploadS3FunctionYaml(_izContext, flowSchema, appPath),
|
|
62
|
+
...createConfirmAfterUploadS3Handler(_izContext, flowSchema, appPath),
|
|
63
|
+
...createConfirmAfterUploadS3MainFunction(_izContext, flowSchema, appPath),
|
|
64
|
+
...createConfirmAfterUploadS3Queue(_izContext, appPath),
|
|
97
65
|
|
|
98
66
|
// * Relate Resources
|
|
99
|
-
...createBucketS3(_izContext, flowSchema,
|
|
67
|
+
...createBucketS3(_izContext, flowSchema, appPath),
|
|
100
68
|
|
|
101
69
|
// * Other Resources
|
|
102
|
-
...createReservedDataMainTable(_izContext,
|
|
103
|
-
...createSnsTopicForUploadS3(_izContext, flowSchema,
|
|
70
|
+
...createReservedDataMainTable(_izContext, appPath),
|
|
71
|
+
...createSnsTopicForUploadS3(_izContext, flowSchema, appPath),
|
|
104
72
|
|
|
105
73
|
//
|
|
106
|
-
createFlowSchemaEndpointMainFunction(_izContext, flowSchema,
|
|
74
|
+
createFlowSchemaEndpointMainFunction(_izContext, flowSchema, appPath)
|
|
107
75
|
];
|
|
108
76
|
|
|
109
77
|
return component.flat();
|
|
@@ -55,11 +55,7 @@ const templatePath = path.join(__dirname, 'template.ejs');
|
|
|
55
55
|
* @return {{ templatePath, templateData, setting } }
|
|
56
56
|
*/
|
|
57
57
|
|
|
58
|
-
function
|
|
59
|
-
return [createSourceParams(_izContext, flowSchema, srcPath)];
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
58
|
+
function createSourceParams(_izContext, flowSchema, appPath) {
|
|
63
59
|
let functionName = 'ConfirmNewReserved';
|
|
64
60
|
let handlerType = upperCase(HANDLER.hdrSqs);
|
|
65
61
|
let additionalResourcePermission = defaultIamRolePerAction();
|
|
@@ -123,11 +119,11 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
123
119
|
},
|
|
124
120
|
setting: {
|
|
125
121
|
saveFileName: SAVE_FILE_NAME.flowSchemaYaml,
|
|
126
|
-
savePath: path.join(
|
|
122
|
+
savePath: path.join(appPath, SOURCE_PATH.appYaml),
|
|
127
123
|
fileExtension: '.yml',
|
|
128
124
|
isAppend: true
|
|
129
125
|
}
|
|
130
126
|
};
|
|
131
127
|
}
|
|
132
128
|
|
|
133
|
-
export default
|
|
129
|
+
export default createSourceParams;
|
package/src/generateCode/generateFlowSchema/event/s3Component/upload/confirmReserved/handler/data.js
CHANGED
|
@@ -36,11 +36,7 @@ const templatePath = path.join(__dirname, 'template.ejs');
|
|
|
36
36
|
* @return {{ templatePath, templateData, setting } }
|
|
37
37
|
*/
|
|
38
38
|
|
|
39
|
-
function
|
|
40
|
-
return [createSourceParams(_izContext, flowSchema, srcPath)];
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
39
|
+
function createSourceParams(_izContext, flowSchema, appPath) {
|
|
44
40
|
let functionName = 'ConfirmNewReserved';
|
|
45
41
|
let handlerType = upperCase(HANDLER.hdrSqs);
|
|
46
42
|
|
|
@@ -53,7 +49,7 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
53
49
|
setting: {
|
|
54
50
|
saveFileName: `${functionName}_${handlerType}`,
|
|
55
51
|
savePath: path.join(
|
|
56
|
-
|
|
52
|
+
appPAth,
|
|
57
53
|
SOURCE_PATH.webSocket,
|
|
58
54
|
flowSchema.flowTag,
|
|
59
55
|
'source/'
|
|
@@ -64,4 +60,4 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
64
60
|
};
|
|
65
61
|
}
|
|
66
62
|
|
|
67
|
-
export default
|
|
63
|
+
export default createSourceParams;
|
|
@@ -32,11 +32,7 @@ const templatePath = path.join(__dirname, 'template.ejs');
|
|
|
32
32
|
* @return {{ templatePath, templateData, setting } }
|
|
33
33
|
*/
|
|
34
34
|
|
|
35
|
-
function
|
|
36
|
-
return [createSourceParams(_izContext, flowSchema, srcPath)];
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
35
|
+
function createSourceParams(_izContext, flowSchema, appPath) {
|
|
40
36
|
let functionName = 'ConfirmNewReserved';
|
|
41
37
|
return {
|
|
42
38
|
templatePath: templatePath,
|
|
@@ -44,7 +40,7 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
44
40
|
setting: {
|
|
45
41
|
saveFileName: `${functionName}_Main`,
|
|
46
42
|
savePath: path.join(
|
|
47
|
-
|
|
43
|
+
appPath,
|
|
48
44
|
SOURCE_PATH.webSocket,
|
|
49
45
|
flowSchema.flowTag,
|
|
50
46
|
'source/'
|
|
@@ -55,4 +51,4 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
55
51
|
};
|
|
56
52
|
}
|
|
57
53
|
|
|
58
|
-
export default
|
|
54
|
+
export default createSourceParams;
|
package/src/generateCode/generateFlowSchema/event/s3Component/upload/confirmReserved/queue/data.js
CHANGED
|
@@ -36,12 +36,12 @@ const templatePath = path.join(__dirname, 'template.ejs');
|
|
|
36
36
|
* @returns {Object[]} - data of multiple dynamoDb template
|
|
37
37
|
*/
|
|
38
38
|
|
|
39
|
-
function data(_izContext,
|
|
39
|
+
function data(_izContext, appPath) {
|
|
40
40
|
let resultForCreateSqs = [];
|
|
41
41
|
const WebSocketSqsQueueNames = [];
|
|
42
42
|
const setting = {
|
|
43
43
|
initialData: 'Resources:\n',
|
|
44
|
-
savePath: path.join(
|
|
44
|
+
savePath: path.join(appPath, SOURCE_PATH.resourceYaml),
|
|
45
45
|
saveFileName: SAVE_FILE_NAME.snsInSqsYaml,
|
|
46
46
|
fileExtension: '.yml',
|
|
47
47
|
isAppend: true
|
|
@@ -53,11 +53,7 @@ const templatePath = path.join(__dirname, 'template.ejs');
|
|
|
53
53
|
* @return {{templatePath, templateData,setting}}
|
|
54
54
|
*/
|
|
55
55
|
|
|
56
|
-
function
|
|
57
|
-
return [createSourceParams(_izContext, flowSchema, srcPath)];
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
56
|
+
function createSourceParams(_izContext, flowSchema, appPath) {
|
|
61
57
|
let functionName = upperCase(FUNCTION_NAME.createObjectS3);
|
|
62
58
|
let handlerType = upperCase('hdrWbs');
|
|
63
59
|
let additionalResourcePermission = defaultIamRolePerAction();
|
|
@@ -110,7 +106,7 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
110
106
|
roleName: SOURCE_GENERATE_IAM_ROLE.FlowSchemaUploadS3Role
|
|
111
107
|
},
|
|
112
108
|
setting: {
|
|
113
|
-
savePath: path.join(
|
|
109
|
+
savePath: path.join(appPath, SOURCE_PATH.appYaml),
|
|
114
110
|
saveFileName: SAVE_FILE_NAME.flowSchemaYaml,
|
|
115
111
|
fileExtension: '.yml',
|
|
116
112
|
isAppend: true
|
|
@@ -118,4 +114,4 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
118
114
|
};
|
|
119
115
|
}
|
|
120
116
|
|
|
121
|
-
export default
|
|
117
|
+
export default createSourceParams;
|
package/src/generateCode/generateFlowSchema/event/s3Component/upload/createObject/handler/data.js
CHANGED
|
@@ -37,11 +37,7 @@ const templatePath = path.join(__dirname, 'template.ejs');
|
|
|
37
37
|
* @return {{templatePath, templateData,setting}}
|
|
38
38
|
*/
|
|
39
39
|
|
|
40
|
-
function
|
|
41
|
-
return [createParamsForCreateSource(_izContext, flowSchema, srcPath)];
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function createParamsForCreateSource(_izContext, flowSchema, srcPath) {
|
|
40
|
+
function createParamsForCreateSource(_izContext, flowSchema, appPath) {
|
|
45
41
|
let functionName = upperCase(FUNCTION_NAME.createObjectS3);
|
|
46
42
|
let handlerType = 'HdrWbs';
|
|
47
43
|
let route = flowSchema.flowTag;
|
|
@@ -54,7 +50,7 @@ function createParamsForCreateSource(_izContext, flowSchema, srcPath) {
|
|
|
54
50
|
},
|
|
55
51
|
setting: {
|
|
56
52
|
savePath: path.join(
|
|
57
|
-
|
|
53
|
+
appPath,
|
|
58
54
|
SOURCE_PATH.webSocket,
|
|
59
55
|
flowSchema.flowTag,
|
|
60
56
|
'source/'
|
|
@@ -65,4 +61,4 @@ function createParamsForCreateSource(_izContext, flowSchema, srcPath) {
|
|
|
65
61
|
}
|
|
66
62
|
};
|
|
67
63
|
}
|
|
68
|
-
export default
|
|
64
|
+
export default createParamsForCreateSource;
|
|
@@ -37,11 +37,7 @@ const templatePath = path.join(__dirname, 'template.ejs');
|
|
|
37
37
|
* @return {{templatePath, templateData,setting}}
|
|
38
38
|
*/
|
|
39
39
|
|
|
40
|
-
function
|
|
41
|
-
return [createParamsForCreateSource(_izContext, flowSchema, srcPath)];
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function createParamsForCreateSource(_izContext, flowSchema, srcPath) {
|
|
40
|
+
function createParamsForCreateSource(_izContext, flowSchema, appPath) {
|
|
45
41
|
let functionName = upperCase(FUNCTION_NAME.createObjectS3);
|
|
46
42
|
let objectType = flowSchema.objType.objectType;
|
|
47
43
|
|
|
@@ -53,7 +49,7 @@ function createParamsForCreateSource(_izContext, flowSchema, srcPath) {
|
|
|
53
49
|
},
|
|
54
50
|
setting: {
|
|
55
51
|
savePath: path.join(
|
|
56
|
-
|
|
52
|
+
appPath,
|
|
57
53
|
SOURCE_PATH.webSocket,
|
|
58
54
|
flowSchema.flowTag,
|
|
59
55
|
'source/'
|
|
@@ -65,4 +61,4 @@ function createParamsForCreateSource(_izContext, flowSchema, srcPath) {
|
|
|
65
61
|
};
|
|
66
62
|
}
|
|
67
63
|
|
|
68
|
-
export default
|
|
64
|
+
export default createParamsForCreateSource;
|
|
@@ -56,11 +56,7 @@ const templatePath = path.join(__dirname, 'template.ejs');
|
|
|
56
56
|
* @return {{ templatePath, templateData, setting } }
|
|
57
57
|
*/
|
|
58
58
|
|
|
59
|
-
function
|
|
60
|
-
return [createSourceParams(_izContext, flowSchema, srcPath)];
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
59
|
+
function createSourceParams(_izContext, flowSchema, appPath) {
|
|
64
60
|
let functionName = upperCase(FUNCTION_NAME.createPresignUrl);
|
|
65
61
|
let handlerType = upperCase(HANDLER.hdrSqs);
|
|
66
62
|
let additionalResourcePermission = defaultIamRolePerAction();
|
|
@@ -133,11 +129,11 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
133
129
|
},
|
|
134
130
|
setting: {
|
|
135
131
|
saveFileName: SAVE_FILE_NAME.flowSchemaYaml,
|
|
136
|
-
savePath: path.join(
|
|
132
|
+
savePath: path.join(appPath, SOURCE_PATH.appYaml),
|
|
137
133
|
fileExtension: '.yml',
|
|
138
134
|
isAppend: true
|
|
139
135
|
}
|
|
140
136
|
};
|
|
141
137
|
}
|
|
142
138
|
|
|
143
|
-
export default
|
|
139
|
+
export default createSourceParams;
|
|
@@ -36,11 +36,7 @@ const templatePath = path.join(__dirname, 'template.ejs');
|
|
|
36
36
|
* @return {{ templatePath, templateData, setting } }
|
|
37
37
|
*/
|
|
38
38
|
|
|
39
|
-
function
|
|
40
|
-
return [createSourceParams(_izContext, flowSchema, srcPath)];
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
39
|
+
function createSourceParams(_izContext, flowSchema, appPath) {
|
|
44
40
|
let functionName = upperCase(FUNCTION_NAME.createPresignUrl);
|
|
45
41
|
let handlerType = upperCase(HANDLER.hdrSqs);
|
|
46
42
|
|
|
@@ -53,7 +49,7 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
53
49
|
setting: {
|
|
54
50
|
saveFileName: `${functionName}_${handlerType}`,
|
|
55
51
|
savePath: path.join(
|
|
56
|
-
|
|
52
|
+
appPath,
|
|
57
53
|
SOURCE_PATH.webSocket,
|
|
58
54
|
flowSchema.flowTag,
|
|
59
55
|
'source/'
|
|
@@ -64,4 +60,4 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
64
60
|
};
|
|
65
61
|
}
|
|
66
62
|
|
|
67
|
-
export default
|
|
63
|
+
export default createSourceParams;
|
|
@@ -36,11 +36,7 @@ const templatePath = path.join(__dirname, 'template.ejs');
|
|
|
36
36
|
* @return {{ templatePath, templateData, setting } }
|
|
37
37
|
*/
|
|
38
38
|
|
|
39
|
-
function
|
|
40
|
-
return [createSourceParams(_izContext, flowSchema, srcPath)];
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
39
|
+
function createSourceParams(_izContext, flowSchema, appPath) {
|
|
44
40
|
let functionName = upperCase(FUNCTION_NAME.createPresignUrl);
|
|
45
41
|
let bucketName = flowSchema.bucketName;
|
|
46
42
|
let flowTag = flowSchema.flowTag;
|
|
@@ -53,7 +49,7 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
53
49
|
setting: {
|
|
54
50
|
saveFileName: `${functionName}_Main`,
|
|
55
51
|
savePath: path.join(
|
|
56
|
-
|
|
52
|
+
appPath,
|
|
57
53
|
SOURCE_PATH.webSocket,
|
|
58
54
|
flowSchema.flowTag,
|
|
59
55
|
'source/'
|
|
@@ -64,4 +60,4 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
64
60
|
};
|
|
65
61
|
}
|
|
66
62
|
|
|
67
|
-
export default
|
|
63
|
+
export default createSourceParams;
|
|
@@ -36,12 +36,12 @@ const templatePath = path.join(__dirname, 'template.ejs');
|
|
|
36
36
|
* @returns {Object[]} - data of multiple dynamoDb template
|
|
37
37
|
*/
|
|
38
38
|
|
|
39
|
-
function data(_izContext,
|
|
39
|
+
function data(_izContext, appPath) {
|
|
40
40
|
let resultForCreateSqs = [];
|
|
41
41
|
const WebSocketSqsQueueNames = [];
|
|
42
42
|
const setting = {
|
|
43
43
|
initialData: 'Resources:\n',
|
|
44
|
-
savePath: path.join(
|
|
44
|
+
savePath: path.join(appPath, SOURCE_PATH.resourceYaml),
|
|
45
45
|
saveFileName: SAVE_FILE_NAME.snsInSqsYaml,
|
|
46
46
|
fileExtension: '.yml',
|
|
47
47
|
isAppend: true
|
|
@@ -62,15 +62,11 @@ const templatePath = path.join(__dirname, 'template.ejs');
|
|
|
62
62
|
* @return {{ templatePath, templateData, setting } }
|
|
63
63
|
*/
|
|
64
64
|
|
|
65
|
-
async function
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
async function createSourceParams(_izContext, flowSchema, appPath) {
|
|
66
|
+
let iz_serviceSchemaBucketName = getLocalConfig('iz_serviceSchemaBucketName');
|
|
67
|
+
|
|
68
|
+
console.debug('iz_serviceSchemaBucketName:::: ', iz_serviceSchemaBucketName);
|
|
68
69
|
|
|
69
|
-
async function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
70
|
-
let iz_serviceSchemaBucketName = getLocalConfig(
|
|
71
|
-
path.join(srcPath, '../'),
|
|
72
|
-
'iz_serviceSchemaBucketName'
|
|
73
|
-
);
|
|
74
70
|
let functionName = upperCase(FUNCTION_NAME.reservedLimit);
|
|
75
71
|
let handlerType = upperCase(HANDLER.hdrSqs);
|
|
76
72
|
let additionalResourcePermission = defaultIamRolePerAction();
|
|
@@ -140,11 +136,11 @@ async function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
140
136
|
},
|
|
141
137
|
setting: {
|
|
142
138
|
saveFileName: SAVE_FILE_NAME.flowSchemaYaml,
|
|
143
|
-
savePath: path.join(
|
|
139
|
+
savePath: path.join(appPath, SOURCE_PATH.appYaml),
|
|
144
140
|
fileExtension: '.yml',
|
|
145
141
|
isAppend: true
|
|
146
142
|
}
|
|
147
143
|
};
|
|
148
144
|
}
|
|
149
145
|
|
|
150
|
-
export default
|
|
146
|
+
export default createSourceParams;
|
|
@@ -37,11 +37,7 @@ const templatePath = path.join(__dirname, 'template.ejs');
|
|
|
37
37
|
* @return {{ templatePath, templateData, setting } }
|
|
38
38
|
*/
|
|
39
39
|
|
|
40
|
-
function
|
|
41
|
-
return [createSourceParams(_izContext, flowSchema, srcPath)];
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
40
|
+
function createSourceParams(_izContext, flowSchema, appPath) {
|
|
45
41
|
let functionName = upperCase(FUNCTION_NAME.reservedLimit);
|
|
46
42
|
let handlerType = upperCase(HANDLER.hdrSqs);
|
|
47
43
|
|
|
@@ -54,7 +50,7 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
54
50
|
setting: {
|
|
55
51
|
saveFileName: `${functionName}_${handlerType}`,
|
|
56
52
|
savePath: path.join(
|
|
57
|
-
|
|
53
|
+
appPath,
|
|
58
54
|
SOURCE_PATH.webSocket,
|
|
59
55
|
flowSchema.flowTag,
|
|
60
56
|
'source/'
|
|
@@ -65,4 +61,4 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
65
61
|
};
|
|
66
62
|
}
|
|
67
63
|
|
|
68
|
-
export default
|
|
64
|
+
export default createSourceParams;
|
|
@@ -35,11 +35,7 @@ const templatePath = path.join(__dirname, 'template.ejs');
|
|
|
35
35
|
* @return {{ templatePath, templateData, setting } }
|
|
36
36
|
*/
|
|
37
37
|
|
|
38
|
-
function
|
|
39
|
-
return [createSourceParams(_izContext, flowSchema, srcPath)];
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
38
|
+
function createSourceParams(_izContext, flowSchema, appPath) {
|
|
43
39
|
let functionName = upperCase(FUNCTION_NAME.reservedLimit);
|
|
44
40
|
return {
|
|
45
41
|
templatePath: templatePath,
|
|
@@ -49,7 +45,7 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
49
45
|
setting: {
|
|
50
46
|
saveFileName: `${functionName}_Main`,
|
|
51
47
|
savePath: path.join(
|
|
52
|
-
|
|
48
|
+
appPath,
|
|
53
49
|
SOURCE_PATH.webSocket,
|
|
54
50
|
flowSchema.flowTag,
|
|
55
51
|
'source/'
|
|
@@ -60,4 +56,4 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
60
56
|
};
|
|
61
57
|
}
|
|
62
58
|
|
|
63
|
-
export default
|
|
59
|
+
export default createSourceParams;
|
|
@@ -37,12 +37,12 @@ const templatePath = path.join(__dirname, 'template.ejs');
|
|
|
37
37
|
* @returns {Object[]} - data of multiple dynamoDb template
|
|
38
38
|
*/
|
|
39
39
|
|
|
40
|
-
function data(_izContext,
|
|
40
|
+
function data(_izContext, appPath) {
|
|
41
41
|
let resultForCreateSqs = [];
|
|
42
42
|
const WebSocketSqsQueueNames = [];
|
|
43
43
|
const setting = {
|
|
44
44
|
initialData: 'Resources:\n',
|
|
45
|
-
savePath: path.join(
|
|
45
|
+
savePath: path.join(appPath, SOURCE_PATH.resourceYaml),
|
|
46
46
|
saveFileName: SAVE_FILE_NAME.snsInSqsYaml,
|
|
47
47
|
fileExtension: '.yml',
|
|
48
48
|
isAppend: true
|
|
@@ -50,11 +50,7 @@ const { firstLetterUpperCase: upperCase } = utils;
|
|
|
50
50
|
|
|
51
51
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
52
52
|
|
|
53
|
-
function
|
|
54
|
-
return [createSourceParam(_izContext, flowSchema, srcPath)];
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function createSourceParam(_izContext, flowSchema, srcPath) {
|
|
53
|
+
function createSourceParam(_izContext, flowSchema, appPath) {
|
|
58
54
|
let functionName = upperCase(FUNCTION_NAME.processAfterUploadS3);
|
|
59
55
|
let handlerType = 'HdrS3';
|
|
60
56
|
let additionalResourcePermission = defaultIamRolePerAction();
|
|
@@ -133,7 +129,7 @@ function createSourceParam(_izContext, flowSchema, srcPath) {
|
|
|
133
129
|
roleName: SOURCE_GENERATE_IAM_ROLE.FlowSchemaUploadS3Role
|
|
134
130
|
},
|
|
135
131
|
setting: {
|
|
136
|
-
savePath: path.join(
|
|
132
|
+
savePath: path.join(appPath, SOURCE_PATH.appYaml),
|
|
137
133
|
saveFileName: SAVE_FILE_NAME.flowSchemaYaml,
|
|
138
134
|
isAppend: true,
|
|
139
135
|
fileExtension: '.yml'
|
|
@@ -141,4 +137,4 @@ function createSourceParam(_izContext, flowSchema, srcPath) {
|
|
|
141
137
|
};
|
|
142
138
|
}
|
|
143
139
|
|
|
144
|
-
export default
|
|
140
|
+
export default createSourceParam;
|
|
@@ -28,11 +28,7 @@ const { SOURCE_PATH, FUNCTION_NAME } = consts;
|
|
|
28
28
|
const { firstLetterUpperCase: upperCase } = utils;
|
|
29
29
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
30
30
|
|
|
31
|
-
function
|
|
32
|
-
return [createSourceData(_izContext, flowSchema, srcPath)];
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function createSourceData(_izContext, flowSchema, srcPath) {
|
|
31
|
+
function createSourceData(_izContext, flowSchema, appPath) {
|
|
36
32
|
let functionName = FUNCTION_NAME.processAfterUploadS3;
|
|
37
33
|
let handlerType = 'HdrS3';
|
|
38
34
|
return {
|
|
@@ -40,7 +36,7 @@ function createSourceData(_izContext, flowSchema, srcPath) {
|
|
|
40
36
|
templateData: {},
|
|
41
37
|
setting: {
|
|
42
38
|
savePath: path.join(
|
|
43
|
-
|
|
39
|
+
appPath,
|
|
44
40
|
SOURCE_PATH.webSocket,
|
|
45
41
|
flowSchema.flowTag,
|
|
46
42
|
'source/'
|
|
@@ -50,4 +46,4 @@ function createSourceData(_izContext, flowSchema, srcPath) {
|
|
|
50
46
|
}
|
|
51
47
|
};
|
|
52
48
|
}
|
|
53
|
-
export default
|
|
49
|
+
export default createSourceData;
|
|
@@ -28,11 +28,7 @@ const { firstLetterUpperCase: upperCase } = utils;
|
|
|
28
28
|
|
|
29
29
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
30
30
|
|
|
31
|
-
function
|
|
32
|
-
return [createSourceParams(_izContext, flowSchema, srcPath)];
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
31
|
+
function createSourceParams(_izContext, flowSchema, appPath) {
|
|
36
32
|
let functionName = upperCase(FUNCTION_NAME.processAfterUploadS3);
|
|
37
33
|
return {
|
|
38
34
|
templatePath: templatePath,
|
|
@@ -40,7 +36,7 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
40
36
|
setting: {
|
|
41
37
|
saveFileName: `${functionName}_Main`,
|
|
42
38
|
savePath: path.join(
|
|
43
|
-
|
|
39
|
+
appPath,
|
|
44
40
|
SOURCE_PATH.webSocket,
|
|
45
41
|
flowSchema.flowTag,
|
|
46
42
|
'source/'
|
|
@@ -50,4 +46,4 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
50
46
|
};
|
|
51
47
|
}
|
|
52
48
|
|
|
53
|
-
export default
|
|
49
|
+
export default createSourceParams;
|
|
@@ -26,7 +26,7 @@ const { SOURCE_PATH, SAVE_FILE_NAME } = consts;
|
|
|
26
26
|
|
|
27
27
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
28
28
|
|
|
29
|
-
function data(_izContext, flowSchema,
|
|
29
|
+
function data(_izContext, flowSchema, appPath) {
|
|
30
30
|
let createBucket = false;
|
|
31
31
|
if (flowSchema.createBucket) {
|
|
32
32
|
createBucket = true;
|
|
@@ -34,11 +34,11 @@ function data(_izContext, flowSchema, srcPath) {
|
|
|
34
34
|
if (!createBucket) {
|
|
35
35
|
return [];
|
|
36
36
|
} else {
|
|
37
|
-
return [createSourceParams(_izContext, flowSchema,
|
|
37
|
+
return [createSourceParams(_izContext, flowSchema, appPath)];
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
function createSourceParams(_izContext, flowSchema,
|
|
41
|
+
function createSourceParams(_izContext, flowSchema, appPath) {
|
|
42
42
|
let bucketName = flowSchema.bucketName;
|
|
43
43
|
let resourceName = bucketName.split('-').join('');
|
|
44
44
|
|
|
@@ -50,7 +50,7 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
50
50
|
},
|
|
51
51
|
setting: {
|
|
52
52
|
initialData: 'Resources:\n',
|
|
53
|
-
savePath: path.join(
|
|
53
|
+
savePath: path.join(appPath, SOURCE_PATH.resourceYaml),
|
|
54
54
|
saveFileName: SAVE_FILE_NAME.S3Bucket,
|
|
55
55
|
fileExtension: '.yml',
|
|
56
56
|
isAppend: true
|
|
@@ -41,7 +41,7 @@ const templatePath = path.join(
|
|
|
41
41
|
* @returns {Object[]} - data of multiple defaultSnsOutData
|
|
42
42
|
*/
|
|
43
43
|
|
|
44
|
-
function createDataForDefaultSnsOut(_izContext, flowSchema,
|
|
44
|
+
function createDataForDefaultSnsOut(_izContext, flowSchema, appPath) {
|
|
45
45
|
let resultsForCreateDefaultSnsOut = [];
|
|
46
46
|
const defaultSnsOutDataList = [
|
|
47
47
|
{
|
|
@@ -55,7 +55,7 @@ function createDataForDefaultSnsOut(_izContext, flowSchema, srcPath) {
|
|
|
55
55
|
templateData: defaultSnsOutData,
|
|
56
56
|
setting: {
|
|
57
57
|
initialData: 'Resources:\n',
|
|
58
|
-
savePath: path.join(
|
|
58
|
+
savePath: path.join(appPath, SOURCE_PATH.resourceYaml),
|
|
59
59
|
saveFileName: SAVE_FILE_NAME.snsOutYaml,
|
|
60
60
|
fileExtension: '.yml',
|
|
61
61
|
isAppend: true
|
|
@@ -29,7 +29,7 @@ const templatePath = path.join(
|
|
|
29
29
|
'../../../../../resourceYaml/dynamodb/template.ejs'
|
|
30
30
|
);
|
|
31
31
|
|
|
32
|
-
function data(_izContext,
|
|
32
|
+
function data(_izContext, appPath) {
|
|
33
33
|
let resultForCreateSources = [];
|
|
34
34
|
const reservedDataTables = [
|
|
35
35
|
{
|
|
@@ -56,7 +56,7 @@ function data(_izContext, srcPath) {
|
|
|
56
56
|
templateData: reservedDataTable,
|
|
57
57
|
setting: {
|
|
58
58
|
initialData: 'Resources:\n',
|
|
59
|
-
savePath: path.join(
|
|
59
|
+
savePath: path.join(appPath, SOURCE_PATH.resourceYaml),
|
|
60
60
|
saveFileName: SAVE_FILE_NAME.dynamoDbYaml,
|
|
61
61
|
fileExtension: '.yml',
|
|
62
62
|
isAppend: true
|