@hanzo/commerce 7.0.1 → 7.0.2

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 (2) hide show
  1. package/package.json +2 -4
  2. package/service/debug.ts +7 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/commerce",
3
- "version": "7.0.1",
3
+ "version": "7.0.2",
4
4
  "description": "e-commerce framework.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
@@ -26,9 +26,7 @@
26
26
  },
27
27
  "exports": {
28
28
  ".": "./index.ts",
29
- "./path-utils": "./service/path-utils.ts",
30
- "./types": "./types/index.ts",
31
- "./debug": "./service/debug.ts"
29
+ "./types": "./types/index.ts"
32
30
  },
33
31
  "dependencies": {
34
32
  "ethers": "^6.12.0",
package/service/debug.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { CategoryNode, CategoryNodeRole, Family, LineItem } from '../types'
2
2
 
3
- // Note recursion
3
+ // Node recursion
4
4
  export const categoryNodeDump = (node: CategoryNode, level: number = 0): void => {
5
5
  const spacers: string[] = []
6
6
  for (let i = 0; i < level; i++) {
@@ -9,9 +9,9 @@ export const categoryNodeDump = (node: CategoryNode, level: number = 0): void =>
9
9
  console.log("NODE:" + spacers.join(''), node.skuToken)
10
10
  node.subNodes?.forEach((sn: CategoryNode) => {categoryNodeDump(sn, level + 1)})
11
11
  }
12
-
12
+
13
13
  export const selectedFamiliesDump = (result: Family[]): string => {
14
- const toDisplay = result.map((c) => (c.id))
14
+ const toDisplay = result.map((c) => (c.id))
15
15
  return JSON.stringify(toDisplay, null, 2)
16
16
  }
17
17
 
@@ -32,10 +32,10 @@ export const peekDump = (result : {
32
32
  item: result.item ? result.item.sku : 'UNDEF',
33
33
  family: result.family ? result.family.id : 'UNDEF',
34
34
  families: result.families ? result.families.map((f) => (f.id)) : 'UNDEF',
35
- node: result.node ?
36
- (result.node.skuToken + (result.node.label ? (': ' + result.node.label) : ''))
37
- :
35
+ node: result.node ?
36
+ (result.node.skuToken + (result.node.label ? (': ' + result.node.label) : ''))
37
+ :
38
38
  'UNDEF'
39
39
  }
40
40
  return JSON.stringify(toDisplay, null, 2)
41
- }
41
+ }