stashes 0.1.5 → 0.1.7

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.
package/dist/cli.js CHANGED
@@ -578,7 +578,7 @@ async function captureScreenshot(port, projectPath, stashId) {
578
578
  const stderr = await new Response(proc.stderr).text();
579
579
  throw new Error(`Screenshot failed: ${stderr.substring(0, 200)}`);
580
580
  }
581
- return outputPath;
581
+ return `/api/screenshots/${filename}`;
582
582
  }
583
583
 
584
584
  // ../core/dist/prompt.js
@@ -633,12 +633,12 @@ async function waitForPort(port, timeout) {
633
633
  }
634
634
  async function captureEphemeralScreenshot(worktreePath, projectPath, stashId, port) {
635
635
  const devServer = spawn3({
636
- cmd: ["npm", "run", "dev", "--", "--port", String(port)],
636
+ cmd: ["npm", "run", "dev"],
637
637
  cwd: worktreePath,
638
638
  stdin: "ignore",
639
639
  stdout: "pipe",
640
640
  stderr: "pipe",
641
- env: { ...process.env, PORT: String(port) }
641
+ env: { ...process.env, PORT: String(port), BROWSER: "none" }
642
642
  });
643
643
  try {
644
644
  await waitForPort(port, 60000);
@@ -837,12 +837,12 @@ async function vary(opts) {
837
837
  const screenshotGit = simpleGit3(screenshotWorktree.path);
838
838
  await screenshotGit.checkout(["-f", stash.branch]);
839
839
  const devServer = spawn4({
840
- cmd: ["npm", "run", "dev", "--", "--port", String(port)],
840
+ cmd: ["npm", "run", "dev"],
841
841
  cwd: screenshotWorktree.path,
842
842
  stdin: "ignore",
843
843
  stdout: "pipe",
844
844
  stderr: "pipe",
845
- env: { ...process.env, PORT: String(port) }
845
+ env: { ...process.env, PORT: String(port), BROWSER: "none" }
846
846
  });
847
847
  try {
848
848
  await waitForPort2(port, 60000);
@@ -1035,7 +1035,7 @@ ${sourceCode.substring(0, 3000)}
1035
1035
  case "ready":
1036
1036
  this.broadcast({ type: "stash:status", stashId: event.stashId, status: event.type === "ready" ? "ready" : event.type });
1037
1037
  if (event.type === "ready" && "screenshotPath" in event && event.screenshotPath) {
1038
- this.broadcast({ type: "stash:screenshot", stashId: event.stashId, url: `/api/screenshots/${event.stashId}.png` });
1038
+ this.broadcast({ type: "stash:screenshot", stashId: event.stashId, url: event.screenshotPath });
1039
1039
  }
1040
1040
  break;
1041
1041
  case "error":
@@ -1114,12 +1114,12 @@ ${sourceCode.substring(0, 3000)}
1114
1114
  async startPreviewServer(previewPath) {
1115
1115
  const port = this.worktreeManager.getPreviewPort();
1116
1116
  this.previewServer = Bun.spawn({
1117
- cmd: ["npm", "run", "dev", "--", "--port", String(port)],
1117
+ cmd: ["npm", "run", "dev"],
1118
1118
  cwd: previewPath,
1119
1119
  stdin: "ignore",
1120
1120
  stdout: "pipe",
1121
1121
  stderr: "pipe",
1122
- env: { ...process.env, PORT: String(port) }
1122
+ env: { ...process.env, PORT: String(port), BROWSER: "none" }
1123
1123
  });
1124
1124
  await this.waitForPort(port, 60000);
1125
1125
  }
package/dist/mcp.js CHANGED
@@ -514,7 +514,7 @@ async function captureScreenshot(port, projectPath, stashId) {
514
514
  const stderr = await new Response(proc.stderr).text();
515
515
  throw new Error(`Screenshot failed: ${stderr.substring(0, 200)}`);
516
516
  }
517
- return outputPath;
517
+ return `/api/screenshots/${filename}`;
518
518
  }
519
519
 
520
520
  // ../core/dist/prompt.js
@@ -569,12 +569,12 @@ async function waitForPort(port, timeout) {
569
569
  }
570
570
  async function captureEphemeralScreenshot(worktreePath, projectPath, stashId, port) {
571
571
  const devServer = spawn3({
572
- cmd: ["npm", "run", "dev", "--", "--port", String(port)],
572
+ cmd: ["npm", "run", "dev"],
573
573
  cwd: worktreePath,
574
574
  stdin: "ignore",
575
575
  stdout: "pipe",
576
576
  stderr: "pipe",
577
- env: { ...process.env, PORT: String(port) }
577
+ env: { ...process.env, PORT: String(port), BROWSER: "none" }
578
578
  });
579
579
  try {
580
580
  await waitForPort(port, 60000);
@@ -773,12 +773,12 @@ async function vary(opts) {
773
773
  const screenshotGit = simpleGit3(screenshotWorktree.path);
774
774
  await screenshotGit.checkout(["-f", stash.branch]);
775
775
  const devServer = spawn4({
776
- cmd: ["npm", "run", "dev", "--", "--port", String(port)],
776
+ cmd: ["npm", "run", "dev"],
777
777
  cwd: screenshotWorktree.path,
778
778
  stdin: "ignore",
779
779
  stdout: "pipe",
780
780
  stderr: "pipe",
781
- env: { ...process.env, PORT: String(port) }
781
+ env: { ...process.env, PORT: String(port), BROWSER: "none" }
782
782
  });
783
783
  try {
784
784
  await waitForPort2(port, 60000);
@@ -1165,7 +1165,7 @@ ${sourceCode.substring(0, 3000)}
1165
1165
  case "ready":
1166
1166
  this.broadcast({ type: "stash:status", stashId: event.stashId, status: event.type === "ready" ? "ready" : event.type });
1167
1167
  if (event.type === "ready" && "screenshotPath" in event && event.screenshotPath) {
1168
- this.broadcast({ type: "stash:screenshot", stashId: event.stashId, url: `/api/screenshots/${event.stashId}.png` });
1168
+ this.broadcast({ type: "stash:screenshot", stashId: event.stashId, url: event.screenshotPath });
1169
1169
  }
1170
1170
  break;
1171
1171
  case "error":
@@ -1244,12 +1244,12 @@ ${sourceCode.substring(0, 3000)}
1244
1244
  async startPreviewServer(previewPath) {
1245
1245
  const port = this.worktreeManager.getPreviewPort();
1246
1246
  this.previewServer = Bun.spawn({
1247
- cmd: ["npm", "run", "dev", "--", "--port", String(port)],
1247
+ cmd: ["npm", "run", "dev"],
1248
1248
  cwd: previewPath,
1249
1249
  stdin: "ignore",
1250
1250
  stdout: "pipe",
1251
1251
  stderr: "pipe",
1252
- env: { ...process.env, PORT: String(port) }
1252
+ env: { ...process.env, PORT: String(port), BROWSER: "none" }
1253
1253
  });
1254
1254
  await this.waitForPort(port, 60000);
1255
1255
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stashes",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "type": "module",
5
5
  "description": "Generate AI-powered UI design explorations in your project",
6
6
  "keywords": [