MCPcopy Create free account
hub / github.com/anomalyco/console / promptWorkspaces

Function promptWorkspaces

packages/scripts/src/common.ts:18–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16}
17
18export async function promptWorkspaces() {
19 const workspaceFilter: string[] = await prompt("workspaces: ").then((x) =>
20 x.split(" ").filter(Boolean),
21 );
22
23 const results = await db
24 .select({
25 workspaceID: workspace.id,
26 slug: workspace.slug,
27 })
28 .from(workspace)
29 .where(
30 or(
31 inArray(workspace.slug, workspaceFilter),
32 inArray(workspace.id, workspaceFilter),
33 ),
34 )
35 .execute();
36
37 console.log(
38 "found:",
39 results.map((x) => x.slug),
40 );
41
42 return results.map((x) => x.workspaceID);
43}

Callers 3

sync-stages.tsFile · 0.90
sync-usage.tsFile · 0.90

Calls 2

executeMethod · 0.80
promptFunction · 0.70

Tested by

no test coverage detected