@mcadam/worktree 1.0.0 ā 1.1.0
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/README.md +8 -8
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +86 -5
- package/dist/commands/create.js.map +1 -1
- package/package.json +14 -13
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **Transform your Git workflow with blazing-fast worktree management across multiple repositories** ā”
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/@mcadam/worktree)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
[](https://www.typescriptlang.org/)
|
|
8
8
|
[](https://nodejs.org/)
|
|
@@ -47,13 +47,13 @@ Select multiple worktrees with spacebar and delete them all at once. Spring clea
|
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
49
|
# npm
|
|
50
|
-
npm install -g worktree
|
|
50
|
+
npm install -g @mcadam/worktree
|
|
51
51
|
|
|
52
52
|
# pnpm (recommended)
|
|
53
|
-
pnpm add -g worktree
|
|
53
|
+
pnpm add -g @mcadam/worktree
|
|
54
54
|
|
|
55
55
|
# yarn
|
|
56
|
-
yarn global add worktree
|
|
56
|
+
yarn global add @mcadam/worktree
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
## š Quick Start
|
|
@@ -241,8 +241,8 @@ Want to contribute? Awesome! Here's how to get started:
|
|
|
241
241
|
|
|
242
242
|
```bash
|
|
243
243
|
# Clone the repo
|
|
244
|
-
git clone https://github.com/
|
|
245
|
-
cd worktree
|
|
244
|
+
git clone https://github.com/un/worktree.git
|
|
245
|
+
cd worktree
|
|
246
246
|
|
|
247
247
|
# Install dependencies
|
|
248
248
|
pnpm install
|
|
@@ -302,7 +302,7 @@ MIT Ā© [Your Name]
|
|
|
302
302
|
|
|
303
303
|
**Built with š by developers, for developers**
|
|
304
304
|
|
|
305
|
-
[Report Bug](https://github.com/
|
|
305
|
+
[Report Bug](https://github.com/un/worktree/issues) Ā· [Request Feature](https://github.com/un/worktree/issues) Ā· [Star on GitHub](https://github.com/un/worktree)
|
|
306
306
|
|
|
307
307
|
</div>
|
|
308
308
|
|
|
@@ -312,4 +312,4 @@ MIT Ā© [Your Name]
|
|
|
312
312
|
|
|
313
313
|
### š Don't forget to star this repo if you find it useful! š
|
|
314
314
|
|
|
315
|
-
</div>
|
|
315
|
+
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAuGA,wBAAsB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAmFlF"}
|
package/dist/commands/create.js
CHANGED
|
@@ -1,18 +1,90 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import readline from 'node:readline';
|
|
3
|
+
import chalk from 'chalk';
|
|
1
4
|
import { execa } from 'execa';
|
|
2
5
|
import fs from 'fs-extra';
|
|
3
|
-
import path from 'path';
|
|
4
6
|
import ora from 'ora';
|
|
5
|
-
import chalk from 'chalk';
|
|
6
7
|
import { configManager } from '../config/manager.js';
|
|
7
|
-
import { createWorktreeName } from '../utils/sanitize.js';
|
|
8
8
|
import { createWorktree } from '../utils/git.js';
|
|
9
|
+
import { createWorktreeName } from '../utils/sanitize.js';
|
|
9
10
|
import { initCommand } from './init.js';
|
|
11
|
+
async function isWorktreeClean(gitRoot) {
|
|
12
|
+
const { stdout } = await execa('git', ['status', '--porcelain'], { cwd: gitRoot });
|
|
13
|
+
return stdout.trim().length === 0;
|
|
14
|
+
}
|
|
15
|
+
async function promptDirtyWorktreeAction() {
|
|
16
|
+
console.log(chalk.yellow('\nLocal changes detected. Choose how to continue:'));
|
|
17
|
+
console.log(chalk.cyan(' [s] stash and pop (default)'));
|
|
18
|
+
console.log(chalk.cyan(" [d] don't pull remote"));
|
|
19
|
+
console.log(chalk.cyan(' [c] cancel'));
|
|
20
|
+
console.log(chalk.gray('Defaulting to stash and pop in 5 seconds.'));
|
|
21
|
+
const answer = await new Promise((resolve) => {
|
|
22
|
+
const rl = readline.createInterface({
|
|
23
|
+
input: process.stdin,
|
|
24
|
+
output: process.stdout,
|
|
25
|
+
});
|
|
26
|
+
let settled = false;
|
|
27
|
+
const finish = (value) => {
|
|
28
|
+
if (settled)
|
|
29
|
+
return;
|
|
30
|
+
settled = true;
|
|
31
|
+
clearTimeout(timeout);
|
|
32
|
+
rl.close();
|
|
33
|
+
resolve(value);
|
|
34
|
+
};
|
|
35
|
+
const timeout = setTimeout(() => {
|
|
36
|
+
process.stdout.write('\n');
|
|
37
|
+
finish();
|
|
38
|
+
}, 5000);
|
|
39
|
+
rl.question('Selection: ', finish);
|
|
40
|
+
});
|
|
41
|
+
const normalized = (answer ?? '').trim().toLowerCase();
|
|
42
|
+
if (!normalized || ['s', 'stash', 'stash and pop', 'stash-and-pop'].includes(normalized)) {
|
|
43
|
+
return 'stash-and-pop';
|
|
44
|
+
}
|
|
45
|
+
if (['d', 'dont', "don't", 'dont pull', "don't pull", 'no pull'].includes(normalized)) {
|
|
46
|
+
return 'dont-pull';
|
|
47
|
+
}
|
|
48
|
+
if (['c', 'cancel'].includes(normalized)) {
|
|
49
|
+
return 'cancel';
|
|
50
|
+
}
|
|
51
|
+
console.log(chalk.yellow('Unrecognized selection; defaulting to stash and pop.'));
|
|
52
|
+
return 'stash-and-pop';
|
|
53
|
+
}
|
|
54
|
+
async function pullBeforeCreatingWorktree(gitRoot) {
|
|
55
|
+
if (await isWorktreeClean(gitRoot)) {
|
|
56
|
+
await execa('git', ['pull'], { cwd: gitRoot, stdio: 'inherit' });
|
|
57
|
+
return async () => { };
|
|
58
|
+
}
|
|
59
|
+
const action = await promptDirtyWorktreeAction();
|
|
60
|
+
if (action === 'cancel') {
|
|
61
|
+
console.log(chalk.yellow('Cancelled'));
|
|
62
|
+
process.exit(0);
|
|
63
|
+
}
|
|
64
|
+
if (action === 'dont-pull') {
|
|
65
|
+
return async () => { };
|
|
66
|
+
}
|
|
67
|
+
await execa('git', ['stash', 'push', '--include-untracked', '-m', 'worktree auto-stash before pull'], {
|
|
68
|
+
cwd: gitRoot,
|
|
69
|
+
stdio: 'inherit',
|
|
70
|
+
});
|
|
71
|
+
try {
|
|
72
|
+
await execa('git', ['pull'], { cwd: gitRoot, stdio: 'inherit' });
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
await execa('git', ['stash', 'pop'], { cwd: gitRoot, stdio: 'inherit' });
|
|
76
|
+
throw error;
|
|
77
|
+
}
|
|
78
|
+
return async () => {
|
|
79
|
+
await execa('git', ['stash', 'pop'], { cwd: gitRoot, stdio: 'inherit' });
|
|
80
|
+
};
|
|
81
|
+
}
|
|
10
82
|
export async function createCommand(branch, gitRoot) {
|
|
11
83
|
// Check if repo is configured
|
|
12
84
|
let repoConfig = await configManager.getRepoConfig(gitRoot);
|
|
13
85
|
if (!repoConfig) {
|
|
14
86
|
console.log(chalk.yellow('This repository is not configured yet.'));
|
|
15
|
-
console.log(chalk.cyan(
|
|
87
|
+
console.log(chalk.cyan("Let's set it up first!\n"));
|
|
16
88
|
await initCommand(gitRoot);
|
|
17
89
|
repoConfig = await configManager.getRepoConfig(gitRoot);
|
|
18
90
|
if (!repoConfig) {
|
|
@@ -26,7 +98,10 @@ export async function createCommand(branch, gitRoot) {
|
|
|
26
98
|
console.log(chalk.blue(`Creating worktree for branch: ${branch}`));
|
|
27
99
|
console.log(chalk.gray(`Location: ${worktreePath}`));
|
|
28
100
|
const spinner = ora();
|
|
101
|
+
let popStash = async () => { };
|
|
102
|
+
let failed = false;
|
|
29
103
|
try {
|
|
104
|
+
popStash = await pullBeforeCreatingWorktree(gitRoot);
|
|
30
105
|
// Create worktree
|
|
31
106
|
spinner.start('Creating worktree...');
|
|
32
107
|
await createWorktree(config.basePath, worktreeName, branch, gitRoot);
|
|
@@ -64,11 +139,17 @@ export async function createCommand(branch, gitRoot) {
|
|
|
64
139
|
spinner.succeed(`Opened in ${config.ideCommand}`);
|
|
65
140
|
}
|
|
66
141
|
console.log(chalk.green(`\n⨠Worktree ready at: ${worktreePath}`));
|
|
67
|
-
console.log(chalk.cyan(
|
|
142
|
+
console.log(chalk.cyan('ā
Ready for some epic code!'));
|
|
68
143
|
}
|
|
69
144
|
catch (error) {
|
|
145
|
+
failed = true;
|
|
70
146
|
spinner.fail('Failed to create worktree');
|
|
71
147
|
console.error(chalk.red(`Error: ${error instanceof Error ? error.message : String(error)}`));
|
|
148
|
+
}
|
|
149
|
+
finally {
|
|
150
|
+
await popStash();
|
|
151
|
+
}
|
|
152
|
+
if (failed) {
|
|
72
153
|
process.exit(1);
|
|
73
154
|
}
|
|
74
155
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,MAAM,UAAU,CAAA;AACzB,OAAO,IAAI,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,QAAQ,MAAM,eAAe,CAAA;AACpC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,MAAM,UAAU,CAAA;AACzB,OAAO,GAAG,MAAM,KAAK,CAAA;AACrB,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,kBAAkB,EAAE,MA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AAC,EAAE;gBAC7C,QAAQ,EAAE,IAAI;gBACd,KAAK,EAAE,QAAQ;aAChB,CAAC,CAAA;YACF,OAAO,CAAC,OAAO,CAAC,aAAa,MAAM,CAAC,UAAU,EAAE,CAAC,CAAA;QACnD,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,0BAA0B,YAAY,EAAE,CAAC,CAAC,CAAA;QAClE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC,CAAA;IACxD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,GAAG,IAAI,CAAA;QACb,OAAO,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAA;QACzC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAA;IAC9F,CAAC;YAAS,CAAC;QACT,MAAM,QAAQ,EAAE,CAAA;IAClB,CAAC;IAED,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcadam/worktree",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "A CLI tool for managing Git worktrees across multiple repositories",
|
|
5
5
|
"main": "dist/cli.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
|
-
"worktree": "
|
|
8
|
+
"worktree": "bin/worktree.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"dev": "tsx watch src/cli.tsx",
|
|
13
|
+
"prepublishOnly": "pnpm run build",
|
|
14
|
+
"typecheck": "tsc --noEmit",
|
|
15
|
+
"clean": "rm -rf dist",
|
|
16
|
+
"lint": "biome check .",
|
|
17
|
+
"lint:fix": "biome check --apply .",
|
|
18
|
+
"format": "biome format --write ."
|
|
9
19
|
},
|
|
10
20
|
"keywords": [
|
|
11
21
|
"git",
|
|
@@ -55,14 +65,5 @@
|
|
|
55
65
|
"files": [
|
|
56
66
|
"dist",
|
|
57
67
|
"bin"
|
|
58
|
-
]
|
|
59
|
-
|
|
60
|
-
"build": "tsc",
|
|
61
|
-
"dev": "tsx watch src/cli.tsx",
|
|
62
|
-
"typecheck": "tsc --noEmit",
|
|
63
|
-
"clean": "rm -rf dist",
|
|
64
|
-
"lint": "biome check .",
|
|
65
|
-
"lint:fix": "biome check --apply .",
|
|
66
|
-
"format": "biome format --write ."
|
|
67
|
-
}
|
|
68
|
-
}
|
|
68
|
+
]
|
|
69
|
+
}
|