oclif-plugin-update-notifier 1.4.0 → 1.5.0
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/CHANGELOG.md +80 -0
- package/LICENSE.txt +3 -2
- package/README.md +43 -17
- package/lib/commands/plugins/update/check.d.ts +5 -0
- package/lib/commands/plugins/update/check.js +15 -0
- package/lib/commands/plugins/update/check.js.map +1 -0
- package/lib/hooks/changelog.d.ts +2 -0
- package/lib/hooks/changelog.js +95 -0
- package/lib/hooks/changelog.js.map +1 -0
- package/lib/hooks/init.d.ts +2 -0
- package/lib/hooks/init.js +11 -0
- package/lib/hooks/init.js.map +1 -0
- package/lib/hooks/prerun.d.ts +2 -2
- package/lib/hooks/prerun.js +27 -11
- package/lib/hooks/prerun.js.map +1 -1
- package/lib/hooks/updatenotifier.d.ts +1 -1
- package/lib/hooks/updatenotifier.js +31 -27
- package/lib/hooks/updatenotifier.js.map +1 -1
- package/lib/index.js +2 -4
- package/lib/index.js.map +1 -1
- package/lib/lib/check.js +7 -12
- package/lib/lib/check.js.map +1 -1
- package/lib/lib/fetchInfo.d.ts +19 -0
- package/lib/lib/fetchInfo.js +112 -0
- package/lib/lib/fetchInfo.js.map +1 -0
- package/lib/lib/multiUpdateNotifier.d.ts +33 -0
- package/lib/lib/multiUpdateNotifier.js +130 -0
- package/lib/lib/multiUpdateNotifier.js.map +1 -0
- package/oclif.manifest.json +1 -1
- package/package.json +85 -57
- package/lib/hooks/postrun.d.ts +0 -2
- package/lib/hooks/postrun.js +0 -21
- package/lib/hooks/postrun.js.map +0 -1
- package/lib/lib/checkutils.d.ts +0 -3
- package/lib/lib/checkutils.js +0 -126
- package/lib/lib/checkutils.js.map +0 -1
- package/lib/lib/pluginupdatenotifier.d.ts +0 -18
- package/lib/lib/pluginupdatenotifier.js +0 -139
- package/lib/lib/pluginupdatenotifier.js.map +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# [1.5.0](https://github.com/jayree/oclif-plugin-update-notifier/compare/v1.4.0...v1.5.0) (2022-09-20)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* move to ESM ([e355835](https://github.com/jayree/oclif-plugin-update-notifier/commit/e355835bd50814f06ecb670bf60c95fc989763e2))
|
|
7
|
+
|
|
8
|
+
# [1.4.0](https://github.com/jayree/oclif-plugin-update-notifier/compare/v1.3.1...v1.4.0) (2021-09-03)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* override platform wsl with linux during update command ([50f0ba1](https://github.com/jayree/oclif-plugin-update-notifier/commit/50f0ba1a19be2a860207372607489dd2048828db))
|
|
14
|
+
|
|
15
|
+
## [1.3.1](https://github.com/jayree/oclif-plugin-update-notifier/compare/v1.3.0...v1.3.1) (2021-06-24)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* update dependencies ([3e8043b](https://github.com/jayree/oclif-plugin-update-notifier/commit/3e8043b4402c728f4f1b29320f00926f87d5c770))
|
|
21
|
+
|
|
22
|
+
# [1.3.0](https://github.com/jayree/oclif-plugin-update-notifier/compare/v1.2.1...v1.3.0) (2021-04-23)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* plugin uninstall ([ad8aa3e](https://github.com/jayree/oclif-plugin-update-notifier/commit/ad8aa3e9ec690eb2e8711127ff720eeb52a50dad))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
|
|
32
|
+
* add releaseURL as changeLogURL ([62586f8](https://github.com/jayree/oclif-plugin-update-notifier/commit/62586f8a42df535a7aec0bac3556104f1e33b941))
|
|
33
|
+
|
|
34
|
+
## [1.2.1](https://github.com/jayree/oclif-plugin-update-notifier/compare/v1.2.0...v1.2.1) (2021-04-20)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
|
|
39
|
+
* new changelog handling ([3bd20be](https://github.com/jayree/oclif-plugin-update-notifier/commit/3bd20be86f7b76f3f77e0bbcd3063e1d594c4646))
|
|
40
|
+
|
|
41
|
+
# [1.2.0](https://github.com/jayree/oclif-plugin-update-notifier/compare/v1.1.0...v1.2.0) (2021-04-12)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Features
|
|
45
|
+
|
|
46
|
+
* make the hook faster ([c791d6d](https://github.com/jayree/oclif-plugin-update-notifier/commit/c791d6d02256f1eb5847ec150345326dd7faf810))
|
|
47
|
+
|
|
48
|
+
# [1.1.0](https://github.com/jayree/oclif-plugin-update-notifier/compare/v1.0.2...v1.1.0) (2021-01-03)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
### Bug Fixes
|
|
52
|
+
|
|
53
|
+
* update dependencies ([ae9b062](https://github.com/jayree/oclif-plugin-update-notifier/commit/ae9b0628ebba67457c73e37666d53fbf9b512571))
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### Features
|
|
57
|
+
|
|
58
|
+
* include core plugins ([e4ebdf1](https://github.com/jayree/oclif-plugin-update-notifier/commit/e4ebdf11ca6a585faae4e955dbe6496bb46b2da0))
|
|
59
|
+
|
|
60
|
+
## [1.0.2](https://github.com/jayree/oclif-plugin-update-notifier/compare/v1.0.1...v1.0.2) (2020-09-23)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
### Bug Fixes
|
|
64
|
+
|
|
65
|
+
* add package description ([45077cb](https://github.com/jayree/oclif-plugin-update-notifier/commit/45077cb3cfe8e8c22a194c72139114a4921564f1))
|
|
66
|
+
* update dependencies ([81a73ac](https://github.com/jayree/oclif-plugin-update-notifier/commit/81a73acf662fdafb76079c37028474fe0db68965))
|
|
67
|
+
|
|
68
|
+
## [1.0.1](https://github.com/jayree/oclif-plugin-update-notifier/compare/v1.0.0...v1.0.1) (2020-08-06)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
### Bug Fixes
|
|
72
|
+
|
|
73
|
+
* update readme ([a488a04](https://github.com/jayree/oclif-plugin-update-notifier/commit/a488a0422ab4c9fd7328c549ddc6107e08e6ef28))
|
|
74
|
+
|
|
75
|
+
# 1.0.0 (2020-08-06)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
### Features
|
|
79
|
+
|
|
80
|
+
* first release ([fd0a10f](https://github.com/jayree/oclif-plugin-update-notifier/commit/fd0a10f52ac46ea2ceb5870d033691ad02f45a52))
|
package/LICENSE.txt
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
Copyright (c)
|
|
1
|
+
Copyright (c) 2022, jayree
|
|
2
|
+
Copyright Google
|
|
2
3
|
All rights reserved.
|
|
3
4
|
|
|
4
5
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
@@ -9,4 +10,4 @@ Redistribution and use in source and binary forms, with or without modification,
|
|
|
9
10
|
|
|
10
11
|
* Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
11
12
|
|
|
12
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
13
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# oclif-plugin-update-notifier
|
|
2
|
-
[](https://oclif.io)
|
|
3
3
|
[](https://npmjs.org/package/oclif-plugin-update-notifier)
|
|
4
4
|
[](https://circleci.com/gh/jayree/oclif-plugin-update-notifier/tree/main)
|
|
5
5
|
[](https://ci.appveyor.com/project/jayree/oclif-plugin-update-notifier/branch/main)
|
|
@@ -7,32 +7,58 @@
|
|
|
7
7
|
[](https://npmjs.org/package/oclif-plugin-update-notifier)
|
|
8
8
|
[](https://github.com/jayree/oclif-plugin-update-notifier/blob/main/package.json)
|
|
9
9
|
|
|
10
|
+
Update notifications for oclif plugins based on [yeoman/update-notifier](https://github.com/yeoman/update-notifier)
|
|
11
|
+
|
|
10
12
|
<!-- toc -->
|
|
11
13
|
* [Usage](#usage)
|
|
14
|
+
* [Commands](#commands)
|
|
12
15
|
<!-- tocstop -->
|
|
13
16
|
|
|
14
17
|
## Usage
|
|
15
18
|
|
|
16
19
|
<!-- usage -->
|
|
17
20
|
```sh-session
|
|
18
|
-
$
|
|
19
|
-
$
|
|
20
|
-
|
|
21
|
+
$ oclif-example plugins:install oclif-plugin-update-notifier
|
|
22
|
+
$ oclif-example plugins:[COMMAND]
|
|
23
|
+
running command...
|
|
24
|
+
$ oclif-example plugins
|
|
25
|
+
oclif-plugin-update-notifier 1.5.0
|
|
26
|
+
$ oclif-example help plugins:[COMMAND]
|
|
27
|
+
USAGE
|
|
28
|
+
$ oclif-example plugins:COMMAND
|
|
29
|
+
...
|
|
21
30
|
```
|
|
22
31
|
<!-- usagestop -->
|
|
23
32
|
|
|
24
33
|
```sh-session
|
|
25
|
-
$
|
|
26
|
-
oclif
|
|
27
|
-
|
|
28
|
-
╭────────────────────────────────────────────────────────────────────────────────────────────╮
|
|
29
|
-
│ │
|
|
30
|
-
│
|
|
31
|
-
│ │
|
|
32
|
-
│
|
|
33
|
-
│
|
|
34
|
-
│ │
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
$ oclif-example plugins
|
|
35
|
+
@oclif/plugin-help 5.1.11
|
|
36
|
+
|
|
37
|
+
╭────────────────────────────────────────────────────────────────────────────────────────────╮
|
|
38
|
+
│ │
|
|
39
|
+
│ oclif-example-plugin update available! │
|
|
40
|
+
│ │
|
|
41
|
+
│ @oclif/plugin-help 5.1.11 → 5.1.12 │
|
|
42
|
+
│ Changelog: https://github.com/oclif/plugin-help/blob/main/CHANGELOG.md │
|
|
43
|
+
│ │
|
|
44
|
+
╰────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
45
|
+
```
|
|
46
|
+
## Commands
|
|
47
|
+
|
|
48
|
+
<!-- commands -->
|
|
49
|
+
* [`oclif-example plugins:update:check`](#oclif-example-pluginsupdatecheck)
|
|
50
|
+
|
|
51
|
+
### `oclif-example plugins:update:check`
|
|
52
|
+
|
|
53
|
+
check installed plugins for updates
|
|
54
|
+
|
|
38
55
|
```
|
|
56
|
+
USAGE
|
|
57
|
+
$ oclif-example plugins:update:check
|
|
58
|
+
|
|
59
|
+
DESCRIPTION
|
|
60
|
+
check installed plugins for updates
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
_See code: [src/commands/plugins/update/check.ts](https://github.com/jayree/oclif-plugin-update-notifier/blob/v1.5.0/src/commands/plugins/update/check.ts)_
|
|
64
|
+
<!-- commandsstop -->
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2022, jayree
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
*/
|
|
7
|
+
import { Command } from '@oclif/core';
|
|
8
|
+
export default class PluginsUpdateCheck extends Command {
|
|
9
|
+
// eslint-disable-next-line class-methods-use-this
|
|
10
|
+
async run() {
|
|
11
|
+
// i'm just calling the prerun hook
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
PluginsUpdateCheck.description = 'check installed plugins for updates';
|
|
15
|
+
//# sourceMappingURL=check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../../../src/commands/plugins/update/check.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,OAAO;IAErD,kDAAkD;IAC3C,KAAK,CAAC,GAAG;QACd,mCAAmC;IACrC,CAAC;;AAJa,8BAAW,GAAG,qCAAqC,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2022, jayree
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
*/
|
|
7
|
+
/* istanbul ignore file */
|
|
8
|
+
import { join } from 'node:path';
|
|
9
|
+
import fs from 'fs-extra';
|
|
10
|
+
import Debug from 'debug';
|
|
11
|
+
import TerminalRenderer from 'marked-terminal';
|
|
12
|
+
import { marked } from 'marked';
|
|
13
|
+
import semver from 'semver';
|
|
14
|
+
// original from https://github.com/salesforcecli/plugin-info/blob/main/src/shared/parseReleaseNotes.ts
|
|
15
|
+
const parseReleaseNotes = (notes, version) => {
|
|
16
|
+
let found = false;
|
|
17
|
+
let closestVersion;
|
|
18
|
+
let versions;
|
|
19
|
+
const parsed = marked.lexer(notes);
|
|
20
|
+
let tokens;
|
|
21
|
+
const findVersion = (desiredVersion) => {
|
|
22
|
+
versions = [];
|
|
23
|
+
tokens = parsed.filter((token) => {
|
|
24
|
+
// TODO: Could make header depth (2) a setting in oclif.info.releasenotes
|
|
25
|
+
if (token.type === 'heading' && token.depth <= 2) {
|
|
26
|
+
const coercedVersion = semver.coerce(token.text).version;
|
|
27
|
+
// We will use this to find the closest patch if passed version is not found
|
|
28
|
+
versions.push(coercedVersion);
|
|
29
|
+
if (coercedVersion === desiredVersion) {
|
|
30
|
+
found = true;
|
|
31
|
+
return token;
|
|
32
|
+
}
|
|
33
|
+
found = false;
|
|
34
|
+
}
|
|
35
|
+
else if (found === true) {
|
|
36
|
+
return token;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
findVersion(version);
|
|
41
|
+
if (!tokens.length) {
|
|
42
|
+
// If version was not found, try again with the closest patch version
|
|
43
|
+
const semverRange = `${semver.major(version)}.${semver.minor(version)}.x`;
|
|
44
|
+
closestVersion = semver.maxSatisfying(versions, semverRange);
|
|
45
|
+
findVersion(closestVersion);
|
|
46
|
+
}
|
|
47
|
+
if (closestVersion !== undefined) {
|
|
48
|
+
const warning = marked.lexer(`# ATTENTION: Version ${version} was not found. Showing notes for closest patch version ${closestVersion}.`)[0];
|
|
49
|
+
tokens.unshift(warning);
|
|
50
|
+
}
|
|
51
|
+
return tokens;
|
|
52
|
+
};
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
54
|
+
export const changelog = async function () {
|
|
55
|
+
const debug = Debug(`${this.config.bin}:oclif-plugin-update-notifier:hooks:changelog`);
|
|
56
|
+
process.once('exit', () => {
|
|
57
|
+
try {
|
|
58
|
+
const pluginRootPath = join(new URL('./', import.meta.url).pathname, '..', '..');
|
|
59
|
+
const { name, version } = fs.readJsonSync(join(pluginRootPath, 'package.json'));
|
|
60
|
+
const changelogFile = fs.readFileSync(join(pluginRootPath, 'CHANGELOG.md'), 'utf8');
|
|
61
|
+
const cacheDir = join(this.config.cacheDir, name);
|
|
62
|
+
const versionFile = join(cacheDir, 'version');
|
|
63
|
+
fs.ensureFileSync(versionFile);
|
|
64
|
+
let latestVersion;
|
|
65
|
+
try {
|
|
66
|
+
latestVersion = fs.readJSONSync(versionFile);
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
latestVersion = { version: '0.0.0' };
|
|
70
|
+
}
|
|
71
|
+
debug({ latestVersion: latestVersion.version, version });
|
|
72
|
+
if (latestVersion.version !== version) {
|
|
73
|
+
const tokens = parseReleaseNotes(changelogFile, version);
|
|
74
|
+
if (!tokens.length) {
|
|
75
|
+
debug(`${name} - didn't find version '${version}'.`);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
marked.setOptions({
|
|
79
|
+
renderer: new TerminalRenderer({ emoji: false }),
|
|
80
|
+
});
|
|
81
|
+
tokens.unshift(marked.lexer(`# Changelog for '${name}':`)[0]);
|
|
82
|
+
this.log(marked.parser(tokens));
|
|
83
|
+
fs.writeJsonSync(versionFile, { version });
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
debug(`${name} - no update`);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
debug(error);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=changelog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changelog.js","sourceRoot":"","sources":["../../src/hooks/changelog.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,0BAA0B;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,gBAAgB,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAG5B,uGAAuG;AACvG,MAAM,iBAAiB,GAAG,CAAC,KAAa,EAAE,OAAe,EAAkB,EAAE;IAC3E,IAAI,KAAK,GAAG,KAAK,CAAC;IAClB,IAAI,cAAsB,CAAC;IAC3B,IAAI,QAAkB,CAAC;IAEvB,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAEnC,IAAI,MAAsB,CAAC;IAE3B,MAAM,WAAW,GAAG,CAAC,cAAsB,EAAQ,EAAE;QACnD,QAAQ,GAAG,EAAE,CAAC;QAEd,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE;YAC/B,yEAAyE;YACzE,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,EAAE;gBAChD,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC;gBAEzD,4EAA4E;gBAC5E,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;gBAE9B,IAAI,cAA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CAAC,WAAW,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;iBAC5C;aACF;iBAAM;gBACL,KAAK,CAAC,GAAG,IAAI,cAAc,CAAC,CAAC;aAC9B;SACF;QAAC,OAAO,KAAK,EAAE;YACd,KAAK,CAAC,KAAK,CAAC,CAAC;SACd;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Debug from 'debug';
|
|
2
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
3
|
+
export const init = async function (options) {
|
|
4
|
+
const debug = Debug(`${this.config.bin}:oclif-plugin-update-notifier:hooks:prerun`);
|
|
5
|
+
debug({ CommandID: options.id });
|
|
6
|
+
if (options.id === 'update' && this.config.platform === 'wsl') {
|
|
7
|
+
debug(`'update' command detected -> replace platform '${this.config.platform}' with 'linux'`);
|
|
8
|
+
this.config.platform = 'linux';
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/hooks/init.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,4DAA4D;AAC5D,MAAM,CAAC,MAAM,IAAI,GAAiB,KAAK,WAAW,OAAO;IACvD,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,4CAA4C,CAAC,CAAC;IACpF,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;IACjC,IAAI,OAAO,CAAC,EAAE,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,KAAK,KAAK,EAAE;QAC7D,KAAK,CAAC,kDAAkD,IAAI,CAAC,MAAM,CAAC,QAAQ,gBAAgB,CAAC,CAAC;QAC9F,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,OAAO,CAAC;KAChC;AACH,CAAC,CAAC"}
|
package/lib/hooks/prerun.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Hook } from '@oclif/
|
|
2
|
-
export declare const
|
|
1
|
+
import { Hook } from '@oclif/core';
|
|
2
|
+
export declare const prerun: Hook<'prerun'>;
|
package/lib/hooks/prerun.js
CHANGED
|
@@ -1,14 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const debug = Debug(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import Debug from 'debug';
|
|
2
|
+
import { env } from '@salesforce/kit';
|
|
3
|
+
const isOutputEnabled = !process.argv.find((arg) => ['--json', '--help', '-h'].includes(arg));
|
|
4
|
+
export const prerun = async function (options) {
|
|
5
|
+
const debug = Debug(`${this.config.bin}:oclif-plugin-update-notifier:hooks:prerun`);
|
|
6
|
+
debug({ CommandID: options.Command.id });
|
|
7
|
+
if (env.getBoolean('OCLIF_DISABLE_UPDATENOTIFIER')) {
|
|
8
|
+
debug('found: OCLIF_DISABLE_UPDATENOTIFIER=true');
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
if (!isOutputEnabled)
|
|
12
|
+
return;
|
|
13
|
+
if (['plugins:install', 'plugins:uninstall'].includes(options.Command.id)) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (['plugins:update', 'plugins:update:check', 'update'].includes(options.Command.id)) {
|
|
17
|
+
await this.config.runHook('updatenotifier', {
|
|
18
|
+
updateCheckInterval: 0,
|
|
19
|
+
spawnOptions: { detached: false, stdio: 'ignore' },
|
|
20
|
+
defer: false,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
await this.config.runHook('updatenotifier', {
|
|
25
|
+
spawnOptions: { detached: true, stdio: 'ignore' },
|
|
26
|
+
defer: true,
|
|
27
|
+
});
|
|
11
28
|
}
|
|
12
29
|
};
|
|
13
|
-
exports.postrun = postrun;
|
|
14
30
|
//# sourceMappingURL=prerun.js.map
|
package/lib/hooks/prerun.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prerun.js","sourceRoot":"","sources":["../../src/hooks/prerun.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prerun.js","sourceRoot":"","sources":["../../src/hooks/prerun.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,MAAM,eAAe,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;AAE9F,MAAM,CAAC,MAAM,MAAM,GAAmB,KAAK,WAAW,OAAO;IAC3D,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,4CAA4C,CAAC,CAAC;IACpF,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;IAEzC,IAAI,GAAG,CAAC,UAAU,CAAC,8BAA8B,CAAC,EAAE;QAClD,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAClD,OAAO;KACR;IAED,IAAI,CAAC,eAAe;QAAE,OAAO;IAE7B,IAAI,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE;QACzE,OAAO;KACR;IAED,IAAI,CAAC,gBAAgB,EAAE,sBAAsB,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE;QACrF,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,gBAAgB,EAAE;YAC1C,mBAAmB,EAAE,CAAC;YACtB,YAAY,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE;YAClD,KAAK,EAAE,KAAK;SACb,CAAC,CAAC;KACJ;SAAM;QACL,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,gBAAgB,EAAE;YAC1C,YAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE;YACjD,KAAK,EAAE,IAAI;SACZ,CAAC,CAAC;KACJ;AACH,CAAC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Hook } from '@oclif/
|
|
1
|
+
import { Hook } from '@oclif/core';
|
|
2
2
|
export declare const updateNotifier: Hook<'updateNotifier'>;
|
|
@@ -1,35 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2022, jayree
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
*/
|
|
7
|
+
import { CliUx } from '@oclif/core';
|
|
8
|
+
import chalk from 'chalk';
|
|
9
|
+
import Debug from 'debug';
|
|
10
|
+
import { multiUpdateNotifier } from '../lib/multiUpdateNotifier.js';
|
|
11
|
+
export const updateNotifier = async function (options) {
|
|
12
|
+
const debug = Debug(`${this.config.bin}:oclif-plugin-update-notifier:hooks:updatenotifier`);
|
|
13
|
+
if (!options.spawnOptions.detached)
|
|
14
|
+
CliUx.ux.action.start('check for updates');
|
|
12
15
|
if (debug.enabled)
|
|
13
|
-
options
|
|
14
|
-
const notifier = new
|
|
15
|
-
updateCheckInterval: options
|
|
16
|
-
spawnOptions: options
|
|
17
|
-
defer: options
|
|
18
|
-
changeLogUrl: options['changeLogUrl'],
|
|
16
|
+
options.spawnOptions.stdio = 'inherit';
|
|
17
|
+
const notifier = new multiUpdateNotifier(this.config, {
|
|
18
|
+
updateCheckInterval: options.updateCheckInterval,
|
|
19
|
+
spawnOptions: options.spawnOptions,
|
|
20
|
+
defer: options.defer,
|
|
19
21
|
});
|
|
20
22
|
await notifier.check();
|
|
21
23
|
if (notifier.updates.length > 0) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
if (options.changeLogUrl) {
|
|
25
|
+
notifier.updates.forEach((update) => {
|
|
26
|
+
if (options.changeLogUrl[update.name]) {
|
|
27
|
+
update.changeLogUrl = options.changeLogUrl[update.name];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
if (options.ignoreDistTags)
|
|
32
|
+
notifier.updates = notifier.updates.filter((update) => !options.ignoreDistTags.includes(update.distTag));
|
|
28
33
|
const header = chalk.bold(`${this.config.bin}-plugin update${notifier.updates.length > 1 ? 's' : ''} available!`);
|
|
29
|
-
if (!options
|
|
30
|
-
|
|
31
|
-
notifier.notify({ header, defer: options
|
|
34
|
+
if (!options.spawnOptions.detached)
|
|
35
|
+
CliUx.ux.action.stop();
|
|
36
|
+
notifier.notify({ header, defer: options.defer });
|
|
32
37
|
}
|
|
33
38
|
};
|
|
34
|
-
exports.updateNotifier = updateNotifier;
|
|
35
39
|
//# sourceMappingURL=updatenotifier.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updatenotifier.js","sourceRoot":"","sources":["../../src/hooks/updatenotifier.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"updatenotifier.js","sourceRoot":"","sources":["../../src/hooks/updatenotifier.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAQ,KAAK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E,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;QAE3G,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,iBAAiB,QAAQ,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC;QAClH,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,QAAQ;YAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAC3D,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;KACnD;AACH,CAAC,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
1
|
/*
|
|
4
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2022, jayree
|
|
5
3
|
* All rights reserved.
|
|
6
4
|
* Licensed under the BSD 3-Clause license.
|
|
7
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
8
6
|
*/
|
|
9
|
-
|
|
7
|
+
export default {};
|
|
10
8
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAe,EAAE,CAAC"}
|
package/lib/lib/check.js
CHANGED
|
@@ -1,24 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
1
|
/*
|
|
4
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2022, jayree
|
|
5
3
|
* All rights reserved.
|
|
6
4
|
* Licensed under the BSD 3-Clause license.
|
|
7
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
8
6
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const util = require("./checkutils");
|
|
13
|
-
const debug = Debug('pluginUpdateNotifier:check');
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
7
|
+
import process from 'node:process';
|
|
8
|
+
import { fetchInfo } from './fetchInfo.js';
|
|
9
|
+
// https://github.com/yeoman/update-notifier/blob/3046d0f61a57f8270291b6ab271f8a12df8421a6/check.js#L7
|
|
15
10
|
(async () => {
|
|
16
11
|
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
17
|
-
setTimeout(process.exit, 1000 *
|
|
18
|
-
await
|
|
12
|
+
setTimeout(process.exit, 1000 * 30);
|
|
13
|
+
await fetchInfo(JSON.parse(process.argv[2]));
|
|
19
14
|
process.exit();
|
|
20
15
|
})().catch((error) => {
|
|
21
|
-
|
|
16
|
+
console.error(error);
|
|
22
17
|
process.exit(1);
|
|
23
18
|
});
|
|
24
19
|
//# sourceMappingURL=check.js.map
|
package/lib/lib/check.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../src/lib/check.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../src/lib/check.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,SAAS,EAAW,MAAM,gBAAgB,CAAC;AAEpD,sGAAsG;AACtG,CAAC,KAAK,IAAmB,EAAE;IACzB,6DAA6D;IAC7D,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;IACpC,MAAM,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAY,CAAC,CAAC;IACxD,OAAO,CAAC,IAAI,EAAE,CAAC;AACjB,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
import { SpawnOptions } from 'node:child_process';
|
|
3
|
+
import { Plugin } from '@oclif/core/lib/interfaces/index.js';
|
|
4
|
+
export declare type Options = {
|
|
5
|
+
spawnOptions: SpawnOptions;
|
|
6
|
+
defer: boolean;
|
|
7
|
+
pkg: Plugin;
|
|
8
|
+
baseFolder: string;
|
|
9
|
+
};
|
|
10
|
+
export declare type PkgUpdate = {
|
|
11
|
+
[distTag: string]: {
|
|
12
|
+
latest: string;
|
|
13
|
+
current: string;
|
|
14
|
+
type: string;
|
|
15
|
+
name: string;
|
|
16
|
+
changeLogUrl: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare function fetchInfo(options: Options): Promise<void>;
|