@oclif/plugin-update 2.2.0 → 3.0.1
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 +23 -3
- package/lib/commands/update.d.ts +9 -4
- package/lib/commands/update.js +70 -12
- package/lib/hooks/init.js +5 -4
- package/lib/tar.js +3 -2
- package/lib/update.d.ts +25 -18
- package/lib/update.js +191 -151
- package/lib/util.d.ts +3 -2
- package/lib/util.js +12 -3
- package/oclif.manifest.json +1 -1
- package/package.json +10 -8
- package/CHANGELOG.md +0 -470
package/README.md
CHANGED
@@ -24,14 +24,34 @@ update the oclif-example CLI
|
|
24
24
|
|
25
25
|
```
|
26
26
|
USAGE
|
27
|
-
$ oclif-example update [CHANNEL] [
|
27
|
+
$ oclif-example update [CHANNEL] [-a] [-v <value> | -i] [--force]
|
28
28
|
|
29
29
|
FLAGS
|
30
|
-
|
30
|
+
-a, --available Install a specific version.
|
31
|
+
-i, --interactive Interactively select version to install. This is ignored if a channel is provided.
|
32
|
+
-v, --version=<value> Install a specific version.
|
33
|
+
--force Force a re-download of the requested version.
|
31
34
|
|
32
35
|
DESCRIPTION
|
33
36
|
update the oclif-example CLI
|
37
|
+
|
38
|
+
EXAMPLES
|
39
|
+
Update to the stable channel:
|
40
|
+
|
41
|
+
$ oclif-example update stable
|
42
|
+
|
43
|
+
Update to a specific version:
|
44
|
+
|
45
|
+
$ oclif-example update --version 1.0.0
|
46
|
+
|
47
|
+
Interactively select version:
|
48
|
+
|
49
|
+
$ oclif-example update --interactive
|
50
|
+
|
51
|
+
See available versions:
|
52
|
+
|
53
|
+
$ oclif-example update --available
|
34
54
|
```
|
35
55
|
|
36
|
-
_See code: [src/commands/update.ts](https://github.com/oclif/plugin-update/blob/
|
56
|
+
_See code: [src/commands/update.ts](https://github.com/oclif/plugin-update/blob/v3.0.0/src/commands/update.ts)_
|
37
57
|
<!-- commandsstop -->
|
package/lib/commands/update.d.ts
CHANGED
@@ -5,12 +5,17 @@ export default class UpdateCommand extends Command {
|
|
5
5
|
name: string;
|
6
6
|
optional: boolean;
|
7
7
|
}[];
|
8
|
+
static examples: {
|
9
|
+
description: string;
|
10
|
+
command: string;
|
11
|
+
}[];
|
8
12
|
static flags: {
|
9
13
|
autoupdate: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
10
|
-
|
14
|
+
available: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
15
|
+
version: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
16
|
+
interactive: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
17
|
+
force: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
11
18
|
};
|
12
|
-
private channel;
|
13
|
-
private readonly clientRoot;
|
14
|
-
private readonly clientBin;
|
15
19
|
run(): Promise<void>;
|
20
|
+
private promptForVersion;
|
16
21
|
}
|
package/lib/commands/update.js
CHANGED
@@ -1,27 +1,85 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const tslib_1 = require("tslib");
|
3
4
|
const core_1 = require("@oclif/core");
|
4
|
-
const
|
5
|
+
const inquirer_1 = require("inquirer");
|
6
|
+
const path = (0, tslib_1.__importStar)(require("path"));
|
7
|
+
const semver_1 = require("semver");
|
5
8
|
const update_1 = require("../update");
|
6
|
-
async function getPinToVersion() {
|
7
|
-
return core_1.CliUx.ux.prompt('Enter a version to update to');
|
8
|
-
}
|
9
9
|
class UpdateCommand extends core_1.Command {
|
10
|
-
constructor() {
|
11
|
-
super(...arguments);
|
12
|
-
this.clientRoot = this.config.scopedEnvVar('OCLIF_CLIENT_HOME') || path.join(this.config.dataDir, 'client');
|
13
|
-
this.clientBin = path.join(this.clientRoot, 'bin', this.config.windows ? `${this.config.bin}.cmd` : this.config.bin);
|
14
|
-
}
|
15
10
|
async run() {
|
16
11
|
const { args, flags } = await this.parse(UpdateCommand);
|
17
|
-
const
|
18
|
-
|
12
|
+
const updater = new update_1.Updater(this.config);
|
13
|
+
if (flags.available) {
|
14
|
+
const index = await updater.fetchVersionIndex();
|
15
|
+
const allVersions = (0, semver_1.sort)(Object.keys(index)).reverse();
|
16
|
+
const localVersions = await updater.findLocalVersions();
|
17
|
+
const table = allVersions.map(version => {
|
18
|
+
const location = localVersions.find(l => path.basename(l).startsWith(version)) || index[version];
|
19
|
+
return { version, location };
|
20
|
+
});
|
21
|
+
core_1.CliUx.ux.table(table, { version: {}, location: {} });
|
22
|
+
return;
|
23
|
+
}
|
24
|
+
if (args.channel && flags.version) {
|
25
|
+
this.error('You cannot specifiy both a version and a channel.');
|
26
|
+
}
|
27
|
+
return updater.runUpdate({
|
28
|
+
channel: args.channel,
|
29
|
+
autoUpdate: flags.autoupdate,
|
30
|
+
force: flags.force,
|
31
|
+
version: flags.interactive ? await this.promptForVersion(updater) : flags.version,
|
32
|
+
});
|
33
|
+
}
|
34
|
+
async promptForVersion(updater) {
|
35
|
+
const choices = (0, semver_1.sort)(Object.keys(await updater.fetchVersionIndex())).reverse();
|
36
|
+
const { version } = await (0, inquirer_1.prompt)({
|
37
|
+
name: 'version',
|
38
|
+
message: 'Select a version to update to',
|
39
|
+
type: 'list',
|
40
|
+
choices: [...choices, new inquirer_1.Separator()],
|
41
|
+
});
|
42
|
+
return version;
|
19
43
|
}
|
20
44
|
}
|
21
45
|
exports.default = UpdateCommand;
|
22
46
|
UpdateCommand.description = 'update the <%= config.bin %> CLI';
|
23
47
|
UpdateCommand.args = [{ name: 'channel', optional: true }];
|
48
|
+
UpdateCommand.examples = [
|
49
|
+
{
|
50
|
+
description: 'Update to the stable channel:',
|
51
|
+
command: '<%= config.bin %> <%= command.id %> stable',
|
52
|
+
},
|
53
|
+
{
|
54
|
+
description: 'Update to a specific version:',
|
55
|
+
command: '<%= config.bin %> <%= command.id %> --version 1.0.0',
|
56
|
+
},
|
57
|
+
{
|
58
|
+
description: 'Interactively select version:',
|
59
|
+
command: '<%= config.bin %> <%= command.id %> --interactive',
|
60
|
+
},
|
61
|
+
{
|
62
|
+
description: 'See available versions:',
|
63
|
+
command: '<%= config.bin %> <%= command.id %> --available',
|
64
|
+
},
|
65
|
+
];
|
24
66
|
UpdateCommand.flags = {
|
25
67
|
autoupdate: core_1.Flags.boolean({ hidden: true }),
|
26
|
-
|
68
|
+
available: core_1.Flags.boolean({
|
69
|
+
char: 'a',
|
70
|
+
description: 'Install a specific version.',
|
71
|
+
}),
|
72
|
+
version: core_1.Flags.string({
|
73
|
+
char: 'v',
|
74
|
+
description: 'Install a specific version.',
|
75
|
+
exclusive: ['interactive'],
|
76
|
+
}),
|
77
|
+
interactive: core_1.Flags.boolean({
|
78
|
+
char: 'i',
|
79
|
+
description: 'Interactively select version to install. This is ignored if a channel is provided.',
|
80
|
+
exclusive: ['version'],
|
81
|
+
}),
|
82
|
+
force: core_1.Flags.boolean({
|
83
|
+
description: 'Force a re-download of the requested version.',
|
84
|
+
}),
|
27
85
|
};
|
package/lib/hooks/init.js
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.init = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
4
5
|
const core_1 = require("@oclif/core");
|
5
|
-
const
|
6
|
-
const fs = require("fs-extra");
|
7
|
-
const path = require("path");
|
6
|
+
const cross_spawn_1 = (0, tslib_1.__importDefault)(require("cross-spawn"));
|
7
|
+
const fs = (0, tslib_1.__importStar)(require("fs-extra"));
|
8
|
+
const path = (0, tslib_1.__importStar)(require("path"));
|
8
9
|
const util_1 = require("../util");
|
9
10
|
// eslint-disable-next-line unicorn/prefer-module
|
10
11
|
const debug = require('debug')('cli:updater');
|
@@ -55,7 +56,7 @@ const init = async function (opts) {
|
|
55
56
|
debug(`spawning autoupdate on ${binPath}`);
|
56
57
|
const fd = await fs.open(autoupdatelogfile, 'a');
|
57
58
|
fs.write(fd, timestamp(`starting \`${binPath} update --autoupdate\` from ${process.argv.slice(1, 3).join(' ')}\n`));
|
58
|
-
|
59
|
+
(0, cross_spawn_1.default)(binPath, ['update', '--autoupdate'], {
|
59
60
|
detached: !this.config.windows,
|
60
61
|
stdio: ['ignore', fd, fd],
|
61
62
|
env: autoupdateEnv,
|
package/lib/tar.js
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.extract = void 0;
|
4
|
-
const
|
5
|
-
const
|
4
|
+
const tslib_1 = require("tslib");
|
5
|
+
const fs = (0, tslib_1.__importStar)(require("fs-extra"));
|
6
|
+
const path = (0, tslib_1.__importStar)(require("path"));
|
6
7
|
const util_1 = require("./util");
|
7
8
|
const debug = require('debug')('oclif-update');
|
8
9
|
const ignore = (_, header) => {
|
package/lib/update.d.ts
CHANGED
@@ -1,36 +1,43 @@
|
|
1
1
|
import { Config } from '@oclif/core';
|
2
|
-
export
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
2
|
+
export declare namespace Updater {
|
3
|
+
type Options = {
|
4
|
+
autoUpdate: boolean;
|
5
|
+
channel?: string | undefined;
|
6
|
+
version?: string | undefined;
|
7
|
+
force?: boolean;
|
8
|
+
};
|
9
|
+
type VersionIndex = Record<string, string>;
|
9
10
|
}
|
10
|
-
export
|
11
|
-
private
|
12
|
-
private channel;
|
13
|
-
private currentVersion?;
|
14
|
-
private updatedVersion;
|
11
|
+
export declare class Updater {
|
12
|
+
private config;
|
15
13
|
private readonly clientRoot;
|
16
14
|
private readonly clientBin;
|
17
|
-
constructor(
|
18
|
-
runUpdate(): Promise<void>;
|
15
|
+
constructor(config: Config);
|
16
|
+
runUpdate(options: Updater.Options): Promise<void>;
|
17
|
+
findLocalVersions(): Promise<string[]>;
|
18
|
+
fetchVersionIndex(): Promise<Updater.VersionIndex>;
|
19
|
+
private ensureClientDir;
|
20
|
+
private composeS3SubDir;
|
21
|
+
private s3ChannelManifestKey;
|
22
|
+
private s3VersionManifestKey;
|
23
|
+
private s3VersionIndexKey;
|
24
|
+
private fetchChannelManifest;
|
25
|
+
private fetchVersionManifest;
|
19
26
|
private fetchManifest;
|
20
27
|
private downloadAndExtract;
|
21
28
|
private update;
|
22
29
|
private updateToExistingVersion;
|
23
|
-
private
|
30
|
+
private notUpdatable;
|
31
|
+
private alreadyOnVersion;
|
24
32
|
private determineChannel;
|
25
33
|
private determineCurrentVersion;
|
26
|
-
private
|
34
|
+
private findLocalVersion;
|
27
35
|
private setChannel;
|
28
36
|
private logChop;
|
29
37
|
private mtime;
|
30
38
|
private debounce;
|
31
39
|
private tidy;
|
32
40
|
private touch;
|
33
|
-
private
|
41
|
+
private refreshConfig;
|
34
42
|
private createBin;
|
35
|
-
private ensureClientDir;
|
36
43
|
}
|
package/lib/update.js
CHANGED
@@ -1,116 +1,189 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Updater = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
3
5
|
/* eslint-disable unicorn/prefer-module */
|
4
|
-
const color_1 = require("@oclif/color");
|
6
|
+
const color_1 = (0, tslib_1.__importDefault)(require("@oclif/color"));
|
5
7
|
const core_1 = require("@oclif/core");
|
6
|
-
const
|
7
|
-
const
|
8
|
-
const
|
9
|
-
const
|
8
|
+
const fs = (0, tslib_1.__importStar)(require("fs-extra"));
|
9
|
+
const http_call_1 = (0, tslib_1.__importDefault)(require("http-call"));
|
10
|
+
const path = (0, tslib_1.__importStar)(require("path"));
|
11
|
+
const lodash_throttle_1 = (0, tslib_1.__importDefault)(require("lodash.throttle"));
|
12
|
+
const filesize_1 = (0, tslib_1.__importDefault)(require("filesize"));
|
10
13
|
const tar_1 = require("./tar");
|
11
14
|
const util_1 = require("./util");
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
15
|
+
const filesize = (n) => {
|
16
|
+
const [num, suffix] = (0, filesize_1.default)(n, { output: 'array' });
|
17
|
+
return Number.parseFloat(num).toFixed(1) + ` ${suffix}`;
|
18
|
+
};
|
19
|
+
class Updater {
|
20
|
+
constructor(config) {
|
21
|
+
this.config = config;
|
22
|
+
this.clientRoot = config.scopedEnvVar('OCLIF_CLIENT_HOME') || path.join(config.dataDir, 'client');
|
23
|
+
this.clientBin = path.join(this.clientRoot, 'bin', config.windows ? `${config.bin}.cmd` : config.bin);
|
17
24
|
}
|
18
|
-
async runUpdate() {
|
19
|
-
|
25
|
+
async runUpdate(options) {
|
26
|
+
const { autoUpdate, version, force = false } = options;
|
27
|
+
if (autoUpdate)
|
20
28
|
await this.debounce();
|
21
|
-
|
22
|
-
if (this.
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
29
|
+
core_1.CliUx.ux.action.start(`${this.config.name}: Updating CLI`);
|
30
|
+
if (this.notUpdatable()) {
|
31
|
+
core_1.CliUx.ux.action.stop('not updatable');
|
32
|
+
return;
|
33
|
+
}
|
34
|
+
const channel = options.channel || await this.determineChannel();
|
35
|
+
const current = await this.determineCurrentVersion();
|
36
|
+
if (version) {
|
37
|
+
const localVersion = force ? null : await this.findLocalVersion(version);
|
38
|
+
if (this.alreadyOnVersion(current, localVersion || null)) {
|
39
|
+
core_1.CliUx.ux.action.stop(this.config.scopedEnvVar('HIDE_UPDATED_MESSAGE') ? 'done' : `already on version ${current}`);
|
40
|
+
return;
|
41
|
+
}
|
42
|
+
await this.config.runHook('preupdate', { channel, version });
|
43
|
+
if (localVersion) {
|
44
|
+
await this.updateToExistingVersion(current, localVersion);
|
35
45
|
}
|
36
|
-
|
37
|
-
|
38
|
-
|
46
|
+
else {
|
47
|
+
const index = await this.fetchVersionIndex();
|
48
|
+
const url = index[version];
|
49
|
+
if (!url) {
|
50
|
+
throw new Error(`${version} not found in index:\n${Object.keys(index).join(', ')}`);
|
51
|
+
}
|
52
|
+
const manifest = await this.fetchVersionManifest(version, url);
|
53
|
+
const updated = manifest.sha ? `${manifest.version}-${manifest.sha}` : manifest.version;
|
54
|
+
await this.update(manifest, current, updated, force, channel);
|
55
|
+
}
|
56
|
+
await this.config.runHook('update', { channel, version });
|
57
|
+
core_1.CliUx.ux.action.stop();
|
39
58
|
core_1.CliUx.ux.log();
|
40
|
-
core_1.CliUx.ux.log(`Updating to
|
59
|
+
core_1.CliUx.ux.log(`Updating to a specific version will not update the channel. If autoupdate is enabled, the CLI will eventually be updated back to ${channel}.`);
|
41
60
|
}
|
42
61
|
else {
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
core_1.CliUx.ux.
|
54
|
-
await this.tidy();
|
55
|
-
await this.options.config.runHook('update', { channel: this.channel });
|
62
|
+
const manifest = await this.fetchChannelManifest(channel);
|
63
|
+
const updated = manifest.sha ? `${manifest.version}-${manifest.sha}` : manifest.version;
|
64
|
+
if (!force && this.alreadyOnVersion(current, updated)) {
|
65
|
+
core_1.CliUx.ux.action.stop(this.config.scopedEnvVar('HIDE_UPDATED_MESSAGE') ? 'done' : `already on version ${current}`);
|
66
|
+
}
|
67
|
+
else {
|
68
|
+
await this.config.runHook('preupdate', { channel, version: updated });
|
69
|
+
await this.update(manifest, current, updated, force, channel);
|
70
|
+
}
|
71
|
+
await this.config.runHook('update', { channel, version: updated });
|
72
|
+
core_1.CliUx.ux.action.stop();
|
56
73
|
}
|
74
|
+
await this.touch();
|
75
|
+
await this.tidy();
|
57
76
|
core_1.CliUx.ux.debug('done');
|
58
|
-
core_1.CliUx.ux.action.stop();
|
59
77
|
}
|
60
|
-
async
|
61
|
-
|
62
|
-
|
78
|
+
async findLocalVersions() {
|
79
|
+
await this.ensureClientDir();
|
80
|
+
return fs
|
81
|
+
.readdirSync(this.clientRoot)
|
82
|
+
.filter(dirOrFile => dirOrFile !== 'bin' && dirOrFile !== 'current')
|
83
|
+
.map(f => path.join(this.clientRoot, f));
|
84
|
+
}
|
85
|
+
async fetchVersionIndex() {
|
86
|
+
core_1.CliUx.ux.action.status = 'fetching version index';
|
87
|
+
const newIndexUrl = this.config.s3Url(this.s3VersionIndexKey());
|
63
88
|
try {
|
64
|
-
const
|
65
|
-
channel: this.channel,
|
66
|
-
platform: this.options.config.platform,
|
67
|
-
arch: this.options.config.arch,
|
68
|
-
}));
|
69
|
-
const { body } = await http.get(url);
|
70
|
-
// in case the content-type is not set, parse as a string
|
71
|
-
// this will happen if uploading without `oclif-dev publish`
|
89
|
+
const { body } = await http_call_1.default.get(newIndexUrl);
|
72
90
|
if (typeof body === 'string') {
|
73
91
|
return JSON.parse(body);
|
74
92
|
}
|
75
93
|
return body;
|
76
94
|
}
|
95
|
+
catch (_a) {
|
96
|
+
throw new Error(`No version indices exist for ${this.config.name}.`);
|
97
|
+
}
|
98
|
+
}
|
99
|
+
async ensureClientDir() {
|
100
|
+
try {
|
101
|
+
await fs.mkdirp(this.clientRoot);
|
102
|
+
}
|
103
|
+
catch (error) {
|
104
|
+
if (error.code === 'EEXIST') {
|
105
|
+
// for some reason the client directory is sometimes a file
|
106
|
+
// if so, this happens. Delete it and recreate
|
107
|
+
await fs.remove(this.clientRoot);
|
108
|
+
await fs.mkdirp(this.clientRoot);
|
109
|
+
}
|
110
|
+
else {
|
111
|
+
throw error;
|
112
|
+
}
|
113
|
+
}
|
114
|
+
}
|
115
|
+
composeS3SubDir() {
|
116
|
+
let s3SubDir = this.config.pjson.oclif.update.s3.folder || '';
|
117
|
+
if (s3SubDir !== '' && s3SubDir.slice(-1) !== '/')
|
118
|
+
s3SubDir = `${s3SubDir}/`;
|
119
|
+
return s3SubDir;
|
120
|
+
}
|
121
|
+
s3ChannelManifestKey(channel) {
|
122
|
+
const { bin, platform, arch } = this.config;
|
123
|
+
const s3SubDir = this.composeS3SubDir();
|
124
|
+
return path.join(s3SubDir, 'channels', channel, `${bin}-${platform}-${arch}-buildmanifest`);
|
125
|
+
}
|
126
|
+
s3VersionManifestKey(version, hash) {
|
127
|
+
const { bin, platform, arch } = this.config;
|
128
|
+
const s3SubDir = this.composeS3SubDir();
|
129
|
+
return path.join(s3SubDir, 'versions', version, hash, `${bin}-v${version}-${hash}-${platform}-${arch}-buildmanifest`);
|
130
|
+
}
|
131
|
+
s3VersionIndexKey() {
|
132
|
+
const { bin, platform, arch } = this.config;
|
133
|
+
const s3SubDir = this.composeS3SubDir();
|
134
|
+
return path.join(s3SubDir, 'versions', `${bin}-${platform}-${arch}-tar-gz.json`);
|
135
|
+
}
|
136
|
+
async fetchChannelManifest(channel) {
|
137
|
+
const s3Key = this.s3ChannelManifestKey(channel);
|
138
|
+
try {
|
139
|
+
return await this.fetchManifest(s3Key);
|
140
|
+
}
|
77
141
|
catch (error) {
|
78
142
|
if (error.statusCode === 403)
|
79
|
-
throw new Error(`HTTP 403: Invalid channel ${
|
143
|
+
throw new Error(`HTTP 403: Invalid channel ${channel}`);
|
80
144
|
throw error;
|
81
145
|
}
|
82
146
|
}
|
147
|
+
async fetchVersionManifest(version, url) {
|
148
|
+
const parts = url.split('/');
|
149
|
+
const hashIndex = parts.indexOf(version) + 1;
|
150
|
+
const hash = parts[hashIndex];
|
151
|
+
const s3Key = this.s3VersionManifestKey(version, hash);
|
152
|
+
return this.fetchManifest(s3Key);
|
153
|
+
}
|
154
|
+
async fetchManifest(s3Key) {
|
155
|
+
core_1.CliUx.ux.action.status = 'fetching manifest';
|
156
|
+
const url = this.config.s3Url(s3Key);
|
157
|
+
const { body } = await http_call_1.default.get(url);
|
158
|
+
if (typeof body === 'string') {
|
159
|
+
return JSON.parse(body);
|
160
|
+
}
|
161
|
+
return body;
|
162
|
+
}
|
83
163
|
async downloadAndExtract(output, manifest, channel) {
|
84
164
|
const { version, gz, sha256gz } = manifest;
|
85
|
-
const
|
86
|
-
const [num, suffix] = require('filesize')(n, { output: 'array' });
|
87
|
-
return num.toFixed(1) + ` ${suffix}`;
|
88
|
-
};
|
89
|
-
const http = require('http-call').HTTP;
|
90
|
-
const gzUrl = gz || this.options.config.s3Url(this.options.config.s3Key('versioned', {
|
165
|
+
const gzUrl = gz || this.config.s3Url(this.config.s3Key('versioned', {
|
91
166
|
version,
|
92
167
|
channel,
|
93
|
-
bin: this.
|
94
|
-
platform: this.
|
95
|
-
arch: this.
|
168
|
+
bin: this.config.bin,
|
169
|
+
platform: this.config.platform,
|
170
|
+
arch: this.config.arch,
|
96
171
|
ext: 'gz',
|
97
172
|
}));
|
98
|
-
const { response: stream } = await
|
173
|
+
const { response: stream } = await http_call_1.default.stream(gzUrl);
|
99
174
|
stream.pause();
|
100
|
-
const baseDir = manifest.baseDir || this.
|
175
|
+
const baseDir = manifest.baseDir || this.config.s3Key('baseDir', {
|
101
176
|
version,
|
102
177
|
channel,
|
103
|
-
bin: this.
|
104
|
-
platform: this.
|
105
|
-
arch: this.
|
178
|
+
bin: this.config.bin,
|
179
|
+
platform: this.config.platform,
|
180
|
+
arch: this.config.arch,
|
106
181
|
});
|
107
182
|
const extraction = (0, tar_1.extract)(stream, baseDir, output, sha256gz);
|
108
|
-
|
109
|
-
if (core_1.CliUx.ux.action.frames) {
|
110
|
-
// if spinner action
|
183
|
+
if (core_1.CliUx.ux.action.type === 'spinner') {
|
111
184
|
const total = Number.parseInt(stream.headers['content-length'], 10);
|
112
185
|
let current = 0;
|
113
|
-
const updateStatus =
|
186
|
+
const updateStatus = (0, lodash_throttle_1.default)((newStatus) => {
|
114
187
|
core_1.CliUx.ux.action.status = newStatus;
|
115
188
|
}, 250, { leading: true, trailing: false });
|
116
189
|
stream.on('data', data => {
|
@@ -121,70 +194,69 @@ class UpdateCli {
|
|
121
194
|
stream.resume();
|
122
195
|
await extraction;
|
123
196
|
}
|
124
|
-
|
125
|
-
|
197
|
+
// eslint-disable-next-line max-params
|
198
|
+
async update(manifest, current, updated, force, channel) {
|
199
|
+
core_1.CliUx.ux.action.start(`${this.config.name}: Updating CLI from ${color_1.default.green(current)} to ${color_1.default.green(updated)}${channel === 'stable' ? '' : ' (' + color_1.default.yellow(channel) + ')'}`);
|
126
200
|
await this.ensureClientDir();
|
127
|
-
const output = path.join(this.clientRoot,
|
128
|
-
if (!await fs.pathExists(output))
|
201
|
+
const output = path.join(this.clientRoot, updated);
|
202
|
+
if (force || !await fs.pathExists(output))
|
129
203
|
await this.downloadAndExtract(output, manifest, channel);
|
130
|
-
|
131
|
-
await this.setChannel();
|
132
|
-
await this.createBin(
|
133
|
-
await this.touch();
|
134
|
-
await this.reexec();
|
204
|
+
await this.refreshConfig(updated);
|
205
|
+
await this.setChannel(channel);
|
206
|
+
await this.createBin(updated);
|
135
207
|
}
|
136
|
-
async updateToExistingVersion(
|
137
|
-
|
138
|
-
await this.
|
208
|
+
async updateToExistingVersion(current, updated) {
|
209
|
+
core_1.CliUx.ux.action.start(`${this.config.name}: Updating CLI from ${color_1.default.green(current)} to ${color_1.default.green(updated)}`);
|
210
|
+
await this.ensureClientDir();
|
211
|
+
await this.refreshConfig(updated);
|
212
|
+
await this.createBin(updated);
|
139
213
|
}
|
140
|
-
|
141
|
-
if (!this.
|
142
|
-
const instructions = this.
|
214
|
+
notUpdatable() {
|
215
|
+
if (!this.config.binPath) {
|
216
|
+
const instructions = this.config.scopedEnvVar('UPDATE_INSTRUCTIONS');
|
143
217
|
if (instructions)
|
144
218
|
core_1.CliUx.ux.warn(instructions);
|
145
|
-
return
|
146
|
-
}
|
147
|
-
if (this.currentVersion === this.updatedVersion) {
|
148
|
-
if (this.options.config.scopedEnvVar('HIDE_UPDATED_MESSAGE'))
|
149
|
-
return 'done';
|
150
|
-
return `already on latest version: ${this.currentVersion}`;
|
219
|
+
return true;
|
151
220
|
}
|
152
221
|
return false;
|
153
222
|
}
|
223
|
+
alreadyOnVersion(current, updated) {
|
224
|
+
return current === updated;
|
225
|
+
}
|
154
226
|
async determineChannel() {
|
155
|
-
const channelPath = path.join(this.
|
227
|
+
const channelPath = path.join(this.config.dataDir, 'channel');
|
156
228
|
if (fs.existsSync(channelPath)) {
|
157
229
|
const channel = await fs.readFile(channelPath, 'utf8');
|
158
230
|
return String(channel).trim();
|
159
231
|
}
|
160
|
-
return this.
|
232
|
+
return this.config.channel || 'stable';
|
161
233
|
}
|
162
234
|
async determineCurrentVersion() {
|
163
235
|
try {
|
164
236
|
const currentVersion = await fs.readFile(this.clientBin, 'utf8');
|
165
237
|
const matches = currentVersion.match(/\.\.[/\\|](.+)[/\\|]bin/);
|
166
|
-
return matches ? matches[1] : this.
|
238
|
+
return matches ? matches[1] : this.config.version;
|
167
239
|
}
|
168
240
|
catch (error) {
|
169
241
|
core_1.CliUx.ux.debug(error);
|
170
242
|
}
|
171
|
-
return this.
|
243
|
+
return this.config.version;
|
172
244
|
}
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
245
|
+
async findLocalVersion(version) {
|
246
|
+
const versions = await this.findLocalVersions();
|
247
|
+
return versions
|
248
|
+
.map(file => path.basename(file))
|
249
|
+
.find(file => file.startsWith(version));
|
178
250
|
}
|
179
|
-
async setChannel() {
|
180
|
-
const channelPath = path.join(this.
|
181
|
-
fs.writeFile(channelPath,
|
251
|
+
async setChannel(channel) {
|
252
|
+
const channelPath = path.join(this.config.dataDir, 'channel');
|
253
|
+
fs.writeFile(channelPath, channel, 'utf8');
|
182
254
|
}
|
183
255
|
async logChop() {
|
184
256
|
try {
|
185
257
|
core_1.CliUx.ux.debug('log chop');
|
186
258
|
const logChopper = require('log-chopper').default;
|
187
|
-
await logChopper.chop(this.
|
259
|
+
await logChopper.chop(this.config.errlog);
|
188
260
|
}
|
189
261
|
catch (error) {
|
190
262
|
core_1.CliUx.ux.debug(error.message);
|
@@ -197,7 +269,7 @@ class UpdateCli {
|
|
197
269
|
// when autoupdating, wait until the CLI isn't active
|
198
270
|
async debounce() {
|
199
271
|
let output = false;
|
200
|
-
const lastrunfile = path.join(this.
|
272
|
+
const lastrunfile = path.join(this.config.cacheDir, 'lastrun');
|
201
273
|
const m = await this.mtime(lastrunfile);
|
202
274
|
m.setHours(m.getHours() + 1);
|
203
275
|
if (m > new Date()) {
|
@@ -206,7 +278,7 @@ class UpdateCli {
|
|
206
278
|
core_1.CliUx.ux.debug(msg);
|
207
279
|
}
|
208
280
|
else {
|
209
|
-
|
281
|
+
core_1.CliUx.ux.log(msg);
|
210
282
|
output = true;
|
211
283
|
}
|
212
284
|
await (0, util_1.wait)(60 * 1000); // wait 1 minute
|
@@ -216,13 +288,14 @@ class UpdateCli {
|
|
216
288
|
}
|
217
289
|
// removes any unused CLIs
|
218
290
|
async tidy() {
|
291
|
+
core_1.CliUx.ux.debug('tidy');
|
219
292
|
try {
|
220
293
|
const root = this.clientRoot;
|
221
294
|
if (!await fs.pathExists(root))
|
222
295
|
return;
|
223
296
|
const files = await (0, util_1.ls)(root);
|
224
297
|
const promises = files.map(async (f) => {
|
225
|
-
if (['bin', 'current', this.
|
298
|
+
if (['bin', 'current', this.config.version].includes(path.basename(f.path)))
|
226
299
|
return;
|
227
300
|
const mtime = f.stat.mtime;
|
228
301
|
mtime.setHours(mtime.getHours() + (42 * 24));
|
@@ -241,7 +314,7 @@ class UpdateCli {
|
|
241
314
|
async touch() {
|
242
315
|
// touch the client so it won't be tidied up right away
|
243
316
|
try {
|
244
|
-
const p = path.join(this.clientRoot, this.
|
317
|
+
const p = path.join(this.clientRoot, this.config.version);
|
245
318
|
core_1.CliUx.ux.debug('touching client at', p);
|
246
319
|
if (!await fs.pathExists(p))
|
247
320
|
return;
|
@@ -251,31 +324,14 @@ class UpdateCli {
|
|
251
324
|
core_1.CliUx.ux.warn(error);
|
252
325
|
}
|
253
326
|
}
|
254
|
-
async
|
255
|
-
core_1.
|
256
|
-
return new Promise((_, reject) => {
|
257
|
-
core_1.CliUx.ux.debug('restarting CLI after update', this.clientBin);
|
258
|
-
spawn(this.clientBin, ['update'], {
|
259
|
-
stdio: 'inherit',
|
260
|
-
env: Object.assign(Object.assign({}, process.env), { [this.options.config.scopedEnvVarKey('HIDE_UPDATED_MESSAGE')]: '1' }),
|
261
|
-
})
|
262
|
-
.on('error', reject)
|
263
|
-
.on('close', (status) => {
|
264
|
-
try {
|
265
|
-
if (status > 0)
|
266
|
-
this.options.exit(status);
|
267
|
-
}
|
268
|
-
catch (error) {
|
269
|
-
reject(error);
|
270
|
-
}
|
271
|
-
});
|
272
|
-
});
|
327
|
+
async refreshConfig(version) {
|
328
|
+
this.config = await core_1.Config.load({ root: path.join(this.clientRoot, version) });
|
273
329
|
}
|
274
330
|
async createBin(version) {
|
275
331
|
const dst = this.clientBin;
|
276
|
-
const { bin, windows } = this.
|
277
|
-
const binPathEnvVar = this.
|
278
|
-
const redirectedEnvVar = this.
|
332
|
+
const { bin, windows } = this.config;
|
333
|
+
const binPathEnvVar = this.config.scopedEnvVarKey('BINPATH');
|
334
|
+
const redirectedEnvVar = this.config.scopedEnvVarKey('REDIRECTED');
|
279
335
|
if (windows) {
|
280
336
|
const body = `@echo off
|
281
337
|
setlocal enableextensions
|
@@ -312,21 +368,5 @@ ${binPathEnvVar}="\$DIR/${bin}" ${redirectedEnvVar}=1 "$DIR/../${version}/bin/${
|
|
312
368
|
await fs.symlink(`./${version}`, path.join(this.clientRoot, 'current'));
|
313
369
|
}
|
314
370
|
}
|
315
|
-
async ensureClientDir() {
|
316
|
-
try {
|
317
|
-
await fs.mkdirp(this.clientRoot);
|
318
|
-
}
|
319
|
-
catch (error) {
|
320
|
-
if (error.code === 'EEXIST') {
|
321
|
-
// for some reason the client directory is sometimes a file
|
322
|
-
// if so, this happens. Delete it and recreate
|
323
|
-
await fs.remove(this.clientRoot);
|
324
|
-
await fs.mkdirp(this.clientRoot);
|
325
|
-
}
|
326
|
-
else {
|
327
|
-
throw error;
|
328
|
-
}
|
329
|
-
}
|
330
|
-
}
|
331
371
|
}
|
332
|
-
exports.
|
372
|
+
exports.Updater = Updater;
|
package/lib/util.d.ts
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
import * as fs from 'fs-extra';
|
3
3
|
export declare function touch(p: string): Promise<void>;
|
4
|
-
export declare function ls(dir: string): Promise<{
|
4
|
+
export declare function ls(dir: string): Promise<Array<{
|
5
5
|
path: string;
|
6
6
|
stat: fs.Stats;
|
7
|
-
}
|
7
|
+
}>>;
|
8
|
+
export declare function rm(dir: string): Promise<void>;
|
8
9
|
export declare function wait(ms: number, unref?: boolean): Promise<void>;
|
package/lib/util.js
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.wait = exports.ls = exports.touch = void 0;
|
4
|
-
const
|
5
|
-
const
|
3
|
+
exports.wait = exports.rm = exports.ls = exports.touch = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
5
|
+
const fs = (0, tslib_1.__importStar)(require("fs-extra"));
|
6
|
+
const path = (0, tslib_1.__importStar)(require("path"));
|
6
7
|
async function touch(p) {
|
7
8
|
try {
|
8
9
|
await fs.utimes(p, new Date(), new Date());
|
@@ -18,6 +19,14 @@ async function ls(dir) {
|
|
18
19
|
return Promise.all(paths.map(path => fs.stat(path).then(stat => ({ path, stat }))));
|
19
20
|
}
|
20
21
|
exports.ls = ls;
|
22
|
+
async function rm(dir) {
|
23
|
+
return new Promise(resolve => {
|
24
|
+
fs.rm(dir, { recursive: true, force: true }, () => {
|
25
|
+
resolve();
|
26
|
+
});
|
27
|
+
});
|
28
|
+
}
|
29
|
+
exports.rm = rm;
|
21
30
|
function wait(ms, unref = false) {
|
22
31
|
return new Promise(resolve => {
|
23
32
|
const t = setTimeout(() => resolve(), ms);
|
package/oclif.manifest.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":"
|
1
|
+
{"version":"3.0.1","commands":{"update":{"id":"update","description":"update the <%= config.bin %> CLI","strict":true,"pluginName":"@oclif/plugin-update","pluginAlias":"@oclif/plugin-update","pluginType":"core","aliases":[],"examples":[{"description":"Update to the stable channel:","command":"<%= config.bin %> <%= command.id %> stable"},{"description":"Update to a specific version:","command":"<%= config.bin %> <%= command.id %> --version 1.0.0"},{"description":"Interactively select version:","command":"<%= config.bin %> <%= command.id %> --interactive"},{"description":"See available versions:","command":"<%= config.bin %> <%= command.id %> --available"}],"flags":{"autoupdate":{"name":"autoupdate","type":"boolean","hidden":true,"allowNo":false},"available":{"name":"available","type":"boolean","char":"a","description":"Install a specific version.","allowNo":false},"version":{"name":"version","type":"option","char":"v","description":"Install a specific version.","multiple":false,"exclusive":["interactive"]},"interactive":{"name":"interactive","type":"boolean","char":"i","description":"Interactively select version to install. This is ignored if a channel is provided.","allowNo":false,"exclusive":["version"]},"force":{"name":"force","type":"boolean","description":"Force a re-download of the requested version.","allowNo":false}},"args":[{"name":"channel"}]}}}
|
package/package.json
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
{
|
2
2
|
"name": "@oclif/plugin-update",
|
3
|
-
"version": "
|
3
|
+
"version": "3.0.1",
|
4
4
|
"author": "Salesforce",
|
5
5
|
"bugs": "https://github.com/oclif/plugin-update/issues",
|
6
6
|
"dependencies": {
|
7
7
|
"@oclif/color": "^1.0.0",
|
8
|
-
"@oclif/core": "^1.
|
9
|
-
"@types/semver": "^7.3.4",
|
8
|
+
"@oclif/core": "^1.16.4",
|
10
9
|
"cross-spawn": "^7.0.3",
|
11
10
|
"debug": "^4.3.1",
|
12
11
|
"filesize": "^6.1.0",
|
13
12
|
"fs-extra": "^9.0.1",
|
14
13
|
"http-call": "^5.3.0",
|
15
|
-
"
|
14
|
+
"inquirer": "^8.2.0",
|
15
|
+
"lodash.throttle": "^4.1.1",
|
16
16
|
"log-chopper": "^1.0.2",
|
17
17
|
"semver": "^7.3.5",
|
18
18
|
"tar-fs": "^2.1.1"
|
@@ -25,9 +25,11 @@
|
|
25
25
|
"@types/execa": "^0.9.0",
|
26
26
|
"@types/fs-extra": "^8.0.1",
|
27
27
|
"@types/glob": "^7.1.3",
|
28
|
-
"@types/
|
28
|
+
"@types/inquirer": "^8.2.0",
|
29
|
+
"@types/lodash.throttle": "^4.1.6",
|
29
30
|
"@types/mocha": "^9",
|
30
|
-
"@types/node": "^14.
|
31
|
+
"@types/node": "^14.18.30",
|
32
|
+
"@types/semver": "^7.3.4",
|
31
33
|
"@types/supports-color": "^7.2.0",
|
32
34
|
"@types/write-json-file": "^3.2.1",
|
33
35
|
"chai": "^4.3.4",
|
@@ -37,7 +39,7 @@
|
|
37
39
|
"globby": "^11.0.2",
|
38
40
|
"mocha": "^9",
|
39
41
|
"nock": "^13.2.1",
|
40
|
-
"oclif": "^2.
|
42
|
+
"oclif": "^2.4.2",
|
41
43
|
"qqjs": "^0.3.11",
|
42
44
|
"sinon": "^12.0.1",
|
43
45
|
"ts-node": "^9.1.1",
|
@@ -79,4 +81,4 @@
|
|
79
81
|
"build": "rm -rf lib && tsc"
|
80
82
|
},
|
81
83
|
"main": "lib/index.js"
|
82
|
-
}
|
84
|
+
}
|
package/CHANGELOG.md
DELETED
@@ -1,470 +0,0 @@
|
|
1
|
-
# Changelog
|
2
|
-
|
3
|
-
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
4
|
-
|
5
|
-
## [2.2.0](https://github.com/oclif/plugin-update/compare/v2.1.5...v2.2.0) (2022-01-28)
|
6
|
-
|
7
|
-
|
8
|
-
### Features
|
9
|
-
|
10
|
-
* remove cli-ux ([#364](https://github.com/oclif/plugin-update/issues/364)) ([980c612](https://github.com/oclif/plugin-update/commit/980c6121846a9201da4071f6edc2afc0219751f6))
|
11
|
-
|
12
|
-
### [2.1.5](https://github.com/oclif/plugin-update/compare/v2.1.4...v2.1.5) (2022-01-06)
|
13
|
-
|
14
|
-
|
15
|
-
### Bug Fixes
|
16
|
-
|
17
|
-
* add main to package.json ([#361](https://github.com/oclif/plugin-update/issues/361)) ([9daade3](https://github.com/oclif/plugin-update/commit/9daade340a102a8e0a57ae8a278b3803daf32117))
|
18
|
-
|
19
|
-
### [2.1.4](https://github.com/oclif/plugin-update/compare/v2.1.3...v2.1.4) (2022-01-06)
|
20
|
-
|
21
|
-
|
22
|
-
### Bug Fixes
|
23
|
-
|
24
|
-
* bump @oclif/core ([#360](https://github.com/oclif/plugin-update/issues/360)) ([749b949](https://github.com/oclif/plugin-update/commit/749b949e8127a5b594f28fe7468c1e13440f9817))
|
25
|
-
|
26
|
-
### [2.1.3](https://github.com/oclif/plugin-update/compare/v2.1.2...v2.1.3) (2021-12-09)
|
27
|
-
|
28
|
-
### [2.1.2](https://github.com/oclif/plugin-update/compare/v2.1.1...v2.1.2) (2021-12-08)
|
29
|
-
|
30
|
-
|
31
|
-
### Bug Fixes
|
32
|
-
|
33
|
-
* bump deps-main ([#343](https://github.com/oclif/plugin-update/issues/343)) ([8f110df](https://github.com/oclif/plugin-update/commit/8f110dfe7a69931466cd30510014c99eee624e50))
|
34
|
-
|
35
|
-
### [2.1.1](https://github.com/oclif/plugin-update/compare/v2.1.0...v2.1.1) (2021-12-02)
|
36
|
-
|
37
|
-
|
38
|
-
### Bug Fixes
|
39
|
-
|
40
|
-
* apply v2 deps ([#342](https://github.com/oclif/plugin-update/issues/342)) ([ea1abfa](https://github.com/oclif/plugin-update/commit/ea1abfab9840523636dbf55f183cbf8b6e46d501))
|
41
|
-
|
42
|
-
## [2.1.0](https://github.com/oclif/plugin-update/compare/v2.0.0...v2.1.0) (2021-11-23)
|
43
|
-
|
44
|
-
|
45
|
-
### Features
|
46
|
-
|
47
|
-
* remove legacy update logic ([#314](https://github.com/oclif/plugin-update/issues/314)) ([5241c20](https://github.com/oclif/plugin-update/commit/5241c20dc4eea215bfdedfccecc2e4acf3d3465b))
|
48
|
-
|
49
|
-
## [1.5.0](https://github.com/oclif/plugin-update/compare/v1.4.0...v1.5.0) (2021-08-05)
|
50
|
-
|
51
|
-
## [1.4.0](https://github.com/oclif/plugin-update/compare/v1.4.0-3...v1.4.0) (2021-08-05)
|
52
|
-
|
53
|
-
|
54
|
-
### Bug Fixes
|
55
|
-
|
56
|
-
* allow 6 weeks before deleting CLIs ([#286](https://github.com/oclif/plugin-update/issues/286)) ([2ffc92a](https://github.com/oclif/plugin-update/commit/2ffc92a3687fd8e9ed939c59c6721d08ec7e6fa1))
|
57
|
-
|
58
|
-
## [1.3.9](https://github.com/oclif/plugin-update/compare/v1.3.8...v1.3.9) (2018-11-26)
|
59
|
-
|
60
|
-
|
61
|
-
### Bug Fixes
|
62
|
-
|
63
|
-
* clarify ([e19392f](https://github.com/oclif/plugin-update/commit/e19392f))
|
64
|
-
|
65
|
-
## [1.3.8](https://github.com/oclif/plugin-update/compare/v1.3.7...v1.3.8) (2018-11-26)
|
66
|
-
|
67
|
-
|
68
|
-
### Bug Fixes
|
69
|
-
|
70
|
-
* Parse update manifests if the response is a string ([#48](https://github.com/oclif/plugin-update/issues/48)) ([757b5a5](https://github.com/oclif/plugin-update/commit/757b5a5))
|
71
|
-
|
72
|
-
## [1.3.7](https://github.com/oclif/plugin-update/compare/v1.3.6...v1.3.7) (2018-11-12)
|
73
|
-
|
74
|
-
|
75
|
-
### Bug Fixes
|
76
|
-
|
77
|
-
* warn if not updatable ([#44](https://github.com/oclif/plugin-update/issues/44)) ([947d454](https://github.com/oclif/plugin-update/commit/947d454))
|
78
|
-
|
79
|
-
## [1.3.6](https://github.com/oclif/plugin-update/compare/v1.3.5...v1.3.6) (2018-10-26)
|
80
|
-
|
81
|
-
|
82
|
-
### Bug Fixes
|
83
|
-
|
84
|
-
* add basedir template vars ([f11ab5a](https://github.com/oclif/plugin-update/commit/f11ab5a))
|
85
|
-
|
86
|
-
## [1.3.5](https://github.com/oclif/plugin-update/compare/v1.3.4...v1.3.5) (2018-10-24)
|
87
|
-
|
88
|
-
|
89
|
-
### Bug Fixes
|
90
|
-
|
91
|
-
* Fallback to templates for s3 gz url and baseDir ([#46](https://github.com/oclif/plugin-update/issues/46)) ([bd7ab36](https://github.com/oclif/plugin-update/commit/bd7ab36))
|
92
|
-
|
93
|
-
## [1.3.4](https://github.com/oclif/plugin-update/compare/v1.3.3...v1.3.4) (2018-10-13)
|
94
|
-
|
95
|
-
|
96
|
-
### Bug Fixes
|
97
|
-
|
98
|
-
* remove greenkeeper badge ([0083b70](https://github.com/oclif/plugin-update/commit/0083b70))
|
99
|
-
|
100
|
-
## [1.3.3](https://github.com/oclif/plugin-update/compare/v1.3.2...v1.3.3) (2018-10-08)
|
101
|
-
|
102
|
-
|
103
|
-
### Bug Fixes
|
104
|
-
|
105
|
-
* Add preupdate hook ([#45](https://github.com/oclif/plugin-update/issues/45)) ([a0eb4dd](https://github.com/oclif/plugin-update/commit/a0eb4dd))
|
106
|
-
|
107
|
-
## [1.3.2](https://github.com/oclif/plugin-update/compare/v1.3.1...v1.3.2) (2018-09-14)
|
108
|
-
|
109
|
-
|
110
|
-
### Bug Fixes
|
111
|
-
|
112
|
-
* updated deps ([c4ec1eb](https://github.com/oclif/plugin-update/commit/c4ec1eb))
|
113
|
-
|
114
|
-
## [1.3.1](https://github.com/oclif/plugin-update/compare/v1.3.0...v1.3.1) (2018-08-17)
|
115
|
-
|
116
|
-
|
117
|
-
### Bug Fixes
|
118
|
-
|
119
|
-
* updated semver ([0ed2213](https://github.com/oclif/plugin-update/commit/0ed2213))
|
120
|
-
* use greenkeeper-lockfile@2 ([c945949](https://github.com/oclif/plugin-update/commit/c945949))
|
121
|
-
|
122
|
-
# [1.3.0](https://github.com/oclif/plugin-update/compare/v1.2.14...v1.3.0) (2018-08-17)
|
123
|
-
|
124
|
-
|
125
|
-
### Bug Fixes
|
126
|
-
|
127
|
-
* lint issue ([3ed8ed1](https://github.com/oclif/plugin-update/commit/3ed8ed1))
|
128
|
-
|
129
|
-
|
130
|
-
### Features
|
131
|
-
|
132
|
-
* typescript 3.0 ([5af67f5](https://github.com/oclif/plugin-update/commit/5af67f5))
|
133
|
-
|
134
|
-
## [1.2.14](https://github.com/oclif/plugin-update/compare/v1.2.13...v1.2.14) (2018-06-29)
|
135
|
-
|
136
|
-
|
137
|
-
### Bug Fixes
|
138
|
-
|
139
|
-
* switch to [@oclif](https://github.com/oclif)/color ([7d103d3](https://github.com/oclif/plugin-update/commit/7d103d3))
|
140
|
-
|
141
|
-
## [1.2.13](https://github.com/oclif/plugin-update/compare/v1.2.12...v1.2.13) (2018-06-19)
|
142
|
-
|
143
|
-
|
144
|
-
### Bug Fixes
|
145
|
-
|
146
|
-
* updated dev-cli ([17efe31](https://github.com/oclif/plugin-update/commit/17efe31))
|
147
|
-
|
148
|
-
## [1.2.12](https://github.com/oclif/plugin-update/compare/v1.2.11...v1.2.12) (2018-06-19)
|
149
|
-
|
150
|
-
|
151
|
-
### Bug Fixes
|
152
|
-
|
153
|
-
* use OCLIF_CLIENT_HOME if exists ([#25](https://github.com/oclif/plugin-update/issues/25)) ([8b761b6](https://github.com/oclif/plugin-update/commit/8b761b6))
|
154
|
-
|
155
|
-
## [1.2.11](https://github.com/oclif/plugin-update/compare/v1.2.10...v1.2.11) (2018-06-12)
|
156
|
-
|
157
|
-
|
158
|
-
### Bug Fixes
|
159
|
-
|
160
|
-
* touch update before tidying ([df4d75f](https://github.com/oclif/plugin-update/commit/df4d75f))
|
161
|
-
|
162
|
-
## [1.2.10](https://github.com/oclif/plugin-update/compare/v1.2.9...v1.2.10) (2018-06-12)
|
163
|
-
|
164
|
-
|
165
|
-
### Bug Fixes
|
166
|
-
|
167
|
-
* updated deps ([aee668c](https://github.com/oclif/plugin-update/commit/aee668c))
|
168
|
-
|
169
|
-
## [1.2.9](https://github.com/oclif/plugin-update/compare/v1.2.8...v1.2.9) (2018-06-12)
|
170
|
-
|
171
|
-
|
172
|
-
### Bug Fixes
|
173
|
-
|
174
|
-
* updated deps ([11a059f](https://github.com/oclif/plugin-update/commit/11a059f))
|
175
|
-
|
176
|
-
<a name="1.2.8"></a>
|
177
|
-
## [1.2.8](https://github.com/oclif/plugin-update/compare/v1.2.7...v1.2.8) (2018-06-01)
|
178
|
-
|
179
|
-
|
180
|
-
### Bug Fixes
|
181
|
-
|
182
|
-
* typescript 2.9 ([dfac3c3](https://github.com/oclif/plugin-update/commit/dfac3c3))
|
183
|
-
|
184
|
-
<a name="1.2.7"></a>
|
185
|
-
## [1.2.7](https://github.com/oclif/plugin-update/compare/v1.2.6...v1.2.7) (2018-05-29)
|
186
|
-
|
187
|
-
|
188
|
-
### Bug Fixes
|
189
|
-
|
190
|
-
* update beta daily and stable bi-weekly ([66aa6f2](https://github.com/oclif/plugin-update/commit/66aa6f2))
|
191
|
-
|
192
|
-
<a name="1.2.6"></a>
|
193
|
-
## [1.2.6](https://github.com/oclif/plugin-update/compare/v1.2.5...v1.2.6) (2018-05-24)
|
194
|
-
|
195
|
-
|
196
|
-
### Bug Fixes
|
197
|
-
|
198
|
-
* ensure client directory is not a file ([665c6e0](https://github.com/oclif/plugin-update/commit/665c6e0))
|
199
|
-
|
200
|
-
<a name="1.2.5"></a>
|
201
|
-
## [1.2.5](https://github.com/oclif/plugin-update/compare/v1.2.4...v1.2.5) (2018-05-24)
|
202
|
-
|
203
|
-
|
204
|
-
### Bug Fixes
|
205
|
-
|
206
|
-
* updated deps ([62bb88e](https://github.com/oclif/plugin-update/commit/62bb88e))
|
207
|
-
|
208
|
-
<a name="1.2.4"></a>
|
209
|
-
## [1.2.4](https://github.com/oclif/plugin-update/compare/v1.2.3...v1.2.4) (2018-05-14)
|
210
|
-
|
211
|
-
|
212
|
-
### Bug Fixes
|
213
|
-
|
214
|
-
* updated deps ([d9f96fd](https://github.com/oclif/plugin-update/commit/d9f96fd))
|
215
|
-
|
216
|
-
<a name="1.2.3"></a>
|
217
|
-
## [1.2.3](https://github.com/oclif/plugin-update/compare/v1.2.2...v1.2.3) (2018-05-10)
|
218
|
-
|
219
|
-
|
220
|
-
### Bug Fixes
|
221
|
-
|
222
|
-
* updated cli-ux ([4b3d500](https://github.com/oclif/plugin-update/commit/4b3d500))
|
223
|
-
|
224
|
-
<a name="1.2.2"></a>
|
225
|
-
## [1.2.2](https://github.com/oclif/plugin-update/compare/v1.2.1...v1.2.2) (2018-05-09)
|
226
|
-
|
227
|
-
|
228
|
-
### Bug Fixes
|
229
|
-
|
230
|
-
* disable autoupdates entirely when env var is set ([8328b4f](https://github.com/oclif/plugin-update/commit/8328b4f))
|
231
|
-
|
232
|
-
<a name="1.2.1"></a>
|
233
|
-
## [1.2.1](https://github.com/oclif/plugin-update/compare/v1.2.0...v1.2.1) (2018-05-04)
|
234
|
-
|
235
|
-
|
236
|
-
### Bug Fixes
|
237
|
-
|
238
|
-
* check UPDATE_INSTRUCTIONS env var ([459e9f2](https://github.com/oclif/plugin-update/commit/459e9f2))
|
239
|
-
|
240
|
-
<a name="1.2.0"></a>
|
241
|
-
# [1.2.0](https://github.com/oclif/plugin-update/compare/v1.1.21...v1.2.0) (2018-05-04)
|
242
|
-
|
243
|
-
|
244
|
-
### Features
|
245
|
-
|
246
|
-
* add current directory for debugging ([9776dcc](https://github.com/oclif/plugin-update/commit/9776dcc))
|
247
|
-
|
248
|
-
<a name="1.1.21"></a>
|
249
|
-
## [1.1.21](https://github.com/oclif/plugin-update/compare/v1.1.20...v1.1.21) (2018-05-03)
|
250
|
-
|
251
|
-
|
252
|
-
### Bug Fixes
|
253
|
-
|
254
|
-
* manifest ([d0d55b9](https://github.com/oclif/plugin-update/commit/d0d55b9))
|
255
|
-
* manifest ([def2bbf](https://github.com/oclif/plugin-update/commit/def2bbf))
|
256
|
-
* updated deps ([b7f8076](https://github.com/oclif/plugin-update/commit/b7f8076))
|
257
|
-
* updated deps ([52a4094](https://github.com/oclif/plugin-update/commit/52a4094))
|
258
|
-
|
259
|
-
<a name="1.1.20"></a>
|
260
|
-
## [1.1.20](https://github.com/oclif/plugin-update/compare/v1.1.19...v1.1.20) (2018-05-01)
|
261
|
-
|
262
|
-
|
263
|
-
### Bug Fixes
|
264
|
-
|
265
|
-
* updated deps ([0c8b7f9](https://github.com/oclif/plugin-update/commit/0c8b7f9))
|
266
|
-
|
267
|
-
<a name="1.1.19"></a>
|
268
|
-
## [1.1.19](https://github.com/oclif/plugin-update/compare/v1.1.18...v1.1.19) (2018-04-25)
|
269
|
-
|
270
|
-
|
271
|
-
### Bug Fixes
|
272
|
-
|
273
|
-
* increase update check time ([49c4b1f](https://github.com/oclif/plugin-update/commit/49c4b1f))
|
274
|
-
|
275
|
-
<a name="1.1.18"></a>
|
276
|
-
## [1.1.18](https://github.com/oclif/plugin-update/compare/v1.1.17...v1.1.18) (2018-04-24)
|
277
|
-
|
278
|
-
|
279
|
-
### Bug Fixes
|
280
|
-
|
281
|
-
* default to config.bin if no binPath ([914e0e1](https://github.com/oclif/plugin-update/commit/914e0e1))
|
282
|
-
|
283
|
-
<a name="1.1.17"></a>
|
284
|
-
## [1.1.17](https://github.com/oclif/plugin-update/compare/v1.1.16...v1.1.17) (2018-04-21)
|
285
|
-
|
286
|
-
|
287
|
-
### Bug Fixes
|
288
|
-
|
289
|
-
* only show waiting message once ([5c75700](https://github.com/oclif/plugin-update/commit/5c75700))
|
290
|
-
|
291
|
-
<a name="1.1.16"></a>
|
292
|
-
## [1.1.16](https://github.com/oclif/plugin-update/compare/v1.1.15...v1.1.16) (2018-04-21)
|
293
|
-
|
294
|
-
|
295
|
-
### Bug Fixes
|
296
|
-
|
297
|
-
* improve filesize output ([966756e](https://github.com/oclif/plugin-update/commit/966756e))
|
298
|
-
|
299
|
-
<a name="1.1.15"></a>
|
300
|
-
## [1.1.15](https://github.com/oclif/plugin-update/compare/v1.1.14...v1.1.15) (2018-04-20)
|
301
|
-
|
302
|
-
|
303
|
-
### Bug Fixes
|
304
|
-
|
305
|
-
* enable tidy script ([08eb1b0](https://github.com/oclif/plugin-update/commit/08eb1b0))
|
306
|
-
|
307
|
-
<a name="1.1.14"></a>
|
308
|
-
## [1.1.14](https://github.com/oclif/plugin-update/compare/v1.1.13...v1.1.14) (2018-04-20)
|
309
|
-
|
310
|
-
|
311
|
-
### Bug Fixes
|
312
|
-
|
313
|
-
* debounce fix ([241646d](https://github.com/oclif/plugin-update/commit/241646d))
|
314
|
-
|
315
|
-
<a name="1.1.13"></a>
|
316
|
-
## [1.1.13](https://github.com/oclif/plugin-update/compare/v1.1.12...v1.1.13) (2018-04-20)
|
317
|
-
|
318
|
-
|
319
|
-
### Bug Fixes
|
320
|
-
|
321
|
-
* setlocal ([d17e2b4](https://github.com/oclif/plugin-update/commit/d17e2b4))
|
322
|
-
* setlocal ([665dda9](https://github.com/oclif/plugin-update/commit/665dda9))
|
323
|
-
|
324
|
-
<a name="1.1.12"></a>
|
325
|
-
## [1.1.12](https://github.com/oclif/plugin-update/compare/v1.1.11...v1.1.12) (2018-04-20)
|
326
|
-
|
327
|
-
|
328
|
-
### Bug Fixes
|
329
|
-
|
330
|
-
* set binpath ([371bc32](https://github.com/oclif/plugin-update/commit/371bc32))
|
331
|
-
|
332
|
-
<a name="1.1.11"></a>
|
333
|
-
## [1.1.11](https://github.com/oclif/plugin-update/compare/v1.1.10...v1.1.11) (2018-04-19)
|
334
|
-
|
335
|
-
|
336
|
-
### Bug Fixes
|
337
|
-
|
338
|
-
* pause/resume stream ([b937c61](https://github.com/oclif/plugin-update/commit/b937c61))
|
339
|
-
* synchronously check for path exists ([357ea6f](https://github.com/oclif/plugin-update/commit/357ea6f))
|
340
|
-
|
341
|
-
<a name="1.1.10"></a>
|
342
|
-
## [1.1.10](https://github.com/oclif/plugin-update/compare/v1.1.9...v1.1.10) (2018-04-19)
|
343
|
-
|
344
|
-
|
345
|
-
### Bug Fixes
|
346
|
-
|
347
|
-
* use unix output format ([2b8c765](https://github.com/oclif/plugin-update/commit/2b8c765))
|
348
|
-
|
349
|
-
<a name="1.1.9"></a>
|
350
|
-
## [1.1.9](https://github.com/oclif/plugin-update/compare/v1.1.8...v1.1.9) (2018-04-19)
|
351
|
-
|
352
|
-
|
353
|
-
### Bug Fixes
|
354
|
-
|
355
|
-
* updated deps ([c598e29](https://github.com/oclif/plugin-update/commit/c598e29))
|
356
|
-
|
357
|
-
<a name="1.1.8"></a>
|
358
|
-
## [1.1.8](https://github.com/oclif/plugin-update/compare/v1.1.7...v1.1.8) (2018-04-10)
|
359
|
-
|
360
|
-
|
361
|
-
### Bug Fixes
|
362
|
-
|
363
|
-
* bump circle cache to fix postpack step ([5bd3194](https://github.com/oclif/plugin-update/commit/5bd3194))
|
364
|
-
|
365
|
-
<a name="1.1.7"></a>
|
366
|
-
## [1.1.7](https://github.com/oclif/plugin-update/compare/v1.1.6...v1.1.7) (2018-04-10)
|
367
|
-
|
368
|
-
|
369
|
-
### Bug Fixes
|
370
|
-
|
371
|
-
* updated deps ([6ca6677](https://github.com/oclif/plugin-update/commit/6ca6677))
|
372
|
-
|
373
|
-
<a name="1.1.6"></a>
|
374
|
-
## [1.1.6](https://github.com/oclif/plugin-update/compare/v1.1.5...v1.1.6) (2018-04-10)
|
375
|
-
|
376
|
-
|
377
|
-
### Bug Fixes
|
378
|
-
|
379
|
-
* updated dev-cli ([06b455d](https://github.com/oclif/plugin-update/commit/06b455d))
|
380
|
-
* updated dev-cli ([0fd606b](https://github.com/oclif/plugin-update/commit/0fd606b))
|
381
|
-
* use target tarball ([701e8c7](https://github.com/oclif/plugin-update/commit/701e8c7))
|
382
|
-
|
383
|
-
<a name="1.1.5"></a>
|
384
|
-
## [1.1.5](https://github.com/oclif/plugin-update/compare/v1.1.4...v1.1.5) (2018-04-09)
|
385
|
-
|
386
|
-
|
387
|
-
### Bug Fixes
|
388
|
-
|
389
|
-
* updated deps ([652c354](https://github.com/oclif/plugin-update/commit/652c354))
|
390
|
-
|
391
|
-
<a name="1.1.4"></a>
|
392
|
-
## [1.1.4](https://github.com/oclif/plugin-update/compare/v1.1.3...v1.1.4) (2018-04-09)
|
393
|
-
|
394
|
-
|
395
|
-
### Bug Fixes
|
396
|
-
|
397
|
-
* do not allow updates when binPath is not set ([939a321](https://github.com/oclif/plugin-update/commit/939a321))
|
398
|
-
|
399
|
-
<a name="1.1.3"></a>
|
400
|
-
## [1.1.3](https://github.com/oclif/plugin-update/compare/v1.1.2...v1.1.3) (2018-04-09)
|
401
|
-
|
402
|
-
|
403
|
-
### Bug Fixes
|
404
|
-
|
405
|
-
* add baseDir templates ([f354979](https://github.com/oclif/plugin-update/commit/f354979))
|
406
|
-
|
407
|
-
<a name="1.1.2"></a>
|
408
|
-
## [1.1.2](https://github.com/oclif/plugin-update/compare/v1.1.1...v1.1.2) (2018-04-09)
|
409
|
-
|
410
|
-
|
411
|
-
### Bug Fixes
|
412
|
-
|
413
|
-
* use version string for channel ([f0095c3](https://github.com/oclif/plugin-update/commit/f0095c3))
|
414
|
-
|
415
|
-
<a name="1.1.1"></a>
|
416
|
-
## [1.1.1](https://github.com/oclif/plugin-update/compare/v1.1.0...v1.1.1) (2018-04-09)
|
417
|
-
|
418
|
-
|
419
|
-
### Bug Fixes
|
420
|
-
|
421
|
-
* add targets ([68f6fa8](https://github.com/oclif/plugin-update/commit/68f6fa8))
|
422
|
-
* npm pack on circle ([9ca2c9c](https://github.com/oclif/plugin-update/commit/9ca2c9c))
|
423
|
-
* updater fixes ([c65c556](https://github.com/oclif/plugin-update/commit/c65c556))
|
424
|
-
* updater seems to be working ([9b3e33b](https://github.com/oclif/plugin-update/commit/9b3e33b))
|
425
|
-
|
426
|
-
<a name="1.1.0"></a>
|
427
|
-
# [1.1.0](https://github.com/oclif/plugin-update/compare/v1.0.5...v1.1.0) (2018-04-07)
|
428
|
-
|
429
|
-
|
430
|
-
### Bug Fixes
|
431
|
-
|
432
|
-
* fixed github check ([7fe3d42](https://github.com/oclif/plugin-update/commit/7fe3d42))
|
433
|
-
|
434
|
-
|
435
|
-
### Features
|
436
|
-
|
437
|
-
* added github updater ([cbd2a4f](https://github.com/oclif/plugin-update/commit/cbd2a4f))
|
438
|
-
|
439
|
-
<a name="1.0.5"></a>
|
440
|
-
## [1.0.5](https://github.com/oclif/plugin-update/compare/v1.0.4...v1.0.5) (2018-04-07)
|
441
|
-
|
442
|
-
|
443
|
-
### Bug Fixes
|
444
|
-
|
445
|
-
* added test stub ([b2b25aa](https://github.com/oclif/plugin-update/commit/b2b25aa))
|
446
|
-
* ran generator ([0b308d1](https://github.com/oclif/plugin-update/commit/0b308d1))
|
447
|
-
|
448
|
-
<a name="1.0.4"></a>
|
449
|
-
## [1.0.4](https://github.com/oclif/plugin-update/compare/e8dd1e98a7806d1a67f5294034fb5b99d6012222...v1.0.4) (2018-04-07)
|
450
|
-
|
451
|
-
|
452
|
-
### Bug Fixes
|
453
|
-
|
454
|
-
* updated deps ([f652abd](https://github.com/oclif/plugin-update/commit/f652abd))
|
455
|
-
|
456
|
-
<a name="1.0.3"></a>
|
457
|
-
## [1.0.3](https://github.com/oclif/plugin-update/compare/bd0256816d53dd4b56618871741d56c7b3b1d7ca...v1.0.3) (2018-02-28)
|
458
|
-
|
459
|
-
|
460
|
-
### Bug Fixes
|
461
|
-
|
462
|
-
* updated deps ([e8dd1e9](https://github.com/oclif/plugin-update/commit/e8dd1e9))
|
463
|
-
|
464
|
-
<a name="1.0.2"></a>
|
465
|
-
## [1.0.2](https://github.com/oclif/plugin-update/compare/v1.0.1...v1.0.2) (2018-02-13)
|
466
|
-
|
467
|
-
|
468
|
-
### Bug Fixes
|
469
|
-
|
470
|
-
* use pjson channel ([bd02568](https://github.com/oclif/plugin-update/commit/bd02568))
|