@oclif/plugin-update 3.1.9 → 3.1.11

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/lib/update.d.ts CHANGED
@@ -30,6 +30,7 @@ export declare class Updater {
30
30
  private notUpdatable;
31
31
  private alreadyOnVersion;
32
32
  private determineChannel;
33
+ private determinePlatform;
33
34
  private determineCurrentVersion;
34
35
  private findLocalVersion;
35
36
  private setChannel;
package/lib/update.js CHANGED
@@ -119,19 +119,19 @@ class Updater {
119
119
  return s3SubDir;
120
120
  }
121
121
  s3ChannelManifestKey(channel) {
122
- const { bin, platform, arch } = this.config;
122
+ const { bin, arch } = this.config;
123
123
  const s3SubDir = this.composeS3SubDir();
124
- return path.join(s3SubDir, 'channels', channel, `${bin}-${platform}-${arch}-buildmanifest`);
124
+ return path.join(s3SubDir, 'channels', channel, `${bin}-${this.determinePlatform()}-${arch}-buildmanifest`);
125
125
  }
126
126
  s3VersionManifestKey(version, hash) {
127
- const { bin, platform, arch } = this.config;
127
+ const { bin, arch } = this.config;
128
128
  const s3SubDir = this.composeS3SubDir();
129
- return path.join(s3SubDir, 'versions', version, hash, `${bin}-v${version}-${hash}-${platform}-${arch}-buildmanifest`);
129
+ return path.join(s3SubDir, 'versions', version, hash, `${bin}-v${version}-${hash}-${this.determinePlatform()}-${arch}-buildmanifest`);
130
130
  }
131
131
  s3VersionIndexKey() {
132
- const { bin, platform, arch } = this.config;
132
+ const { bin, arch } = this.config;
133
133
  const s3SubDir = this.composeS3SubDir();
134
- return path.join(s3SubDir, 'versions', `${bin}-${platform}-${arch}-tar-gz.json`);
134
+ return path.join(s3SubDir, 'versions', `${bin}-${this.determinePlatform()}-${arch}-tar-gz.json`);
135
135
  }
136
136
  async fetchChannelManifest(channel) {
137
137
  const s3Key = this.s3ChannelManifestKey(channel);
@@ -166,7 +166,7 @@ class Updater {
166
166
  version,
167
167
  channel,
168
168
  bin: this.config.bin,
169
- platform: this.config.platform,
169
+ platform: this.determinePlatform(),
170
170
  arch: this.config.arch,
171
171
  ext: 'gz',
172
172
  }));
@@ -176,7 +176,7 @@ class Updater {
176
176
  version,
177
177
  channel,
178
178
  bin: this.config.bin,
179
- platform: this.config.platform,
179
+ platform: this.determinePlatform(),
180
180
  arch: this.config.arch,
181
181
  });
182
182
  const extraction = (0, tar_1.extract)(stream, baseDir, output, sha256gz);
@@ -231,6 +231,9 @@ class Updater {
231
231
  }
232
232
  return this.config.channel || 'stable';
233
233
  }
234
+ determinePlatform() {
235
+ return this.config.platform === 'wsl' ? 'linux' : this.config.platform;
236
+ }
234
237
  async determineCurrentVersion() {
235
238
  try {
236
239
  const currentVersion = await fs.readFile(this.clientBin, 'utf8');
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.1.9",
2
+ "version": "3.1.11",
3
3
  "commands": {
4
4
  "update": {
5
5
  "id": "update",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oclif/plugin-update",
3
- "version": "3.1.9",
3
+ "version": "3.1.11",
4
4
  "author": "Salesforce",
5
5
  "bugs": "https://github.com/oclif/plugin-update/issues",
6
6
  "dependencies": {
@@ -14,12 +14,12 @@
14
14
  "inquirer": "^8.2.5",
15
15
  "lodash.throttle": "^4.1.1",
16
16
  "log-chopper": "^1.0.2",
17
- "semver": "^7.3.8",
17
+ "semver": "^7.4.0",
18
18
  "tar-fs": "^2.1.1"
19
19
  },
20
20
  "devDependencies": {
21
- "@oclif/plugin-help": "^5.2.8",
22
- "@oclif/test": "^2.3.10",
21
+ "@oclif/plugin-help": "^5.2.9",
22
+ "@oclif/test": "^2.3.14",
23
23
  "@types/chai": "^4.3.4",
24
24
  "@types/cross-spawn": "^6.0.2",
25
25
  "@types/execa": "^0.9.0",
@@ -28,7 +28,7 @@
28
28
  "@types/inquirer": "^8.2.0",
29
29
  "@types/lodash.throttle": "^4.1.6",
30
30
  "@types/mocha": "^9",
31
- "@types/node": "^14.18.38",
31
+ "@types/node": "^14.18.42",
32
32
  "@types/semver": "^7.3.13",
33
33
  "@types/supports-color": "^7.2.0",
34
34
  "@types/write-json-file": "^3.2.1",
@@ -39,7 +39,7 @@
39
39
  "globby": "^11.0.2",
40
40
  "mocha": "^9",
41
41
  "nock": "^13.3.0",
42
- "oclif": "^3.7.0",
42
+ "oclif": "^3.7.3",
43
43
  "qqjs": "^0.3.11",
44
44
  "sinon": "^12.0.1",
45
45
  "ts-node": "^9.1.1",