@theholocron/observability 0.6.0 → 0.7.0-alpha.1

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 CHANGED
@@ -16,18 +16,13 @@ pnpm install @theholocron/observability
16
16
 
17
17
  ## Usage
18
18
 
19
- See the [documentation](https://docs.theholocron.dev/observability/) for the API.
19
+ See the [documentation](https://docs.theholocron.dev/holocron/observability/) for the API.
20
20
 
21
21
  <!-- /holocron:installation -->
22
22
 
23
- ## Installation
23
+ ## Peer dependencies
24
24
 
25
- ```bash
26
- pnpm add @theholocron/observability
27
- ```
28
-
29
- Then add the peer dependencies for the subpaths you use — they are all
30
- optional:
25
+ Add the peers for the subpaths you use — they are all optional:
31
26
 
32
27
  | Subpath | Peers |
33
28
  | -------------------------------------- | -------------------------------------- |
@@ -37,7 +32,7 @@ optional:
37
32
  | `@theholocron/observability/analytics` | `posthog-node` |
38
33
  | `@theholocron/observability/testing` | `vitest` |
39
34
 
40
- ## Usage
35
+ ## Examples
41
36
 
42
37
  Application modules depend on the interfaces from `/core`, never a concrete
43
38
  adapter:
@@ -88,11 +83,11 @@ expect(log.info).toHaveBeenCalledWith(expect.objectContaining({ target: "product
88
83
  expect(errors.captureException).not.toHaveBeenCalled();
89
84
  ```
90
85
 
91
- For a non-vitest context that just needs a `Logger` with no output (an
86
+ For a non-vitest context that needs a `Logger` with no output (an
92
87
  example, a non-test opt-out path), use `NoopLogger` from `/core` — it
93
88
  discards everything, `child()` returns itself.
94
89
 
95
- See the [documentation](https://docs.theholocron.dev/observability/) for the
90
+ See the [documentation](https://docs.theholocron.dev/holocron/observability/) for the
96
91
  full API.
97
92
 
98
93
  ## Development
@@ -115,6 +110,6 @@ full API.
115
110
  <!-- holocron:releases -->
116
111
 
117
112
  Automated via [semantic-release](https://semantic-release.gitbook.io/semantic-release/).
118
- See the [releases page](https://docs.theholocron.dev/observability/releases) and [CHANGELOG.md](./CHANGELOG.md).
113
+ See [CHANGELOG.md](./CHANGELOG.md).
119
114
 
120
115
  <!-- /holocron:releases -->
@@ -1,3 +1,3 @@
1
- import { i as NoopAnalyticsSink, t as AnalyticsSink } from "./sinks-CSEolKcN.mjs";
2
- import { t as PostHogSink } from "./posthog-sink-BvVIQrGy.mjs";
1
+ import { i as NoopAnalyticsSink, t as AnalyticsSink } from "./sinks-v2TCQsCp.mjs";
2
+ import { t as PostHogSink } from "./posthog-sink-D4aRF3P2.mjs";
3
3
  export { type AnalyticsSink, NoopAnalyticsSink, PostHogSink };
@@ -1,3 +1,3 @@
1
- import { t as NoopAnalyticsSink } from "./sinks-scWbkOMp.mjs";
2
- import { t as PostHogSink } from "./posthog-sink-ClNks-Le.mjs";
1
+ import { t as NoopAnalyticsSink } from "./sinks-Dz8Kxoha.mjs";
2
+ import { t as PostHogSink } from "./posthog-sink-BUvWHuIC.mjs";
3
3
  export { NoopAnalyticsSink, PostHogSink };
@@ -1,4 +1,3 @@
1
- //#region src/core/redact.d.ts
2
1
  /**
3
2
  * Two redaction layers, both zero-dependency:
4
3
  *
@@ -22,12 +21,13 @@ declare const REDACTED_PATHS: readonly string[];
22
21
  declare const REDACT_CENSOR = "[Redacted]";
23
22
  /** Ready-to-use Pino `redact` option. */
24
23
  declare const redactOptions: {
24
+ /** The field paths to redact, a copy of {@link REDACTED_PATHS}. */
25
25
  readonly paths: readonly string[];
26
+ /** The string written in place of each redacted value, {@link REDACT_CENSOR}. */
26
27
  readonly censor: "[Redacted]";
27
28
  };
28
29
  /** Replace token-shaped substrings in a string with `[REDACTED]`. */
29
30
  declare function redact(raw: string): string;
30
31
  /** Deep-scrub every string in an object by round-tripping through {@link redact}. */
31
32
  declare function redactObject<T>(value: T): T;
32
- //#endregion
33
33
  export { redactOptions as a, redactObject as i, REDACT_CENSOR as n, redact as r, REDACTED_PATHS as t };
package/dist/core.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as NoopErrorSink, i as NoopAnalyticsSink, n as CommandSpan, r as ErrorSink, t as AnalyticsSink } from "./sinks-CSEolKcN.mjs";
2
- import { a as NoopLogger, i as Logger, n as LogEnv, r as LogLevel, t as LOG_LEVELS } from "./logger-CxGXigv1.mjs";
3
- import { a as redactOptions, i as redactObject, n as REDACT_CENSOR, r as redact, t as REDACTED_PATHS } from "./core-jXa8qbEx.mjs";
1
+ import { a as NoopErrorSink, i as NoopAnalyticsSink, n as CommandSpan, r as ErrorSink, t as AnalyticsSink } from "./sinks-v2TCQsCp.mjs";
2
+ import { a as NoopLogger, i as Logger, n as LogEnv, r as LogLevel, t as LOG_LEVELS } from "./logger-DC6M2rL_.mjs";
3
+ import { a as redactOptions, i as redactObject, n as REDACT_CENSOR, r as redact, t as REDACTED_PATHS } from "./core-DDpFbotv.mjs";
4
4
  export { type AnalyticsSink, type CommandSpan, type ErrorSink, LOG_LEVELS, type LogEnv, type LogLevel, type Logger, NoopAnalyticsSink, NoopErrorSink, NoopLogger, REDACTED_PATHS, REDACT_CENSOR, redact, redactObject, redactOptions };
package/dist/core.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as NoopLogger, t as LOG_LEVELS } from "./logger-DIvYoEp9.mjs";
2
- import { a as redactOptions, i as redactObject, n as REDACT_CENSOR, r as redact, t as REDACTED_PATHS } from "./redact-BMWG62k9.mjs";
3
- import { n as NoopErrorSink, t as NoopAnalyticsSink } from "./sinks-scWbkOMp.mjs";
1
+ import { n as NoopLogger, t as LOG_LEVELS } from "./logger-BqELCAzg.mjs";
2
+ import { a as redactOptions, i as redactObject, n as REDACT_CENSOR, r as redact, t as REDACTED_PATHS } from "./redact-DCKZnDDa.mjs";
3
+ import { n as NoopErrorSink, t as NoopAnalyticsSink } from "./sinks-Dz8Kxoha.mjs";
4
4
  export { LOG_LEVELS, NoopAnalyticsSink, NoopErrorSink, NoopLogger, REDACTED_PATHS, REDACT_CENSOR, redact, redactObject, redactOptions };
@@ -1,8 +1,9 @@
1
- import { t as LOG_LEVELS } from "./logger-DIvYoEp9.mjs";
2
- import { a as redactOptions } from "./redact-BMWG62k9.mjs";
1
+ import { t as LOG_LEVELS } from "./logger-BqELCAzg.mjs";
2
+ import { a as redactOptions } from "./redact-DCKZnDDa.mjs";
3
3
  import { randomUUID } from "node:crypto";
4
+ import { detectEnvironment as detectEnv, isCI } from "@theholocron/env-utils/lookup";
4
5
  import pino from "pino";
5
- //#region src/logger/console.ts
6
+ // src/logger/console.ts
6
7
  const RANK = {
7
8
  debug: 10,
8
9
  info: 20,
@@ -71,8 +72,7 @@ var ConsoleLogger = class ConsoleLogger {
71
72
  else SINK[level](ctx);
72
73
  }
73
74
  };
74
- //#endregion
75
- //#region src/logger/context.ts
75
+ // src/logger/context.ts
76
76
  /**
77
77
  * A fresh correlation id for one invocation. Every log line from a single run
78
78
  * carries this `runId`, so a whole run can be pulled back out of Axiom with
@@ -81,19 +81,6 @@ var ConsoleLogger = class ConsoleLogger {
81
81
  function generateRunId() {
82
82
  return randomUUID();
83
83
  }
84
- /**
85
- * True when running inside CI. GitHub Actions (and most other providers) set
86
- * `CI=true`; we also accept any other non-empty, non-`false` value.
87
- */
88
- function isCI(env = process.env) {
89
- const ci = env.CI;
90
- if (!ci) return false;
91
- return ci !== "false" && ci !== "0";
92
- }
93
- /** `"ci"` inside CI, otherwise `"local"` — bound on every root logger. */
94
- function detectEnv(env = process.env) {
95
- return isCI(env) ? "ci" : "local";
96
- }
97
84
  /** Narrow an arbitrary string to a {@link LogLevel}, or `undefined`. */
98
85
  function parseLogLevel(value) {
99
86
  return value && LOG_LEVELS.includes(value) ? value : void 0;
@@ -137,8 +124,7 @@ function resolveAxiomFromEnv(env = process.env) {
137
124
  dataset
138
125
  } : void 0;
139
126
  }
140
- //#endregion
141
- //#region src/logger/transports.ts
127
+ // src/logger/transports.ts
142
128
  const prettyTarget = (level) => ({
143
129
  target: "pino-pretty",
144
130
  level,
@@ -197,8 +183,7 @@ function buildTransport(input) {
197
183
  if (targets.length === 1) return targets[0];
198
184
  return { targets };
199
185
  }
200
- //#endregion
201
- //#region src/logger/pino.ts
186
+ // src/logger/pino.ts
202
187
  /**
203
188
  * The Pino-backed {@link Logger}. Nothing outside this package should name it —
204
189
  * construct loggers with `createLogger`. It is a thin pass-through to a Pino
@@ -288,8 +273,7 @@ function createPinoInstance(input) {
288
273
  if (input.consoleOutput === false && !options.transport) return pino(options, nullDestination());
289
274
  return pino(options);
290
275
  }
291
- //#endregion
292
- //#region src/logger/create.ts
276
+ // src/logger/create.ts
293
277
  /**
294
278
  * The single entry point for building a Pino-backed logger. Generates a
295
279
  * `runId`, detects the environment, resolves the level, wires the right
@@ -323,5 +307,4 @@ function createLogger(config = {}) {
323
307
  runId
324
308
  };
325
309
  }
326
- //#endregion
327
310
  export { buildTransport as a, isCI as c, resolveAxiomFromEnv as d, resolveLevel as f, createPinoInstance as i, isTelemetryDisabled as l, PinoLogger as n, detectEnv as o, ConsoleLogger as p, buildPinoOptions as r, generateRunId as s, createLogger as t, parseLogLevel as u };
@@ -1,12 +1,14 @@
1
- import { i as Logger$1, r as LogLevel } from "./logger-CxGXigv1.mjs";
1
+ import { i as Logger$1, r as LogLevel } from "./logger-DC6M2rL_.mjs";
2
2
  import { TransportMultiOptions, TransportSingleOptions } from "pino";
3
- //#region src/logger/transports.d.ts
4
3
  /** Axiom credentials. The token comes from env vars or the OS keyring — never
5
4
  * a committed config file; the dataset name may come from config. */
6
5
  interface AxiomTransportConfig {
6
+ /** The Axiom dataset the lines are sent to. */
7
7
  dataset: string;
8
+ /** The Axiom API token. */
8
9
  token: string;
9
10
  }
11
+ /** Inputs for {@link buildTransport}. */
10
12
  interface BuildTransportInput {
11
13
  /** Resolved log level — applied uniformly to every transport. */
12
14
  level: LogLevel;
@@ -55,8 +57,7 @@ interface BuildTransportInput {
55
57
  * target, untouched by the override.
56
58
  */
57
59
  declare function buildTransport(input: BuildTransportInput): TransportSingleOptions | TransportMultiOptions | undefined;
58
- //#endregion
59
- //#region src/logger/create.d.ts
60
+ /** Options for {@link createLogger}. */
60
61
  interface LoggerConfig {
61
62
  /**
62
63
  * Explicit level — the highest-priority source. The caller passes the
@@ -83,6 +84,7 @@ interface LoggerConfig {
83
84
  */
84
85
  consoleOutput?: boolean;
85
86
  }
87
+ /** What {@link createLogger} returns. */
86
88
  interface CreateLoggerResult {
87
89
  /** The logger to thread through modules via `child()`. */
88
90
  logger: Logger$1;
@@ -108,5 +110,4 @@ interface CreateLoggerResult {
108
110
  * directly instead — it needs no `createLogger`.
109
111
  */
110
112
  declare function createLogger(config?: LoggerConfig): CreateLoggerResult;
111
- //#endregion
112
113
  export { BuildTransportInput as a, AxiomTransportConfig as i, LoggerConfig as n, buildTransport as o, createLogger as r, CreateLoggerResult as t };
package/dist/errors.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { a as NoopErrorSink, n as CommandSpan, r as ErrorSink } from "./sinks-CSEolKcN.mjs";
2
- import { n as scrubError, t as SentrySink } from "./sentry-sink-Dk0H3MG5.mjs";
1
+ import { a as NoopErrorSink, n as CommandSpan, r as ErrorSink } from "./sinks-v2TCQsCp.mjs";
2
+ import { n as scrubError, t as SentrySink } from "./sentry-sink-C1E3tOl-.mjs";
3
3
  export { type CommandSpan, type ErrorSink, NoopErrorSink, SentrySink, scrubError };
package/dist/errors.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { n as NoopErrorSink } from "./sinks-scWbkOMp.mjs";
2
- import { n as scrubError, t as SentrySink } from "./sentry-sink-BOuueung.mjs";
1
+ import { n as NoopErrorSink } from "./sinks-Dz8Kxoha.mjs";
2
+ import { n as scrubError, t as SentrySink } from "./sentry-sink-QWpfJGg_.mjs";
3
3
  export { NoopErrorSink, SentrySink, scrubError };
package/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
- import { a as NoopErrorSink, i as NoopAnalyticsSink, n as CommandSpan, r as ErrorSink, t as AnalyticsSink } from "./sinks-CSEolKcN.mjs";
2
- import { t as PostHogSink } from "./posthog-sink-BvVIQrGy.mjs";
3
- import { a as NoopLogger, i as Logger, n as LogEnv, r as LogLevel, t as LOG_LEVELS } from "./logger-CxGXigv1.mjs";
4
- import { a as redactOptions, i as redactObject, n as REDACT_CENSOR, r as redact, t as REDACTED_PATHS } from "./core-jXa8qbEx.mjs";
5
- import { n as scrubError, t as SentrySink } from "./sentry-sink-Dk0H3MG5.mjs";
6
- import { a as detectEnv, c as isTelemetryDisabled, d as resolveLevel, f as ConsoleLogger, i as createPinoInstance, l as parseLogLevel, n as PinoLogger, o as generateRunId, r as buildPinoOptions, s as isCI, t as CreatePinoInstanceInput, u as resolveAxiomFromEnv } from "./pino-Dx8yblcl.mjs";
7
- import { a as BuildTransportInput, i as AxiomTransportConfig, n as LoggerConfig, o as buildTransport, r as createLogger, t as CreateLoggerResult } from "./create-CEY3e4NQ.mjs";
1
+ import { a as NoopErrorSink, i as NoopAnalyticsSink, n as CommandSpan, r as ErrorSink, t as AnalyticsSink } from "./sinks-v2TCQsCp.mjs";
2
+ import { t as PostHogSink } from "./posthog-sink-D4aRF3P2.mjs";
3
+ import { a as NoopLogger, i as Logger, n as LogEnv, r as LogLevel, t as LOG_LEVELS } from "./logger-DC6M2rL_.mjs";
4
+ import { a as redactOptions, i as redactObject, n as REDACT_CENSOR, r as redact, t as REDACTED_PATHS } from "./core-DDpFbotv.mjs";
5
+ import { n as scrubError, t as SentrySink } from "./sentry-sink-C1E3tOl-.mjs";
6
+ import { a as detectEnv, c as isTelemetryDisabled, d as resolveLevel, f as ConsoleLogger, i as createPinoInstance, l as parseLogLevel, n as PinoLogger, o as generateRunId, r as buildPinoOptions, s as isCI, t as CreatePinoInstanceInput, u as resolveAxiomFromEnv } from "./pino-DIfQGY7z.mjs";
7
+ import { a as BuildTransportInput, i as AxiomTransportConfig, n as LoggerConfig, o as buildTransport, r as createLogger, t as CreateLoggerResult } from "./create-X1v3LWjb.mjs";
8
8
  export { type AnalyticsSink, type AxiomTransportConfig, type BuildTransportInput, type CommandSpan, ConsoleLogger, type CreateLoggerResult, type CreatePinoInstanceInput, type ErrorSink, LOG_LEVELS, type LogEnv, type LogLevel, type Logger, type LoggerConfig, NoopAnalyticsSink, NoopErrorSink, NoopLogger, PinoLogger, PostHogSink, REDACTED_PATHS, REDACT_CENSOR, SentrySink, buildPinoOptions, buildTransport, createLogger, createPinoInstance, detectEnv, generateRunId, isCI, isTelemetryDisabled, parseLogLevel, redact, redactObject, redactOptions, resolveAxiomFromEnv, resolveLevel, scrubError };
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import { n as NoopLogger, t as LOG_LEVELS } from "./logger-DIvYoEp9.mjs";
2
- import { a as redactOptions, i as redactObject, n as REDACT_CENSOR, r as redact, t as REDACTED_PATHS } from "./redact-BMWG62k9.mjs";
3
- import { n as NoopErrorSink, t as NoopAnalyticsSink } from "./sinks-scWbkOMp.mjs";
1
+ import { n as NoopLogger, t as LOG_LEVELS } from "./logger-BqELCAzg.mjs";
2
+ import { a as redactOptions, i as redactObject, n as REDACT_CENSOR, r as redact, t as REDACTED_PATHS } from "./redact-DCKZnDDa.mjs";
3
+ import { n as NoopErrorSink, t as NoopAnalyticsSink } from "./sinks-Dz8Kxoha.mjs";
4
4
  import "./core.mjs";
5
- import { a as buildTransport, c as isCI, d as resolveAxiomFromEnv, f as resolveLevel, i as createPinoInstance, l as isTelemetryDisabled, n as PinoLogger, o as detectEnv, p as ConsoleLogger, r as buildPinoOptions, s as generateRunId, t as createLogger, u as parseLogLevel } from "./create-BLYkMD-k.mjs";
6
- import { n as scrubError, t as SentrySink } from "./sentry-sink-BOuueung.mjs";
7
- import { t as PostHogSink } from "./posthog-sink-ClNks-Le.mjs";
5
+ import { a as buildTransport, c as isCI, d as resolveAxiomFromEnv, f as resolveLevel, i as createPinoInstance, l as isTelemetryDisabled, n as PinoLogger, o as detectEnv, p as ConsoleLogger, r as buildPinoOptions, s as generateRunId, t as createLogger, u as parseLogLevel } from "./create-BVlZq5Qa.mjs";
6
+ import { n as scrubError, t as SentrySink } from "./sentry-sink-QWpfJGg_.mjs";
7
+ import { t as PostHogSink } from "./posthog-sink-BUvWHuIC.mjs";
8
8
  export { ConsoleLogger, LOG_LEVELS, NoopAnalyticsSink, NoopErrorSink, NoopLogger, PinoLogger, PostHogSink, REDACTED_PATHS, REDACT_CENSOR, SentrySink, buildPinoOptions, buildTransport, createLogger, createPinoInstance, detectEnv, generateRunId, isCI, isTelemetryDisabled, parseLogLevel, redact, redactObject, redactOptions, resolveAxiomFromEnv, resolveLevel, scrubError };
@@ -1,4 +1,4 @@
1
- //#region src/core/logger.ts
1
+ // src/core/logger.ts
2
2
  /** The four levels, in ascending severity — useful for validation. */
3
3
  const LOG_LEVELS = [
4
4
  "debug",
@@ -18,9 +18,13 @@ const LOG_LEVELS = [
18
18
  * instead of discarding them) live in `@theholocron/observability/testing`.
19
19
  */
20
20
  var NoopLogger = class {
21
+ /** Discards the line. */
21
22
  debug(_objOrMsg, _msg) {}
23
+ /** Discards the line. */
22
24
  info(_objOrMsg, _msg) {}
25
+ /** Discards the line. */
23
26
  warn(_objOrMsg, _msg) {}
27
+ /** Discards the line. */
24
28
  error(_objOrMsg, _msg) {}
25
29
  child(_bindings) {
26
30
  return this;
@@ -29,5 +33,4 @@ var NoopLogger = class {
29
33
  return Promise.resolve();
30
34
  }
31
35
  };
32
- //#endregion
33
36
  export { NoopLogger as n, LOG_LEVELS as t };
@@ -1,4 +1,3 @@
1
- //#region src/core/logger.d.ts
2
1
  /**
3
2
  * The logging surface every consumer depends on.
4
3
  *
@@ -12,12 +11,16 @@
12
11
  * for a simple line (`log.info("sync complete")`).
13
12
  */
14
13
  interface Logger {
14
+ /** Logs a verbose line, either a context object with an optional message or a bare string. */
15
15
  debug(obj: Record<string, unknown>, msg?: string): void;
16
16
  debug(msg: string): void;
17
+ /** Logs a routine progress line, either a context object with an optional message or a bare string. */
17
18
  info(obj: Record<string, unknown>, msg?: string): void;
18
19
  info(msg: string): void;
20
+ /** Logs a recoverable problem, either a context object with an optional message or a bare string. */
19
21
  warn(obj: Record<string, unknown>, msg?: string): void;
20
22
  warn(msg: string): void;
23
+ /** Logs a failure, either a context object with an optional message or a bare string. */
21
24
  error(obj: Record<string, unknown>, msg?: string): void;
22
25
  error(msg: string): void;
23
26
  /**
@@ -44,8 +47,13 @@ interface Logger {
44
47
  type LogLevel = "debug" | "info" | "warn" | "error";
45
48
  /** The four levels, in ascending severity — useful for validation. */
46
49
  declare const LOG_LEVELS: readonly LogLevel[];
47
- /** Runtime environment a logger was constructed in. */
48
- type LogEnv = "ci" | "local";
50
+ /**
51
+ * Runtime environment a logger was constructed in: `local` (a laptop), `development` (a development instance), `ci`,
52
+ * `test` (a deployed pre-production instance) or `production`. It is bound on every line as `env`, so one Axiom dataset can hold all of them and a query filters by it.
53
+ * Detection lives in `@theholocron/env-utils` (`detectEnvironment`); this union is written out here because `/core`
54
+ * has no dependencies, and a type test keeps it equal to env-utils' `Environment`.
55
+ */
56
+ type LogEnv = "local" | "development" | "ci" | "test" | "production";
49
57
  /**
50
58
  * The disabled-logging path made explicit — one shared no-op instead of a
51
59
  * scatter of `if (!enabled) return` guards at every call site. Symmetric with
@@ -58,12 +66,15 @@ type LogEnv = "ci" | "local";
58
66
  * instead of discarding them) live in `@theholocron/observability/testing`.
59
67
  */
60
68
  declare class NoopLogger implements Logger {
69
+ /** Discards the line. */
61
70
  debug(_objOrMsg?: Record<string, unknown> | string, _msg?: string): void;
71
+ /** Discards the line. */
62
72
  info(_objOrMsg?: Record<string, unknown> | string, _msg?: string): void;
73
+ /** Discards the line. */
63
74
  warn(_objOrMsg?: Record<string, unknown> | string, _msg?: string): void;
75
+ /** Discards the line. */
64
76
  error(_objOrMsg?: Record<string, unknown> | string, _msg?: string): void;
65
77
  child(_bindings?: Record<string, unknown>): Logger;
66
78
  flush(): Promise<void>;
67
79
  }
68
- //#endregion
69
80
  export { NoopLogger as a, Logger as i, LogEnv as n, LogLevel as r, LOG_LEVELS as t };
package/dist/logger.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { i as Logger, n as LogEnv, r as LogLevel, t as LOG_LEVELS } from "./logger-CxGXigv1.mjs";
2
- import { a as detectEnv, c as isTelemetryDisabled, d as resolveLevel, f as ConsoleLogger, i as createPinoInstance, l as parseLogLevel, n as PinoLogger, o as generateRunId, r as buildPinoOptions, s as isCI, t as CreatePinoInstanceInput, u as resolveAxiomFromEnv } from "./pino-Dx8yblcl.mjs";
3
- import { a as BuildTransportInput, i as AxiomTransportConfig, n as LoggerConfig, o as buildTransport, r as createLogger, t as CreateLoggerResult } from "./create-CEY3e4NQ.mjs";
1
+ import { i as Logger, n as LogEnv, r as LogLevel, t as LOG_LEVELS } from "./logger-DC6M2rL_.mjs";
2
+ import { a as detectEnv, c as isTelemetryDisabled, d as resolveLevel, f as ConsoleLogger, i as createPinoInstance, l as parseLogLevel, n as PinoLogger, o as generateRunId, r as buildPinoOptions, s as isCI, t as CreatePinoInstanceInput, u as resolveAxiomFromEnv } from "./pino-DIfQGY7z.mjs";
3
+ import { a as BuildTransportInput, i as AxiomTransportConfig, n as LoggerConfig, o as buildTransport, r as createLogger, t as CreateLoggerResult } from "./create-X1v3LWjb.mjs";
4
4
  export { type AxiomTransportConfig, type BuildTransportInput, ConsoleLogger, type CreateLoggerResult, type CreatePinoInstanceInput, LOG_LEVELS, type LogEnv, type LogLevel, type Logger, type LoggerConfig, PinoLogger, buildPinoOptions, buildTransport, createLogger, createPinoInstance, detectEnv, generateRunId, isCI, isTelemetryDisabled, parseLogLevel, resolveAxiomFromEnv, resolveLevel };
package/dist/logger.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { t as LOG_LEVELS } from "./logger-DIvYoEp9.mjs";
2
- import { a as buildTransport, c as isCI, d as resolveAxiomFromEnv, f as resolveLevel, i as createPinoInstance, l as isTelemetryDisabled, n as PinoLogger, o as detectEnv, p as ConsoleLogger, r as buildPinoOptions, s as generateRunId, t as createLogger, u as parseLogLevel } from "./create-BLYkMD-k.mjs";
1
+ import { t as LOG_LEVELS } from "./logger-BqELCAzg.mjs";
2
+ import { a as buildTransport, c as isCI, d as resolveAxiomFromEnv, f as resolveLevel, i as createPinoInstance, l as isTelemetryDisabled, n as PinoLogger, o as detectEnv, p as ConsoleLogger, r as buildPinoOptions, s as generateRunId, t as createLogger, u as parseLogLevel } from "./create-BVlZq5Qa.mjs";
3
3
  export { ConsoleLogger, LOG_LEVELS, PinoLogger, buildPinoOptions, buildTransport, createLogger, createPinoInstance, detectEnv, generateRunId, isCI, isTelemetryDisabled, parseLogLevel, resolveAxiomFromEnv, resolveLevel };
@@ -1,7 +1,7 @@
1
- import { i as Logger$1, n as LogEnv, r as LogLevel } from "./logger-CxGXigv1.mjs";
2
- import { i as AxiomTransportConfig } from "./create-CEY3e4NQ.mjs";
1
+ import { i as Logger$1, r as LogLevel } from "./logger-DC6M2rL_.mjs";
2
+ import { i as AxiomTransportConfig } from "./create-X1v3LWjb.mjs";
3
+ import { detectEnvironment as detectEnv, isCI } from "@theholocron/env-utils/lookup";
3
4
  import { DestinationStream, Logger, LoggerOptions } from "pino";
4
- //#region src/logger/console.d.ts
5
5
  /**
6
6
  * A zero-dependency {@link Logger} over the platform `console` — no Pino, no
7
7
  * worker thread, no transports. Use it in the browser, an edge runtime, or
@@ -18,32 +18,27 @@ declare class ConsoleLogger implements Logger$1 {
18
18
  level?: LogLevel;
19
19
  bindings?: Record<string, unknown>;
20
20
  });
21
+ /** Logs at `debug` level through `console.debug`. */
21
22
  debug(obj: Record<string, unknown>, msg?: string): void;
22
23
  debug(msg: string): void;
24
+ /** Logs at `info` level through `console.info`. */
23
25
  info(obj: Record<string, unknown>, msg?: string): void;
24
26
  info(msg: string): void;
27
+ /** Logs at `warn` level through `console.warn`. */
25
28
  warn(obj: Record<string, unknown>, msg?: string): void;
26
29
  warn(msg: string): void;
30
+ /** Logs at `error` level through `console.error`. */
27
31
  error(obj: Record<string, unknown>, msg?: string): void;
28
32
  error(msg: string): void;
29
33
  child(bindings: Record<string, unknown>): Logger$1;
30
34
  flush(): Promise<void>;
31
35
  }
32
- //#endregion
33
- //#region src/logger/context.d.ts
34
36
  /**
35
37
  * A fresh correlation id for one invocation. Every log line from a single run
36
38
  * carries this `runId`, so a whole run can be pulled back out of Axiom with
37
39
  * one query.
38
40
  */
39
41
  declare function generateRunId(): string;
40
- /**
41
- * True when running inside CI. GitHub Actions (and most other providers) set
42
- * `CI=true`; we also accept any other non-empty, non-`false` value.
43
- */
44
- declare function isCI(env?: NodeJS.ProcessEnv): boolean;
45
- /** `"ci"` inside CI, otherwise `"local"` — bound on every root logger. */
46
- declare function detectEnv(env?: NodeJS.ProcessEnv): LogEnv;
47
42
  /** Narrow an arbitrary string to a {@link LogLevel}, or `undefined`. */
48
43
  declare function parseLogLevel(value: string | undefined): LogLevel | undefined;
49
44
  /**
@@ -74,8 +69,6 @@ declare function isTelemetryDisabled(env?: NodeJS.ProcessEnv): boolean;
74
69
  * | dataset | `HOLOCRON_AXIOM_DATASET` | `AXIOM_DATASET` |
75
70
  */
76
71
  declare function resolveAxiomFromEnv(env?: NodeJS.ProcessEnv): AxiomTransportConfig | undefined;
77
- //#endregion
78
- //#region src/logger/pino.d.ts
79
72
  /**
80
73
  * The Pino-backed {@link Logger}. Nothing outside this package should name it —
81
74
  * construct loggers with `createLogger`. It is a thin pass-through to a Pino
@@ -85,12 +78,16 @@ declare function resolveAxiomFromEnv(env?: NodeJS.ProcessEnv): AxiomTransportCon
85
78
  declare class PinoLogger implements Logger$1 {
86
79
  #private;
87
80
  constructor(instance: Logger);
81
+ /** Logs at `debug` level. */
88
82
  debug(obj: Record<string, unknown>, msg?: string): void;
89
83
  debug(msg: string): void;
84
+ /** Logs at `info` level. */
90
85
  info(obj: Record<string, unknown>, msg?: string): void;
91
86
  info(msg: string): void;
87
+ /** Logs at `warn` level. */
92
88
  warn(obj: Record<string, unknown>, msg?: string): void;
93
89
  warn(msg: string): void;
90
+ /** Logs at `error` level. */
94
91
  error(obj: Record<string, unknown>, msg?: string): void;
95
92
  error(msg: string): void;
96
93
  child(bindings: Record<string, unknown>): Logger$1;
@@ -102,6 +99,7 @@ declare class PinoLogger implements Logger$1 {
102
99
  */
103
100
  flush(): Promise<void>;
104
101
  }
102
+ /** Inputs for {@link createPinoInstance} and {@link buildPinoOptions}. */
105
103
  interface CreatePinoInstanceInput {
106
104
  /** Resolved log level. */
107
105
  level: LogLevel;
@@ -142,5 +140,4 @@ declare function buildPinoOptions(input: CreatePinoInstanceInput): LoggerOptions
142
140
  * {@link buildPinoOptions} wired.
143
141
  */
144
142
  declare function createPinoInstance(input: CreatePinoInstanceInput): Logger;
145
- //#endregion
146
143
  export { detectEnv as a, isTelemetryDisabled as c, resolveLevel as d, ConsoleLogger as f, createPinoInstance as i, parseLogLevel as l, PinoLogger as n, generateRunId as o, buildPinoOptions as r, isCI as s, CreatePinoInstanceInput as t, resolveAxiomFromEnv as u };
@@ -1,5 +1,5 @@
1
1
  import { PostHog } from "posthog-node";
2
- //#region src/analytics/posthog-sink.ts
2
+ // src/analytics/posthog-sink.ts
3
3
  /**
4
4
  * `PostHogSink` — the **only** `posthog-node` call site. A portable
5
5
  * `AnalyticsSink` adapter: usage, adoption, retention. It reads no environment
@@ -17,12 +17,14 @@ var PostHogSink = class {
17
17
  constructor(config) {
18
18
  this.#client = new PostHog(config.key, { host: config.host });
19
19
  }
20
+ /** Associates `props` with the person identified by `distinctId`. */
20
21
  identify(distinctId, props) {
21
22
  this.#client.identify({
22
23
  distinctId,
23
24
  properties: props
24
25
  });
25
26
  }
27
+ /** Records the `event` for `distinctId` with the given `props`. */
26
28
  capture(distinctId, event, props) {
27
29
  this.#client.capture({
28
30
  distinctId,
@@ -30,9 +32,9 @@ var PostHogSink = class {
30
32
  properties: props
31
33
  });
32
34
  }
35
+ /** Flushes queued events and closes the PostHog client. */
33
36
  async shutdown() {
34
37
  await this.#client.shutdown();
35
38
  }
36
39
  };
37
- //#endregion
38
40
  export { PostHogSink as t };
@@ -1,14 +1,15 @@
1
- import { t as AnalyticsSink } from "./sinks-CSEolKcN.mjs";
2
- //#region src/analytics/posthog-sink.d.ts
1
+ import { t as AnalyticsSink } from "./sinks-v2TCQsCp.mjs";
3
2
  declare class PostHogSink implements AnalyticsSink {
4
3
  #private;
5
4
  constructor(config: {
6
5
  key: string;
7
6
  host: string;
8
7
  });
8
+ /** Associates `props` with the person identified by `distinctId`. */
9
9
  identify(distinctId: string, props: Record<string, unknown>): void;
10
+ /** Records the `event` for `distinctId` with the given `props`. */
10
11
  capture(distinctId: string, event: string, props: Record<string, unknown>): void;
12
+ /** Flushes queued events and closes the PostHog client. */
11
13
  shutdown(): Promise<void>;
12
14
  }
13
- //#endregion
14
15
  export { PostHogSink as t };
@@ -1,4 +1,4 @@
1
- //#region src/core/redact.ts
1
+ // src/core/redact.ts
2
2
  /**
3
3
  * Two redaction layers, both zero-dependency:
4
4
  *
@@ -34,7 +34,9 @@ const REDACTED_PATHS = [
34
34
  const REDACT_CENSOR = "[Redacted]";
35
35
  /** Ready-to-use Pino `redact` option. */
36
36
  const redactOptions = {
37
+ /** The field paths to redact, a copy of {@link REDACTED_PATHS}. */
37
38
  paths: [...REDACTED_PATHS],
39
+ /** The string written in place of each redacted value, {@link REDACT_CENSOR}. */
38
40
  censor: REDACT_CENSOR
39
41
  };
40
42
  const TOKEN_RE = /\b(ghp_|ghs_|glpat-|xoxb-|xoxp-|npm_|sk-|[A-Z][A-Z0-9_]{2,}_TOKEN[=\s])[^\s"]*/g;
@@ -46,5 +48,4 @@ function redact(raw) {
46
48
  function redactObject(value) {
47
49
  return JSON.parse(redact(JSON.stringify(value)));
48
50
  }
49
- //#endregion
50
51
  export { redactOptions as a, redactObject as i, REDACT_CENSOR as n, redact as r, REDACTED_PATHS as t };
@@ -1,9 +1,9 @@
1
- import { n as CommandSpan, r as ErrorSink } from "./sinks-CSEolKcN.mjs";
1
+ import { n as CommandSpan, r as ErrorSink } from "./sinks-v2TCQsCp.mjs";
2
2
  import { ErrorEvent, EventHint } from "@sentry/node";
3
- //#region src/errors/sentry-sink.d.ts
4
3
  /** `beforeSend` — token-shaped strings never leave the process. */
5
4
  declare function scrubError(event: ErrorEvent, _hint: EventHint): ErrorEvent;
6
5
  declare class SentrySink implements ErrorSink {
6
+ /** Initialises Sentry with the DSN, release and environment, starts a session and applies `ctx.tags`; events are scrubbed by {@link scrubError} and every trace is sampled. */
7
7
  init(ctx: {
8
8
  dsn: string;
9
9
  release: string;
@@ -11,9 +11,11 @@ declare class SentrySink implements ErrorSink {
11
11
  tags: Record<string, string>;
12
12
  }): void;
13
13
  startSpan(name: string): CommandSpan;
14
+ /** Reports `err` to Sentry. */
14
15
  captureException(err: unknown): void;
16
+ /** Ends the Sentry session. */
15
17
  endSession(): void;
18
+ /** Closes the Sentry client, waiting up to two seconds for pending events to send. */
16
19
  flush(): Promise<void>;
17
20
  }
18
- //#endregion
19
21
  export { scrubError as n, SentrySink as t };
@@ -1,11 +1,12 @@
1
- import { i as redactObject } from "./redact-BMWG62k9.mjs";
1
+ import { i as redactObject } from "./redact-DCKZnDDa.mjs";
2
2
  import * as Sentry from "@sentry/node";
3
- //#region src/errors/sentry-sink.ts
3
+ // src/errors/sentry-sink.ts
4
4
  /** `beforeSend` — token-shaped strings never leave the process. */
5
5
  function scrubError(event, _hint) {
6
6
  return redactObject(event);
7
7
  }
8
8
  var SentrySink = class {
9
+ /** Initialises Sentry with the DSN, release and environment, starts a session and applies `ctx.tags`; events are scrubbed by {@link scrubError} and every trace is sampled. */
9
10
  init(ctx) {
10
11
  Sentry.init({
11
12
  dsn: ctx.dsn,
@@ -29,15 +30,17 @@ var SentrySink = class {
29
30
  end: () => span.end()
30
31
  };
31
32
  }
33
+ /** Reports `err` to Sentry. */
32
34
  captureException(err) {
33
35
  Sentry.captureException(err);
34
36
  }
37
+ /** Ends the Sentry session. */
35
38
  endSession() {
36
39
  Sentry.endSession();
37
40
  }
41
+ /** Closes the Sentry client, waiting up to two seconds for pending events to send. */
38
42
  async flush() {
39
43
  await Sentry.close(2e3);
40
44
  }
41
45
  };
42
- //#endregion
43
46
  export { scrubError as n, SentrySink as t };
@@ -1,21 +1,27 @@
1
- //#region src/core/sinks.ts
1
+ // src/core/sinks.ts
2
2
  /**
3
3
  * The disabled path made explicit — one shared no-op instead of a scatter of
4
4
  * `if (!enabled) return` guards. Install it when telemetry is opted out or no
5
5
  * credentials resolve.
6
6
  */
7
7
  var NoopErrorSink = class {
8
+ /** Does nothing. */
8
9
  init() {}
9
10
  startSpan() {}
11
+ /** Does nothing. */
10
12
  captureException() {}
13
+ /** Does nothing. */
11
14
  endSession() {}
15
+ /** Resolves immediately. */
12
16
  async flush() {}
13
17
  };
14
18
  /** @see NoopErrorSink */
15
19
  var NoopAnalyticsSink = class {
20
+ /** Does nothing. */
16
21
  identify() {}
22
+ /** Does nothing. */
17
23
  capture() {}
24
+ /** Resolves immediately. */
18
25
  async shutdown() {}
19
26
  };
20
- //#endregion
21
27
  export { NoopErrorSink as n, NoopAnalyticsSink as t };
@@ -1,4 +1,3 @@
1
- //#region src/core/sinks.d.ts
2
1
  /**
3
2
  * Telemetry sink interfaces — the seam between an application's telemetry
4
3
  * orchestration and the vendor SDKs. No `@sentry/node` / `posthog-node` import
@@ -9,11 +8,14 @@
9
8
  */
10
9
  /** A running command span — `undefined` when the error sink is off. */
11
10
  interface CommandSpan {
11
+ /** Marks the span as succeeded (`true`) or failed (`false`). */
12
12
  setStatus(ok: boolean): void;
13
+ /** Ends the span and records its duration. */
13
14
  end(): void;
14
15
  }
15
16
  /** Error tracking + performance (Sentry). */
16
17
  interface ErrorSink {
18
+ /** Initialises the tracker with the resolved DSN, release, environment and tags applied to every event. */
17
19
  init(ctx: {
18
20
  dsn: string;
19
21
  release: string;
@@ -22,14 +24,20 @@ interface ErrorSink {
22
24
  }): void;
23
25
  /** Start a command span. Returns `undefined` for a no-op sink. */
24
26
  startSpan(name: string): CommandSpan | undefined;
27
+ /** Reports an error (or any thrown value) to the tracker. */
25
28
  captureException(err: unknown): void;
29
+ /** Ends the current session. */
26
30
  endSession(): void;
31
+ /** Resolves once pending events have been sent, or the sink's timeout passes. */
27
32
  flush(): Promise<void>;
28
33
  }
29
34
  /** Product analytics — usage, adoption, retention (PostHog). */
30
35
  interface AnalyticsSink {
36
+ /** Associates `props` with the person identified by `distinctId`. */
31
37
  identify(distinctId: string, props: Record<string, unknown>): void;
38
+ /** Records the `event` for `distinctId` with the given `props`. */
32
39
  capture(distinctId: string, event: string, props: Record<string, unknown>): void;
40
+ /** Flushes queued events and shuts the client down. */
33
41
  shutdown(): Promise<void>;
34
42
  }
35
43
  /**
@@ -38,17 +46,23 @@ interface AnalyticsSink {
38
46
  * credentials resolve.
39
47
  */
40
48
  declare class NoopErrorSink implements ErrorSink {
49
+ /** Does nothing. */
41
50
  init(): void;
42
51
  startSpan(): CommandSpan | undefined;
52
+ /** Does nothing. */
43
53
  captureException(): void;
54
+ /** Does nothing. */
44
55
  endSession(): void;
56
+ /** Resolves immediately. */
45
57
  flush(): Promise<void>;
46
58
  }
47
59
  /** @see NoopErrorSink */
48
60
  declare class NoopAnalyticsSink implements AnalyticsSink {
61
+ /** Does nothing. */
49
62
  identify(): void;
63
+ /** Does nothing. */
50
64
  capture(): void;
65
+ /** Resolves immediately. */
51
66
  shutdown(): Promise<void>;
52
67
  }
53
- //#endregion
54
68
  export { NoopErrorSink as a, NoopAnalyticsSink as i, CommandSpan as n, ErrorSink as r, AnalyticsSink as t };
@@ -1,8 +1,7 @@
1
- import { n as CommandSpan, r as ErrorSink, t as AnalyticsSink } from "./sinks-CSEolKcN.mjs";
2
- import { i as Logger } from "./logger-CxGXigv1.mjs";
3
- import { r as createLogger } from "./create-CEY3e4NQ.mjs";
1
+ import { n as CommandSpan, r as ErrorSink, t as AnalyticsSink } from "./sinks-v2TCQsCp.mjs";
2
+ import { i as Logger } from "./logger-DC6M2rL_.mjs";
3
+ import { r as createLogger } from "./create-X1v3LWjb.mjs";
4
4
  import { Mock } from "vitest";
5
- //#region src/testing/fake-analytics-sink.d.ts
6
5
  /** An {@link AnalyticsSink} whose methods are spies. */
7
6
  interface FakeAnalyticsSink extends AnalyticsSink {
8
7
  identify: Mock;
@@ -20,8 +19,6 @@ interface FakeAnalyticsSink extends AnalyticsSink {
20
19
  * ```
21
20
  */
22
21
  export declare function fakeAnalyticsSink(): FakeAnalyticsSink;
23
- //#endregion
24
- //#region src/testing/fake-error-sink.d.ts
25
22
  /** A {@link CommandSpan} whose methods are spies. */
26
23
  interface FakeSpan extends CommandSpan {
27
24
  setStatus: Mock;
@@ -47,8 +44,6 @@ interface FakeErrorSink extends ErrorSink {
47
44
  * ```
48
45
  */
49
46
  export declare function fakeErrorSink(): FakeErrorSink;
50
- //#endregion
51
- //#region src/testing/fake-logger.d.ts
52
47
  /** A {@link Logger} whose level methods are spies; `child()` returns itself. */
53
48
  interface FakeLogger extends Logger {
54
49
  debug: Mock;
@@ -69,8 +64,6 @@ interface FakeLogger extends Logger {
69
64
  * ```
70
65
  */
71
66
  export declare function fakeLogger(): FakeLogger;
72
- //#endregion
73
- //#region src/testing/silence-logger.d.ts
74
67
  /**
75
68
  * Replace `createLogger` in the `/logger` module with one that returns a
76
69
  * {@link NoopLogger}, so code under test that builds a real Pino logger stops
@@ -96,5 +89,4 @@ export declare function silenceLogger<T extends {
96
89
  }>(actual: T): Omit<T, "createLogger"> & {
97
90
  createLogger: typeof createLogger;
98
91
  };
99
- //#endregion
100
92
  export type { FakeAnalyticsSink, FakeErrorSink, FakeLogger, FakeSpan };
package/dist/testing.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { n as NoopLogger } from "./logger-DIvYoEp9.mjs";
1
+ import { n as NoopLogger } from "./logger-BqELCAzg.mjs";
2
2
  import { vi } from "vitest";
3
- //#region src/testing/fake-analytics-sink.ts
3
+ // src/testing/fake-analytics-sink.ts
4
4
  /**
5
5
  * Build a spy {@link AnalyticsSink} for asserting what a unit under test
6
6
  * reported. `shutdown()` resolves immediately.
@@ -18,8 +18,7 @@ function fakeAnalyticsSink() {
18
18
  shutdown: vi.fn().mockResolvedValue(void 0)
19
19
  };
20
20
  }
21
- //#endregion
22
- //#region src/testing/fake-error-sink.ts
21
+ // src/testing/fake-error-sink.ts
23
22
  /**
24
23
  * Build a spy {@link ErrorSink} for asserting what a unit under test reported.
25
24
  * `flush()` resolves immediately; `startSpan()` always returns the same spy
@@ -44,8 +43,7 @@ function fakeErrorSink() {
44
43
  flush: vi.fn().mockResolvedValue(void 0)
45
44
  };
46
45
  }
47
- //#endregion
48
- //#region src/testing/fake-logger.ts
46
+ // src/testing/fake-logger.ts
49
47
  /**
50
48
  * Build a spy {@link Logger} for asserting what a unit under test logged.
51
49
  * Pass it wherever a real `Logger` is expected.
@@ -67,8 +65,7 @@ function fakeLogger() {
67
65
  };
68
66
  return log;
69
67
  }
70
- //#endregion
71
- //#region src/testing/silence-logger.ts
68
+ // src/testing/silence-logger.ts
72
69
  const SILENT_RUN_ID = "00000000-0000-4000-8000-000000000000";
73
70
  /**
74
71
  * Replace `createLogger` in the `/logger` module with one that returns a
@@ -99,5 +96,4 @@ function silenceLogger(actual) {
99
96
  })
100
97
  };
101
98
  }
102
- //#endregion
103
99
  export { fakeAnalyticsSink, fakeErrorSink, fakeLogger, silenceLogger };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/observability",
3
- "version": "0.6.0",
3
+ "version": "0.7.0-alpha.1",
4
4
  "description": "Logging, error tracking, and analytics — one interface, swappable backends.",
5
5
  "keywords": [
6
6
  "typescript",
@@ -12,9 +12,13 @@
12
12
  "pino",
13
13
  "theholocron"
14
14
  ],
15
- "homepage": "https://docs.theholocron.dev/observability/",
16
- "bugs": "https://github.com/theholocron/observability/issues",
17
- "repository": "theholocron/observability",
15
+ "homepage": "https://docs.theholocron.dev/holocron/observability/",
16
+ "bugs": "https://github.com/theholocron/holocron/issues",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/theholocron/holocron.git",
20
+ "directory": "observability"
21
+ },
18
22
  "license": "MIT",
19
23
  "author": "Newton Koumantzelis",
20
24
  "sideEffects": false,
@@ -54,75 +58,28 @@
54
58
  "files": [
55
59
  "dist"
56
60
  ],
57
- "scripts": {
58
- "build": "tsdown",
59
- "delivery.build": "tsdown",
60
- "holocron": "holocron",
61
- "knowledge.wiki": "holocron run knowledge.wiki --",
62
- "platform.commitStandards": "holocron run platform.commitStandards --",
63
- "platform.repoSync": "holocron run platform.repoSync --",
64
- "prepare": "husky",
65
- "security.secretDetection": "holocron run security.secretDetection --",
66
- "sourceQuality.deadCodeAnalysis": "holocron run sourceQuality.deadCodeAnalysis --",
67
- "sourceQuality.formatting": "holocron run sourceQuality.formatting --",
68
- "sourceQuality.staticAnalysis": "eslint .",
69
- "sourceQuality.structuredDataValidation": "holocron run sourceQuality.structuredDataValidation --",
70
- "test:coverage": "vitest run --coverage",
71
- "verification.typeSafety": "tsc --noEmit",
72
- "verification.unitTests": "vitest run"
61
+ "dependencies": {
62
+ "@theholocron/env-utils": "^1.17.0-alpha.1"
73
63
  },
74
64
  "devDependencies": {
75
- "@astrojs/react": "catalog:",
76
- "@astrojs/starlight": "catalog:",
77
- "@axiomhq/pino": "catalog:",
78
- "@commitlint/cli": "catalog:",
79
- "@commitlint/types": "catalog:",
80
- "@eslint/js": "catalog:",
81
- "@semantic-release/changelog": "catalog:",
82
- "@semantic-release/exec": "catalog:",
83
- "@semantic-release/git": "catalog:",
84
- "@semantic-release/github": "catalog:",
85
- "@sentry/node": "catalog:",
86
- "@theholocron/astro-config": "catalog:configs",
87
- "@theholocron/astromech": "catalog:holocron",
88
- "@theholocron/cli": "catalog:holocron",
89
- "@theholocron/commitlint-config": "catalog:configs",
90
- "@theholocron/docs-theme": "catalog:",
91
- "@theholocron/eslint-config": "catalog:configs",
92
- "@theholocron/holocron-plugin-cloudflare": "catalog:holocron",
93
- "@theholocron/holocron-plugin-fern": "catalog:holocron",
94
- "@theholocron/holocron-plugin-github": "catalog:holocron",
95
- "@theholocron/lint-staged-config": "catalog:configs",
96
- "@theholocron/prettier-config": "catalog:configs",
97
- "@theholocron/semantic-release-config": "catalog:configs",
98
- "@theholocron/skills": "^1.3.2",
99
- "@theholocron/tsconfig": "catalog:configs",
100
- "@theholocron/tsdown-config": "catalog:configs",
101
- "@theholocron/vitest-config": "catalog:configs",
102
- "@types/node": "catalog:",
103
- "@vitest/coverage-v8": "catalog:",
104
- "astro": "catalog:",
105
- "conventional-changelog-conventionalcommits": "catalog:",
106
- "eslint": "catalog:",
107
- "eslint-plugin-n": "catalog:",
108
- "eslint-plugin-simple-import-sort": "catalog:",
109
- "globals": "catalog:",
110
- "husky": "catalog:",
111
- "knip": "catalog:",
112
- "lint-staged": "catalog:",
113
- "pino": "catalog:",
114
- "pino-pretty": "catalog:",
115
- "posthog-node": "catalog:",
116
- "prettier": "catalog:",
117
- "react": "catalog:",
118
- "react-dom": "catalog:",
119
- "semantic-release": "catalog:",
120
- "sort-package-json": "catalog:",
121
- "tsdown": "catalog:",
122
- "turbo": "^2.10.12",
123
- "typescript": "catalog:",
124
- "typescript-eslint": "catalog:",
125
- "vitest": "catalog:"
65
+ "@axiomhq/pino": "^2.0.0",
66
+ "@sentry/node": "^11.9.0",
67
+ "@types/node": "^26",
68
+ "@vitest/coverage-v8": "^5.0.5",
69
+ "@vitest/eslint-plugin": "^1.6.27",
70
+ "eslint": "^10.8.1",
71
+ "eslint-plugin-n": "^18.3.0",
72
+ "globals": "^17.11.0",
73
+ "pino": "^10.3.1",
74
+ "pino-pretty": "^13.1.3",
75
+ "posthog-node": "^5.57.2",
76
+ "tsdown": "^0.23.3",
77
+ "typescript": "^5.9.3",
78
+ "vitest": "^5.0.5",
79
+ "@theholocron/eslint-config": "^8.9.0-alpha.8",
80
+ "@theholocron/tsdown-config": "^8.9.0-alpha.8",
81
+ "@theholocron/vitest-config": "^8.9.0-alpha.8",
82
+ "@theholocron/tsconfig": "^8.9.0-alpha.8"
126
83
  },
127
84
  "peerDependencies": {
128
85
  "@axiomhq/pino": ">=2",
@@ -152,19 +109,17 @@
152
109
  "optional": true
153
110
  }
154
111
  },
155
- "packageManager": "pnpm@10.33.0",
156
112
  "engines": {
157
- "node": ">=22.0.0"
113
+ "node": ">=22"
158
114
  },
159
115
  "publishConfig": {
160
116
  "access": "public"
161
117
  },
162
- "pnpm": {
163
- "overrides": {
164
- "@commitlint/config-conventional>conventional-changelog-conventionalcommits": "7",
165
- "conventional-changelog-conventionalcommits": "9.3.1"
166
- }
167
- },
168
- "releases": "https://github.com/theholocron/observability/releases",
169
- "wiki": "https://github.com/theholocron/observability/wiki"
170
- }
118
+ "scripts": {
119
+ "build": "tsdown",
120
+ "lint:code": "eslint .",
121
+ "test:unit": "vitest run --coverage",
122
+ "test:watch": "vitest",
123
+ "typecheck": "tsc --noEmit"
124
+ }
125
+ }