@izara_project/izara-market-library-service-schemas 1.0.77 → 1.0.78

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 (75) hide show
  1. package/package.json +3 -2
  2. package/src/MainLibs/src/Consts.js +14 -1
  3. package/src/MainLibs/src/Utils.js +4 -3
  4. package/src/reStructure/GenerateResources.js +127 -0
  5. package/src/reStructure/GenerateTests.js +21 -22
  6. package/src/reStructure/TemplateData/EndpointPerService/mainFunction/create/template.ejs +2 -1
  7. package/src/reStructure/TemplateData/EndpointPerService/mainFunction/delete/template.ejs +1 -1
  8. package/src/reStructure/TemplateData/IntTest/generateResources/generateResources.js +76 -41
  9. package/src/reStructure/TemplateData/IntTest/generateTests/bashScript/data.js +45 -0
  10. package/src/reStructure/TemplateData/IntTest/generateTests/bashScript/template.ejs +0 -0
  11. package/src/reStructure/TemplateData/IntTest/generateTests/events/data.js +103 -100
  12. package/src/reStructure/TemplateData/IntTest/generateTests/events/templateEvents.ejs +8 -7
  13. package/src/reStructure/TemplateData/IntTest/generateTests/generateTemplate.js +59 -61
  14. package/src/reStructure/TemplateData/IntTest/generateTests/tests/data.js +168 -260
  15. package/src/reStructure/TemplateData/IntTest/generateTests/tests/templateTests.ejs +3 -1
  16. package/src/reStructure/TemplateData/IntTest/libs/{generateTestsLibs.js → libs.js} +82 -84
  17. package/src/reStructure/TemplateData/IntTest/upload/uploadIntTest.js +60 -0
  18. package/src/reStructure/TemplateData/externalService/functionNameConfig/data.js +1 -1
  19. package/src/reStructure/TemplateData/findData/handler/template.ejs +1 -1
  20. package/src/reStructure/TemplateData/flowSchema/CreateRecordComplete/handler/template.ejs +1 -1
  21. package/src/reStructure/TemplateData/flowSchema/components/upload/confirmReserved/handler/template.ejs +1 -1
  22. package/src/reStructure/TemplateData/flowSchema/externalTopic/Complete/handler/template.ejs +1 -1
  23. package/src/reStructure/TemplateData/flowSchema/externalTopic/Complete/mainFunction/data.js +3 -2
  24. package/src/reStructure/TemplateData/flowSchema/externalTopic/Process/handler/template.ejs +1 -1
  25. package/src/reStructure/TemplateData/flowSchema/externalTopic/sns-in-sqs/data.js +2 -1
  26. package/src/reStructure/TemplateData/flowSchema/flowSchemaMainFunction/template.ejs +7 -7
  27. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComplete/handler/template.ejs +1 -1
  28. package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/EndpointComponent/handler/template.ejs +1 -1
  29. package/src/reStructure/TemplateData/flowSchema/flowStep/handler/template.ejs +1 -1
  30. package/src/reStructure/TemplateData/flowSchema/register/complete/handler/template.ejs +1 -1
  31. package/src/reStructure/TemplateData/flowSchema/statusFieldComponent/Handler/template.ejs +1 -1
  32. package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/checkTriggerCacheComplete/handler/template.ejs +1 -1
  33. package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/functionYaml/data.js +1 -0
  34. package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/handler/template.ejs +1 -1
  35. package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/processTriggerCache/mainFunction/data.js +1 -0
  36. package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/functionYaml/data.js +1 -0
  37. package/src/reStructure/TemplateData/flowSchema/triggerCacheComponent/triggerCacheComplete/handler/template.ejs +1 -1
  38. package/src/reStructure/TemplateData/flowSchema/webSocketComplete/handler/template.ejs +1 -1
  39. package/src/reStructure/TemplateData/perActionComplete/create/handler/template.ejs +1 -1
  40. package/src/reStructure/TemplateData/perActionComplete/delete/handler/template.ejs +1 -1
  41. package/src/reStructure/TemplateData/perActionComplete/get/handler/template.ejs +1 -1
  42. package/src/reStructure/TemplateData/perActionComplete/update/handler/template.ejs +1 -1
  43. package/src/reStructure/TemplateData/processLogical/handler/template.ejs +1 -1
  44. package/src/reStructure/TemplateData/processLogicalPagination/handler/dsq/template.ejs +1 -1
  45. package/src/reStructure/TemplateData/processLogicalPagination/handler/sqs/template.ejs +1 -1
  46. package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/handler/templateByHandler/dsqTemplate.ejs +1 -1
  47. package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/handler/templateByHandler/sqsTemplate.ejs +1 -1
  48. package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/complete/handler/sqs/template.ejs +1 -1
  49. package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/templateByHandler/dsqTemplate.ejs +1 -1
  50. package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/templateByHandler/sqsTemplate.ejs +2 -2
  51. package/src/reStructure/TemplateData/relationshipPerAction/create/action/mainFunction/template.ejs +4 -3
  52. package/src/reStructure/TemplateData/relationshipPerAction/create/complete/handler/sqs/template.ejs +1 -1
  53. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/templateByHandler/dsqTemplate.ejs +1 -1
  54. package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/templateByHandler/sqsTemplate.ejs +1 -1
  55. package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/handler/sqs/template.ejs +1 -1
  56. package/src/reStructure/TemplateData/relationshipPerAction/get/action/handler/templateByHandler/dsqTemplate.ejs +1 -1
  57. package/src/reStructure/TemplateData/relationshipPerAction/get/action/handler/templateByHandler/sqsTemplate.ejs +1 -1
  58. package/src/reStructure/TemplateData/relationshipPerAction/get/action/mainFunction/template.ejs +2 -1
  59. package/src/reStructure/TemplateData/relationshipPerAction/get/complete/handler/sqs/template.ejs +1 -1
  60. package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/handler/templateByHandler/dsqTemplate.ejs +1 -1
  61. package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/handler/templateByHandler/sqsTemplate.ejs +1 -1
  62. package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/mainFunction/template.ejs +2 -1
  63. package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/complete/handler/sqs/template.ejs +1 -1
  64. package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/templateByHandler/dsqTemplate.ejs +1 -1
  65. package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/templateByHandler/sqsTemplate.ejs +1 -1
  66. package/src/reStructure/TemplateData/relationshipPerAction/update/action/mainFunction/template.ejs +2 -1
  67. package/src/reStructure/TemplateData/relationshipPerAction/update/complete/handler/sqs/template.ejs +1 -1
  68. package/src.zip +0 -0
  69. package/src/reStructure/TemplateData/IntTest/generateResources/resources/data.js +0 -74
  70. package/src/reStructure/TemplateData/IntTest/generateResources.js +0 -144
  71. package/src/reStructure/TemplateData/IntTest/generateUpload/genetateTempleteUpload.js +0 -52
  72. package/src/reStructure/TemplateData/IntTest/generateUpload/upload/data.js +0 -40
  73. package/src/reStructure/TemplateData/IntTest/generateUpload/upload/libs/generateTestUploadLibs.js +0 -39
  74. package/src/reStructure/TemplateData/IntTest/generateUpload.js +0 -145
  75. /package/src/reStructure/TemplateData/IntTest/generateResources/{resources/templateresources.ejs → templateResources.ejs} +0 -0
@@ -1,100 +1,103 @@
1
- // /*
2
- // Copyright (C) 2020 Sven Mason <http://izara.io>
3
-
4
- // This program is free software: you can redistribute it and/or modify
5
- // it under the terms of the GNU Affero General Public License as
6
- // published by the Free Software Foundation, either version 3 of the
7
- // License, or (at your option) any later version.
8
-
9
- // This program is distributed in the hope that it will be useful,
10
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- // GNU Affero General Public License for more details.
13
-
14
- // You should have received a copy of the GNU Affero General Public License
15
- // along with this program. If not, see <http://www.gnu.org/licenses/>.
16
- // */
17
-
18
- // 'use strict';
19
-
20
- // const path = require('path');
21
- // const templatePath = path.join(__dirname, "./templateEvents.ejs")
22
- // const {
23
- // setEvent,
24
- // createEventCaseByHandler,
25
- // getLocalConfig,
26
- // setEventInvoke,
27
- // setEventDynamo,
28
- // getHandlerFromEventTag
29
- // } = require('../../libs/generateTestsLibs')
30
-
31
-
32
- // async function data(_izContext, srcPath, settings) {
33
- // let createEventSources = [];
34
- // let serviceTag = getLocalConfig(path.join(srcPath, "../../"), "iz_serviceTag")
35
- // let testTagData
36
-
37
- // for (let [testTag, testConfigs] of Object.entries(settings)) {
38
- // // Logger.debug("testStage::::", testConfigs)
39
-
40
- // for (let testStage of testConfigs.testStages) {
41
- // // Logger.debug("testStage::::", testStage)
42
- // let invokeEventComponent = []
43
- // let inputEventName = testStage.eventTag
44
- // let outputEventName = `Output_${testStage.eventTag}`
45
-
46
- // let handler = getHandlerFromEventTag(inputEventName)
47
-
48
- // let inputConfig = { // Validate Input OutPut
49
- // forStageMatching: true, ...setEvent(testStage.inputConfig.inputEvent, testStage.inputConfig.inputEventSettings),
50
- // ...createEventCaseByHandler(handler, testStage.inputConfig.messageAttributes)
51
- // }
52
- // let outputConfig = { forStageMatching: true, ...setEvent(testStage.outputConfig.outputEvent, testStage.outputConfig.outputEventSettings) }
53
-
54
- // let eventDynamos = []
55
-
56
- // if (testStage.dynamoDBConfig && testStage.dynamoDBConfig.length > 0) { // validate Dynamo
57
- // for (const dynamoDBConfig of testStage.dynamoDBConfig) {
58
- // // Logger.debug("dynamoDBConfig", dynamoDBConfig)
59
- // let eventDynamo = { forStageMatching: true, ...setEventDynamo(dynamoDBConfig.dynamoEvent.fields, dynamoDBConfig.dynamoEventSettings) }
60
- // Object.assign(eventDynamo, { keyValues: dynamoDBConfig.dynamoEvent.identifiers })
61
- // // console.log("eventDynamo >>>>>>>> ", eventDynamo);
62
- // eventDynamos.push({ eventTag: inputEventName + "__Dynamodb_" + dynamoDBConfig.eventDynamoTag, event: eventDynamo })
63
- // }
64
- // }
65
- // if (testStage.invokeConfig && testStage.invokeConfig.length > 0) { // Validate Invokes
66
- // for (const invokeConfig of testStage.invokeConfig) {
67
- // let invokeEventComponents = setEventInvoke(invokeConfig)
68
- // invokeEventComponent.push(...invokeEventComponents)
69
- // }
70
- // }
71
- // // console.log("invokeEventComponents:::", invokeEventComponent)
72
-
73
- // testTagData = testTag
74
-
75
- // createEventSources.push({
76
- // templatePath: templatePath,
77
- // templateData: {
78
- // inputEventName,
79
- // inputConfig,
80
- // outputEventName,
81
- // outputConfig,
82
- // eventDynamos,
83
- // invokeEventComponents: invokeEventComponent || []
84
- // },
85
- // setting: {
86
- // generateHookFile: false,
87
- // // savePath: path.join(srcPath, serviceTag, `test_config//${inputEventName}/`),
88
- // savePath: path.join(srcPath, `../../${serviceTag}/${testTagData}/${inputEventName}/`),
89
- // saveFileName: 'events',
90
- // fileExtension: ".json",
91
- // isAppend: true
92
- // }
93
- // })
94
- // }
95
- // }
96
- // // Logger.debug("createEventSources", createEventSources)
97
- // return createEventSources
98
- // }
99
-
100
- // module.exports = data
1
+ /*
2
+ Copyright (C) 2020 Sven Mason <http://izara.io>
3
+
4
+ This program is free software: you can redistribute it and/or modify
5
+ it under the terms of the GNU Affero General Public License as
6
+ published by the Free Software Foundation, either version 3 of the
7
+ License, or (at your option) any later version.
8
+
9
+ This program is distributed in the hope that it will be useful,
10
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ GNU Affero General Public License for more details.
13
+
14
+ You should have received a copy of the GNU Affero General Public License
15
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
16
+ */
17
+
18
+ 'use strict';
19
+
20
+ import path, { join } from 'path';
21
+ import { fileURLToPath } from 'url';
22
+ const __filename = fileURLToPath(import.meta.url);
23
+ const __dirname = path.dirname(__filename);
24
+ const templatePath = path.join(__dirname, "./templateEvents.ejs")
25
+ import libs from '../../libs/libs.js';
26
+ const {
27
+ setEvent,
28
+ createEventCaseByHandler,
29
+ getLocalConfig,
30
+ setEventInvoke,
31
+ setEventDynamo,
32
+ getHandlerFromEventTag,
33
+ getIntTestConfig
34
+ } = libs;
35
+
36
+
37
+ async function data(_izContext, allIntTestConfig, srcPath) {
38
+ let createEventSources = [];
39
+ let serviceTag = getLocalConfig("iz_serviceTag")
40
+
41
+
42
+ // console.log({ allIntegrationTestConfig })
43
+
44
+ for (const intTest of allIntTestConfig) {
45
+ for (const [testTag, config] of Object.entries(intTest)) {
46
+ // console.log(testTag, config)
47
+ for (const eachStage of config.testStages) {
48
+ let inputEventTag = eachStage.eventTag;
49
+ let outputEventTag = `Output_${inputEventTag}`;
50
+
51
+ let inputConfig = {
52
+ ...setEvent(eachStage.inputConfig.inputEvent, eachStage.inputConfig.inputEventSettings),
53
+ ...createEventCaseByHandler(getHandlerFromEventTag(inputEventTag), eachStage.inputConfig.messageAttributes)
54
+ };
55
+
56
+ let outputConfig = {
57
+ ...setEvent(eachStage.outputConfig.outputEvent, eachStage.outputConfig.outputEventSettings)
58
+ };
59
+
60
+ let eventDynamos = [];
61
+ if (eachStage.dynamoDBConfig && eachStage.dynamoDBConfig.length > 0) { // validate Dynamo
62
+ // console.log("have dynamoConfig", inputEventTag, eachStage.dynamoDBConfig)
63
+ for (const dynamoDBConfig of eachStage.dynamoDBConfig) {
64
+ let eventDynamo = { keyValues: dynamoDBConfig.dynamoEvent.identifiers, forStageMatching: true, ...setEventDynamo(dynamoDBConfig.dynamoEvent.fields, dynamoDBConfig.dynamoEventSettings) }
65
+ eventDynamos.push({ eventTag: inputEventTag + "__Dynamodb_" + dynamoDBConfig.eventDynamoTag, event: eventDynamo })
66
+ }
67
+ }
68
+
69
+ let eventInvokes = [];
70
+ if (eachStage.invokeConfig && eachStage.invokeConfig.length > 0) { // Validate Invokes
71
+ for (const invokeConfig of eachStage.invokeConfig) {
72
+ let invokeEventComponents = setEventInvoke(invokeConfig)
73
+ eventInvokes.push(...invokeEventComponents)
74
+ }
75
+ }
76
+
77
+ createEventSources.push({
78
+ templatePath: templatePath,
79
+ templateData: {
80
+ inputEventTag,
81
+ outputEventTag,
82
+ inputConfig,
83
+ outputConfig,
84
+ eventDynamos,
85
+ eventInvokes: eventInvokes || []
86
+ },
87
+ setting: {
88
+ generateHookFile: false,
89
+ savePath: path.join(srcPath, `./${serviceTag}/${testTag}/${inputEventTag}/`),
90
+ saveFileName: 'events',
91
+ fileExtension: ".json",
92
+ isAppend: false
93
+ }
94
+ })
95
+ }
96
+ }
97
+
98
+ }
99
+
100
+ return createEventSources
101
+ }
102
+
103
+ export default data
@@ -1,10 +1,11 @@
1
1
  {
2
- "<%- inputEventName %>": <%- JSON.stringify(inputConfig, null, 2) %><%= inputEventName.length ? ',': "" %>
3
- "<%- outputEventName %>": <%- JSON.stringify(outputConfig, null, 2) %>
4
- <% if (eventDynamos.length) { %> <% { %> , <% } %>
5
- <% eventDynamos.forEach((eventTestDynamo, index) => { %>"<%- eventTestDynamo.eventTag %>": <%- JSON.stringify(eventTestDynamo.event, null, 2) %><%= index < eventDynamos.length - 1 ? ',' : '' %><% }) %><%= invokeEventComponents.length ? ',' : "" %><% } else { %><%= invokeEventComponents.length ? '' : '' %><% } %>
6
- <% invokeEventComponents.forEach((invokeEventComponent,index) => { %>
7
- "<%- invokeEventComponent?.inputInvokeName %>": <%- JSON.stringify(invokeEventComponent?.inputInvoke,null,2) %>,
8
- "<%- invokeEventComponent?.outputInvokeName %>": <%- JSON.stringify(invokeEventComponent?.outputInvoke,null,2) %><%= index < invokeEventComponents.length - 1 ? ',': "" %>
2
+ "<%- inputEventTag %>": <%- JSON.stringify(inputConfig, null, 2) %>,
3
+ "<%- outputEventTag %>": <%- JSON.stringify(outputConfig, null, 2) %> <% eventDynamos.length ? "," : "" -%>
4
+ <% eventDynamos.forEach((eventDynamo,idx) => { %>
5
+ "<%- eventDynamo.eventTag %>": <%- JSON.stringify(eventDynamo.event,null,2) %> <% idx < eventDynamos.length - 1 ? ",": "" -%>
6
+ <% }) %> <% eventInvokes.length ? "," : "" %>
7
+ <% eventInvokes.forEach((invokeEventComponent,index) => { %>
8
+ "<%- invokeEventComponent.inputInvokeName %>": <%- JSON.stringify(invokeEventComponent.inputInvoke,null,2) %>,
9
+ "<%- invokeEventComponent.outputInvokeName %>": <%- JSON.stringify(invokeEventComponent.outputInvoke,null,2) %><%= index < eventInvokes.length - 1 ? ',': "" -%>
9
10
  <% }) %>
10
11
  }
@@ -1,61 +1,59 @@
1
- // /*
2
- // Copyright (C) 2020 Sven Mason <http://izara.io>
3
-
4
- // This program is free software: you can redistribute it and/or modify
5
- // it under the terms of the GNU Affero General Public License as
6
- // published by the Free Software Foundation, either version 3 of the
7
- // License, or (at your option) any later version.
8
-
9
- // This program is distributed in the hope that it will be useful,
10
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- // GNU Affero General Public License for more details.
13
-
14
- // You should have received a copy of the GNU Affero General Public License
15
- // along with this program. If not, see <http://www.gnu.org/licenses/>.
16
- // */
17
-
18
- // 'use strict';
19
-
20
- // // Import required modules
21
- // // console.log("generate main PropertyValue Schema");
22
- // const { join } = require('path');
23
- // const { HANDLER } = require('@izara_project/izara-core-library-service-schemas/src/Consts')
24
-
25
-
26
-
27
- // const generateEvent = require('./events/data')
28
- // // const relationshipPropertyNodeSchema = require('./tests/data')
29
- // const generateTest = require("./tests/data")
30
- // /**
31
- // * Generates code with templates for different actions
32
- // * @param {Object} _izContext - Context object
33
- // * @param {string} savePath - Path to the schema
34
- // * @returns {Array} Array of generated code parameters
35
- // */
36
- // async function generateCodeWithTemplate(_izContext, savePath, settings) {
37
- // try {
38
- // // console.log("settings generateCodeWithTemplate", settings)
39
- // let allCreateSource = [];
40
- // // console.log("oo:", process.env.iz_resourcePrefix);
41
-
42
- // const event = await generateEvent(_izContext, savePath, settings)
43
- // // console.log("event", event);
44
-
45
- // const test = await generateTest(_izContext, savePath, settings)
46
- // // console.log("test", test);
47
-
48
- // allCreateSource.push(
49
- // ...event,
50
- // test
51
- // )
52
-
53
-
54
- // return allCreateSource;
55
- // } catch (error) {
56
- // _izContext.logger.error('Error generating code with template propertyNode schema:', error);
57
- // return [];
58
- // }
59
- // }
60
-
61
- // module.exports = generateCodeWithTemplate;
1
+ /*
2
+ Copyright (C) 2020 Sven Mason <http://izara.io>
3
+
4
+ This program is free software: you can redistribute it and/or modify
5
+ it under the terms of the GNU Affero General Public License as
6
+ published by the Free Software Foundation, either version 3 of the
7
+ License, or (at your option) any later version.
8
+
9
+ This program is distributed in the hope that it will be useful,
10
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ GNU Affero General Public License for more details.
13
+
14
+ You should have received a copy of the GNU Affero General Public License
15
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
16
+ */
17
+
18
+ 'use strict';
19
+
20
+ import { join } from 'path';
21
+ import generateEvent from './events/data.js'
22
+ import generateTest from "./tests/data.js"
23
+ // import generateBashScript from './bashScript/data.js'
24
+ import libs from '../libs/libs.js'
25
+ const { getIntTestConfig } = libs;
26
+ /**
27
+ * Generates code with templates for different actions
28
+ * @param {Object} _izContext - Context object
29
+ * @param {string} savePath - Path to the schema
30
+ * @returns {Array} Array of generated code parameters
31
+ */
32
+ async function generateCodeWithTemplate(_izContext, savePath) {
33
+ try {
34
+ // console.log({ savePath })
35
+ // console.log("settings generateCodeWithTemplate", settings)
36
+ let allCreateSource = [];
37
+ // console.log("oo:", process.env.iz_resourcePrefix);
38
+ let allIntTestConfig = await getIntTestConfig(_izContext, join(savePath, "./libs/"))
39
+ // console.log({ settings })
40
+ const event = await generateEvent(_izContext, allIntTestConfig, savePath)
41
+ // console.log("event", event);
42
+ // console.log("event", JSON.stringify(event, null, 2))
43
+ const test = await generateTest(_izContext, allIntTestConfig, savePath)
44
+ // console.log("test", JSON.stringify(test, null, 2));
45
+
46
+ allCreateSource.push(
47
+ ...event,
48
+ ...test
49
+ )
50
+
51
+ // console.log("allCreateSource", allCreateSource)
52
+ return allCreateSource;
53
+ } catch (error) {
54
+ _izContext.logger.error('Error generating code with template propertyNode schema:', error);
55
+ return [];
56
+ }
57
+ }
58
+
59
+ export default generateCodeWithTemplate;