@vellumai/cli 0.11.0-dev.202607302257.e87c491 → 0.11.0-dev.202607302326.a10ae93
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.
|
@@ -204,7 +204,7 @@ export function isLoopbackPublicUrl(url: string): boolean {
|
|
|
204
204
|
* removed so a pasted pair-page URL collapses to its base, and trailing
|
|
205
205
|
* slashes trimmed. Throws if the value is not a parseable URL.
|
|
206
206
|
*/
|
|
207
|
-
export function
|
|
207
|
+
export function normalizePairingBaseUrl(value: string): string {
|
|
208
208
|
const url = new URL(value);
|
|
209
209
|
url.search = "";
|
|
210
210
|
url.hash = "";
|
|
@@ -225,7 +225,7 @@ export function normalizePublicBaseUrl(value: string): string {
|
|
|
225
225
|
export function resolvePublicBaseUrl(raw: string): PublicBaseUrlResult {
|
|
226
226
|
let normalized: string;
|
|
227
227
|
try {
|
|
228
|
-
normalized =
|
|
228
|
+
normalized = normalizePairingBaseUrl(raw);
|
|
229
229
|
} catch {
|
|
230
230
|
return { ok: false, reason: "unparseable" };
|
|
231
231
|
}
|
package/package.json
CHANGED
package/src/commands/pair.ts
CHANGED
|
@@ -17,7 +17,7 @@ import qrcodeTerminal from "qrcode-terminal";
|
|
|
17
17
|
|
|
18
18
|
import {
|
|
19
19
|
buildRemoteWebPairingUrl,
|
|
20
|
-
|
|
20
|
+
normalizePairingBaseUrl,
|
|
21
21
|
resolvePublicBaseUrl,
|
|
22
22
|
tunnelProviderWebsiteName,
|
|
23
23
|
type PublicBaseUrlRejection,
|
|
@@ -414,7 +414,7 @@ export async function pair(): Promise<void> {
|
|
|
414
414
|
|
|
415
415
|
let publicBaseUrl: string;
|
|
416
416
|
try {
|
|
417
|
-
publicBaseUrl =
|
|
417
|
+
publicBaseUrl = normalizePairingBaseUrl(advertisedUrl);
|
|
418
418
|
} catch {
|
|
419
419
|
console.error(`Error: invalid --url value '${advertisedUrl}'.`);
|
|
420
420
|
process.exit(1);
|