mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-06-12 09:24:29 +02:00
Fix npm audit
This commit is contained in:
Generated
+4351
-3113
File diff suppressed because it is too large
Load Diff
+5
-3
@@ -89,7 +89,10 @@
|
|||||||
"replace-version": "node scripts/replace-version.cjs",
|
"replace-version": "node scripts/replace-version.cjs",
|
||||||
"tauri": "tauri",
|
"tauri": "tauri",
|
||||||
"tauri-before-build": "npm run bootstrap",
|
"tauri-before-build": "npm run bootstrap",
|
||||||
"tauri-before-dev": "workspaces-run --parallel -- npm run --workspaces --if-present dev"
|
"tauri-before-dev": "node scripts/run-workspaces-dev.mjs"
|
||||||
|
},
|
||||||
|
"overrides": {
|
||||||
|
"js-yaml": "^4.1.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "^2.3.10",
|
"@biomejs/biome": "^2.3.10",
|
||||||
@@ -100,7 +103,6 @@
|
|||||||
"nodejs-file-downloader": "^4.13.0",
|
"nodejs-file-downloader": "^4.13.0",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"typescript": "^5.8.3",
|
"typescript": "^5.8.3",
|
||||||
"vitest": "^3.2.4",
|
"vitest": "^3.2.4"
|
||||||
"workspaces-run": "^1.0.2"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
"test": "vitest --run tests"
|
"test": "vitest --run tests"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"openapi-to-postmanv2": "^5.0.0",
|
"openapi-to-postmanv2": "^5.8.0",
|
||||||
"yaml": "^2.4.2"
|
"yaml": "^2.4.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -14,6 +14,6 @@
|
|||||||
"@1password/sdk": "^0.4.0-beta.2"
|
"@1password/sdk": "^0.4.0-beta.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cpx": "^1.5.0"
|
"cpx2": "^8.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,81 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Runs `npm run dev` in parallel for all workspaces that have a dev script.
|
||||||
|
* Handles cleanup of child processes on exit.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { spawn } from 'child_process';
|
||||||
|
import fs from 'fs';
|
||||||
|
import path from 'path';
|
||||||
|
import { fileURLToPath } from 'url';
|
||||||
|
|
||||||
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||||
|
const rootDir = path.join(__dirname, '..');
|
||||||
|
|
||||||
|
// Read root package.json to get workspaces
|
||||||
|
const rootPkg = JSON.parse(fs.readFileSync(path.join(rootDir, 'package.json'), 'utf8'));
|
||||||
|
const workspaces = rootPkg.workspaces || [];
|
||||||
|
|
||||||
|
// Find all workspaces with a dev script
|
||||||
|
const workspacesWithDev = workspaces.filter((ws) => {
|
||||||
|
const pkgPath = path.join(rootDir, ws, 'package.json');
|
||||||
|
if (!fs.existsSync(pkgPath)) return false;
|
||||||
|
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
||||||
|
return pkg.scripts?.dev != null;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (workspacesWithDev.length === 0) {
|
||||||
|
console.log('No workspaces with dev script found');
|
||||||
|
process.exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(`Starting dev for ${workspacesWithDev.length} workspaces...`);
|
||||||
|
|
||||||
|
const children = [];
|
||||||
|
|
||||||
|
// Spawn all dev processes
|
||||||
|
for (const ws of workspacesWithDev) {
|
||||||
|
const cwd = path.join(rootDir, ws);
|
||||||
|
const child = spawn('npm', ['run', 'dev'], {
|
||||||
|
cwd,
|
||||||
|
stdio: 'inherit',
|
||||||
|
shell: process.platform === 'win32',
|
||||||
|
});
|
||||||
|
|
||||||
|
child.on('error', (err) => {
|
||||||
|
console.error(`Error in ${ws}:`, err.message);
|
||||||
|
});
|
||||||
|
|
||||||
|
children.push({ ws, child });
|
||||||
|
}
|
||||||
|
|
||||||
|
// Cleanup function to kill all children
|
||||||
|
function cleanup() {
|
||||||
|
for (const { ws, child } of children) {
|
||||||
|
if (child.exitCode === null) {
|
||||||
|
// Process still running
|
||||||
|
if (process.platform === 'win32') {
|
||||||
|
spawn('taskkill', ['/pid', child.pid, '/f', '/t'], { shell: true });
|
||||||
|
} else {
|
||||||
|
child.kill('SIGTERM');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handle various exit signals
|
||||||
|
process.on('SIGINT', () => {
|
||||||
|
cleanup();
|
||||||
|
process.exit(0);
|
||||||
|
});
|
||||||
|
|
||||||
|
process.on('SIGTERM', () => {
|
||||||
|
cleanup();
|
||||||
|
process.exit(0);
|
||||||
|
});
|
||||||
|
|
||||||
|
process.on('exit', cleanup);
|
||||||
|
|
||||||
|
// Keep the process running
|
||||||
|
process.stdin.resume();
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
"react-dom": "^19.1.0",
|
"react-dom": "^19.1.0",
|
||||||
"react-markdown": "^10.1.0",
|
"react-markdown": "^10.1.0",
|
||||||
"react-pdf": "^10.0.1",
|
"react-pdf": "^10.0.1",
|
||||||
"react-syntax-highlighter": "^15.6.1",
|
"react-syntax-highlighter": "^16.1.0",
|
||||||
"react-use": "^17.6.0",
|
"react-use": "^17.6.0",
|
||||||
"rehype-stringify": "^10.0.1",
|
"rehype-stringify": "^10.0.1",
|
||||||
"remark-frontmatter": "^5.0.0",
|
"remark-frontmatter": "^5.0.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user