-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathindex.js
More file actions
72 lines (62 loc) · 2.9 KB
/
Copy pathindex.js
File metadata and controls
72 lines (62 loc) · 2.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
'use strict';
const App = require('./lib/App');
const Capability = require('./lib/Capability');
const Device = require('./lib/Device');
const Energy = require('./lib/Energy');
const Media = require('./lib/Media');
const Signal = require('./lib/Signal');
const Util = require('./lib/Util');
// AIReviewer is Node-only (fs, child_process, tar CLI, openai/anthropic SDKs).
// The webpack/RN bundle strips it via IgnorePlugin — the try/catch keeps the
// bundle loadable there and `AIReviewer` simply resolves to undefined.
let AIReviewer;
let AIReviewerEnums;
try {
// eslint-disable-next-line global-require
AIReviewer = require('./lib/AIReviewer');
// eslint-disable-next-line global-require
AIReviewerEnums = require('./lib/AIReviewer/enums');
if (typeof AIReviewer !== 'function') AIReviewer = undefined;
if (!AIReviewerEnums || typeof AIReviewerEnums !== 'object' || !Array.isArray(AIReviewerEnums.SEVERITIES)) {
AIReviewerEnums = undefined;
}
} catch (err) {
// Not available in this environment.
}
module.exports.App = App;
module.exports.Capability = Capability;
module.exports.Device = Device;
module.exports.Energy = Energy;
module.exports.Media = Media;
module.exports.Signal = Signal;
module.exports.Util = Util;
module.exports.AIReviewer = AIReviewer;
module.exports.AIReviewerEnums = AIReviewerEnums;
/** @type {typeof Device.getClasses} */
module.exports.getDeviceClasses = Device.getClasses.bind(Device);
/** @type {typeof Device.getClass} */
module.exports.getDeviceClass = Device.getClass.bind(Device);
/** @type {typeof Capability.getCapabilities} */
module.exports.getCapabilities = Capability.getCapabilities.bind(Capability);
/** @type {typeof Capability.getCapability} */
module.exports.getCapability = Capability.getCapability.bind(Capability);
/** @type {typeof Capability.hasCapability} */
module.exports.hasCapability = Capability.hasCapability.bind(Capability);
/** @type {typeof App.getLocales} */
module.exports.getAppLocales = App.getLocales.bind(App);
/** @type {typeof App.getCategories} */
module.exports.getAppCategories = App.getCategories.bind(App);
/** @type {typeof App.getPermissions} */
module.exports.getAppPermissions = App.getPermissions.bind(App);
/** @type {typeof App.getBrandColor} */
module.exports.getAppBrandColor = App.getBrandColor.bind(App);
/** @type {typeof Media.getCodecs} */
module.exports.getMediaCodecs = Media.getCodecs.bind(Media);
/** @type {typeof Energy.getCurrencies} */
module.exports.getCurrencies = Energy.getCurrencies.bind(Energy);
/** @type {typeof Energy.getBatteries} */
module.exports.getBatteries = Energy.getBatteries.bind(Energy);
/** @typedef {import('./assets/app/schema').App} AppManifest */
/** @typedef {import('./assets/capability/schema').Capability} CapabilityDefinition */
/** @typedef {import('./assets/app/schema').ZigbeeFirmwareUpdates} ZigbeeFirmwareUpdates */
/** @typedef {import('./assets/app/schema').ZwaveFirmwareUpdates} ZwaveFirmwareUpdates */