Files
9router/package.json
asynx6 de680e789f fix(providers): bulk-add API keys no longer overwrite existing keys
Bulk-add named auto-generated keys by paste-line index, blind to existing
connection names. The backend upserts apikey connections by exact name
(connectionsRepo), so a colliding generated name silently replaced an
existing key instead of inserting a new one.

Add a collision-aware planner (src/shared/utils/bulkAdd.js) that gap-fills
the smallest free "<base> <n>" against both existing connection names and
names assigned earlier in the same batch, so a generated name is never
reused and the backend always inserts. Applies to auto-named lines, custom
name|apiKey lines, and Cloudflare name|apiKey|accountId lines.

Wire the planner into AddApiKeyModal and pass existing connection names
from the provider detail page. Add unit tests covering gap-fill, custom
names, Cloudflare 3-part format, and robustness.
2026-07-16 17:20:10 +07:00

61 lines
1.8 KiB
JSON

{
"name": "9router-app",
"version": "0.5.31",
"description": "9Router web dashboard",
"private": true,
"scripts": {
"dev": "next dev --port 20127",
"dev:webpack": "next dev --webpack --port 20127",
"build": "next build --webpack",
"start": "next start --port 20127",
"dev:bun": "bun --bun next dev --webpack --port 20127",
"build:bun": "bun --bun next build --webpack",
"start:bun": "bun ./.next/standalone/server.js",
"cli:pack": "npm --prefix cli run pack:cli",
"cli:publish": "npm --prefix cli run publish:cli"
},
"dependencies": {
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/modifiers": "^9.0.0",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@monaco-editor/react": "^4.7.0",
"@next/third-parties": "^16.2.9",
"@xyflow/react": "^12.10.1",
"bcryptjs": "^3.0.3",
"confbox": "^0.2.4",
"express": "^5.2.1",
"http-proxy-middleware": "^3.0.5",
"jose": "^6.1.3",
"marked": "^18.0.1",
"material-symbols": "^0.44.6",
"monaco-editor": "^0.55.1",
"next": "^16.1.6",
"node-forge": "^1.3.3",
"node-machine-id": "^1.1.12",
"open": "^11.0.0",
"ora": "^9.1.0",
"react": "19.2.4",
"react-dom": "19.2.4",
"react-is": "^16.13.1",
"recharts": "^3.7.0",
"selfsigned": "^5.5.0",
"socks-proxy-agent": "^8.0.5",
"sql.js": "^1.14.1",
"undici": "^7.19.2",
"uuid": "^13.0.0",
"zustand": "^5.0.10"
},
"optionalDependencies": {
"better-sqlite3": "^12.6.2"
},
"comment_better_sqlite3": "kept in optionalDependencies so npm install doesn't fail on systems without build tools — sql.js is used as fallback at runtime",
"devDependencies": {
"@tailwindcss/postcss": "^4.1.18",
"eslint": "^9",
"eslint-config-next": "16.1.6",
"postcss": "^8.5.6",
"tailwindcss": "^4"
}
}