defang 0.5.41 → 0.5.43

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.
Files changed (2) hide show
  1. package/bin/clilib.js +4 -5
  2. package/package.json +1 -1
package/bin/clilib.js CHANGED
@@ -104,14 +104,13 @@ function getLatestVersion() {
104
104
  });
105
105
  });
106
106
  }
107
- function downloadAppArchive(version, archiveFilename, outputPath) {
107
+ function downloadAppArchive(archiveFilename, outputPath) {
108
108
  return __awaiter(this, void 0, void 0, function () {
109
- var repo, downloadUrl, downloadTargetFile;
109
+ var downloadUrl, downloadTargetFile;
110
110
  return __generator(this, function (_a) {
111
111
  switch (_a.label) {
112
112
  case 0:
113
- repo = "DefangLabs/defang";
114
- downloadUrl = "https://github.com/".concat(repo, "/releases/download/v").concat(version, "/").concat(archiveFilename);
113
+ downloadUrl = "https://s.defang.io/".concat(archiveFilename, "?x-defang-source=npm");
115
114
  downloadTargetFile = path.join(outputPath, archiveFilename);
116
115
  return [4, downloadFile(downloadUrl, downloadTargetFile)];
117
116
  case 1: return [2, _a.sent()];
@@ -357,7 +356,7 @@ function install(version, saveDirectory, os) {
357
356
  _a.trys.push([0, 4, , 5]);
358
357
  console.log("Getting latest defang cli");
359
358
  filename = getAppArchiveFilename(version, os.platform, os.arch);
360
- return [4, downloadAppArchive(version, filename, saveDirectory)];
359
+ return [4, downloadAppArchive(filename, saveDirectory)];
361
360
  case 1:
362
361
  archiveFile = _a.sent();
363
362
  if (archiveFile == null || archiveFile.length === 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "defang",
3
- "version": "0.5.41",
3
+ "version": "0.5.43",
4
4
  "author": "Defang Software Labs Inc.",
5
5
  "description": "CLI for the Defang Opinionated Platform",
6
6
  "license": "MIT",