Merge pull request #41 from LSTM-Kirigaya/hotfix

包管理器换成yarn
This commit is contained in:
Li Yaning 2025-06-22 16:21:44 +08:00 committed by GitHub
commit 216dabec6f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 6016 additions and 18635 deletions

View File

@ -5,6 +5,8 @@ on:
branches: branches:
- main - main
- dev - dev
- hotfix
- hotfix/*
release: release:
types: types:
- published - published
@ -24,13 +26,13 @@ jobs:
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: '22.x' node-version: '22.x'
cache: 'npm' cache: 'yarn'
- name: Install dependencies - name: Install dependencies
run: npm ci run: yarn install --frozen-lockfile
- name: Build all - name: Build all
run: npm run build run: yarn build
- name: Package VSIX - name: Package VSIX
run: npx vsce package --out dist/openmcp.vsix run: npx vsce package --out dist/openmcp.vsix

View File

@ -5,6 +5,8 @@ on:
branches: branches:
- main - main
- dev - dev
- hotfix
- hotfix/*
release: release:
types: types:
- published - published
@ -24,10 +26,10 @@ jobs:
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: '22.x' node-version: '22.x'
cache: 'npm' cache: 'yarn'
- name: Install dependencies - name: Install dependencies
run: npm ci run: yarn install --frozen-lockfile
- name: Install xvfb (Linux only) - name: Install xvfb (Linux only)
if: runner.os == 'Linux' if: runner.os == 'Linux'
@ -35,8 +37,8 @@ jobs:
- name: Run Test with XVFB (Linux) - name: Run Test with XVFB (Linux)
if: runner.os == '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) - name: Run Test (Windows/macOS)
if: runner.os != 'Linux' if: runner.os != 'Linux'
run: npm run test run: yarn test

View File

@ -8,9 +8,13 @@ build({
format: 'cjs', format: 'cjs',
outfile: 'dist/extension.cjs.js', outfile: 'dist/extension.cjs.js',
sourcemap: true, sourcemap: true,
external: ['vscode'], // 只排除 vscode其他依赖全部打包进来 external: ['vscode'],
target: ['node18'], // 你可以根据实际 node 版本调整 target: ['node22'],
loader: { loader: {
'.json': 'json' '.json': 'json'
} },
define: { 'import.meta.url': '_importMetaUrl' },
banner: {
js: "const _importMetaUrl=require('url').pathToFileURL(__filename)",
},
}).catch(() => process.exit(1)); }).catch(() => process.exit(1));

9261
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -4,6 +4,7 @@
"description": "An all in one MCP Client/TestTool", "description": "An all in one MCP Client/TestTool",
"version": "0.1.8", "version": "0.1.8",
"publisher": "kirigaya", "publisher": "kirigaya",
"private": true,
"author": { "author": {
"name": "kirigaya", "name": "kirigaya",
"email": "1193466151@qq.com" "email": "1193466151@qq.com"
@ -220,14 +221,14 @@
"renderer" "renderer"
], ],
"scripts": { "scripts": {
"setup": "npm i && npm run prepare:ocr", "setup": "yarn install && yarn prepare:ocr",
"serve": "turbo serve", "serve": "turbo serve",
"build": "turbo build && tsc -p ./ && node esbuild.config.js", "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", "vscode:prepublish": "node esbuild.config.js",
"compile": "tsc -p ./", "compile": "tsc -p ./",
"watch": "tsc -watch -p ./", "watch": "tsc -watch -p ./",
"pretest": "npm run build", "pretest": "yarn build",
"lint": "eslint src --ext ts", "lint": "eslint src --ext ts",
"test": "node ./dist/test/e2e/runTest.js", "test": "node ./dist/test/e2e/runTest.js",
"prepare:ocr": "rollup -c rollup.tesseract.js --bundleConfigAsCjs", "prepare:ocr": "rollup -c rollup.tesseract.js --bundleConfigAsCjs",
@ -288,5 +289,5 @@
"webpack": "^5.99.5", "webpack": "^5.99.5",
"webpack-cli": "^5.1.4" "webpack-cli": "^5.1.4"
}, },
"packageManager": "npm@10.0.0" "packageManager": "yarn@1.22.22"
} }

File diff suppressed because it is too large Load Diff

View File

@ -62,5 +62,7 @@
"vite": "^6.2.4", "vite": "^6.2.4",
"vite-plugin-vue-devtools": "^7.7.2", "vite-plugin-vue-devtools": "^7.7.2",
"vue-tsc": "^2.2.8" "vue-tsc": "^2.2.8"
} },
"main": "index.js",
"license": "MIT"
} }

4633
service/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -6,13 +6,13 @@
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
"type": "module", "type": "module",
"scripts": { "scripts": {
"serve": "nodemon --watch src --exec tsx src/main.ts", "serve": "tsx watch src/main.ts",
"build": "tsc", "build": "tsc",
"build:watch": "tsc --watch", "build:watch": "tsc --watch",
"postbuild": "node ./scripts/post-build.mjs", "postbuild": "node ./scripts/post-build.mjs",
"start": "node --experimental-specifier-resolution=node dist/main.js", "start": "node dist/main.js",
"start:prod": "NODE_ENV=production node --experimental-specifier-resolution=node dist/main.js", "start:prod": "NODE_ENV=production node dist/main.js",
"debug": "node --inspect --no-warnings=ExperimentalWarning -r tsx/esm src/main.ts", "debug": "tsx --inspect src/main.ts",
"clean": "rm -rf dist", "clean": "rm -rf dist",
"lint": "eslint src --ext .ts,.tsx", "lint": "eslint src --ext .ts,.tsx",
"typecheck": "tsc --noEmit" "typecheck": "tsc --noEmit"

View File

@ -13,9 +13,6 @@ export interface VSCodeMessage {
callbackId?: string; callbackId?: string;
} }
// 适配 ESM 的 __dirname
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
// 统一路径变量 // 统一路径变量
const devHome = join(__dirname, '..', '..'); const devHome = join(__dirname, '..', '..');

View File

@ -9,9 +9,6 @@ import path from 'path';
import { setRunningCWD } from './hook/setting.js'; import { setRunningCWD } from './hook/setting.js';
import { exit } from 'process'; import { exit } from 'process';
// 适配 ESM 的 __dirname
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
export interface VSCodeMessage { export interface VSCodeMessage {
command: string; command: string;

5983
yarn.lock Normal file

File diff suppressed because it is too large Load Diff