Files
RaptorQR/package.json
T
Hermes Agent a7773b5c0a feat(cli): make installable as qr-terminal bin; fix cursor positioning
- Add 'bin' field to package.json so npm/npx/bunx can invoke it as
  'qr-terminal'. The bin points to dist/qr-terminal.js.
- Change shebang to '#!/usr/bin/env node' for universal compatibility.
- Fix displaced chars: each frame write now ends with '\n' and
  moveCursorUp() appends '\x1b[G' to move to column 0. Previously the
  cursor stayed at the end of the previous last line, causing redraws
  to start mid-line.
- Position QR at top-left (removed padTop/padLeft centre logic) since
  the alt-buffer is clean and only the QR is shown.
- Update help text to show npx/bunx invocations.
2026-05-03 22:27:30 +00:00

37 lines
907 B
JSON

{
"name": "qr",
"module": "index.ts",
"type": "module",
"private": true,
"bin": {
"qr-terminal": "dist/qr-terminal.js"
},
"scripts": {
"dev": "vite",
"build": "vite build && npm run build:cli",
"preview": "vite preview",
"test": "vitest run",
"test:watch": "vitest",
"cli": "bun run src/cli/qr-terminal.ts",
"cli:file": "bun run src/cli/qr-terminal.ts",
"build:cli": "esbuild src/cli/qr-terminal.ts --bundle --platform=node --target=node18 --outfile=dist/qr-terminal.js --format=esm --external:node:*"
},
"devDependencies": {
"@preact/preset-vite": "2",
"@types/bun": "latest",
"happy-dom": "17",
"vite": "6",
"vitest": "3"
},
"peerDependencies": {
"typescript": "5.7.3"
},
"dependencies": {
"fflate": "^0.8.2",
"gifenc": "^1.0.3",
"jsqr": "^1.4.0",
"preact": "10.26.5",
"qrcode-generator": "1"
}
}