flyspace-cli 0.1.25 → 0.1.29
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/{chunk-B5NWSWAM.js → chunk-6YFDWUNF.js} +10 -5
- package/dist/cli.js +2063 -1946
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -267,7 +267,7 @@ function stopAutomationRegistryPolling() {
|
|
|
267
267
|
// ../api/src/channels.ts
|
|
268
268
|
import { existsSync as existsSync2, mkdirSync, realpathSync, statSync } from "fs";
|
|
269
269
|
import { homedir } from "os";
|
|
270
|
-
import { isAbsolute, resolve as resolve2, sep } from "path";
|
|
270
|
+
import { isAbsolute, relative, resolve as resolve2, sep } from "path";
|
|
271
271
|
function isLogicalCwd(p) {
|
|
272
272
|
return /^[a-z0-9][a-z0-9-]*\/[a-z0-9][a-z0-9-]*$/.test(p);
|
|
273
273
|
}
|
|
@@ -287,9 +287,11 @@ function resolveLogicalCwd(p) {
|
|
|
287
287
|
const root = workspaceRoots.get(slug);
|
|
288
288
|
return root ? resolve2(root, name) : resolve2(logicalRoot(), p);
|
|
289
289
|
}
|
|
290
|
+
function isUnderLogicalRoot(cwd) {
|
|
291
|
+
return [logicalRoot(), ...workspaceRoots.values()].some((r) => cwd.startsWith(r + sep));
|
|
292
|
+
}
|
|
290
293
|
function ensureLogicalCwdDir(cwd) {
|
|
291
|
-
|
|
292
|
-
if (!roots.some((r) => cwd.startsWith(r + sep)) || existsSync2(cwd)) return;
|
|
294
|
+
if (!isUnderLogicalRoot(cwd) || existsSync2(cwd)) return;
|
|
293
295
|
mkdirSync(cwd, { recursive: true });
|
|
294
296
|
}
|
|
295
297
|
function expandPath(p) {
|
|
@@ -558,6 +560,8 @@ async function assertCwdInWorkspace(profile, cwd) {
|
|
|
558
560
|
}
|
|
559
561
|
return cwd;
|
|
560
562
|
}
|
|
563
|
+
const logical = relative(logicalRoot(), cwd).split(sep).join("/");
|
|
564
|
+
if (isLogicalCwd(logical)) return assertCwdInWorkspace(profile, logical);
|
|
561
565
|
const { data, error } = await getSupabaseClient().from("workspaces").select("slug, root_path");
|
|
562
566
|
if (error) throw new Error(error.message);
|
|
563
567
|
const workspaces = data ?? [];
|
|
@@ -2562,7 +2566,8 @@ function rowToMembership(row) {
|
|
|
2562
2566
|
status: row["status"],
|
|
2563
2567
|
invitedAt: row["invited_at"],
|
|
2564
2568
|
acceptedAt: row["accepted_at"] ?? null,
|
|
2565
|
-
memoryAutoPaused: row["memory_auto_paused"] === true
|
|
2569
|
+
memoryAutoPaused: row["memory_auto_paused"] === true,
|
|
2570
|
+
isSupport: row["is_support"] === true
|
|
2566
2571
|
};
|
|
2567
2572
|
}
|
|
2568
2573
|
var WORKSPACE_CACHE_TTL_MS = 6e4;
|
|
@@ -8951,7 +8956,7 @@ export {
|
|
|
8951
8956
|
refreshAutomationRegistry,
|
|
8952
8957
|
startAutomationRegistryPolling,
|
|
8953
8958
|
isLogicalCwd,
|
|
8954
|
-
|
|
8959
|
+
isUnderLogicalRoot,
|
|
8955
8960
|
ensureLogicalCwdDir,
|
|
8956
8961
|
expandPath,
|
|
8957
8962
|
canSeeChannel,
|