pullfrog 0.0.195-beta.5 → 0.0.195-beta.6

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 +6 -64
  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.5",
144995
+ version: "0.0.195-beta.6",
144996
144996
  type: "module",
144997
144997
  bin: {
144998
144998
  pullfrog: "dist/cli.mjs",
@@ -152742,23 +152742,6 @@ 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
- };
152762
152745
  var rt = class extends p {
152763
152746
  _mask = "\u2022";
152764
152747
  get cursor() {
@@ -152904,33 +152887,6 @@ var Y2 = ({ cursor: e, options: i, style: s, output: r = process.stdout, maxItem
152904
152887
  for (const b of h) for (const x of b) C2.push(x);
152905
152888
  return g && C2.push(l), C2;
152906
152889
  };
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
- };
152934
152890
  var O2 = { message: (e = [], { symbol: i = t("gray", d2), secondarySymbol: s = t("gray", d2), output: r = process.stdout, spacing: u2 = 1, withGuide: n } = {}) => {
152935
152891
  const o = [], c2 = n ?? u.withGuide, a = c2 ? s : "", l = c2 ? `${i} ` : "", $3 = c2 ? `${s} ` : "";
152936
152892
  for (let p2 = 0; p2 < u2; p2++) o.push(a);
@@ -153256,7 +153212,6 @@ async function fetchStatus(ctx) {
153256
153212
  return {
153257
153213
  installed: false,
153258
153214
  appSlug: result.data.appSlug,
153259
- ownerHasInstallation: result.data.ownerHasInstallation === true,
153260
153215
  installationId: typeof result.data.installationId === "number" ? result.data.installationId : null,
153261
153216
  repositorySelection: sel === "all" || sel === "selected" ? sel : null,
153262
153217
  isOrg: result.data.isOrg === true
@@ -153352,29 +153307,16 @@ async function ensureInstallation(ctx) {
153352
153307
  return initial;
153353
153308
  }
153354
153309
  const sessionId = await createSession(ctx);
153355
- if (initial.ownerHasInstallation && initial.installationId) {
153310
+ if (initial.installationId) {
153356
153311
  const repoRef = import_picocolors.default.bold(`${ctx.owner}/${ctx.repo}`);
153357
153312
  const configUrl = installationConfigUrl({
153358
153313
  owner: ctx.owner,
153359
153314
  installationId: initial.installationId,
153360
153315
  isOrg: initial.isOrg
153361
153316
  });
153362
- if (initial.repositorySelection === "selected") {
153363
- activeSpin.stop(`pullfrog is installed on selected repos \u2014 ${repoRef} is not in the list`);
153364
- process.stdout.write(`${import_picocolors.default.gray(d2)} ${link(import_picocolors.default.dim(configUrl), configUrl)}
153365
- `);
153366
- const proceed = await ot2({
153367
- message: "open browser to add it?",
153368
- active: "open",
153369
- inactive: "cancel"
153370
- });
153371
- handleCancel(proceed);
153372
- if (!proceed) bail("canceled.");
153373
- } else {
153374
- activeSpin.stop(`pullfrog is installed on selected repos, but ${repoRef} is not included.`);
153375
- O2.info(`add it under "Repository access" on the installation config page.
153317
+ activeSpin.stop(`pullfrog is installed on selected repos, but ${repoRef} is not included.`);
153318
+ O2.info(`add it under "Repository access" on the installation config page.
153376
153319
  ${import_picocolors.default.dim(configUrl)}`);
153377
- }
153378
153320
  openBrowser(configUrl);
153379
153321
  } else {
153380
153322
  activeSpin.stop("pullfrog app not installed");
@@ -153383,7 +153325,7 @@ async function ensureInstallation(ctx) {
153383
153325
  ${import_picocolors.default.dim(installUrl)}`);
153384
153326
  openBrowser(installUrl);
153385
153327
  }
153386
- const isRepoAccessUpdate = initial.ownerHasInstallation;
153328
+ const isRepoAccessUpdate = !!initial.installationId;
153387
153329
  const baseMsg = isRepoAccessUpdate ? "once you've added the repo, onboarding will proceed automatically" : "once you've installed the app, onboarding will proceed automatically";
153388
153330
  activeSpin.start(baseMsg);
153389
153331
  let activeSessionId = sessionId;
@@ -153835,7 +153777,7 @@ async function run2() {
153835
153777
  }
153836
153778
 
153837
153779
  // cli.ts
153838
- var VERSION10 = "0.0.195-beta.5";
153780
+ var VERSION10 = "0.0.195-beta.6";
153839
153781
  var bin = basename2(process.argv[1] || "");
153840
153782
  var PROG = bin === "pf" || bin === "pullfrog" ? bin : "pullfrog";
153841
153783
  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.5",
3
+ "version": "0.0.195-beta.6",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "pullfrog": "dist/cli.mjs",