@izara_project/izara-market-library-service-schemas 1.0.44 → 1.0.46
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 +3 -3
- package/src/GenerateCodeLibs/index.js +0 -1
- package/src/SourceManager/src/CreateSource.js +2 -22
- package/src/reStructure/TemplateData/EndpointPerService/handler/api/template.ejs +1 -1
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/get/template.ejs +1 -1
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/update/template.ejs +1 -1
- package/src/reStructure/TemplateData/perActionComplete/create/mainFunction/template.ejs +8 -6
- package/src/reStructure/TemplateData/perActionComplete/get/mainFunction/template.ejs +6 -5
- package/src/reStructure/TemplateData/perActionComplete/update/mainFunction/template.ejs +7 -6
- package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/mainFunction/template.ejs +1 -1
- package/src/reStructure/libs/ValidateAddOnDataStructure.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@izara_project/izara-market-library-service-schemas",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.46",
|
|
4
4
|
"description": "Schemas for Izara Market project",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
"@izara_project/izara-core-library-core": "^1.0.19",
|
|
25
25
|
"@izara_project/izara-core-library-external-request": "^1.0.20",
|
|
26
26
|
"@izara_project/izara-core-library-logger": "^1.0.7",
|
|
27
|
-
"@izara_project/izara-core-library-service-schemas": "^1.0.
|
|
27
|
+
"@izara_project/izara-core-library-service-schemas": "^1.0.73",
|
|
28
28
|
"@izara_project/izara-core-library-sns": "^1.0.6",
|
|
29
29
|
"@izara_project/izara-core-library-sqs": "^1.0.4",
|
|
30
30
|
"@izara_project/izara-shared": "^1.0.126",
|
|
31
|
-
"@izara_project/izara-shared-service-schemas": "^1.0.
|
|
31
|
+
"@izara_project/izara-shared-service-schemas": "^1.0.19",
|
|
32
32
|
"@izara_project/izara-shared-core": "^1.0.2",
|
|
33
33
|
"ejs": "^3.1.10",
|
|
34
34
|
"js-beautify": "^1.15.4",
|
|
@@ -18,7 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
18
18
|
'use strict';
|
|
19
19
|
|
|
20
20
|
// contain functions that use with generated code in each services
|
|
21
|
-
console.log("./src/GenerateCodeLibs")
|
|
22
21
|
module.exports = {
|
|
23
22
|
consts: require('./src/Consts'),
|
|
24
23
|
generateCodeLibs: require("./src/GenerateCodeLibs"),
|
|
@@ -86,7 +86,7 @@ function generateDataFromTemplate(template, data,) {
|
|
|
86
86
|
* @param {string} setting.initialData // initialData can use when isAppend = true
|
|
87
87
|
* @returns
|
|
88
88
|
*/
|
|
89
|
-
async function createSource(template, data, { savePath, hookPath, saveFileName, fileExtension, initialData, isAppend = false, checkCreateSourcePass = false }) {
|
|
89
|
+
async function createSource(template, data, { savePath, hookPath, saveFileName, fileExtension, initialData, isAppend = false, checkCreateSourcePass = false, generateHookFile = true }) {
|
|
90
90
|
|
|
91
91
|
try {
|
|
92
92
|
|
|
@@ -115,7 +115,7 @@ async function createSource(template, data, { savePath, hookPath, saveFileName,
|
|
|
115
115
|
let hookDataPath = hookPath ? hookPath : join(savePath, '../hook/');
|
|
116
116
|
|
|
117
117
|
if (!fs.existsSync(savePath)) fs.mkdirSync(savePath, { recursive: true });
|
|
118
|
-
if (!fs.existsSync(hookDataPath)) fs.mkdirSync(hookDataPath, { recursive: true });
|
|
118
|
+
if (generateHookFile) if (!fs.existsSync(hookDataPath)) fs.mkdirSync(hookDataPath, { recursive: true });
|
|
119
119
|
|
|
120
120
|
// check saveFileName for Hook exists
|
|
121
121
|
if (fs.existsSync(`${hookDataPath}${saveFileName}${fileExtension}`.trim())) {
|
|
@@ -165,26 +165,6 @@ async function createSource(template, data, { savePath, hookPath, saveFileName,
|
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
// Function to extract multiple code between tags
|
|
173
|
-
// function extractMultipleCodeBetweenTags(content, tagName) {
|
|
174
|
-
// const result = [];
|
|
175
|
-
// const startTag = `//(<${tagName}>)`;
|
|
176
|
-
// const endTag = `//(</${tagName}>)`;
|
|
177
|
-
// let startIndex = content.indexOf(startTag);
|
|
178
|
-
// let endIndex = content.indexOf(endTag, startIndex);
|
|
179
|
-
// while (startIndex >= 0 && endIndex >= 0) {
|
|
180
|
-
// result.push(content.substring(startIndex + startTag.length + 1, endIndex));
|
|
181
|
-
// startIndex = content.indexOf(startTag, endIndex);
|
|
182
|
-
// endIndex = content.indexOf(endTag, startIndex);
|
|
183
|
-
// }
|
|
184
|
-
// return result;
|
|
185
|
-
// }
|
|
186
|
-
|
|
187
|
-
|
|
188
168
|
module.exports = {
|
|
189
169
|
createSource,
|
|
190
170
|
generateDataFromTemplate
|
|
@@ -47,7 +47,7 @@ module.exports.main = middleware.wrap(async (event, context, callback) => {
|
|
|
47
47
|
// invoke LambdaFunction
|
|
48
48
|
let lambdaFunctionResponse = await <%- action %>Main(
|
|
49
49
|
event._izContext, // correlationId/logger/integrationTestDetail/uniqueRequestId/userId
|
|
50
|
-
event,
|
|
50
|
+
event.body,
|
|
51
51
|
callingFlowSharedLib.addCallingFlowToPassOnProperties(event)
|
|
52
52
|
|
|
53
53
|
);
|
|
@@ -143,15 +143,17 @@ module.exports.createObjectComplete = async (
|
|
|
143
143
|
_izContext.logger.debug("Send message to OutCreateObjectComplete :::>", sendMessageOutCreateObjectComplete)
|
|
144
144
|
await sns.publishAsync(_izContext, sendMessageOutCreateObjectComplete);
|
|
145
145
|
|
|
146
|
-
|
|
147
|
-
_izContext,
|
|
148
|
-
awaitingStepId,
|
|
149
|
-
pendingStepId
|
|
150
|
-
);
|
|
151
|
-
|
|
146
|
+
|
|
152
147
|
//(<afterSendMessage>)
|
|
153
148
|
//(</afterSendMessage>)
|
|
154
149
|
}
|
|
150
|
+
|
|
151
|
+
await asyncFlowSharedLib.removeAwaitingMultipleStep(
|
|
152
|
+
_izContext,
|
|
153
|
+
awaitingStepId,
|
|
154
|
+
pendingStepId
|
|
155
|
+
);
|
|
156
|
+
|
|
155
157
|
})
|
|
156
158
|
)
|
|
157
159
|
//(<beforeReturn>)
|
|
@@ -107,12 +107,13 @@ module.exports.updateNodeComplete = async (
|
|
|
107
107
|
_izContext.logger.debug("Send Message to OutUpdateNodeComplete::", sendMessageToOutUpdateNodeComplete);
|
|
108
108
|
await sns.publishAsync(_izContext, sendMessageToOutUpdateNodeComplete)
|
|
109
109
|
|
|
110
|
-
await asyncFlowSharedLib.removeAwaitingMultipleStep(
|
|
111
|
-
_izContext,
|
|
112
|
-
awaitingStepId,
|
|
113
|
-
pendingStepId
|
|
114
|
-
);
|
|
115
110
|
}
|
|
111
|
+
|
|
112
|
+
await asyncFlowSharedLib.removeAwaitingMultipleStep(
|
|
113
|
+
_izContext,
|
|
114
|
+
awaitingStepId,
|
|
115
|
+
pendingStepId
|
|
116
|
+
);
|
|
116
117
|
})
|
|
117
118
|
)
|
|
118
119
|
|
|
@@ -107,18 +107,19 @@ module.exports.updateNodeComplete = async (
|
|
|
107
107
|
_izContext.logger.debug("Send Message to OutUpdateNodeComplete::", sendMessageToOutUpdateNodeComplete);
|
|
108
108
|
await sns.publishAsync(_izContext, sendMessageToOutUpdateNodeComplete)
|
|
109
109
|
|
|
110
|
-
await asyncFlowSharedLib.removeAwaitingMultipleStep(
|
|
111
|
-
_izContext,
|
|
112
|
-
awaitingStepId,
|
|
113
|
-
pendingStepId
|
|
114
|
-
);
|
|
115
110
|
}
|
|
111
|
+
|
|
112
|
+
await asyncFlowSharedLib.removeAwaitingMultipleStep(
|
|
113
|
+
_izContext,
|
|
114
|
+
awaitingStepId,
|
|
115
|
+
pendingStepId
|
|
116
|
+
);
|
|
116
117
|
})
|
|
117
118
|
)
|
|
118
119
|
|
|
119
120
|
//(<beforeReturn>)
|
|
120
121
|
//(</beforeReturn>)
|
|
121
|
-
|
|
122
|
+
|
|
122
123
|
return {
|
|
123
124
|
objType: returnValue.objType,
|
|
124
125
|
objInstanceFull: returnValue.objInstanceFull,
|
package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/mainFunction/template.ejs
CHANGED
|
@@ -69,7 +69,7 @@ module.exports.deleteRelationshipComplete = async (
|
|
|
69
69
|
relationshipProperties: returnValue.relationshipProperties,
|
|
70
70
|
graphServiceTag: passBackProperties.passBackProperties.graphServiceTag
|
|
71
71
|
}), // hash id
|
|
72
|
-
PREFIX.
|
|
72
|
+
PREFIX.deleteRel // prefix, use constant further
|
|
73
73
|
)
|
|
74
74
|
|
|
75
75
|
|
|
@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
17
17
|
|
|
18
18
|
'use strict';
|
|
19
19
|
const getObjectSchema = require('@izara_project/izara-core-library-service-schemas/src/GetObjectSchema');
|
|
20
|
-
const { ADD_ON_DATA_STRUCTURE_TYPE } = require('
|
|
20
|
+
const { ADD_ON_DATA_STRUCTURE_TYPE } = require('../../MainLibs/src/Consts');
|
|
21
21
|
|
|
22
22
|
async function validateAddOnDataStructure(
|
|
23
23
|
_izContext,
|