MCPcopy Create free account
hub / github.com/electric-sql/electric / listWorkspaces

Function listWorkspaces

scripts/ci/desktop-affected.mjs:66–81  ·  view source on GitHub ↗
(filters)

Source from the content-addressed store, hash-verified

64)
65
66function listWorkspaces(filters) {
67 const args = [`-r`, `list`, `--depth`, `-1`, `--json`]
68 for (const filter of filters) {
69 args.push(`--filter`, filter)
70 }
71
72 try {
73 return parsePnpmList(run(`pnpm`, args))
74 } catch (error) {
75 console.warn(
76 `Falling back to building desktop because pnpm filtering failed.`
77 )
78 console.warn(error.message)
79 return [{ name: desktopPackage, relativePath: `packages/agents-desktop` }]
80 }
81}
82
83function parsePnpmList(output) {
84 return JSON.parse(output).map((workspace) => ({

Callers 1

Calls 3

parsePnpmListFunction · 0.70
runFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected