@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.
- package/CHANGELOG.md +3 -1
- package/appcontainer/AppContainerModel.ts +2 -1
- package/build/types/core/XH.d.ts +1 -1
- package/build/types/core/types/Types.d.ts +10 -0
- package/build/types/utils/js/LangUtils.d.ts +1 -2
- package/build/types/utils/js/index.d.ts +0 -1
- package/build/types/utils/log/LogUtils.d.ts +1 -11
- package/build/types/utils/version/index.d.ts +1 -0
- package/core/HoistBase.ts +1 -8
- package/core/XH.ts +2 -1
- package/core/types/Types.ts +6 -0
- package/kit/ag-grid/index.ts +1 -1
- package/kit/highcharts/index.ts +1 -1
- package/mobx/overrides.ts +1 -1
- package/package.json +1 -1
- package/svc/ChangelogService.ts +1 -1
- package/svc/EnvironmentService.ts +2 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/utils/js/Decorators.ts +1 -1
- package/utils/js/LangUtils.ts +1 -2
- package/utils/js/index.ts +0 -1
- package/utils/log/LogUtils.ts +11 -9
- package/utils/version/index.ts +8 -0
- /package/build/types/utils/{js → version}/VersionUtils.d.ts +0 -0
- /package/utils/{js → version}/VersionUtils.ts +0 -0
package/utils/js/Decorators.ts
CHANGED
|
@@ -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
|
|
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.
|
package/utils/js/LangUtils.ts
CHANGED
|
@@ -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
package/utils/log/LogUtils.ts
CHANGED
|
@@ -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.
|
|
File without changes
|
|
File without changes
|