openmates 0.10.0-alpha.4 → 0.10.0-alpha.5
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.
|
@@ -4852,12 +4852,10 @@ var UPLOAD_RETRY_DELAY_MS = 2e3;
|
|
|
4852
4852
|
function getUploadUrl(apiUrl) {
|
|
4853
4853
|
try {
|
|
4854
4854
|
const url = new URL(apiUrl);
|
|
4855
|
-
url.hostname
|
|
4856
|
-
url.port = "";
|
|
4857
|
-
return url.origin;
|
|
4855
|
+
if (url.hostname === "localhost") return "http://localhost:8001";
|
|
4858
4856
|
} catch {
|
|
4859
|
-
return "https://upload.openmates.org";
|
|
4860
4857
|
}
|
|
4858
|
+
return "https://upload.openmates.org";
|
|
4861
4859
|
}
|
|
4862
4860
|
async function uploadFile(filePath, session) {
|
|
4863
4861
|
const filename = basename2(filePath);
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED