@idlebox/common 1.5.13 → 1.5.15
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/lib/autoindex.d.ts +5 -3
- package/lib/autoindex.d.ts.map +1 -1
- package/lib/autoindex.js +70 -66
- package/lib/autoindex.js.map +1 -1
- package/lib/debugging/inspect.d.ts +2 -0
- package/lib/debugging/inspect.d.ts.map +1 -1
- package/lib/debugging/inspect.js +20 -8
- package/lib/debugging/inspect.js.map +1 -1
- package/lib/error/pretty.nodejs.d.ts +0 -29
- package/lib/error/pretty.nodejs.d.ts.map +1 -1
- package/lib/error/pretty.nodejs.js +157 -237
- package/lib/error/pretty.nodejs.js.map +1 -1
- package/lib/error/stack-parser.v8.d.ts +31 -0
- package/lib/error/stack-parser.v8.d.ts.map +1 -0
- package/lib/error/stack-parser.v8.js +106 -0
- package/lib/error/stack-parser.v8.js.map +1 -0
- package/lib/lifecycle/dispose/bridges/function.d.ts.map +1 -1
- package/lib/lifecycle/dispose/bridges/function.js +5 -2
- package/lib/lifecycle/dispose/bridges/function.js.map +1 -1
- package/lib/lifecycle/dispose/bridges/streams.d.ts.map +1 -1
- package/lib/lifecycle/dispose/bridges/streams.js +9 -4
- package/lib/lifecycle/dispose/bridges/streams.js.map +1 -1
- package/lib/lifecycle/dispose/disposable.d.ts.map +1 -1
- package/lib/lifecycle/dispose/disposable.js +11 -1
- package/lib/lifecycle/dispose/disposable.js.map +1 -1
- package/lib/lifecycle/event/event.d.ts +2 -0
- package/lib/lifecycle/event/event.d.ts.map +1 -1
- package/lib/lifecycle/event/event.js +15 -1
- package/lib/lifecycle/event/event.js.map +1 -1
- package/lib/schedule/interval.d.ts +2 -0
- package/lib/schedule/interval.d.ts.map +1 -1
- package/lib/schedule/interval.js +11 -0
- package/lib/schedule/interval.js.map +1 -1
- package/package.json +7 -7
- package/src/autoindex.ts +94 -90
- package/src/debugging/inspect.ts +24 -4
- package/src/error/pretty.nodejs.ts +214 -337
- package/src/error/stack-parser.v8.ts +157 -0
- package/src/lifecycle/dispose/bridges/function.ts +11 -5
- package/src/lifecycle/dispose/bridges/streams.ts +47 -36
- package/src/lifecycle/dispose/disposable.ts +14 -1
- package/src/lifecycle/event/event.ts +18 -1
- package/src/schedule/interval.ts +12 -0
package/src/autoindex.ts
CHANGED
|
@@ -15,36 +15,36 @@
|
|
|
15
15
|
// @ts-ignore
|
|
16
16
|
|
|
17
17
|
/* array/diff.ts */
|
|
18
|
-
// Identifiers
|
|
18
|
+
// Identifiers (2)
|
|
19
19
|
export type { IArrayUpdate } from "./array/diff.js";
|
|
20
20
|
export { arrayDiff } from "./array/diff.js";
|
|
21
21
|
/* array/is-same.ts */
|
|
22
|
-
// Identifiers
|
|
22
|
+
// Identifiers (1)
|
|
23
23
|
export { isArraySame } from "./array/is-same.js";
|
|
24
24
|
/* array/normalize.ts */
|
|
25
|
-
// Identifiers
|
|
25
|
+
// Identifiers (1)
|
|
26
26
|
export { normalizeArray } from "./array/normalize.js";
|
|
27
27
|
/* array/sort-alpha.ts */
|
|
28
|
-
// Identifiers
|
|
28
|
+
// Identifiers (1)
|
|
29
29
|
export { sortByString } from "./array/sort-alpha.js";
|
|
30
30
|
/* array/unique.ts */
|
|
31
|
-
// Identifiers
|
|
31
|
+
// Identifiers (4)
|
|
32
32
|
export { arrayUnique } from "./array/unique.js";
|
|
33
33
|
export { arrayUniqueReference } from "./array/unique.js";
|
|
34
34
|
export type { IUniqueIdFactory } from "./array/unique.js";
|
|
35
35
|
export { uniqueFilter } from "./array/unique.js";
|
|
36
36
|
/* date/consts.ts */
|
|
37
|
-
// Identifiers
|
|
37
|
+
// Identifiers (5)
|
|
38
38
|
export { oneSecond } from "./date/consts.js";
|
|
39
39
|
export { oneMinute } from "./date/consts.js";
|
|
40
40
|
export { oneHour } from "./date/consts.js";
|
|
41
41
|
export { oneDay } from "./date/consts.js";
|
|
42
42
|
export { oneWeek } from "./date/consts.js";
|
|
43
43
|
/* date/is-invalid.ts */
|
|
44
|
-
// Identifiers
|
|
44
|
+
// Identifiers (1)
|
|
45
45
|
export { isDateInvalid } from "./date/is-invalid.js";
|
|
46
46
|
/* date/sibling.ts */
|
|
47
|
-
// Identifiers
|
|
47
|
+
// Identifiers (7)
|
|
48
48
|
export { nextSecond } from "./date/sibling.js";
|
|
49
49
|
export { nextMinute } from "./date/sibling.js";
|
|
50
50
|
export { nextHour } from "./date/sibling.js";
|
|
@@ -53,17 +53,19 @@
|
|
|
53
53
|
export { nextMonth } from "./date/sibling.js";
|
|
54
54
|
export { nextYear } from "./date/sibling.js";
|
|
55
55
|
/* date/to-string.ts */
|
|
56
|
-
// Identifiers
|
|
56
|
+
// Identifiers (1)
|
|
57
57
|
export { humanDate } from "./date/to-string.js";
|
|
58
58
|
/* date/unix.ts */
|
|
59
|
-
// Identifiers
|
|
59
|
+
// Identifiers (2)
|
|
60
60
|
export { getTimeStamp } from "./date/unix.js";
|
|
61
61
|
export { fromTimeStamp } from "./date/unix.js";
|
|
62
62
|
/* debugging/inspect.ts */
|
|
63
|
-
// Identifiers
|
|
63
|
+
// Identifiers (3)
|
|
64
|
+
export { inspectSymbol } from "./debugging/inspect.js";
|
|
65
|
+
export { defineInspectMethod } from "./debugging/inspect.js";
|
|
64
66
|
export { tryInspect } from "./debugging/inspect.js";
|
|
65
67
|
/* debugging/object-with-name.ts */
|
|
66
|
-
// Identifiers
|
|
68
|
+
// Identifiers (10)
|
|
67
69
|
export type { NamedObject } from "./debugging/object-with-name.js";
|
|
68
70
|
export { objectName } from "./debugging/object-with-name.js";
|
|
69
71
|
export { nameObject } from "./debugging/object-with-name.js";
|
|
@@ -75,150 +77,152 @@
|
|
|
75
77
|
export { nameFunction } from "./debugging/object-with-name.js";
|
|
76
78
|
export { assertFunctionHasName } from "./debugging/object-with-name.js";
|
|
77
79
|
/* debugging/serializable.ts */
|
|
78
|
-
// Identifiers
|
|
80
|
+
// Identifiers (5)
|
|
79
81
|
export { isScalar } from "./debugging/serializable.js";
|
|
80
82
|
export { SerializableKind } from "./debugging/serializable.js";
|
|
81
83
|
export { isSerializable } from "./debugging/serializable.js";
|
|
82
84
|
export { getTypeOf } from "./debugging/serializable.js";
|
|
83
85
|
export { assertSerializable } from "./debugging/serializable.js";
|
|
84
86
|
/* error/convert-unknown.ts */
|
|
85
|
-
// Identifiers
|
|
87
|
+
// Identifiers (1)
|
|
86
88
|
export { convertCaughtError } from "./error/convert-unknown.js";
|
|
87
89
|
/* error/get-frame.ts */
|
|
88
|
-
// Identifiers
|
|
90
|
+
// Identifiers (1)
|
|
89
91
|
export { getErrorFrame } from "./error/get-frame.js";
|
|
90
92
|
/* error/known.ts */
|
|
91
|
-
// Identifiers
|
|
93
|
+
// Identifiers (1)
|
|
92
94
|
export { KnownError } from "./error/known.js";
|
|
93
95
|
/* error/pretty.nodejs.ts */
|
|
94
|
-
// Identifiers
|
|
96
|
+
// Identifiers (4)
|
|
95
97
|
export { setErrorLogRoot } from "./error/pretty.nodejs.js";
|
|
96
|
-
export type { IStructreStackLine } from "./error/pretty.nodejs.js";
|
|
97
|
-
export { parseStackLine } from "./error/pretty.nodejs.js";
|
|
98
98
|
export { prettyPrintError } from "./error/pretty.nodejs.js";
|
|
99
|
-
export { parseStackString } from "./error/pretty.nodejs.js";
|
|
100
99
|
export { prettyFormatStack } from "./error/pretty.nodejs.js";
|
|
101
100
|
export { prettyFormatError } from "./error/pretty.nodejs.js";
|
|
102
101
|
/* error/pretty.vscode.ts */
|
|
103
|
-
// Identifiers
|
|
102
|
+
// Identifiers (1)
|
|
104
103
|
export { vscEscapeValue } from "./error/pretty.vscode.js";
|
|
104
|
+
/* error/stack-parser.v8.ts */
|
|
105
|
+
// Identifiers (3)
|
|
106
|
+
export { parseStackString } from "./error/stack-parser.v8.js";
|
|
107
|
+
export type { IStructreStackLine } from "./error/stack-parser.v8.js";
|
|
108
|
+
export { parseStackLine } from "./error/stack-parser.v8.js";
|
|
105
109
|
/* error/stack-trace.ts */
|
|
106
|
-
// Identifiers
|
|
110
|
+
// Identifiers (3)
|
|
107
111
|
export type { StackTraceHolder } from "./error/stack-trace.js";
|
|
108
112
|
export type { IWithStack } from "./error/stack-trace.js";
|
|
109
113
|
export { createStackTraceHolder } from "./error/stack-trace.js";
|
|
110
114
|
/* function/callback-list.async.ts */
|
|
111
|
-
// Identifiers
|
|
115
|
+
// Identifiers (2)
|
|
112
116
|
export type { MyAsyncCallback } from "./function/callback-list.async.js";
|
|
113
117
|
export { AsyncCallbackList } from "./function/callback-list.async.js";
|
|
114
118
|
/* function/callback-list.delay.ts */
|
|
115
|
-
// Identifiers
|
|
119
|
+
// Identifiers (2)
|
|
116
120
|
export type { MyDelayCallback } from "./function/callback-list.delay.js";
|
|
117
121
|
export { MemorizedOnceCallbackList } from "./function/callback-list.delay.js";
|
|
118
122
|
/* function/callback-list.ts */
|
|
119
|
-
// Identifiers
|
|
123
|
+
// Identifiers (2)
|
|
120
124
|
export type { MyCallback } from "./function/callback-list.js";
|
|
121
125
|
export { CallbackList } from "./function/callback-list.js";
|
|
122
126
|
/* function/noop.ts */
|
|
123
|
-
// Identifiers
|
|
127
|
+
// Identifiers (1)
|
|
124
128
|
export { noop } from "./function/noop.js";
|
|
125
129
|
/* iterate/merge-iterable.ts */
|
|
126
|
-
// Identifiers
|
|
130
|
+
// Identifiers (4)
|
|
127
131
|
export { mergeIterables } from "./iterate/merge-iterable.js";
|
|
128
132
|
export { joinAsyncIterables } from "./iterate/merge-iterable.js";
|
|
129
133
|
export { interleaveIterables } from "./iterate/merge-iterable.js";
|
|
130
134
|
export { interleaveAsyncIterables } from "./iterate/merge-iterable.js";
|
|
131
135
|
/* legacy/rename.ts */
|
|
132
|
-
// Identifiers
|
|
136
|
+
// Identifiers (4)
|
|
133
137
|
export { toDisposable } from "./legacy/rename.js";
|
|
134
138
|
export { AsyncDisposable } from "./legacy/rename.js";
|
|
135
139
|
export { Disposable } from "./legacy/rename.js";
|
|
136
140
|
export { convertCatchedError } from "./legacy/rename.js";
|
|
137
141
|
/* lifecycle/cancellation/driver.browser.ts */
|
|
138
|
-
// Identifiers
|
|
142
|
+
// Identifiers (0)
|
|
139
143
|
/* lifecycle/cancellation/driver.common.ts */
|
|
140
|
-
// Identifiers
|
|
144
|
+
// Identifiers (0)
|
|
141
145
|
/* lifecycle/cancellation/source.ts */
|
|
142
|
-
// Identifiers
|
|
146
|
+
// Identifiers (2)
|
|
143
147
|
export type { CancellationToken } from "./lifecycle/cancellation/source.js";
|
|
144
148
|
export { CancellationTokenSource } from "./lifecycle/cancellation/source.js";
|
|
145
149
|
/* lifecycle/dispose/async-disposable.ts */
|
|
146
|
-
// Identifiers
|
|
150
|
+
// Identifiers (2)
|
|
147
151
|
export { EnhancedAsyncDisposable } from "./lifecycle/dispose/async-disposable.js";
|
|
148
152
|
export { UnorderedAsyncDisposable } from "./lifecycle/dispose/async-disposable.js";
|
|
149
153
|
/* lifecycle/dispose/bridges/function.ts */
|
|
150
|
-
// Identifiers
|
|
154
|
+
// Identifiers (2)
|
|
151
155
|
export { functionToDisposable } from "./lifecycle/dispose/bridges/function.js";
|
|
152
156
|
export { disposerFunction } from "./lifecycle/dispose/bridges/function.js";
|
|
153
157
|
/* lifecycle/dispose/bridges/native.ts */
|
|
154
|
-
// Identifiers
|
|
158
|
+
// Identifiers (2)
|
|
155
159
|
export { fromNativeDisposable } from "./lifecycle/dispose/bridges/native.js";
|
|
156
160
|
export { toNativeDisposable } from "./lifecycle/dispose/bridges/native.js";
|
|
157
161
|
/* lifecycle/dispose/bridges/streams.ts */
|
|
158
|
-
// Identifiers
|
|
162
|
+
// Identifiers (2)
|
|
159
163
|
export { closableToDisposable } from "./lifecycle/dispose/bridges/streams.js";
|
|
160
164
|
export { endableToDisposable } from "./lifecycle/dispose/bridges/streams.js";
|
|
161
165
|
/* lifecycle/dispose/debug.ts */
|
|
162
|
-
// Identifiers
|
|
166
|
+
// Identifiers (0)
|
|
163
167
|
/* lifecycle/dispose/disposable.ts */
|
|
164
|
-
// Identifiers
|
|
168
|
+
// Identifiers (5)
|
|
165
169
|
export { DuplicateDisposeAction } from "./lifecycle/dispose/disposable.js";
|
|
166
170
|
export type { IDisposableEvents } from "./lifecycle/dispose/disposable.js";
|
|
167
171
|
export type { IDisposable } from "./lifecycle/dispose/disposable.js";
|
|
168
172
|
export type { IAsyncDisposable } from "./lifecycle/dispose/disposable.js";
|
|
169
173
|
export { AbstractEnhancedDisposable } from "./lifecycle/dispose/disposable.js";
|
|
170
174
|
/* lifecycle/dispose/disposableEvent.ts */
|
|
171
|
-
// Identifiers
|
|
175
|
+
// Identifiers (4)
|
|
172
176
|
export { addAnyKindOfListener } from "./lifecycle/dispose/disposableEvent.js";
|
|
173
177
|
export type { IShorthandEmitterObject } from "./lifecycle/dispose/disposableEvent.js";
|
|
174
178
|
export type { IEventEmitterObject } from "./lifecycle/dispose/disposableEvent.js";
|
|
175
179
|
export { addDisposableEventListener } from "./lifecycle/dispose/disposableEvent.js";
|
|
176
180
|
/* lifecycle/dispose/disposedError.ts */
|
|
177
|
-
// Identifiers
|
|
181
|
+
// Identifiers (2)
|
|
178
182
|
export { DisposedError } from "./lifecycle/dispose/disposedError.js";
|
|
179
183
|
export { DuplicateDisposed } from "./lifecycle/dispose/disposedError.js";
|
|
180
184
|
/* lifecycle/dispose/sync-disposable.ts */
|
|
181
|
-
// Identifiers
|
|
185
|
+
// Identifiers (2)
|
|
182
186
|
export { DisposableOnce } from "./lifecycle/dispose/sync-disposable.js";
|
|
183
187
|
export { EnhancedDisposable } from "./lifecycle/dispose/sync-disposable.js";
|
|
184
188
|
/* lifecycle/event/event.ts */
|
|
185
|
-
// Identifiers
|
|
189
|
+
// Identifiers (1)
|
|
186
190
|
export { Emitter } from "./lifecycle/event/event.js";
|
|
187
191
|
/* lifecycle/event/memorized.ts */
|
|
188
|
-
// Identifiers
|
|
192
|
+
// Identifiers (1)
|
|
189
193
|
export { MemorizedEmitter } from "./lifecycle/event/memorized.js";
|
|
190
194
|
/* lifecycle/event/type.ts */
|
|
191
|
-
// Identifiers
|
|
195
|
+
// Identifiers (4)
|
|
192
196
|
export type { IEventEmitter } from "./lifecycle/event/type.js";
|
|
193
197
|
export type { EventHandler } from "./lifecycle/event/type.js";
|
|
194
198
|
export type { EventRegister } from "./lifecycle/event/type.js";
|
|
195
199
|
export type { EventEmitterMap } from "./lifecycle/event/type.js";
|
|
196
200
|
/* lifecycle/global/global-lifecycle.ts */
|
|
197
|
-
// Identifiers
|
|
201
|
+
// Identifiers (3)
|
|
198
202
|
export { registerGlobalLifecycle } from "./lifecycle/global/global-lifecycle.js";
|
|
199
203
|
export { ensureDisposeGlobal } from "./lifecycle/global/global-lifecycle.js";
|
|
200
204
|
export { disposeGlobal } from "./lifecycle/global/global-lifecycle.js";
|
|
201
205
|
/* log/logger.ts */
|
|
202
|
-
// Identifiers
|
|
206
|
+
// Identifiers (3)
|
|
203
207
|
export { ColorKind } from "./log/logger.js";
|
|
204
208
|
export type { WrappedConsoleOptions } from "./log/logger.js";
|
|
205
209
|
export { WrappedConsole } from "./log/logger.js";
|
|
206
210
|
/* map-and-set/custom-set.ts */
|
|
207
|
-
// Identifiers
|
|
211
|
+
// Identifiers (2)
|
|
208
212
|
export type { Finder } from "./map-and-set/custom-set.js";
|
|
209
213
|
export { CustomSet } from "./map-and-set/custom-set.js";
|
|
210
214
|
/* map-and-set/object-map.ts */
|
|
211
|
-
// Identifiers
|
|
215
|
+
// Identifiers (1)
|
|
212
216
|
export { convertToMap } from "./map-and-set/object-map.js";
|
|
213
217
|
/* map-and-set/required-map.ts */
|
|
214
|
-
// Identifiers
|
|
218
|
+
// Identifiers (2)
|
|
215
219
|
export { RequiredMap } from "./map-and-set/required-map.js";
|
|
216
220
|
export { InstanceMap } from "./map-and-set/required-map.js";
|
|
217
221
|
/* misc/assertNotNull.ts */
|
|
218
|
-
// Identifiers
|
|
222
|
+
// Identifiers (1)
|
|
219
223
|
export { assertNotNull } from "./misc/assertNotNull.js";
|
|
220
224
|
/* misc/package.json.ts */
|
|
221
|
-
// Identifiers
|
|
225
|
+
// Identifiers (9)
|
|
222
226
|
export type { IExportCondition } from "./misc/package.json.js";
|
|
223
227
|
export type { IExportMap } from "./misc/package.json.js";
|
|
224
228
|
export type { IFullExportsField } from "./misc/package.json.js";
|
|
@@ -229,58 +233,58 @@
|
|
|
229
233
|
export type { IPackageJson } from "./misc/package.json.js";
|
|
230
234
|
export type { IPackageJsonNpmDist } from "./misc/package.json.js";
|
|
231
235
|
/* object/definePublicConstant.ts */
|
|
232
|
-
// Identifiers
|
|
236
|
+
// Identifiers (2)
|
|
233
237
|
export { definePublicConstant } from "./object/definePublicConstant.js";
|
|
234
238
|
export { definePrivateConstant } from "./object/definePublicConstant.js";
|
|
235
239
|
/* object/initOnRead.ts */
|
|
236
|
-
// Identifiers
|
|
240
|
+
// Identifiers (2)
|
|
237
241
|
export type { InitFunc } from "./object/initOnRead.js";
|
|
238
242
|
export { initOnRead } from "./object/initOnRead.js";
|
|
239
243
|
/* object/objectPath.ts */
|
|
240
|
-
// Identifiers
|
|
244
|
+
// Identifiers (2)
|
|
241
245
|
export { objectPath } from "./object/objectPath.js";
|
|
242
246
|
export { ObjectPath } from "./object/objectPath.js";
|
|
243
247
|
/* object/objectSame.ts */
|
|
244
|
-
// Identifiers
|
|
248
|
+
// Identifiers (2)
|
|
245
249
|
export { isObjectSame } from "./object/objectSame.js";
|
|
246
250
|
export { isObjectSameRecursive } from "./object/objectSame.js";
|
|
247
251
|
/* path/isAbsolute.ts */
|
|
248
|
-
// Identifiers
|
|
252
|
+
// Identifiers (1)
|
|
249
253
|
export { isAbsolute } from "./path/isAbsolute.js";
|
|
250
254
|
/* path/normalizePath.ts */
|
|
251
|
-
// Identifiers
|
|
255
|
+
// Identifiers (5)
|
|
252
256
|
export { PathKind } from "./path/normalizePath.js";
|
|
253
257
|
export type { IPathInfo } from "./path/normalizePath.js";
|
|
254
258
|
export { analyzePath } from "./path/normalizePath.js";
|
|
255
259
|
export { normalizePath } from "./path/normalizePath.js";
|
|
256
260
|
export { relativePath } from "./path/normalizePath.js";
|
|
257
261
|
/* path/pathArray.ts */
|
|
258
|
-
// Identifiers
|
|
262
|
+
// Identifiers (3)
|
|
259
263
|
export { PathArrayWindows } from "./path/pathArray.js";
|
|
260
264
|
export { PathArrayPosix } from "./path/pathArray.js";
|
|
261
265
|
export { PathArray } from "./path/pathArray.js";
|
|
262
266
|
/* path/pathCalc.ts */
|
|
263
|
-
// Identifiers
|
|
267
|
+
// Identifiers (1)
|
|
264
268
|
export { isPathContains } from "./path/pathCalc.js";
|
|
265
269
|
/* platform/compile.ts */
|
|
266
|
-
// Identifiers
|
|
270
|
+
// Identifiers (2)
|
|
267
271
|
export { isProductionMode } from "./platform/compile.js";
|
|
268
272
|
export { isBuildMode } from "./platform/compile.js";
|
|
269
273
|
/* platform/globalObject.ts */
|
|
270
|
-
// Identifiers
|
|
274
|
+
// Identifiers (2)
|
|
271
275
|
export { globalObject } from "./platform/globalObject.js";
|
|
272
276
|
export { ensureGlobalObject } from "./platform/globalObject.js";
|
|
273
277
|
/* platform/globalSingleton.ts */
|
|
274
|
-
// Identifiers
|
|
278
|
+
// Identifiers (3)
|
|
275
279
|
export { globalSingletonStrong } from "./platform/globalSingleton.js";
|
|
276
280
|
export { globalSingletonDelete } from "./platform/globalSingleton.js";
|
|
277
281
|
export { globalSingleton } from "./platform/globalSingleton.js";
|
|
278
282
|
/* platform/globalSymbol.ts */
|
|
279
|
-
// Identifiers
|
|
283
|
+
// Identifiers (2)
|
|
280
284
|
export { createSymbol } from "./platform/globalSymbol.js";
|
|
281
285
|
export { deleteSymbol } from "./platform/globalSymbol.js";
|
|
282
286
|
/* platform/os.ts */
|
|
283
|
-
// Identifiers
|
|
287
|
+
// Identifiers (16)
|
|
284
288
|
export { hasProcess } from "./platform/os.js";
|
|
285
289
|
export { hasWindow } from "./platform/os.js";
|
|
286
290
|
export { hasGlobal } from "./platform/os.js";
|
|
@@ -298,101 +302,101 @@
|
|
|
298
302
|
export { sepList } from "./platform/os.js";
|
|
299
303
|
export { is32Bit } from "./platform/os.js";
|
|
300
304
|
/* promise/await-iterator.ts */
|
|
301
|
-
// Identifiers
|
|
305
|
+
// Identifiers (1)
|
|
302
306
|
export { awaitIterator } from "./promise/await-iterator.js";
|
|
303
307
|
/* promise/deferred-promise.ts */
|
|
304
|
-
// Identifiers
|
|
308
|
+
// Identifiers (4)
|
|
305
309
|
export type { ValueCallback } from "./promise/deferred-promise.js";
|
|
306
310
|
export type { ProgressCallback } from "./promise/deferred-promise.js";
|
|
307
311
|
export type { IProgressHolder } from "./promise/deferred-promise.js";
|
|
308
312
|
export { DeferredPromise } from "./promise/deferred-promise.js";
|
|
309
313
|
/* promise/promise-bool.ts */
|
|
310
|
-
// Identifiers
|
|
314
|
+
// Identifiers (1)
|
|
311
315
|
export { promiseBool } from "./promise/promise-bool.js";
|
|
312
316
|
/* promise/promise-list.ts */
|
|
313
|
-
// Identifiers
|
|
317
|
+
// Identifiers (1)
|
|
314
318
|
export { PromiseCollection } from "./promise/promise-list.js";
|
|
315
319
|
/* re-export.ts */
|
|
316
|
-
// Identifiers
|
|
317
|
-
// References
|
|
320
|
+
// Identifiers (0)
|
|
321
|
+
// References (1)
|
|
318
322
|
export * from "@idlebox/errors";
|
|
319
323
|
/* reflection/classes/pointer.ts */
|
|
320
|
-
// Identifiers
|
|
324
|
+
// Identifiers (2)
|
|
321
325
|
export type { Ref } from "./reflection/classes/pointer.js";
|
|
322
326
|
export { Pointer } from "./reflection/classes/pointer.js";
|
|
323
327
|
/* reflection/classes/singleton.ts */
|
|
324
|
-
// Identifiers
|
|
328
|
+
// Identifiers (4)
|
|
325
329
|
export { singletonSymbol } from "./reflection/classes/singleton.js";
|
|
326
330
|
export { SingletonType } from "./reflection/classes/singleton.js";
|
|
327
331
|
export { singleton } from "./reflection/classes/singleton.js";
|
|
328
332
|
export { createSingleton } from "./reflection/classes/singleton.js";
|
|
329
333
|
/* reflection/methods/bind.ts */
|
|
330
|
-
// Identifiers
|
|
334
|
+
// Identifiers (1)
|
|
331
335
|
export { bindThis } from "./reflection/methods/bind.js";
|
|
332
336
|
/* reflection/methods/memorize.ts */
|
|
333
|
-
// Identifiers
|
|
337
|
+
// Identifiers (2)
|
|
334
338
|
export { memo } from "./reflection/methods/memorize.js";
|
|
335
339
|
export { forgetMemorized } from "./reflection/methods/memorize.js";
|
|
336
340
|
/* schedule/extendable-timer.ts */
|
|
337
|
-
// Identifiers
|
|
341
|
+
// Identifiers (1)
|
|
338
342
|
export { ExtendableTimer } from "./schedule/extendable-timer.js";
|
|
339
343
|
/* schedule/interval.ts */
|
|
340
|
-
// Identifiers
|
|
344
|
+
// Identifiers (2)
|
|
341
345
|
export { interval } from "./schedule/interval.js";
|
|
342
346
|
export { Interval } from "./schedule/interval.js";
|
|
343
347
|
/* schedule/local-type.ts */
|
|
344
|
-
// Identifiers
|
|
348
|
+
// Identifiers (2)
|
|
345
349
|
export type { TimeoutType } from "./schedule/local-type.js";
|
|
346
350
|
export type { IntervalType } from "./schedule/local-type.js";
|
|
347
351
|
/* schedule/scheduler.ts */
|
|
348
|
-
// Identifiers
|
|
352
|
+
// Identifiers (1)
|
|
349
353
|
export { scheduler } from "./schedule/scheduler.js";
|
|
350
354
|
/* schedule/timeout.ts */
|
|
351
|
-
// Identifiers
|
|
355
|
+
// Identifiers (3)
|
|
352
356
|
export { timeout } from "./schedule/timeout.js";
|
|
353
357
|
export { sleep } from "./schedule/timeout.js";
|
|
354
358
|
export { raceTimeout } from "./schedule/timeout.js";
|
|
355
359
|
/* state/simple-state-machine.ts */
|
|
356
|
-
// Identifiers
|
|
360
|
+
// Identifiers (3)
|
|
357
361
|
export type { ISsmRuleMap } from "./state/simple-state-machine.js";
|
|
358
362
|
export type { IStateChangeEvent } from "./state/simple-state-machine.js";
|
|
359
363
|
export { SimpleStateMachine } from "./state/simple-state-machine.js";
|
|
360
364
|
/* string/case-cast.ts */
|
|
361
|
-
// Identifiers
|
|
365
|
+
// Identifiers (5)
|
|
362
366
|
export { camelCase } from "./string/case-cast.js";
|
|
363
367
|
export { ucfirst } from "./string/case-cast.js";
|
|
364
368
|
export { lcfirst } from "./string/case-cast.js";
|
|
365
369
|
export { linux_case } from "./string/case-cast.js";
|
|
366
370
|
export { linux_case_hyphen } from "./string/case-cast.js";
|
|
367
371
|
/* string/concatType.generated.ts */
|
|
368
|
-
// Identifiers
|
|
372
|
+
// Identifiers (1)
|
|
369
373
|
export { concatStringType } from "./string/concatType.generated.js";
|
|
370
374
|
/* string/escape-regexp.ts */
|
|
371
|
-
// Identifiers
|
|
375
|
+
// Identifiers (1)
|
|
372
376
|
export { escapeRegExp } from "./string/escape-regexp.js";
|
|
373
377
|
/* string/human-bytes.ts */
|
|
374
|
-
// Identifiers
|
|
378
|
+
// Identifiers (3)
|
|
375
379
|
export { humanSizeSI } from "./string/human-bytes.js";
|
|
376
380
|
export { humanSize } from "./string/human-bytes.js";
|
|
377
381
|
export { humanSpeed } from "./string/human-bytes.js";
|
|
378
382
|
/* string/pad2.ts */
|
|
379
|
-
// Identifiers
|
|
383
|
+
// Identifiers (1)
|
|
380
384
|
export { pad2 } from "./string/pad2.js";
|
|
381
385
|
/* typing-helper/callback.ts */
|
|
382
|
-
// Identifiers
|
|
386
|
+
// Identifiers (1)
|
|
383
387
|
export type { ICommonCallback } from "./typing-helper/callback.js";
|
|
384
388
|
/* typing-helper/deep.partial.ts */
|
|
385
|
-
// Identifiers
|
|
389
|
+
// Identifiers (1)
|
|
386
390
|
export type { DeepPartial } from "./typing-helper/deep.partial.js";
|
|
387
391
|
/* typing-helper/deep.readonly.ts */
|
|
388
|
-
// Identifiers
|
|
392
|
+
// Identifiers (1)
|
|
389
393
|
export type { DeepReadonly } from "./typing-helper/deep.readonly.js";
|
|
390
394
|
/* typing-helper/deep.required.ts */
|
|
391
|
-
// Identifiers
|
|
395
|
+
// Identifiers (1)
|
|
392
396
|
export type { DeepNonNullable } from "./typing-helper/deep.required.js";
|
|
393
397
|
/* typing-helper/deep.writable.ts */
|
|
394
|
-
// Identifiers
|
|
398
|
+
// Identifiers (1)
|
|
395
399
|
export type { DeepWriteable } from "./typing-helper/deep.writable.js";
|
|
396
400
|
/* typing-helper/literal.ts */
|
|
397
|
-
// Identifiers
|
|
401
|
+
// Identifiers (1)
|
|
398
402
|
export type { Primitive } from "./typing-helper/literal.js";
|
package/src/debugging/inspect.ts
CHANGED
|
@@ -1,16 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
import { definePrivateConstant } from '../object/definePublicConstant.js';
|
|
2
|
+
|
|
3
|
+
export const inspectSymbol = Symbol.for('nodejs.util.inspect.custom'); // high version node
|
|
4
|
+
|
|
5
|
+
export function defineInspectMethod<T>(obj: T, method: (this: T, depth: number, context: any, inspect: Function) => string): T {
|
|
6
|
+
definePrivateConstant(obj, inspectSymbol, method);
|
|
7
|
+
return obj;
|
|
8
|
+
}
|
|
2
9
|
|
|
3
10
|
/**
|
|
4
11
|
* try to call `inspect` method of an object, if not exists, call `toString`.
|
|
5
12
|
* @returns {string}
|
|
6
13
|
*/
|
|
7
|
-
export function tryInspect(object: any): string
|
|
14
|
+
export function tryInspect(object: any): string;
|
|
15
|
+
/** @internal */
|
|
16
|
+
export function tryInspect(object: any, options: any): string;
|
|
17
|
+
export function tryInspect(object: any, options?: any): string {
|
|
8
18
|
if (!object || typeof object !== 'object') {
|
|
9
19
|
return JSON.stringify(object);
|
|
10
20
|
}
|
|
11
21
|
|
|
12
|
-
if (object[
|
|
13
|
-
|
|
22
|
+
if (object[inspectSymbol]) {
|
|
23
|
+
if (options) {
|
|
24
|
+
options.depth--;
|
|
25
|
+
} else {
|
|
26
|
+
options = {
|
|
27
|
+
depth: 3,
|
|
28
|
+
stylize(s: string) {
|
|
29
|
+
return s;
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
return object[inspectSymbol](options.depth, options, tryInspect);
|
|
14
34
|
}
|
|
15
35
|
if (object.inspect) {
|
|
16
36
|
return object.inspect();
|