@oclif/plugin-update 4.4.0 → 4.4.2

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/README.md CHANGED
@@ -55,7 +55,7 @@ EXAMPLES
55
55
  $ oclif-example update --available
56
56
  ```
57
57
 
58
- _See code: [src/commands/update.ts](https://github.com/oclif/plugin-update/blob/v4.4.0/src/commands/update.ts)_
58
+ _See code: [src/commands/update.ts](https://github.com/oclif/plugin-update/blob/v4.4.2/src/commands/update.ts)_
59
59
  <!-- commandsstop -->
60
60
 
61
61
  # Contributing
@@ -47,7 +47,7 @@ export default class UpdateCommand extends Command {
47
47
  version: Flags.string({
48
48
  char: 'v',
49
49
  description: 'Install a specific version.',
50
- exclusive: ['interactive', 'force'],
50
+ exclusive: ['interactive'],
51
51
  }),
52
52
  };
53
53
  async run() {
package/dist/tar.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import makeDebug from 'debug';
2
+ import crypto from 'node:crypto';
2
3
  import { existsSync } from 'node:fs';
3
4
  import { rename, rm } from 'node:fs/promises';
4
5
  import { join } from 'node:path';
5
- import { touch } from './util.js';
6
- const debug = makeDebug('oclif-update');
7
- import crypto from 'node:crypto';
8
6
  import zlib from 'node:zlib';
9
7
  import { extract as tarExtract } from 'tar-fs';
8
+ import { touch } from './util.js';
9
+ const debug = makeDebug('oclif-update');
10
10
  const ignore = (_name, header) => {
11
11
  switch (header?.type) {
12
12
  case 'directory':
package/dist/update.js CHANGED
@@ -292,8 +292,8 @@ const fetchChannelManifest = async (channel, config) => {
292
292
  return await fetchManifest(s3Key, config);
293
293
  }
294
294
  catch (error) {
295
- const { statusCode } = error;
296
- if (statusCode === 403)
295
+ const { code, statusCode } = error;
296
+ if (statusCode === 403 || code === 'ERR_NON_2XX_3XX_RESPONSE')
297
297
  throw new Error(`HTTP 403: Invalid channel ${channel}`);
298
298
  throw error;
299
299
  }
@@ -324,7 +324,7 @@ const downloadAndExtract = async (output, manifest, channel, config) => {
324
324
  stream.on('downloadProgress', (progress) => {
325
325
  ux.action.status =
326
326
  progress.percent === 1
327
- ? `${filesize(progress.transferred)}/${filesize(progress.total)} - Extracting`
327
+ ? `${filesize(progress.transferred)}/${filesize(progress.total)} - Finishing up...`
328
328
  : `${filesize(progress.transferred)}/${filesize(progress.total)}`;
329
329
  });
330
330
  }
@@ -332,6 +332,7 @@ const downloadAndExtract = async (output, manifest, channel, config) => {
332
332
  await extraction;
333
333
  };
334
334
  const determineChannel = async ({ config, version }) => {
335
+ ux.action.status = `Determining channel for ${version}`;
335
336
  const channelPath = join(config.dataDir, 'channel');
336
337
  const channel = existsSync(channelPath) ? (await readFile(channelPath, 'utf8')).trim() : 'stable';
337
338
  if (config.pjson.oclif.update?.disableNpmLookup ?? false) {
@@ -68,8 +68,7 @@
68
68
  "char": "v",
69
69
  "description": "Install a specific version.",
70
70
  "exclusive": [
71
- "interactive",
72
- "force"
71
+ "interactive"
73
72
  ],
74
73
  "name": "version",
75
74
  "hasDynamicHelp": false,
@@ -97,5 +96,5 @@
97
96
  ]
98
97
  }
99
98
  },
100
- "version": "4.4.0"
99
+ "version": "4.4.2"
101
100
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oclif/plugin-update",
3
- "version": "4.4.0",
3
+ "version": "4.4.2",
4
4
  "author": "Salesforce",
5
5
  "bugs": "https://github.com/oclif/plugin-update/issues",
6
6
  "dependencies": {
@@ -37,7 +37,7 @@
37
37
  "mocha": "^10.4.0",
38
38
  "nock": "^13.5.4",
39
39
  "oclif": "^4",
40
- "prettier": "^3.3.1",
40
+ "prettier": "^3.3.2",
41
41
  "shx": "^0.3.4",
42
42
  "sinon": "^18.0.0",
43
43
  "strip-ansi": "^7.1.0",