Lobby
This commit is contained in:
1 parent
73a2db8bb8
commit
44cf31ce6b
231 files changed
+3396887
-1109081
No files matched your search
@@ -0,0 +1,10 @@
|
||||
// node tools/mcp/exec.js <file.lua> [Edit|Server|Client] — выполнить Luau-файл в Studio через MCP
|
||||
const fs = require('fs'), path = require('path'), os = require('os'), { execFileSync } = require('child_process');
|
||||
const code = fs.readFileSync(process.argv[2], 'utf8').replace(/^/, '');
|
||||
const tmp = path.join(os.tmpdir(), 'fishing-mcp-steps-' + process.pid + '.json');
|
||||
fs.writeFileSync(tmp, JSON.stringify([{ tool: 'execute_luau', args: { datamodel_type: process.argv[3] || 'Edit', code } }]));
|
||||
try {
|
||||
process.stdout.write(execFileSync('node', [path.join(__dirname, 'run.js'), tmp], { encoding: 'utf8', maxBuffer: 1 << 26 }));
|
||||
} finally {
|
||||
fs.unlinkSync(tmp);
|
||||
}
|
||||
Reference in new issue
Block a user