@xh/hoist 76.0.0-SNAPSHOT.1758212424281 → 76.0.0-SNAPSHOT.1758217044052

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.
@@ -7,7 +7,7 @@
7
7
  import {XH} from '@xh/hoist/core';
8
8
  import {debounce, isFunction} from 'lodash';
9
9
  import {getOrCreate, throwIf, warnIf} from './LangUtils';
10
- import {withDebug, withInfo} from '../log/LogUtils';
10
+ import {withDebug, withInfo} from '../log';
11
11
 
12
12
  /**
13
13
  * Decorates a class method so that it is debounced by the specified duration.
@@ -4,9 +4,8 @@
4
4
  *
5
5
  * Copyright © 2025 Extremely Heavy Industries Inc.
6
6
  */
7
- import {PlainObject, Thunkable} from '@xh/hoist/core';
7
+ import type {PlainObject, Thunkable, LogSource} from '@xh/hoist/core';
8
8
  import {Exception} from '@xh/hoist/core/exception/Exception';
9
- import {type LogSource} from '@xh/hoist/utils/log';
10
9
  import {
11
10
  flatMap,
12
11
  forOwn,
package/utils/js/index.ts CHANGED
@@ -9,4 +9,3 @@ export * from './LangUtils';
9
9
  export * from './Decorators';
10
10
  export * from './DomUtils';
11
11
  export * from './TestUtils';
12
- export * from './VersionUtils';
@@ -4,10 +4,9 @@
4
4
  *
5
5
  * Copyright © 2025 Extremely Heavy Industries Inc.
6
6
  */
7
- import {Some} from '@xh/hoist/core';
8
- import {castArray, isString} from 'lodash';
7
+ import type {Some, LogLevel, LogSource} from '@xh/hoist/core';
8
+ import {castArray, flatMap, isString} from 'lodash';
9
9
  import store from 'store2';
10
- import {intersperse} from '../js/LangUtils';
11
10
 
12
11
  /**
13
12
  * Utility functions providing managed, structured logging to Hoist apps.
@@ -23,12 +22,6 @@ import {intersperse} from '../js/LangUtils';
23
22
  * XH.logLevel from the console.
24
23
  */
25
24
 
26
- /** Severity Level for log statement */
27
- export type LogLevel = 'error' | 'warn' | 'info' | 'debug';
28
-
29
- /** Object identifying the source of log statement. Typically, a javascript class */
30
- export type LogSource = string | {displayName: string} | {constructor: {name: string}};
31
-
32
25
  /**
33
26
  * Current minimum severity for Hoist log utils (default 'info').
34
27
  * Messages logged via managed Hoist log utils with lower severity will be ignored.
@@ -209,6 +202,15 @@ function parseSource(source: LogSource): string {
209
202
  return null;
210
203
  }
211
204
 
205
+ /**
206
+ * Intersperse a separator between each item in an array.
207
+ * Same method as in LangUtils, but duplicated here to avoid circular dependency.
208
+ */
209
+ function intersperse<T>(arr: T[], separator: T): T[] {
210
+ return flatMap(arr, (it, idx) => {
211
+ return idx > 0 ? [separator, it] : [it];
212
+ });
213
+ }
212
214
  //----------------------------------------------------------------
213
215
  // Initialization + Level/Severity support.
214
216
  // Initialize during parsing to make available immediately.
@@ -0,0 +1,8 @@
1
+ /*
2
+ * This file belongs to Hoist, an application development toolkit
3
+ * developed by Extremely Heavy Industries (www.xh.io | info@xh.io)
4
+ *
5
+ * Copyright © 2025 Extremely Heavy Industries Inc.
6
+ */
7
+
8
+ export * from './VersionUtils';
File without changes