synapse-gateway 2.0.0 → 2.0.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/bin/synapse.js +20 -6
- package/package.json +15 -2
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'
|
|
65
|
-
|
|
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
|
|
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
|
|
198
|
-
|
|
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.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Synapse - AI Gateway & Intelligence Platform with Neural Router, Semantic Cache, Persistent Memory, Self-Learning, and 5+ AI Providers",
|
|
5
|
-
"keywords": [
|
|
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": {
|