@rubytech/taskmaster 1.0.101 → 1.0.102
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/build-info.json +3 -3
- package/dist/control-ui/assets/{index-C66MwgMB.css → index-DjhCZlZd.css} +1 -1
- package/dist/control-ui/assets/{index-BB_aJGt_.js → index-xpeRZhsZ.js} +236 -224
- package/dist/control-ui/assets/index-xpeRZhsZ.js.map +1 -0
- package/dist/control-ui/index.html +2 -2
- package/dist/gateway/server-methods/files.js +28 -1
- package/package.json +1 -1
- package/dist/control-ui/assets/index-BB_aJGt_.js.map +0 -1
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
<title>Taskmaster Control</title>
|
|
7
7
|
<meta name="color-scheme" content="dark light" />
|
|
8
8
|
<link rel="icon" type="image/png" href="./favicon.png" />
|
|
9
|
-
<script type="module" crossorigin src="./assets/index-
|
|
10
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
9
|
+
<script type="module" crossorigin src="./assets/index-xpeRZhsZ.js"></script>
|
|
10
|
+
<link rel="stylesheet" crossorigin href="./assets/index-DjhCZlZd.css">
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
|
13
13
|
<taskmaster-app></taskmaster-app>
|
|
@@ -344,7 +344,14 @@ export const filesHandlers = {
|
|
|
344
344
|
try {
|
|
345
345
|
const lstat = await fsp.lstat(resolved);
|
|
346
346
|
if (lstat.isDirectory()) {
|
|
347
|
-
|
|
347
|
+
// Allow deleting empty directories
|
|
348
|
+
const entries = await fsp.readdir(resolved);
|
|
349
|
+
if (entries.length > 0) {
|
|
350
|
+
respond(false, undefined, errorShape(ErrorCodes.INVALID_REQUEST, "directory is not empty"));
|
|
351
|
+
return;
|
|
352
|
+
}
|
|
353
|
+
await fsp.rmdir(resolved);
|
|
354
|
+
respond(true, { path: filePath, deleted: true });
|
|
348
355
|
return;
|
|
349
356
|
}
|
|
350
357
|
await fsp.unlink(resolved);
|
|
@@ -355,6 +362,26 @@ export const filesHandlers = {
|
|
|
355
362
|
respond(false, undefined, errorShape(ErrorCodes.UNAVAILABLE, msg));
|
|
356
363
|
}
|
|
357
364
|
},
|
|
365
|
+
"files.mkdir": async ({ params, respond }) => {
|
|
366
|
+
const dirPath = typeof params.path === "string" ? params.path : "";
|
|
367
|
+
if (!dirPath) {
|
|
368
|
+
respond(false, undefined, errorShape(ErrorCodes.INVALID_REQUEST, "path is required"));
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
const root = resolveWorkspaceForRequest(params);
|
|
372
|
+
const resolved = safePath(root, dirPath);
|
|
373
|
+
if (!resolved) {
|
|
374
|
+
respond(false, undefined, errorShape(ErrorCodes.INVALID_REQUEST, "invalid path"));
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
try {
|
|
378
|
+
await fsp.mkdir(resolved, { recursive: true });
|
|
379
|
+
respond(true, { path: dirPath });
|
|
380
|
+
}
|
|
381
|
+
catch (err) {
|
|
382
|
+
respond(false, undefined, errorShape(ErrorCodes.UNAVAILABLE, String(err)));
|
|
383
|
+
}
|
|
384
|
+
},
|
|
358
385
|
"files.move": async ({ params, respond }) => {
|
|
359
386
|
const fromPath = typeof params.from === "string" ? params.from : "";
|
|
360
387
|
const toPath = typeof params.to === "string" ? params.to : "";
|