@hyperframes/producer 0.4.15 → 0.4.17
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/benchmark.d.ts +9 -2
- package/dist/benchmark.d.ts.map +1 -1
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +4 -4
- package/dist/index.js +364 -199
- package/dist/index.js.map +3 -3
- package/dist/logger.d.ts +19 -0
- package/dist/logger.d.ts.map +1 -1
- package/dist/public-server.js +364 -199
- package/dist/public-server.js.map +3 -3
- package/dist/services/frameDirCache.d.ts +76 -0
- package/dist/services/frameDirCache.d.ts.map +1 -0
- package/dist/services/renderOrchestrator.d.ts +17 -0
- package/dist/services/renderOrchestrator.d.ts.map +1 -1
- package/dist/utils/ffprobe.d.ts +1 -1
- package/dist/utils/ffprobe.d.ts.map +1 -1
- package/package.json +4 -3
package/dist/logger.d.ts
CHANGED
|
@@ -13,6 +13,25 @@ export interface ProducerLogger {
|
|
|
13
13
|
warn(message: string, meta?: Record<string, unknown>): void;
|
|
14
14
|
info(message: string, meta?: Record<string, unknown>): void;
|
|
15
15
|
debug(message: string, meta?: Record<string, unknown>): void;
|
|
16
|
+
/**
|
|
17
|
+
* Optional fast level check used to skip expensive metadata construction
|
|
18
|
+
* at the call site. When the call site needs to build a non-trivial meta
|
|
19
|
+
* object (e.g. snapshot a struct, format numbers, run `Array.find` over
|
|
20
|
+
* scene state) just to attach to a debug log, gate it with this method:
|
|
21
|
+
*
|
|
22
|
+
* ```ts
|
|
23
|
+
* if (log.isLevelEnabled?.("debug") ?? true) {
|
|
24
|
+
* const meta = buildExpensiveMeta();
|
|
25
|
+
* log.debug("hot-path event", meta);
|
|
26
|
+
* }
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* The default coalescence (`?? true`) preserves today's behavior for
|
|
30
|
+
* loggers that omit this method — they keep building the meta object as
|
|
31
|
+
* before. Custom integrations (Pino, Winston, structured loggers) should
|
|
32
|
+
* implement this to enable the optimization.
|
|
33
|
+
*/
|
|
34
|
+
isLevelEnabled?(level: LogLevel): boolean;
|
|
16
35
|
}
|
|
17
36
|
/**
|
|
18
37
|
* Create a console-based logger with level filtering.
|
package/dist/logger.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3D,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC7D,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC5D,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC5D,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3D,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC7D,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MA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