MCPcopy Create free account
hub / github.com/dmno-dev/bumpy / moveBumpFilesToChannel

Function moveBumpFilesToChannel

packages/bumpy/src/core/bump-file.ts:305–315  ·  view source on GitHub ↗
(rootDir: string, bumpFiles: BumpFile[], channel: string)

Source from the content-addressed store, hash-verified

303 * never written to git. Files already in the target channel dir are left alone.
304 */
305export async function moveBumpFilesToChannel(rootDir: string, bumpFiles: BumpFile[], channel: string): Promise<void> {
306 const { rename, mkdir } = await import('node:fs/promises');
307 const dir = getBumpyDir(rootDir);
308 const channelDir = resolve(dir, channel);
309 await mkdir(channelDir, { recursive: true });
310 for (const bf of bumpFiles) {
311 if (bf.channel === channel) continue;
312 const from = bf.channel ? resolve(dir, bf.channel, `${bf.id}.md`) : resolve(dir, `${bf.id}.md`);
313 await rename(from, resolve(channelDir, `${bf.id}.md`));
314 }
315}
316
317/** Delete consumed bump files */
318export async function deleteBumpFiles(rootDir: string, ids: string[]): Promise<void> {

Callers 2

channelVersionFunction · 0.90

Calls 1

getBumpyDirFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…