whipped 0.1.1 → 0.1.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/cli.js +26 -7
- package/dist/web-ui/assets/{index-rpsRpaUU.js → index-BOR6PC8f.js} +1663 -1598
- package/dist/web-ui/index.html +1 -1
- package/package.json +14 -25
package/dist/cli.js
CHANGED
|
@@ -18966,6 +18966,7 @@ function isCommandAvailable(args) {
|
|
|
18966
18966
|
stdio: ["ignore", "pipe", "ignore"],
|
|
18967
18967
|
timeout: 5e3
|
|
18968
18968
|
});
|
|
18969
|
+
if (result.error) return result.error.code !== "ENOENT";
|
|
18969
18970
|
return result.status === 0 || result.status === null;
|
|
18970
18971
|
}
|
|
18971
18972
|
function getAvailableAgents() {
|
|
@@ -26831,8 +26832,8 @@ import { z as z9 } from "zod";
|
|
|
26831
26832
|
// src/api/services/projects-service.ts
|
|
26832
26833
|
init_runtime_config();
|
|
26833
26834
|
init_api_contract();
|
|
26834
|
-
init_logger();
|
|
26835
26835
|
import { spawnSync as spawnSync9 } from "node:child_process";
|
|
26836
|
+
init_logger();
|
|
26836
26837
|
|
|
26837
26838
|
// src/state/projects-layout.ts
|
|
26838
26839
|
init_db();
|
|
@@ -26888,14 +26889,31 @@ var saveProjectsLayoutData = (layout) => {
|
|
|
26888
26889
|
return { ok: true };
|
|
26889
26890
|
};
|
|
26890
26891
|
var checkProjectPath = async (repoPath) => {
|
|
26891
|
-
if (!repoPath.trim())
|
|
26892
|
+
if (!repoPath.trim())
|
|
26893
|
+
return { valid: false, isGitRepo: false, error: null, name: null, branch: null, remote: null, branches: [] };
|
|
26892
26894
|
const { statSync: statSync2 } = await import("node:fs");
|
|
26893
26895
|
try {
|
|
26894
26896
|
const stat2 = statSync2(repoPath);
|
|
26895
26897
|
if (!stat2.isDirectory())
|
|
26896
|
-
return {
|
|
26898
|
+
return {
|
|
26899
|
+
valid: false,
|
|
26900
|
+
isGitRepo: false,
|
|
26901
|
+
error: "Not a directory",
|
|
26902
|
+
name: null,
|
|
26903
|
+
branch: null,
|
|
26904
|
+
remote: null,
|
|
26905
|
+
branches: []
|
|
26906
|
+
};
|
|
26897
26907
|
} catch {
|
|
26898
|
-
return {
|
|
26908
|
+
return {
|
|
26909
|
+
valid: false,
|
|
26910
|
+
isGitRepo: false,
|
|
26911
|
+
error: "Path does not exist",
|
|
26912
|
+
name: null,
|
|
26913
|
+
branch: null,
|
|
26914
|
+
remote: null,
|
|
26915
|
+
branches: []
|
|
26916
|
+
};
|
|
26899
26917
|
}
|
|
26900
26918
|
const r = spawnSync9("git", ["rev-parse", "--git-dir"], {
|
|
26901
26919
|
cwd: repoPath,
|
|
@@ -26910,7 +26928,8 @@ var checkProjectPath = async (repoPath) => {
|
|
|
26910
26928
|
error: "Not a git repository",
|
|
26911
26929
|
name: null,
|
|
26912
26930
|
branch: null,
|
|
26913
|
-
remote: null
|
|
26931
|
+
remote: null,
|
|
26932
|
+
branches: []
|
|
26914
26933
|
};
|
|
26915
26934
|
const branchR = spawnSync9("git", ["rev-parse", "--abbrev-ref", "HEAD"], {
|
|
26916
26935
|
cwd: repoPath,
|
|
@@ -26926,7 +26945,7 @@ var checkProjectPath = async (repoPath) => {
|
|
|
26926
26945
|
const branch = branchR.status === 0 ? branchR.stdout.trim() : null;
|
|
26927
26946
|
const rawRemote = remoteR.status === 0 ? remoteR.stdout.trim() : null;
|
|
26928
26947
|
const remote = rawRemote ? rawRemote.replace(/^https?:\/\//, "").replace(/^git@([^:]+):/, "$1/").replace(/\.git$/, "") : null;
|
|
26929
|
-
return { valid: true, isGitRepo: true, error: null, name, branch, remote };
|
|
26948
|
+
return { valid: true, isGitRepo: true, error: null, name, branch, remote, branches: listLocalBranches(repoPath) };
|
|
26930
26949
|
};
|
|
26931
26950
|
var addProject = async (repoPath, initialConfig) => {
|
|
26932
26951
|
const { statSync: statSync2 } = await import("node:fs");
|
|
@@ -28545,7 +28564,7 @@ process.on("uncaughtException", (err) => {
|
|
|
28545
28564
|
if (err.code === "EPIPE" || err.code === "ECONNRESET") return;
|
|
28546
28565
|
throw err;
|
|
28547
28566
|
});
|
|
28548
|
-
var VERSION9 = true ? "0.1.
|
|
28567
|
+
var VERSION9 = true ? "0.1.2" : "0.0.0-dev";
|
|
28549
28568
|
async function isPortAvailable(port, host) {
|
|
28550
28569
|
return new Promise((resolve5) => {
|
|
28551
28570
|
const probe = createServer2();
|