MCPcopy Index your code
hub / github.com/simstudioai/sim / listPackages

Function listPackages

scripts/check-realtime-prune-graph.ts:9–24  ·  view source on GitHub ↗
(root: string)

Source from the content-addressed store, hash-verified

7const MAX_PRUNED_PACKAGE_COUNT = 25
8
9async function listPackages(root: string): Promise<string[]> {
10 try {
11 const entries = await readdir(root)
12 const result: string[] = []
13 for (const entry of entries) {
14 const full = path.join(root, entry)
15 const s = await stat(full)
16 if (s.isDirectory()) {
17 result.push(entry)
18 }
19 }
20 return result
21 } catch {
22 return []
23 }
24}
25
26async function main() {
27 const scratch = await mkdtemp(path.join(tmpdir(), 'sim-realtime-prune-'))

Callers 1

mainFunction · 0.85

Calls 2

joinMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected