@agent-nexus/csreg 0.1.6 → 0.1.7
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.
|
@@ -601,10 +601,21 @@ async function pushSingle(resolved) {
|
|
|
601
601
|
redirect: "manual"
|
|
602
602
|
});
|
|
603
603
|
if (uploadResponse.status === 301 || uploadResponse.status === 302 || uploadResponse.status === 307 || uploadResponse.status === 308) {
|
|
604
|
-
|
|
604
|
+
let redirectUrl = uploadResponse.headers.get("location");
|
|
605
|
+
if (!redirectUrl) {
|
|
606
|
+
const body = await uploadResponse.text();
|
|
607
|
+
const endpointMatch = body.match(/<Endpoint>([^<]+)<\/Endpoint>/);
|
|
608
|
+
if (endpointMatch) {
|
|
609
|
+
const url = new URL(prepared.uploadUrl);
|
|
610
|
+
url.hostname = endpointMatch[1];
|
|
611
|
+
redirectUrl = url.toString();
|
|
612
|
+
}
|
|
613
|
+
}
|
|
605
614
|
if (!redirectUrl) {
|
|
606
615
|
spin.fail("Upload failed.");
|
|
607
|
-
throw new CliError("
|
|
616
|
+
throw new CliError("S3 returned a redirect but no usable endpoint.", [
|
|
617
|
+
"This may be a region mismatch. Contact support."
|
|
618
|
+
]);
|
|
608
619
|
}
|
|
609
620
|
uploadResponse = await fetch(redirectUrl, {
|
|
610
621
|
method: "PUT",
|
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
success,
|
|
20
20
|
validateCommand,
|
|
21
21
|
warn
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-VTCXMN4H.js";
|
|
23
23
|
|
|
24
24
|
// src/index.ts
|
|
25
25
|
import { Command as Command11 } from "commander";
|
|
@@ -266,7 +266,7 @@ var releaseCommand = new Command6("release").description("Bump the version in SK
|
|
|
266
266
|
writeFileSync2(skillPath, updated, "utf-8");
|
|
267
267
|
info(`Updated version to ${newVersion}`);
|
|
268
268
|
}
|
|
269
|
-
const { pushCommand: pushCommand2 } = await import("./push-
|
|
269
|
+
const { pushCommand: pushCommand2 } = await import("./push-7P5F2O6O.js");
|
|
270
270
|
await pushCommand2.parseAsync([dir], { from: "user" });
|
|
271
271
|
} catch (err) {
|
|
272
272
|
handleError(err);
|