worktree-flow 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -9,6 +9,7 @@ import { registerPushCommand } from './commands/push.js';
9
9
  import { registerRemoveCommand } from './commands/remove.js';
10
10
  import { registerStatusCommand } from './commands/status.js';
11
11
  import { registerPruneCommand } from './commands/prune.js';
12
+ import { registerFetchCommand } from './commands/fetch.js';
12
13
  const program = new Command();
13
14
  program
14
15
  .name('flow')
@@ -23,4 +24,5 @@ registerPushCommand(program);
23
24
  registerRemoveCommand(program);
24
25
  registerStatusCommand(program);
25
26
  registerPruneCommand(program);
27
+ registerFetchCommand(program);
26
28
  program.parse();
@@ -0,0 +1,30 @@
1
+ import chalk from 'chalk';
2
+ import { createServices } from '../lib/services.js';
3
+ import { createUseCases } from '../usecases/usecases.js';
4
+ export async function runFetch(useCases, services) {
5
+ const { destPath, sourcePath } = services.config.getRequired();
6
+ services.console.log('Fetching all repos used across workspaces...\n');
7
+ await useCases.fetchUsedRepos.execute({
8
+ destPath,
9
+ sourcePath,
10
+ fetchCacheTtlSeconds: 0, // Bypass cache
11
+ silent: false,
12
+ });
13
+ services.console.log(`\n${chalk.green('✓')} Fetch complete`);
14
+ }
15
+ export function registerFetchCommand(program) {
16
+ program
17
+ .command('fetch')
18
+ .description('Fetch all repos used across workspaces (bypasses cache)')
19
+ .action(async () => {
20
+ const services = createServices();
21
+ const useCases = createUseCases(services);
22
+ try {
23
+ await runFetch(useCases, services);
24
+ }
25
+ catch (error) {
26
+ services.console.error(error.message);
27
+ services.process.exit(1);
28
+ }
29
+ });
30
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "worktree-flow",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "Manage git worktrees across a poly-repo environment",
5
5
  "type": "module",
6
6
  "bin": {