{"_id":"@adze/transport-file","_rev":"5-b84ec3976ae9b4f765b0e6ac1b53fd08","name":"@adze/transport-file","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@adze/transport-file","version":"1.0.0","keywords":["typescript","logging","javascript","node","browser","file","middleware"],"author":{"name":"Andrew Stacy","email":"ajstacy@gmail.com"},"license":"Apache-2.0","_id":"@adze/transport-file@1.0.0","maintainers":[{"name":"ajstacy","email":"ajstacy@gmail.com"}],"homepage":"https://github.com/adzejs/transport-file#readme","bugs":{"url":"https://github.com/adzejs/transport-file/issues"},"dist":{"shasum":"e04b19b7510163e88ac0691a3f685fa9d81df9f0","tarball":"https://registry.npmjs.org/@adze/transport-file/-/transport-file-1.0.0.tgz","fileCount":13,"integrity":"sha512-IwbNPaeN9j/cUd3zqTRwlIYkUoPm3pwCZ28oS/1IgWTPqqKVH9XnebgQwwohV0qM6eVcDPYmJ9Rfo/Tqaln1dw==","signatures":[{"sig":"MEQCIEGJwj8d8HKSrLkw1tR1rmZim9+5IerxhFuqzdV/6tK6AiASGf913JvGdstXVXNSuu29AzMpRyIePxJQ5DoXaB8ItA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19899},"main":"dist/index.js","type":"module","config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"engines":{"node":">=18.19.0"},"gitHead":"cd7b220263958e61a93ba781199d1be31b6ee2cf","release":{"branches":["main"]},"scripts":{"lint":"prettier ./src --check && eslint .","size":"size-limit","test":"vitest","build":"tsc --project tsconfig.prod.json && tsc-alias","clean":"rm -rf ./dist","prepare":"husky","test:ui":"vitest --ui --disable-console-intercept","lint:fix":"prettier ./src --write && eslint . --fix","prebuild":"npm run clean"},"_npmUser":{"name":"ajstacy","email":"ajstacy@gmail.com"},"repository":{"url":"git+https://github.com/adzejs/transport-file.git","type":"git"},"size-limit":[{"path":"dist/index.js"}],"_npmVersion":"10.8.3","description":"AdzeJS middleware to write logs to rotating log files.","directories":{},"lint-staged":{"**/*":"prettier --write --ignore-unknown"},"_nodeVersion":"20.17.0","dependencies":{"file-stream-rotator":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.0.11","jsdom":"^24.1.0","eslint":"^8.57.0","vitest":"^2.0.4","prettier":"3.3.2","happy-dom":"^15.7.4","tsc-alias":"^1.8.10","@eslint/js":"^9.5.0","commitizen":"^4.3.0","size-limit":"^11.1.4","typescript":"^5.5.2","lint-staged":"^15.2.7","@types/jsdom":"^21.1.7","@types/eslint__js":"^8.42.3","typescript-eslint":"^7.14.1","eslint-config-prettier":"^9.1.0","cz-conventional-changelog":"^3.3.0","@size-limit/preset-small-lib":"^11.1.4","@types/eslint-config-prettier":"^6.11.3"},"peerDependencies":{"adze":"^2.0.9"},"_npmOperationalInternal":{"tmp":"tmp/transport-file_1.0.0_1726232470961_0.0474559273908981","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@adze/transport-file","version":"1.0.1","keywords":["typescript","logging","javascript","node","browser","file","middleware"],"author":{"name":"Andrew Stacy","email":"ajstacy@gmail.com"},"license":"Apache-2.0","_id":"@adze/transport-file@1.0.1","maintainers":[{"name":"ajstacy","email":"ajstacy@gmail.com"}],"homepage":"https://github.com/adzejs/transport-file#readme","bugs":{"url":"https://github.com/adzejs/transport-file/issues"},"dist":{"shasum":"692d8bec4838db97d3da7afa26353e0f5a4b593a","tarball":"https://registry.npmjs.org/@adze/transport-file/-/transport-file-1.0.1.tgz","fileCount":13,"integrity":"sha512-rIQxLUMaq5slBsWWkJPKANCGOBno5mbxhSEzVT+rbyepkZI0efNqkj6Dj0cjdtH1/4h8U2zGZEdHdhwUzuVKzg==","signatures":[{"sig":"MEQCIEUCMlknc8779EGvYvSHCC6VLZf5cCKqM7ZWoFfiHFuXAiBghrnJk82WsDfqX8TQ5Wae9gHNRVv7kVkjUZerjc++oQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20595},"main":"dist/index.js","type":"module","config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"engines":{"node":">=18.19.0"},"gitHead":"695c8858edcb786fb8f6ef0d2acb40f98e2e2eaa","release":{"branches":["main"]},"scripts":{"lint":"prettier ./src --check && eslint .","size":"size-limit","test":"vitest","build":"tsc --project tsconfig.prod.json && tsc-alias","clean":"rm -rf ./dist","prepare":"husky","test:ui":"vitest --ui --disable-console-intercept","lint:fix":"prettier ./src --write && eslint . --fix","prebuild":"npm run clean"},"_npmUser":{"name":"ajstacy","email":"ajstacy@gmail.com"},"repository":{"url":"git+https://github.com/adzejs/transport-file.git","type":"git"},"size-limit":[{"path":"dist/index.js"}],"_npmVersion":"10.8.3","description":"AdzeJS middleware to write logs to rotating log files.","directories":{},"lint-staged":{"**/*":"prettier --write --ignore-unknown"},"_nodeVersion":"20.17.0","dependencies":{"strip-ansi":"^7.1.0","file-stream-rotator":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.0.11","jsdom":"^24.1.0","eslint":"^8.57.0","vitest":"^2.0.4","prettier":"3.3.2","happy-dom":"^15.7.4","tsc-alias":"^1.8.10","@eslint/js":"^9.5.0","commitizen":"^4.3.0","size-limit":"^11.1.4","typescript":"^5.5.2","lint-staged":"^15.2.7","@types/jsdom":"^21.1.7","@types/eslint__js":"^8.42.3","typescript-eslint":"^7.14.1","eslint-config-prettier":"^9.1.0","cz-conventional-changelog":"^3.3.0","@size-limit/preset-small-lib":"^11.1.4","@types/eslint-config-prettier":"^6.11.3"},"peerDependencies":{"adze":"^2.0.9"},"_npmOperationalInternal":{"tmp":"tmp/transport-file_1.0.1_1726236905063_0.3157838902722172","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@adze/transport-file","version":"1.0.2","keywords":["typescript","logging","javascript","node","browser","file","middleware"],"author":{"name":"Andrew Stacy","email":"ajstacy@gmail.com"},"license":"Apache-2.0","_id":"@adze/transport-file@1.0.2","maintainers":[{"name":"ajstacy","email":"ajstacy@gmail.com"}],"homepage":"https://github.com/adzejs/transport-file#readme","bugs":{"url":"https://github.com/adzejs/transport-file/issues"},"dist":{"shasum":"3ed42c6852ae9cfafbbab9ea28f29789b2a8b1ee","tarball":"https://registry.npmjs.org/@adze/transport-file/-/transport-file-1.0.2.tgz","fileCount":13,"integrity":"sha512-mlqrOjbJGPuzcqZ/2sm2qJbOqJDqTB+SzvKY5Mbi7hdf54/CrgG857YjhDx1Om23BKKpybFNkl2HFTs3armfnw==","signatures":[{"sig":"MEQCIA57GHP6lVn/wMD03GfZcm8d1zEM0u72yIudg2sZDoIpAiAx711trjW1PY7yPN5v2YBLUQD1TdFpwt/HZEkcPZq7cw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20561},"main":"dist/index.js","type":"module","config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"engines":{"node":">=18.19.0"},"gitHead":"6e74486707e984bf8bb12c714f8d4f11a8b14bfb","release":{"branches":["main"]},"scripts":{"lint":"prettier ./src --check && eslint .","size":"size-limit","test":"vitest","build":"tsc --project tsconfig.prod.json && tsc-alias","clean":"rm -rf ./dist","prepare":"husky","test:ui":"vitest --ui --disable-console-intercept","lint:fix":"prettier ./src --write && eslint . --fix","prebuild":"npm run clean"},"_npmUser":{"name":"ajstacy","email":"ajstacy@gmail.com"},"repository":{"url":"git+https://github.com/adzejs/transport-file.git","type":"git"},"size-limit":[{"path":"dist/index.js"}],"_npmVersion":"10.8.3","description":"AdzeJS middleware to write logs to rotating log files.","directories":{},"lint-staged":{"**/*":"prettier --write --ignore-unknown"},"_nodeVersion":"20.17.0","dependencies":{"strip-ansi":"^7.1.0","file-stream-rotator":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.0.11","jsdom":"^24.1.0","eslint":"^8.57.0","vitest":"^2.0.4","prettier":"3.3.2","happy-dom":"^15.7.4","tsc-alias":"^1.8.10","@eslint/js":"^9.5.0","commitizen":"^4.3.0","size-limit":"^11.1.4","typescript":"^5.5.2","lint-staged":"^15.2.7","@types/jsdom":"^21.1.7","@types/eslint__js":"^8.42.3","typescript-eslint":"^7.14.1","eslint-config-prettier":"^9.1.0","cz-conventional-changelog":"^3.3.0","@size-limit/preset-small-lib":"^11.1.4","@types/eslint-config-prettier":"^6.11.3"},"peerDependencies":{"adze":"^2.0.9"},"_npmOperationalInternal":{"tmp":"tmp/transport-file_1.0.2_1726241111443_0.31607208962557043","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@adze/transport-file","version":"1.0.3","keywords":["typescript","logging","javascript","node","browser","file","middleware"],"author":{"name":"Andrew Stacy","email":"ajstacy@gmail.com"},"license":"Apache-2.0","_id":"@adze/transport-file@1.0.3","maintainers":[{"name":"ajstacy","email":"ajstacy@gmail.com"}],"homepage":"https://github.com/adzejs/transport-file#readme","bugs":{"url":"https://github.com/adzejs/transport-file/issues"},"dist":{"shasum":"01e6fda265e994d9825f28d13881bd6cc4eadadf","tarball":"https://registry.npmjs.org/@adze/transport-file/-/transport-file-1.0.3.tgz","fileCount":13,"integrity":"sha512-RmEn2o3DgiBW2saZ05JRTyZJqIJ7FqmUCJjuXcUMphT4uz6b+/t+AXYr/D9lWNBTrVnME/KjPkWzP1AbQyEVVw==","signatures":[{"sig":"MEUCIQD6YJ4wl7MTYTpa3H57Xl3JyeiuiaDt48Bn2ZE7Y/xW9AIgHBFwi3ErzyMH3REhQ0lzJVtarLb+vpN/JrUWPWy1ZA4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20590},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"module":"dist/index.js","engines":{"node":">=18.19.0"},"gitHead":"ad3cff4869f170b97aba92e19f3296d090567fa9","release":{"branches":["main"]},"scripts":{"lint":"prettier ./src --check && eslint .","size":"size-limit","test":"vitest","build":"tsc --project tsconfig.prod.json && tsc-alias","clean":"rm -rf ./dist","prepare":"husky","test:ui":"vitest --ui --disable-console-intercept","lint:fix":"prettier ./src --write && eslint . --fix","prebuild":"npm run clean"},"_npmUser":{"name":"ajstacy","email":"ajstacy@gmail.com"},"repository":{"url":"git+https://github.com/adzejs/transport-file.git","type":"git"},"size-limit":[{"path":"dist/index.js"}],"_npmVersion":"10.9.0","description":"AdzeJS middleware to write logs to rotating log files.","directories":{},"lint-staged":{"**/*":"prettier --write --ignore-unknown"},"_nodeVersion":"20.18.0","dependencies":{"strip-ansi":"^7.1.0","file-stream-rotator":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.0.11","jsdom":"^24.1.0","eslint":"^8.57.0","vitest":"^2.0.4","prettier":"3.3.2","happy-dom":"^15.7.4","tsc-alias":"^1.8.10","@eslint/js":"^9.5.0","commitizen":"^4.3.0","size-limit":"^11.1.4","typescript":"^5.5.2","lint-staged":"^15.2.7","@types/jsdom":"^21.1.7","@types/eslint__js":"^8.42.3","typescript-eslint":"^7.14.1","eslint-config-prettier":"^9.1.0","cz-conventional-changelog":"^3.3.0","@size-limit/preset-small-lib":"^11.1.4","@types/eslint-config-prettier":"^6.11.3"},"peerDependencies":{"adze":"^2.0.9"},"_npmOperationalInternal":{"tmp":"tmp/transport-file_1.0.3_1729693007287_0.9369058517202933","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@adze/transport-file","description":"AdzeJS middleware to write logs to rotating log files.","version":"1.1.0","main":"dist/index.js","module":"dist/index.js","type":"module","engines":{"node":">=18.19.0"},"scripts":{"prebuild":"npm run clean","build":"tsc --project tsconfig.prod.json && tsc-alias","clean":"rm -rf ./dist","lint":"prettier ./src --check && eslint .","lint:fix":"prettier ./src --write && eslint . --fix","test":"vitest","test:ui":"vitest --ui --disable-console-intercept","prepare":"husky","size":"size-limit"},"repository":{"type":"git","url":"git+https://github.com/adzejs/transport-file.git"},"publishConfig":{"access":"public"},"keywords":["typescript","logging","javascript","node","browser","file","middleware"],"author":{"name":"Andrew Stacy","email":"ajstacy@gmail.com"},"license":"Apache-2.0","bugs":{"url":"https://github.com/adzejs/transport-file/issues"},"homepage":"https://github.com/adzejs/transport-file#readme","devDependencies":{"@eslint/js":"^9.5.0","@size-limit/preset-small-lib":"^11.1.4","@types/eslint__js":"^8.42.3","@types/eslint-config-prettier":"^6.11.3","@types/jsdom":"^21.1.7","commitizen":"^4.3.0","cz-conventional-changelog":"^3.3.0","eslint":"^8.57.0","eslint-config-prettier":"^9.1.0","fs-jetpack":"^5.1.0","happy-dom":"^15.7.4","husky":"^9.0.11","jsdom":"^24.1.0","lint-staged":"^15.2.7","prettier":"3.3.2","size-limit":"^11.1.4","tsc-alias":"^1.8.10","typescript":"^5.5.2","typescript-eslint":"^7.14.1","vitest":"^2.0.4"},"lint-staged":{"**/*":"prettier --write --ignore-unknown"},"dependencies":{"file-stream-rotator":"^1.0.0","strip-ansi":"^7.1.0"},"size-limit":[{"path":"dist/index.js"}],"peerDependencies":{"adze":"^2.0.9"},"release":{"branches":["main"]},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"67c09a8593becbf1199cb958110fa3a8d5d84f9f","types":"./dist/index.d.ts","_id":"@adze/transport-file@1.1.0","_nodeVersion":"24.11.1","_npmVersion":"11.7.0","dist":{"integrity":"sha512-r9ZMRBrNK8BReJa42Dv3KfqSK2nG5pP0EkDvUZrHvs3J/3eIF2DjTfVuosxOwmK3P7cgM1YDDlONyiN52/nCgg==","shasum":"8095ee9da2082452601885195db1cfa5423b6591","tarball":"https://registry.npmjs.org/@adze/transport-file/-/transport-file-1.1.0.tgz","fileCount":13,"unpackedSize":24084,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDz37suMXH0+MhbFpMh5oYMCUsxUQ1XI/s/NjV8heDfsAIgFxEkw6aSvrFQLIbhIX6VUWKfcU+vESa6fC7UaLmf1cE="}]},"_npmUser":{"name":"ajstacy","email":"ajstacy@gmail.com"},"directories":{},"maintainers":[{"name":"ajstacy","email":"ajstacy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/transport-file_1.1.0_1765823253698_0.33704980787951566"},"_hasShrinkwrap":false}},"time":{"created":"2024-09-13T13:01:10.842Z","modified":"2025-12-15T18:27:34.080Z","1.0.0":"2024-09-13T13:01:11.112Z","1.0.1":"2024-09-13T14:15:05.247Z","1.0.2":"2024-09-13T15:25:11.635Z","1.0.3":"2024-10-23T14:16:47.479Z","1.1.0":"2025-12-15T18:27:33.857Z"},"bugs":{"url":"https://github.com/adzejs/transport-file/issues"},"author":{"name":"Andrew Stacy","email":"ajstacy@gmail.com"},"license":"Apache-2.0","homepage":"https://github.com/adzejs/transport-file#readme","keywords":["typescript","logging","javascript","node","browser","file","middleware"],"repository":{"type":"git","url":"git+https://github.com/adzejs/transport-file.git"},"description":"AdzeJS middleware to write logs to rotating log files.","maintainers":[{"name":"ajstacy","email":"ajstacy@gmail.com"}],"readme":"# @adze/transport-file\n\n`@adze/transport-file` is a middleware plugin for [AdzeJS](https://adzejs.com) writing logs to\nautomatically rotating log files.\n\nThis library is built on top of [file-stream-rotator](https://github.com/rogerc/file-stream-rotator#readme)\nand exposes most of its configuration directly with some minor differences.\n\n## Installation\n\n```bash\n# npm\nnpm i -S @adze/transport-file\n\n#pnpm\npnpm add @adze/transport-file\n```\n\n## Project Requirements\n\nThis plugin has a peer dependency on `adze`.\n\n| Runtime    | Version      |\n| ---------- | ------------ |\n| node       | `>= 18.19.x` |\n| bun        | `>= 1.1.26`  |\n| deno       | `>= 1.46.3`  |\n| typescript | `>= 5.5.2`   |\n\n## Usage\n\n```typescript\nimport adze, { setup } from 'adze';\nimport TransportFile from '@adze/transport-file';\n\nconst fileTransport = new TransportFile({ directory: './logs' });\nawait fileTransport.load();\n\nsetup({\n  // ...your other options\n  middleware: [fileTransport],\n});\n```\n\n## Configuration\n\n`@adze/transport-file` exposes all of the configuration options of [file-stream-rotator](https://github.com/rogerc/file-stream-rotator?tab=readme-ov-file#options) directly, with an additional `directory` option.\n\nIf the **`directory`** option is declared, then `@adze/transport-file` will use it with a default log\nfilename pattern. If the **`filename`** option is declared, then **it will take precedence** over the\n`directory` option. Setting directory will also simultaneously set the location of the `audit.json`\nfile to be the same as the rotating log files.\n\nTo configure event callbacks, you may also provide the callback functions in the configuration.\n\nRefer to this interface below for all additional options provided by this plugin.\n\n```typescript\ninterface AdzeTransportFileOptions extends Partial<FileStreamRotatorOptions> {\n  /**\n   * Shortcut property for defining the target log directory and audit file directory.\n   */\n  directory?: string;\n  /**\n   * Callback for hooking into the open event.\n   */\n  onOpen?: () => void;\n  /**\n   * Callback for hooking into the close event.\n   */\n  onClose?: () => void;\n  /**\n   * Callback for hooking into the error event.\n   */\n  onError?: (err: Error) => void;\n  /**\n   * Callback for hooking into the finish event.\n   */\n  onFinish?: () => void;\n  /**\n   * Callback for hooking into the rotate event when a log file is rotated.\n   */\n  onRotate?: () => void;\n  /**\n   * Callback for hooking into the new file event when a new log file is created.\n   */\n  onNew?: (newFile: string) => void;\n  /**\n   * Callback for hooking into the log removed event when a log file is removed.\n   */\n  onLogRemoved?: (date: number, name: string, hash: string) => void;\n}\n```\n\nFor a guide on the options, please visit the readme of **file-stream-rotator**: [**Options**](https://github.com/rogerc/file-stream-rotator?tab=readme-ov-file#options).\n","readmeFilename":"readme.md"}