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

Function main

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

Source from the content-addressed store, hash-verified

212};
213
214const main = async () => {
215 console.log("[smoke] packing public packages via publish-packages.ts --dry-run");
216 await $`bun run scripts/publish-packages.ts --dry-run`.cwd(repoRoot);
217
218 const tarballs = new Map<string, string>();
219 for (const relDir of PUBLIC_PACKAGE_DIRS) {
220 const pkgDir = join(repoRoot, relDir);
221 if (!existsSync(pkgDir)) continue;
222 const pkg = await readPackageJson(pkgDir);
223 const tarball = findTarball(pkgDir);
224 if (tarball) tarballs.set(pkg.name, tarball);
225 }
226
227 const failures: SmokeFailure[] = [];
228 for (const relDir of PUBLIC_PACKAGE_DIRS) {
229 const pkgDir = join(repoRoot, relDir);
230 if (!existsSync(pkgDir)) {
231 failures.push({ pkg: relDir, subpath: "", reason: "missing dir" });
232 continue;
233 }
234 const pkg = await readPackageJson(pkgDir);
235 console.log(`[smoke] ${pkg.name}`);
236 await smokeTestPackage(pkgDir, tarballs, failures);
237 }
238
239 if (failures.length === 0) {
240 console.log("[smoke] all packages OK");
241 return;
242 }
243
244 console.error(`\n[smoke] ${failures.length} failure(s):`);
245 for (const f of failures) {
246 console.error(` - ${f.pkg}${f.subpath ? ` (${f.subpath})` : ""}: ${f.reason}`);
247 }
248 process.exit(1);
249};
250
251await main();

Callers 1

Calls 7

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

Tested by

no test coverage detected