syntropylog 0.12.4 → 0.12.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.12.6
4
+
5
+ ## 0.12.5
6
+
7
+ ### Patch Changes
8
+
9
+ - Remove **yaml** dependency and `loadLoggerConfig`; config is passed to `init()` only. Reduces supply-chain surface and aligns with Socket/security tooling. SECURITY.md and README updated (no file-based config).
10
+
11
+ **Breaking:** If you used `loadLoggerConfig()` or loaded config from YAML/JSON files, migrate to passing options directly to `syntropyLog.init({ ... })`. The package no longer exports `loadLoggerConfig` or depends on `yaml`.
12
+
3
13
  ## 0.12.4
4
14
 
5
15
  ### Patch Changes
package/README.md CHANGED
@@ -631,7 +631,7 @@ Secure this route (e.g. auth, internal only). When debugging in a POD is finishe
631
631
  **Filesystem access:** The package only reads the files described below; it does not scan or read arbitrary paths.
632
632
 
633
633
  - **Native addon loader** (`syntropylog-native`): Reads only (1) the presence of native `.node` binaries inside the package’s own directory (`__dirname`) to choose the correct build for the current OS/arch, and (2) on Linux only, the system `ldd` binary (e.g. `/usr/bin/ldd`) to detect musl vs glibc. No user or application files are read.
634
- - **Config loader** (`loadLoggerConfig`): Reads only paths you control. If you use it, it reads at most one file: either the path you pass in `opts.configPath`, or a file under `opts.configDir` with a name derived from `opts.defaultBase` and `opts.environment` (default: `./config/logger.yaml` or `./config/logger-{env}.yaml`). You can avoid filesystem access entirely by not calling `loadLoggerConfig` and passing config directly to `init()`.
634
+ Configuration is passed to `init()` only; the package does not load config from files.
635
635
 
636
636
  | Dynamically configurable | Fixed at init |
637
637
  |--------------------------|---------------|
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "syntropylog",
3
- "version": "0.12.4",
3
+ "version": "0.12.6",
4
4
  "engines": {
5
5
  "node": ">=20.0.0"
6
6
  },
@@ -139,11 +139,9 @@
139
139
  "access": "public",
140
140
  "provenance": true
141
141
  },
142
- "dependencies": {
143
- "yaml": "^2.8.2"
144
- },
142
+ "dependencies": {},
145
143
  "optionalDependencies": {
146
- "syntropylog-native": "0.1.0"
144
+ "syntropylog-native": "0.1.1"
147
145
  },
148
146
  "devDependencies": {
149
147
  "@changesets/cli": "^2.27.1",
@@ -1,48 +0,0 @@
1
- import { LoggerOptions } from '../types';
2
- /**
3
- * Defines the options for customizing the logger configuration loading behavior.
4
- */
5
- export interface LoggerConfigLoaderOptions {
6
- /**
7
- * Explicit absolute path to the configuration file.
8
- * If provided, this takes highest precedence.
9
- */
10
- configPath?: string;
11
- /**
12
- * The explicit environment name used to determine the environment-specific
13
- * suffix for the config file name (e.g., 'production').
14
- */
15
- environment?: string;
16
- /**
17
- * The directory where the configuration files are located.
18
- * @default './config'
19
- */
20
- configDir?: string;
21
- /**
22
- * The base name for the configuration file (e.g., 'logger' results in 'logger.yaml'
23
- * or 'logger-production.yaml').
24
- * @default 'logger'
25
- */
26
- defaultBase?: string;
27
- }
28
- /**
29
- * Loads logger configuration from a YAML file.
30
- * The function determines the file path with the following priority:
31
- * 1. The explicit path provided in `opts.configPath`.
32
- * 2. The environment-specific path (e.g., `{configDir}/{defaultBase}-{environment}.yaml`).
33
- * 3. The default base path (e.g., `{configDir}/{defaultBase}.yaml`).
34
- *
35
- * It does NOT read environment variables directly; all state must be passed via `opts`.
36
- * If no file is found, it returns an empty object, making the config file optional.
37
- *
38
- * **Security:** A restricted schema (`json`) is used to avoid prototype pollution
39
- * and dangerous types. Only use with configuration files under deployment team
40
- * control (controlled paths and permissions). This function reads only the paths
41
- * derived from opts (configPath, configDir, defaultBase, environment); no other
42
- * filesystem access is performed.
43
- *
44
- * @param opts - Options to customize the loading behavior.
45
- * @returns A partial `LoggerOptions` object, or an empty object if no file is found.
46
- * @throws An error if a config file is found but fails to be read or parsed.
47
- */
48
- export declare function loadLoggerConfig(opts?: LoggerConfigLoaderOptions): Partial<LoggerOptions>;