this repo has no description
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

add automerge back in, really

+9 -8
+9 -8
index.ts
··· 1 - #!/usr/bin/env node 1 + #!/usr/bin/env bun 2 2 3 + import { Repo } from "@automerge/automerge-repo" 3 4 import { Command } from 'commander'; 4 5 import ora from 'ora'; 5 6 import path from 'path'; ··· 28 29 29 30 const initIgnorePatterns = async (ignoreFile = '.gitignore'): Promise<void> => { 30 31 ig = ignore(); 31 - 32 + 32 33 // Default patterns 33 34 ig.add(['node_modules', '.git', '.DS_Store']); 34 - 35 + 35 36 try { 36 37 const patterns = await readFile(ignoreFile, 'utf8'); 37 38 ig.add(patterns); ··· 58 59 59 60 async function* walk(dir: string, root = dir): AsyncGenerator<FileInfo> { 60 61 const files = await readdir(dir); 61 - 62 + 62 63 for (const file of files) { 63 64 const filepath = path.join(dir, file); 64 65 const relativePath = path.relative(root, filepath); 65 - 66 + 66 67 // Skip if file matches ignore patterns 67 68 if (ig.ignores(relativePath)) { 68 69 continue; 69 70 } 70 - 71 + 71 72 const stats = await stat(filepath); 72 - 73 + 73 74 if (stats.isDirectory()) { 74 75 yield* walk(filepath, root); 75 76 } else { ··· 135 136 136 137 const list = async (source: string): Promise<void> => { 137 138 console.log(`Listing all files in ${source}:`); 138 - 139 + 139 140 try { 140 141 for await (const fileInfo of walk(source)) { 141 142 console.log(`- ${fileInfo.relativePath}`);