llm-simple-router 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/cli.js ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ // npm bin 入口 — 无条件启动服务器
3
+ import { main } from "./index.js";
4
+ main();
package/dist/index.d.ts CHANGED
@@ -11,3 +11,4 @@ export declare function buildApp(options?: AppOptions): Promise<{
11
11
  db: Database.Database;
12
12
  close: () => Promise<void>;
13
13
  }>;
14
+ export declare function main(): Promise<void>;
package/dist/index.js CHANGED
@@ -113,7 +113,7 @@ export async function buildApp(options) {
113
113
  },
114
114
  };
115
115
  }
116
- async function main() {
116
+ export async function main() {
117
117
  const { app } = await buildApp();
118
118
  const config = getConfig();
119
119
  try {
@@ -125,6 +125,7 @@ async function main() {
125
125
  process.exit(1);
126
126
  }
127
127
  }
128
+ // 开发时直接运行 tsx src/index.ts 仍可启动
128
129
  const isMainModule = process.argv[1]?.endsWith("index.js") || process.argv[1]?.endsWith("index.ts");
129
130
  if (isMainModule) {
130
131
  main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "llm-simple-router",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "LLM API proxy router with OpenAI/Anthropic support, model mapping, retry strategies, and admin dashboard",
5
5
  "license": "MIT",
6
6
  "author": "ZzzzSsssWwww",
@@ -25,7 +25,7 @@
25
25
  "node": ">=20.0.0"
26
26
  },
27
27
  "bin": {
28
- "llm-simple-router": "./dist/index.js"
28
+ "llm-simple-router": "./dist/cli.js"
29
29
  },
30
30
  "files": [
31
31
  "dist/",