@aomex/logger 0.0.1 → 0.0.3
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 +15 -7
- package/dist/index.d.ts +18 -1
- package/dist/index.js +30 -13
- package/dist/index.js.map +1 -1
- package/package.json +7 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
# @aomex/logger
|
|
2
2
|
|
|
3
|
-
## 0.0.
|
|
3
|
+
## 0.0.3
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
- [`
|
|
7
|
+
- [`bf58245`](https://github.com/aomex/aomex/commit/bf58245b980d7b8a9e8aead48d298cb28be27aa9) Thanks [@geekact](https://github.com/geekact)! - feat(logger): add token enum
|
|
8
8
|
|
|
9
|
-
- [`
|
|
9
|
+
- Updated dependencies [[`dcf2f4b`](https://github.com/aomex/aomex/commit/dcf2f4b6a13228d4731e4969e6abff9bef8ef0e2), [`d788ce7`](https://github.com/aomex/aomex/commit/d788ce731af885eae3819683813b2a9502742cea), [`c6fe6cb`](https://github.com/aomex/aomex/commit/c6fe6cb2f21acf74bc06db1509deff4aa35c48b3), [`a2727fb`](https://github.com/aomex/aomex/commit/a2727fb7619341dc3b23736e5dc11cee7d65e0bc), [`4253004`](https://github.com/aomex/aomex/commit/42530043854956a42d16be090b89fbac70e2fa17), [`fc7008e`](https://github.com/aomex/aomex/commit/fc7008e889a55e6a0a268bb77cab5be0f0bd9d30), [`d80df1a`](https://github.com/aomex/aomex/commit/d80df1a07eb92214a9c3c7fa15c629ea1ee88c43)]:
|
|
10
|
+
- @aomex/web@0.0.8
|
|
11
|
+
- @aomex/core@0.0.7
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
## 0.0.2
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [`bbc8dda`](https://github.com/aomex/aomex/commit/bbc8dda9f0876c3402608133085350cc693def6f) Thanks [@geekact](https://github.com/geekact)! - refactor: rename package helper to utility
|
|
18
|
+
|
|
19
|
+
- Updated dependencies [[`bbc8dda`](https://github.com/aomex/aomex/commit/bbc8dda9f0876c3402608133085350cc693def6f), [`ceb2d82`](https://github.com/aomex/aomex/commit/ceb2d8269755dca3f79b755224259b8a99bc65d0)]:
|
|
20
|
+
- @aomex/utility@0.0.4
|
|
21
|
+
- @aomex/core@0.0.6
|
|
22
|
+
- @aomex/web@0.0.7
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,13 @@ import { WebContext, WebMiddleware } from '@aomex/web';
|
|
|
2
2
|
|
|
3
3
|
type Printer = (message: string, ...args: any[]) => any;
|
|
4
4
|
interface LoggerOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Defaults ` [request] [method] [url]`
|
|
7
|
+
*/
|
|
5
8
|
requestFormat?: string | false;
|
|
9
|
+
/**
|
|
10
|
+
* Defaults ` [response] [method] [url] [statusCode] [time] [contentLength]`
|
|
11
|
+
*/
|
|
6
12
|
responseFormat?: string | false;
|
|
7
13
|
printer?: Printer;
|
|
8
14
|
customTokens?: {
|
|
@@ -11,4 +17,15 @@ interface LoggerOptions {
|
|
|
11
17
|
}
|
|
12
18
|
declare const logger: (options?: LoggerOptions) => WebMiddleware;
|
|
13
19
|
|
|
14
|
-
|
|
20
|
+
declare enum FormatToken {
|
|
21
|
+
request = "[request]",
|
|
22
|
+
response = "[response]",
|
|
23
|
+
method = "[method]",
|
|
24
|
+
url = "[url]",
|
|
25
|
+
statusCode = "[statusCode]",
|
|
26
|
+
contentLength = "[contentLength]",
|
|
27
|
+
contentType = "[contentType]",
|
|
28
|
+
time = "[time]"
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { FormatToken, LoggerOptions, logger };
|
package/dist/index.js
CHANGED
|
@@ -16,9 +16,23 @@ var Counter = class extends Transform {
|
|
|
16
16
|
|
|
17
17
|
// src/format.ts
|
|
18
18
|
import prettyTime from "pretty-time";
|
|
19
|
-
import bytes from "
|
|
20
|
-
import { chalk } from "@aomex/helper";
|
|
19
|
+
import { bytes, chalk } from "@aomex/utility";
|
|
21
20
|
import { statuses } from "@aomex/web";
|
|
21
|
+
|
|
22
|
+
// src/format-token.ts
|
|
23
|
+
var FormatToken = /* @__PURE__ */ ((FormatToken2) => {
|
|
24
|
+
FormatToken2["request"] = "[request]";
|
|
25
|
+
FormatToken2["response"] = "[response]";
|
|
26
|
+
FormatToken2["method"] = "[method]";
|
|
27
|
+
FormatToken2["url"] = "[url]";
|
|
28
|
+
FormatToken2["statusCode"] = "[statusCode]";
|
|
29
|
+
FormatToken2["contentLength"] = "[contentLength]";
|
|
30
|
+
FormatToken2["contentType"] = "[contentType]";
|
|
31
|
+
FormatToken2["time"] = "[time]";
|
|
32
|
+
return FormatToken2;
|
|
33
|
+
})(FormatToken || {});
|
|
34
|
+
|
|
35
|
+
// src/format.ts
|
|
22
36
|
var colorCodes = {
|
|
23
37
|
7: "magenta",
|
|
24
38
|
5: "red",
|
|
@@ -47,11 +61,11 @@ var format = (opts) => {
|
|
|
47
61
|
args.push(tokens[token]());
|
|
48
62
|
return "%s";
|
|
49
63
|
}
|
|
50
|
-
switch (token) {
|
|
51
|
-
case "request"
|
|
64
|
+
switch (`[${token}]`) {
|
|
65
|
+
case "[request]" /* request */:
|
|
52
66
|
args.push("<--");
|
|
53
67
|
return chalk.gray("%s");
|
|
54
|
-
case "response"
|
|
68
|
+
case "[response]" /* response */:
|
|
55
69
|
if (statusCode >= 400) {
|
|
56
70
|
args.push("xxx");
|
|
57
71
|
return chalk.red("%s");
|
|
@@ -62,25 +76,25 @@ var format = (opts) => {
|
|
|
62
76
|
}
|
|
63
77
|
args.push("-->");
|
|
64
78
|
return chalk.gray("%s");
|
|
65
|
-
case "method"
|
|
79
|
+
case "[method]" /* method */:
|
|
66
80
|
args.push(method);
|
|
67
81
|
return chalk.bold("%s");
|
|
68
|
-
case "url"
|
|
82
|
+
case "[url]" /* url */:
|
|
69
83
|
args.push(url);
|
|
70
84
|
return chalk.gray("%s");
|
|
71
|
-
case "statusCode"
|
|
85
|
+
case "[statusCode]" /* statusCode */:
|
|
72
86
|
const c = colorCodes[statusCode / 100 | 0] || colorCodes[0];
|
|
73
87
|
args.push(statusCode.toString());
|
|
74
88
|
return chalk[c]("%s");
|
|
75
|
-
case "contentLength"
|
|
89
|
+
case "[contentLength]" /* contentLength */:
|
|
76
90
|
args.push(
|
|
77
91
|
statuses.empty[statusCode] || contentLength === 0 ? "0" : contentLength == null ? "-" : bytes(contentLength).toLowerCase()
|
|
78
92
|
);
|
|
79
93
|
return chalk.gray("%s");
|
|
80
|
-
case "contentType"
|
|
94
|
+
case "[contentType]" /* contentType */:
|
|
81
95
|
args.push(contentType);
|
|
82
96
|
return chalk.gray("%s");
|
|
83
|
-
case "time"
|
|
97
|
+
case "[time]" /* time */:
|
|
84
98
|
args.push(prettyTime(process.hrtime(startTime)));
|
|
85
99
|
return chalk.gray("%s");
|
|
86
100
|
default:
|
|
@@ -94,10 +108,12 @@ var format = (opts) => {
|
|
|
94
108
|
var defaultPrinter = (message, ...args) => {
|
|
95
109
|
console.log(util.format(message, ...args));
|
|
96
110
|
};
|
|
111
|
+
var defaultRequestFormat = ` ${"[request]" /* request */} ${"[method]" /* method */} ${"[url]" /* url */}`;
|
|
112
|
+
var defaultResponseFormat = ` ${"[request]" /* request */} ${"[method]" /* method */} ${"[url]" /* url */} ${"[statusCode]" /* statusCode */} ${"[time]" /* time */} ${"[contentLength]" /* contentLength */}`;
|
|
97
113
|
var logger = (options = {}) => {
|
|
98
114
|
const {
|
|
99
|
-
requestFormat =
|
|
100
|
-
responseFormat =
|
|
115
|
+
requestFormat = defaultRequestFormat,
|
|
116
|
+
responseFormat = defaultResponseFormat,
|
|
101
117
|
printer = defaultPrinter,
|
|
102
118
|
customTokens
|
|
103
119
|
} = options;
|
|
@@ -169,6 +185,7 @@ var logger = (options = {}) => {
|
|
|
169
185
|
});
|
|
170
186
|
};
|
|
171
187
|
export {
|
|
188
|
+
FormatToken,
|
|
172
189
|
logger
|
|
173
190
|
};
|
|
174
191
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/logger.ts","../src/counter.ts","../src/format.ts"],"sourcesContent":["import { Readable } from 'node:stream';\nimport util from 'node:util';\nimport { middleware } from '@aomex/core';\nimport type { WebContext, WebMiddleware } from '@aomex/web';\nimport { Counter } from './counter';\nimport { format } from './format';\n\ntype Printer = (message: string, ...args: any[]) => any;\n\nexport interface LoggerOptions {\n requestFormat?: string | false;\n responseFormat?: string | false;\n printer?: Printer;\n customTokens?: { [key: string]: (ctx: WebContext) => string };\n}\n\nconst defaultPrinter: Printer = (message, ...args) => {\n console.log(util.format(message, ...args));\n};\n\nexport const logger = (options: LoggerOptions = {}): WebMiddleware => {\n const {\n requestFormat =
|
|
1
|
+
{"version":3,"sources":["../src/logger.ts","../src/counter.ts","../src/format.ts","../src/format-token.ts"],"sourcesContent":["import { Readable } from 'node:stream';\nimport util from 'node:util';\nimport { middleware } from '@aomex/core';\nimport type { WebContext, WebMiddleware } from '@aomex/web';\nimport { Counter } from './counter';\nimport { format } from './format';\nimport { FormatToken } from './format-token';\n\ntype Printer = (message: string, ...args: any[]) => any;\n\nexport interface LoggerOptions {\n /**\n * Defaults ` [request] [method] [url]`\n */\n requestFormat?: string | false;\n /**\n * Defaults ` [response] [method] [url] [statusCode] [time] [contentLength]`\n */\n responseFormat?: string | false;\n printer?: Printer;\n customTokens?: { [key: string]: (ctx: WebContext) => string };\n}\n\nconst defaultPrinter: Printer = (message, ...args) => {\n console.log(util.format(message, ...args));\n};\n\nconst defaultRequestFormat = ` ${FormatToken.request} ${FormatToken.method} ${FormatToken.url}`;\nconst defaultResponseFormat = ` ${FormatToken.request} ${FormatToken.method} ${FormatToken.url} ${FormatToken.statusCode} ${FormatToken.time} ${FormatToken.contentLength}`;\n\nexport const logger = (options: LoggerOptions = {}): WebMiddleware => {\n const {\n requestFormat = defaultRequestFormat,\n responseFormat = defaultResponseFormat,\n printer = defaultPrinter,\n customTokens,\n } = options;\n\n return middleware.web(async (ctx, next) => {\n const start = process.hrtime();\n const {\n request: { method, url },\n response,\n } = ctx;\n const tokens = customTokens\n ? Object.fromEntries(\n Object.entries(customTokens).map(([key, value]) => {\n return [key, value.bind(null, ctx)];\n }),\n )\n : {};\n\n if (requestFormat) {\n printer(\n ...format({\n message: requestFormat!,\n tokens,\n startTime: start,\n method,\n url,\n }),\n );\n }\n\n if (!responseFormat) return next();\n\n ctx.app.on('error', onError);\n await next();\n ctx.app.off('error', onError);\n\n const body = response.body;\n let counter: Counter;\n\n if (body instanceof Readable && body.readable) {\n ctx.send(body.pipe((counter = new Counter())));\n }\n\n const onfinish = onDone.bind(null, 'finish');\n const onclose = onDone.bind(null, 'close');\n response.once('finish', onfinish);\n response.once('close', onclose);\n\n function onError() {\n printer(\n ...format({\n message: responseFormat as string,\n tokens,\n startTime: start,\n method,\n url,\n statusCode: response.statusCode,\n contentLength: response.contentLength,\n }),\n );\n }\n\n function onDone(event: 'finish' | 'close') {\n response.off('finish', onfinish);\n response.off('close', onclose);\n printer(\n ...format({\n message: responseFormat as string,\n tokens,\n startTime: start,\n method,\n url,\n statusCode: response.statusCode,\n contentLength: counter ? counter.length : response.contentLength,\n finished: event === 'finish',\n }),\n );\n }\n });\n};\n","import { Transform, TransformCallback } from 'node:stream';\n\nexport class Counter extends Transform {\n public length: number = 0;\n\n override _transform(\n chunk: any,\n _encoding: BufferEncoding,\n callback: TransformCallback,\n ): void {\n this.length += chunk.length;\n this.push(chunk);\n callback();\n }\n}\n","import prettyTime from 'pretty-time';\nimport { bytes, chalk } from '@aomex/utility';\nimport { statuses } from '@aomex/web';\nimport { FormatToken } from './format-token';\n\nexport const colorCodes = <const>{\n 7: 'magenta',\n 5: 'red',\n 4: 'yellow',\n 3: 'cyan',\n 2: 'green',\n 1: 'green',\n 0: 'yellow',\n};\n\nexport const format = (opts: {\n message: string;\n startTime: [number, number];\n method: string;\n url: string;\n tokens?: { [key: string]: () => string };\n contentType?: string;\n contentLength?: number;\n statusCode?: number;\n finished?: boolean;\n}): [message: string, ...args: any[]] => {\n const {\n message,\n startTime,\n method,\n url,\n contentLength,\n statusCode = 404,\n contentType = '-',\n tokens = {},\n finished,\n } = opts;\n\n const args: string[] = [];\n const formatted = message.replaceAll(/\\[[^\\]]+\\]/g, (token) => {\n token = token.slice(1, -1);\n\n if (tokens[token]) {\n args.push(tokens[token]!());\n return '%s';\n }\n\n switch (`[${token}]`) {\n case FormatToken.request:\n args.push('<--');\n return chalk.gray('%s');\n case FormatToken.response:\n if (statusCode >= 400) {\n args.push('xxx');\n return chalk.red('%s');\n }\n if (finished === false) {\n args.push('-x-');\n return chalk.yellow('%s');\n }\n\n args.push('-->');\n return chalk.gray('%s');\n case FormatToken.method:\n args.push(method);\n return chalk.bold('%s');\n case FormatToken.url:\n args.push(url);\n return chalk.gray('%s');\n case FormatToken.statusCode:\n const c =\n colorCodes[((statusCode / 100) | 0) as keyof typeof colorCodes] ||\n colorCodes[0]!;\n args.push(statusCode.toString());\n return chalk[c]('%s');\n case FormatToken.contentLength:\n args.push(\n statuses.empty[statusCode] || contentLength === 0\n ? '0'\n : contentLength == null\n ? '-'\n : bytes(contentLength).toLowerCase(),\n );\n return chalk.gray('%s');\n case FormatToken.contentType:\n args.push(contentType);\n return chalk.gray('%s');\n case FormatToken.time:\n args.push(prettyTime(process.hrtime(startTime)));\n return chalk.gray('%s');\n default:\n return `[${token}]`;\n }\n });\n\n return [formatted, ...args];\n};\n","export enum FormatToken {\n request = '[request]',\n response = '[response]',\n method = '[method]',\n url = '[url]',\n statusCode = '[statusCode]',\n contentLength = '[contentLength]',\n contentType = '[contentType]',\n time = '[time]',\n}\n"],"mappings":";AAAA,SAAS,gBAAgB;AACzB,OAAO,UAAU;AACjB,SAAS,kBAAkB;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,UACA,YAAY,SAAS;AAAA,UACrB,eAAe,UAAU,QAAQ,SAAS,SAAS;AAAA,UACnD,UAAU,UAAU;AAAA,QACtB,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF,CAAC;AACH;","names":["FormatToken"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aomex/logger",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"description": "web request log",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api-request-logger"
|
|
7
7
|
],
|
|
@@ -29,18 +29,16 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@aomex/core": "^0.0.
|
|
33
|
-
"@aomex/web": "^0.0.
|
|
32
|
+
"@aomex/core": "^0.0.7",
|
|
33
|
+
"@aomex/web": "^0.0.8"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@aomex/
|
|
37
|
-
"bytes": "^3.1.2",
|
|
36
|
+
"@aomex/utility": "0.0.4",
|
|
38
37
|
"pretty-time": "^1.1.0"
|
|
39
38
|
},
|
|
40
39
|
"devDependencies": {
|
|
41
|
-
"@aomex/core": "^0.0.
|
|
42
|
-
"@aomex/web": "^0.0.
|
|
43
|
-
"@types/bytes": "^3.1.1",
|
|
40
|
+
"@aomex/core": "^0.0.7",
|
|
41
|
+
"@aomex/web": "^0.0.8",
|
|
44
42
|
"@types/pretty-time": "^1.1.2",
|
|
45
43
|
"strip-ansi": "^7.0.1"
|
|
46
44
|
},
|