@things-factory/shell 6.2.139 → 6.2.155

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.
@@ -10,7 +10,7 @@ exports.roundTransformer = {
10
10
  * @param {number | null} value - Floating point value to round or null
11
11
  * @returns {number | null} - Rounded number or null
12
12
  */
13
- to: (value) => (value !== null && !isNaN(value) ? Math.round(value * 100) / 100 : null),
13
+ to: (value) => (value !== null && !isNaN(value) ? Math.round(value * 10000) / 10000 : undefined),
14
14
  /**
15
15
  * Returns the entity field value as it is without any transformation when reading from the database.
16
16
  * @param {number} value - Number value read from the database
@@ -1 +1 @@
1
- {"version":3,"file":"round-transform.js","sourceRoot":"","sources":["../../server/typeorm/round-transform.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACU,QAAA,gBAAgB,GAAqB;IAChD;;;;OAIG;IACH,EAAE,EAAE,CAAC,KAAoB,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;IAEtG;;;;OAIG;IACH,IAAI,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK;CAC/B,CAAA","sourcesContent":["import { ValueTransformer } from 'typeorm'\n\n/**\n * ValueTransformer object for rounding floating point values.\n */\nexport const roundTransformer: ValueTransformer = {\n /**\n * Rounds the entity field value before storing it in the database.\n * @param {number | null} value - Floating point value to round or null\n * @returns {number | null} - Rounded number or null\n */\n to: (value: number | null) => (value !== null && !isNaN(value) ? Math.round(value * 100) / 100 : null),\n\n /**\n * Returns the entity field value as it is without any transformation when reading from the database.\n * @param {number} value - Number value read from the database\n * @returns {number} - The number value as is\n */\n from: (value: number) => value\n}\n"]}
1
+ {"version":3,"file":"round-transform.js","sourceRoot":"","sources":["../../server/typeorm/round-transform.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACU,QAAA,gBAAgB,GAAqB;IAChD;;;;OAIG;IACH,EAAE,EAAE,CAAC,KAAoB,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;IAE/G;;;;OAIG;IACH,IAAI,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK;CAC/B,CAAA","sourcesContent":["import { ValueTransformer } from 'typeorm'\n\n/**\n * ValueTransformer object for rounding floating point values.\n */\nexport const roundTransformer: ValueTransformer = {\n /**\n * Rounds the entity field value before storing it in the database.\n * @param {number | null} value - Floating point value to round or null\n * @returns {number | null} - Rounded number or null\n */\n to: (value: number | null) => (value !== null && !isNaN(value) ? Math.round(value * 10000) / 10000 : undefined),\n\n /**\n * Returns the entity field value as it is without any transformation when reading from the database.\n * @param {number} value - Number value read from the database\n * @returns {number} - The number value as is\n */\n from: (value: number) => value\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/shell",
3
- "version": "6.2.139",
3
+ "version": "6.2.155",
4
4
  "description": "Core module for framework",
5
5
  "bin": {
6
6
  "things-factory": "bin/things-factory",
@@ -63,7 +63,7 @@
63
63
  "@things-factory/ejs-remote": "^6.2.122",
64
64
  "@things-factory/env": "^6.2.139",
65
65
  "@things-factory/operato-license-checker": "^4.0.4",
66
- "@things-factory/styles": "^6.2.122",
66
+ "@things-factory/styles": "^6.2.155",
67
67
  "@things-factory/utils": "^6.2.122",
68
68
  "@webcomponents/webcomponentsjs": "^2.6.0",
69
69
  "args": "^5.0.0",
@@ -134,5 +134,5 @@
134
134
  "pg": "^8.7.3",
135
135
  "sqlite3": "^5.0.8"
136
136
  },
137
- "gitHead": "66c1ee297ad4de4d68ad54bc4c06ffb14f8e40b5"
137
+ "gitHead": "7276515922bf5eccf80bf5bcd8c8ff9df8048dab"
138
138
  }
@@ -9,7 +9,7 @@ export const roundTransformer: ValueTransformer = {
9
9
  * @param {number | null} value - Floating point value to round or null
10
10
  * @returns {number | null} - Rounded number or null
11
11
  */
12
- to: (value: number | null) => (value !== null && !isNaN(value) ? Math.round(value * 100) / 100 : null),
12
+ to: (value: number | null) => (value !== null && !isNaN(value) ? Math.round(value * 10000) / 10000 : undefined),
13
13
 
14
14
  /**
15
15
  * Returns the entity field value as it is without any transformation when reading from the database.