@pushary/agent-hooks 0.64.0 → 0.64.1
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.64.1
|
|
4
|
+
|
|
5
|
+
### Ctrl-C at the pairing QR printed nothing
|
|
6
|
+
|
|
7
|
+
The QR screen said "No app? Press Ctrl-C for the ways to finish without one", and
|
|
8
|
+
pressing it printed nothing at all. `connectViaAppPairing` handles SIGINT by
|
|
9
|
+
exiting the process itself, so control never returned to setup and the lines it
|
|
10
|
+
meant to show were unreachable on the one path that advertised them.
|
|
11
|
+
|
|
12
|
+
Setup now hands the escape to the pairing wait, which prints it inside the
|
|
13
|
+
handler before exiting, and the line on screen names the command directly instead
|
|
14
|
+
of telling you to interrupt the program to find out what it is.
|
|
15
|
+
|
|
16
|
+
The same two commands are printed when a pairing simply never completes, so both
|
|
17
|
+
ways out of the QR screen say the same thing.
|
|
18
|
+
|
|
19
|
+
|
|
3
20
|
## 0.64.0
|
|
4
21
|
|
|
5
22
|
### A typo on `--dry-run` ran a real clean
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
describeReach,
|
|
35
35
|
fetchChannels,
|
|
36
36
|
reachVerdict
|
|
37
|
-
} from "../chunk-
|
|
37
|
+
} from "../chunk-RASBS2CC.js";
|
|
38
38
|
import "../chunk-3EGEA4KH.js";
|
|
39
39
|
import {
|
|
40
40
|
keyPrefix,
|
|
@@ -102,12 +102,13 @@ var globalVersion = () => {
|
|
|
102
102
|
};
|
|
103
103
|
var collectBundle = async (options2 = {}) => {
|
|
104
104
|
const now = options2.now ?? (() => /* @__PURE__ */ new Date());
|
|
105
|
+
const readGlobalVersion = options2.readGlobalVersion ?? globalVersion;
|
|
105
106
|
const source = readKeySource();
|
|
106
107
|
const identity = options2.identity ?? null;
|
|
107
108
|
return {
|
|
108
109
|
generatedAt: now().toISOString(),
|
|
109
110
|
cliVersion: getPackageVersion(),
|
|
110
|
-
globalVersion:
|
|
111
|
+
globalVersion: readGlobalVersion(),
|
|
111
112
|
node: process.version,
|
|
112
113
|
platform: process.platform,
|
|
113
114
|
arch: process.arch,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
connectViaAppPairing,
|
|
46
46
|
printConnectInstructions,
|
|
47
47
|
setHumanStream
|
|
48
|
-
} from "../chunk-
|
|
48
|
+
} from "../chunk-RASBS2CC.js";
|
|
49
49
|
import "../chunk-3EGEA4KH.js";
|
|
50
50
|
import {
|
|
51
51
|
KEY_FILE_MODE,
|
|
@@ -982,6 +982,19 @@ var verifyKeyOrExit = async (apiKey, options, precomputed) => {
|
|
|
982
982
|
}
|
|
983
983
|
return result;
|
|
984
984
|
};
|
|
985
|
+
var printPairingEscape = () => {
|
|
986
|
+
console.log();
|
|
987
|
+
console.log(` ${yellow("!")} No app? Two ways to finish without one:`);
|
|
988
|
+
console.log();
|
|
989
|
+
console.log(` ${cyan("npx @pushary/agent-hooks setup --connect browser")}`);
|
|
990
|
+
console.log(` ${dim("Approve in a browser tab. No phone needed.")}`);
|
|
991
|
+
console.log();
|
|
992
|
+
console.log(` ${cyan("npx @pushary/agent-hooks setup --key pk_...")}`);
|
|
993
|
+
console.log(` ${dim("Paste a key from")} ${cyan("pushary.com/dashboard/agent/settings")}`);
|
|
994
|
+
console.log();
|
|
995
|
+
console.log(` ${dim("Or get the app at")} ${cyan("https://pushary.com/download")} ${dim("and re-run setup.")}`);
|
|
996
|
+
console.log();
|
|
997
|
+
};
|
|
985
998
|
var usableStoredKey = async (apiKey) => {
|
|
986
999
|
let result;
|
|
987
1000
|
try {
|
|
@@ -1160,17 +1173,11 @@ var main = async () => {
|
|
|
1160
1173
|
}
|
|
1161
1174
|
} else if (connectMode === "app" && canRunBrowserLogin() && !options.skipPhone) {
|
|
1162
1175
|
console.log(` ${dim("Pairing with your Pushary app.")}`);
|
|
1163
|
-
console.log(` ${dim("No app?
|
|
1176
|
+
console.log(` ${dim("No app? Ctrl-C, then:")} ${cyan("npx @pushary/agent-hooks setup --connect browser")}`);
|
|
1164
1177
|
const previous = readKeySource();
|
|
1165
|
-
const paired = await connectViaAppPairing();
|
|
1178
|
+
const paired = await connectViaAppPairing({ onCancelled: printPairingEscape });
|
|
1166
1179
|
if (!paired) {
|
|
1167
|
-
|
|
1168
|
-
console.log(` ${yellow("!")} Pairing didn't complete. Two ways to finish without the app:`);
|
|
1169
|
-
console.log();
|
|
1170
|
-
console.log(` ${cyan("setup --connect browser")} ${dim("Approve in a browser tab")}`);
|
|
1171
|
-
console.log(` ${cyan("setup --key pk_...")} ${dim("Paste a key you already have")}`);
|
|
1172
|
-
console.log();
|
|
1173
|
-
console.log(` ${dim("Or get the app at")} ${cyan("https://pushary.com/download")} ${dim("and re-run setup.")}`);
|
|
1180
|
+
printPairingEscape();
|
|
1174
1181
|
process.exit(EXIT.NOT_CONFIGURED);
|
|
1175
1182
|
}
|
|
1176
1183
|
trimmedKey = paired.apiKey;
|
|
@@ -494,7 +494,7 @@ var buildPairLinks = (pairId, publicKeyB64, baseUrl = apiBase()) => {
|
|
|
494
494
|
deepLink: `pushary://pair?pk=${pk}&id=${id}`
|
|
495
495
|
};
|
|
496
496
|
};
|
|
497
|
-
var connectViaAppPairing = async () => {
|
|
497
|
+
var connectViaAppPairing = async (options = {}) => {
|
|
498
498
|
const keypair = generateKeypair();
|
|
499
499
|
const pairId = await startPairing(keypair.publicKeyB64);
|
|
500
500
|
if (!pairId) {
|
|
@@ -520,6 +520,7 @@ var connectViaAppPairing = async () => {
|
|
|
520
520
|
const onInterrupt = () => {
|
|
521
521
|
cancelled = true;
|
|
522
522
|
stop(yellow("!"), "Cancelled");
|
|
523
|
+
options.onCancelled?.();
|
|
523
524
|
void cancelPairing(pairId).finally(() => process.exit(EXIT_ABORTED));
|
|
524
525
|
};
|
|
525
526
|
process.once("SIGINT", onInterrupt);
|