@bsb/observable-pino 9.1.2 → 9.6.12

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.
@@ -26,71 +26,71 @@
26
26
  */
27
27
  import { BSBObservable, BSBObservableConstructor, BSBError } from "@bsb/base";
28
28
  import { DTrace, LogMeta } from "@bsb/base";
29
- import * as av from "@anyvali/js";
29
+ import * as av from "anyvali";
30
30
  /**
31
31
  * Configuration schema for Pino observable
32
32
  */
33
33
  export declare const PinoConfigSchema: av.ObjectSchema<{
34
- level: av.OptionalSchema<av.EnumSchema<string[]>>;
34
+ level: av.EnumSchema<string[]>;
35
35
  prettyPrint: av.ObjectSchema<{
36
- enabled: av.OptionalSchema<av.BoolSchema>;
37
- colorize: av.OptionalSchema<av.BoolSchema>;
38
- translateTime: av.OptionalSchema<av.StringSchema>;
39
- ignore: av.OptionalSchema<av.StringSchema>;
36
+ enabled: av.BoolSchema;
37
+ colorize: av.BoolSchema;
38
+ translateTime: av.StringSchema;
39
+ ignore: av.StringSchema;
40
40
  }>;
41
41
  transport: av.ObjectSchema<{
42
- enabled: av.OptionalSchema<av.BoolSchema>;
42
+ enabled: av.BoolSchema;
43
43
  target: av.OptionalSchema<av.StringSchema>;
44
44
  options: av.OptionalSchema<av.RecordSchema<av.UnknownSchema>>;
45
45
  }>;
46
46
  serializers: av.ObjectSchema<{
47
- error: av.OptionalSchema<av.BoolSchema>;
47
+ error: av.BoolSchema;
48
48
  }>;
49
49
  base: av.OptionalSchema<av.RecordSchema<av.UnknownSchema>>;
50
- redact: av.OptionalSchema<av.ArraySchema<av.StringSchema>>;
50
+ redact: av.ArraySchema<av.StringSchema>;
51
51
  }>;
52
52
  export type PinoConfig = av.Infer<typeof PinoConfigSchema>;
53
53
  export declare const Config: import("@bsb/base").BSBPluginConfigClass<av.ObjectSchema<{
54
- level: av.OptionalSchema<av.EnumSchema<string[]>>;
54
+ level: av.EnumSchema<string[]>;
55
55
  prettyPrint: av.ObjectSchema<{
56
- enabled: av.OptionalSchema<av.BoolSchema>;
57
- colorize: av.OptionalSchema<av.BoolSchema>;
58
- translateTime: av.OptionalSchema<av.StringSchema>;
59
- ignore: av.OptionalSchema<av.StringSchema>;
56
+ enabled: av.BoolSchema;
57
+ colorize: av.BoolSchema;
58
+ translateTime: av.StringSchema;
59
+ ignore: av.StringSchema;
60
60
  }>;
61
61
  transport: av.ObjectSchema<{
62
- enabled: av.OptionalSchema<av.BoolSchema>;
62
+ enabled: av.BoolSchema;
63
63
  target: av.OptionalSchema<av.StringSchema>;
64
64
  options: av.OptionalSchema<av.RecordSchema<av.UnknownSchema>>;
65
65
  }>;
66
66
  serializers: av.ObjectSchema<{
67
- error: av.OptionalSchema<av.BoolSchema>;
67
+ error: av.BoolSchema;
68
68
  }>;
69
69
  base: av.OptionalSchema<av.RecordSchema<av.UnknownSchema>>;
70
- redact: av.OptionalSchema<av.ArraySchema<av.StringSchema>>;
70
+ redact: av.ArraySchema<av.StringSchema>;
71
71
  }>>;
72
72
  /**
73
73
  * Pino observable plugin - high-performance JSON logger
74
74
  */
75
75
  export declare class Plugin extends BSBObservable<InstanceType<typeof Config>> {
76
76
  static Config: import("@bsb/base").BSBPluginConfigClass<av.ObjectSchema<{
77
- level: av.OptionalSchema<av.EnumSchema<string[]>>;
77
+ level: av.EnumSchema<string[]>;
78
78
  prettyPrint: av.ObjectSchema<{
79
- enabled: av.OptionalSchema<av.BoolSchema>;
80
- colorize: av.OptionalSchema<av.BoolSchema>;
81
- translateTime: av.OptionalSchema<av.StringSchema>;
82
- ignore: av.OptionalSchema<av.StringSchema>;
79
+ enabled: av.BoolSchema;
80
+ colorize: av.BoolSchema;
81
+ translateTime: av.StringSchema;
82
+ ignore: av.StringSchema;
83
83
  }>;
84
84
  transport: av.ObjectSchema<{
85
- enabled: av.OptionalSchema<av.BoolSchema>;
85
+ enabled: av.BoolSchema;
86
86
  target: av.OptionalSchema<av.StringSchema>;
87
87
  options: av.OptionalSchema<av.RecordSchema<av.UnknownSchema>>;
88
88
  }>;
89
89
  serializers: av.ObjectSchema<{
90
- error: av.OptionalSchema<av.BoolSchema>;
90
+ error: av.BoolSchema;
91
91
  }>;
92
92
  base: av.OptionalSchema<av.RecordSchema<av.UnknownSchema>>;
93
- redact: av.OptionalSchema<av.ArraySchema<av.StringSchema>>;
93
+ redact: av.ArraySchema<av.StringSchema>;
94
94
  }>>;
95
95
  private logFormatter;
96
96
  private logger;
@@ -25,34 +25,33 @@
25
25
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
26
26
  */
27
27
  import { BSBObservable, createConfigSchema, LogFormatter, BSBError } from "@bsb/base";
28
- import * as av from "@anyvali/js";
28
+ import * as av from "anyvali";
29
29
  import pino from "pino";
30
30
  /**
31
31
  * Configuration schema for Pino observable
32
32
  */
33
33
  export const PinoConfigSchema = av.object({
34
- level: av.optional(av.enum_(["fatal", "error", "warn", "info", "debug", "trace"])).default("info"),
34
+ level: av.enum_(["fatal", "error", "warn", "info", "debug", "trace"]).default("info").describe("Minimum Pino log level"),
35
35
  prettyPrint: av.object({
36
- enabled: av.optional(av.bool()).default(false),
37
- colorize: av.optional(av.bool()).default(true),
38
- translateTime: av.optional(av.string()).default("SYS:standard"),
39
- ignore: av.optional(av.string()).default("pid,hostname"),
40
- }, { unknownKeys: "strip" }),
36
+ enabled: av.bool().default(false).describe("Whether Pino pretty printing is enabled"),
37
+ colorize: av.bool().default(true).describe("Whether pretty-printed logs use terminal colors"),
38
+ translateTime: av.string().default("SYS:standard").describe("Pino pretty time translation setting"),
39
+ ignore: av.string().default("pid,hostname").describe("Comma-separated Pino fields omitted from pretty output"),
40
+ }).describe("Pino pretty-print settings"),
41
41
  transport: av.object({
42
- enabled: av.optional(av.bool()).default(false),
43
- target: av.optional(av.string()),
44
- options: av.optional(av.record(av.unknown())),
45
- }, { unknownKeys: "strip" }),
42
+ enabled: av.bool().default(false).describe("Whether a Pino transport is enabled"),
43
+ target: av.optional(av.string()).describe("Pino transport target module"),
44
+ options: av.optional(av.record(av.unknown())).describe("Options passed to the configured Pino transport"),
45
+ }).describe("Pino transport settings"),
46
46
  serializers: av.object({
47
- error: av.optional(av.bool()).default(true),
48
- }, { unknownKeys: "strip" }),
49
- base: av.optional(av.record(av.unknown())),
50
- redact: av.optional(av.array(av.string())).default([]),
51
- }, { unknownKeys: "strip" });
47
+ error: av.bool().default(true).describe("Whether Error objects use Pino's standard error serializer"),
48
+ }).describe("Pino serializer settings"),
49
+ base: av.optional(av.record(av.unknown())).describe("Base fields added to every Pino log entry"),
50
+ redact: av.array(av.string()).default([]).describe("Pino redaction paths for sensitive fields"),
51
+ }).describe("Pino observable plugin configuration");
52
52
  export const Config = createConfigSchema({
53
53
  name: 'observable-pino',
54
54
  description: 'Pino-based high-performance structured logging observable',
55
- version: '9.0.0',
56
55
  image: './observable-pino.png',
57
56
  tags: ['pino', 'logging', 'observability', 'json'],
58
57
  documentation: ['./docs/plugin.md'],
@@ -1,7 +1,168 @@
1
1
  {
2
2
  "pluginName": "observable-pino",
3
- "version": "9.0.0",
4
3
  "events": {},
4
+ "version": "9.6.12",
5
+ "configSchema": {
6
+ "anyvaliVersion": "1.0",
7
+ "schemaVersion": "1.1",
8
+ "root": {
9
+ "kind": "object",
10
+ "properties": {
11
+ "level": {
12
+ "kind": "enum",
13
+ "values": [
14
+ "fatal",
15
+ "error",
16
+ "warn",
17
+ "info",
18
+ "debug",
19
+ "trace"
20
+ ],
21
+ "default": "info",
22
+ "metadata": {
23
+ "description": "Minimum Pino log level"
24
+ }
25
+ },
26
+ "prettyPrint": {
27
+ "kind": "object",
28
+ "properties": {
29
+ "enabled": {
30
+ "kind": "bool",
31
+ "default": false,
32
+ "metadata": {
33
+ "description": "Whether Pino pretty printing is enabled"
34
+ }
35
+ },
36
+ "colorize": {
37
+ "kind": "bool",
38
+ "default": true,
39
+ "metadata": {
40
+ "description": "Whether pretty-printed logs use terminal colors"
41
+ }
42
+ },
43
+ "translateTime": {
44
+ "kind": "string",
45
+ "default": "SYS:standard",
46
+ "metadata": {
47
+ "description": "Pino pretty time translation setting"
48
+ }
49
+ },
50
+ "ignore": {
51
+ "kind": "string",
52
+ "default": "pid,hostname",
53
+ "metadata": {
54
+ "description": "Comma-separated Pino fields omitted from pretty output"
55
+ }
56
+ }
57
+ },
58
+ "required": [
59
+ "enabled",
60
+ "colorize",
61
+ "translateTime",
62
+ "ignore"
63
+ ],
64
+ "unknownKeys": "strip",
65
+ "metadata": {
66
+ "description": "Pino pretty-print settings"
67
+ }
68
+ },
69
+ "transport": {
70
+ "kind": "object",
71
+ "properties": {
72
+ "enabled": {
73
+ "kind": "bool",
74
+ "default": false,
75
+ "metadata": {
76
+ "description": "Whether a Pino transport is enabled"
77
+ }
78
+ },
79
+ "target": {
80
+ "kind": "optional",
81
+ "inner": {
82
+ "kind": "string"
83
+ },
84
+ "metadata": {
85
+ "description": "Pino transport target module"
86
+ }
87
+ },
88
+ "options": {
89
+ "kind": "optional",
90
+ "inner": {
91
+ "kind": "record",
92
+ "valueSchema": {
93
+ "kind": "unknown"
94
+ }
95
+ },
96
+ "metadata": {
97
+ "description": "Options passed to the configured Pino transport"
98
+ }
99
+ }
100
+ },
101
+ "required": [
102
+ "enabled"
103
+ ],
104
+ "unknownKeys": "strip",
105
+ "metadata": {
106
+ "description": "Pino transport settings"
107
+ }
108
+ },
109
+ "serializers": {
110
+ "kind": "object",
111
+ "properties": {
112
+ "error": {
113
+ "kind": "bool",
114
+ "default": true,
115
+ "metadata": {
116
+ "description": "Whether Error objects use Pino's standard error serializer"
117
+ }
118
+ }
119
+ },
120
+ "required": [
121
+ "error"
122
+ ],
123
+ "unknownKeys": "strip",
124
+ "metadata": {
125
+ "description": "Pino serializer settings"
126
+ }
127
+ },
128
+ "base": {
129
+ "kind": "optional",
130
+ "inner": {
131
+ "kind": "record",
132
+ "valueSchema": {
133
+ "kind": "unknown"
134
+ }
135
+ },
136
+ "metadata": {
137
+ "description": "Base fields added to every Pino log entry"
138
+ }
139
+ },
140
+ "redact": {
141
+ "kind": "array",
142
+ "items": {
143
+ "kind": "string"
144
+ },
145
+ "default": [],
146
+ "metadata": {
147
+ "description": "Pino redaction paths for sensitive fields"
148
+ }
149
+ }
150
+ },
151
+ "required": [
152
+ "level",
153
+ "prettyPrint",
154
+ "transport",
155
+ "serializers",
156
+ "redact"
157
+ ],
158
+ "unknownKeys": "strip",
159
+ "metadata": {
160
+ "description": "Pino observable plugin configuration"
161
+ }
162
+ },
163
+ "definitions": {},
164
+ "extensions": {}
165
+ },
5
166
  "pluginType": "observable",
6
167
  "capabilities": {
7
168
  "logging": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "observable-pino",
3
3
  "name": "observable-pino",
4
- "version": "9.0.0",
4
+ "version": "9.6.12",
5
5
  "description": "Pino-based high-performance structured logging observable",
6
6
  "category": "observable",
7
7
  "tags": [
@@ -14,5 +14,172 @@
14
14
  "./docs/plugin.md"
15
15
  ],
16
16
  "dependencies": [],
17
- "image": "./observable-pino.png"
17
+ "author": {
18
+ "name": "BetterCorp (PTY) Ltd",
19
+ "email": "ninja@bettercorp.dev",
20
+ "url": "https://bettercorp.dev/"
21
+ },
22
+ "license": "(AGPL-3.0-only OR Commercial)",
23
+ "image": "./observable-pino.png",
24
+ "configSchema": {
25
+ "anyvaliVersion": "1.0",
26
+ "schemaVersion": "1.1",
27
+ "root": {
28
+ "kind": "object",
29
+ "properties": {
30
+ "level": {
31
+ "kind": "enum",
32
+ "values": [
33
+ "fatal",
34
+ "error",
35
+ "warn",
36
+ "info",
37
+ "debug",
38
+ "trace"
39
+ ],
40
+ "default": "info",
41
+ "metadata": {
42
+ "description": "Minimum Pino log level"
43
+ }
44
+ },
45
+ "prettyPrint": {
46
+ "kind": "object",
47
+ "properties": {
48
+ "enabled": {
49
+ "kind": "bool",
50
+ "default": false,
51
+ "metadata": {
52
+ "description": "Whether Pino pretty printing is enabled"
53
+ }
54
+ },
55
+ "colorize": {
56
+ "kind": "bool",
57
+ "default": true,
58
+ "metadata": {
59
+ "description": "Whether pretty-printed logs use terminal colors"
60
+ }
61
+ },
62
+ "translateTime": {
63
+ "kind": "string",
64
+ "default": "SYS:standard",
65
+ "metadata": {
66
+ "description": "Pino pretty time translation setting"
67
+ }
68
+ },
69
+ "ignore": {
70
+ "kind": "string",
71
+ "default": "pid,hostname",
72
+ "metadata": {
73
+ "description": "Comma-separated Pino fields omitted from pretty output"
74
+ }
75
+ }
76
+ },
77
+ "required": [
78
+ "enabled",
79
+ "colorize",
80
+ "translateTime",
81
+ "ignore"
82
+ ],
83
+ "unknownKeys": "strip",
84
+ "metadata": {
85
+ "description": "Pino pretty-print settings"
86
+ }
87
+ },
88
+ "transport": {
89
+ "kind": "object",
90
+ "properties": {
91
+ "enabled": {
92
+ "kind": "bool",
93
+ "default": false,
94
+ "metadata": {
95
+ "description": "Whether a Pino transport is enabled"
96
+ }
97
+ },
98
+ "target": {
99
+ "kind": "optional",
100
+ "inner": {
101
+ "kind": "string"
102
+ },
103
+ "metadata": {
104
+ "description": "Pino transport target module"
105
+ }
106
+ },
107
+ "options": {
108
+ "kind": "optional",
109
+ "inner": {
110
+ "kind": "record",
111
+ "valueSchema": {
112
+ "kind": "unknown"
113
+ }
114
+ },
115
+ "metadata": {
116
+ "description": "Options passed to the configured Pino transport"
117
+ }
118
+ }
119
+ },
120
+ "required": [
121
+ "enabled"
122
+ ],
123
+ "unknownKeys": "strip",
124
+ "metadata": {
125
+ "description": "Pino transport settings"
126
+ }
127
+ },
128
+ "serializers": {
129
+ "kind": "object",
130
+ "properties": {
131
+ "error": {
132
+ "kind": "bool",
133
+ "default": true,
134
+ "metadata": {
135
+ "description": "Whether Error objects use Pino's standard error serializer"
136
+ }
137
+ }
138
+ },
139
+ "required": [
140
+ "error"
141
+ ],
142
+ "unknownKeys": "strip",
143
+ "metadata": {
144
+ "description": "Pino serializer settings"
145
+ }
146
+ },
147
+ "base": {
148
+ "kind": "optional",
149
+ "inner": {
150
+ "kind": "record",
151
+ "valueSchema": {
152
+ "kind": "unknown"
153
+ }
154
+ },
155
+ "metadata": {
156
+ "description": "Base fields added to every Pino log entry"
157
+ }
158
+ },
159
+ "redact": {
160
+ "kind": "array",
161
+ "items": {
162
+ "kind": "string"
163
+ },
164
+ "default": [],
165
+ "metadata": {
166
+ "description": "Pino redaction paths for sensitive fields"
167
+ }
168
+ }
169
+ },
170
+ "required": [
171
+ "level",
172
+ "prettyPrint",
173
+ "transport",
174
+ "serializers",
175
+ "redact"
176
+ ],
177
+ "unknownKeys": "strip",
178
+ "metadata": {
179
+ "description": "Pino observable plugin configuration"
180
+ }
181
+ },
182
+ "definitions": {},
183
+ "extensions": {}
184
+ }
18
185
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bsb/observable-pino",
3
- "version": "9.1.2",
3
+ "version": "9.6.12",
4
4
  "type": "module",
5
5
  "license": "(AGPL-3.0-only OR Commercial)",
6
6
  "author": {
@@ -38,21 +38,21 @@
38
38
  "prepublishOnly": "npm run build"
39
39
  },
40
40
  "peerDependencies": {
41
- "@bsb/base": "^9.0.0"
41
+ "@bsb/base": "^9.6.12"
42
42
  },
43
43
  "dependencies": {
44
- "@anyvali/js": "^0.2.0",
44
+ "anyvali": "^1.0.6",
45
45
  "pino": "^9.6.0",
46
46
  "pino-pretty": "^13.0.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@bsb/base": "^9.0.0",
50
- "@types/node": "^25.0.0",
51
- "mocha": "^11.0.0",
52
- "typescript": "^5.9.0"
49
+ "@bsb/base": "^9.6.12",
50
+ "@types/node": "^25.6.0",
51
+ "mocha": "^11.7.6",
52
+ "typescript": "^6.0.3"
53
53
  },
54
54
  "engines": {
55
- "node": ">=23.0.0",
55
+ "node": ">=24.0.0",
56
56
  "npm": ">=11.0.0"
57
57
  },
58
58
  "homepage": "https://io.bsbcode.dev/packages/nodejs/@bsb/observable-pino"