hb-nb-tools 1.0.1 → 1.1.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 CHANGED
@@ -1,3 +1,5 @@
1
+ <span align="center">
2
+
1
3
  # Homebridge NB Tools
2
4
  [![Downloads](https://img.shields.io/npm/dt/hb-nb-tools.svg)](https://www.npmjs.com/package/hb-nb-tools)
3
5
  [![Version](https://img.shields.io/npm/v/hb-nb-tools.svg)](https://www.npmjs.com/package/hb-nb-tools)
package/cli/nb.js CHANGED
@@ -8,5 +8,6 @@
8
8
  'use strict'
9
9
 
10
10
  const { NbTool } = require('../index')
11
+ const pkgJson = require('../package.json')
11
12
 
12
- new NbTool(require('../package.json')).main()
13
+ new NbTool(pkgJson).main()
package/lib/NbClient.js CHANGED
@@ -143,7 +143,7 @@ class NbClient extends HttpClient {
143
143
  this._params.token = response.body.token
144
144
  return response.body.token
145
145
  }
146
- throw new Error('Nuki bridge button not pressed')
146
+ return null
147
147
  }
148
148
 
149
149
  async info () { return this._get('/info') }
package/lib/NbTool.js CHANGED
@@ -9,7 +9,6 @@ const NbClient = require('./NbClient')
9
9
  const NbDiscovery = require('./NbDiscovery')
10
10
  const NbListener = require('./NbListener')
11
11
  const hbLibTools = require('hb-lib-tools')
12
- const packageJson = require('../package.json')
13
12
 
14
13
  const { CommandLineParser, CommandLineTool, JsonFormatter, OptionParser } = hbLibTools
15
14
  const { b, u } = CommandLineTool
@@ -416,7 +415,7 @@ class NbTool extends CommandLineTool {
416
415
  }
417
416
  this.name = 'nb ' + clargs.command
418
417
  this.usage = `${b('nb')} ${usage[clargs.command]}`
419
- this.parser = new CommandLineParser(packageJson)
418
+ this.parser = new CommandLineParser(this.pkgJson)
420
419
  this.parser.help('h', 'help', help[clargs.command])
421
420
  await this[clargs.command](clargs.args)
422
421
  } catch (error) {
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "hb-nb-tools",
3
- "description": "Homebridge NB Command-Line Tools",
3
+ "description": "Homebridge NB Tools",
4
4
  "author": "Erik Baauw",
5
5
  "license": "Apache-2.0",
6
- "version": "1.0.1",
6
+ "version": "1.1.1",
7
7
  "keywords": [
8
8
  "nuki",
9
9
  "smart-lock",
@@ -17,7 +17,7 @@
17
17
  "node": "^18.16.0"
18
18
  },
19
19
  "dependencies": {
20
- "hb-lib-tools": "~1.0.7"
20
+ "hb-lib-tools": "~1.0.9"
21
21
  },
22
22
  "optionalDependencies": {
23
23
  "sodium-plus": "~0.9.0"