@adviser/cement 0.2.42 → 0.2.44
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/index.cjs +11 -4
- package/index.cjs.map +1 -1
- package/index.d.cts +4 -4
- package/index.d.ts +4 -4
- package/index.js +16 -9
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/src/http_header.ts +8 -8
- package/src/jsr.json +1 -1
- package/src/logger-impl.ts +8 -1
- package/ts/future.test.js +4 -0
- package/ts/future.test.js.map +1 -1
- package/ts/http_header.d.ts +4 -4
- package/ts/http_header.d.ts.map +1 -1
- package/ts/http_header.js +2 -2
- package/ts/http_header.js.map +1 -1
- package/ts/logger-impl.d.ts.map +1 -1
- package/ts/logger-impl.js +9 -1
- package/ts/logger-impl.js.map +1 -1
- package/ts/logger.test.js +16 -0
- package/ts/logger.test.js.map +1 -1
package/index.d.cts
CHANGED
@@ -594,10 +594,10 @@ declare const VERSION: string;
|
|
594
594
|
declare class HeadersImpl extends Headers {
|
595
595
|
readonly _headers: Map<string, string>;
|
596
596
|
constructor(init: Map<string, string>);
|
597
|
-
[Symbol.iterator]():
|
598
|
-
entries():
|
599
|
-
keys():
|
600
|
-
values():
|
597
|
+
[Symbol.iterator](): IterableIterator<[string, string]>;
|
598
|
+
entries(): IterableIterator<[string, string]>;
|
599
|
+
keys(): IterableIterator<string>;
|
600
|
+
values(): IterableIterator<string>;
|
601
601
|
append(key: string, value: string | string[] | undefined): HeadersImpl;
|
602
602
|
}
|
603
603
|
declare class HttpHeader {
|
package/index.d.ts
CHANGED
@@ -594,10 +594,10 @@ declare const VERSION: string;
|
|
594
594
|
declare class HeadersImpl extends Headers {
|
595
595
|
readonly _headers: Map<string, string>;
|
596
596
|
constructor(init: Map<string, string>);
|
597
|
-
[Symbol.iterator]():
|
598
|
-
entries():
|
599
|
-
keys():
|
600
|
-
values():
|
597
|
+
[Symbol.iterator](): IterableIterator<[string, string]>;
|
598
|
+
entries(): IterableIterator<[string, string]>;
|
599
|
+
keys(): IterableIterator<string>;
|
600
|
+
values(): IterableIterator<string>;
|
601
601
|
append(key: string, value: string | string[] | undefined): HeadersImpl;
|
602
602
|
}
|
603
603
|
declare class HttpHeader {
|
package/index.js
CHANGED
@@ -1,8 +1,3 @@
|
|
1
|
-
import {
|
2
|
-
ConsoleWriterStream,
|
3
|
-
FanoutWriteStream,
|
4
|
-
utils_exports
|
5
|
-
} from "./chunk-3RHIVQAA.js";
|
6
1
|
import {
|
7
2
|
WebSysAbstraction
|
8
3
|
} from "./chunk-N3NUTN4B.js";
|
@@ -31,6 +26,11 @@ import {
|
|
31
26
|
WrapperSysAbstraction,
|
32
27
|
envFactory
|
33
28
|
} from "./chunk-N5LQQXOU.js";
|
29
|
+
import {
|
30
|
+
ConsoleWriterStream,
|
31
|
+
FanoutWriteStream,
|
32
|
+
utils_exports
|
33
|
+
} from "./chunk-3RHIVQAA.js";
|
34
34
|
import {
|
35
35
|
Utf8EnDecoder,
|
36
36
|
Utf8EnDecoderSingleton
|
@@ -1325,7 +1325,14 @@ var LoggerImpl = class _LoggerImpl {
|
|
1325
1325
|
}
|
1326
1326
|
}
|
1327
1327
|
if (err instanceof Error) {
|
1328
|
-
|
1328
|
+
if (err.cause) {
|
1329
|
+
this.coerceKey(key, {
|
1330
|
+
message: err.message,
|
1331
|
+
cause: err.cause
|
1332
|
+
});
|
1333
|
+
} else {
|
1334
|
+
this._attributes[key] = logValue(err.message, toLogValueCtx(this.levelHandler));
|
1335
|
+
}
|
1329
1336
|
if (this.levelHandler.isStackExposed) {
|
1330
1337
|
this._attributes["stack"] = logValue(
|
1331
1338
|
(_a = err.stack) == null ? void 0 : _a.split("\n").map((s) => s.trim()),
|
@@ -1972,9 +1979,9 @@ var HttpHeader = class _HttpHeader {
|
|
1972
1979
|
} else {
|
1973
1980
|
for (const k in headers) {
|
1974
1981
|
const v = headers[k];
|
1975
|
-
|
1976
|
-
h.Add(k,
|
1977
|
-
}
|
1982
|
+
(Array.isArray(v) ? v : [v]).forEach((v2) => {
|
1983
|
+
h.Add(k, v2);
|
1984
|
+
});
|
1978
1985
|
}
|
1979
1986
|
}
|
1980
1987
|
}
|