@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 +1 -0
 - package/lib/update.js +11 -8
 - package/oclif.manifest.json +1 -1
 - package/package.json +6 -6
 
    
        package/lib/update.d.ts
    CHANGED
    
    
    
        package/lib/update.js
    CHANGED
    
    | 
         @@ -119,19 +119,19 @@ class Updater { 
     | 
|
| 
       119 
119 
     | 
    
         
             
                    return s3SubDir;
         
     | 
| 
       120 
120 
     | 
    
         
             
                }
         
     | 
| 
       121 
121 
     | 
    
         
             
                s3ChannelManifestKey(channel) {
         
     | 
| 
       122 
     | 
    
         
            -
                    const { bin,  
     | 
| 
      
 122 
     | 
    
         
            +
                    const { bin, arch } = this.config;
         
     | 
| 
       123 
123 
     | 
    
         
             
                    const s3SubDir = this.composeS3SubDir();
         
     | 
| 
       124 
     | 
    
         
            -
                    return path.join(s3SubDir, 'channels', channel, `${bin}-${ 
     | 
| 
      
 124 
     | 
    
         
            +
                    return path.join(s3SubDir, 'channels', channel, `${bin}-${this.determinePlatform()}-${arch}-buildmanifest`);
         
     | 
| 
       125 
125 
     | 
    
         
             
                }
         
     | 
| 
       126 
126 
     | 
    
         
             
                s3VersionManifestKey(version, hash) {
         
     | 
| 
       127 
     | 
    
         
            -
                    const { bin,  
     | 
| 
      
 127 
     | 
    
         
            +
                    const { bin, arch } = this.config;
         
     | 
| 
       128 
128 
     | 
    
         
             
                    const s3SubDir = this.composeS3SubDir();
         
     | 
| 
       129 
     | 
    
         
            -
                    return path.join(s3SubDir, 'versions', version, hash, `${bin}-v${version}-${hash}-${ 
     | 
| 
      
 129 
     | 
    
         
            +
                    return path.join(s3SubDir, 'versions', version, hash, `${bin}-v${version}-${hash}-${this.determinePlatform()}-${arch}-buildmanifest`);
         
     | 
| 
       130 
130 
     | 
    
         
             
                }
         
     | 
| 
       131 
131 
     | 
    
         
             
                s3VersionIndexKey() {
         
     | 
| 
       132 
     | 
    
         
            -
                    const { bin,  
     | 
| 
      
 132 
     | 
    
         
            +
                    const { bin, arch } = this.config;
         
     | 
| 
       133 
133 
     | 
    
         
             
                    const s3SubDir = this.composeS3SubDir();
         
     | 
| 
       134 
     | 
    
         
            -
                    return path.join(s3SubDir, 'versions', `${bin}-${ 
     | 
| 
      
 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. 
     | 
| 
      
 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. 
     | 
| 
      
 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');
         
     | 
    
        package/oclif.manifest.json
    CHANGED
    
    
    
        package/package.json
    CHANGED
    
    | 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            {
         
     | 
| 
       2 
2 
     | 
    
         
             
              "name": "@oclif/plugin-update",
         
     | 
| 
       3 
     | 
    
         
            -
              "version": "3.1. 
     | 
| 
      
 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. 
     | 
| 
      
 17 
     | 
    
         
            +
                "semver": "^7.4.0",
         
     | 
| 
       18 
18 
     | 
    
         
             
                "tar-fs": "^2.1.1"
         
     | 
| 
       19 
19 
     | 
    
         
             
              },
         
     | 
| 
       20 
20 
     | 
    
         
             
              "devDependencies": {
         
     | 
| 
       21 
     | 
    
         
            -
                "@oclif/plugin-help": "^5.2. 
     | 
| 
       22 
     | 
    
         
            -
                "@oclif/test": "^2.3. 
     | 
| 
      
 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. 
     | 
| 
      
 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. 
     | 
| 
      
 42 
     | 
    
         
            +
                "oclif": "^3.7.3",
         
     | 
| 
       43 
43 
     | 
    
         
             
                "qqjs": "^0.3.11",
         
     | 
| 
       44 
44 
     | 
    
         
             
                "sinon": "^12.0.1",
         
     | 
| 
       45 
45 
     | 
    
         
             
                "ts-node": "^9.1.1",
         
     |