pullfrog 0.0.195-beta.6 → 0.0.196
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.mjs +68 -17
- package/package.json +2 -2
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.
|
|
144995
|
+
version: "0.0.196",
|
|
144996
144996
|
type: "module",
|
|
144997
144997
|
bin: {
|
|
144998
144998
|
pullfrog: "dist/cli.mjs",
|
|
@@ -145012,7 +145012,7 @@ var package_default = {
|
|
|
145012
145012
|
scratch: "node scratch.ts",
|
|
145013
145013
|
upDeps: "pnpm up --latest",
|
|
145014
145014
|
lock: "pnpm install --no-frozen-lockfile",
|
|
145015
|
-
prepare: "cd .. && husky
|
|
145015
|
+
prepare: "cd .. && husky"
|
|
145016
145016
|
},
|
|
145017
145017
|
devDependencies: {
|
|
145018
145018
|
"@actions/core": "^1.11.1",
|
|
@@ -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);
|
|
@@ -153315,9 +153359,13 @@ async function ensureInstallation(ctx) {
|
|
|
153315
153359
|
isOrg: initial.isOrg
|
|
153316
153360
|
});
|
|
153317
153361
|
activeSpin.stop(`pullfrog is installed on selected repos, but ${repoRef} is not included.`);
|
|
153318
|
-
O2.info(
|
|
153319
|
-
|
|
153320
|
-
|
|
153362
|
+
O2.info(
|
|
153363
|
+
`add it under "Repository access" on the installation config page.
|
|
153364
|
+
${import_picocolors.default.dim(configUrl)}`
|
|
153365
|
+
);
|
|
153366
|
+
const openIt = await ot2({ message: "open browser?", active: "yes", inactive: "no" });
|
|
153367
|
+
handleCancel(openIt);
|
|
153368
|
+
if (openIt) openBrowser(configUrl);
|
|
153321
153369
|
} else {
|
|
153322
153370
|
activeSpin.stop("pullfrog app not installed");
|
|
153323
153371
|
const installUrl = `https://github.com/apps/${initial.appSlug}/installations/select_target?state=cli`;
|
|
@@ -153461,7 +153509,7 @@ async function handleSecret(ctx) {
|
|
|
153461
153509
|
}
|
|
153462
153510
|
if (matches.length > 0) {
|
|
153463
153511
|
activeSpin.start("");
|
|
153464
|
-
activeSpin.stop("
|
|
153512
|
+
activeSpin.stop("secrets already configured");
|
|
153465
153513
|
for (const m of matches) {
|
|
153466
153514
|
process.stdout.write(
|
|
153467
153515
|
`${import_picocolors.default.gray(d2)} ${import_picocolors.default.cyan(m.name)} ${import_picocolors.default.dim(`(${m.source})`)}
|
|
@@ -153546,8 +153594,7 @@ async function handleSecret(ctx) {
|
|
|
153546
153594
|
return;
|
|
153547
153595
|
}
|
|
153548
153596
|
if (saveResult.saved) {
|
|
153549
|
-
|
|
153550
|
-
activeSpin.stop(`${import_picocolors.default.cyan(envVar)} saved${scopeLabel ? ` as ${scopeLabel}` : ""}`);
|
|
153597
|
+
activeSpin.stop(`saved ${import_picocolors.default.cyan(envVar)} to Pullfrog`);
|
|
153551
153598
|
} else {
|
|
153552
153599
|
activeSpin.stop(import_picocolors.default.red("could not save secret"));
|
|
153553
153600
|
O2.warn(
|
|
@@ -153572,7 +153619,7 @@ async function handleSecret(ctx) {
|
|
|
153572
153619
|
});
|
|
153573
153620
|
if (secretResult.saved) {
|
|
153574
153621
|
activeSpin.stop(
|
|
153575
|
-
|
|
153622
|
+
`saved ${import_picocolors.default.cyan(envVar)} to ${org && !secretResult.orgFailed ? `${import_picocolors.default.dim(ctx.owner)} org secret` : "GitHub Actions secret"}`
|
|
153576
153623
|
);
|
|
153577
153624
|
if (secretResult.orgFailed) {
|
|
153578
153625
|
O2.warn("org secret failed (admin access required) \u2014 saved as repo secret instead");
|
|
@@ -153587,7 +153634,7 @@ async function promptTestRun(ctx) {
|
|
|
153587
153634
|
const proceed = await _t({
|
|
153588
153635
|
message: "test your installation?",
|
|
153589
153636
|
options: [
|
|
153590
|
-
{ value: true, label: "yes", hint:
|
|
153637
|
+
{ value: true, label: "yes", hint: "dispatches a test run in your GitHub Actions" },
|
|
153591
153638
|
{ value: false, label: "skip" }
|
|
153592
153639
|
]
|
|
153593
153640
|
});
|
|
@@ -153605,10 +153652,12 @@ async function promptTestRun(ctx) {
|
|
|
153605
153652
|
O2.warn(result.data.error || `dispatch failed (${result.status})`);
|
|
153606
153653
|
return;
|
|
153607
153654
|
}
|
|
153608
|
-
activeSpin.stop("test run
|
|
153655
|
+
activeSpin.stop("dispatched test run");
|
|
153609
153656
|
if (result.data.url) {
|
|
153610
|
-
process.stdout.write(
|
|
153611
|
-
|
|
153657
|
+
process.stdout.write(
|
|
153658
|
+
`${import_picocolors.default.gray(d2)} ${link(import_picocolors.default.dim(result.data.url), result.data.url)}
|
|
153659
|
+
`
|
|
153660
|
+
);
|
|
153612
153661
|
openBrowser(result.data.url);
|
|
153613
153662
|
}
|
|
153614
153663
|
}
|
|
@@ -153641,7 +153690,7 @@ async function main2() {
|
|
|
153641
153690
|
if (!resolved) bail(`unknown model provider: ${secrets.model}`);
|
|
153642
153691
|
provider2 = resolved;
|
|
153643
153692
|
spin.start("");
|
|
153644
|
-
spin.stop(`
|
|
153693
|
+
spin.stop(`using model ${import_picocolors.default.cyan(secrets.model)}`);
|
|
153645
153694
|
} else {
|
|
153646
153695
|
const providerId = await _t({
|
|
153647
153696
|
message: "select your preferred model provider",
|
|
@@ -153686,7 +153735,7 @@ async function main2() {
|
|
|
153686
153735
|
if (result.data.already_existed) {
|
|
153687
153736
|
spin.stop("pullfrog.yml already exists");
|
|
153688
153737
|
} else if (result.data.pull_request_url) {
|
|
153689
|
-
spin.stop("
|
|
153738
|
+
spin.stop("opened pull request with pullfrog.yml");
|
|
153690
153739
|
process.stdout.write(
|
|
153691
153740
|
`${import_picocolors.default.gray(d2)} ${link(import_picocolors.default.dim(result.data.pull_request_url), result.data.pull_request_url)}
|
|
153692
153741
|
`
|
|
@@ -153703,7 +153752,9 @@ async function main2() {
|
|
|
153703
153752
|
if (!merged) skipTestRun = true;
|
|
153704
153753
|
} else {
|
|
153705
153754
|
const short = result.data.hash?.slice(0, 7);
|
|
153706
|
-
spin.stop(
|
|
153755
|
+
spin.stop(
|
|
153756
|
+
short ? `committed pullfrog.yml to repo ${import_picocolors.default.dim(short)}` : "committed pullfrog.yml to repo"
|
|
153757
|
+
);
|
|
153707
153758
|
}
|
|
153708
153759
|
if (!skipTestRun && !secrets.hasRuns) {
|
|
153709
153760
|
await promptTestRun({ token, owner: remote.owner, repo: remote.repo });
|
|
@@ -153777,7 +153828,7 @@ async function run2() {
|
|
|
153777
153828
|
}
|
|
153778
153829
|
|
|
153779
153830
|
// cli.ts
|
|
153780
|
-
var VERSION10 = "0.0.
|
|
153831
|
+
var VERSION10 = "0.0.196";
|
|
153781
153832
|
var bin = basename2(process.argv[1] || "");
|
|
153782
153833
|
var PROG = bin === "pf" || bin === "pullfrog" ? bin : "pullfrog";
|
|
153783
153834
|
var rawArgs = process.argv.slice(2);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pullfrog",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.196",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"pullfrog": "dist/cli.mjs",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"scratch": "node scratch.ts",
|
|
21
21
|
"upDeps": "pnpm up --latest",
|
|
22
22
|
"lock": "pnpm install --no-frozen-lockfile",
|
|
23
|
-
"prepare": "cd .. && husky
|
|
23
|
+
"prepare": "cd .. && husky"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@actions/core": "^1.11.1",
|