@hypen-space/core 0.4.956 → 0.5.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.
- package/README.md +5 -8
- package/dist/app.js +13 -1168
- package/dist/app.js.map +3 -9
- package/dist/chunk-00zt3w6e.js +58 -0
- package/dist/chunk-00zt3w6e.js.map +10 -0
- package/dist/chunk-3zvyth50.js +87 -0
- package/dist/chunk-3zvyth50.js.map +10 -0
- package/dist/chunk-5gtx3pza.js +11 -0
- package/dist/chunk-5gtx3pza.js.map +9 -0
- package/dist/chunk-7222131a.js +191 -0
- package/dist/chunk-7222131a.js.map +10 -0
- package/dist/chunk-avchpwhf.js +200 -0
- package/dist/chunk-avchpwhf.js.map +10 -0
- package/dist/chunk-ec0tgy9a.js +154 -0
- package/dist/chunk-ec0tgy9a.js.map +10 -0
- package/dist/chunk-fnss4dm2.js +479 -0
- package/dist/chunk-fnss4dm2.js.map +10 -0
- package/dist/chunk-g2gz9pgg.js +133 -0
- package/dist/chunk-g2gz9pgg.js.map +10 -0
- package/dist/chunk-g72v6mmf.js +341 -0
- package/dist/chunk-g72v6mmf.js.map +10 -0
- package/dist/chunk-g7g3jxty.js +351 -0
- package/dist/chunk-g7g3jxty.js.map +10 -0
- package/dist/chunk-g830re2c.js +50 -0
- package/dist/chunk-g830re2c.js.map +10 -0
- package/dist/chunk-gtwh1sg7.js +127 -0
- package/dist/chunk-gtwh1sg7.js.map +10 -0
- package/dist/chunk-k12cwfst.js +72 -0
- package/dist/chunk-k12cwfst.js.map +10 -0
- package/dist/chunk-mbqqsz6r.js +128 -0
- package/dist/chunk-mbqqsz6r.js.map +10 -0
- package/dist/chunk-ne632swm.js +209 -0
- package/dist/chunk-ne632swm.js.map +10 -0
- package/dist/chunk-p3pj1bax.js +206 -0
- package/dist/chunk-p3pj1bax.js.map +10 -0
- package/dist/chunk-vshdk2pw.js +56 -0
- package/dist/chunk-vshdk2pw.js.map +10 -0
- package/dist/chunk-wp2ebn2m.js +51 -0
- package/dist/chunk-wp2ebn2m.js.map +10 -0
- package/dist/chunk-x4qv4jm9.js +88 -0
- package/dist/chunk-x4qv4jm9.js.map +10 -0
- package/dist/chunk-ycxp4drd.js +211 -0
- package/dist/chunk-ycxp4drd.js.map +10 -0
- package/dist/components/builtin.js +14 -1246
- package/dist/components/builtin.js.map +3 -10
- package/dist/context.js +7 -362
- package/dist/context.js.map +3 -6
- package/dist/datasource.js +5 -76
- package/dist/datasource.js.map +3 -4
- package/dist/disposable.js +20 -367
- package/dist/disposable.js.map +3 -5
- package/dist/engine-base.d.ts +38 -2
- package/dist/engine-base.js +45 -412
- package/dist/engine-base.js.map +4 -6
- package/dist/events.js +7 -285
- package/dist/events.js.map +3 -5
- package/dist/hypen.js +8 -71
- package/dist/hypen.js.map +3 -4
- package/dist/index.browser.js +58 -2152
- package/dist/index.browser.js.map +3 -16
- package/dist/index.d.ts +2 -0
- package/dist/index.js +132 -3058
- package/dist/index.js.map +4 -22
- package/dist/logger.js +16 -220
- package/dist/logger.js.map +3 -4
- package/dist/managed-router.js +12 -1367
- package/dist/managed-router.js.map +3 -10
- package/dist/portable.js +6 -70
- package/dist/portable.js.map +3 -4
- package/dist/remote/client.js +9 -1010
- package/dist/remote/client.js.map +3 -8
- package/dist/remote/index.d.ts +2 -0
- package/dist/remote/index.js +511 -1066
- package/dist/remote/index.js.map +4 -9
- package/dist/remote/remote-session.d.ts +245 -0
- package/dist/remote/session.js +5 -147
- package/dist/remote/session.js.map +3 -4
- package/dist/renderer.js +7 -271
- package/dist/renderer.js.map +3 -5
- package/dist/resolver.js +5 -484
- package/dist/resolver.js.map +3 -5
- package/dist/result.js +25 -211
- package/dist/result.js.map +3 -4
- package/dist/retry.js +10 -336
- package/dist/retry.js.map +3 -5
- package/dist/router.js +9 -807
- package/dist/router.js.map +3 -8
- package/dist/state.js +10 -274
- package/dist/state.js.map +3 -5
- package/dist/validate.d.ts +19 -0
- package/package.json +13 -1
- package/src/engine-base.ts +87 -4
- package/src/index.ts +5 -0
- package/src/remote/index.ts +16 -0
- package/src/remote/remote-session.ts +998 -0
- package/src/validate.ts +37 -0
package/dist/logger.js
CHANGED
|
@@ -1,222 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
17
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
18
|
-
}) : x)(function(x) {
|
|
19
|
-
if (typeof require !== "undefined")
|
|
20
|
-
return require.apply(this, arguments);
|
|
21
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
// src/logger.ts
|
|
25
|
-
var LOG_LEVEL_ORDER = {
|
|
26
|
-
debug: 0,
|
|
27
|
-
info: 1,
|
|
28
|
-
warn: 2,
|
|
29
|
-
error: 3,
|
|
30
|
-
none: 4
|
|
31
|
-
};
|
|
32
|
-
var LOG_LEVEL_COLORS = {
|
|
33
|
-
debug: "\x1B[36m",
|
|
34
|
-
info: "\x1B[32m",
|
|
35
|
-
warn: "\x1B[33m",
|
|
36
|
-
error: "\x1B[31m"
|
|
37
|
-
};
|
|
38
|
-
var RESET_COLOR = "\x1B[0m";
|
|
39
|
-
function isProduction() {
|
|
40
|
-
if (typeof process !== "undefined" && process.env) {
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
return false;
|
|
44
|
-
}
|
|
45
|
-
var config = {
|
|
46
|
-
level: isProduction() ? "error" : "info",
|
|
47
|
-
colors: true,
|
|
48
|
-
timestamps: false
|
|
49
|
-
};
|
|
50
|
-
function setLogLevel(level) {
|
|
51
|
-
config.level = level;
|
|
52
|
-
}
|
|
53
|
-
function getLogLevel() {
|
|
54
|
-
return config.level;
|
|
55
|
-
}
|
|
56
|
-
function configureLogger(options) {
|
|
57
|
-
config = { ...config, ...options };
|
|
58
|
-
}
|
|
59
|
-
function enableLogging() {
|
|
60
|
-
config.level = "debug";
|
|
61
|
-
}
|
|
62
|
-
function disableLogging() {
|
|
63
|
-
config.level = "none";
|
|
64
|
-
}
|
|
65
|
-
function setDebugMode(enabled) {
|
|
66
|
-
config.level = enabled ? "debug" : "error";
|
|
67
|
-
}
|
|
68
|
-
function isDebugMode() {
|
|
69
|
-
return config.level === "debug";
|
|
70
|
-
}
|
|
71
|
-
function shouldLog(level) {
|
|
72
|
-
return LOG_LEVEL_ORDER[level] >= LOG_LEVEL_ORDER[config.level];
|
|
73
|
-
}
|
|
74
|
-
function formatTag(tag, level) {
|
|
75
|
-
const timestamp = config.timestamps ? `${new Date().toISOString()} ` : "";
|
|
76
|
-
if (config.colors && level !== "none") {
|
|
77
|
-
const color = LOG_LEVEL_COLORS[level];
|
|
78
|
-
return `${timestamp}${color}[${tag}]${RESET_COLOR}`;
|
|
79
|
-
}
|
|
80
|
-
return `${timestamp}[${tag}]`;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
class Logger {
|
|
84
|
-
tag;
|
|
85
|
-
constructor(tag) {
|
|
86
|
-
this.tag = tag;
|
|
87
|
-
}
|
|
88
|
-
debug(...args) {
|
|
89
|
-
if (!shouldLog("debug"))
|
|
90
|
-
return;
|
|
91
|
-
if (config.handler) {
|
|
92
|
-
config.handler.debug(this.tag, ...args);
|
|
93
|
-
} else {
|
|
94
|
-
console.log(formatTag(this.tag, "debug"), ...args);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
info(...args) {
|
|
98
|
-
if (!shouldLog("info"))
|
|
99
|
-
return;
|
|
100
|
-
if (config.handler) {
|
|
101
|
-
config.handler.info(this.tag, ...args);
|
|
102
|
-
} else {
|
|
103
|
-
console.info(formatTag(this.tag, "info"), ...args);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
warn(...args) {
|
|
107
|
-
if (!shouldLog("warn"))
|
|
108
|
-
return;
|
|
109
|
-
if (config.handler) {
|
|
110
|
-
config.handler.warn(this.tag, ...args);
|
|
111
|
-
} else {
|
|
112
|
-
console.warn(formatTag(this.tag, "warn"), ...args);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
error(...args) {
|
|
116
|
-
if (!shouldLog("error"))
|
|
117
|
-
return;
|
|
118
|
-
if (config.handler) {
|
|
119
|
-
config.handler.error(this.tag, ...args);
|
|
120
|
-
} else {
|
|
121
|
-
console.error(formatTag(this.tag, "error"), ...args);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
time(label, fn) {
|
|
125
|
-
if (!shouldLog("debug")) {
|
|
126
|
-
return fn();
|
|
127
|
-
}
|
|
128
|
-
const start = performance.now();
|
|
129
|
-
try {
|
|
130
|
-
return fn();
|
|
131
|
-
} finally {
|
|
132
|
-
const duration = performance.now() - start;
|
|
133
|
-
this.debug(`${label}: ${duration.toFixed(2)}ms`);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
async timeAsync(label, fn) {
|
|
137
|
-
if (!shouldLog("debug")) {
|
|
138
|
-
return fn();
|
|
139
|
-
}
|
|
140
|
-
const start = performance.now();
|
|
141
|
-
try {
|
|
142
|
-
return await fn();
|
|
143
|
-
} finally {
|
|
144
|
-
const duration = performance.now() - start;
|
|
145
|
-
this.debug(`${label}: ${duration.toFixed(2)}ms`);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
child(subTag) {
|
|
149
|
-
return new Logger(`${this.tag}:${subTag}`);
|
|
150
|
-
}
|
|
151
|
-
debugIf(condition, ...args) {
|
|
152
|
-
if (condition)
|
|
153
|
-
this.debug(...args);
|
|
154
|
-
}
|
|
155
|
-
warnIf(condition, ...args) {
|
|
156
|
-
if (condition)
|
|
157
|
-
this.warn(...args);
|
|
158
|
-
}
|
|
159
|
-
errorIf(condition, ...args) {
|
|
160
|
-
if (condition)
|
|
161
|
-
this.error(...args);
|
|
162
|
-
}
|
|
163
|
-
loggedOnce = new Set;
|
|
164
|
-
warnOnce(key, ...args) {
|
|
165
|
-
if (this.loggedOnce.has(key))
|
|
166
|
-
return;
|
|
167
|
-
this.loggedOnce.add(key);
|
|
168
|
-
this.warn(...args);
|
|
169
|
-
}
|
|
170
|
-
debugOnce(key, ...args) {
|
|
171
|
-
if (this.loggedOnce.has(key))
|
|
172
|
-
return;
|
|
173
|
-
this.loggedOnce.add(key);
|
|
174
|
-
this.debug(...args);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
function createLogger(tag) {
|
|
178
|
-
return new Logger(tag);
|
|
179
|
-
}
|
|
180
|
-
var logger = createLogger("Hypen");
|
|
181
|
-
var log = {
|
|
182
|
-
debug: (tag, ...args) => {
|
|
183
|
-
if (!shouldLog("debug"))
|
|
184
|
-
return;
|
|
185
|
-
console.log(formatTag(tag, "debug"), ...args);
|
|
186
|
-
},
|
|
187
|
-
info: (tag, ...args) => {
|
|
188
|
-
if (!shouldLog("info"))
|
|
189
|
-
return;
|
|
190
|
-
console.info(formatTag(tag, "info"), ...args);
|
|
191
|
-
},
|
|
192
|
-
warn: (tag, ...args) => {
|
|
193
|
-
if (!shouldLog("warn"))
|
|
194
|
-
return;
|
|
195
|
-
console.warn(formatTag(tag, "warn"), ...args);
|
|
196
|
-
},
|
|
197
|
-
error: (tag, ...args) => {
|
|
198
|
-
if (!shouldLog("error"))
|
|
199
|
-
return;
|
|
200
|
-
console.error(formatTag(tag, "error"), ...args);
|
|
201
|
-
}
|
|
202
|
-
};
|
|
203
|
-
var frameworkLoggers = {
|
|
204
|
-
hypen: createLogger("Hypen"),
|
|
205
|
-
engine: createLogger("Engine"),
|
|
206
|
-
router: createLogger("Router"),
|
|
207
|
-
state: createLogger("State"),
|
|
208
|
-
events: createLogger("Events"),
|
|
209
|
-
remote: createLogger("Remote"),
|
|
210
|
-
renderer: createLogger("Renderer"),
|
|
211
|
-
module: createLogger("Module"),
|
|
212
|
-
lifecycle: createLogger("Lifecycle"),
|
|
213
|
-
loader: createLogger("Loader"),
|
|
214
|
-
context: createLogger("Context"),
|
|
215
|
-
discovery: createLogger("Discovery"),
|
|
216
|
-
plugin: createLogger("Plugin"),
|
|
217
|
-
canvas: createLogger("Canvas"),
|
|
218
|
-
debug: createLogger("Debug")
|
|
219
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
Logger,
|
|
3
|
+
configureLogger,
|
|
4
|
+
createLogger,
|
|
5
|
+
disableLogging,
|
|
6
|
+
enableLogging,
|
|
7
|
+
frameworkLoggers,
|
|
8
|
+
getLogLevel,
|
|
9
|
+
isDebugMode,
|
|
10
|
+
log,
|
|
11
|
+
logger,
|
|
12
|
+
setDebugMode,
|
|
13
|
+
setLogLevel
|
|
14
|
+
} from "./chunk-avchpwhf.js";
|
|
15
|
+
import"./chunk-5gtx3pza.js";
|
|
220
16
|
export {
|
|
221
17
|
setLogLevel,
|
|
222
18
|
setDebugMode,
|
|
@@ -232,4 +28,4 @@ export {
|
|
|
232
28
|
Logger
|
|
233
29
|
};
|
|
234
30
|
|
|
235
|
-
//# debugId=
|
|
31
|
+
//# debugId=58E5E8AB2ABDBEEE64756E2164756E21
|
package/dist/logger.js.map
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [
|
|
3
|
+
"sources": [],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"/**\n * Configurable Debug Logger\n *\n * Provides environment-aware logging that can be disabled in production.\n * Supports log levels, tagged output, and performance timing.\n */\n\n// ============================================================================\n// Types\n// ============================================================================\n\nexport type LogLevel = \"debug\" | \"info\" | \"warn\" | \"error\" | \"none\";\n\nexport interface LoggerConfig {\n /** Minimum log level (default: \"debug\" in dev, \"error\" in prod) */\n level: LogLevel;\n /** Enable colored output (default: true) */\n colors: boolean;\n /** Include timestamps (default: false) */\n timestamps: boolean;\n /** Custom log handler (default: console) */\n handler?: LogHandler;\n}\n\nexport interface LogHandler {\n debug(tag: string, ...args: unknown[]): void;\n info(tag: string, ...args: unknown[]): void;\n warn(tag: string, ...args: unknown[]): void;\n error(tag: string, ...args: unknown[]): void;\n}\n\n// ============================================================================\n// Constants\n// ============================================================================\n\nconst LOG_LEVEL_ORDER: Record<LogLevel, number> = {\n debug: 0,\n info: 1,\n warn: 2,\n error: 3,\n none: 4,\n};\n\nconst LOG_LEVEL_COLORS: Record<Exclude<LogLevel, \"none\">, string> = {\n debug: \"\\x1b[36m\", // Cyan\n info: \"\\x1b[32m\", // Green\n warn: \"\\x1b[33m\", // Yellow\n error: \"\\x1b[31m\", // Red\n};\n\nconst RESET_COLOR = \"\\x1b[0m\";\n\n// ============================================================================\n// Global Configuration\n// ============================================================================\n\n/**\n * Detect if running in production environment\n */\nfunction isProduction(): boolean {\n if (typeof process !== \"undefined\" && process.env) {\n return process.env.NODE_ENV === \"production\";\n }\n return false;\n}\n\n/**\n * Default configuration\n */\nlet config: LoggerConfig = {\n level: isProduction() ? \"error\" : \"info\",\n colors: true,\n timestamps: false,\n};\n\n// ============================================================================\n// Configuration API\n// ============================================================================\n\n/**\n * Set the global log level\n */\nexport function setLogLevel(level: LogLevel): void {\n config.level = level;\n}\n\n/**\n * Get the current log level\n */\nexport function getLogLevel(): LogLevel {\n return config.level;\n}\n\n/**\n * Configure the logger\n */\nexport function configureLogger(options: Partial<LoggerConfig>): void {\n config = { ...config, ...options };\n}\n\n/**\n * Enable all logging (sets level to \"debug\")\n */\nexport function enableLogging(): void {\n config.level = \"debug\";\n}\n\n/**\n * Disable all logging (sets level to \"none\")\n */\nexport function disableLogging(): void {\n config.level = \"none\";\n}\n\n/**\n * Enable debug mode - alias for enableLogging()\n * Call this at app startup to see all debug logs\n *\n * @example\n * ```typescript\n * import { setDebugMode } from \"@hypen-space/core\";\n * setDebugMode(true);\n * ```\n */\nexport function setDebugMode(enabled: boolean): void {\n config.level = enabled ? \"debug\" : \"error\";\n}\n\n/**\n * Check if debug mode is enabled\n */\nexport function isDebugMode(): boolean {\n return config.level === \"debug\";\n}\n\n// ============================================================================\n// Utility Functions\n// ============================================================================\n\nfunction shouldLog(level: LogLevel): boolean {\n return LOG_LEVEL_ORDER[level] >= LOG_LEVEL_ORDER[config.level];\n}\n\nfunction formatTag(tag: string, level: LogLevel): string {\n const timestamp = config.timestamps ? `${new Date().toISOString()} ` : \"\";\n\n if (config.colors && level !== \"none\") {\n const color = LOG_LEVEL_COLORS[level as Exclude<LogLevel, \"none\">];\n return `${timestamp}${color}[${tag}]${RESET_COLOR}`;\n }\n\n return `${timestamp}[${tag}]`;\n}\n\n// ============================================================================\n// Logger Class\n// ============================================================================\n\n/**\n * Tagged logger instance\n *\n * @example\n * ```typescript\n * const log = createLogger(\"MyComponent\");\n * log.debug(\"initialized with\", { props });\n * log.error(\"failed to load\", error);\n * ```\n */\nexport class Logger {\n private readonly tag: string;\n\n constructor(tag: string) {\n this.tag = tag;\n }\n\n debug(...args: unknown[]): void {\n if (!shouldLog(\"debug\")) return;\n\n if (config.handler) {\n config.handler.debug(this.tag, ...args);\n } else {\n console.log(formatTag(this.tag, \"debug\"), ...args);\n }\n }\n\n info(...args: unknown[]): void {\n if (!shouldLog(\"info\")) return;\n\n if (config.handler) {\n config.handler.info(this.tag, ...args);\n } else {\n console.info(formatTag(this.tag, \"info\"), ...args);\n }\n }\n\n warn(...args: unknown[]): void {\n if (!shouldLog(\"warn\")) return;\n\n if (config.handler) {\n config.handler.warn(this.tag, ...args);\n } else {\n console.warn(formatTag(this.tag, \"warn\"), ...args);\n }\n }\n\n error(...args: unknown[]): void {\n if (!shouldLog(\"error\")) return;\n\n if (config.handler) {\n config.handler.error(this.tag, ...args);\n } else {\n console.error(formatTag(this.tag, \"error\"), ...args);\n }\n }\n\n /**\n * Time a function execution\n */\n time<T>(label: string, fn: () => T): T {\n if (!shouldLog(\"debug\")) {\n return fn();\n }\n\n const start = performance.now();\n try {\n return fn();\n } finally {\n const duration = performance.now() - start;\n this.debug(`${label}: ${duration.toFixed(2)}ms`);\n }\n }\n\n /**\n * Time an async function execution\n */\n async timeAsync<T>(label: string, fn: () => Promise<T>): Promise<T> {\n if (!shouldLog(\"debug\")) {\n return fn();\n }\n\n const start = performance.now();\n try {\n return await fn();\n } finally {\n const duration = performance.now() - start;\n this.debug(`${label}: ${duration.toFixed(2)}ms`);\n }\n }\n\n /**\n * Create a child logger with additional context\n */\n child(subTag: string): Logger {\n return new Logger(`${this.tag}:${subTag}`);\n }\n\n /**\n * Conditionally log based on a condition\n */\n debugIf(condition: boolean, ...args: unknown[]): void {\n if (condition) this.debug(...args);\n }\n\n warnIf(condition: boolean, ...args: unknown[]): void {\n if (condition) this.warn(...args);\n }\n\n errorIf(condition: boolean, ...args: unknown[]): void {\n if (condition) this.error(...args);\n }\n\n /**\n * Log once (useful for deprecation warnings)\n */\n private loggedOnce = new Set<string>();\n\n warnOnce(key: string, ...args: unknown[]): void {\n if (this.loggedOnce.has(key)) return;\n this.loggedOnce.add(key);\n this.warn(...args);\n }\n\n debugOnce(key: string, ...args: unknown[]): void {\n if (this.loggedOnce.has(key)) return;\n this.loggedOnce.add(key);\n this.debug(...args);\n }\n}\n\n// ============================================================================\n// Factory Functions\n// ============================================================================\n\n/**\n * Create a tagged logger\n *\n * @example\n * ```typescript\n * const log = createLogger(\"Router\");\n * log.info(\"navigating to\", path);\n * ```\n */\nexport function createLogger(tag: string): Logger {\n return new Logger(tag);\n}\n\n// ============================================================================\n// Default Logger Instance\n// ============================================================================\n\n/**\n * Default logger for general use\n */\nexport const logger = createLogger(\"Hypen\");\n\n// ============================================================================\n// Shorthand Functions (untagged)\n// ============================================================================\n\n/**\n * Shorthand logging functions for quick use\n * Prefer createLogger() for component-specific logging\n */\nexport const log = {\n debug: (tag: string, ...args: unknown[]): void => {\n if (!shouldLog(\"debug\")) return;\n console.log(formatTag(tag, \"debug\"), ...args);\n },\n\n info: (tag: string, ...args: unknown[]): void => {\n if (!shouldLog(\"info\")) return;\n console.info(formatTag(tag, \"info\"), ...args);\n },\n\n warn: (tag: string, ...args: unknown[]): void => {\n if (!shouldLog(\"warn\")) return;\n console.warn(formatTag(tag, \"warn\"), ...args);\n },\n\n error: (tag: string, ...args: unknown[]): void => {\n if (!shouldLog(\"error\")) return;\n console.error(formatTag(tag, \"error\"), ...args);\n },\n};\n\n// ============================================================================\n// Predefined Loggers for Framework Components\n// ============================================================================\n\nexport const frameworkLoggers = {\n hypen: createLogger(\"Hypen\"),\n engine: createLogger(\"Engine\"),\n router: createLogger(\"Router\"),\n state: createLogger(\"State\"),\n events: createLogger(\"Events\"),\n remote: createLogger(\"Remote\"),\n renderer: createLogger(\"Renderer\"),\n module: createLogger(\"Module\"),\n lifecycle: createLogger(\"Lifecycle\"),\n loader: createLogger(\"Loader\"),\n context: createLogger(\"Context\"),\n discovery: createLogger(\"Discovery\"),\n plugin: createLogger(\"Plugin\"),\n canvas: createLogger(\"Canvas\"),\n debug: createLogger(\"Debug\"),\n};\n"
|
|
6
5
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
6
|
+
"mappings": "",
|
|
7
|
+
"debugId": "58E5E8AB2ABDBEEE64756E2164756E21",
|
|
9
8
|
"names": []
|
|
10
9
|
}
|