@izara_project/izara-market-library-service-schemas 1.0.80 → 1.0.81

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.80",
3
+ "version": "1.0.81",
4
4
  "description": "Schemas for Izara Market project",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -18,6 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
18
18
  'use strict';
19
19
 
20
20
  import { objectHash as hash } from '@izara_project/izara-shared-core';
21
+ import utils from './Utils.js';
22
+ const { firstLetterUpperCase: upperCase } = utils;
21
23
 
22
24
  function checkValidTableYaml(_izContext, currentTableSetting, existsTableSetting) {
23
25
  // console.log("checkValidTableYaml", JSON.stringify(currentTableSetting, null, 2), JSON.stringify(existsTableSetting, null, 2))
@@ -129,7 +129,7 @@ async function externalLambdaIamRoleDataPerAction(_izContext, allObjSchemas) {
129
129
  [RESOURCE_CLASSES.lambda]: [LAMBDA_RESOURCE.invokeFunction]
130
130
  },
131
131
  storageResourceAllLocalObjectSchemas.resourceGraphServiceTag.map(graphServerTag =>
132
- externalResourceName(RESOURCE_CLASSES.lambda, "CreateNodeHdrInv", graphServerTag)
132
+ externalResourceName(RESOURCE_CLASSES.lambda, "CreateNodeV2HdrInv", graphServerTag)
133
133
  )
134
134
  ),
135
135
  createIamRole(
@@ -30,7 +30,11 @@ import { NoRetryError } from '@izara_project/izara-core-library-core';
30
30
  import { utils} from '@izara_project/izara-core-library-service-schemas';
31
31
  const { createFlowTypeConcat } = utils;
32
32
  <% if (statusType === "triggerCache") { -%>
33
+ <<<<<<< HEAD
33
34
  import triggeredCacheSharedLibV2 from '@izara_project/izara-core-library-trigger-cache';
35
+ =======
36
+ import { triggeredCacheSharedLibV2 } from '@izara_project/izara-core-library-trigger-cache';
37
+ >>>>>>> 80dda49 (- fix bug: fix template for triggerCahce flowSchema, main function and handler)
34
38
  <% } else if (statusType === "statusField") { -%>
35
39
  import statusFieldSharedLib from '@izara_project/izara-core-library-status-field';
36
40
  <% } else if (statusType === "storedCache") { -%>
@@ -22,7 +22,7 @@ import { fileURLToPath } from 'url';
22
22
  const __filename = fileURLToPath(import.meta.url);
23
23
  const __dirname = path.dirname(__filename);
24
24
 
25
- const { NoRetryError } = require('@izara_project/izara-core-library-core');
25
+ import { NoRetryError } from '@izara_project/izara-core-library-core';
26
26
  import { getObjectSchema } from '@izara_project/izara-core-library-service-schemas';
27
27
  import { consts, utils } from '../../../../../../MainLibs/index.js';
28
28
 
@@ -372,11 +372,12 @@ async function generateCodeWithTemplate(_izContext, objSchemaPath) {
372
372
 
373
373
  console.log("event ownTopic generated")
374
374
  createSourceParams.push(...ownTopicResources);
375
-
376
- if (flowSchema.outputTopic === true && flowSchema.event.includes("ownTopic") || flowSchema.event.includes("extTopic")) {
377
- const statusFieldComponent = (await Promise.all(Object.entries(createFlowSchemaStatusFieldComponent).map(([type, functionYaml]) => functionYaml(_izContext, flowSchema, saveFilePath)))).flat();;
378
- console.log("statusFieldComponent", JSON.stringify(statusFieldComponent, null, 2))
379
- createSourceParams.push(...statusFieldComponent)
375
+ if (flowSchema.statusType === "statusField") {
376
+ if (flowSchema.outputTopic === true && flowSchema.event.includes("ownTopic") || flowSchema.event.includes("extTopic")) {
377
+ const statusFieldComponent = (await Promise.all(Object.entries(createFlowSchemaStatusFieldComponent).map(([type, functionYaml]) => functionYaml(_izContext, flowSchema, saveFilePath)))).flat();;
378
+ // console.log("statusFieldComponent", JSON.stringify(statusFieldComponent, null, 2))
379
+ createSourceParams.push(...statusFieldComponent)
380
+ }
380
381
  }
381
382
  } else if (event.includes("eventBridge")) {
382
383
 
@@ -495,7 +496,7 @@ async function generateCodeWithTemplate(_izContext, objSchemaPath) {
495
496
  createSourceParams.push(...flowSchemaRegisters);
496
497
  }
497
498
 
498
- console.log("createSourceParams flowSchema", createSourceParams)
499
+ // console.log("createSourceParams flowSchema", createSourceParams)
499
500
  return createSourceParams;
500
501
  } catch (error) {
501
502
  _izContext.logger.error('Error generating code with template flowSchema:', error);
@@ -75,7 +75,7 @@ async function data(_izContext, objectSchemas, srcPath) {
75
75
  additionalResourcePermission.push(
76
76
  createIamRole(
77
77
  { [RESOURCE_CLASSES.dynamoDbTable]: DYNAMO_RESOURCE.query },
78
- [tableForQuery]
78
+ tableForQuery
79
79
  )
80
80
  );
81
81
  }