bugzero 0.0.17 → 0.0.19

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > bugzero@0.0.17 build D:\WD projects\OpsPilot\packages\cli
2
+ > bugzero@0.0.19 build D:\WD projects\OpsPilot\packages\cli
3
3
  > tsup src/index.ts --format cjs --dts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -7,8 +7,8 @@
7
7
  CLI tsup v8.5.1
8
8
  CLI Target: es2022
9
9
  CJS Build start
10
- CJS dist\index.js 63.10 KB
11
- CJS ⚡️ Build success in 102ms
10
+ CJS dist\index.js 63.40 KB
11
+ CJS ⚡️ Build success in 88ms
12
12
  DTS Build start
13
- DTS ⚡️ Build success in 1876ms
13
+ DTS ⚡️ Build success in 1756ms
14
14
  DTS dist\index.d.ts 20.00 B
package/dist/index.js CHANGED
@@ -1059,6 +1059,8 @@ var require_dist7 = __commonJS({
1059
1059
  }
1060
1060
  var import_analyzers = require_dist2();
1061
1061
  var import_agents = require_dist6();
1062
+ var import_fs2 = __toESM2(require("fs"));
1063
+ var import_path22 = __toESM2(require("path"));
1062
1064
  var import_ai_provider = require_dist3();
1063
1065
  async function orchestrate2(options = {}) {
1064
1066
  const cwd = options.cwd ?? process.cwd();
@@ -1318,7 +1320,15 @@ ${rawOutput}
1318
1320
 
1319
1321
  ---
1320
1322
  *Report generated by **BugZero** on ${(/* @__PURE__ */ new Date()).toLocaleString()}*`;
1321
- const opened = await openInIDE(content);
1323
+ const reportPath = import_path22.default.join(cwd, "bugzero-report.md");
1324
+ try {
1325
+ import_fs2.default.writeFileSync(reportPath, content, "utf-8");
1326
+ console.log(`
1327
+ \u{1F4DD} Generated report at: bugzero-report.md`);
1328
+ } catch (e) {
1329
+ console.error(`\u26A0\uFE0F Failed to write report file: ${e.message}`);
1330
+ }
1331
+ const opened = await openInIDE(reportPath);
1322
1332
  if (!opened) {
1323
1333
  console.log("\n\u26A0\uFE0F Could not automatically open the report in your IDE (no compatible editor found in PATH).");
1324
1334
  console.log("Here is the generated report:\n");
@@ -1326,25 +1336,20 @@ ${rawOutput}
1326
1336
  console.log("\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
1327
1337
  }
1328
1338
  }
1329
- async function openInIDE(content) {
1339
+ async function openInIDE(filePath) {
1330
1340
  const editors = [
1331
- { cmd: "code", args: ["-"], name: "VS Code" },
1332
- { cmd: "cursor", args: ["-"], name: "Cursor" },
1333
- { cmd: "windsurf", args: ["-"], name: "Windsurf" },
1334
- { cmd: "subl", args: ["-"], name: "Sublime Text" }
1341
+ { cmd: "code", args: ["-r", filePath], name: "VS Code" },
1342
+ { cmd: "cursor", args: ["-r", filePath], name: "Cursor" },
1343
+ { cmd: "windsurf", args: ["-r", filePath], name: "Windsurf" },
1344
+ { cmd: "subl", args: [filePath], name: "Sublime Text" }
1335
1345
  ];
1336
1346
  try {
1337
1347
  const { execa } = await import("execa");
1338
1348
  for (const editor of editors) {
1339
1349
  try {
1340
- const proc = execa(editor.cmd, editor.args, { shell: true });
1341
- if (proc.stdin) {
1342
- proc.stdin.write(content);
1343
- proc.stdin.end();
1344
- await proc;
1345
- console.log(`\u{1F5A5}\uFE0F Opened report as an unsaved tab in ${editor.name}.`);
1346
- return true;
1347
- }
1350
+ await execa(editor.cmd, editor.args, { shell: true });
1351
+ console.log(`\u{1F5A5}\uFE0F Opened report in ${editor.name}.`);
1352
+ return true;
1348
1353
  } catch (err) {
1349
1354
  }
1350
1355
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bugzero",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "bin": {
5
5
  "bugzero": "dist/index.js"
6
6
  },