a2a-exposed 0.8.29 → 0.8.30
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/lib/link-finish.mjs +8 -2
- package/package.json +1 -1
- package/worker/src/version.ts +1 -1
package/lib/link-finish.mjs
CHANGED
|
@@ -228,8 +228,14 @@ async function setupLink(o, {
|
|
|
228
228
|
}
|
|
229
229
|
if (!connected) throw new CliError("connector did not report connected within 60 seconds; check cloudflared and run finish again for fresh approval");
|
|
230
230
|
const tested = await request("wake-test", { signing_secret: secret, preset }, grant);
|
|
231
|
-
|
|
232
|
-
|
|
231
|
+
// These 409 codes come from saveWakeSettings after a successful wake test.
|
|
232
|
+
const saveRejected = tested.response.status === 409 && ["url", "preset", "header", "key", "unavailable", "unreadable", "conflict", "failed"].includes(tested.body.error);
|
|
233
|
+
if (!tested.response.ok && !saveRejected) throw failure(tested.response.status, tested.body, context, "grant");
|
|
234
|
+
if (saveRejected || (tested.body.result === "ok" && tested.body.saved !== true)) {
|
|
235
|
+
write("wake_result=not-saved");
|
|
236
|
+
throw new CliError("The test wake was delivered, but the settings were not saved. Save them in Wake settings on the website, then test again. The saved connector token remains on disk.");
|
|
237
|
+
}
|
|
238
|
+
if (tested.body.result !== "ok") {
|
|
233
239
|
const { result, message } = wakeFailure(tested.body.result);
|
|
234
240
|
write(`wake_result=${result}`);
|
|
235
241
|
throw new CliError(message);
|
package/package.json
CHANGED
package/worker/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Inbox build. Keep this equal to `version` in cli/package.json. */
|
|
2
|
-
export const VERSION = "0.8.
|
|
2
|
+
export const VERSION = "0.8.30";
|