ai-cmds 0.4.1 → 0.4.2
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/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as reviewCodeChangesCommand, c as DEFAULT_SCOPES, i as advancedReviewChangesCommand, l as defineConfig, n as createPRCommand, o as BUILT_IN_SETUP_OPTIONS, r as commitCommand, s as BUILT_IN_SCOPE_OPTIONS, t as reviewPRCommand } from "./review-pr-
|
|
1
|
+
import { a as reviewCodeChangesCommand, c as DEFAULT_SCOPES, i as advancedReviewChangesCommand, l as defineConfig, n as createPRCommand, o as BUILT_IN_SETUP_OPTIONS, r as commitCommand, s as BUILT_IN_SCOPE_OPTIONS, t as reviewPRCommand } from "./review-pr-Czxxuepn.js";
|
|
2
2
|
|
|
3
3
|
export { BUILT_IN_SCOPE_OPTIONS, BUILT_IN_SETUP_OPTIONS, DEFAULT_SCOPES, advancedReviewChangesCommand, commitCommand, createPRCommand, defineConfig, reviewCodeChangesCommand, reviewPRCommand };
|
package/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as reviewCodeChangesCommand, i as advancedReviewChangesCommand, n as createPRCommand, r as commitCommand, t as reviewPRCommand } from "./review-pr-
|
|
2
|
+
import { a as reviewCodeChangesCommand, i as advancedReviewChangesCommand, n as createPRCommand, r as commitCommand, t as reviewPRCommand } from "./review-pr-Czxxuepn.js";
|
|
3
3
|
import { createCLI } from "@ls-stack/cli";
|
|
4
4
|
|
|
5
5
|
//#region src/main.ts
|
|
@@ -233,14 +233,19 @@ async function getLocalBranches() {
|
|
|
233
233
|
])).trim().split("\n").filter(Boolean).sort((a, b) => a.length - b.length);
|
|
234
234
|
}
|
|
235
235
|
async function getRepoInfo() {
|
|
236
|
-
const
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
236
|
+
const json = await runCmdSilentUnwrap([
|
|
237
|
+
"gh",
|
|
238
|
+
"repo",
|
|
239
|
+
"view",
|
|
240
|
+
"--json",
|
|
241
|
+
"owner,name"
|
|
242
|
+
]);
|
|
243
|
+
const parsed = JSON.parse(json);
|
|
244
|
+
if (typeof parsed !== "object" || parsed === null || !("owner" in parsed) || !("name" in parsed)) throw new Error(`Unexpected gh repo view output: ${json}`);
|
|
245
|
+
const { owner, name } = parsed;
|
|
241
246
|
return {
|
|
242
|
-
owner:
|
|
243
|
-
repo:
|
|
247
|
+
owner: owner.login,
|
|
248
|
+
repo: name
|
|
244
249
|
};
|
|
245
250
|
}
|
|
246
251
|
async function getUnstagedDiff(options = {}) {
|