@venizia/ignis-helpers 0.1.1-5 → 0.1.1-7
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/common/constants/http.d.ts +6 -6
- package/dist/common/constants/http.d.ts.map +1 -1
- package/dist/common/constants/http.js +9 -9
- package/dist/common/constants/http.js.map +1 -1
- package/dist/common/redact.d.ts.map +1 -1
- package/dist/common/redact.js +5 -15
- package/dist/common/redact.js.map +1 -1
- package/dist/common/types.d.ts.map +1 -1
- package/dist/common/types.js.map +1 -1
- package/dist/modules/error/index.d.ts +3 -6
- package/dist/modules/error/index.d.ts.map +1 -1
- package/dist/modules/error/index.js +2 -5
- package/dist/modules/error/index.js.map +1 -1
- package/dist/modules/error/types.d.ts +1 -5
- package/dist/modules/error/types.d.ts.map +1 -1
- package/dist/modules/error/types.js +1 -5
- package/dist/modules/error/types.js.map +1 -1
- package/dist/modules/logger/base/base.d.ts +1 -4
- package/dist/modules/logger/base/base.d.ts.map +1 -1
- package/dist/modules/logger/base/base.js +2 -6
- package/dist/modules/logger/base/base.js.map +1 -1
- package/dist/modules/logger/common/constants.d.ts +2 -9
- package/dist/modules/logger/common/constants.d.ts.map +1 -1
- package/dist/modules/logger/common/constants.js +3 -11
- package/dist/modules/logger/common/constants.js.map +1 -1
- package/dist/modules/logger/common/types.d.ts +1 -5
- package/dist/modules/logger/common/types.d.ts.map +1 -1
- package/dist/modules/logger/factory.d.ts.map +1 -1
- package/dist/modules/logger/factory.js +2 -7
- package/dist/modules/logger/factory.js.map +1 -1
- package/dist/modules/logger/formatting/deep-splat.d.ts +1 -5
- package/dist/modules/logger/formatting/deep-splat.d.ts.map +1 -1
- package/dist/modules/logger/formatting/deep-splat.js +4 -14
- package/dist/modules/logger/formatting/deep-splat.js.map +1 -1
- package/dist/modules/logger/formatting/error-prettier.d.ts +43 -0
- package/dist/modules/logger/formatting/error-prettier.d.ts.map +1 -0
- package/dist/modules/logger/formatting/error-prettier.js +151 -0
- package/dist/modules/logger/formatting/error-prettier.js.map +1 -0
- package/dist/modules/logger/formatting/index.d.ts +1 -0
- package/dist/modules/logger/formatting/index.d.ts.map +1 -1
- package/dist/modules/logger/formatting/index.js +1 -0
- package/dist/modules/logger/formatting/index.js.map +1 -1
- package/dist/modules/logger/hf/common/constants.d.ts +1 -2
- package/dist/modules/logger/hf/common/constants.d.ts.map +1 -1
- package/dist/modules/logger/hf/common/constants.js +1 -2
- package/dist/modules/logger/hf/common/constants.js.map +1 -1
- package/dist/modules/logger/hf/common/types.d.ts +1 -5
- package/dist/modules/logger/hf/common/types.d.ts.map +1 -1
- package/dist/modules/logger/hf/flusher.d.ts +1 -0
- package/dist/modules/logger/hf/flusher.d.ts.map +1 -1
- package/dist/modules/logger/hf/flusher.js +13 -11
- package/dist/modules/logger/hf/flusher.js.map +1 -1
- package/dist/modules/logger/hf/logger.d.ts +2 -4
- package/dist/modules/logger/hf/logger.d.ts.map +1 -1
- package/dist/modules/logger/hf/logger.js +16 -14
- package/dist/modules/logger/hf/logger.js.map +1 -1
- package/dist/modules/logger/hf/ring.d.ts.map +1 -1
- package/dist/modules/logger/hf/ring.js +1 -4
- package/dist/modules/logger/hf/ring.js.map +1 -1
- package/dist/modules/logger/pino/common/types.d.ts +1 -4
- package/dist/modules/logger/pino/common/types.d.ts.map +1 -1
- package/dist/modules/logger/pino/define.d.ts +8 -35
- package/dist/modules/logger/pino/define.d.ts.map +1 -1
- package/dist/modules/logger/pino/define.js +25 -55
- package/dist/modules/logger/pino/define.js.map +1 -1
- package/dist/modules/logger/pino/index.d.ts +1 -4
- package/dist/modules/logger/pino/index.d.ts.map +1 -1
- package/dist/modules/logger/pino/index.js +1 -4
- package/dist/modules/logger/pino/index.js.map +1 -1
- package/dist/modules/logger/pino/logger.d.ts +2 -9
- package/dist/modules/logger/pino/logger.d.ts.map +1 -1
- package/dist/modules/logger/pino/logger.js +2 -9
- package/dist/modules/logger/pino/logger.js.map +1 -1
- package/dist/modules/logger/winston/common/types.d.ts +1 -4
- package/dist/modules/logger/winston/common/types.d.ts.map +1 -1
- package/dist/modules/logger/winston/define.d.ts +1 -4
- package/dist/modules/logger/winston/define.d.ts.map +1 -1
- package/dist/modules/logger/winston/define.js +3 -11
- package/dist/modules/logger/winston/define.js.map +1 -1
- package/dist/modules/logger/winston/formatters/deep-splat.d.ts +1 -4
- package/dist/modules/logger/winston/formatters/deep-splat.d.ts.map +1 -1
- package/dist/modules/logger/winston/formatters/deep-splat.js +1 -4
- package/dist/modules/logger/winston/formatters/deep-splat.js.map +1 -1
- package/dist/modules/logger/winston/logger.d.ts +1 -4
- package/dist/modules/logger/winston/logger.d.ts.map +1 -1
- package/dist/modules/logger/winston/logger.js +1 -4
- package/dist/modules/logger/winston/logger.js.map +1 -1
- package/dist/modules/logger/winston/transports/dgram.transport.d.ts.map +1 -1
- package/dist/modules/logger/winston/transports/dgram.transport.js +1 -3
- package/dist/modules/logger/winston/transports/dgram.transport.js.map +1 -1
- package/dist/modules/network/http-request/fetcher/index.js +1 -3
- package/dist/modules/network/http-request/fetcher/index.js.map +1 -1
- package/dist/modules/network/http-request/fetcher/node-fetcher.d.ts.map +1 -1
- package/dist/modules/network/http-request/fetcher/node-fetcher.js +2 -5
- package/dist/modules/network/http-request/fetcher/node-fetcher.js.map +1 -1
- package/dist/modules/network/tcp-socket/base-tcp-client.helper.d.ts.map +1 -1
- package/dist/modules/network/tcp-socket/base-tcp-client.helper.js +1 -2
- package/dist/modules/network/tcp-socket/base-tcp-client.helper.js.map +1 -1
- package/dist/modules/network/tcp-socket/base-tcp-server.helper.d.ts.map +1 -1
- package/dist/modules/network/tcp-socket/base-tcp-server.helper.js +4 -9
- package/dist/modules/network/tcp-socket/base-tcp-server.helper.js.map +1 -1
- package/dist/modules/network/udp-socket/network-udp-client.helper.d.ts.map +1 -1
- package/dist/modules/network/udp-socket/network-udp-client.helper.js +1 -2
- package/dist/modules/network/udp-socket/network-udp-client.helper.js.map +1 -1
- package/dist/modules/pool/abstract.d.ts +1 -5
- package/dist/modules/pool/abstract.d.ts.map +1 -1
- package/dist/modules/pool/abstract.js +5 -16
- package/dist/modules/pool/abstract.js.map +1 -1
- package/dist/modules/pool/base.d.ts +1 -4
- package/dist/modules/pool/base.d.ts.map +1 -1
- package/dist/modules/pool/base.js +1 -4
- package/dist/modules/pool/base.js.map +1 -1
- package/dist/modules/pool/types.d.ts +1 -4
- package/dist/modules/pool/types.d.ts.map +1 -1
- package/dist/modules/queue/bullmq/helper.d.ts.map +1 -1
- package/dist/modules/queue/bullmq/helper.js +3 -6
- package/dist/modules/queue/bullmq/helper.js.map +1 -1
- package/dist/modules/queue/common/hook.d.ts +1 -5
- package/dist/modules/queue/common/hook.d.ts.map +1 -1
- package/dist/modules/queue/common/hook.js +1 -5
- package/dist/modules/queue/common/hook.js.map +1 -1
- package/dist/modules/queue/internal/hf/helper.d.ts +1 -5
- package/dist/modules/queue/internal/hf/helper.d.ts.map +1 -1
- package/dist/modules/queue/internal/hf/helper.js +1 -5
- package/dist/modules/queue/internal/hf/helper.js.map +1 -1
- package/dist/modules/queue/internal/hf/types.d.ts +1 -4
- package/dist/modules/queue/internal/hf/types.d.ts.map +1 -1
- package/dist/modules/queue/internal/sequential/helper.d.ts +1 -4
- package/dist/modules/queue/internal/sequential/helper.d.ts.map +1 -1
- package/dist/modules/queue/internal/sequential/helper.js +1 -3
- package/dist/modules/queue/internal/sequential/helper.js.map +1 -1
- package/dist/modules/queue/kafka/admin.d.ts +1 -4
- package/dist/modules/queue/kafka/admin.d.ts.map +1 -1
- package/dist/modules/queue/kafka/admin.js +1 -4
- package/dist/modules/queue/kafka/admin.js.map +1 -1
- package/dist/modules/queue/kafka/base.d.ts +2 -8
- package/dist/modules/queue/kafka/base.d.ts.map +1 -1
- package/dist/modules/queue/kafka/base.js +3 -10
- package/dist/modules/queue/kafka/base.js.map +1 -1
- package/dist/modules/queue/kafka/bundler/platformatic-wasm.plugin.d.ts +1 -5
- package/dist/modules/queue/kafka/bundler/platformatic-wasm.plugin.d.ts.map +1 -1
- package/dist/modules/queue/kafka/bundler/platformatic-wasm.plugin.js +1 -5
- package/dist/modules/queue/kafka/bundler/platformatic-wasm.plugin.js.map +1 -1
- package/dist/modules/queue/kafka/consumer.d.ts +1 -4
- package/dist/modules/queue/kafka/consumer.d.ts.map +1 -1
- package/dist/modules/queue/kafka/consumer.js +3 -10
- package/dist/modules/queue/kafka/consumer.js.map +1 -1
- package/dist/modules/queue/kafka/producer.d.ts +1 -5
- package/dist/modules/queue/kafka/producer.d.ts.map +1 -1
- package/dist/modules/queue/kafka/producer.js +1 -5
- package/dist/modules/queue/kafka/producer.js.map +1 -1
- package/dist/modules/queue/kafka/schema/registry.d.ts +1 -4
- package/dist/modules/queue/kafka/schema/registry.d.ts.map +1 -1
- package/dist/modules/queue/kafka/schema/registry.js +1 -4
- package/dist/modules/queue/kafka/schema/registry.js.map +1 -1
- package/dist/modules/queue/mqtt/helper.d.ts +1 -4
- package/dist/modules/queue/mqtt/helper.d.ts.map +1 -1
- package/dist/modules/queue/mqtt/helper.js +1 -4
- package/dist/modules/queue/mqtt/helper.js.map +1 -1
- package/dist/modules/redis/base/abstract.helper.d.ts.map +1 -1
- package/dist/modules/redis/base/abstract.helper.js +9 -27
- package/dist/modules/redis/base/abstract.helper.js.map +1 -1
- package/dist/modules/redis/sentinel/sentinel.helper.d.ts.map +1 -1
- package/dist/modules/redis/sentinel/sentinel.helper.js +1 -3
- package/dist/modules/redis/sentinel/sentinel.helper.js.map +1 -1
- package/dist/modules/secrets/base/abstract.helper.d.ts.map +1 -1
- package/dist/modules/secrets/base/abstract.helper.js +20 -23
- package/dist/modules/secrets/base/abstract.helper.js.map +1 -1
- package/dist/modules/secrets/dotenv/dotenv.helper.js +1 -1
- package/dist/modules/secrets/dotenv/dotenv.helper.js.map +1 -1
- package/dist/modules/secrets/factory.d.ts.map +1 -1
- package/dist/modules/secrets/factory.js +3 -5
- package/dist/modules/secrets/factory.js.map +1 -1
- package/dist/modules/secrets/hashicorp/hashicorp.helper.d.ts.map +1 -1
- package/dist/modules/secrets/hashicorp/hashicorp.helper.js +1 -1
- package/dist/modules/secrets/hashicorp/hashicorp.helper.js.map +1 -1
- package/dist/modules/secrets/index.js +1 -2
- package/dist/modules/secrets/index.js.map +1 -1
- package/dist/modules/socket/socket-io/client/helper.d.ts.map +1 -1
- package/dist/modules/socket/socket-io/client/helper.js +1 -2
- package/dist/modules/socket/socket-io/client/helper.js.map +1 -1
- package/dist/modules/socket/socket-io/server/helper.d.ts.map +1 -1
- package/dist/modules/socket/socket-io/server/helper.js +2 -4
- package/dist/modules/socket/socket-io/server/helper.js.map +1 -1
- package/dist/modules/socket/websocket/common/types.d.ts +1 -1
- package/dist/modules/socket/websocket/server/helper.d.ts +2 -0
- package/dist/modules/socket/websocket/server/helper.d.ts.map +1 -1
- package/dist/modules/socket/websocket/server/helper.js +43 -35
- package/dist/modules/socket/websocket/server/helper.js.map +1 -1
- package/dist/modules/storage/base.d.ts +1 -0
- package/dist/modules/storage/base.d.ts.map +1 -1
- package/dist/modules/storage/base.js +24 -25
- package/dist/modules/storage/base.js.map +1 -1
- package/dist/modules/storage/bun-s3/helper.d.ts.map +1 -1
- package/dist/modules/storage/bun-s3/helper.js +16 -1
- package/dist/modules/storage/bun-s3/helper.js.map +1 -1
- package/dist/modules/storage/disk/helper.d.ts.map +1 -1
- package/dist/modules/storage/disk/helper.js +25 -18
- package/dist/modules/storage/disk/helper.js.map +1 -1
- package/dist/modules/worker-thread/worker-pool.d.ts.map +1 -1
- package/dist/modules/worker-thread/worker-pool.js +1 -2
- package/dist/modules/worker-thread/worker-pool.js.map +1 -1
- package/dist/utilities/module.utility.d.ts +19 -14
- package/dist/utilities/module.utility.d.ts.map +1 -1
- package/dist/utilities/module.utility.js +42 -30
- package/dist/utilities/module.utility.js.map +1 -1
- package/dist/utilities/parse.utility.d.ts +1 -2
- package/dist/utilities/parse.utility.d.ts.map +1 -1
- package/dist/utilities/parse.utility.js +2 -4
- package/dist/utilities/parse.utility.js.map +1 -1
- package/dist/utilities/request.utility.d.ts.map +1 -1
- package/dist/utilities/request.utility.js +1 -2
- package/dist/utilities/request.utility.js.map +1 -1
- package/dist/utilities/retry.utility.d.ts +2 -8
- package/dist/utilities/retry.utility.d.ts.map +1 -1
- package/dist/utilities/retry.utility.js +62 -46
- package/dist/utilities/retry.utility.js.map +1 -1
- package/package.json +5 -4
|
@@ -99,15 +99,15 @@ export declare class HTTP {
|
|
|
99
99
|
readonly HTTP: "http";
|
|
100
100
|
readonly HTTPS: "https";
|
|
101
101
|
};
|
|
102
|
-
/** HTTP status codes grouped by class (1xx
|
|
102
|
+
/** HTTP status codes grouped by class (1xx - 5xx). */
|
|
103
103
|
static readonly ResultCodes: {
|
|
104
|
-
/** 1xx
|
|
104
|
+
/** 1xx - Informational. */
|
|
105
105
|
readonly RS_1: {
|
|
106
106
|
readonly Continue: 100;
|
|
107
107
|
readonly SwitchingProtocols: 101;
|
|
108
108
|
readonly EarlyHints: 103;
|
|
109
109
|
};
|
|
110
|
-
/** 2xx
|
|
110
|
+
/** 2xx - Success. */
|
|
111
111
|
readonly RS_2: {
|
|
112
112
|
readonly Ok: 200;
|
|
113
113
|
readonly Created: 201;
|
|
@@ -118,7 +118,7 @@ export declare class HTTP {
|
|
|
118
118
|
readonly PartialContent: 206;
|
|
119
119
|
readonly MultiStatus: 207;
|
|
120
120
|
};
|
|
121
|
-
/** 3xx
|
|
121
|
+
/** 3xx - Redirection. */
|
|
122
122
|
readonly RS_3: {
|
|
123
123
|
readonly MovedPermanently: 301;
|
|
124
124
|
readonly Found: 302;
|
|
@@ -126,7 +126,7 @@ export declare class HTTP {
|
|
|
126
126
|
readonly TemporaryRedirect: 307;
|
|
127
127
|
readonly PermanentRedirect: 308;
|
|
128
128
|
};
|
|
129
|
-
/** 4xx
|
|
129
|
+
/** 4xx - Client error. */
|
|
130
130
|
readonly RS_4: {
|
|
131
131
|
readonly BadRequest: 400;
|
|
132
132
|
readonly Unauthorized: 401;
|
|
@@ -155,7 +155,7 @@ export declare class HTTP {
|
|
|
155
155
|
readonly RequestHeaderFieldsTooLarge: 431;
|
|
156
156
|
readonly UnavailableForLegalReasons: 451;
|
|
157
157
|
};
|
|
158
|
-
/** 5xx
|
|
158
|
+
/** 5xx - Server error. */
|
|
159
159
|
readonly RS_5: {
|
|
160
160
|
readonly InternalServerError: 500;
|
|
161
161
|
readonly NotImplemented: 501;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/common/constants/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,qBAAa,IAAI;IACf,0EAA0E;IAC1E,MAAM,CAAC,QAAQ,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAuEZ;IAEX,yCAAyC;IACzC,MAAM,CAAC,QAAQ,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;MAgCjB;IAEX,yCAAyC;IACzC,MAAM,CAAC,QAAQ,CAAC,OAAO;;;;;;;;;MASZ;IAEX,2CAA2C;IAC3C,MAAM,CAAC,QAAQ,CAAC,SAAS;;;MAGd;IAEX,
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/common/constants/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,qBAAa,IAAI;IACf,0EAA0E;IAC1E,MAAM,CAAC,QAAQ,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAuEZ;IAEX,yCAAyC;IACzC,MAAM,CAAC,QAAQ,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;MAgCjB;IAEX,yCAAyC;IACzC,MAAM,CAAC,QAAQ,CAAC,OAAO;;;;;;;;;MASZ;IAEX,2CAA2C;IAC3C,MAAM,CAAC,QAAQ,CAAC,SAAS;;;MAGd;IAEX,sDAAsD;IACtD,MAAM,CAAC,QAAQ,CAAC,WAAW;QACzB,2BAA2B;;;;;;QAO3B,qBAAqB;;;;;;;;;;;QAYrB,yBAAyB;;;;;;;;QASzB,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA8B1B,0BAA0B;;;;;;;;;;;;MAYjB;CACZ;AAED,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;AACjG,MAAM,MAAM,aAAa,GACvB,OAAO,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;AAC7E,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC"}
|
|
@@ -11,7 +11,7 @@ class HTTP {
|
|
|
11
11
|
CONTENT_TYPE: 'content-type',
|
|
12
12
|
CONTENT_RANGE: 'content-range',
|
|
13
13
|
CONTENT_SECURITY_POLICY: 'content-security-policy',
|
|
14
|
-
// Request
|
|
14
|
+
// Request - content negotiation & conditionals
|
|
15
15
|
ACCEPT: 'accept',
|
|
16
16
|
ACCEPT_ENCODING: 'accept-encoding',
|
|
17
17
|
ACCEPT_LANGUAGE: 'accept-language',
|
|
@@ -23,7 +23,7 @@ class HTTP {
|
|
|
23
23
|
ORIGIN: 'origin',
|
|
24
24
|
REFERER: 'referer',
|
|
25
25
|
USER_AGENT: 'user-agent',
|
|
26
|
-
// Response
|
|
26
|
+
// Response - caching, auth challenges & redirects
|
|
27
27
|
ALLOW: 'allow',
|
|
28
28
|
CACHE_CONTROL: 'cache-control',
|
|
29
29
|
ETAG: 'etag',
|
|
@@ -59,7 +59,7 @@ class HTTP {
|
|
|
59
59
|
X_RATELIMIT_LIMIT: 'x-ratelimit-limit',
|
|
60
60
|
X_RATELIMIT_REMAINING: 'x-ratelimit-remaining',
|
|
61
61
|
X_RATELIMIT_RESET: 'x-ratelimit-reset',
|
|
62
|
-
//
|
|
62
|
+
// IGNIS custom
|
|
63
63
|
REQUEST_TRACING_ID: 'x-request-id',
|
|
64
64
|
REQUEST_DEVICE_INFO: 'x-device-info',
|
|
65
65
|
REQUEST_CHANNEL: 'x-request-channel',
|
|
@@ -114,15 +114,15 @@ class HTTP {
|
|
|
114
114
|
HTTP: 'http',
|
|
115
115
|
HTTPS: 'https',
|
|
116
116
|
}; }
|
|
117
|
-
/** HTTP status codes grouped by class (1xx
|
|
117
|
+
/** HTTP status codes grouped by class (1xx - 5xx). */
|
|
118
118
|
static { this.ResultCodes = {
|
|
119
|
-
/** 1xx
|
|
119
|
+
/** 1xx - Informational. */
|
|
120
120
|
RS_1: {
|
|
121
121
|
Continue: 100,
|
|
122
122
|
SwitchingProtocols: 101,
|
|
123
123
|
EarlyHints: 103,
|
|
124
124
|
},
|
|
125
|
-
/** 2xx
|
|
125
|
+
/** 2xx - Success. */
|
|
126
126
|
RS_2: {
|
|
127
127
|
Ok: 200,
|
|
128
128
|
Created: 201,
|
|
@@ -133,7 +133,7 @@ class HTTP {
|
|
|
133
133
|
PartialContent: 206,
|
|
134
134
|
MultiStatus: 207,
|
|
135
135
|
},
|
|
136
|
-
/** 3xx
|
|
136
|
+
/** 3xx - Redirection. */
|
|
137
137
|
RS_3: {
|
|
138
138
|
MovedPermanently: 301,
|
|
139
139
|
Found: 302,
|
|
@@ -141,7 +141,7 @@ class HTTP {
|
|
|
141
141
|
TemporaryRedirect: 307,
|
|
142
142
|
PermanentRedirect: 308,
|
|
143
143
|
},
|
|
144
|
-
/** 4xx
|
|
144
|
+
/** 4xx - Client error. */
|
|
145
145
|
RS_4: {
|
|
146
146
|
BadRequest: 400,
|
|
147
147
|
Unauthorized: 401,
|
|
@@ -170,7 +170,7 @@ class HTTP {
|
|
|
170
170
|
RequestHeaderFieldsTooLarge: 431,
|
|
171
171
|
UnavailableForLegalReasons: 451,
|
|
172
172
|
},
|
|
173
|
-
/** 5xx
|
|
173
|
+
/** 5xx - Server error. */
|
|
174
174
|
RS_5: {
|
|
175
175
|
InternalServerError: 500,
|
|
176
176
|
NotImplemented: 501,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../../src/common/constants/http.ts"],"names":[],"mappings":";;;AAEA,MAAa,IAAI;IACf,0EAA0E;aAC1D,YAAO,GAAG;QACxB,UAAU;QACV,mBAAmB,EAAE,qBAAqB;QAC1C,gBAAgB,EAAE,kBAAkB;QACpC,cAAc,EAAE,gBAAgB;QAChC,YAAY,EAAE,cAAc;QAC5B,aAAa,EAAE,eAAe;QAC9B,uBAAuB,EAAE,yBAAyB;QAElD,+CAA+C;QAC/C,MAAM,EAAE,QAAQ;QAChB,eAAe,EAAE,iBAAiB;QAClC,eAAe,EAAE,iBAAiB;QAClC,aAAa,EAAE,eAAe;QAC9B,MAAM,EAAE,QAAQ;QAChB,IAAI,EAAE,MAAM;QACZ,iBAAiB,EAAE,mBAAmB;QACtC,aAAa,EAAE,eAAe;QAC9B,MAAM,EAAE,QAAQ;QAChB,OAAO,EAAE,SAAS;QAClB,UAAU,EAAE,YAAY;QAExB,kDAAkD;QAClD,KAAK,EAAE,OAAO;QACd,aAAa,EAAE,eAAe;QAC9B,IAAI,EAAE,MAAM;QACZ,aAAa,EAAE,eAAe;QAC9B,QAAQ,EAAE,UAAU;QACpB,WAAW,EAAE,aAAa;QAC1B,UAAU,EAAE,YAAY;QACxB,IAAI,EAAE,MAAM;QACZ,gBAAgB,EAAE,kBAAkB;QAEpC,+BAA+B;QAC/B,gCAAgC,EAAE,kCAAkC;QACpE,4BAA4B,EAAE,8BAA8B;QAC5D,4BAA4B,EAAE,8BAA8B;QAC5D,2BAA2B,EAAE,6BAA6B;QAC1D,6BAA6B,EAAE,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|
1
|
+
{"version":3,"file":"redact.d.ts","sourceRoot":"","sources":["../../src/common/redact.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,QAAQ,eAAe,CAAC;AAuDrC,mLAAmL;AACnL,eAAO,MAAM,aAAa,GAAI,OAAO,OAAO,EAAE,OAAO,OAAO,CAAC,MAAM,CAAC,KAAG,OAMtE,CAAC;AAEF,sPAAsP;AACtP,eAAO,MAAM,oBAAoB,GAAI,KAAK,MAAM,KAAG,MAmBlD,CAAC"}
|
package/dist/common/redact.js
CHANGED
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.redactUrlCredentials = exports.redactSecrets = exports.REDACTED = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Keys whose VALUES must never reach a log line - matched case-insensitively on the key name, at any depth.
|
|
6
|
-
*/
|
|
4
|
+
/** Keys whose VALUES must never reach a log line - matched case-insensitively on the key name, at any depth. */
|
|
7
5
|
const SECRET_KEY_PATTERN = new RegExp([
|
|
8
6
|
// Options-object spellings (camelCase / snake_case).
|
|
9
7
|
'^(pass|password|passphrase|secret|token|apiKey|api_key|accessKey|access_key',
|
|
10
8
|
'|secretKey|secret_key|privateKey|private_key|key|cert|ca|pfx|credentials',
|
|
11
9
|
'|authorization|auth|jwtSecret|applicationSecret|connectionString)$',
|
|
12
|
-
// Vault wire spellings (snake_case)
|
|
13
|
-
// exact keys; `secret_id`/`role_id` are the AppRole credential pair and `client_token` is the
|
|
14
|
-
// minted session token. None are matched by the anchored options list above.
|
|
10
|
+
// Vault wire spellings (snake_case): node-vault's AppRole login/response bodies carry these exact keys, and none are matched by the anchored options list above.
|
|
15
11
|
'|^(client_token|secret_id|role_id)$',
|
|
16
|
-
// Any `*_token` (snake_case) or `*Token` (camelCase) key
|
|
17
|
-
// vaultToken, ... A preceding character is required so the bare word `token` (already covered
|
|
18
|
-
// above) is not the whole match, and so ordinary words are not swallowed.
|
|
12
|
+
// Any `*_token` (snake_case) or `*Token` (camelCase) key; a preceding character is required so the bare word `token` (already covered above) is not the whole match, and so ordinary words are not swallowed.
|
|
19
13
|
'|_token$|[a-z0-9]token$',
|
|
20
|
-
// HTTP HEADER spellings
|
|
21
|
-
// kebab-case and often `x-`-prefixed - none of which the camelCase list above matches. `vault`
|
|
22
|
-
// is included so `X-Vault-Token` (node-vault's auth header) is caught.
|
|
14
|
+
// HTTP HEADER spellings: header names are kebab-case and often `x-`-prefixed, none of which the camelCase list above matches; `vault` is included so `X-Vault-Token` (node-vault's auth header) is caught.
|
|
23
15
|
'|^(x-)?(api|auth|access|secret|session|csrf|xsrf|vault)-(key|token|secret|id)$',
|
|
24
16
|
'|^(cookie|set-cookie|proxy-authorization|www-authenticate)$',
|
|
25
17
|
].join(''), 'i');
|
|
@@ -34,9 +26,7 @@ const deepRedactSecrets = (value, seen) => {
|
|
|
34
26
|
return '[Circular]';
|
|
35
27
|
}
|
|
36
28
|
seen.add(value);
|
|
37
|
-
// Error keeps name/message/stack NON-enumerable, so Object.keys() skips them and naive redaction
|
|
38
|
-
// would drop the message. Reproject into a plain object carrying those fields plus its redacted
|
|
39
|
-
// enumerable own-props (nested X-Vault-Token/secret_id become [REDACTED]).
|
|
29
|
+
// Error keeps name/message/stack NON-enumerable, so Object.keys() skips them and naive redaction would drop the message - reproject into a plain object carrying those fields plus its redacted enumerable own-props.
|
|
40
30
|
if (value instanceof Error) {
|
|
41
31
|
const source = value;
|
|
42
32
|
const result = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redact.js","sourceRoot":"","sources":["../../src/common/redact.ts"],"names":[],"mappings":";;;AAEA
|
|
1
|
+
{"version":3,"file":"redact.js","sourceRoot":"","sources":["../../src/common/redact.ts"],"names":[],"mappings":";;;AAEA,gHAAgH;AAChH,MAAM,kBAAkB,GAAG,IAAI,MAAM,CACnC;IACE,qDAAqD;IACrD,6EAA6E;IAC7E,0EAA0E;IAC1E,oEA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C,GAAG,CAAC,CAAC;IACxB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,GAAG,CAAC;IACb,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;QACrB,OAAO,GAAG,CAAC;IACb,CAAC;IAED,MAAM,CAAC,QAAQ,GAAG,gBAAQ,CAAC;IAC3B,OAAO,kBAAkB,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC/C,CAAC,CAAC;AAnBW,QAAA,oBAAoB,wBAmB/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/common/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/common/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAGnD,OAAO,EAAE,OAAO,EAAE,CAAC;AAEnB,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC;AAEhD,MAAM,MAAM,OAAO,GAAG,GAAG,CAAC;AAC1B,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,CAAC,CAAC;AAE9D,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,MAAM,GAAG,EAAE,IAAI,CAAC,CAAC;AAEhD,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAC/C,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAEpC,MAAM,MAAM,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,OAAO,CA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;QAAC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG,CAAA;KAAE,GACnE,MAAM,EAAE,GACR,CAAC,SAAS;QACN,IAAI,EAAE,CAAC,CAAC;QACR,IAAI,EAAE,SAAS,CAAC;QAChB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG,CAAC;KAC/B,GACD,MAAM,EAAE,GACR,KAAK;CAClB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE;IAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,KAAK,CAAC,CAAC;AAExE,MAAM,WAAW,aAAa,CAAC,OAAO,SAAS,MAAM,GAAG,GAAG,EAAE,MAAM,GAAG,GAAG;IACvE,SAAS,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;CACnD;AAED,YAAY,EAAE,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/common/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/common/types.ts"],"names":[],"mappings":";;;AAAA,8DAAmD;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/common/types.ts"],"names":[],"mappings":";;;AAAA,8DAAmD;AAG1C,wFAHA,yBAAO,OAGA;AAkChB,wEAAwE;AACjE,MAAM,YAAY,GAAG,CAAI,eAAoC,EAAK,EAAE;IACzE,IAAI,OAAO,eAAe,KAAK,UAAU,EAAE,CAAC;QAC1C,OAAO,eAAe,CAAC;IACzB,CAAC;IAED,IAAI,IAAA,yBAAO,EAAC,eAAe,CAAC,EAAE,CAAC;QAC7B,OAAO,eAAoB,CAAC;IAC9B,CAAC;IAED,OAAQ,eAAgC,EAAE,CAAC;AAC7C,CAAC,CAAC;AAVW,QAAA,YAAY,gBAUvB;AAEF,qCAAqC;AAC9B,MAAM,iBAAiB,GAAG,KAAK,EACpC,eAAyC,EAC7B,EAAE;IACd,IAAI,OAAO,eAAe,KAAK,UAAU,EAAE,CAAC;QAC1C,OAAO,eAAe,CAAC;IACzB,CAAC;IAED,IAAI,IAAA,yBAAO,EAAC,eAAe,CAAC,EAAE,CAAC;QAC7B,OAAO,eAAoB,CAAC;IAC9B,CAAC;IAED,OAAQ,eAAqC,EAAE,CAAC;AAClD,CAAC,CAAC;AAZW,QAAA,iBAAiB,qBAY5B;AAEF,6EAA6E;AACtE,MAAM,YAAY,GAAG,CAC1B,GAA8C,EAC1B,EAAE;IACtB,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC5B,OAAO,GAAG,CAAC;IACb,CAAC;IAED,OAAO,IAAA,oBAAY,EAAC,GAAG,CAAC,CAAC;AAC3B,CAAC,CAAC;AARW,QAAA,YAAY,gBAQvB"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
* Re-exported by NAME, not `export *`, to keep inversion's DI container off the helpers surface.
|
|
4
|
-
* Augment `IErrorKeyRegistry` via whichever module the file imports - see `registry-augmentation.test.ts`.
|
|
5
|
-
*/
|
|
1
|
+
/** Error layer lives in `@venizia/ignis-inversion` so browser apps (DI-only, no helpers) share the same class; re-exported by NAME, not `export *`, to keep inversion's DI container off the helpers surface. */
|
|
2
|
+
/** Augment `IErrorKeyRegistry` via whichever module the file imports - see `registry-augmentation.test.ts`. */
|
|
6
3
|
export { ApplicationError, ErrorScopes, fromError, getError, isApplicationError, MessageCode, } from '@venizia/ignis-inversion';
|
|
7
|
-
export type { IErrorKeyRegistry, TError, TErrorByDefinition, TErrorByField, TErrorDefinition, TErrorDefinitionMessage, TErrorKey, TErrorMessage, TErrorMessageInput, TErrorMessageOverride, TErrorNormalized, TErrorNormalizeTransformFn, TErrorScope, TRegisterErrors, TResponsedError, } from '@venizia/ignis-inversion';
|
|
4
|
+
export type { IErrorKeyRegistry, TError, TErrorByDefinition, TErrorByField, TErrorDefinition, TErrorDefinitionMessage, TErrorKey, TErrorLogLevel, TErrorMessage, TErrorMessageInput, TErrorMessageOverride, TErrorNormalized, TErrorNormalizeTransformFn, TErrorScope, TRegisterErrors, TResponsedError, } from '@venizia/ignis-inversion';
|
|
8
5
|
export * from './types';
|
|
9
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/error/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/error/index.ts"],"names":[],"mappings":"AAAA,iNAAiN;AACjN,+GAA+G;AAC/G,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,WAAW,GACZ,MAAM,0BAA0B,CAAC;AAElC,YAAY,EACV,iBAAiB,EACjB,MAAM,EACN,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,uBAAuB,EACvB,SAAS,EACT,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,0BAA0B,EAC1B,WAAW,EACX,eAAe,EACf,eAAe,GAChB,MAAM,0BAA0B,CAAC;AAElC,cAAc,SAAS,CAAC"}
|
|
@@ -15,11 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.MessageCode = exports.isApplicationError = exports.getError = exports.fromError = exports.ErrorScopes = exports.ApplicationError = void 0;
|
|
18
|
-
/**
|
|
19
|
-
|
|
20
|
-
* Re-exported by NAME, not `export *`, to keep inversion's DI container off the helpers surface.
|
|
21
|
-
* Augment `IErrorKeyRegistry` via whichever module the file imports - see `registry-augmentation.test.ts`.
|
|
22
|
-
*/
|
|
18
|
+
/** Error layer lives in `@venizia/ignis-inversion` so browser apps (DI-only, no helpers) share the same class; re-exported by NAME, not `export *`, to keep inversion's DI container off the helpers surface. */
|
|
19
|
+
/** Augment `IErrorKeyRegistry` via whichever module the file imports - see `registry-augmentation.test.ts`. */
|
|
23
20
|
var ignis_inversion_1 = require("@venizia/ignis-inversion");
|
|
24
21
|
Object.defineProperty(exports, "ApplicationError", { enumerable: true, get: function () { return ignis_inversion_1.ApplicationError; } });
|
|
25
22
|
Object.defineProperty(exports, "ErrorScopes", { enumerable: true, get: function () { return ignis_inversion_1.ErrorScopes; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/error/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/error/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,iNAAiN;AACjN,+GAA+G;AAC/G,4DAOkC;AANhC,mHAAA,gBAAgB,OAAA;AAChB,8GAAA,WAAW,OAAA;AACX,4GAAA,SAAS,OAAA;AACT,2GAAA,QAAQ,OAAA;AACR,qHAAA,kBAAkB,OAAA;AAClB,8GAAA,WAAW,OAAA;AAsBb,0CAAwB"}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { z } from '@hono/zod-openapi';
|
|
2
|
-
/**
|
|
3
|
-
* The error RESPONSE for OpenAPI docs - NOT the input to `getError` (that union, with no index
|
|
4
|
-
* signature, lives in `@venizia/ignis-inversion`). Kept here because it needs `@hono/zod-openapi`,
|
|
5
|
-
* which inversion must not depend on since it ships to browsers.
|
|
6
|
-
*/
|
|
2
|
+
/** The error RESPONSE for OpenAPI docs, NOT the input to `getError` (that union, with no index signature, lives in `@venizia/ignis-inversion`); kept here because it needs `@hono/zod-openapi`, which inversion must not depend on since it ships to browsers. */
|
|
7
3
|
export declare const ErrorSchema: z.ZodObject<{
|
|
8
4
|
statusCode: z.ZodOptional<z.ZodNumber>;
|
|
9
5
|
message: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/error/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAEtC
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/error/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAEtC,kQAAkQ;AAClQ,eAAO,MAAM,WAAW;;;;;;;;;;;iBA6BpB,CAAC;AAEL,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
|
@@ -2,11 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ErrorSchema = void 0;
|
|
4
4
|
const zod_openapi_1 = require("@hono/zod-openapi");
|
|
5
|
-
/**
|
|
6
|
-
* The error RESPONSE for OpenAPI docs - NOT the input to `getError` (that union, with no index
|
|
7
|
-
* signature, lives in `@venizia/ignis-inversion`). Kept here because it needs `@hono/zod-openapi`,
|
|
8
|
-
* which inversion must not depend on since it ships to browsers.
|
|
9
|
-
*/
|
|
5
|
+
/** The error RESPONSE for OpenAPI docs, NOT the input to `getError` (that union, with no index signature, lives in `@venizia/ignis-inversion`); kept here because it needs `@hono/zod-openapi`, which inversion must not depend on since it ships to browsers. */
|
|
10
6
|
exports.ErrorSchema = zod_openapi_1.z
|
|
11
7
|
.object({
|
|
12
8
|
statusCode: zod_openapi_1.z.number().optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modules/error/types.ts"],"names":[],"mappings":";;;AAAA,mDAAsC;AAEtC
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modules/error/types.ts"],"names":[],"mappings":";;;AA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ogger, TLogLevel } from '../common';
|
|
3
3
|
import { AbstractLogger } from './abstract';
|
|
4
|
-
/**
|
|
5
|
-
* Provider-independent plumbing: scope, prefix, DEBUG gate, for(). Every level method funnels
|
|
6
|
-
* into ONE abstract write() sink; child() lets each provider keep its own caching policy.
|
|
7
|
-
*/
|
|
4
|
+
/** Provider-independent plumbing: scope, prefix, DEBUG gate, for(). Every level method funnels into ONE abstract write() sink; child() lets each provider keep its own caching policy. */
|
|
8
5
|
export declare abstract class BaseLogger extends AbstractLogger {
|
|
9
6
|
protected readonly _scope: string;
|
|
10
7
|
protected readonly _formattedPrefix: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/modules/logger/base/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,OAAO,EAA+B,SAAS,EAAE,MAAM,WAAW,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/modules/logger/base/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,OAAO,EAA+B,SAAS,EAAE,MAAM,WAAW,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,0LAA0L;AAC1L,8BAAsB,UAAW,SAAQ,cAAc;IACrD,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAClC,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;gBAEhC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE;IAMnC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,SAAS,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;KAAE,GAAG,IAAI;IAEjG,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO;IAE1D,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE;IAOzC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE;IAIxC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE;IAIxC,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE;IAIzC,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE;IAIzC,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE;IAIzD,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;CAIjC"}
|
|
@@ -3,10 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BaseLogger = void 0;
|
|
4
4
|
const common_1 = require("../common");
|
|
5
5
|
const abstract_1 = require("./abstract");
|
|
6
|
-
/**
|
|
7
|
-
* Provider-independent plumbing: scope, prefix, DEBUG gate, for(). Every level method funnels
|
|
8
|
-
* into ONE abstract write() sink; child() lets each provider keep its own caching policy.
|
|
9
|
-
*/
|
|
6
|
+
/** Provider-independent plumbing: scope, prefix, DEBUG gate, for(). Every level method funnels into ONE abstract write() sink; child() lets each provider keep its own caching policy. */
|
|
10
7
|
class BaseLogger extends abstract_1.AbstractLogger {
|
|
11
8
|
constructor(opts) {
|
|
12
9
|
super();
|
|
@@ -35,8 +32,7 @@ class BaseLogger extends abstract_1.AbstractLogger {
|
|
|
35
32
|
this.write({ level, message, args });
|
|
36
33
|
}
|
|
37
34
|
for(methodName) {
|
|
38
|
-
// An empty parent scope must not produce a
|
|
39
|
-
// leading dash - the child simply takes the method name as its whole scope.
|
|
35
|
+
// An empty parent scope must not produce a leading dash - the child simply takes the method name as its whole scope.
|
|
40
36
|
return this.child({ scope: this._scope !== '' ? `${this._scope}-${methodName}` : methodName });
|
|
41
37
|
}
|
|
42
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../src/modules/logger/base/base.ts"],"names":[],"mappings":";;;AACA,sCAA4E;AAC5E,yCAA4C;AAE5C
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../src/modules/logger/base/base.ts"],"names":[],"mappings":";;;AACA,sCAA4E;AAC5E,yCAA4C;AAE5C,0LAA0L;AAC1L,MAAsB,UAAW,SAAQ,yBAAc;IAIrD,YAAY,IAAuB;QACjC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;IACtE,CAAC;IAMD,KAAK,CAAC,OAAe,EAAE,GAAG,IAAe;QACvC,IAAI,CAAC,yBAAgB,EAAE,CAAC;YACtB,OAAO;QACT,CAAC;QACD,IAAI,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,kBAAS,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IACxD,CAAC;IAED,IAAI,CAAC,OAAe,EAAE,GAAG,IAAe;QACtC,IAAI,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,kBAAS,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IACvD,CAAC;IAED,IAAI,CAAC,OAAe,EAAE,GAAG,IAAe;QACtC,IAAI,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,kBAAS,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IACvD,CAAC;IAED,KAAK,CAAC,OAAe,EAAE,GAAG,IAAe;QACvC,IAAI,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,kBAAS,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IACxD,CAAC;IAED,KAAK,CAAC,OAAe,EAAE,GAAG,IAAe;QACvC,IAAI,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,kBAAS,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IACxD,CAAC;IAED,GAAG,CAAC,KAAgB,EAAE,OAAe,EAAE,GAAG,IAAe;QACvD,IAAI,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IACvC,CAAC;IAED,GAAG,CAAC,UAAkB;QACpB,qHAAqH;QACrH,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,IAAI,UAAU,EAAE,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC;IACjG,CAAC;CACF;AA7CD,gCA6CC"}
|
|
@@ -16,16 +16,9 @@ export declare class LoggerFormats {
|
|
|
16
16
|
static isValid(input: string): input is TLoggerFormat;
|
|
17
17
|
}
|
|
18
18
|
export type TLoggerFormat = TConstValue<typeof LoggerFormats>;
|
|
19
|
-
/**
|
|
20
|
-
* debug() gate, computed ONCE at module load: DEBUG must be truthy and NODE_ENV unset or
|
|
21
|
-
* allowlisted. Shared across every logger implementation - runtime env changes need a restart.
|
|
22
|
-
*/
|
|
19
|
+
/** debug() gate, computed ONCE at module load: DEBUG truthy and NODE_ENV unset or allowlisted. Shared across every logger implementation - runtime env changes need a restart. */
|
|
23
20
|
export declare const SHOULD_LOG_DEBUG: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* The logger's own level, below which a line never reaches ANY transport. Defaults to `debug` -
|
|
26
|
-
* level gating belongs to the wrapper and each transport; a stricter default here would
|
|
27
|
-
* silently drop lines the wrapper already let through.
|
|
28
|
-
*/
|
|
21
|
+
/** The logger's own level, below which a line never reaches ANY transport. Defaults to `debug` - level gating belongs to the wrapper and each transport, and a stricter default here would silently drop lines the wrapper already let through. */
|
|
29
22
|
export declare const resolveLoggerLevel: (opts: {
|
|
30
23
|
configured?: string;
|
|
31
24
|
}) => TLogLevel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/modules/logger/common/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C,qBAAa,SAAS;IACpB,MAAM,CAAC,QAAQ,CAAC,KAAK,WAAW;IAChC,MAAM,CAAC,QAAQ,CAAC,KAAK,WAAW;IAChC,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU;IAC9B,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU;IAC9B,MAAM,CAAC,QAAQ,CAAC,KAAK,WAAW;IAEhC,MAAM,CAAC,QAAQ,CAAC,UAAU,cAAuE;IAEjG,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;CAGvC;AAED,MAAM,MAAM,SAAS,GAAG,WAAW,CAAC,OAAO,SAAS,CAAC,CAAC;AAGtD,qBAAa,aAAa;IACxB,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU;IAC9B,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU;IAE9B,MAAM,CAAC,QAAQ,CAAC,UAAU,cAAmC;IAE7D,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,aAAa;CAGtD;AAED,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,OAAO,aAAa,CAAC,CAAC;AAM9D
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/modules/logger/common/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C,qBAAa,SAAS;IACpB,MAAM,CAAC,QAAQ,CAAC,KAAK,WAAW;IAChC,MAAM,CAAC,QAAQ,CAAC,KAAK,WAAW;IAChC,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU;IAC9B,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU;IAC9B,MAAM,CAAC,QAAQ,CAAC,KAAK,WAAW;IAEhC,MAAM,CAAC,QAAQ,CAAC,UAAU,cAAuE;IAEjG,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;CAGvC;AAED,MAAM,MAAM,SAAS,GAAG,WAAW,CAAC,OAAO,SAAS,CAAC,CAAC;AAGtD,qBAAa,aAAa;IACxB,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU;IAC9B,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU;IAE9B,MAAM,CAAC,QAAQ,CAAC,UAAU,cAAmC;IAE7D,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,aAAa;CAGtD;AAED,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,OAAO,aAAa,CAAC,CAAC;AAM9D,kLAAkL;AAClL,eAAO,MAAM,gBAAgB,SAE0C,CAAC;AAExE,mPAAmP;AACnP,eAAO,MAAM,kBAAkB,GAAI,MAAM;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,KAAG,SAoBlE,CAAC"}
|
|
@@ -28,17 +28,10 @@ exports.LoggerFormats = LoggerFormats;
|
|
|
28
28
|
// -------------------------------------------------------------
|
|
29
29
|
const extraLogEnvs = (process.env.APP_ENV_EXTRA_LOG_ENVS ?? '').split(',').map(el => el.trim());
|
|
30
30
|
const LOG_ENVIRONMENTS = new Set([...Array.from(env_1.Environment.COMMON_ENVS), ...extraLogEnvs]);
|
|
31
|
-
/**
|
|
32
|
-
* debug() gate, computed ONCE at module load: DEBUG must be truthy and NODE_ENV unset or
|
|
33
|
-
* allowlisted. Shared across every logger implementation - runtime env changes need a restart.
|
|
34
|
-
*/
|
|
31
|
+
/** debug() gate, computed ONCE at module load: DEBUG truthy and NODE_ENV unset or allowlisted. Shared across every logger implementation - runtime env changes need a restart. */
|
|
35
32
|
exports.SHOULD_LOG_DEBUG = (0, parse_utility_1.toBoolean)(process.env.DEBUG) &&
|
|
36
33
|
(!process.env.NODE_ENV || LOG_ENVIRONMENTS.has(process.env.NODE_ENV));
|
|
37
|
-
/**
|
|
38
|
-
* The logger's own level, below which a line never reaches ANY transport. Defaults to `debug` -
|
|
39
|
-
* level gating belongs to the wrapper and each transport; a stricter default here would
|
|
40
|
-
* silently drop lines the wrapper already let through.
|
|
41
|
-
*/
|
|
34
|
+
/** The logger's own level, below which a line never reaches ANY transport. Defaults to `debug` - level gating belongs to the wrapper and each transport, and a stricter default here would silently drop lines the wrapper already let through. */
|
|
42
35
|
const resolveLoggerLevel = (opts) => {
|
|
43
36
|
const { configured } = opts;
|
|
44
37
|
if (!configured || configured.trim() === '') {
|
|
@@ -46,8 +39,7 @@ const resolveLoggerLevel = (opts) => {
|
|
|
46
39
|
}
|
|
47
40
|
const normalized = configured.trim().toLowerCase();
|
|
48
41
|
if (!LogLevels.isValid(normalized)) {
|
|
49
|
-
// console, not Logger: the logger is being built - routing this warning through it would
|
|
50
|
-
// re-enter the very pipeline that is not configured yet.
|
|
42
|
+
// console, not Logger: the logger is being built - routing this warning through it would re-enter the very pipeline that is not configured yet.
|
|
51
43
|
console.warn('[resolveLoggerLevel] Invalid logger level | value: %s | valids: %s | fallback: %s', configured, [...LogLevels.SCHEME_SET], LogLevels.DEBUG);
|
|
52
44
|
return LogLevels.DEBUG;
|
|
53
45
|
}
|
|
@@ -1 +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AAW,CAAC,WAAW,CAAC,EAAE,GAAG,YAAY,CAAC,CAAC,CAAC;AAE5F,kLAAkL;AACrK,QAAA,gBAAgB,GAC3B,IAAA,yBAAS,EAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC;IAC5B,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;AAExE,mPAAmP;AAC5O,MAAM,kBAAkB,GAAG,CAAC,IAA6B,EAAa,EAAE;IAC7E,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAE5B,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QAC5C,OAAO,SAAS,CAAC,KAAK,CAAC;IACzB,CAAC;IAED,MAAM,UAAU,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACnD,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;QACnC,gJAAgJ;QAChJ,OAAO,CAAC,IAAI,CACV,mFAAmF,EACnF,UAAU,EACV,CAAC,GAAG,SAAS,CAAC,UAAU,CAAC,EACzB,SAAS,CAAC,KAAK,CAChB,CAAC;QACF,OAAO,SAAS,CAAC,KAAK,CAAC;IACzB,CAAC;IAED,OAAO,UAAuB,CAAC;AACjC,CAAC,CAAC;AApBW,QAAA,kBAAkB,sBAoB7B"}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { AnyType } from '../../../common/types';
|
|
2
2
|
import { TLogLevel } from './constants';
|
|
3
|
-
/**
|
|
4
|
-
* The logging contract every consumer types against; which provider produced the logger is
|
|
5
|
-
* invisible behind it - only `factory.ts` and a provider's back-compat aliases may name a
|
|
6
|
-
* concrete logger class.
|
|
7
|
-
*/
|
|
3
|
+
/** The logging contract every consumer types against; which provider produced the logger is invisible behind it - only `factory.ts` and a provider's back-compat aliases may name a concrete logger class. */
|
|
8
4
|
export interface ILogger {
|
|
9
5
|
debug(message: string, ...args: AnyType[]): void;
|
|
10
6
|
info(message: string, ...args: AnyType[]): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/modules/logger/common/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/modules/logger/common/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,8MAA8M;AAC9M,MAAM,WAAW,OAAO;IACtB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IACjD,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAChD,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAChD,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IACjD,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IACjD,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IACjE,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;CAClC;AAED,8FAA8F;AAC9F,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;CAC7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/modules/logger/factory.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,eAAe,EAAa,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/modules/logger/factory.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,eAAe,EAAa,MAAM,UAAU,CAAC;AAkD/D,uKAAuK;AACvK,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAkB;IAC1C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAsC;IAE1D,kFAAkF;IAClF,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE;QAAE,QAAQ,EAAE,eAAe,CAAA;KAAE,GAAG,IAAI;IAOrD,MAAM,CAAC,eAAe,IAAI,eAAe;IAKzC,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAiBlC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO;CAW5C;AAED,kFAAkF;AAClF,eAAO,MAAM,iBAAiB;iBACf,MAAM,KAAG,OAAO;CAC9B,CAAC"}
|
|
@@ -4,11 +4,7 @@ exports.ApplicationLogger = exports.LoggerFactory = void 0;
|
|
|
4
4
|
const ignis_inversion_1 = require("@venizia/ignis-inversion");
|
|
5
5
|
const node_module_1 = require("node:module");
|
|
6
6
|
const base_1 = require("./base");
|
|
7
|
-
/**
|
|
8
|
-
* Stable wrapper the factory hands out. The delegate resolves lazily (first log call or `use()`),
|
|
9
|
-
* never at construction, so no provider loads until actually needed. Mutual reference with
|
|
10
|
-
* LoggerFactory is by design - hence the `no-use-before-define` disables.
|
|
11
|
-
*/
|
|
7
|
+
/** Stable wrapper the factory hands out; the delegate resolves lazily (first log call or `use()`), never at construction, so no provider loads until needed. Mutual reference with LoggerFactory is by design - hence the `no-use-before-define` disables. */
|
|
12
8
|
class LoggerDelegator extends base_1.AbstractLogger {
|
|
13
9
|
constructor(scope) {
|
|
14
10
|
super();
|
|
@@ -58,8 +54,7 @@ class LoggerFactory {
|
|
|
58
54
|
static currentProvider() {
|
|
59
55
|
return (this.provider ??= this.loadDefaultProvider());
|
|
60
56
|
}
|
|
61
|
-
// winston is an optional peer; compiled binaries must register a provider explicitly because
|
|
62
|
-
// only a class reference carries a provider into a bundle.
|
|
57
|
+
// winston is an optional peer; compiled binaries must register a provider explicitly because only a class reference carries a provider into a bundle.
|
|
63
58
|
static loadDefaultProvider() {
|
|
64
59
|
try {
|
|
65
60
|
return (0, node_module_1.createRequire)(__filename)('./winston').WinstonLogger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../src/modules/logger/factory.ts"],"names":[],"mappings":";;;AACA,8DAAoD;AACpD,6CAA4C;AAC5C,iCAAwC;AAGxC
|
|
1
|
+
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../src/modules/logger/factory.ts"],"names":[],"mappings":";;;AACA,8DAAoD;AACpD,6CAA4C;AAC5C,iCAAwC;AAGxC,8PAA8P;AAC9P,MAAM,eAAgB,SAAQ,qBAAc;IAG1C,YAA6B,KAAa;QACxC,KAAK,EAAE,CAAC;QADmB,UAAK,GAAL,KAAK,CAAQ;IAE1C,CAAC;IAED,OAAO,CAAC,QAAyB;QAC/B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC5C,CAAC;IAEO,QAAQ;QACd,mEAAmE;QACnE,OAAO,CAAC,IAAI,CAAC,SAAS,KAAK,aAAa,CAAC,eAAe,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9E,CAAC;IAED,KAAK,CAAC,OAAe,EAAE,GAAG,IA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CC;AAED,kFAAkF;AACrE,QAAA,iBAAiB,GAAG;IAC/B,GAAG,EAAE,CAAC,KAAa,EAAW,EAAE,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC;CAClE,CAAC"}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import util from 'node:util';
|
|
2
|
-
/**
|
|
3
|
-
* Formats like `util.format`, but `%s` inspects to configured depth instead of Node's hard-coded
|
|
4
|
-
* `depth: 0` (no inspect option overrides that). Done per-placeholder only - widening ALL args
|
|
5
|
-
* would turn `%j` into a JSON-quoted string instead of an object.
|
|
6
|
-
*/
|
|
2
|
+
/** Formats like `util.format`, but `%s` inspects to configured depth instead of Node's hard-coded `depth: 0` (no inspect option overrides that). Per-placeholder only - widening ALL args would turn `%j` into a JSON-quoted string instead of an object. */
|
|
7
3
|
export declare const formatLogMessage: (opts: {
|
|
8
4
|
message: string;
|
|
9
5
|
args: Array<unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deep-splat.d.ts","sourceRoot":"","sources":["../../../../src/modules/logger/formatting/deep-splat.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"deep-splat.d.ts","sourceRoot":"","sources":["../../../../src/modules/logger/formatting/deep-splat.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,WAAW,CAAC;AAmC7B,6PAA6P;AAC7P,eAAO,MAAM,gBAAgB,GAAI,MAAM;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IACrB,cAAc,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC;CACtC,KAAG,MAiBH,CAAC"}
|
|
@@ -8,22 +8,16 @@ const redact_1 = require("../../../common/redact");
|
|
|
8
8
|
const node_util_1 = __importDefault(require("node:util"));
|
|
9
9
|
/** The placeholders `util.format` understands. `%%` is an escape, not a placeholder. */
|
|
10
10
|
const PLACEHOLDER_PATTERN = /%[sjdifoOc%]/g;
|
|
11
|
-
/**
|
|
12
|
-
* How deep an object is inspected before it collapses to `[Object]`. Node's default of 2 hides
|
|
13
|
-
* useful nested data (e.g. wrapped `cause`); 5 reaches it while staying bounded.
|
|
14
|
-
* `APP_ENV_LOGGER_INSPECT_DEPTH` overrides with a NON-NEGATIVE number - no unlimited setting.
|
|
15
|
-
*/
|
|
11
|
+
/** How deep an object is inspected before it collapses to `[Object]`: Node's default of 2 hides nested data (e.g. wrapped `cause`), 5 reaches it while staying bounded. `APP_ENV_LOGGER_INSPECT_DEPTH` overrides with a NON-NEGATIVE number - no unlimited setting. */
|
|
16
12
|
const DEFAULT_INSPECT_DEPTH = 5;
|
|
17
13
|
const resolveDepth = () => {
|
|
18
14
|
const configured = process.env.APP_ENV_LOGGER_INSPECT_DEPTH;
|
|
19
|
-
// Not `int()`: it answers 0 for an ABSENT value, which would silently mean "depth 0" - the one
|
|
20
|
-
// setting that hides everything.
|
|
15
|
+
// Not `int()`: it answers 0 for an ABSENT value, which would silently mean "depth 0" - the one setting that hides everything.
|
|
21
16
|
if (configured === undefined || configured.trim() === '') {
|
|
22
17
|
return DEFAULT_INSPECT_DEPTH;
|
|
23
18
|
}
|
|
24
19
|
const parsed = Number.parseInt(configured, 10);
|
|
25
|
-
// A negative or unparseable value is a misconfiguration, not a request: fall back rather than hand
|
|
26
|
-
// `util.inspect` a depth it reads as "unlimited".
|
|
20
|
+
// A negative or unparseable value is a misconfiguration, not a request: fall back rather than hand `util.inspect` a depth it reads as "unlimited".
|
|
27
21
|
if (Number.isNaN(parsed) || parsed < 0) {
|
|
28
22
|
return DEFAULT_INSPECT_DEPTH;
|
|
29
23
|
}
|
|
@@ -37,11 +31,7 @@ const buildInspectOptions = () => {
|
|
|
37
31
|
breakLength: Infinity,
|
|
38
32
|
};
|
|
39
33
|
};
|
|
40
|
-
/**
|
|
41
|
-
* Formats like `util.format`, but `%s` inspects to configured depth instead of Node's hard-coded
|
|
42
|
-
* `depth: 0` (no inspect option overrides that). Done per-placeholder only - widening ALL args
|
|
43
|
-
* would turn `%j` into a JSON-quoted string instead of an object.
|
|
44
|
-
*/
|
|
34
|
+
/** Formats like `util.format`, but `%s` inspects to configured depth instead of Node's hard-coded `depth: 0` (no inspect option overrides that). Per-placeholder only - widening ALL args would turn `%j` into a JSON-quoted string instead of an object. */
|
|
45
35
|
const formatLogMessage = (opts) => {
|
|
46
36
|
const { message, args, inspectOptions = buildInspectOptions() } = opts;
|
|
47
37
|
const placeholders = (message.match(PLACEHOLDER_PATTERN) ?? []).filter(token => token !== '%%');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deep-splat.js","sourceRoot":"","sources":["../../../../src/modules/logger/formatting/deep-splat.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAgD;AAChD,0DAA6B;AAE7B,wFAAwF;AACxF,MAAM,mBAAmB,GAAG,eAAe,CAAC;AAE5C
|
|
1
|
+
{"version":3,"file":"deep-splat.js","sourceRoot":"","sources":["../../../../src/modules/logger/formatting/deep-splat.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAgD;AAChD,0DAA6B;AAE7B,wFAAwF;AACxF,MAAM,mBAAmB,GAAG,eAAe,CAAC;AAE5C,uQAAuQ;AACvQ,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAEhC,MAAM,YAAY,GAAG,GAAW,EAAE;IAChC,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC;IAE5D,8HAA8H;IAC9H,IAAI,UAAU,KAAK,SAAS,IAAI,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACzD,OAAO,qBAAqB,CAAC;IAC/B,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAE/C,mJAAmJ;IACnJ,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,MAA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