@wraps.dev/cli 2.22.3 → 2.22.4
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/dist/api-lambda.zip
CHANGED
|
Binary file
|
package/dist/cli.js
CHANGED
|
@@ -32099,6 +32099,9 @@ init_events();
|
|
|
32099
32099
|
init_esm_shims();
|
|
32100
32100
|
init_metadata();
|
|
32101
32101
|
var SELFHOST_API_FUNCTION_NAME = "wraps-selfhost-api";
|
|
32102
|
+
function normalizeApiUrl(url) {
|
|
32103
|
+
return url.replace(/\/+$/, "");
|
|
32104
|
+
}
|
|
32102
32105
|
async function resolveSelfhostApiUrl(region) {
|
|
32103
32106
|
try {
|
|
32104
32107
|
const { LambdaClient: LambdaClient3, GetFunctionUrlConfigCommand } = await import("@aws-sdk/client-lambda");
|
|
@@ -32108,7 +32111,7 @@ async function resolveSelfhostApiUrl(region) {
|
|
|
32108
32111
|
FunctionName: SELFHOST_API_FUNCTION_NAME
|
|
32109
32112
|
})
|
|
32110
32113
|
);
|
|
32111
|
-
return result.FunctionUrl
|
|
32114
|
+
return result.FunctionUrl ? normalizeApiUrl(result.FunctionUrl) : null;
|
|
32112
32115
|
} catch {
|
|
32113
32116
|
return null;
|
|
32114
32117
|
}
|
|
@@ -32119,7 +32122,7 @@ async function reconcileSelfhostApiUrl(metadata, region) {
|
|
|
32119
32122
|
return null;
|
|
32120
32123
|
}
|
|
32121
32124
|
if (selfhost.apiUrl) {
|
|
32122
|
-
return selfhost.apiUrl;
|
|
32125
|
+
return normalizeApiUrl(selfhost.apiUrl);
|
|
32123
32126
|
}
|
|
32124
32127
|
const recovered = await resolveSelfhostApiUrl(region);
|
|
32125
32128
|
if (!recovered) {
|
|
@@ -32576,7 +32579,7 @@ Run ${pc44.cyan("wraps selfhost deploy")} to finish deploying the self-hosted co
|
|
|
32576
32579
|
);
|
|
32577
32580
|
process.exit(1);
|
|
32578
32581
|
}
|
|
32579
|
-
const apiBaseUrl = selfhosted && selfhostService ? selfhostService.apiUrl : getApiBaseUrl();
|
|
32582
|
+
const apiBaseUrl = selfhosted && selfhostService ? normalizeApiUrl(selfhostService.apiUrl) : getApiBaseUrl();
|
|
32580
32583
|
const dashboardUrl = selfhosted && selfhostService ? selfhostService.config.appUrl : getAppBaseUrl();
|
|
32581
32584
|
const hasEmail = !!metadata.services.email?.config;
|
|
32582
32585
|
let token;
|