synabun 2026.3.303 → 2026.3.304
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/package.json +1 -1
- package/setup.js +7 -15
package/package.json
CHANGED
package/setup.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { execSync, spawn, exec } from 'node:child_process';
|
|
16
|
-
import { existsSync, readFileSync
|
|
16
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
17
17
|
import { resolve, dirname } from 'node:path';
|
|
18
18
|
import { fileURLToPath } from 'node:url';
|
|
19
19
|
import { platform } from 'node:os';
|
|
@@ -64,7 +64,7 @@ function installDeps(name, dir) {
|
|
|
64
64
|
|
|
65
65
|
info(`Installing ${name} dependencies...`);
|
|
66
66
|
try {
|
|
67
|
-
execSync('npm install', {
|
|
67
|
+
execSync('npm install --omit=dev --ignore-scripts', {
|
|
68
68
|
cwd: dir,
|
|
69
69
|
stdio: 'inherit',
|
|
70
70
|
timeout: 300_000,
|
|
@@ -110,14 +110,7 @@ function installPlaywrightChromium() {
|
|
|
110
110
|
|
|
111
111
|
function needsBuild() {
|
|
112
112
|
const distIndex = resolve(__dirname, 'mcp-server', 'dist', 'index.js');
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
const srcIndex = resolve(__dirname, 'mcp-server', 'src', 'index.ts');
|
|
116
|
-
try {
|
|
117
|
-
return statSync(srcIndex).mtimeMs > statSync(distIndex).mtimeMs;
|
|
118
|
-
} catch {
|
|
119
|
-
return true;
|
|
120
|
-
}
|
|
113
|
+
return !existsSync(distIndex);
|
|
121
114
|
}
|
|
122
115
|
|
|
123
116
|
function buildMcpServer() {
|
|
@@ -126,18 +119,17 @@ function buildMcpServer() {
|
|
|
126
119
|
return;
|
|
127
120
|
}
|
|
128
121
|
|
|
129
|
-
|
|
122
|
+
// dist/ ships pre-built in the npm package — build is a fallback only
|
|
123
|
+
warn('MCP server dist/ not found — attempting build (requires TypeScript)');
|
|
130
124
|
try {
|
|
131
|
-
execSync('
|
|
125
|
+
execSync('npx tsc', {
|
|
132
126
|
cwd: resolve(__dirname, 'mcp-server'),
|
|
133
127
|
stdio: 'pipe',
|
|
134
128
|
timeout: 60_000,
|
|
135
129
|
});
|
|
136
130
|
ok('MCP server built');
|
|
137
131
|
} catch (err) {
|
|
138
|
-
|
|
139
|
-
console.error(err.stderr?.toString() || err.message);
|
|
140
|
-
process.exit(1);
|
|
132
|
+
warn('MCP server build failed (TypeScript not available) — reinstall with: npm install -g synabun@latest');
|
|
141
133
|
}
|
|
142
134
|
}
|
|
143
135
|
|