@pushary/agent-hooks 0.65.0 → 0.66.0
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,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.66.0
|
|
4
|
+
|
|
5
|
+
### Setup waited three minutes for a step that takes longer than three minutes
|
|
6
|
+
|
|
7
|
+
If you already had the app installed and signed in, pairing resolved in seconds
|
|
8
|
+
and this never came up. If you did not, it could not work at all.
|
|
9
|
+
|
|
10
|
+
Scanning the QR without the app opens a page that sends you to the store. Install
|
|
11
|
+
it, sign in, subscribe, come back, scan: that is never three minutes. The CLI had
|
|
12
|
+
given up and cancelled the pairing long before, so a first-time user's first scan
|
|
13
|
+
was guaranteed to fail, and the only route through was to notice the terminal had
|
|
14
|
+
stopped waiting and run setup again.
|
|
15
|
+
|
|
16
|
+
Setup now waits as long as the code is actually valid, and after the first
|
|
17
|
+
45 seconds the spinner says what to do if the app is not installed yet. Ctrl-C
|
|
18
|
+
still exits cleanly and cancels the pairing, so nothing holds you there.
|
|
19
|
+
|
|
20
|
+
The window itself is unchanged in what protects it: a pairing id is 128 bits,
|
|
21
|
+
single use, deleted the moment it is claimed, and authorising one requires a
|
|
22
|
+
signed-in session for the owning account and the public key you physically
|
|
23
|
+
scanned.
|
|
24
|
+
|
|
3
25
|
## 0.65.0
|
|
4
26
|
|
|
5
27
|
### The pairing QR now works when you scan it with your phone camera
|
|
@@ -448,7 +448,8 @@ var printConnectInstructions = async (apiKey) => {
|
|
|
448
448
|
return phoneFailure("no_device");
|
|
449
449
|
};
|
|
450
450
|
var PAIR_POLL_INTERVAL_MS = 2e3;
|
|
451
|
-
var PAIR_TIMEOUT_MS =
|
|
451
|
+
var PAIR_TIMEOUT_MS = 9e5;
|
|
452
|
+
var PAIR_HINT_AFTER_MS = 45e3;
|
|
452
453
|
var startPairing = async (cliPublicKey) => {
|
|
453
454
|
try {
|
|
454
455
|
const res = await fetch(`${apiBase()}/api/mobile/pair/start`, {
|
|
@@ -511,10 +512,14 @@ var connectViaAppPairing = async (options = {}) => {
|
|
|
511
512
|
console.log(` ${dim("Confirm the app shows fingerprint")} ${cyan(publicKeyFingerprint(keypair.publicKeyB64))}`);
|
|
512
513
|
console.log(` ${dim("Already have the app and it opened a browser? Use")} ${cyan(deepLink)}`);
|
|
513
514
|
console.log();
|
|
514
|
-
const
|
|
515
|
+
const startedAt = Date.now();
|
|
516
|
+
const deadline = startedAt + PAIR_TIMEOUT_MS;
|
|
515
517
|
const stop = startSpinner(() => {
|
|
516
|
-
const left = Math.max(0, Math.ceil((deadline - Date.now()) /
|
|
517
|
-
|
|
518
|
+
const left = Math.max(0, Math.ceil((deadline - Date.now()) / 6e4));
|
|
519
|
+
if (Date.now() - startedAt < PAIR_HINT_AFTER_MS) {
|
|
520
|
+
return "Waiting for the app to authorize";
|
|
521
|
+
}
|
|
522
|
+
return `Waiting for the app ${dim(`(${left}m left. No app yet? Install it, sign in with this account, then scan. Ctrl-C to stop)`)}`;
|
|
518
523
|
});
|
|
519
524
|
let cancelled = false;
|
|
520
525
|
const onInterrupt = () => {
|