homebridge 2.0.0-beta.12 → 2.0.0-beta.13

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/homebridge CHANGED
@@ -1,19 +1,22 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  //
4
- // This executable sets up the environment and runs the HomeBridge CLI.
4
+ // This executable sets up the environment and runs the Homebridge CLI.
5
5
  //
6
6
 
7
7
  import { realpathSync } from 'node:fs'
8
8
  import { dirname, join } from 'node:path'
9
9
  import process from 'node:process'
10
- import { fileURLToPath } from 'node:url'
10
+ import { fileURLToPath, pathToFileURL } from 'node:url'
11
11
 
12
12
  process.title = 'homebridge'
13
13
 
14
- // Find the HomeBridge lib
14
+ // Find the Homebridge lib
15
15
  const __filename = fileURLToPath(import.meta.url)
16
16
  const lib = join(dirname(realpathSync(__filename)), '../dist')
17
17
 
18
- // Run HomeBridge
19
- import(`${lib}/cli.js`).then(({ default: run }) => run())
18
+ // Convert the path to a file URL
19
+ const libUrl = pathToFileURL(join(lib, 'cli.js')).href
20
+
21
+ // Run Homebridge
22
+ import(libUrl).then(({ default: run }) => run())
package/dist/plugin.js CHANGED
@@ -136,13 +136,13 @@ export class Plugin {
136
136
  const context = this.loadContext;
137
137
  assert(context, 'Reached illegal state. Plugin state is undefined!');
138
138
  this.loadContext = undefined; // free up memory
139
- // pluck out the HomeBridge version requirement
139
+ // pluck out the Homebridge version requirement
140
140
  if (!context.engines || !context.engines.homebridge) {
141
141
  throw new Error(`Plugin ${this.pluginPath} does not contain the 'homebridge' package in 'engines'.`);
142
142
  }
143
143
  const versionRequired = context.engines.homebridge;
144
144
  const nodeVersionRequired = context.engines.node;
145
- // make sure the version is satisfied by the currently running version of HomeBridge
145
+ // make sure the version is satisfied by the currently running version of Homebridge
146
146
  if (!satisfies(getVersion(), versionRequired, { includePrerelease: true })) {
147
147
  // TODO - change this back to an error
148
148
  log.warn(`The plugin "${this.pluginName}" requires a Homebridge version of ${versionRequired} which does \
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "homebridge",
3
3
  "type": "module",
4
- "version": "2.0.0-beta.12",
4
+ "version": "2.0.0-beta.13",
5
5
  "description": "HomeKit support for the impatient",
6
6
  "author": "Nick Farina",
7
7
  "license": "Apache-2.0",
@@ -57,7 +57,7 @@
57
57
  "source-map-support": "0.5.21"
58
58
  },
59
59
  "devDependencies": {
60
- "@antfu/eslint-config": "^2.27.3",
60
+ "@antfu/eslint-config": "^3.0.0",
61
61
  "@types/debug": "^4.1.12",
62
62
  "@types/fs-extra": "^11.0.4",
63
63
  "@types/node": "^22.5.1",