@awesome-ecs/abstract 0.28.0 → 0.30.0
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/dist/components/index.cjs +2 -2
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +1 -1
- package/dist/components/index.d.mts +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/components/index.mjs.map +1 -1
- package/dist/entities/index.cjs +2 -3
- package/dist/entities/index.cjs.map +1 -1
- package/dist/entities/index.d.cts +3 -3
- package/dist/entities/index.d.mts +3 -3
- package/dist/entities/index.mjs +1 -2
- package/dist/entities/index.mjs.map +1 -1
- package/dist/factories/index.cjs +2 -2
- package/dist/factories/index.cjs.map +1 -1
- package/dist/factories/index.d.cts +2 -95
- package/dist/factories/index.d.mts +2 -95
- package/dist/factories/index.mjs +1 -1
- package/dist/factories/index.mjs.map +1 -1
- package/dist/{identity-component-CgzvgBVh.d.mts → identity-component-CuWHf7jX.d.mts} +76 -10
- package/dist/{identity-component-uU0yDR-y.d.cts → identity-component-DLDaOTyK.d.cts} +76 -10
- package/dist/index-8XDo0pla.d.mts +1065 -0
- package/dist/index-BVkmidEx.d.cts +1065 -0
- package/dist/{index-C1Ojam4M.d.cts → index-BguFn1Xj.d.cts} +62 -3
- package/dist/{index-C0v9GTM7.d.mts → index-kNcUiDBd.d.mts} +62 -3
- package/dist/pipelines/index.d.cts +1 -1
- package/dist/pipelines/index.d.mts +1 -1
- package/dist/pipelines/index.mjs +1 -1
- package/dist/systems/index.cjs +2 -2
- package/dist/systems/index.cjs.map +1 -1
- package/dist/systems/index.d.cts +2 -2
- package/dist/systems/index.d.mts +2 -2
- package/dist/systems/index.mjs +1 -1
- package/dist/systems/index.mjs.map +1 -1
- package/dist/utils/index.cjs +2 -3
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +3 -3
- package/dist/utils/index.d.mts +3 -3
- package/dist/utils/index.mjs +1 -2
- package/dist/utils/index.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/index-BQojRXVz.d.cts +0 -224
- package/dist/index-CrMUhuEK.d.cts +0 -544
- package/dist/index-Cs9Eerjt.d.cts +0 -175
- package/dist/index-DQYLun1o.d.mts +0 -544
- package/dist/index-DeYfvKO0.d.mts +0 -224
- package/dist/index-hHkhvmkO.d.mts +0 -175
- package/dist/types-CnDtpKsY.d.mts +0 -70
- package/dist/types-DLOd2zXO.d.cts +0 -70
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
//#region src/utils/dispatch-sequential.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Executes a function for each item in an iterable, sequentially.
|
|
4
|
-
*
|
|
5
|
-
* Uses a sync fast-path: iterates synchronously until the first Promise is
|
|
6
|
-
* encountered, then switches to async for the remainder. If no item produces
|
|
7
|
-
* a Promise, the entire call stays synchronous with zero async overhead.
|
|
8
|
-
*
|
|
9
|
-
* @param items - The iterable to iterate over.
|
|
10
|
-
* @param fn - The function to call for each item. May return void or a Promise.
|
|
11
|
-
* @returns void if all calls were synchronous, or a Promise if any were async.
|
|
12
|
-
*/
|
|
13
|
-
declare function dispatchSequential<T>(items: Iterable<T>, fn: (item: T) => void | Promise<void>): void | Promise<void>;
|
|
14
|
-
//#endregion
|
|
15
|
-
//#region src/utils/json-serializer.d.ts
|
|
16
|
-
/**
|
|
17
|
-
* Custom JSON serialization and deserialization interface.
|
|
18
|
-
* Allows different serialization strategies for handling complex types.
|
|
19
|
-
* Used for entity snapshots, events, and any data needing JSON conversion.
|
|
20
|
-
*/
|
|
21
|
-
interface IJsonSerializer {
|
|
22
|
-
/**
|
|
23
|
-
* Converts an object to a serializable JSON representation.
|
|
24
|
-
* Handles types that don't serialize naturally (dates, maps, custom objects, etc.).
|
|
25
|
-
* @param value - The object to serialize.
|
|
26
|
-
* @returns A JSON-serializable representation.
|
|
27
|
-
*/
|
|
28
|
-
serializeCustom(value: object): string;
|
|
29
|
-
/**
|
|
30
|
-
* Converts a JSON string back to its original object type.
|
|
31
|
-
* Reconstructs complex types from their serialized form.
|
|
32
|
-
* @template TObject - The target object type.
|
|
33
|
-
* @param text - The JSON string to deserialize.
|
|
34
|
-
* @returns The deserialized object of the specified type.
|
|
35
|
-
*/
|
|
36
|
-
parseCustom<TObject>(text: string): TObject;
|
|
37
|
-
}
|
|
38
|
-
//#endregion
|
|
39
|
-
//#region src/utils/logger.d.ts
|
|
40
|
-
/**
|
|
41
|
-
* Logger interface for debug and diagnostic output.
|
|
42
|
-
* Supports multiple log levels for controlling verbosity.
|
|
43
|
-
* Implementations can target different outputs (console, file, remote, etc.).
|
|
44
|
-
*/
|
|
45
|
-
interface ILogger {
|
|
46
|
-
/**
|
|
47
|
-
* Logs a message with a specified severity level.
|
|
48
|
-
* @param level - The severity level of the message.
|
|
49
|
-
* @param message - The primary message content.
|
|
50
|
-
* @param args - Additional arguments to include in the log output.
|
|
51
|
-
*/
|
|
52
|
-
log(level: LogLevel, message: any, ...args: any[]): void;
|
|
53
|
-
/**
|
|
54
|
-
* Logs detailed diagnostic information.
|
|
55
|
-
* Typically the lowest level, most verbose output.
|
|
56
|
-
* @param message - The message to log.
|
|
57
|
-
* @param args - Additional data.
|
|
58
|
-
*/
|
|
59
|
-
trace(message: any, ...args: any[]): void;
|
|
60
|
-
/**
|
|
61
|
-
* Logs debug-level information.
|
|
62
|
-
* Useful during development and troubleshooting.
|
|
63
|
-
* @param message - The message to log.
|
|
64
|
-
* @param args - Additional data.
|
|
65
|
-
*/
|
|
66
|
-
debug(message: any, ...args: any[]): void;
|
|
67
|
-
/**
|
|
68
|
-
* Logs warning-level messages.
|
|
69
|
-
* Indicates potentially problematic conditions.
|
|
70
|
-
* @param message - The message to log.
|
|
71
|
-
* @param args - Additional data.
|
|
72
|
-
*/
|
|
73
|
-
warn(message: any, ...args: any[]): void;
|
|
74
|
-
/**
|
|
75
|
-
* Logs error-level messages.
|
|
76
|
-
* Indicates error conditions that may require attention.
|
|
77
|
-
* @param message - The message to log.
|
|
78
|
-
* @param args - Additional data.
|
|
79
|
-
*/
|
|
80
|
-
error(message: any, ...args: any[]): void;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Logging severity levels in increasing order.
|
|
84
|
-
*/
|
|
85
|
-
declare enum LogLevel {
|
|
86
|
-
/**
|
|
87
|
-
* Most detailed, diagnostic-level logging.
|
|
88
|
-
*/
|
|
89
|
-
trace = 0,
|
|
90
|
-
/**
|
|
91
|
-
* Development and debugging information.
|
|
92
|
-
*/
|
|
93
|
-
debug = 1,
|
|
94
|
-
/**
|
|
95
|
-
* Warning-level conditions.
|
|
96
|
-
*/
|
|
97
|
-
warn = 2,
|
|
98
|
-
/**
|
|
99
|
-
* Error-level conditions.
|
|
100
|
-
*/
|
|
101
|
-
error = 3
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Configuration options for logger instances.
|
|
105
|
-
*/
|
|
106
|
-
interface ILoggerOptions {
|
|
107
|
-
/**
|
|
108
|
-
* Enables/disables each log level.
|
|
109
|
-
* If a level is disabled, log calls at that level are ignored.
|
|
110
|
-
*/
|
|
111
|
-
enabled: Map<LogLevel, boolean>;
|
|
112
|
-
}
|
|
113
|
-
//#endregion
|
|
114
|
-
//#region src/utils/performance-timer.d.ts
|
|
115
|
-
/**
|
|
116
|
-
* Unique identifier for a timer instance.
|
|
117
|
-
*/
|
|
118
|
-
type PerformanceTimerUid = number;
|
|
119
|
-
/**
|
|
120
|
-
* Options for identifying and categorizing performance metrics.
|
|
121
|
-
* Used by pipeline factories and performance decorators.
|
|
122
|
-
*/
|
|
123
|
-
type PerformanceMetricOptions = {
|
|
124
|
-
name?: string;
|
|
125
|
-
category?: string;
|
|
126
|
-
};
|
|
127
|
-
/**
|
|
128
|
-
* Record of a completed timer measurement.
|
|
129
|
-
* Captures timing information for performance analysis and profiling.
|
|
130
|
-
*/
|
|
131
|
-
interface PerformanceTimeEntry {
|
|
132
|
-
/**
|
|
133
|
-
* The name identifying this timer.
|
|
134
|
-
*/
|
|
135
|
-
name: string;
|
|
136
|
-
/**
|
|
137
|
-
* The category of this metric (e.g. 'module', 'runtime', 'system').
|
|
138
|
-
*/
|
|
139
|
-
category?: string;
|
|
140
|
-
/**
|
|
141
|
-
* Timestamp in milliseconds when the timer started.
|
|
142
|
-
*/
|
|
143
|
-
startedAt: number;
|
|
144
|
-
/**
|
|
145
|
-
* Timestamp in milliseconds when the timer ended.
|
|
146
|
-
*/
|
|
147
|
-
endedAt?: number;
|
|
148
|
-
/**
|
|
149
|
-
* Duration in milliseconds that elapsed.
|
|
150
|
-
*/
|
|
151
|
-
msPassed?: number;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Interface for measuring operation duration.
|
|
155
|
-
* Provides start/stop functionality for performance profiling.
|
|
156
|
-
* Used throughout the system to collect timing metrics.
|
|
157
|
-
*/
|
|
158
|
-
interface IPerformanceTimer {
|
|
159
|
-
/**
|
|
160
|
-
* Starts a new timer.
|
|
161
|
-
* @param name - Label for this timer (used in results).
|
|
162
|
-
* @param category - Optional category for grouping metrics.
|
|
163
|
-
* @returns A unique identifier for this timer instance.
|
|
164
|
-
*/
|
|
165
|
-
startTimer(name: string, category?: string): PerformanceTimerUid;
|
|
166
|
-
/**
|
|
167
|
-
* Stops a timer and returns the recorded metrics.
|
|
168
|
-
* @param timerUid - The timer identifier returned by startTimer.
|
|
169
|
-
* @returns Complete timing entry with start, end, and duration.
|
|
170
|
-
*/
|
|
171
|
-
endTimer(timerUid: PerformanceTimerUid): PerformanceTimeEntry;
|
|
172
|
-
}
|
|
173
|
-
//#endregion
|
|
174
|
-
export { ILogger as a, IJsonSerializer as c, PerformanceTimerUid as i, dispatchSequential as l, PerformanceMetricOptions as n, ILoggerOptions as o, PerformanceTimeEntry as r, LogLevel as s, IPerformanceTimer as t };
|
|
175
|
-
//# sourceMappingURL=index-Cs9Eerjt.d.cts.map
|