MCPcopy
hub / github.com/activepieces/activepieces / findAllDistPaths

Function findAllDistPaths

tools/scripts/utils/piece-script-utils.ts:151–163  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

149}
150
151async function findAllDistPaths(): Promise<string[]> {
152 const sourcePiecesPath = resolve(cwd(), 'packages', 'pieces')
153 const sourceFolders = await traverseFolder(sourcePiecesPath)
154 const distPaths: string[] = []
155 for (const folder of sourceFolders) {
156 const distPath = join(folder, 'dist')
157 const distPackageJson = join(distPath, 'package.json')
158 if (existsSync(distPackageJson)) {
159 distPaths.push(distPath)
160 }
161 }
162 return distPaths
163}
164
165async function traverseFolder(folderPath: string): Promise<string[]> {
166 const paths: string[] = []

Callers 2

findNewPiecesFunction · 0.85
findAllPiecesFunction · 0.85

Calls 3

joinFunction · 0.85
traverseFolderFunction · 0.70
resolveFunction · 0.50

Tested by

no test coverage detected