@izara_project/izara-market-library-service-schemas 1.0.79 → 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.79",
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))
@@ -25,7 +25,7 @@ import { validatePathWithRootServicePath } from "./libs/GenerateCodeLibs.js";
25
25
  import { schemaConfig } from "./SchemaConfig.js";
26
26
 
27
27
  // SourceManager
28
- import { utils, createSource } from "../SourceManager";
28
+ import { utils, createSource } from "../SourceManager/index.js";
29
29
  const { deleteFileInDir } = utils
30
30
 
31
31
 
@@ -27,7 +27,7 @@ import { readFileSync } from "fs";
27
27
  import { utils, createSource } from "../SourceManager/index.js";
28
28
  const { deleteFileInDir } = utils
29
29
  import generateTest from './TemplateData/IntTest/generateTests/generateTemplate.js'
30
- import uploadLib from './TemplateData/IntTest/upload/uploadIntTest.js'
30
+
31
31
  import lib from '../reStructure/TemplateData/IntTest/libs/libs.js';
32
32
  const { getLocalConfig } = lib;
33
33
  async function generateCodeWithTemplate(_izContext, savePath, settings) {
@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  import { middlewareHandler } from "@izara_project/izara-middleware";
21
21
  import callingFlowSharedLib from '@izara_project/izara-core-library-calling-flow';
22
22
  import Logger from '@izara_project/izara-core-library-logger';
23
- import recordHandlerSharedLib from '@izara_project/izara-core-library-record-handler';
23
+ import { recordHandlerSharedLib } from '@izara_project/izara-core-library-record-handler';
24
24
  import { generateCodeLibs } from '@izara_project/izara-market-library-service-schemas';
25
25
 
26
26
  //(<optionalRequire>)
@@ -47,7 +47,8 @@ import { createNodeLib, uploadUseCase, consts, getObjectSchema } from '@izara_pr
47
47
  import graphSharedLibs from '@izara_project/izara-core-library-graph-service';
48
48
 
49
49
  // ──────────────────────── Market Library Service Schemas ────────────────────────
50
- import { constsGenerateCodeLibs, generateCodeLibs } from '@izara_project/izara-market-library-service-schemas';
50
+ import { constsGenerateCodeLibs, generateCodeLibs, mainLibUtils } from '@izara_project/izara-market-library-service-schemas';
51
+
51
52
  const {
52
53
  TOPIC_NAME_GENERATE_CODE,
53
54
  TOPIC_NAME_GRAPH_HANDLER
@@ -55,6 +56,8 @@ const {
55
56
 
56
57
  const { dynamoDbIdentifiersByStorageResource, createDataDetailsLib } = generateCodeLibs
57
58
 
59
+ const { firstLetterUpperCase } = mainLibUtils;
60
+
58
61
  //(<optionalRequire>)
59
62
  //(</optionalRequire>)
60
63
 
@@ -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,11 +30,15 @@ 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
- import triggeredCacheSharedLib from '@izara_project/izara-core-library-trigger-cache'
33
+ <<<<<<< HEAD
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
- import statusFieldSharedLib from '@izara_project/izara-core-library-status-field'
39
+ import statusFieldSharedLib from '@izara_project/izara-core-library-status-field';
36
40
  <% } else if (statusType === "storedCache") { -%>
37
- import storedCacheSharedLib from '@izara_project/izara-core-library-stored-cache'
41
+ import storedCacheSharedLib from '@izara_project/izara-core-library-stored-cache';
38
42
  <% } -%>
39
43
 
40
44
  //(<optionalRequire>)
@@ -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
  }