feat: migrate workbench to React

This commit is contained in:
2026-08-26 15:01:07 +08:00
parent f15e69c868
commit 3ddb33e321
48 changed files with 16748 additions and 1509 deletions

View File

@@ -1,14 +1,14 @@
#!/usr/bin/env node
"use strict";
'use strict';
const path = require("path");
const { startWorkbench } = require("../workbench/server");
const fs = require("fs");
const path = require('path');
const { startWorkbench } = require('../workbench/server');
const fs = require('fs');
const args = process.argv.slice(2);
const index = args.indexOf("--input");
const index = args.indexOf('--input');
const inputFile = index >= 0 && args[index + 1] ? path.resolve(args[index + 1]) : null;
const input = inputFile ? JSON.parse(fs.readFileSync(inputFile, "utf8")) : null;
const portIndex = args.indexOf("--port");
const input = inputFile ? JSON.parse(fs.readFileSync(inputFile, 'utf8')) : null;
const portIndex = args.indexOf('--port');
const port = portIndex >= 0 ? Number(args[portIndex + 1]) : 8787;
startWorkbench({ input, inputFile, repoRoot: path.resolve(__dirname, ".."), port });
startWorkbench({ input, inputFile, repoRoot: path.resolve(__dirname, '..'), port });