jetcheck 1.0.3 → 1.0.4
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/bin/index.js +15 -0
- package/index.js +5 -6
- package/package.json +1 -1
package/bin/index.js
CHANGED
|
@@ -12,6 +12,21 @@ const configFile = path.resolve(
|
|
|
12
12
|
process.cwd(),
|
|
13
13
|
process.env.CONFIG || `${os.homedir()}/.jetcheck/config.js`
|
|
14
14
|
)
|
|
15
|
+
|
|
16
|
+
sc.command('version', {
|
|
17
|
+
desc: 'Run the check',
|
|
18
|
+
callback: async function (options) {
|
|
19
|
+
const kernel = new jetcheck({ })
|
|
20
|
+
console.log(`Jetcheck v${kernel.version}\n`)
|
|
21
|
+
console.log(`Program under GPL-3.0 license`)
|
|
22
|
+
console.log(`(c) ${new Date().getFullYear()} Michael VERGOZ`)
|
|
23
|
+
console.log(`And other components:`)
|
|
24
|
+
console.log(Object.keys(kernel.packages).map((key)=>{
|
|
25
|
+
return(` - ${key}=${kernel.packages[key]}`)
|
|
26
|
+
}).join("\n"))
|
|
27
|
+
}
|
|
28
|
+
})
|
|
29
|
+
|
|
15
30
|
require("./systemd")(jetcheck, sc, configFile)
|
|
16
31
|
require("./run")(jetcheck, sc, configFile)
|
|
17
32
|
|
package/index.js
CHANGED
|
@@ -9,16 +9,15 @@ class jetcheck {
|
|
|
9
9
|
this.options = options || {}
|
|
10
10
|
this.events = new aevent()
|
|
11
11
|
this.lib = require("./lib")
|
|
12
|
+
this.version = pack.version
|
|
12
13
|
this.packages = {}
|
|
13
14
|
|
|
14
|
-
this.packageInfo(pack
|
|
15
|
+
this.packageInfo(pack)
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
packageInfo(pkg
|
|
18
|
-
var buffer = [`version=${pkg.version} -`]
|
|
18
|
+
packageInfo(pkg) {
|
|
19
19
|
for (var key in pkg.dependencies)
|
|
20
|
-
|
|
21
|
-
this.packages[pkg.name] = pkg
|
|
20
|
+
this.packages[key] = pkg.dependencies[key]
|
|
22
21
|
}
|
|
23
22
|
|
|
24
23
|
async sleep(ms) {
|
|
@@ -26,7 +25,7 @@ class jetcheck {
|
|
|
26
25
|
}
|
|
27
26
|
|
|
28
27
|
async start(overwrite) {
|
|
29
|
-
|
|
28
|
+
|
|
30
29
|
|
|
31
30
|
// load configuration
|
|
32
31
|
if (this.options.configFile) {
|