Some checks failed
Docker image / build-and-push-image (push) Has been cancelled
Closes the gap flagged in #27 review: the wiring that actually closes #24 (step-4 Token join filtered by liveWhere) was untested — only the pure predicate was. Now covered end-to-end against a throwaway SQLite DB + the real prisma client. Harness (no new dependency; pnpm add is blocked by the nix node_modules hoist pattern): - tests/register-ts.cjs: ts-node (transpile-only) + a CommonJS resolver that maps the app's '.js' ESM-style specifiers to their '.ts' sources. - node:test temp DB via 'prisma db push'; a before() guard refuses to run unless DATABASE_URL points at tests/.tmp/ (never truncates a real DB). - npm run test:integration / test:all. 13 cases incl. the #24 regression guard (expired token -> denied), revoke, connect-off-live-token, override expiry/revoke ignored, deny-beats-grant, kind mismatch, no-KeyUser. Also: acl/index.ts NDK import -> 'import type' (NostrEvent/NIP46Method are type-only) so the ACL module no longer pulls ESM-only NDK at runtime — required for the CommonJS test import, and a correct cleanup besides. Requires the prisma engine env (CI/nix ok; devShell pending #30). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
76 lines
2.2 KiB
JSON
76 lines
2.2 KiB
JSON
{
|
|
"name": "nsecbunkerd",
|
|
"version": "0.10.5",
|
|
"description": "nsecbunker daemon",
|
|
"main": "dist/index.js",
|
|
"bin": {
|
|
"nsecbunkerd": "dist/index.js",
|
|
"nsecbunker-client": "dist/client/client.js"
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"scripts/start.js",
|
|
"prisma/schema.prisma",
|
|
"LICENSE",
|
|
"README.md"
|
|
],
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/kind-0/nsecbunkerd"
|
|
},
|
|
"scripts": {
|
|
"build": "tsup src/index.ts; tsup src/daemon/index.ts -d dist/daemon; tsup src/client.ts -d dist/client",
|
|
"build:client": "tsup src/client.ts -d dist/client",
|
|
"test": "TS_NODE_TRANSPILE_ONLY=1 node -r ts-node/register --test tests/lifecycle.test.ts",
|
|
"test:integration": "DATABASE_URL=\"file:./tests/.tmp/acl-int.db\" node -r ./tests/register-ts.cjs --test tests/acl.integration.test.ts",
|
|
"test:all": "npm run test && npm run test:integration",
|
|
"prisma:generate": "npx prisma generate",
|
|
"prisma:migrate": "npx prisma migrate deploy",
|
|
"prisma:create": "npx prisma db push --preview-feature",
|
|
"start": "node ./scripts/start.js",
|
|
"lfg": "node ./scripts/start.js start",
|
|
"nsecbunkerd": "node dist/index.js",
|
|
"client": "node dist/client/client.js"
|
|
},
|
|
"keywords": [
|
|
"nostr"
|
|
],
|
|
"author": "pablof7z",
|
|
"license": "MIT",
|
|
"dependencies": {
|
|
"@fastify/formbody": "^7.4.0",
|
|
"@fastify/view": "^8.2.0",
|
|
"@inquirer/password": "^1.1.2",
|
|
"@inquirer/prompts": "^1.2.3",
|
|
"@nostr-dev-kit/ndk": "3.0.3",
|
|
"@prisma/client": "^6.19.0",
|
|
"@scure/base": "^1.1.1",
|
|
"@types/yargs": "^17.0.24",
|
|
"axios": "^1.6.2",
|
|
"bcrypt": "^5.1.1",
|
|
"crypto-js": "^4.2.0",
|
|
"debug": "^4.3.4",
|
|
"dotenv": "^16.3.1",
|
|
"eslint-config-prettier": "^8.8.0",
|
|
"eslint-plugin-import": "^2.27.5",
|
|
"eventemitter3": "^5.0.1",
|
|
"express": "^4.18.2",
|
|
"fastify": "^4.24.3",
|
|
"handlebars": "^4.7.8",
|
|
"isomorphic-ws": "^5.0.0",
|
|
"lnbits": "^1.1.5",
|
|
"lnbits-ts": "^0.0.2",
|
|
"nostr-tools": "~2.20.0",
|
|
"websocket-polyfill": "^0.0.3",
|
|
"ws": "^8.13.0",
|
|
"yargs": "^17.7.2"
|
|
},
|
|
"devDependencies": {
|
|
"@types/debug": "^4.1.8",
|
|
"@types/node": "^18.16.18",
|
|
"prisma": "^6.19.0",
|
|
"ts-node": "^10.9.1",
|
|
"tsup": "^7.2.0",
|
|
"typescript": "^5.1.3"
|
|
}
|
|
}
|