@staff0rd/assist 0.502.0 → 0.502.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
|
@@ -6,7 +6,7 @@ import { Command } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@staff0rd/assist",
|
|
9
|
-
version: "0.502.
|
|
9
|
+
version: "0.502.2",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -1787,17 +1787,22 @@ import { execSync as execSync5 } from "child_process";
|
|
|
1787
1787
|
|
|
1788
1788
|
// src/commands/prs/getPreferredRemoteRepo.ts
|
|
1789
1789
|
import { execSync as execSync4 } from "child_process";
|
|
1790
|
+
|
|
1791
|
+
// src/commands/prs/parseGitHubUrl.ts
|
|
1790
1792
|
var GITHUB_URL_PATTERN = /(?:git@github\.com:|https:\/\/github\.com\/)([^/]+)\/([^/]+?)(?:\.git)?\/?$/;
|
|
1791
1793
|
function parseGitHubUrl(url) {
|
|
1792
1794
|
const match = url.match(GITHUB_URL_PATTERN);
|
|
1793
1795
|
if (!match) return null;
|
|
1794
1796
|
return { org: match[1], repo: match[2] };
|
|
1795
1797
|
}
|
|
1798
|
+
|
|
1799
|
+
// src/commands/prs/getPreferredRemoteRepo.ts
|
|
1796
1800
|
function tryGetRemoteUrl(remote, cwd) {
|
|
1797
1801
|
try {
|
|
1798
1802
|
return execSync4(`git remote get-url ${remote}`, {
|
|
1799
1803
|
encoding: "utf8",
|
|
1800
1804
|
stdio: ["pipe", "pipe", "pipe"],
|
|
1805
|
+
windowsHide: true,
|
|
1801
1806
|
cwd
|
|
1802
1807
|
}).trim();
|
|
1803
1808
|
} catch {
|
|
@@ -1808,7 +1813,12 @@ function getCurrentBranchRemote(cwd) {
|
|
|
1808
1813
|
try {
|
|
1809
1814
|
const ref = execSync4(
|
|
1810
1815
|
"git rev-parse --abbrev-ref --symbolic-full-name @{u}",
|
|
1811
|
-
{
|
|
1816
|
+
{
|
|
1817
|
+
encoding: "utf8",
|
|
1818
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
1819
|
+
windowsHide: true,
|
|
1820
|
+
cwd
|
|
1821
|
+
}
|
|
1812
1822
|
).trim();
|
|
1813
1823
|
const [remote] = ref.split("/", 1);
|
|
1814
1824
|
return remote || null;
|
|
@@ -1821,6 +1831,7 @@ function listRemotes(cwd) {
|
|
|
1821
1831
|
return execSync4("git remote", {
|
|
1822
1832
|
encoding: "utf8",
|
|
1823
1833
|
stdio: ["pipe", "pipe", "pipe"],
|
|
1834
|
+
windowsHide: true,
|
|
1824
1835
|
cwd
|
|
1825
1836
|
}).trim().split("\n").filter(Boolean);
|
|
1826
1837
|
} catch {
|
|
@@ -6516,7 +6527,8 @@ function gitPullBacklog(dir) {
|
|
|
6516
6527
|
try {
|
|
6517
6528
|
execSync29("git pull --ff-only", {
|
|
6518
6529
|
cwd: dir,
|
|
6519
|
-
stdio: ["pipe", "pipe", "pipe"]
|
|
6530
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
6531
|
+
windowsHide: true
|
|
6520
6532
|
});
|
|
6521
6533
|
} catch {
|
|
6522
6534
|
console.error(
|
|
@@ -7672,7 +7684,8 @@ function checkCliAvailable(cli) {
|
|
|
7672
7684
|
const binary = cli.split(/\s+/)[0];
|
|
7673
7685
|
const opts = {
|
|
7674
7686
|
encoding: "utf8",
|
|
7675
|
-
stdio: ["ignore", "pipe", "pipe"]
|
|
7687
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
7688
|
+
windowsHide: true
|
|
7676
7689
|
};
|
|
7677
7690
|
try {
|
|
7678
7691
|
execSync30(`command -v ${binary}`, opts);
|
|
@@ -8974,7 +8987,8 @@ function isGitRepo(dir) {
|
|
|
8974
8987
|
try {
|
|
8975
8988
|
const result = execSync31("git rev-parse --show-toplevel", {
|
|
8976
8989
|
cwd: dir,
|
|
8977
|
-
stdio: "pipe"
|
|
8990
|
+
stdio: "pipe",
|
|
8991
|
+
windowsHide: true
|
|
8978
8992
|
}).toString().trim();
|
|
8979
8993
|
return resolve8(result) === resolve8(dir);
|
|
8980
8994
|
} catch {
|
|
@@ -8993,7 +9007,7 @@ import { execSync as execSync32 } from "child_process";
|
|
|
8993
9007
|
function tryExec(commands) {
|
|
8994
9008
|
for (const cmd of commands) {
|
|
8995
9009
|
try {
|
|
8996
|
-
execSync32(cmd, { stdio: "ignore" });
|
|
9010
|
+
execSync32(cmd, { stdio: "ignore", windowsHide: true });
|
|
8997
9011
|
return true;
|
|
8998
9012
|
} catch {
|
|
8999
9013
|
}
|