@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,10 +1,9 @@
1
- const { HANDLER } = require('@izara_project/izara-core-library-service-schemas/src/Consts')
2
- const yaml = require("yaml")
3
- const fs = require('fs');
4
- const Logger = require('@izara_project/izara-core-library-logger');
5
- const { log } = require('console');
6
-
7
-
1
+ import { consts } from '../../../../MainLibs/index.js'
2
+ const { HANDLER } = consts
3
+ import yaml from "yaml";
4
+ import fs from 'fs';
5
+ import { getObjectSchema } from '@izara_project/izara-core-library-service-schemas';
6
+ const { getDataFromPath } = getObjectSchema;
8
7
  function lowercaseFirst(str) {
9
8
  if (!str) return "";
10
9
  return str[0].toLowerCase() + str.slice(1);
@@ -15,15 +14,12 @@ function setGenerateSeedData(generatedSeedDataInput) {
15
14
 
16
15
  // if (generatedSeedDataInput !== undefined) {
17
16
 
18
- Logger.debug("generatedSeedDataInput", generatedSeedDataInput)
19
17
  let generateSeedDatas = []
20
18
 
21
19
  generateSeedDatas.push({
22
20
  generateSeedDatas: generatedSeedDataInput
23
21
  })
24
22
 
25
- Logger.debug("generateSeedDatas-Libs", generateSeedDatas)
26
-
27
23
  return generateSeedDatas
28
24
 
29
25
  // }
@@ -68,7 +64,7 @@ function directoryPath(dirPath) {
68
64
  return functionComponent
69
65
  }
70
66
 
71
- function getLocalConfig(srcPath, params) {
67
+ function getLocalConfig(params) {
72
68
  const configPath = path.join(process.cwd(), '../config/serverless.config.yml');
73
69
  const serverlessConfig = fs.readFileSync(configPath, 'utf8')
74
70
  const config = yaml.parse(serverlessConfig);
@@ -80,22 +76,21 @@ function getLocalConfig(srcPath, params) {
80
76
 
81
77
  // create ResourcesName & FunctionName
82
78
 
83
- function createTestFunctionName(eventTag) { // set resourceName
84
- let handlerSpite = eventTag; // fix
85
- let handler = "";
86
- if (handlerSpite.includes("__case")) {
87
- let mainPart = handlerSpite.split("__case")[0];
79
+ function createTestFunctionName(eventTag) { // set resourceName GCTpBas_Create
80
+ let functionName;
81
+ if (eventTag.includes("__case")) {
82
+ let mainPart = eventTag.split("__case")[0];
88
83
  let mainPartShort = mainPart.slice(0, -6);
89
84
  let lastUnderscoreIndex = mainPartShort.lastIndexOf("_");
90
85
 
91
86
  if (lastUnderscoreIndex !== -1) {
92
- handler = mainPartShort.substring(lastUnderscoreIndex + 1);
87
+ functionName = mainPartShort.substring(lastUnderscoreIndex + 1);
93
88
  } else {
94
- handler = mainPartShort;
89
+ functionName = mainPartShort;
95
90
  }
96
91
  }
97
92
  // Logger.debug("handlerAfterSpite", handler);
98
- return handler;
93
+ return functionName;
99
94
  }
100
95
 
101
96
  // create ResourcesName & FunctionName
@@ -103,10 +98,12 @@ function createTestFunctionName(eventTag) { // set resourceName
103
98
  // setEvent
104
99
 
105
100
  function setEvent(input, settings = {}) {
106
- const transformedObject = {};
101
+ const transformedObject = {
102
+ forStageMatching: true
103
+ };
107
104
  const forStageMatchs = settings?.forStageMatchs || [];
108
105
  const testValueMatches = settings?.testValueMatches || [];
109
-
106
+ const isEqual = settings?.isEqual || [];
110
107
  if (Array.isArray(input)) {
111
108
  return { eventValue: input };
112
109
  }
@@ -135,6 +132,12 @@ function setEvent(input, settings = {}) {
135
132
  field.testValueMatches = false;
136
133
  }
137
134
 
135
+ if (Array.isArray(key)) {
136
+ if (isEqual.includes(key)) {
137
+ field.isEqual = true
138
+ }
139
+ }
140
+
138
141
  if (typeof transformatValue === "object" && !Array.isArray(transformatValue)) {
139
142
  transformedObject[key] = {
140
143
  ...field,
@@ -263,71 +266,44 @@ function setDynamoIdentifierTests(dynamoDBConfigs, serviceTags, inputEventName)
263
266
  return dynamodbOutputEventIdentifiers
264
267
  }
265
268
 
266
- async function setInvokeTest( // invoke >> invoke >> invoke
269
+ function setInvokeTest(
267
270
  inputInvokeConfigs,
268
- stages = [],
269
- eventStage = [],
270
- stageKeep = [],
271
-
271
+ invokeEventTags = [],
272
+ invokeStages = [],
273
+ level = 1
272
274
  ) {
275
+ for (const inputConfig of inputInvokeConfigs) {
276
+ const eventStageTag = inputConfig.eventStageTag;
273
277
 
274
- for (let loopInputInvokeConfig of inputInvokeConfigs) {
275
-
276
- let objectKeep = {}
277
- let eventStageTags = `${loopInputInvokeConfig.eventStageTag}`;
278
+ const [serviceTag, functionName] = createResourceName(eventStageTag + "__case_");
279
+ const inputEventTag = `${eventStageTag}__case_${inputConfig.inputEventTag}`;
278
280
 
279
- let [serviceTag, functionName] = createResourceName(eventStageTags + "__case_");
280
- let inputEventTag = `${eventStageTags + "__case_"}${loopInputInvokeConfig.inputEventTag}`;
281
+ invokeEventTags.push({ eventStageTag });
281
282
 
282
- if (Array.isArray(loopInputInvokeConfig.invokeConfig) && loopInputInvokeConfig.invokeConfig.length > 0) {
283
-
284
- let invokes = [];
285
-
286
- Object.assign(objectKeep, {
287
- eventStageTag: eventStageTags,
288
- inputEventTag,
289
- serviceTag,
290
- resourceType: "Lambda",
291
- resourceName: functionName,
292
- outputEventTag: `${"Output_" + inputEventTag}`
293
- }
294
- )
295
-
296
- stageKeep.push(objectKeep);
297
- eventStage.push(eventStageTags);
298
-
299
- for (const invoke of loopInputInvokeConfig.invokeConfig) {
300
-
301
- invokes.push({
302
- eventStageTags: invoke.eventStageTag
303
- });
304
-
305
- objectKeep.invokes = invokes;
306
-
307
- }
308
-
309
- await setInvokeTest(loopInputInvokeConfig.invokeConfig, stages, eventStage, stageKeep);
310
- // continue
311
- // }
312
- }
313
- if (loopInputInvokeConfig && !loopInputInvokeConfig.invokeConfig) {
314
-
315
- let setInvokes = await setNoInvokeTest(loopInputInvokeConfig, serviceTag, functionName) // function Set !Invoke
283
+ invokeStages.push({
284
+ eventStageTag,
285
+ inputEventTag,
286
+ serviceTag,
287
+ resourceType: "Lambda",
288
+ resourceName: functionName,
289
+ outputEventTag: `Output_${inputEventTag}`
290
+ });
316
291
 
317
- stageKeep.push(...setInvokes)
318
- //
292
+ if (Array.isArray(inputConfig.invokeConfig) && inputConfig.invokeConfig.length > 0) {
293
+ setInvokeTest(inputConfig.invokeConfig, invokeEventTags, invokeStages, level + 1);
319
294
  }
320
295
  }
321
296
 
322
- return stageKeep
297
+ return {
298
+ invokeEventTags: structuredClone(invokeEventTags),
299
+ invokeStages: structuredClone(invokeStages)
300
+ };
323
301
  }
324
302
 
325
-
326
- async function setNoInvokeTest(invokeConfigs, serviceTag, functionName, eventStages = []) { // function set Not invoke
327
-
303
+ function setNoInvokeTest(invokeConfigs, serviceTag, functionName, eventStages = []) { // function set Not invoke
328
304
  let stageKeep = {}
329
305
  let eventStageTags = invokeConfigs.eventStageTag
330
- let inputEventTags = `${eventStageTags + "__case_"}${invokeConfigs.inputEventTag}`
306
+ let inputEventTags = `${eventStageTags}"__case_"${invokeConfigs.inputEventTag}`
331
307
 
332
308
  if (invokeConfigs) {
333
309
 
@@ -339,7 +315,6 @@ async function setNoInvokeTest(invokeConfigs, serviceTag, functionName, eventSta
339
315
  resourceName: functionName,
340
316
  outputEventTag: `${"Output_" + inputEventTags}`
341
317
  })
342
-
343
318
  }
344
319
  eventStages.push(stageKeep)
345
320
 
@@ -363,26 +338,25 @@ function createEventCaseByHandler(handler, messageAttributes = {}) {
363
338
  [handler]
364
339
  }
365
340
 
366
- function getHandlerFromEventTag(eventTag) {
367
- let handlerSpite = eventTag // fix
368
- let mainPart = handlerSpite.split("__case")[0];
341
+ function getHandlerFromEventTag(testTag) {
342
+ let mainPart = testTag.split("__case")[0];
369
343
  let handler = lowercaseFirst(mainPart.slice(-6));
370
344
  if (!handler || !Object.values(HANDLER).includes(handler)) { // Validate Handler
371
345
  if (mainPart.endsWith("Complete")) {
372
346
  handler = "Complete"
347
+ } else if (mainPart.endsWith("S3")) {
348
+ handler = "S3"
373
349
  } else {
374
- throw new NoRetryError("no handler");
350
+ throw new Error("not have handler")
375
351
  }
376
352
  }
377
353
  return handler
378
-
379
354
  }
380
355
 
381
356
  function getHandlerFromTestTag(eventTag) {
382
- let handlerSpite = eventTag // fix
383
357
  let handler = "";
384
- if (handlerSpite.includes("__case")) {
385
- let mainPart = handlerSpite.split("__case")[0];
358
+ if (eventTag.includes("__case")) {
359
+ let mainPart = eventTag.split("__case")[0];
386
360
  handler = mainPart.slice(-6);
387
361
  }
388
362
  handler = lowercaseFirst(handler) //
@@ -397,8 +371,31 @@ function createResourceName(eventTag) {
397
371
  return [serviceTag, functionName]
398
372
  }
399
373
 
374
+ async function getIntTestConfig(_izContext, intTestPath) {
375
+ return await getDataFromPath(_izContext, "GenerateIntegrationTestConfig.js", intTestPath)
376
+ }
377
+
378
+ function buildInvokeStages(invokeList, result = []) {
379
+ for (const inv of invokeList) {
380
+ const inStage = {
381
+ type: "invoke",
382
+ eventStageTag: inv.eventStageTag,
383
+ inputEventTag: `${inv.eventStageTag}__case_${inv.inputEventTag}`,
384
+ inputConfig: inv.inputConfig,
385
+ outputConfig: inv.outputConfig,
386
+ };
387
+
388
+ result.push(inStage);
389
+
390
+ // recursive invoke
391
+ if (inv.invokeConfig && inv.invokeConfig.length > 0) {
392
+ buildInvokeStages(inv.invokeConfig, result);
393
+ }
394
+ }
395
+ return result;
396
+ }
400
397
 
401
- module.exports = {
398
+ export default {
402
399
  lowercaseFirst,
403
400
  setEvent,
404
401
  createTestFunctionName,
@@ -413,5 +410,6 @@ module.exports = {
413
410
  getHandlerFromTestTag,
414
411
  createResourceName,
415
412
  setInvokeTest,
416
- setGenerateSeedData
413
+ setGenerateSeedData,
414
+ getIntTestConfig,
417
415
  }
@@ -0,0 +1,60 @@
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 from 'path';
21
+ import fs from "fs";
22
+
23
+ import { s3 } from '@izara_project/izara-core-library-s3'
24
+ import Logger from "@izara_project/izara-core-library-logger";
25
+
26
+ const _izContext = { Logger }
27
+
28
+ async function uploadFolder(folderPath, s3Prefix) {
29
+ let objectToUploads = [];
30
+ const entries = fs.readdirSync(folderPath, { withFileTypes: true });
31
+ for (const entry of entries) {
32
+ const fullPath = path.join(folderPath, entry.name);
33
+ const s3Key = path.join(s3Prefix, entry.name).replace(/\\/g, "/"); // path for user upload
34
+
35
+ if (entry.isDirectory()) {
36
+ await uploadFolder(fullPath, s3Key);
37
+ } else {
38
+
39
+ const fileStream = fs.createReadStream(fullPath);
40
+ const params = {
41
+ Bucket: "integrationtest-config-us-east-2",
42
+ Key: `test_config/${s3Key}`,
43
+ Body: fileStream,
44
+ };
45
+
46
+ objectToUploads.push(s3.putObjectS3(_izContext, params));
47
+
48
+ try {
49
+ await Promise.all(objectToUploads)
50
+ console.log("uploadComplete to", s3Key)
51
+ // console.log("Upload-Succuss:", s3Key, "ETag:", result.ETag);
52
+ } catch (err) {
53
+ // console.error("Upload-Failed:", s3Key, err);
54
+ console.log("Upload-Failed");
55
+ }
56
+ }
57
+ }
58
+ }
59
+
60
+ export default uploadFolder;
@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
17
17
 
18
18
  'use strict';
19
19
 
20
- import path from 'path';;
20
+ import path from 'path';
21
21
  import { fileURLToPath } from 'url';
22
22
  const __filename = fileURLToPath(import.meta.url);
23
23
  const __dirname = path.dirname(__filename);
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
18
18
  'use strict';
19
19
 
20
20
  import { middlewareHandler as middleware, validatorSchema } from "@izara_project/izara-middleware";
21
- import recordHandlerSharedLib from "@izara_project/izara-core-library-record-handler";
21
+ import { recordHandlerSharedLib } from "@izara_project/izara-core-library-record-handler";
22
22
  import Logger from '@izara_project/izara-core-library-logger';
23
23
 
24
24
  import findData from './FindData_Main';
@@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
21
21
  // const sqs = new AWS.SQS({ apiVersion: '2012-11-05' });
22
22
 
23
23
  import { middlewareHandler as middleware } from "@izara_project/izara-middleware";
24
- import recordHandlerSharedLib from "@izara_project/izara-core-library-record-handler";
24
+ import { recordHandlerSharedLib } from "@izara_project/izara-core-library-record-handler";
25
25
  import Logger from '@izara_project/izara-core-library-logger';
26
26
 
27
27
  import FlowSchemaOwnTopicEndpoint from './FlowSchemaOwnTopicEndpoint_Main.js';
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
18
18
  'use strict';
19
19
 
20
20
  import { middlewareHandler as middleware } from "@izara_project/izara-middleware";
21
- import recordHandlerSharedLib from "@izara_project/izara-core-library-record-handler";
21
+ import { recordHandlerSharedLib } from "@izara_project/izara-core-library-record-handler";
22
22
  import Logger from '@izara_project/izara-core-library-logger';
23
23
  import callingFlowSharedLib from "@izara_project/izara-core-library-calling-flow";
24
24
 
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
18
18
  'use strict';
19
19
 
20
20
  import { middlewareHandler as middleware } from "@izara_project/izara-middleware";
21
- import recordHandlerSharedLib from "@izara_project/izara-core-library-record-handler";
21
+ import { recordHandlerSharedLib } from "@izara_project/izara-core-library-record-handler";
22
22
  import Logger from '@izara_project/izara-core-library-logger';
23
23
 
24
24
  import <%- functionName %> from './<%- functionName %>_Main.js';
@@ -16,10 +16,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
  */
17
17
 
18
18
  'use strict';
19
- import path from 'path';;
19
+ import path from 'path';
20
20
  import { fileURLToPath } from 'url';
21
21
  const __filename = fileURLToPath(import.meta.url);
22
- const __dirname = path.dirname(__filename);;
22
+ const __dirname = path.dirname(__filename);
23
23
  import { consts, utils } from '../../../../../../MainLibs/index.js';
24
24
 
25
25
  const {
@@ -27,6 +27,7 @@ const {
27
27
  } = consts;
28
28
 
29
29
  const { firstLetterUpperCase: upperCase } = utils;
30
+ const templatePath = path.join(__dirname, './template.ejs')
30
31
 
31
32
  /**
32
33
  * receive objectSchema
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
18
18
  'use strict';
19
19
 
20
20
  import { middlewareHandler as middleware } from "@izara_project/izara-middleware";
21
- import recordHandlerSharedLib from "@izara_project/izara-core-library-record-handler";
21
+ import { recordHandlerSharedLib } from "@izara_project/izara-core-library-record-handler";
22
22
  import Logger from '@izara_project/izara-core-library-logger';
23
23
  import callingFlowSharedLib from '@izara_project/izara-core-library-calling-flow';
24
24
  import <%- functionName %> from './<%- functionName %>_Main.js';
@@ -25,7 +25,8 @@ const __dirname = path.dirname(__filename);
25
25
  import { consts, utils } from '../../../../../MainLibs/index.js';
26
26
  const {
27
27
  SOURCE_PATH,
28
- HANDLER
28
+ HANDLER,
29
+ SAVE_FILE_NAME
29
30
  } = consts;
30
31
  const { firstLetterUpperCase: upperCase } = utils;
31
32
  const templatePath = path.join(__dirname, "template.ejs");
@@ -26,17 +26,17 @@ import asyncFlowSharedLib from '@izara_project/izara-core-library-asynchronous-f
26
26
  import callingFlowSharedLib from '@izara_project/izara-core-library-calling-flow';
27
27
  import lambdaSharedLib from '@izara_project/izara-core-library-lambda';
28
28
  import { lambda,sns,sqs } from '@izara_project/izara-core-library-external-request';
29
- import { NoRetryError } from '@izara_project/izara-core-library-core'
29
+ import { NoRetryError } from '@izara_project/izara-core-library-core';
30
+ import { utils} from '@izara_project/izara-core-library-service-schemas';
31
+ const { createFlowTypeConcat } = utils;
30
32
  <% if (statusType === "triggerCache") { -%>
31
- import triggeredCacheSharedLib from ('@izara_project/izara-core-library-trigger-cache')
33
+ import triggeredCacheSharedLib from '@izara_project/izara-core-library-trigger-cache'
32
34
  <% } else if (statusType === "statusField") { -%>
33
- import { createFieldNamesFromRequestParamsByObjectSchema } from ('@izara_project/izara-market-library-service-schemas/src/GenerateCodeLibs/src/GenerateCodeLibs.js')
34
- import statusFieldSharedLib from ('@izara_project/izara-core-library-status-field')
35
+ import statusFieldSharedLib from '@izara_project/izara-core-library-status-field'
35
36
  <% } else if (statusType === "storedCache") { -%>
36
- import storedCacheSharedLib from ('@izara_project/izara-core-library-stored-cache')
37
+ import storedCacheSharedLib from '@izara_project/izara-core-library-stored-cache'
37
38
  <% } -%>
38
- import { utils} from ('@izara_project/izara-core-library-service-schemas')
39
- const { createFlowTypeConcat } = utils
39
+
40
40
  //(<optionalRequire>)
41
41
  //(</optionalRequire>)
42
42
  /**
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
18
18
  'use strict';
19
19
 
20
20
  import { middlewareHandler as middleware } from "@izara_project/izara-middleware";
21
- import recordHandlerSharedLib from "@izara_project/izara-core-library-record-handler";
21
+ import { recordHandlerSharedLib } from "@izara_project/izara-core-library-record-handler";
22
22
  import Logger from '@izara_project/izara-core-library-logger';
23
23
 
24
24
  import <%- functionName %> from './<%- functionName %>_Main.js';
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
18
18
  'use strict';
19
19
 
20
20
  import { middlewareHandler as middleware } from "@izara_project/izara-middleware";
21
- import recordHandlerSharedLib from "@izara_project/izara-core-library-record-handler";
21
+ import { recordHandlerSharedLib } from "@izara_project/izara-core-library-record-handler";
22
22
  import Logger from '@izara_project/izara-core-library-logger';
23
23
  import callingFlowSharedLib from '@izara_project/izara-core-library-calling-flow';
24
24
  import <%- functionName %> from './<%- functionName %>_Main.js';
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
18
18
  'use strict';
19
19
 
20
20
  import { middlewareHandler as middleware } from "@izara_project/izara-middleware";
21
- import recordHandlerSharedLib from "@izara_project/izara-core-library-record-handler";
21
+ import { recordHandlerSharedLib } from "@izara_project/izara-core-library-record-handler";
22
22
  import Logger from '@izara_project/izara-core-library-logger';
23
23
  import callingFlowSharedLib from '@izara_project/izara-core-library-calling-flow';
24
24
 
@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  import { middlewareHandler as middleware } from "@izara_project/izara-middleware";
21
21
  import Logger from '@izara_project/izara-core-library-logger';
22
22
  import callingFlowSharedLib from '@izara_project/izara-core-library-calling-flow';
23
- import recordHandlerSharedLib from "@izara_project/izara-core-library-record-handler";
23
+ import { recordHandlerSharedLib } from "@izara_project/izara-core-library-record-handler";
24
24
 
25
25
  import <%- functionName %> from './<%- functionName %>_Main.js';
26
26
 
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
19
19
 
20
20
  import { middlewareHandler as middleware } from "@izara_project/izara-middleware";
21
21
  import Logger from '@izara_project/izara-core-library-logger';
22
- import recordHandlerSharedLib from "@izara_project/izara-core-library-record-handler";
22
+ import { recordHandlerSharedLib } from "@izara_project/izara-core-library-record-handler";
23
23
 
24
24
  import <%- functionName %> from './<%- functionName %>_Main.js';
25
25
 
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
19
19
 
20
20
  import { middlewareHandler as middleware } from "@izara_project/izara-middleware";
21
21
  import Logger from '@izara_project/izara-core-library-logger';
22
- import recordHandlerSharedLib from "@izara_project/izara-core-library-record-handler";
22
+ import { recordHandlerSharedLib } from "@izara_project/izara-core-library-record-handler";
23
23
  import callingFlowSharedLib from '@izara_project/izara-core-library-calling-flow';
24
24
 
25
25
  import <%- functionName %> from './<%- functionName %>_Main.js';
@@ -39,6 +39,7 @@ const {
39
39
  STORAGE_TYPES
40
40
  } = consts;
41
41
  const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = utils;
42
+ const templatePath = path.join(__dirname, './template.ejs')
42
43
 
43
44
  /**
44
45
  * receive objectSchema
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
19
19
 
20
20
  import { middlewareHandler as middleware } from "@izara_project/izara-middleware";
21
21
  import Logger from '@izara_project/izara-core-library-logger';
22
- import recordHandlerSharedLib from "@izara_project/izara-core-library-record-handler";
22
+ import { recordHandlerSharedLib } from "@izara_project/izara-core-library-record-handler";
23
23
  import callingFlowSharedLib from '@izara_project/izara-core-library-calling-flow';
24
24
 
25
25
  import <%- functionName %> from './<%- functionName %>_Main.js';
@@ -26,6 +26,7 @@ const {
26
26
  HANDLER,
27
27
  } = consts;
28
28
  const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = utils;
29
+ const templatePath = path.join(__dirname, './template.ejs')
29
30
 
30
31
  /**
31
32
  * receive objectSchema
@@ -39,6 +39,7 @@ const {
39
39
  STORAGE_TYPES
40
40
  } = consts;
41
41
  const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase } = utils;
42
+ const templatePath = path.join(__dirname, './template.ejs')
42
43
 
43
44
  /**
44
45
  * receive objectSchema
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
19
19
 
20
20
  import { middlewareHandler as middleware } from "@izara_project/izara-middleware";
21
21
  import Logger from '@izara_project/izara-core-library-logger';
22
- import recordHandlerSharedLib from "@izara_project/izara-core-library-record-handler";
22
+ import { recordHandlerSharedLib } from "@izara_project/izara-core-library-record-handler";
23
23
  import callingFlowSharedLib from '@izara_project/izara-core-library-calling-flow';
24
24
 
25
25
  import <%- functionName %> from './<%- functionName %>_Main.js';
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
19
19
 
20
20
  import { middlewareHandler as middleware } from "@izara_project/izara-middleware";
21
21
  import Logger from '@izara_project/izara-core-library-logger';
22
- import recordHandlerSharedLib from "@izara_project/izara-core-library-record-handler";
22
+ import { recordHandlerSharedLib } from "@izara_project/izara-core-library-record-handler";
23
23
  import callingFlowSharedLib from '@izara_project/izara-core-library-calling-flow';
24
24
 
25
25
  import <%- functionName %> from './<%- functionName %>_Main.js';
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
19
19
 
20
20
  import { middlewareHandler as middleware } from "@izara_project/izara-middleware";
21
21
  import Logger from '@izara_project/izara-core-library-logger';
22
- import recordHandlerSharedLib from "@izara_project/izara-core-library-record-handler";
22
+ import { recordHandlerSharedLib } from "@izara_project/izara-core-library-record-handler";
23
23
  import callingFlowSharedLib from '@izara_project/izara-core-library-calling-flow';
24
24
 
25
25
  import createObjectComplete from './CreateObjectComplete_Main.js';
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
19
19
 
20
20
  import { middlewareHandler as middleware } from "@izara_project/izara-middleware";
21
21
  import Logger from '@izara_project/izara-core-library-logger';
22
- import recordHandlerSharedLib from "@izara_project/izara-core-library-record-handler";
22
+ import { recordHandlerSharedLib } from "@izara_project/izara-core-library-record-handler";
23
23
  import callingFlowSharedLib from '@izara_project/izara-core-library-calling-flow';
24
24
 
25
25
  import <%- functionName %> from './<%- firstLetterUpperCase(functionName) %>_Main.js';
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
19
19
 
20
20
  import { middlewareHandler as middleware } from "@izara_project/izara-middleware";
21
21
  import Logger from '@izara_project/izara-core-library-logger';
22
- import recordHandlerSharedLib from "@izara_project/izara-core-library-record-handler";
22
+ import { recordHandlerSharedLib } from "@izara_project/izara-core-library-record-handler";
23
23
  import callingFlowSharedLib from '@izara_project/izara-core-library-calling-flow';
24
24
 
25
25
  import <%- functionName %> from './<%- firstLetterUpperCase(functionName) %>_Main.js';
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
19
19
 
20
20
  import { middlewareHandler as middleware } from "@izara_project/izara-middleware";
21
21
  import Logger from '@izara_project/izara-core-library-logger';
22
- import recordHandlerSharedLib from "@izara_project/izara-core-library-record-handler";
22
+ import { recordHandlerSharedLib } from "@izara_project/izara-core-library-record-handler";
23
23
  import callingFlowSharedLib from '@izara_project/izara-core-library-calling-flow';
24
24
 
25
25
  import <%- functionName %> from './<%- firstLetterUpperCase(functionName) %>_Main.js';
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
19
19
 
20
20
  import { middlewareHandler as middleware } from "@izara_project/izara-middleware";
21
21
  import Logger from '@izara_project/izara-core-library-logger';
22
- import recordHandlerSharedLib from "@izara_project/izara-core-library-record-handler";
22
+ import { recordHandlerSharedLib } from "@izara_project/izara-core-library-record-handler";
23
23
  import callingFlowSharedLib from '@izara_project/izara-core-library-calling-flow';
24
24
 
25
25
  import processLogical from './ProcessLogical_Main.js';
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
19
19
 
20
20
  import { middlewareHandler as middleware } from "@izara_project/izara-middleware";
21
21
  import Logger from '@izara_project/izara-core-library-logger';
22
- import recordHandlerSharedLib from "@izara_project/izara-core-library-record-handler";
22
+ import { recordHandlerSharedLib } from "@izara_project/izara-core-library-record-handler";
23
23
  import callingFlowSharedLib from '@izara_project/izara-core-library-calling-flow';
24
24
 
25
25
  import paginateProcessLogical from './PaginateProcessLogical_Main.js';