cmx-sdk 0.2.16 → 0.2.18
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/chunk-ZBI5OLBT.js +844 -0
- package/dist/cli.js +72 -796
- package/dist/index.d.ts +96 -3
- package/dist/index.js.map +1 -1
- package/dist/report-bug-PT7NNFNN.js +44 -0
- package/package.json +1 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
assertSdkSuccess,
|
|
4
|
+
ensureApiCredentials,
|
|
5
|
+
postManageBugReports
|
|
6
|
+
} from "./chunk-ZBI5OLBT.js";
|
|
7
|
+
|
|
8
|
+
// src/commands/report-bug.ts
|
|
9
|
+
async function reportBug(options) {
|
|
10
|
+
ensureApiCredentials();
|
|
11
|
+
const environmentInfo = {
|
|
12
|
+
platform: process.platform,
|
|
13
|
+
arch: process.arch,
|
|
14
|
+
nodeVersion: process.version
|
|
15
|
+
};
|
|
16
|
+
try {
|
|
17
|
+
const { execSync } = await import("child_process");
|
|
18
|
+
const sdkVersion = execSync("npx cmx-sdk --version 2>/dev/null", { encoding: "utf-8" }).trim();
|
|
19
|
+
if (sdkVersion) {
|
|
20
|
+
environmentInfo.sdkVersion = sdkVersion;
|
|
21
|
+
}
|
|
22
|
+
} catch {
|
|
23
|
+
}
|
|
24
|
+
const result = assertSdkSuccess(
|
|
25
|
+
await postManageBugReports({
|
|
26
|
+
title: options.title,
|
|
27
|
+
description: options.description,
|
|
28
|
+
severity: options.severity || "medium",
|
|
29
|
+
stepsToReproduce: options.steps,
|
|
30
|
+
errorMessage: options.error,
|
|
31
|
+
cliCommand: options.command,
|
|
32
|
+
environmentInfo
|
|
33
|
+
})
|
|
34
|
+
);
|
|
35
|
+
console.log("\u30D0\u30B0\u30EC\u30DD\u30FC\u30C8\u3092\u9001\u4FE1\u3057\u307E\u3057\u305F");
|
|
36
|
+
console.log(` ID: ${result.id}`);
|
|
37
|
+
console.log(` \u91CD\u8981\u5EA6: ${result.severity}`);
|
|
38
|
+
if (result.githubIssueUrl) {
|
|
39
|
+
console.log(` GitHub Issue: ${result.githubIssueUrl}`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
reportBug
|
|
44
|
+
};
|