MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / main

Function main

scripts/smoke-test-packed.ts:196–231  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

194};
195
196const main = async () => {
197 console.log("[smoke] packing public packages via publish-packages.ts --dry-run");
198 await $`bun run scripts/publish-packages.ts --dry-run`.cwd(repoRoot);
199
200 const tarballs = new Map<string, string>();
201 for (const relDir of PUBLIC_PACKAGE_DIRS) {
202 const pkgDir = join(repoRoot, relDir);
203 if (!existsSync(pkgDir)) continue;
204 const pkg = await readPackageJson(pkgDir);
205 const tarball = findTarball(pkgDir);
206 if (tarball) tarballs.set(pkg.name, tarball);
207 }
208
209 const failures: SmokeFailure[] = [];
210 for (const relDir of PUBLIC_PACKAGE_DIRS) {
211 const pkgDir = join(repoRoot, relDir);
212 if (!existsSync(pkgDir)) {
213 failures.push({ pkg: relDir, subpath: "", reason: "missing dir" });
214 continue;
215 }
216 const pkg = await readPackageJson(pkgDir);
217 console.log(`[smoke] ${pkg.name}`);
218 await smokeTestPackage(pkgDir, tarballs, failures);
219 }
220
221 if (failures.length === 0) {
222 console.log("[smoke] all packages OK");
223 return;
224 }
225
226 console.error(`\n[smoke] ${failures.length} failure(s):`);
227 for (const f of failures) {
228 console.error(` - ${f.pkg}${f.subpath ? ` (${f.subpath})` : ""}: ${f.reason}`);
229 }
230 process.exit(1);
231};
232
233await main();

Callers 1

Calls 7

readPackageJsonFunction · 0.85
smokeTestPackageFunction · 0.85
logMethod · 0.80
setMethod · 0.80
pushMethod · 0.80
errorMethod · 0.80
findTarballFunction · 0.70

Tested by

no test coverage detected