@intx/log 0.3.0 → 0.4.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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Probe for the module-load contract: importing this package installs a
|
|
2
|
+
// default console sink. It runs as a child process because that contract
|
|
3
|
+
// cannot be observed in-process -- `installDefaultConsoleSink` returns early
|
|
4
|
+
// when a config already exists, and under a shared module registry some
|
|
5
|
+
// earlier file has almost always triggered the install already, so an
|
|
6
|
+
// in-process check reads back whatever that file left behind.
|
|
7
|
+
//
|
|
8
|
+
// Reports to stdout rather than through a logger, so the report cannot be
|
|
9
|
+
// routed by the very configuration under test.
|
|
10
|
+
import { getConfig } from "./index.js";
|
|
11
|
+
const config = getConfig();
|
|
12
|
+
process.stdout.write(JSON.stringify({
|
|
13
|
+
installed: config !== null,
|
|
14
|
+
sinks: config === null ? [] : Object.keys(config.sinks).sort(),
|
|
15
|
+
}));
|
package/package.json
CHANGED