contribute-now 0.9.0-dev.8626d97 → 0.9.0-dev.9d1a08a
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 +75 -28
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -9182,6 +9182,9 @@ async function runMain(cmd, opts = {}) {
|
|
|
9182
9182
|
}
|
|
9183
9183
|
}
|
|
9184
9184
|
|
|
9185
|
+
// src/cli.ts
|
|
9186
|
+
var import_picocolors26 = __toESM(require_picocolors(), 1);
|
|
9187
|
+
|
|
9185
9188
|
// src/commands/branch.ts
|
|
9186
9189
|
init_config();
|
|
9187
9190
|
var import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
@@ -13705,7 +13708,7 @@ var import_picocolors12 = __toESM(require_picocolors(), 1);
|
|
|
13705
13708
|
// package.json
|
|
13706
13709
|
var package_default = {
|
|
13707
13710
|
name: "contribute-now",
|
|
13708
|
-
version: "0.9.0-dev.
|
|
13711
|
+
version: "0.9.0-dev.9d1a08a",
|
|
13709
13712
|
description: "Developer CLI that automates git workflows \u2014 branching, syncing, committing, and PRs \u2014 with multi-workflow and commit convention support.",
|
|
13710
13713
|
type: "module",
|
|
13711
13714
|
bin: {
|
|
@@ -17710,7 +17713,7 @@ function getAuthor() {
|
|
|
17710
17713
|
function showBanner(variant = "small") {
|
|
17711
17714
|
console.log(import_picocolors25.default.cyan(`
|
|
17712
17715
|
${LOGO}`));
|
|
17713
|
-
console.log(` ${import_picocolors25.default.
|
|
17716
|
+
console.log(` ${import_picocolors25.default.white(`v${getVersion()}`)} ${import_picocolors25.default.white("\u2014")} ${import_picocolors25.default.white(`Built by ${getAuthor()}`)}`);
|
|
17714
17717
|
const announcements = getActiveAnnouncements();
|
|
17715
17718
|
if (announcements.length > 0) {
|
|
17716
17719
|
console.log();
|
|
@@ -17794,8 +17797,8 @@ ${LOGO}`));
|
|
|
17794
17797
|
}
|
|
17795
17798
|
console.log(` ${import_picocolors25.default.dim(`\u2514${"\u2500".repeat(contentWidth + 2)}\u2518`)}`);
|
|
17796
17799
|
console.log();
|
|
17797
|
-
console.log(` ${import_picocolors25.default.
|
|
17798
|
-
console.log(` ${import_picocolors25.default.
|
|
17800
|
+
console.log(` \uD83E\uDD1D ${import_picocolors25.default.white("Contribute:")} ${import_picocolors25.default.dim(linkify("gh.waren.build/contribute-now", "https://gh.waren.build/contribute-now"))}`);
|
|
17801
|
+
console.log(` \uD83D\uDE4F ${import_picocolors25.default.white("Sponsor:")} ${import_picocolors25.default.dim(linkify("warengonzaga.com/sponsor", "https://warengonzaga.com/sponsor"))}`);
|
|
17799
17802
|
}
|
|
17800
17803
|
console.log();
|
|
17801
17804
|
}
|
|
@@ -17882,6 +17885,45 @@ function getAnnouncementTone(kind) {
|
|
|
17882
17885
|
}
|
|
17883
17886
|
|
|
17884
17887
|
// src/cli.ts
|
|
17888
|
+
function formatVersionInfo() {
|
|
17889
|
+
return `Contribute Now v${getVersion()} - Built by Waren Gonzaga`;
|
|
17890
|
+
}
|
|
17891
|
+
function cmd(name, desc) {
|
|
17892
|
+
return ` ${import_picocolors26.default.cyan(name.padEnd(12))}${import_picocolors26.default.white(desc)}`;
|
|
17893
|
+
}
|
|
17894
|
+
function showCompactRootHelp() {
|
|
17895
|
+
console.log(`${import_picocolors26.default.bold("USAGE")} ${import_picocolors26.default.cyan("cn <command> [options]")}`);
|
|
17896
|
+
console.log();
|
|
17897
|
+
console.log(import_picocolors26.default.bold("WORKFLOW"));
|
|
17898
|
+
console.log(cmd("setup", "Initialize your local environment and GitHub access"));
|
|
17899
|
+
console.log(cmd("start", "Create a new branch for your contribution"));
|
|
17900
|
+
console.log(cmd("commit", "Stage and commit changes with guided prompts"));
|
|
17901
|
+
console.log(cmd("update", "Sync your branch and update the PR description"));
|
|
17902
|
+
console.log(cmd("submit", "Push and open a pull request on GitHub"));
|
|
17903
|
+
console.log();
|
|
17904
|
+
console.log(import_picocolors26.default.bold("BRANCH & COMMITS"));
|
|
17905
|
+
console.log(cmd("branch", "List, create, or delete branches"));
|
|
17906
|
+
console.log(cmd("switch", "Switch to a different branch"));
|
|
17907
|
+
console.log(cmd("save", "Stash uncommitted changes for later"));
|
|
17908
|
+
console.log(cmd("discard", "Discard uncommitted changes"));
|
|
17909
|
+
console.log();
|
|
17910
|
+
console.log(import_picocolors26.default.bold("GITHUB"));
|
|
17911
|
+
console.log(cmd("sync", "Sync the default branch and rebase your work"));
|
|
17912
|
+
console.log(cmd("label", "Suggest and apply labels on issues and PRs"));
|
|
17913
|
+
console.log(cmd("config", "View or update your Contribute Now config"));
|
|
17914
|
+
console.log();
|
|
17915
|
+
console.log(import_picocolors26.default.bold("UTILITIES"));
|
|
17916
|
+
console.log(cmd("status", "Show current branch and working tree status"));
|
|
17917
|
+
console.log(cmd("log", "Display a compact commit log"));
|
|
17918
|
+
console.log(cmd("clean", "Remove stale branches and tidy up"));
|
|
17919
|
+
console.log(cmd("validate", "Check branch name and commit message format"));
|
|
17920
|
+
console.log(cmd("hook", "Install or uninstall Git hooks"));
|
|
17921
|
+
console.log(cmd("doctor", "Diagnose and fix common setup issues"));
|
|
17922
|
+
console.log();
|
|
17923
|
+
console.log(`${import_picocolors26.default.bold("FLAGS")} ${import_picocolors26.default.cyan("-v, --version")} ${import_picocolors26.default.dim("Show version")}`);
|
|
17924
|
+
console.log();
|
|
17925
|
+
console.log(import_picocolors26.default.dim("Run cn <command> --help for detailed options and examples."));
|
|
17926
|
+
}
|
|
17885
17927
|
function normalizeCliArgs(argv2) {
|
|
17886
17928
|
return argv2.map((arg, index) => {
|
|
17887
17929
|
const previous = argv2[index - 1];
|
|
@@ -17897,32 +17939,37 @@ function normalizeCliArgs(argv2) {
|
|
|
17897
17939
|
}
|
|
17898
17940
|
process.argv = normalizeCliArgs(process.argv);
|
|
17899
17941
|
var isVersion = process.argv.includes("--version") || process.argv.includes("-v");
|
|
17942
|
+
var subCommands = [
|
|
17943
|
+
"setup",
|
|
17944
|
+
"config",
|
|
17945
|
+
"sync",
|
|
17946
|
+
"start",
|
|
17947
|
+
"commit",
|
|
17948
|
+
"update",
|
|
17949
|
+
"submit",
|
|
17950
|
+
"switch",
|
|
17951
|
+
"discard",
|
|
17952
|
+
"save",
|
|
17953
|
+
"clean",
|
|
17954
|
+
"status",
|
|
17955
|
+
"log",
|
|
17956
|
+
"branch",
|
|
17957
|
+
"hook",
|
|
17958
|
+
"validate",
|
|
17959
|
+
"doctor",
|
|
17960
|
+
"label"
|
|
17961
|
+
];
|
|
17962
|
+
var isHelp = process.argv.includes("--help") || process.argv.includes("-h");
|
|
17963
|
+
var hasSubCommand = subCommands.some((cmd2) => process.argv.includes(cmd2));
|
|
17964
|
+
var isRootHelp = isHelp && !hasSubCommand;
|
|
17900
17965
|
if (!isVersion) {
|
|
17901
|
-
const
|
|
17902
|
-
"setup",
|
|
17903
|
-
"config",
|
|
17904
|
-
"sync",
|
|
17905
|
-
"start",
|
|
17906
|
-
"commit",
|
|
17907
|
-
"update",
|
|
17908
|
-
"submit",
|
|
17909
|
-
"switch",
|
|
17910
|
-
"discard",
|
|
17911
|
-
"save",
|
|
17912
|
-
"clean",
|
|
17913
|
-
"status",
|
|
17914
|
-
"log",
|
|
17915
|
-
"branch",
|
|
17916
|
-
"hook",
|
|
17917
|
-
"validate",
|
|
17918
|
-
"doctor",
|
|
17919
|
-
"label"
|
|
17920
|
-
];
|
|
17921
|
-
const isHelp = process.argv.includes("--help") || process.argv.includes("-h");
|
|
17922
|
-
const hasSubCommand = subCommands.some((cmd) => process.argv.includes(cmd));
|
|
17923
|
-
const useBigBanner = isHelp || !hasSubCommand;
|
|
17966
|
+
const useBigBanner = !hasSubCommand && !isHelp;
|
|
17924
17967
|
showBanner(useBigBanner ? "big" : "small");
|
|
17925
17968
|
}
|
|
17969
|
+
if (isRootHelp) {
|
|
17970
|
+
showCompactRootHelp();
|
|
17971
|
+
process.exit(0);
|
|
17972
|
+
}
|
|
17926
17973
|
var main = defineCommand({
|
|
17927
17974
|
meta: {
|
|
17928
17975
|
name: "cn",
|
|
@@ -17958,7 +18005,7 @@ var main = defineCommand({
|
|
|
17958
18005
|
},
|
|
17959
18006
|
run({ args }) {
|
|
17960
18007
|
if (args.version) {
|
|
17961
|
-
console.log(
|
|
18008
|
+
console.log(formatVersionInfo());
|
|
17962
18009
|
}
|
|
17963
18010
|
}
|
|
17964
18011
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contribute-now",
|
|
3
|
-
"version": "0.9.0-dev.
|
|
3
|
+
"version": "0.9.0-dev.9d1a08a",
|
|
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": {
|