set-link-transfer
Version:
Create JWT-protected download links for text or files, with zip & TTL support
50 lines (40 loc) • 2.77 kB
Markdown
0.1.0 / 2025-08-24
==================
* feat: initial release
* feat: POST /upload – create time-limited download links for text or local files
* feat: GET /download/:token – stream single files or auto-zip multiple items
* chore: MIT License
0.1.1 / 2025-08-30
==================
* fix: debug logging improvements
0.1.21 / 2025-09-01
==================
* feat: support custom upload and download route paths via uploadPath and downloadPath options
* remove: drop fn parameter — users can no longer customize downloaded filename
* remove: sanitize-filename dependency; filenames no longer derived from user input
* feat: all downloads now use generated id as filename for consistency and security
* feat: improve JWT error handling — distinguish expired tokens (410 Gone) from invalid/missing tokens (401 Unauthorized)
2.0.0 / 2025-09-13
==================
* BREAKING: migrated to pure ESM (`"type":"module"`) and TypeScript; source files must be compiled before use
* BREAKING: requires Node.js ≥ 18.0.0 (engines field added)
* feat: full TypeScript support with auto-generated `.d.ts` and strict type exports
* feat: path-traversal protection — any attempt to upload outside the working directory now returns 400 Bad Request
* feat: concurrent-download guard — simultaneous requests for the same id return 409 Conflict until the first stream ends
* feat: enhanced JWT security — secret length ≥ 32 enforced; `none` algorithm explicitly rejected; configurable algorithm via `jwtAlgo`
* feat: structured request logging via `pino-http` for production observability
* feat: refined HTTP status codes — missing file during download now returns 422 Unprocessable Entity
* feat: ZIP archive errors (missing files, read failures) are caught and logged; client receives 500 instead of truncated response
* feat: added comprehensive test suite (22 test paths, 100 % branch coverage) covering uploads, downloads, JWT edge-cases, security, ZIP and concurrency scenarios
* feat: CI ready — GitHub Actions workflow for Node 18/20/22 on Ubuntu & Windows with coverage upload to Codecov
* feat: example environment and Docker Compose template added for quick start
* docs: error-code table added to README
* chore: migrated build pipeline to `tsup` — zero-config, tree-shakeable, minified output
* chore: removed `sanitize-filename` dependency completely
* chore: internal streams now properly destroyed on error to prevent file-descriptor leaks
* remove: support for CommonJS `require()` — package is ESM-only
* remove: legacy JSDoc types — types now ship via generated `.d.ts`
2.0.1 / 2025-09-13
==================
* fix: debug and update the doc
* warn: 2.0.0 and 2.0.1 are not stable