@logtape/file 0.11.0-dev.175 → 0.12.0-dev.181

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.
Files changed (77) hide show
  1. package/deno.json +37 -0
  2. package/dist/_virtual/rolldown_runtime.cjs +30 -0
  3. package/dist/filesink.base.cjs +81 -0
  4. package/dist/filesink.base.d.cts +98 -0
  5. package/dist/filesink.base.d.cts.map +1 -0
  6. package/dist/filesink.base.d.ts +98 -0
  7. package/dist/filesink.base.d.ts.map +1 -0
  8. package/dist/filesink.base.js +80 -0
  9. package/dist/filesink.base.js.map +1 -0
  10. package/dist/filesink.deno.cjs +67 -0
  11. package/dist/filesink.deno.d.cts +40 -0
  12. package/dist/filesink.deno.d.cts.map +1 -0
  13. package/dist/filesink.deno.d.ts +40 -0
  14. package/dist/filesink.deno.d.ts.map +1 -0
  15. package/dist/filesink.deno.js +66 -0
  16. package/dist/filesink.deno.js.map +1 -0
  17. package/dist/filesink.node.cjs +60 -0
  18. package/{esm/file/filesink.node.js → dist/filesink.node.d.cts} +12 -19
  19. package/dist/filesink.node.d.cts.map +1 -0
  20. package/{types/file → dist}/filesink.node.d.ts +11 -5
  21. package/dist/filesink.node.d.ts.map +1 -0
  22. package/dist/filesink.node.js +58 -0
  23. package/dist/filesink.node.js.map +1 -0
  24. package/dist/mod.cjs +15 -0
  25. package/dist/mod.d.cts +3 -0
  26. package/dist/mod.d.ts +3 -0
  27. package/dist/mod.js +3 -0
  28. package/filesink.base.ts +170 -0
  29. package/filesink.deno.ts +69 -0
  30. package/filesink.jsr.ts +52 -0
  31. package/filesink.node.ts +64 -0
  32. package/filesink.test.ts +224 -0
  33. package/mod.ts +7 -0
  34. package/package.json +37 -25
  35. package/tsdown.config.ts +22 -0
  36. package/esm/file/filesink.base.js +0 -85
  37. package/esm/file/mod.js +0 -1
  38. package/esm/package.json +0 -3
  39. package/script/file/filesink.base.js +0 -89
  40. package/script/file/filesink.node.js +0 -55
  41. package/script/file/mod.js +0 -6
  42. package/script/package.json +0 -3
  43. package/types/_dnt.test_shims.d.ts.map +0 -1
  44. package/types/deps/jsr.io/@david/which-runtime/0.2.1/mod.d.ts.map +0 -1
  45. package/types/deps/jsr.io/@std/assert/0.222.1/_constants.d.ts.map +0 -1
  46. package/types/deps/jsr.io/@std/assert/0.222.1/_diff.d.ts.map +0 -1
  47. package/types/deps/jsr.io/@std/assert/0.222.1/_format.d.ts.map +0 -1
  48. package/types/deps/jsr.io/@std/assert/0.222.1/assert_equals.d.ts.map +0 -1
  49. package/types/deps/jsr.io/@std/assert/0.222.1/assert_is_error.d.ts.map +0 -1
  50. package/types/deps/jsr.io/@std/assert/0.222.1/assert_throws.d.ts.map +0 -1
  51. package/types/deps/jsr.io/@std/assert/0.222.1/assertion_error.d.ts.map +0 -1
  52. package/types/deps/jsr.io/@std/assert/0.222.1/equal.d.ts.map +0 -1
  53. package/types/deps/jsr.io/@std/fmt/0.222.1/colors.d.ts.map +0 -1
  54. package/types/deps/jsr.io/@std/path/1.1.0/_common/assert_path.d.ts.map +0 -1
  55. package/types/deps/jsr.io/@std/path/1.1.0/_common/constants.d.ts.map +0 -1
  56. package/types/deps/jsr.io/@std/path/1.1.0/_common/from_file_url.d.ts.map +0 -1
  57. package/types/deps/jsr.io/@std/path/1.1.0/_common/normalize.d.ts.map +0 -1
  58. package/types/deps/jsr.io/@std/path/1.1.0/_common/normalize_string.d.ts.map +0 -1
  59. package/types/deps/jsr.io/@std/path/1.1.0/_os.d.ts.map +0 -1
  60. package/types/deps/jsr.io/@std/path/1.1.0/join.d.ts.map +0 -1
  61. package/types/deps/jsr.io/@std/path/1.1.0/posix/_util.d.ts.map +0 -1
  62. package/types/deps/jsr.io/@std/path/1.1.0/posix/from_file_url.d.ts.map +0 -1
  63. package/types/deps/jsr.io/@std/path/1.1.0/posix/join.d.ts.map +0 -1
  64. package/types/deps/jsr.io/@std/path/1.1.0/posix/normalize.d.ts.map +0 -1
  65. package/types/deps/jsr.io/@std/path/1.1.0/windows/_util.d.ts.map +0 -1
  66. package/types/deps/jsr.io/@std/path/1.1.0/windows/from_file_url.d.ts.map +0 -1
  67. package/types/deps/jsr.io/@std/path/1.1.0/windows/join.d.ts.map +0 -1
  68. package/types/deps/jsr.io/@std/path/1.1.0/windows/normalize.d.ts.map +0 -1
  69. package/types/file/filesink.base.d.ts +0 -94
  70. package/types/file/filesink.base.d.ts.map +0 -1
  71. package/types/file/filesink.node.d.ts.map +0 -1
  72. package/types/file/filesink.test.d.ts.map +0 -1
  73. package/types/file/mod.d.ts +0 -3
  74. package/types/file/mod.d.ts.map +0 -1
  75. package/types/logtape/fixtures.d.ts.map +0 -1
  76. package/types/logtape/level.d.ts.map +0 -1
  77. package/types/logtape/record.d.ts.map +0 -1
@@ -0,0 +1,224 @@
1
+ import { isDeno } from "@david/which-runtime";
2
+ import { suite } from "@hongminhee/suite";
3
+ import type { Sink } from "@logtape/logtape";
4
+ import { assertEquals } from "@std/assert/equals";
5
+ import { assertThrows } from "@std/assert/throws";
6
+ import { join } from "@std/path/join";
7
+ import { getFileSink, getRotatingFileSink } from "#filesink";
8
+ import fs from "node:fs";
9
+ import { tmpdir } from "node:os";
10
+ import { debug, error, fatal, info, warning } from "../logtape/fixtures.ts";
11
+ import { type FileSinkDriver, getBaseFileSink } from "./filesink.base.ts";
12
+
13
+ const test = suite(import.meta);
14
+
15
+ function makeTempFileSync(): string {
16
+ return join(fs.mkdtempSync(join(tmpdir(), "logtape-")), "logtape.txt");
17
+ }
18
+
19
+ test("getBaseFileSink()", () => {
20
+ const path = makeTempFileSync();
21
+ let sink: Sink & Disposable;
22
+ if (isDeno) {
23
+ const driver: FileSinkDriver<Deno.FsFile> = {
24
+ openSync(path: string) {
25
+ return Deno.openSync(path, { create: true, append: true });
26
+ },
27
+ writeSync(fd, chunk) {
28
+ fd.writeSync(chunk);
29
+ },
30
+ flushSync(fd) {
31
+ fd.syncSync();
32
+ },
33
+ closeSync(fd) {
34
+ fd.close();
35
+ },
36
+ };
37
+ sink = getBaseFileSink(path, driver);
38
+ } else {
39
+ const driver: FileSinkDriver<number> = {
40
+ openSync(path: string) {
41
+ return fs.openSync(path, "a");
42
+ },
43
+ writeSync: fs.writeSync,
44
+ flushSync: fs.fsyncSync,
45
+ closeSync: fs.closeSync,
46
+ };
47
+ sink = getBaseFileSink(path, driver);
48
+ }
49
+ sink(debug);
50
+ sink(info);
51
+ sink(warning);
52
+ sink(error);
53
+ sink(fatal);
54
+ sink[Symbol.dispose]();
55
+ assertEquals(
56
+ fs.readFileSync(path, { encoding: "utf-8" }),
57
+ `\
58
+ 2023-11-14 22:13:20.000 +00:00 [DBG] my-app·junk: Hello, 123 & 456!
59
+ 2023-11-14 22:13:20.000 +00:00 [INF] my-app·junk: Hello, 123 & 456!
60
+ 2023-11-14 22:13:20.000 +00:00 [WRN] my-app·junk: Hello, 123 & 456!
61
+ 2023-11-14 22:13:20.000 +00:00 [ERR] my-app·junk: Hello, 123 & 456!
62
+ 2023-11-14 22:13:20.000 +00:00 [FTL] my-app·junk: Hello, 123 & 456!
63
+ `,
64
+ );
65
+ });
66
+
67
+ test("getBaseFileSink() with lazy option", () => {
68
+ const pathDir = fs.mkdtempSync(join(tmpdir(), "logtape-"));
69
+ const path = join(pathDir, "test.log");
70
+ let sink: Sink & Disposable;
71
+ if (isDeno) {
72
+ const driver: FileSinkDriver<Deno.FsFile> = {
73
+ openSync(path: string) {
74
+ return Deno.openSync(path, { create: true, append: true });
75
+ },
76
+ writeSync(fd, chunk) {
77
+ fd.writeSync(chunk);
78
+ },
79
+ flushSync(fd) {
80
+ fd.syncSync();
81
+ },
82
+ closeSync(fd) {
83
+ fd.close();
84
+ },
85
+ };
86
+ sink = getBaseFileSink(path, { ...driver, lazy: true });
87
+ } else {
88
+ const driver: FileSinkDriver<number> = {
89
+ openSync(path: string) {
90
+ return fs.openSync(path, "a");
91
+ },
92
+ writeSync: fs.writeSync,
93
+ flushSync: fs.fsyncSync,
94
+ closeSync: fs.closeSync,
95
+ };
96
+ sink = getBaseFileSink(path, { ...driver, lazy: true });
97
+ }
98
+ if (isDeno) {
99
+ assertThrows(
100
+ () => Deno.lstatSync(path),
101
+ Deno.errors.NotFound,
102
+ );
103
+ } else {
104
+ assertEquals(fs.existsSync(path), false);
105
+ }
106
+ sink(debug);
107
+ sink(info);
108
+ sink(warning);
109
+ sink(error);
110
+ sink(fatal);
111
+ sink[Symbol.dispose]();
112
+ assertEquals(
113
+ fs.readFileSync(path, { encoding: "utf-8" }),
114
+ `\
115
+ 2023-11-14 22:13:20.000 +00:00 [DBG] my-app·junk: Hello, 123 & 456!
116
+ 2023-11-14 22:13:20.000 +00:00 [INF] my-app·junk: Hello, 123 & 456!
117
+ 2023-11-14 22:13:20.000 +00:00 [WRN] my-app·junk: Hello, 123 & 456!
118
+ 2023-11-14 22:13:20.000 +00:00 [ERR] my-app·junk: Hello, 123 & 456!
119
+ 2023-11-14 22:13:20.000 +00:00 [FTL] my-app·junk: Hello, 123 & 456!
120
+ `,
121
+ );
122
+ });
123
+
124
+ test("getFileSink()", () => {
125
+ const path = makeTempFileSync();
126
+ const sink: Sink & Disposable = getFileSink(path);
127
+ sink(debug);
128
+ sink(info);
129
+ sink(warning);
130
+ sink(error);
131
+ sink(fatal);
132
+ sink[Symbol.dispose]();
133
+ assertEquals(
134
+ fs.readFileSync(path, { encoding: "utf-8" }),
135
+ `\
136
+ 2023-11-14 22:13:20.000 +00:00 [DBG] my-app·junk: Hello, 123 & 456!
137
+ 2023-11-14 22:13:20.000 +00:00 [INF] my-app·junk: Hello, 123 & 456!
138
+ 2023-11-14 22:13:20.000 +00:00 [WRN] my-app·junk: Hello, 123 & 456!
139
+ 2023-11-14 22:13:20.000 +00:00 [ERR] my-app·junk: Hello, 123 & 456!
140
+ 2023-11-14 22:13:20.000 +00:00 [FTL] my-app·junk: Hello, 123 & 456!
141
+ `,
142
+ );
143
+ });
144
+
145
+ test("getRotatingFileSink()", () => {
146
+ const path = makeTempFileSync();
147
+ const sink: Sink & Disposable = getRotatingFileSink(path, {
148
+ maxSize: 150,
149
+ });
150
+ sink(debug);
151
+ assertEquals(
152
+ fs.readFileSync(path, { encoding: "utf-8" }),
153
+ "2023-11-14 22:13:20.000 +00:00 [DBG] my-app·junk: Hello, 123 & 456!\n",
154
+ );
155
+ sink(info);
156
+ assertEquals(
157
+ fs.readFileSync(path, { encoding: "utf-8" }),
158
+ `\
159
+ 2023-11-14 22:13:20.000 +00:00 [DBG] my-app·junk: Hello, 123 & 456!
160
+ 2023-11-14 22:13:20.000 +00:00 [INF] my-app·junk: Hello, 123 & 456!
161
+ `,
162
+ );
163
+ sink(warning);
164
+ assertEquals(
165
+ fs.readFileSync(path, { encoding: "utf-8" }),
166
+ "2023-11-14 22:13:20.000 +00:00 [WRN] my-app·junk: Hello, 123 & 456!\n",
167
+ );
168
+ assertEquals(
169
+ fs.readFileSync(`${path}.1`, { encoding: "utf-8" }),
170
+ `\
171
+ 2023-11-14 22:13:20.000 +00:00 [DBG] my-app·junk: Hello, 123 & 456!
172
+ 2023-11-14 22:13:20.000 +00:00 [INF] my-app·junk: Hello, 123 & 456!
173
+ `,
174
+ );
175
+ sink(error);
176
+ assertEquals(
177
+ fs.readFileSync(path, { encoding: "utf-8" }),
178
+ `\
179
+ 2023-11-14 22:13:20.000 +00:00 [WRN] my-app·junk: Hello, 123 & 456!
180
+ 2023-11-14 22:13:20.000 +00:00 [ERR] my-app·junk: Hello, 123 & 456!
181
+ `,
182
+ );
183
+ assertEquals(
184
+ fs.readFileSync(`${path}.1`, { encoding: "utf-8" }),
185
+ `\
186
+ 2023-11-14 22:13:20.000 +00:00 [DBG] my-app·junk: Hello, 123 & 456!
187
+ 2023-11-14 22:13:20.000 +00:00 [INF] my-app·junk: Hello, 123 & 456!
188
+ `,
189
+ );
190
+ sink(fatal);
191
+ sink[Symbol.dispose]();
192
+ assertEquals(
193
+ fs.readFileSync(path, { encoding: "utf-8" }),
194
+ "2023-11-14 22:13:20.000 +00:00 [FTL] my-app·junk: Hello, 123 & 456!\n",
195
+ );
196
+ assertEquals(
197
+ fs.readFileSync(`${path}.1`, { encoding: "utf-8" }),
198
+ `\
199
+ 2023-11-14 22:13:20.000 +00:00 [WRN] my-app·junk: Hello, 123 & 456!
200
+ 2023-11-14 22:13:20.000 +00:00 [ERR] my-app·junk: Hello, 123 & 456!
201
+ `,
202
+ );
203
+ assertEquals(
204
+ fs.readFileSync(`${path}.2`, { encoding: "utf-8" }),
205
+ `\
206
+ 2023-11-14 22:13:20.000 +00:00 [DBG] my-app·junk: Hello, 123 & 456!
207
+ 2023-11-14 22:13:20.000 +00:00 [INF] my-app·junk: Hello, 123 & 456!
208
+ `,
209
+ );
210
+
211
+ const dirPath = fs.mkdtempSync(join(tmpdir(), "logtape-"));
212
+ const path2 = join(dirPath, "log");
213
+ const sink2: Sink & Disposable = getRotatingFileSink(path2, {
214
+ maxSize: 150,
215
+ });
216
+ sink2(debug);
217
+ assertEquals(
218
+ fs.readFileSync(path2, { encoding: "utf-8" }),
219
+ "2023-11-14 22:13:20.000 +00:00 [DBG] my-app·junk: Hello, 123 & 456!\n",
220
+ );
221
+ sink2[Symbol.dispose]();
222
+ });
223
+
224
+ // cSpell: ignore filesink
package/mod.ts ADDED
@@ -0,0 +1,7 @@
1
+ export type {
2
+ FileSinkDriver,
3
+ FileSinkOptions,
4
+ RotatingFileSinkDriver,
5
+ RotatingFileSinkOptions,
6
+ } from "./filesink.base.ts";
7
+ export { getFileSink, getRotatingFileSink } from "#filesink";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logtape/file",
3
- "version": "0.11.0-dev.175+f9a2339c",
3
+ "version": "0.12.0-dev.181+e4f33b9d",
4
4
  "description": "File sink and rotating file sink for LogTape",
5
5
  "keywords": [
6
6
  "logging",
@@ -10,6 +10,7 @@
10
10
  "sink",
11
11
  "rotating"
12
12
  ],
13
+ "license": "MIT",
13
14
  "author": {
14
15
  "name": "Hong Minhee",
15
16
  "email": "hong@minhee.org",
@@ -21,38 +22,49 @@
21
22
  "url": "git+https://github.com/dahlia/logtape.git",
22
23
  "directory": "file/"
23
24
  },
24
- "license": "MIT",
25
25
  "bugs": {
26
26
  "url": "https://github.com/dahlia/logtape/issues"
27
27
  },
28
- "main": "./script/file/mod.js",
29
- "module": "./esm/file/mod.js",
30
- "types": "./types/file/mod.d.ts",
28
+ "funding": [
29
+ "https://github.com/sponsors/dahlia"
30
+ ],
31
+ "type": "module",
32
+ "module": "./dist/mod.js",
33
+ "main": "./dist/mod.cjs",
34
+ "types": "./dist/mod.d.ts",
31
35
  "exports": {
32
36
  ".": {
33
- "import": {
34
- "types": "./types/file/mod.d.ts",
35
- "default": "./esm/file/mod.js"
36
- },
37
- "require": {
38
- "types": "./types/file/mod.d.ts",
39
- "default": "./script/file/mod.js"
40
- }
41
- }
37
+ "import": "./dist/mod.js",
38
+ "require": "./dist/mod.cjs",
39
+ "types": "./dist/mod.d.ts"
40
+ },
41
+ "./package.json": "./package.json"
42
42
  },
43
- "scripts": {
44
- "test": "node test_runner.js"
43
+ "imports": {
44
+ "#filesink": {
45
+ "bun": "./dist/filesink.node.js",
46
+ "deno": "./dist/filesink.deno.js",
47
+ "import": "./dist/filesink.node.js",
48
+ "require": "./dist/filesink.node.cjs",
49
+ "types": "./dist/filesink.node.d.ts"
50
+ }
45
51
  },
46
- "funding": [
47
- "https://github.com/sponsors/dahlia"
48
- ],
49
- "dependencies": {
50
- "@logtape/logtape": "^0.11.0-dev.174"
52
+ "peerDependencies": {
53
+ "@logtape/logtape": "0.12.0-dev.181+e4f33b9d"
51
54
  },
52
55
  "devDependencies": {
53
- "@types/node": "^20.9.0",
54
- "picocolors": "^1.0.0",
55
- "@deno/shim-deno": "~0.18.0"
56
+ "@david/which-runtime": "npm:@jsr/david__which-runtime@^0.2.1",
57
+ "@hongminhee/suite": "^0.6.2",
58
+ "@std/assert": "npm:@jsr/std__assert@^1.0.13",
59
+ "@std/path": "npm:@jsr/std__path@^1.1.0",
60
+ "tsdown": "^0.12.7",
61
+ "typescript": "^5.8.3"
56
62
  },
57
- "_generatedBy": "dnt@dev"
63
+ "scripts": {
64
+ "build": "tsdown",
65
+ "test": "tsdown && node --experimental-transform-types --test",
66
+ "test:bun": "tsdown && bun test",
67
+ "test:deno": "deno test --allow-read --allow-write --allow-env=TEMP,TMP,TMPDIR",
68
+ "test-all": "tsdown && node --experimental-transform-types --test && bun test && deno test"
69
+ }
58
70
  }
@@ -0,0 +1,22 @@
1
+ import { defineConfig } from "tsdown";
2
+
3
+ export default defineConfig({
4
+ entry: ["mod.ts", "filesink.deno.ts", "filesink.node.ts"],
5
+ dts: {
6
+ sourcemap: true,
7
+ },
8
+ format: ["esm", "cjs"],
9
+ platform: "neutral",
10
+ unbundle: true,
11
+ inputOptions: {
12
+ onLog(level, log, defaultHandler) {
13
+ if (
14
+ level === "warn" && log.code === "UNRESOLVED_IMPORT" &&
15
+ ["node:fs", "#filesink"].includes(log.exporter ?? "")
16
+ ) {
17
+ return;
18
+ }
19
+ defaultHandler(level, log);
20
+ },
21
+ },
22
+ });
@@ -1,85 +0,0 @@
1
- import { defaultTextFormatter, } from "@logtape/logtape";
2
- /**
3
- * Get a platform-independent file sink.
4
- *
5
- * @typeParam TFile The type of the file descriptor.
6
- * @param path A path to the file to write to.
7
- * @param options The options for the sink and the file driver.
8
- * @returns A sink that writes to the file. The sink is also a disposable
9
- * object that closes the file when disposed.
10
- */
11
- export function getBaseFileSink(path, options) {
12
- const formatter = options.formatter ?? defaultTextFormatter;
13
- const encoder = options.encoder ?? new TextEncoder();
14
- let fd = options.lazy ? null : options.openSync(path);
15
- const sink = (record) => {
16
- if (fd === null) {
17
- fd = options.openSync(path);
18
- }
19
- options.writeSync(fd, encoder.encode(formatter(record)));
20
- options.flushSync(fd);
21
- };
22
- sink[Symbol.dispose] = () => {
23
- if (fd !== null) {
24
- options.closeSync(fd);
25
- }
26
- };
27
- return sink;
28
- }
29
- /**
30
- * Get a platform-independent rotating file sink.
31
- *
32
- * This sink writes log records to a file, and rotates the file when it reaches
33
- * the `maxSize`. The rotated files are named with the original file name
34
- * followed by a dot and a number, starting from 1. The number is incremented
35
- * for each rotation, and the maximum number of files to keep is `maxFiles`.
36
- *
37
- * @param path A path to the file to write to.
38
- * @param options The options for the sink and the file driver.
39
- * @returns A sink that writes to the file. The sink is also a disposable
40
- * object that closes the file when disposed.
41
- */
42
- export function getBaseRotatingFileSink(path, options) {
43
- const formatter = options.formatter ?? defaultTextFormatter;
44
- const encoder = options.encoder ?? new TextEncoder();
45
- const maxSize = options.maxSize ?? 1024 * 1024;
46
- const maxFiles = options.maxFiles ?? 5;
47
- let offset = 0;
48
- try {
49
- const stat = options.statSync(path);
50
- offset = stat.size;
51
- }
52
- catch {
53
- // Continue as the offset is already 0.
54
- }
55
- let fd = options.openSync(path);
56
- function shouldRollover(bytes) {
57
- return offset + bytes.length > maxSize;
58
- }
59
- function performRollover() {
60
- options.closeSync(fd);
61
- for (let i = maxFiles - 1; i > 0; i--) {
62
- const oldPath = `${path}.${i}`;
63
- const newPath = `${path}.${i + 1}`;
64
- try {
65
- options.renameSync(oldPath, newPath);
66
- }
67
- catch (_) {
68
- // Continue if the file does not exist.
69
- }
70
- }
71
- options.renameSync(path, `${path}.1`);
72
- offset = 0;
73
- fd = options.openSync(path);
74
- }
75
- const sink = (record) => {
76
- const bytes = encoder.encode(formatter(record));
77
- if (shouldRollover(bytes))
78
- performRollover();
79
- options.writeSync(fd, bytes);
80
- options.flushSync(fd);
81
- offset += bytes.length;
82
- };
83
- sink[Symbol.dispose] = () => options.closeSync(fd);
84
- return sink;
85
- }
package/esm/file/mod.js DELETED
@@ -1 +0,0 @@
1
- export { getFileSink, getRotatingFileSink } from "./filesink.node.js";
package/esm/package.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "type": "module"
3
- }
@@ -1,89 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getBaseFileSink = getBaseFileSink;
4
- exports.getBaseRotatingFileSink = getBaseRotatingFileSink;
5
- const logtape_1 = require("@logtape/logtape");
6
- /**
7
- * Get a platform-independent file sink.
8
- *
9
- * @typeParam TFile The type of the file descriptor.
10
- * @param path A path to the file to write to.
11
- * @param options The options for the sink and the file driver.
12
- * @returns A sink that writes to the file. The sink is also a disposable
13
- * object that closes the file when disposed.
14
- */
15
- function getBaseFileSink(path, options) {
16
- const formatter = options.formatter ?? logtape_1.defaultTextFormatter;
17
- const encoder = options.encoder ?? new TextEncoder();
18
- let fd = options.lazy ? null : options.openSync(path);
19
- const sink = (record) => {
20
- if (fd === null) {
21
- fd = options.openSync(path);
22
- }
23
- options.writeSync(fd, encoder.encode(formatter(record)));
24
- options.flushSync(fd);
25
- };
26
- sink[Symbol.dispose] = () => {
27
- if (fd !== null) {
28
- options.closeSync(fd);
29
- }
30
- };
31
- return sink;
32
- }
33
- /**
34
- * Get a platform-independent rotating file sink.
35
- *
36
- * This sink writes log records to a file, and rotates the file when it reaches
37
- * the `maxSize`. The rotated files are named with the original file name
38
- * followed by a dot and a number, starting from 1. The number is incremented
39
- * for each rotation, and the maximum number of files to keep is `maxFiles`.
40
- *
41
- * @param path A path to the file to write to.
42
- * @param options The options for the sink and the file driver.
43
- * @returns A sink that writes to the file. The sink is also a disposable
44
- * object that closes the file when disposed.
45
- */
46
- function getBaseRotatingFileSink(path, options) {
47
- const formatter = options.formatter ?? logtape_1.defaultTextFormatter;
48
- const encoder = options.encoder ?? new TextEncoder();
49
- const maxSize = options.maxSize ?? 1024 * 1024;
50
- const maxFiles = options.maxFiles ?? 5;
51
- let offset = 0;
52
- try {
53
- const stat = options.statSync(path);
54
- offset = stat.size;
55
- }
56
- catch {
57
- // Continue as the offset is already 0.
58
- }
59
- let fd = options.openSync(path);
60
- function shouldRollover(bytes) {
61
- return offset + bytes.length > maxSize;
62
- }
63
- function performRollover() {
64
- options.closeSync(fd);
65
- for (let i = maxFiles - 1; i > 0; i--) {
66
- const oldPath = `${path}.${i}`;
67
- const newPath = `${path}.${i + 1}`;
68
- try {
69
- options.renameSync(oldPath, newPath);
70
- }
71
- catch (_) {
72
- // Continue if the file does not exist.
73
- }
74
- }
75
- options.renameSync(path, `${path}.1`);
76
- offset = 0;
77
- fd = options.openSync(path);
78
- }
79
- const sink = (record) => {
80
- const bytes = encoder.encode(formatter(record));
81
- if (shouldRollover(bytes))
82
- performRollover();
83
- options.writeSync(fd, bytes);
84
- options.flushSync(fd);
85
- offset += bytes.length;
86
- };
87
- sink[Symbol.dispose] = () => options.closeSync(fd);
88
- return sink;
89
- }
@@ -1,55 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.nodeDriver = void 0;
7
- exports.getFileSink = getFileSink;
8
- exports.getRotatingFileSink = getRotatingFileSink;
9
- const node_fs_1 = __importDefault(require("node:fs"));
10
- const filesink_base_js_1 = require("./filesink.base.js");
11
- /**
12
- * A Node.js-specific file sink driver.
13
- */
14
- exports.nodeDriver = {
15
- openSync(path) {
16
- return node_fs_1.default.openSync(path, "a");
17
- },
18
- writeSync: node_fs_1.default.writeSync,
19
- flushSync: node_fs_1.default.fsyncSync,
20
- closeSync: node_fs_1.default.closeSync,
21
- statSync: node_fs_1.default.statSync,
22
- renameSync: node_fs_1.default.renameSync,
23
- };
24
- /**
25
- * Get a file sink.
26
- *
27
- * Note that this function is unavailable in the browser.
28
- *
29
- * @param path A path to the file to write to.
30
- * @param options The options for the sink.
31
- * @returns A sink that writes to the file. The sink is also a disposable
32
- * object that closes the file when disposed.
33
- */
34
- function getFileSink(path, options = {}) {
35
- return (0, filesink_base_js_1.getBaseFileSink)(path, { ...options, ...exports.nodeDriver });
36
- }
37
- /**
38
- * Get a rotating file sink.
39
- *
40
- * This sink writes log records to a file, and rotates the file when it reaches
41
- * the `maxSize`. The rotated files are named with the original file name
42
- * followed by a dot and a number, starting from 1. The number is incremented
43
- * for each rotation, and the maximum number of files to keep is `maxFiles`.
44
- *
45
- * Note that this function is unavailable in the browser.
46
- *
47
- * @param path A path to the file to write to.
48
- * @param options The options for the sink and the file driver.
49
- * @returns A sink that writes to the file. The sink is also a disposable
50
- * object that closes the file when disposed.
51
- */
52
- function getRotatingFileSink(path, options = {}) {
53
- return (0, filesink_base_js_1.getBaseRotatingFileSink)(path, { ...options, ...exports.nodeDriver });
54
- }
55
- // cSpell: ignore filesink
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getRotatingFileSink = exports.getFileSink = void 0;
4
- var filesink_node_js_1 = require("./filesink.node.js");
5
- Object.defineProperty(exports, "getFileSink", { enumerable: true, get: function () { return filesink_node_js_1.getFileSink; } });
6
- Object.defineProperty(exports, "getRotatingFileSink", { enumerable: true, get: function () { return filesink_node_js_1.getRotatingFileSink; } });
@@ -1,3 +0,0 @@
1
- {
2
- "type": "commonjs"
3
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"_dnt.test_shims.d.ts","sourceRoot":"","sources":["../src/_dnt.test_shims.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAKvC,eAAO,MAAM,aAAa;;CAA2C,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@david/which-runtime/0.2.1/mod.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,MAAM,EAAE,OAA4C,CAAC;AAClE,eAAO,MAAM,MAAM,EAAE,OAAsB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"_constants.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.222.1/_constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,eAAe,qBAAqB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"_diff.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.222.1/_diff.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,QAAQ;;;;CAIX,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,QAAQ,CAAC;AAE7C,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,CAAC,CAAC;IACT,OAAO,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;CAChC;AA4BD;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CA+L5D;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,wBAsI3C;AAwCD,wBAAgB,YAAY,CAC1B,UAAU,EAAE,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,EAC7C,EAAE,UAAkB,EAAE;;CAAK,GAC1B,MAAM,EAAE,CAyBV"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"_format.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.222.1/_format.ts"],"names":[],"mappings":"AAYA,wBAAgB,MAAM,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAezC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"assert_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.222.1/assert_equals.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,EACZ,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,CAAA;CAAO,QAuBzD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"assert_is_error.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.222.1/assert_is_error.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,EACnD,KAAK,EAAE,OAAO,EAEd,UAAU,CAAC,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EACtC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAC5B,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,KAAK,IAAI,CAAC,CAmCpB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"assert_throws.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.222.1/assert_throws.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,YAAY,CAC1B,EAAE,EAAE,MAAM,OAAO,EACjB,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC;AACX;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,EAClD,EAAE,EAAE,MAAM,OAAO,EAEjB,UAAU,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EACrC,WAAW,CAAC,EAAE,MAAM,EACpB,GAAG,CAAC,EAAE,MAAM,GACX,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"assertion_error.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.222.1/assertion_error.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC,iCAAiC;gBACrB,OAAO,EAAE,MAAM;CAI5B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"equal.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.222.1/equal.ts"],"names":[],"mappings":"AAYA;;;;;;;;;;;;GAYG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,CA8FrD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/fmt/0.222.1/colors.ts"],"names":[],"mappings":"AAkEA,qEAAqE;AACrE,MAAM,WAAW,GAAG;IAClB,0BAA0B;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,4BAA4B;IAC5B,CAAC,EAAE,MAAM,CAAC;IACV,2BAA2B;IAC3B,CAAC,EAAE,MAAM,CAAC;CACX;AAID;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,QAM7C;AAED,4DAA4D;AAC5D,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AA0BD;;;GAGG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAExC;AAED;;;;;;GAMG;AACH,wBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEvC;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE1C;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE3C;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE1C;AAED;;;GAGG;AACH,wBAAgB,aAAa,C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AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEjD;AAcD;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,MAAM,CAuB9D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,MAAM,CAuBhE;AAWD;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEpD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"assert_path.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/path/1.1.0/_common/assert_path.ts"],"names":[],"mappings":"AAGA,wBAAgB,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,QAMvC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/path/1.1.0/_common/constants.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAGpC,eAAO,MAAM,QAAQ,KAAK,CAAC;AAC3B,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACr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MAAM,KAAK,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"from_file_url.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/path/1.1.0/_common/from_file_url.ts"],"names":[],"mappings":"AAGA,wBAAgB,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,OAQ1C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/path/1.1.0/_common/normalize.ts"],"names":[],"mappings":"AAKA,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,mBAGrC"}