@lsst/pik-plugin-worktree 0.6.3 → 0.6.4
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/index.js
CHANGED
|
@@ -109,7 +109,7 @@ async function isWorktree(path) {
|
|
|
109
109
|
return false;
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
const createCommand = new Command("create").alias("add").description("Create a new worktree").argument("[name]", "Name for the worktree directory").option("-b, --branch <branch>", "Branch to checkout (or create with -n)").option("-n, --new", "Create a new branch").action(async (name, options) => {
|
|
112
|
+
const createCommand = new Command("create").alias("add").description("Create a new worktree").argument("[name]", "Name for the worktree directory").option("-b, --branch <branch>", "Branch to checkout (or create with -n)").option("-n, --new", "Create a new branch").option("-y, --yes", "Skip confirmations (for programmatic use)").action(async (name, options) => {
|
|
113
113
|
try {
|
|
114
114
|
const repoRoot = await getRepoRoot();
|
|
115
115
|
const config = await loadConfig(repoRoot);
|
|
@@ -204,7 +204,7 @@ const createCommand = new Command("create").alias("add").description("Create a n
|
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
if (worktreeConfig.postCreate) {
|
|
207
|
-
const shouldRun = await confirm({
|
|
207
|
+
const shouldRun = options.yes || await confirm({
|
|
208
208
|
message: `Run "${worktreeConfig.postCreate}"?`,
|
|
209
209
|
default: true
|
|
210
210
|
});
|
|
@@ -227,7 +227,7 @@ const createCommand = new Command("create").alias("add").description("Create a n
|
|
|
227
227
|
} catch (error) {
|
|
228
228
|
if (error instanceof Error) {
|
|
229
229
|
if (error.name === "ExitPromptError") {
|
|
230
|
-
|
|
230
|
+
process.exit(0);
|
|
231
231
|
}
|
|
232
232
|
console.error(pc.red(error.message));
|
|
233
233
|
}
|
|
@@ -329,7 +329,7 @@ const removeCommand = new Command("remove").alias("rm").description("Remove a wo
|
|
|
329
329
|
} catch (error) {
|
|
330
330
|
if (error instanceof Error) {
|
|
331
331
|
if (error.name === "ExitPromptError") {
|
|
332
|
-
|
|
332
|
+
process.exit(0);
|
|
333
333
|
}
|
|
334
334
|
console.error(pc.red(error.message));
|
|
335
335
|
}
|
|
@@ -363,7 +363,7 @@ const worktreePlugin = {
|
|
|
363
363
|
});
|
|
364
364
|
} catch (error) {
|
|
365
365
|
if (error instanceof Error && error.name === "ExitPromptError") {
|
|
366
|
-
|
|
366
|
+
process.exit(0);
|
|
367
367
|
}
|
|
368
368
|
throw error;
|
|
369
369
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/lib/commands/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgBpC,OAAO,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/lib/commands/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgBpC,OAAO,aAAa,CAAC;AAQrB,eAAO,MAAM,aAAa,SA4JtB,CAAC"}
|
package/dist/lib/plugin.d.ts
CHANGED