synapse-gateway 2.0.0 → 2.0.2

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.
Files changed (2) hide show
  1. package/bin/synapse.js +20 -6
  2. package/package.json +22 -9
package/bin/synapse.js CHANGED
@@ -61,8 +61,19 @@ function buildIfNeeded() {
61
61
 
62
62
  console.log('⚡ Building Synapse (first time)...');
63
63
  try {
64
- const nextBin = process.platform === 'win32' ? 'npx.cmd' : 'npx';
65
- execSync(`"${nextBin}" next build`, { cwd: PKG_DIR, stdio: 'inherit' });
64
+ const nextBin = process.platform === 'win32'
65
+ ? path.join(PKG_DIR, 'node_modules', '.bin', 'next.cmd')
66
+ : path.join(PKG_DIR, 'node_modules', '.bin', 'next');
67
+ if (!fs.existsSync(nextBin) && process.platform === 'win32') {
68
+ const alt = path.join(PKG_DIR, 'node_modules', 'next', 'dist', 'bin', 'next');
69
+ if (fs.existsSync(alt)) {
70
+ execSync(`node "${alt}" build`, { cwd: PKG_DIR, stdio: 'inherit' });
71
+ } else {
72
+ throw new Error('next binary not found');
73
+ }
74
+ } else {
75
+ execSync(`"${nextBin}" build`, { cwd: PKG_DIR, stdio: 'inherit' });
76
+ }
66
77
  copyDir(
67
78
  path.join(PKG_DIR, '.next', 'static'),
68
79
  path.join(standaloneDir, '.next', 'static')
@@ -72,8 +83,9 @@ function buildIfNeeded() {
72
83
  path.join(standaloneDir, 'public')
73
84
  );
74
85
  console.log('⚡ Build complete!');
75
- } catch {
76
- console.error('❌ Build failed. Try running manually: npm run build');
86
+ } catch (e) {
87
+ console.error('❌ Build failed:', e.message);
88
+ console.error(' Try running: npm run build');
77
89
  process.exit(1);
78
90
  }
79
91
  }
@@ -194,8 +206,10 @@ function showVersion() {
194
206
  function startDev() {
195
207
  const PKG_DIR = getPkgDir();
196
208
  console.log(`⚡ Starting Synapse in dev mode on http://localhost:${PORT}`);
197
- const cmd = process.platform === 'win32' ? 'npx.cmd' : 'npx';
198
- const child = spawn(cmd, ['next', 'dev', '-p', PORT], {
209
+ const nextBin = process.platform === 'win32'
210
+ ? path.join(PKG_DIR, 'node_modules', '.bin', 'next.cmd')
211
+ : path.join(PKG_DIR, 'node_modules', '.bin', 'next');
212
+ const child = spawn(process.execPath, [nextBin, 'dev', '-p', String(PORT)], {
199
213
  cwd: PKG_DIR,
200
214
  stdio: 'inherit',
201
215
  env: { ...process.env, PORT },
package/package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "name": "synapse-gateway",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Synapse - AI Gateway & Intelligence Platform with Neural Router, Semantic Cache, Persistent Memory, Self-Learning, and 5+ AI Providers",
5
- "keywords": ["ai", "ai-gateway", "llm", "openai", "anthropic", "gemini", "deepseek", "openrouter", "semantic-cache", "neural-router", "mcp", "sqlite"],
5
+ "keywords": [
6
+ "ai",
7
+ "ai-gateway",
8
+ "llm",
9
+ "openai",
10
+ "anthropic",
11
+ "gemini",
12
+ "deepseek",
13
+ "openrouter",
14
+ "semantic-cache",
15
+ "neural-router",
16
+ "mcp",
17
+ "sqlite"
18
+ ],
6
19
  "author": "kevindoni",
7
20
  "license": "MIT",
8
21
  "repository": {
@@ -64,16 +77,16 @@
64
77
  "tailwindcss": "^4",
65
78
  "typescript": "^5",
66
79
  "uuid": "^14.0.0",
67
- "zod": "^4.4.3"
68
- },
69
- "devDependencies": {
70
- "@playwright/test": "^1.60.0",
71
- "@types/bcryptjs": "^2.4.6",
72
- "@types/better-sqlite3": "^7.6.13",
80
+ "zod": "^4.4.3",
73
81
  "@types/node": "^20",
74
82
  "@types/react": "^19",
75
83
  "@types/react-dom": "^19",
76
- "@types/uuid": "^10.0.0",
84
+ "@types/bcryptjs": "^2.4.6",
85
+ "@types/better-sqlite3": "^7.6.13",
86
+ "@types/uuid": "^10.0.0"
87
+ },
88
+ "devDependencies": {
89
+ "@playwright/test": "^1.60.0",
77
90
  "drizzle-kit": "^0.31.10",
78
91
  "eslint": "^9",
79
92
  "eslint-config-next": "16.2.7",