@mdvp/cli 1.10.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/cli.mjs +9 -2
  2. package/package.json +1 -1
package/cli.mjs CHANGED
@@ -360,8 +360,15 @@ async function cmdHire(opts) {
360
360
  await download(extractUrl, `${dir}/extract.js`)
361
361
  .catch(() => {})
362
362
 
363
- if (!existsSync(`${dir}/package.json`)) {
364
- writeFileSync(`${dir}/package.json`, '{"type":"module"}')
363
+ writeFileSync(`${dir}/package.json`, '{"type":"module","dependencies":{"puppeteer":"*"}}')
364
+
365
+ const needsInstall = !existsSync(`${dir}/node_modules/puppeteer`)
366
+ if (needsInstall) {
367
+ process.stderr.write(`${DIM}Installing puppeteer (first run, ~30s)...${R}\n`)
368
+ await new Promise((res, rej) => {
369
+ const child = spawn("npm", ["install", "--prefer-offline"], { cwd: dir, stdio: "inherit" })
370
+ child.on("exit", (code) => code === 0 ? res() : rej(new Error(`npm install failed (${code})`)))
371
+ })
365
372
  }
366
373
 
367
374
  const apiUrl = local ? "http://localhost:7227" : API
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mdvp/cli",
3
- "version": "1.10.0",
3
+ "version": "1.11.0",
4
4
  "description": "Machine Design Vision Protocol — gives agents eyes to understand design quality",
5
5
  "bin": {
6
6
  "mdvp": "./cli.mjs"