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

Function listWorkspaces

scripts/ci/mobile-affected.mjs:64–79  ·  view source on GitHub ↗
(filters)

Source from the content-addressed store, hash-verified

62)
63
64function listWorkspaces(filters) {
65 const args = [`-r`, `list`, `--depth`, `-1`, `--json`]
66 for (const filter of filters) {
67 args.push(`--filter`, filter)
68 }
69
70 try {
71 return parsePnpmList(run(`pnpm`, args))
72 } catch (error) {
73 console.warn(
74 `Falling back to building mobile because pnpm filtering failed.`
75 )
76 console.warn(error.message)
77 return [{ name: mobilePackage, relativePath: `packages/agents-mobile` }]
78 }
79}
80
81function parsePnpmList(output) {
82 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