contribute-now 0.6.2-dev.3d69403 → 0.6.2-dev.9785651
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 +43 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11488,7 +11488,7 @@ var import_picocolors9 = __toESM(require_picocolors(), 1);
|
|
|
11488
11488
|
// package.json
|
|
11489
11489
|
var package_default = {
|
|
11490
11490
|
name: "contribute-now",
|
|
11491
|
-
version: "0.6.2-dev.
|
|
11491
|
+
version: "0.6.2-dev.9785651",
|
|
11492
11492
|
description: "Developer CLI that automates git workflows — branching, syncing, committing, and PRs — with multi-workflow and commit convention support.",
|
|
11493
11493
|
type: "module",
|
|
11494
11494
|
bin: {
|
|
@@ -13156,6 +13156,18 @@ var submit_default = defineCommand({
|
|
|
13156
13156
|
description: "Create PR as draft",
|
|
13157
13157
|
default: false
|
|
13158
13158
|
},
|
|
13159
|
+
pullrequest: {
|
|
13160
|
+
type: "boolean",
|
|
13161
|
+
alias: "pr",
|
|
13162
|
+
description: "Submit directly to PR flow without prompting for mode",
|
|
13163
|
+
default: false
|
|
13164
|
+
},
|
|
13165
|
+
local: {
|
|
13166
|
+
type: "boolean",
|
|
13167
|
+
alias: "l",
|
|
13168
|
+
description: "Squash merge locally without PR (maintainers only)",
|
|
13169
|
+
default: false
|
|
13170
|
+
},
|
|
13159
13171
|
"no-ai": {
|
|
13160
13172
|
type: "boolean",
|
|
13161
13173
|
description: "Skip AI PR description generation",
|
|
@@ -13419,7 +13431,22 @@ ${import_picocolors16.default.dim("AI body preview:")}`);
|
|
|
13419
13431
|
const REGENERATE = "Regenerate AI description";
|
|
13420
13432
|
let submitAction = "cancel";
|
|
13421
13433
|
const isMaintainer = config.role === "maintainer";
|
|
13422
|
-
if (
|
|
13434
|
+
if (args.pullrequest && args.local) {
|
|
13435
|
+
error("Use only one submit mode flag at a time: --pullrequest/--pr/-pr or -l for local squash merge.");
|
|
13436
|
+
process.exit(1);
|
|
13437
|
+
}
|
|
13438
|
+
if (args.local && !isMaintainer) {
|
|
13439
|
+
error("The -l flag is only available for maintainers. Contributors must submit via PR.");
|
|
13440
|
+
process.exit(1);
|
|
13441
|
+
}
|
|
13442
|
+
if (args.local) {
|
|
13443
|
+
await performSquashMerge(origin, baseBranch, currentBranch, {
|
|
13444
|
+
model: args.model,
|
|
13445
|
+
convention: config.commitConvention
|
|
13446
|
+
});
|
|
13447
|
+
return;
|
|
13448
|
+
}
|
|
13449
|
+
if (isMaintainer && !args.pullrequest) {
|
|
13423
13450
|
const maintainerChoice = await selectPrompt("How would you like to submit your changes?", ["Create a PR", SQUASH_LOCAL, CANCEL]);
|
|
13424
13451
|
if (maintainerChoice === CANCEL) {
|
|
13425
13452
|
warn("Submit cancelled.");
|
|
@@ -15613,6 +15640,20 @@ ${logo}`));
|
|
|
15613
15640
|
}
|
|
15614
15641
|
|
|
15615
15642
|
// src/index.ts
|
|
15643
|
+
function normalizeCliArgs(argv2) {
|
|
15644
|
+
return argv2.map((arg, index) => {
|
|
15645
|
+
const previous = argv2[index - 1];
|
|
15646
|
+
const isSubmitCommand = previous === "submit" || argv2.includes("submit");
|
|
15647
|
+
if (!isSubmitCommand) {
|
|
15648
|
+
return arg;
|
|
15649
|
+
}
|
|
15650
|
+
if (arg === "-pr" || arg === "--pr") {
|
|
15651
|
+
return "--pullrequest";
|
|
15652
|
+
}
|
|
15653
|
+
return arg;
|
|
15654
|
+
});
|
|
15655
|
+
}
|
|
15656
|
+
process.argv = normalizeCliArgs(process.argv);
|
|
15616
15657
|
var isVersion = process.argv.includes("--version") || process.argv.includes("-v");
|
|
15617
15658
|
if (!isVersion) {
|
|
15618
15659
|
const subCommands = [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contribute-now",
|
|
3
|
-
"version": "0.6.2-dev.
|
|
3
|
+
"version": "0.6.2-dev.9785651",
|
|
4
4
|
"description": "Developer CLI that automates git workflows — branching, syncing, committing, and PRs — with multi-workflow and commit convention support.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|