@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
|
@@ -57,11 +57,7 @@ const triggerCacheTemplate = path.join(
|
|
|
57
57
|
* @return {{templatePath, templateData,setting}}
|
|
58
58
|
*/
|
|
59
59
|
|
|
60
|
-
async function
|
|
61
|
-
return [await createParamsForCreateSource(_izContext, flowSchema, srcPath)];
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
async function createParamsForCreateSource(_izContext, flowSchema, srcPath) {
|
|
60
|
+
async function createParamsForCreateSource(_izContext, flowSchema, appPath) {
|
|
65
61
|
let functionName = 'Process' + upperCase(flowSchema.flowTag);
|
|
66
62
|
let tableName = null;
|
|
67
63
|
if (
|
|
@@ -72,7 +68,7 @@ async function createParamsForCreateSource(_izContext, flowSchema, srcPath) {
|
|
|
72
68
|
.getLocalObjectSchemas(
|
|
73
69
|
_izContext,
|
|
74
70
|
[flowSchema.objType.objectType],
|
|
75
|
-
path.join(
|
|
71
|
+
path.join(appPath, 'src/schemas')
|
|
76
72
|
)
|
|
77
73
|
.then(res => res.records[0]);
|
|
78
74
|
if (!objectSchema)
|
|
@@ -111,7 +107,7 @@ async function createParamsForCreateSource(_izContext, flowSchema, srcPath) {
|
|
|
111
107
|
},
|
|
112
108
|
setting: {
|
|
113
109
|
savePath: path.join(
|
|
114
|
-
|
|
110
|
+
appPath,
|
|
115
111
|
SOURCE_PATH.flowSchema,
|
|
116
112
|
upperCase(flowSchema.flowTag),
|
|
117
113
|
'MainHandler/',
|
|
@@ -123,4 +119,4 @@ async function createParamsForCreateSource(_izContext, flowSchema, srcPath) {
|
|
|
123
119
|
}
|
|
124
120
|
};
|
|
125
121
|
}
|
|
126
|
-
export default
|
|
122
|
+
export default createParamsForCreateSource;
|
|
@@ -382,10 +382,15 @@ function buildNoPluginHookResources(
|
|
|
382
382
|
'source/',
|
|
383
383
|
`${upperCase(flowStepName)}_${upperCase(HANDLER.hdrSqs)}`
|
|
384
384
|
),
|
|
385
|
-
functionName:
|
|
385
|
+
functionName:
|
|
386
|
+
upperCase(flowTag) +
|
|
387
|
+
upperCase(flowStepName) +
|
|
388
|
+
upperCase(HANDLER.hdrSqs),
|
|
386
389
|
additionalResourcePermission: iamRole,
|
|
387
390
|
functionNameConfig:
|
|
388
|
-
upperCase(
|
|
391
|
+
upperCase(flowTag) +
|
|
392
|
+
upperCase(flowStepName) +
|
|
393
|
+
upperCase(shortNameHandler(HANDLER.hdrSqs)),
|
|
389
394
|
roleName: upperCase(flowTag),
|
|
390
395
|
queueNameSqs: `${upperCase(flowTag)}${upperCase(flowStepName)}`
|
|
391
396
|
},
|
|
@@ -25,11 +25,7 @@ const { SOURCE_PATH } = consts;
|
|
|
25
25
|
|
|
26
26
|
const templatePath = path.join(__dirname, 'template.ejs');
|
|
27
27
|
|
|
28
|
-
function
|
|
29
|
-
return [createSourceParams(_izContext, flowSchema, srcPath)];
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
28
|
+
function createSourceParams(_izContext, flowSchema, appPath) {
|
|
33
29
|
let uploadS3 = false;
|
|
34
30
|
for (const event of flowSchema.event) {
|
|
35
31
|
if (event.includes('s3')) {
|
|
@@ -43,11 +39,11 @@ function createSourceParams(_izContext, flowSchema, srcPath) {
|
|
|
43
39
|
},
|
|
44
40
|
setting: {
|
|
45
41
|
saveFileName: 'GenerateCodeLibs',
|
|
46
|
-
savePath: path.join(
|
|
42
|
+
savePath: path.join(appPath, SOURCE_PATH.generateCodeLib),
|
|
47
43
|
fileExtension: '.js',
|
|
48
44
|
isAppend: false
|
|
49
45
|
}
|
|
50
46
|
};
|
|
51
47
|
}
|
|
52
48
|
|
|
53
|
-
export default
|
|
49
|
+
export default createSourceParams;
|
package/src/libs/Consts.js
CHANGED
|
@@ -86,16 +86,12 @@ const SOURCE_PATH = {
|
|
|
86
86
|
'/src/generatedCode/WebSocket/source/FlowSchemaHook/HookFunctionGeneratedCode/source/',
|
|
87
87
|
resourceLocationGeneratedCodeHookFunction:
|
|
88
88
|
'src/generatedCode/WebSocket/source/FlowSchemaHook/HookFunctionGeneratedCode/source/',
|
|
89
|
-
generatedAttributeTree: '/src/schemas/generatedCode/attributeTree/',
|
|
90
|
-
generatedPropertyValue: '/src/schemas/generatedCode/propertyValue/',
|
|
91
|
-
generatedRefRelationshipAttribute:
|
|
92
|
-
'/src/schemas/generatedCode/refRelationshipAttribute/',
|
|
93
89
|
endpointPerService: '/src/generatedCode/ActionEndpoint/source/',
|
|
94
90
|
resourceLocationHandlerEndpointPerService:
|
|
95
91
|
'src/generatedCode/ActionEndpoint/source/',
|
|
96
92
|
createRecordComplete: '/src/generatedCode/CreateRecordComplete/',
|
|
97
93
|
resourceLocationCreateRecordComplete:
|
|
98
|
-
'src/generatedCode/
|
|
94
|
+
'src/generatedCode/CreateRecordComplete/'
|
|
99
95
|
};
|
|
100
96
|
|
|
101
97
|
const SQS_RESOURCE = {
|
|
@@ -141,20 +137,21 @@ const SAVE_FILE_NAME = {
|
|
|
141
137
|
snsOutYaml: 'generated-sns-out',
|
|
142
138
|
functionRelationshipYaml: 'relationship-per-action',
|
|
143
139
|
functionPerActionYaml: 'per-action-function',
|
|
140
|
+
processLogicalYaml: 'process-logical',
|
|
141
|
+
flowSchemaYaml: 'flow-schema',
|
|
142
|
+
roleNameConfigYaml: 'role-name-config',
|
|
143
|
+
sharedResourceYaml: 'generate-shared-resource',
|
|
144
|
+
authorizerYaml: 'authorizer',
|
|
145
|
+
findData: 'find-data',
|
|
146
|
+
|
|
144
147
|
externalLambdaRole: 'generatedLambdaRoleServiceConfig',
|
|
145
148
|
snsSubscription: 'generatedSnsServiceConfig',
|
|
146
149
|
translateId: 'TranslateIdsRequest',
|
|
147
|
-
findData: 'find-data',
|
|
148
|
-
processLogicalYaml: 'process-logical',
|
|
149
|
-
flowSchemaYaml: 'flow-schema',
|
|
150
150
|
S3Bucket: 'generated-s3-bucket',
|
|
151
|
-
sharedResourceYaml: 'generate-shared-resource',
|
|
152
151
|
objectRelationship: 'ObjectRelationships',
|
|
153
152
|
refObjectRelationship: 'RefObjectRelationships',
|
|
154
153
|
objectSchema: 'ObjectFieldSchema',
|
|
155
|
-
|
|
156
|
-
roleNameConfig: 'RoleNameConfig',
|
|
157
|
-
authorizerYaml: 'authorizer'
|
|
154
|
+
roleNameConfig: 'RoleNameConfig'
|
|
158
155
|
};
|
|
159
156
|
|
|
160
157
|
const FUNCTION_NAME = {
|