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

Function publishAll

scripts/publish-packages.ts:363–381  ·  view source on GitHub ↗
(packed: ReadonlyArray<PackedPackage>)

Source from the content-addressed store, hash-verified

361const PUBLISH_CONCURRENCY = 4;
362
363const publishAll = async (packed: ReadonlyArray<PackedPackage>) => {
364 const queue = [...packed];
365 const failures: string[] = [];
366
367 const workers = Array.from({ length: Math.min(PUBLISH_CONCURRENCY, queue.length) }, async () => {
368 for (let next = queue.shift(); next !== undefined; next = queue.shift()) {
369 try {
370 await publishPacked(next);
371 } catch (error) {
372 failures.push(error instanceof Error ? error.message : String(error));
373 }
374 }
375 });
376 await Promise.all(workers);
377
378 if (failures.length > 0) {
379 throw new Error(`${failures.length} package(s) failed to publish:\n${failures.join("\n")}`);
380 }
381};
382
383/**
384 * Rewrite-in-place mode for the pkg.pr.new preview workflow. pkg-pr-new runs

Callers 1

mainFunction · 0.85

Calls 2

publishPackedFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected