homebridge 2.0.0-beta.11 → 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.
Files changed (110) hide show
  1. package/README.md +16 -17
  2. package/bin/homebridge +14 -9
  3. package/config-sample.json +3 -3
  4. package/{lib → dist}/api.d.ts +23 -40
  5. package/dist/api.d.ts.map +1 -0
  6. package/{lib → dist}/api.js +38 -64
  7. package/dist/api.js.map +1 -0
  8. package/{lib → dist}/bridgeService.d.ts +10 -9
  9. package/dist/bridgeService.d.ts.map +1 -0
  10. package/{lib → dist}/bridgeService.js +79 -115
  11. package/dist/bridgeService.js.map +1 -0
  12. package/{lib → dist}/childBridgeFork.d.ts +4 -3
  13. package/dist/childBridgeFork.d.ts.map +1 -0
  14. package/{lib → dist}/childBridgeFork.js +38 -41
  15. package/dist/childBridgeFork.js.map +1 -0
  16. package/{lib → dist}/childBridgeService.d.ts +10 -7
  17. package/dist/childBridgeService.d.ts.map +1 -0
  18. package/{lib → dist}/childBridgeService.js +86 -65
  19. package/dist/childBridgeService.js.map +1 -0
  20. package/dist/cli.d.ts +3 -0
  21. package/dist/cli.d.ts.map +1 -0
  22. package/dist/cli.js +89 -0
  23. package/dist/cli.js.map +1 -0
  24. package/{lib → dist}/externalPortService.d.ts +2 -2
  25. package/{lib → dist}/externalPortService.d.ts.map +1 -1
  26. package/{lib → dist}/externalPortService.js +4 -9
  27. package/dist/externalPortService.js.map +1 -0
  28. package/{lib → dist}/index.d.ts +29 -29
  29. package/dist/index.d.ts.map +1 -0
  30. package/dist/index.js +19 -0
  31. package/dist/index.js.map +1 -0
  32. package/{lib → dist}/ipcService.d.ts +2 -5
  33. package/dist/ipcService.d.ts.map +1 -0
  34. package/{lib → dist}/ipcService.js +12 -12
  35. package/dist/ipcService.js.map +1 -0
  36. package/{lib → dist}/logger.d.ts +6 -6
  37. package/dist/logger.d.ts.map +1 -0
  38. package/{lib → dist}/logger.js +19 -28
  39. package/dist/logger.js.map +1 -0
  40. package/{lib → dist}/platformAccessory.d.ts +7 -6
  41. package/dist/platformAccessory.d.ts.map +1 -0
  42. package/{lib → dist}/platformAccessory.js +12 -16
  43. package/dist/platformAccessory.js.map +1 -0
  44. package/{lib → dist}/plugin.d.ts +2 -2
  45. package/dist/plugin.d.ts.map +1 -0
  46. package/{lib → dist}/plugin.js +40 -50
  47. package/dist/plugin.js.map +1 -0
  48. package/{lib → dist}/pluginManager.d.ts +3 -3
  49. package/dist/pluginManager.d.ts.map +1 -0
  50. package/{lib → dist}/pluginManager.js +72 -78
  51. package/dist/pluginManager.js.map +1 -0
  52. package/dist/server.d.ts.map +1 -0
  53. package/{lib → dist}/server.js +89 -116
  54. package/dist/server.js.map +1 -0
  55. package/{lib → dist}/storageService.d.ts.map +1 -1
  56. package/dist/storageService.js +41 -0
  57. package/dist/storageService.js.map +1 -0
  58. package/{lib → dist}/user.d.ts.map +1 -1
  59. package/dist/user.js +29 -0
  60. package/dist/user.js.map +1 -0
  61. package/{lib → dist}/util/mac.d.ts +1 -0
  62. package/dist/util/mac.d.ts.map +1 -0
  63. package/dist/util/mac.js +14 -0
  64. package/dist/util/mac.js.map +1 -0
  65. package/dist/version.d.ts.map +1 -0
  66. package/dist/version.js +16 -0
  67. package/dist/version.js.map +1 -0
  68. package/package.json +40 -42
  69. package/lib/api.d.ts.map +0 -1
  70. package/lib/api.js.map +0 -1
  71. package/lib/bridgeService.d.ts.map +0 -1
  72. package/lib/bridgeService.js.map +0 -1
  73. package/lib/childBridgeFork.d.ts.map +0 -1
  74. package/lib/childBridgeFork.js.map +0 -1
  75. package/lib/childBridgeService.d.ts.map +0 -1
  76. package/lib/childBridgeService.js.map +0 -1
  77. package/lib/cli.d.ts +0 -4
  78. package/lib/cli.d.ts.map +0 -1
  79. package/lib/cli.js +0 -111
  80. package/lib/cli.js.map +0 -1
  81. package/lib/externalPortService.js.map +0 -1
  82. package/lib/index.d.ts.map +0 -1
  83. package/lib/index.js +0 -72
  84. package/lib/index.js.map +0 -1
  85. package/lib/ipcService.d.ts.map +0 -1
  86. package/lib/ipcService.js.map +0 -1
  87. package/lib/logger.d.ts.map +0 -1
  88. package/lib/logger.js.map +0 -1
  89. package/lib/platformAccessory.d.ts.map +0 -1
  90. package/lib/platformAccessory.js.map +0 -1
  91. package/lib/plugin.d.ts.map +0 -1
  92. package/lib/plugin.js.map +0 -1
  93. package/lib/pluginManager.d.ts.map +0 -1
  94. package/lib/pluginManager.js.map +0 -1
  95. package/lib/server.d.ts.map +0 -1
  96. package/lib/server.js.map +0 -1
  97. package/lib/storageService.js +0 -70
  98. package/lib/storageService.js.map +0 -1
  99. package/lib/user.js +0 -36
  100. package/lib/user.js.map +0 -1
  101. package/lib/util/mac.d.ts.map +0 -1
  102. package/lib/util/mac.js +0 -20
  103. package/lib/util/mac.js.map +0 -1
  104. package/lib/version.d.ts.map +0 -1
  105. package/lib/version.js +0 -21
  106. package/lib/version.js.map +0 -1
  107. /package/{lib → dist}/server.d.ts +0 -0
  108. /package/{lib → dist}/storageService.d.ts +0 -0
  109. /package/{lib → dist}/user.d.ts +0 -0
  110. /package/{lib → dist}/version.d.ts +0 -0
@@ -1,13 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PlatformAccessory = exports.PlatformAccessoryEvent = void 0;
4
- const events_1 = require("events");
5
- const hap_nodejs_1 = require("hap-nodejs");
6
- var PlatformAccessoryEvent;
1
+ import { EventEmitter } from 'node:events';
2
+ import { Accessory, } from 'hap-nodejs';
3
+ // eslint-disable-next-line no-restricted-syntax
4
+ export var PlatformAccessoryEvent;
7
5
  (function (PlatformAccessoryEvent) {
8
6
  PlatformAccessoryEvent["IDENTIFY"] = "identify";
9
- })(PlatformAccessoryEvent || (exports.PlatformAccessoryEvent = PlatformAccessoryEvent = {}));
10
- class PlatformAccessory extends events_1.EventEmitter {
7
+ })(PlatformAccessoryEvent || (PlatformAccessoryEvent = {}));
8
+ // eslint-disable-next-line ts/no-unsafe-declaration-merging
9
+ export class PlatformAccessory extends EventEmitter {
11
10
  // somewhat ugly way to inject custom Accessory object, while not changing the publicly exposed constructor signature
12
11
  static injectedAccessory;
13
12
  _associatedPlugin; // present as soon as it is registered
@@ -27,7 +26,7 @@ class PlatformAccessory extends events_1.EventEmitter {
27
26
  super();
28
27
  this._associatedHAPAccessory = PlatformAccessory.injectedAccessory
29
28
  ? PlatformAccessory.injectedAccessory
30
- : new hap_nodejs_1.Accessory(displayName, uuid);
29
+ : new Accessory(displayName, uuid);
31
30
  if (category) {
32
31
  this._associatedHAPAccessory.category = category;
33
32
  }
@@ -37,10 +36,8 @@ class PlatformAccessory extends events_1.EventEmitter {
37
36
  this.services = this._associatedHAPAccessory.services;
38
37
  // forward identify event
39
38
  this._associatedHAPAccessory.on("identify" /* AccessoryEventTypes.IDENTIFY */, (paired, callback) => {
40
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
41
- // @ts-ignore
42
- // eslint-disable-next-line @typescript-eslint/no-empty-function
43
- this.emit("identify" /* PlatformAccessoryEvent.IDENTIFY */, paired, () => { }); // empty callback for backwards compatibility
39
+ // @ts-expect-error: empty callback for backwards compatibility
40
+ this.emit("identify" /* PlatformAccessoryEvent.IDENTIFY */, paired, () => { });
44
41
  callback();
45
42
  });
46
43
  }
@@ -83,11 +80,11 @@ class PlatformAccessory extends events_1.EventEmitter {
83
80
  plugin: accessory._associatedPlugin,
84
81
  platform: accessory._associatedPlatform,
85
82
  context: accessory.context,
86
- ...hap_nodejs_1.Accessory.serialize(accessory._associatedHAPAccessory),
83
+ ...Accessory.serialize(accessory._associatedHAPAccessory),
87
84
  };
88
85
  }
89
86
  static deserialize(json) {
90
- const accessory = hap_nodejs_1.Accessory.deserialize(json);
87
+ const accessory = Accessory.deserialize(json);
91
88
  PlatformAccessory.injectedAccessory = accessory;
92
89
  const platformAccessory = new PlatformAccessory(accessory.displayName, accessory.UUID);
93
90
  PlatformAccessory.injectedAccessory = undefined;
@@ -98,5 +95,4 @@ class PlatformAccessory extends events_1.EventEmitter {
98
95
  return platformAccessory;
99
96
  }
100
97
  }
101
- exports.PlatformAccessory = PlatformAccessory;
102
98
  //# sourceMappingURL=platformAccessory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platformAccessory.js","sourceRoot":"","sources":["../src/platformAccessory.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1C,OAAO,EACL,SAAS,GAGV,MAAM,YAAY,CAAA;AAYnB,gDAAgD;AAChD,MAAM,CAAN,IAAkB,sBAEjB;AAFD,WAAkB,sBAAsB;IACtC,+CAAqB,CAAA;AACvB,CAAC,EAFiB,sBAAsB,KAAtB,sBAAsB,QAEvC;AAWD,4DAA4D;AAC5D,MAAM,OAAO,iBAA6D,SAAQ,YAAY;IAC5F,qHAAqH;IAC7G,MAAM,CAAC,iBAAiB,CAAY;IAE5C,iBAAiB,CAAmB,CAAC,sCAAsC;IAC3E,mBAAmB,CAAe,CAAC,uCAAuC;IAE1E,uBAAuB,CAAW;IAElC,yDAAyD;IACzD,WAAW,CAAQ;IACnB,IAAI,CAAQ;IACZ,QAAQ,CAAY;IACpB,QAAQ,GAAc,EAAE,CAAA;IACxB,yDAAyD;IAEzD;;OAEG;IACI,OAAO,GAAM,EAAO,CAAA,CAAC,+BAA+B;IAE3D,YAAY,WAAmB,EAAE,IAAY,EAAE,QAAqB;QAClE,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,uBAAuB,GAAG,iBAAiB,CAAC,iBAAiB;YAChE,CAAC,CAAC,iBAAiB,CAAC,iBAAiB;YACrC,CAAC,CAAC,IAAI,SAAS,CAAC,WAAW,EAAE,IAAI,CAAC,CAAA;QAEpC,IAAI,QAAQ,EAAE,CAAC;YACb,IAAI,CAAC,uBAAuB,CAAC,QAAQ,GAAG,QAAQ,CAAA;QAClD,CAAC;QAED,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,uBAAuB,CAAC,WAAW,CA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ED,UAAU;IACV,MAAM,CAAC,SAAS,CAAC,SAA4B;QAC3C,OAAO;YACL,MAAM,EAAE,SAAS,CAAC,iBAAkB;YACpC,QAAQ,EAAE,SAAS,CAAC,mBAAoB;YACxC,OAAO,EAAE,SAAS,CAAC,OAAO;YAC1B,GAAG,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,uBAAuB,CAAC;SAC1D,CAAA;IACH,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,IAAiC;QAClD,MAAM,SAAS,GAAG,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;QAE7C,iBAAiB,CAAC,iBAAiB,GAAG,SAAS,CAAA;QAC/C,MAAM,iBAAiB,GAAG,IAAI,iBAAiB,CAAC,SAAS,CAAC,WAAW,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;QACtF,iBAAiB,CAAC,iBAAiB,GAAG,SAAS,CAAA;QAE/C,iBAAiB,CAAC,iBAAiB,GAAG,IAAI,CAAC,MAAM,CAAA;QACjD,iBAAiB,CAAC,mBAAmB,GAAG,IAAI,CAAC,QAAQ,CAAA;QACrD,iBAAiB,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;QACxC,iBAAiB,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAA;QAE1C,OAAO,iBAAiB,CAAA;IAC1B,CAAC;CACF"}
@@ -1,5 +1,5 @@
1
- import { AccessoryIdentifier, AccessoryName, AccessoryPluginConstructor, API, PlatformIdentifier, PlatformName, DynamicPlatformPlugin, PlatformPluginConstructor, PluginIdentifier, PluginName } from "./api";
2
- import { PackageJSON } from "./pluginManager";
1
+ import type { AccessoryIdentifier, AccessoryName, AccessoryPluginConstructor, API, DynamicPlatformPlugin, PlatformIdentifier, PlatformName, PlatformPluginConstructor, PluginIdentifier, PluginName } from './api.js';
2
+ import type { PackageJSON } from './pluginManager.js';
3
3
  /**
4
4
  * Represents a loaded Homebridge plugin.
5
5
  */
@@ -0,0 +1 @@
1
+ {"version":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sBAAsB,CAAC,kBAAkB,EAAE,kBAAkB,GAAG,YAAY,GAAG,yBAAyB;IAiBxG,qBAAqB,CAAC,kBAAkB,EAAE,kBAAkB,GAAG,YAAY,EAAE,cAAc,EAAE,qBAAqB,GAAG,IAAI;IAczH,wBAAwB,CAAC,YAAY,EAAE,YAAY,GAAG,qBAAqB,GAAG,SAAS;IAMjF,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAmD3B,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAOlD"}
@@ -1,23 +1,16 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Plugin = void 0;
7
- const assert_1 = __importDefault(require("assert"));
8
- const path_1 = __importDefault(require("path"));
9
- const url_1 = require("url");
10
- const semver_1 = require("semver");
11
- const logger_1 = require("./logger");
12
- const pluginManager_1 = require("./pluginManager");
13
- const version_1 = __importDefault(require("./version"));
14
- const log = logger_1.Logger.internal;
15
- // Workaround for https://github.com/microsoft/TypeScript/issues/43329
16
- const _importDynamic = new Function("modulePath", "return import(modulePath)");
1
+ import assert from 'node:assert';
2
+ import path from 'node:path';
3
+ import process from 'node:process';
4
+ import { pathToFileURL } from 'node:url';
5
+ import { satisfies } from 'semver';
6
+ import { Logger } from './logger.js';
7
+ import { PluginManager } from './pluginManager.js';
8
+ import getVersion from './version.js';
9
+ const log = Logger.internal;
17
10
  /**
18
11
  * Represents a loaded Homebridge plugin.
19
12
  */
20
- class Plugin {
13
+ export class Plugin {
21
14
  pluginName;
22
15
  scope; // npm package scope
23
16
  pluginPath; // like "/usr/local/lib/node_modules/homebridge-lockitron"
@@ -36,20 +29,20 @@ class Plugin {
36
29
  this.pluginName = name;
37
30
  this.scope = scope;
38
31
  this.pluginPath = path;
39
- this.version = packageJSON.version || "0.0.0";
40
- this.main = "";
32
+ this.version = packageJSON.version || '0.0.0';
33
+ this.main = '';
41
34
  // figure out the main module
42
35
  // exports is available - https://nodejs.org/dist/latest-v14.x/docs/api/packages.html#packages_package_entry_points
43
36
  if (packageJSON.exports) {
44
37
  // main entrypoint - https://nodejs.org/dist/latest-v14.x/docs/api/packages.html#packages_main_entry_point_export
45
- if (typeof packageJSON.exports === "string") {
38
+ if (typeof packageJSON.exports === 'string') {
46
39
  this.main = packageJSON.exports;
47
40
  }
48
41
  else { // subpath export - https://nodejs.org/dist/latest-v14.x/docs/api/packages.html#packages_subpath_exports
49
42
  // conditional exports - https://nodejs.org/dist/latest-v14.x/docs/api/packages.html#packages_conditional_exports
50
- const exports = packageJSON.exports.import || packageJSON.exports.require || packageJSON.exports.node || packageJSON.exports.default || packageJSON.exports["."];
43
+ const exports = packageJSON.exports.import || packageJSON.exports.require || packageJSON.exports.node || packageJSON.exports.default || packageJSON.exports['.'];
51
44
  // check if conditional export is nested
52
- if (typeof exports !== "string") {
45
+ if (typeof exports !== 'string') {
53
46
  if (exports.import) {
54
47
  this.main = exports.import;
55
48
  }
@@ -64,10 +57,10 @@ class Plugin {
64
57
  }
65
58
  // exports search was not successful, fallback to package.main, using index.js as fallback
66
59
  if (!this.main) {
67
- this.main = packageJSON.main || "./index.js";
60
+ this.main = packageJSON.main || './index.js';
68
61
  }
69
62
  // check if it is an ESM module
70
- this.isESM = this.main.endsWith(".mjs") || (this.main.endsWith(".js") && packageJSON.type === "module");
63
+ this.isESM = this.main.endsWith('.mjs') || (this.main.endsWith('.js') && packageJSON.type === 'module');
71
64
  // very temporary fix for first wave of plugins
72
65
  if (packageJSON.peerDependencies && (!packageJSON.engines || !packageJSON.engines.homebridge)) {
73
66
  packageJSON.engines = packageJSON.engines || {};
@@ -79,7 +72,7 @@ class Plugin {
79
72
  };
80
73
  }
81
74
  getPluginIdentifier() {
82
- return (this.scope ? this.scope + "/" : "") + this.pluginName;
75
+ return (this.scope ? `${this.scope}/` : '') + this.pluginName;
83
76
  }
84
77
  getPluginPath() {
85
78
  return this.pluginPath;
@@ -89,7 +82,7 @@ class Plugin {
89
82
  throw new Error(`Plugin '${this.getPluginIdentifier()}' tried to register an accessory '${name}' which has already been registered!`);
90
83
  }
91
84
  if (!this.disabled) {
92
- log.info("Registering accessory '%s'", this.getPluginIdentifier() + "." + name);
85
+ log.info('Registering accessory \'%s\'', `${this.getPluginIdentifier()}.${name}`);
93
86
  }
94
87
  this.registeredAccessories.set(name, constructor);
95
88
  }
@@ -98,12 +91,12 @@ class Plugin {
98
91
  throw new Error(`Plugin '${this.getPluginIdentifier()}' tried to register a platform '${name}' which has already been registered!`);
99
92
  }
100
93
  if (!this.disabled) {
101
- log.info("Registering platform '%s'", this.getPluginIdentifier() + "." + name);
94
+ log.info('Registering platform \'%s\'', `${this.getPluginIdentifier()}.${name}`);
102
95
  }
103
96
  this.registeredPlatforms.set(name, constructor);
104
97
  }
105
98
  getAccessoryConstructor(accessoryIdentifier) {
106
- const name = pluginManager_1.PluginManager.getAccessoryName(accessoryIdentifier);
99
+ const name = PluginManager.getAccessoryName(accessoryIdentifier);
107
100
  const constructor = this.registeredAccessories.get(name);
108
101
  if (!constructor) {
109
102
  throw new Error(`The requested accessory '${name}' was not registered by the plugin '${this.getPluginIdentifier()}'.`);
@@ -111,20 +104,20 @@ class Plugin {
111
104
  return constructor;
112
105
  }
113
106
  getPlatformConstructor(platformIdentifier) {
114
- const name = pluginManager_1.PluginManager.getPlatformName(platformIdentifier);
107
+ const name = PluginManager.getPlatformName(platformIdentifier);
115
108
  const constructor = this.registeredPlatforms.get(name);
116
109
  if (!constructor) {
117
110
  throw new Error(`The requested platform '${name}' was not registered by the plugin '${this.getPluginIdentifier()}'.`);
118
111
  }
119
112
  // If it's a dynamic platform plugin, ensure it's not enabled multiple times.
120
113
  if (this.activeDynamicPlatforms.has(name)) {
121
- throw new Error("The dynamic platform " + name + " from the plugin " + this.getPluginIdentifier() + " is configured " +
122
- "times in your config.json.");
114
+ throw new Error(`The dynamic platform ${name} from the plugin ${this.getPluginIdentifier()} is configured `
115
+ + `times in your config.json.`);
123
116
  }
124
117
  return constructor;
125
118
  }
126
119
  assignDynamicPlatform(platformIdentifier, platformPlugin) {
127
- const name = pluginManager_1.PluginManager.getPlatformName(platformIdentifier);
120
+ const name = PluginManager.getPlatformName(platformIdentifier);
128
121
  let platforms = this.activeDynamicPlatforms.get(name);
129
122
  if (!platforms) {
130
123
  platforms = [];
@@ -141,43 +134,41 @@ class Plugin {
141
134
  }
142
135
  async load() {
143
136
  const context = this.loadContext;
144
- (0, assert_1.default)(context, "Reached illegal state. Plugin state is undefined!");
137
+ assert(context, 'Reached illegal state. Plugin state is undefined!');
145
138
  this.loadContext = undefined; // free up memory
146
- // pluck out the HomeBridge version requirement
139
+ // pluck out the Homebridge version requirement
147
140
  if (!context.engines || !context.engines.homebridge) {
148
141
  throw new Error(`Plugin ${this.pluginPath} does not contain the 'homebridge' package in 'engines'.`);
149
142
  }
150
143
  const versionRequired = context.engines.homebridge;
151
144
  const nodeVersionRequired = context.engines.node;
152
- // make sure the version is satisfied by the currently running version of HomeBridge
153
- if (!(0, semver_1.satisfies)((0, version_1.default)(), versionRequired, { includePrerelease: true })) {
145
+ // make sure the version is satisfied by the currently running version of Homebridge
146
+ if (!satisfies(getVersion(), versionRequired, { includePrerelease: true })) {
154
147
  // TODO - change this back to an error
155
- log.error(`The plugin "${this.pluginName}" requires a Homebridge version of ${versionRequired} which does \
156
- not satisfy the current Homebridge version of ${(0, version_1.default)()}. You may need to update this plugin (or Homebridge) to a newer version. \
148
+ log.warn(`The plugin "${this.pluginName}" requires a Homebridge version of ${versionRequired} which does \
149
+ not satisfy the current Homebridge version of v${getVersion()}. You may need to update this plugin (or Homebridge) to a newer version. \
157
150
  You may face unexpected issues or stability problems running this plugin.`);
158
151
  }
159
152
  // make sure the version is satisfied by the currently running version of Node
160
- if (nodeVersionRequired && !(0, semver_1.satisfies)(process.version, nodeVersionRequired)) {
161
- log.warn(`The plugin "${this.pluginName}" requires Node.js version of ${nodeVersionRequired} which does \
153
+ if (nodeVersionRequired && !satisfies(process.version, nodeVersionRequired)) {
154
+ log.warn(`The plugin "${this.pluginName}" requires a Node.js version of ${nodeVersionRequired} which does \
162
155
  not satisfy the current Node.js version of ${process.version}. You may need to upgrade your installation of Node.js - see https://homebridge.io/w/JTKEF`);
163
156
  }
164
157
  const dependencies = context.dependencies || {};
165
- if (dependencies.homebridge || dependencies["hap-nodejs"]) {
158
+ if (dependencies.homebridge || dependencies['hap-nodejs']) {
166
159
  log.error(`The plugin "${this.pluginName}" defines 'homebridge' and/or 'hap-nodejs' in their 'dependencies' section, \
167
160
  meaning they carry an additional copy of homebridge and hap-nodejs. This not only wastes disk space, but also can cause \
168
161
  major incompatibility issues and thus is considered bad practice. Please inform the developer to update their plugin!`);
169
162
  }
170
- const mainPath = path_1.default.join(this.pluginPath, this.main);
171
- // try to require() it and grab the exported initialization hook
172
- // eslint-disable-next-line @typescript-eslint/no-var-requires
163
+ const mainPath = path.join(this.pluginPath, this.main);
164
+ // try to import it and grab the exported initialization hook
173
165
  // pathToFileURL(specifier).href to turn a path into a "file url"
174
166
  // see https://github.com/nodejs/node/issues/31710
175
- // eslint-disable-next-line @typescript-eslint/no-require-imports
176
- const pluginModules = this.isESM ? await _importDynamic((0, url_1.pathToFileURL)(mainPath).href) : require(mainPath);
177
- if (typeof pluginModules === "function") {
167
+ const pluginModules = (await import(pathToFileURL(mainPath).href)).default;
168
+ if (typeof pluginModules === 'function') {
178
169
  this.pluginInitializer = pluginModules;
179
170
  }
180
- else if (pluginModules && typeof pluginModules.default === "function") {
171
+ else if (pluginModules && typeof pluginModules.default === 'function') {
181
172
  this.pluginInitializer = pluginModules.default;
182
173
  }
183
174
  else {
@@ -186,10 +177,9 @@ major incompatibility issues and thus is considered bad practice. Please inform
186
177
  }
187
178
  initialize(api) {
188
179
  if (!this.pluginInitializer) {
189
- throw new Error("Tried to initialize a plugin which hasn't been loaded yet!");
180
+ throw new Error('Tried to initialize a plugin which hasn\'t been loaded yet!');
190
181
  }
191
182
  return this.pluginInitializer(api);
192
183
  }
193
184
  }
194
- exports.Plugin = Plugin;
195
185
  //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAeA,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,OAAO,MAAM,cAAc,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,UAAU,MAAM,cAAc,CAAA;AAErC,MAAM,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAA;AAE3B;;GAEG;AACH,MAAM,OAAO,MAAM;IACA,UAAU,CAAY;IACtB,KAAK,CAAS,CAAC,oBAAoB;IACnC,UAAU,CAAQ,CAAC,0DAA0D;IAC7E,KAAK,CAAS;IAExB,QAAQ,GAAG,KAAK,CAAA,CAAC,8BAA8B;IAEtD,6DAA6D;IACpD,OAAO,CAAQ;IACP,IAAI,CAAQ;IACrB,WAAW,CAGlB;IACD,6DAA6D;IAErD,iBAAiB,CAAoB,CAAC,gEAAgE;IAE7F,qBAAqB,GAAmD,IAAI,GAAG,EAAE,CAAA;IACjF,mBAAmB,GAAiD,IAAI,GAAG,EAAE,CAAA;IAE7E,sBAAsB,GAA+C,IAAI,GAAG,EAAE,CAAA;IAE/F,YAAY,IAAgB,EAAE,IAAY,EAAE,WAAwB,EAAE,KAAc;QAClF,IAAI,CAAC,UAAU,GAAG,IAAI,CAAA;QACtB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QAClB,IAAI,CAAC,UAAU,GAAG,I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AAC,OAAO,KAAK,UAAU,EAAE,CAAC;YACxE,IAAI,CAAC,iBAAiB,GAAG,aAAa,CAAC,OAAO,CAAA;QAChD,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,UAAU,IAAI,CAAC,UAAU,oDAAoD,CAAC,CAAA;QAChG,CAAC;IACH,CAAC;IAEM,UAAU,CAAC,GAAQ;QACxB,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC5B,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAA;QAChF,CAAC;QAED,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAA;IACpC,CAAC;CACF"}
@@ -1,5 +1,5 @@
1
- import { AccessoryIdentifier, AccessoryName, HomebridgeAPI, PlatformIdentifier, PlatformName, PluginIdentifier, PluginName } from "./api";
2
- import { Plugin } from "./plugin";
1
+ import type { AccessoryIdentifier, AccessoryName, HomebridgeAPI, PlatformIdentifier, PlatformName, PluginIdentifier, PluginName } from './api.js';
2
+ import { Plugin } from './plugin.js';
3
3
  export interface PackageJSON {
4
4
  name: string;
5
5
  version: string;
@@ -10,7 +10,7 @@ export interface PackageJSON {
10
10
  * When set as module, it marks .js file to be treated as ESM.
11
11
  * See https://nodejs.org/dist/latest-v14.x/docs/api/esm.html#esm_enabling
12
12
  */
13
- type?: "module" | "commonjs";
13
+ type?: 'module' | 'commonjs';
14
14
  engines?: Record<string, string>;
15
15
  dependencies?: Record<string, string>;
16
16
  devDependencies?: Record<string, string>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pluginManager.d.ts","sourceRoot":"","sources":["../src/pluginManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,aAAa,EAEb,aAAa,EACb,kBAAkB,EAClB,YAAY,EAEZ,gBAAgB,EAChB,UAAU,EACX,MAAM,UAAU,CAAA;AAYjB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAMpC,MAAM,W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