pullfrog 0.0.195-beta.6 → 0.0.195-beta.7

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.
Files changed (2) hide show
  1. package/dist/cli.mjs +49 -3
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -144992,7 +144992,7 @@ var import_semver = __toESM(require_semver2(), 1);
144992
144992
  // package.json
144993
144993
  var package_default = {
144994
144994
  name: "pullfrog",
144995
- version: "0.0.195-beta.6",
144995
+ version: "0.0.195-beta.7",
144996
144996
  type: "module",
144997
144997
  bin: {
144998
144998
  pullfrog: "dist/cli.mjs",
@@ -152742,6 +152742,23 @@ var p = class {
152742
152742
  }
152743
152743
  }
152744
152744
  };
152745
+ var Q = class extends p {
152746
+ get cursor() {
152747
+ return this.value ? 0 : 1;
152748
+ }
152749
+ get _value() {
152750
+ return this.cursor === 0;
152751
+ }
152752
+ constructor(t2) {
152753
+ super(t2, false), this.value = !!t2.initialValue, this.on("userInput", () => {
152754
+ this.value = this._value;
152755
+ }), this.on("confirm", (e) => {
152756
+ this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = e, this.state = "submit", this.close();
152757
+ }), this.on("cursor", () => {
152758
+ this.value = !this.value;
152759
+ });
152760
+ }
152761
+ };
152745
152762
  var rt = class extends p {
152746
152763
  _mask = "\u2022";
152747
152764
  get cursor() {
@@ -152887,6 +152904,33 @@ var Y2 = ({ cursor: e, options: i, style: s, output: r = process.stdout, maxItem
152887
152904
  for (const b of h) for (const x of b) C2.push(x);
152888
152905
  return g && C2.push(l), C2;
152889
152906
  };
152907
+ var ot2 = (e) => {
152908
+ const i = e.active ?? "Yes", s = e.inactive ?? "No";
152909
+ return new Q({ active: i, inactive: s, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue ?? true, render() {
152910
+ const r = e.withGuide ?? u.withGuide, u2 = `${V2(this.state)} `, n = r ? `${t("gray", d2)} ` : "", o = R(e.output, e.message, n, u2), c2 = `${r ? `${t("gray", d2)}
152911
+ ` : ""}${o}
152912
+ `, a = this.value ? i : s;
152913
+ switch (this.state) {
152914
+ case "submit": {
152915
+ const l = r ? `${t("gray", d2)} ` : "";
152916
+ return `${c2}${l}${t("dim", a)}`;
152917
+ }
152918
+ case "cancel": {
152919
+ const l = r ? `${t("gray", d2)} ` : "";
152920
+ return `${c2}${l}${t(["strikethrough", "dim"], a)}${r ? `
152921
+ ${t("gray", d2)}` : ""}`;
152922
+ }
152923
+ default: {
152924
+ const l = r ? `${t("cyan", d2)} ` : "", $3 = r ? t("cyan", E2) : "";
152925
+ return `${c2}${l}${this.value ? `${t("green", z3)} ${i}` : `${t("dim", H2)} ${t("dim", i)}`}${e.vertical ? r ? `
152926
+ ${t("cyan", d2)} ` : `
152927
+ ` : ` ${t("dim", "/")} `}${this.value ? `${t("dim", H2)} ${t("dim", s)}` : `${t("green", z3)} ${s}`}
152928
+ ${$3}
152929
+ `;
152930
+ }
152931
+ }
152932
+ } }).prompt();
152933
+ };
152890
152934
  var O2 = { message: (e = [], { symbol: i = t("gray", d2), secondarySymbol: s = t("gray", d2), output: r = process.stdout, spacing: u2 = 1, withGuide: n } = {}) => {
152891
152935
  const o = [], c2 = n ?? u.withGuide, a = c2 ? s : "", l = c2 ? `${i} ` : "", $3 = c2 ? `${s} ` : "";
152892
152936
  for (let p2 = 0; p2 < u2; p2++) o.push(a);
@@ -153317,7 +153361,9 @@ async function ensureInstallation(ctx) {
153317
153361
  activeSpin.stop(`pullfrog is installed on selected repos, but ${repoRef} is not included.`);
153318
153362
  O2.info(`add it under "Repository access" on the installation config page.
153319
153363
  ${import_picocolors.default.dim(configUrl)}`);
153320
- openBrowser(configUrl);
153364
+ const openIt = await ot2({ message: "open browser?", active: "yes", inactive: "no" });
153365
+ handleCancel(openIt);
153366
+ if (openIt) openBrowser(configUrl);
153321
153367
  } else {
153322
153368
  activeSpin.stop("pullfrog app not installed");
153323
153369
  const installUrl = `https://github.com/apps/${initial.appSlug}/installations/select_target?state=cli`;
@@ -153777,7 +153823,7 @@ async function run2() {
153777
153823
  }
153778
153824
 
153779
153825
  // cli.ts
153780
- var VERSION10 = "0.0.195-beta.6";
153826
+ var VERSION10 = "0.0.195-beta.7";
153781
153827
  var bin = basename2(process.argv[1] || "");
153782
153828
  var PROG = bin === "pf" || bin === "pullfrog" ? bin : "pullfrog";
153783
153829
  var rawArgs = process.argv.slice(2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pullfrog",
3
- "version": "0.0.195-beta.6",
3
+ "version": "0.0.195-beta.7",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "pullfrog": "dist/cli.mjs",