Replace brocli framework with Node's built-in util.parseArgs and a declarative command registry. The CLI no longer hangs after completing because: - DB connections are lazily created and explicitly closed - Winston/Redis logging is excluded from the bundle entirely - process.exit() is always called with proper exit codes Additional improvements: - Bundle size reduced from 5.3MB to 1.2MB (native drivers externalized) - Proper column-aligned table output for list commands - --json flag on list commands for scripting/automation - Per-command --help with usage examples - Execution timing shown on success - Consistent exit codes (0=success, 1=error, 2=usage) - Docker wrapper sets DISABLE_REDIS_LOGS and uses exec
62 lines
2.3 KiB
JSON
62 lines
2.3 KiB
JSON
{
|
|
"name": "@homarr/core",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"license": "Apache-2.0",
|
|
"type": "module",
|
|
"exports": {
|
|
"./infrastructure/redis": "./src/infrastructure/redis/client.ts",
|
|
"./infrastructure/env": "./src/infrastructure/env/index.ts",
|
|
"./infrastructure/logs": "./src/infrastructure/logs/index.ts",
|
|
"./infrastructure/logs/constants": "./src/infrastructure/logs/constants.ts",
|
|
"./infrastructure/logs/env": "./src/infrastructure/logs/env.ts",
|
|
"./infrastructure/logs/error": "./src/infrastructure/logs/error.ts",
|
|
"./infrastructure/db": "./src/infrastructure/db/index.ts",
|
|
"./infrastructure/db/env": "./src/infrastructure/db/env.ts",
|
|
"./infrastructure/db/constants": "./src/infrastructure/db/constants.ts",
|
|
"./infrastructure/db/mapping": "./src/infrastructure/db/mapping.ts",
|
|
"./infrastructure/certificates": "./src/infrastructure/certificates/index.ts",
|
|
"./infrastructure/certificates/hostnames/db/sqlite": "./src/infrastructure/certificates/hostnames/db/sqlite.ts",
|
|
"./infrastructure/certificates/hostnames/db/mysql": "./src/infrastructure/certificates/hostnames/db/mysql.ts",
|
|
"./infrastructure/certificates/hostnames/db/postgresql": "./src/infrastructure/certificates/hostnames/db/postgresql.ts",
|
|
"./infrastructure/dns/init": "./src/infrastructure/dns/init.ts",
|
|
"./infrastructure/http": "./src/infrastructure/http/index.ts",
|
|
"./infrastructure/http/timeout": "./src/infrastructure/http/timeout.ts"
|
|
},
|
|
"typesVersions": {
|
|
"*": {
|
|
"*": [
|
|
"src/*"
|
|
]
|
|
}
|
|
},
|
|
"scripts": {
|
|
"clean": "rm -rf .turbo node_modules",
|
|
"format": "prettier --check . --ignore-path ../../.gitignore",
|
|
"lint": "eslint",
|
|
"typecheck": "tsc --noEmit"
|
|
},
|
|
"prettier": "@homarr/prettier-config",
|
|
"dependencies": {
|
|
"@t3-oss/env-nextjs": "catalog:",
|
|
"better-sqlite3": "catalog:",
|
|
"dns-caching": "catalog:",
|
|
"drizzle-orm": "catalog:",
|
|
"ioredis": "catalog:",
|
|
"mysql2": "catalog:",
|
|
"pg": "catalog:",
|
|
"superjson": "catalog:",
|
|
"winston": "catalog:",
|
|
"zod": "catalog:"
|
|
},
|
|
"devDependencies": {
|
|
"@homarr/eslint-config": "workspace:^0.2.0",
|
|
"@homarr/prettier-config": "workspace:^0.1.0",
|
|
"@homarr/tsconfig": "workspace:^0.1.0",
|
|
"@types/better-sqlite3": "catalog:",
|
|
"@types/pg": "catalog:",
|
|
"eslint": "catalog:",
|
|
"typescript": "catalog:"
|
|
}
|
|
}
|