@izara_project/izara-market-library-service-schemas 1.0.44 → 1.0.45
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
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.45",
|
|
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
|