commit
216dabec6f
8
.github/workflows/build.yaml
vendored
8
.github/workflows/build.yaml
vendored
@ -5,6 +5,8 @@ on:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
- hotfix
|
||||
- hotfix/*
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
@ -24,13 +26,13 @@ jobs:
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22.x'
|
||||
cache: 'npm'
|
||||
cache: 'yarn'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Build all
|
||||
run: npm run build
|
||||
run: yarn build
|
||||
|
||||
- name: Package VSIX
|
||||
run: npx vsce package --out dist/openmcp.vsix
|
||||
|
10
.github/workflows/test.yaml
vendored
10
.github/workflows/test.yaml
vendored
@ -5,6 +5,8 @@ on:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
- hotfix
|
||||
- hotfix/*
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
@ -24,10 +26,10 @@ jobs:
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22.x'
|
||||
cache: 'npm'
|
||||
cache: 'yarn'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Install xvfb (Linux only)
|
||||
if: runner.os == 'Linux'
|
||||
@ -35,8 +37,8 @@ jobs:
|
||||
|
||||
- name: Run Test with XVFB (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
run: xvfb-run --auto-servernum npm run test
|
||||
run: xvfb-run --auto-servernum yarn test
|
||||
|
||||
- name: Run Test (Windows/macOS)
|
||||
if: runner.os != 'Linux'
|
||||
run: npm run test
|
||||
run: yarn test
|
@ -168,4 +168,4 @@ Then just press F5, いただきます (Let's begin)
|
||||
✅ npm run build:task-loop
|
||||
✅ openmcp-client UT
|
||||
✅ openmcp-sdk UT
|
||||
✅ vscode extension UT
|
||||
✅ vscode extension UT
|
||||
|
@ -8,9 +8,13 @@ build({
|
||||
format: 'cjs',
|
||||
outfile: 'dist/extension.cjs.js',
|
||||
sourcemap: true,
|
||||
external: ['vscode'], // 只排除 vscode,其他依赖全部打包进来
|
||||
target: ['node18'], // 你可以根据实际 node 版本调整
|
||||
external: ['vscode'],
|
||||
target: ['node22'],
|
||||
loader: {
|
||||
'.json': 'json'
|
||||
}
|
||||
},
|
||||
define: { 'import.meta.url': '_importMetaUrl' },
|
||||
banner: {
|
||||
js: "const _importMetaUrl=require('url').pathToFileURL(__filename)",
|
||||
},
|
||||
}).catch(() => process.exit(1));
|
9261
package-lock.json
generated
9261
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
11
package.json
11
package.json
@ -4,6 +4,7 @@
|
||||
"description": "An all in one MCP Client/TestTool",
|
||||
"version": "0.1.8",
|
||||
"publisher": "kirigaya",
|
||||
"private": true,
|
||||
"author": {
|
||||
"name": "kirigaya",
|
||||
"email": "1193466151@qq.com"
|
||||
@ -220,14 +221,14 @@
|
||||
"renderer"
|
||||
],
|
||||
"scripts": {
|
||||
"setup": "npm i && npm run prepare:ocr",
|
||||
"setup": "yarn install && yarn prepare:ocr",
|
||||
"serve": "turbo serve",
|
||||
"build": "turbo build && tsc -p ./ && node esbuild.config.js",
|
||||
"build:plugin": "npm run build && tsc && vsce package",
|
||||
"build:plugin": "yarn build && tsc && vsce package",
|
||||
"vscode:prepublish": "node esbuild.config.js",
|
||||
"compile": "tsc -p ./",
|
||||
"watch": "tsc -watch -p ./",
|
||||
"pretest": "npm run build",
|
||||
"pretest": "yarn build",
|
||||
"lint": "eslint src --ext ts",
|
||||
"test": "node ./dist/test/e2e/runTest.js",
|
||||
"prepare:ocr": "rollup -c rollup.tesseract.js --bundleConfigAsCjs",
|
||||
@ -288,5 +289,5 @@
|
||||
"webpack": "^5.99.5",
|
||||
"webpack-cli": "^5.1.4"
|
||||
},
|
||||
"packageManager": "npm@10.0.0"
|
||||
}
|
||||
"packageManager": "yarn@1.22.22"
|
||||
}
|
4713
renderer/package-lock.json
generated
4713
renderer/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -62,5 +62,7 @@
|
||||
"vite": "^6.2.4",
|
||||
"vite-plugin-vue-devtools": "^7.7.2",
|
||||
"vue-tsc": "^2.2.8"
|
||||
}
|
||||
},
|
||||
"main": "index.js",
|
||||
"license": "MIT"
|
||||
}
|
||||
|
4633
service/package-lock.json
generated
4633
service/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -6,13 +6,13 @@
|
||||
"types": "dist/index.d.ts",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"serve": "nodemon --watch src --exec tsx src/main.ts",
|
||||
"serve": "tsx watch src/main.ts",
|
||||
"build": "tsc",
|
||||
"build:watch": "tsc --watch",
|
||||
"postbuild": "node ./scripts/post-build.mjs",
|
||||
"start": "node --experimental-specifier-resolution=node dist/main.js",
|
||||
"start:prod": "NODE_ENV=production node --experimental-specifier-resolution=node dist/main.js",
|
||||
"debug": "node --inspect --no-warnings=ExperimentalWarning -r tsx/esm src/main.ts",
|
||||
"start": "node dist/main.js",
|
||||
"start:prod": "NODE_ENV=production node dist/main.js",
|
||||
"debug": "tsx --inspect src/main.ts",
|
||||
"clean": "rm -rf dist",
|
||||
"lint": "eslint src --ext .ts,.tsx",
|
||||
"typecheck": "tsc --noEmit"
|
||||
@ -50,4 +50,4 @@
|
||||
"uuid": "^11.1.0",
|
||||
"ws": "^8.18.1"
|
||||
}
|
||||
}
|
||||
}
|
@ -13,9 +13,6 @@ export interface VSCodeMessage {
|
||||
callbackId?: string;
|
||||
}
|
||||
|
||||
// 适配 ESM 的 __dirname
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
// 统一路径变量
|
||||
const devHome = join(__dirname, '..', '..');
|
||||
|
@ -9,9 +9,6 @@ import path from 'path';
|
||||
import { setRunningCWD } from './hook/setting.js';
|
||||
import { exit } from 'process';
|
||||
|
||||
// 适配 ESM 的 __dirname
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
export interface VSCodeMessage {
|
||||
command: string;
|
||||
|
Loading…
x
Reference in New Issue
Block a user