vibora 8.6.2 → 8.6.4
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/README.md +1 -1
- package/bin/vibora.js +1 -1
- package/dist/assets/{index-jV_aEYsq.js → index-D3VtlNRl.js} +86 -86
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/server/index.js +33 -0
package/dist/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/png" href="/logo.png" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Vibora - Harness Attention. Ship.</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-D3VtlNRl.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-ZFlxFnMR.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -170840,6 +170840,39 @@ app4.post("/write", async (c) => {
|
|
|
170840
170840
|
return c.json({ error: err instanceof Error ? err.message : "Failed to write file" }, 500);
|
|
170841
170841
|
}
|
|
170842
170842
|
});
|
|
170843
|
+
app4.get("/stat", (c) => {
|
|
170844
|
+
let targetPath = c.req.query("path");
|
|
170845
|
+
if (!targetPath) {
|
|
170846
|
+
return c.json({ error: "path parameter is required" }, 400);
|
|
170847
|
+
}
|
|
170848
|
+
if (targetPath.startsWith("~")) {
|
|
170849
|
+
targetPath = path7.join(os4.homedir(), targetPath.slice(1));
|
|
170850
|
+
}
|
|
170851
|
+
targetPath = path7.resolve(targetPath);
|
|
170852
|
+
try {
|
|
170853
|
+
if (!fs5.existsSync(targetPath)) {
|
|
170854
|
+
return c.json({
|
|
170855
|
+
path: targetPath,
|
|
170856
|
+
exists: false,
|
|
170857
|
+
type: null,
|
|
170858
|
+
isDirectory: false,
|
|
170859
|
+
isFile: false
|
|
170860
|
+
});
|
|
170861
|
+
}
|
|
170862
|
+
const stat = fs5.statSync(targetPath);
|
|
170863
|
+
const isDir = stat.isDirectory();
|
|
170864
|
+
const isFile = stat.isFile();
|
|
170865
|
+
return c.json({
|
|
170866
|
+
path: targetPath,
|
|
170867
|
+
exists: true,
|
|
170868
|
+
type: isDir ? "directory" : isFile ? "file" : "other",
|
|
170869
|
+
isDirectory: isDir,
|
|
170870
|
+
isFile
|
|
170871
|
+
});
|
|
170872
|
+
} catch (err) {
|
|
170873
|
+
return c.json({ error: err instanceof Error ? err.message : "Failed to stat path" }, 500);
|
|
170874
|
+
}
|
|
170875
|
+
});
|
|
170843
170876
|
app4.get("/is-git-repo", (c) => {
|
|
170844
170877
|
let dirPath = c.req.query("path");
|
|
170845
170878
|
if (!dirPath) {
|