Skip to content

Commit 9ceae3b

Browse files
authored
feat(cli): add sync remote subcommand (#278)
1 parent 04d0f12 commit 9ceae3b

File tree

6 files changed

+416
-5
lines changed

6 files changed

+416
-5
lines changed

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@jsr:registry=https://npm.jsr.io

packages/tools/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@
77
"json-edit": "./src/json-edit.ts"
88
},
99
"devDependencies": {
10-
"minimatch": "catalog:"
10+
"@oxc-node/cli": "catalog:",
11+
"@oxc-node/core": "catalog:",
12+
"@types/semver": "catalog:",
13+
"@std/yaml": "catalog:",
14+
"minimatch": "catalog:",
15+
"semver": "catalog:"
1116
},
1217
"scripts": {
1318
"snap-test": "tool snap-test"

packages/tools/src/index.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
import { replaceFileContent } from './replace-file-content';
2-
import { snapTest } from './snap-test';
3-
41
const subcommand = process.argv[2];
52

63
switch (subcommand) {
74
case 'snap-test':
5+
const { snapTest } = await import('./snap-test');
86
await snapTest();
97
break;
108
case 'replace-file-content':
9+
const { replaceFileContent } = await import('./replace-file-content');
1110
replaceFileContent();
1211
break;
12+
case 'sync-remote':
13+
const { syncRemote } = await import('./sync-remote-deps');
14+
syncRemote();
15+
break;
1316
default:
1417
console.error(`Unknown subcommand: ${subcommand}`);
15-
console.error('Available subcommands: snap-test, replace-file-content');
18+
console.error('Available subcommands: snap-test, replace-file-content, sync-remote');
1619
process.exit(1);
1720
}

0 commit comments

Comments
 (0)