homebridge-config-ui-x 5.6.1-beta.13 → 5.6.1-beta.14
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/CHANGELOG.md +1 -10
- package/dist/core/auth/auth.controller.d.ts +0 -5
- package/dist/core/auth/auth.controller.js +0 -13
- package/dist/core/auth/auth.controller.js.map +1 -1
- package/dist/core/auth/auth.service.d.ts +0 -1
- package/dist/core/auth/auth.service.js +0 -24
- package/dist/core/auth/auth.service.js.map +1 -1
- package/dist/core/config/config.service.d.ts +74 -8
- package/dist/core/config/config.service.js +0 -6
- package/dist/core/config/config.service.js.map +1 -1
- package/dist/core/config/config.startup.d.ts +12 -2
- package/dist/core/config/config.startup.js +0 -12
- package/dist/core/config/config.startup.js.map +1 -1
- package/dist/core/spa/spa.filter.d.ts +0 -3
- package/dist/core/spa/spa.filter.js +2 -22
- package/dist/core/spa/spa.filter.js.map +1 -1
- package/dist/globalDefaults.js +0 -3
- package/dist/globalDefaults.js.map +1 -1
- package/dist/main.js +3 -62
- package/dist/main.js.map +1 -1
- package/dist/modules/backup/backup.service.js +1 -4
- package/dist/modules/backup/backup.service.js.map +1 -1
- package/dist/modules/config-editor/config-editor.controller.d.ts +3 -3
- package/dist/modules/config-editor/config-editor.service.d.ts +2 -3
- package/dist/modules/config-editor/config-editor.service.js +13 -36
- package/dist/modules/config-editor/config-editor.service.js.map +1 -1
- package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.d.ts +1 -1
- package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js +1 -2
- package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js.map +1 -1
- package/dist/modules/log/log.gateway.d.ts +1 -1
- package/dist/modules/log/log.service.d.ts +4 -1
- package/dist/modules/log/log.service.js.map +1 -1
- package/dist/modules/platform-tools/terminal/terminal.gateway.d.ts +1 -1
- package/dist/modules/platform-tools/terminal/terminal.service.d.ts +8 -1
- package/dist/modules/platform-tools/terminal/terminal.service.js.map +1 -1
- package/dist/modules/plugins/plugins.controller.d.ts +5 -5
- package/dist/modules/plugins/plugins.service.d.ts +1 -1
- package/dist/modules/plugins/plugins.service.js +0 -6
- package/dist/modules/plugins/plugins.service.js.map +1 -1
- package/dist/modules/server/server.controller.d.ts +0 -3
- package/dist/modules/server/server.controller.js +0 -13
- package/dist/modules/server/server.controller.js.map +1 -1
- package/dist/modules/server/server.service.js +3 -5
- package/dist/modules/server/server.service.js.map +1 -1
- package/dist/modules/status/status.controller.d.ts +2 -2
- package/dist/modules/status/status.gateway.d.ts +5 -5
- package/dist/modules/status/status.service.d.ts +29 -2
- package/dist/modules/status/status.service.js +9 -4
- package/dist/modules/status/status.service.js.map +1 -1
- package/package.json +2 -3
- package/public/3rdpartylicenses.txt +13 -13
- package/public/{chunk-Y276Q4AC.js → chunk-2SMLTKN6.js} +1 -1
- package/public/chunk-2WHHAFYA.js +1 -0
- package/public/chunk-2YLQS2DL.js +1 -0
- package/public/chunk-34M674SY.js +1 -0
- package/public/chunk-3D7RRLPR.js +1 -0
- package/public/chunk-4MPGPOPP.js +1 -0
- package/public/chunk-4WBD4A62.js +1 -0
- package/public/chunk-5556TO6L.js +1 -0
- package/public/chunk-5T6DD7IV.js +40 -0
- package/public/chunk-5YG3JMTO.js +1 -0
- package/public/chunk-5YU4RFMD.js +1 -0
- package/public/chunk-6ILU2CLF.js +1 -0
- package/public/chunk-6QP27UHV.js +1 -0
- package/public/chunk-7URPBWRU.js +1 -0
- package/public/{chunk-7CNAISDX.js → chunk-AD7SNE53.js} +1 -1
- package/public/{chunk-GWKKAJID.js → chunk-B2X3Q7TH.js} +1 -1
- package/public/chunk-BR6USPEJ.js +1 -0
- package/public/chunk-BWK3GOHM.js +19 -0
- package/public/chunk-BZMR4XHP.js +1 -0
- package/public/{chunk-NBY4ULRZ.js → chunk-D5RIMAWO.js} +1 -1
- package/public/chunk-DIPNFK3U.js +1 -0
- package/public/chunk-F3HOYAFH.js +1 -0
- package/public/{chunk-MCPFJTIS.js → chunk-GGZZFW2G.js} +1 -1
- package/public/chunk-GKCOPKC4.js +1 -0
- package/public/chunk-H4EYWGGC.js +1 -0
- package/public/{chunk-NOT3YBAV.js → chunk-HDIODAFZ.js} +1 -1
- package/public/chunk-HXTQJGWK.js +1 -0
- package/public/{chunk-BU6Y5VTM.js → chunk-J6L2XE5U.js} +1 -1
- package/public/{chunk-AVQS5F4Z.js → chunk-JKQEXZUI.js} +1 -1
- package/public/chunk-M2HWRB6L.js +1 -0
- package/public/{chunk-WO2FS67T.js → chunk-MSSNDMBK.js} +1 -1
- package/public/{chunk-N4C2JS6F.js → chunk-MUHTDQ4J.js} +1 -1
- package/public/{chunk-NR4KD4TZ.js → chunk-MXQEKDB7.js} +1 -1
- package/public/chunk-MXTAHASV.js +1 -0
- package/public/chunk-N3NPEHCD.js +1 -0
- package/public/chunk-NNHGWF7K.js +1 -0
- package/public/chunk-NYJ5JVUS.js +1 -0
- package/public/chunk-OAAZLUNN.js +1 -0
- package/public/chunk-OMPHX32Y.js +2 -0
- package/public/{chunk-DTN2NELG.js → chunk-OPUBCSUA.js} +1 -1
- package/public/{chunk-OMP54XC2.js → chunk-PB3L5HHQ.js} +1 -1
- package/public/chunk-PDBBXRN3.js +1 -0
- package/public/chunk-Q2DNHZT4.js +1 -0
- package/public/{chunk-3ZU7ZAMP.js → chunk-Q5UJ7RBG.js} +1 -1
- package/public/{chunk-WIZAF6OS.js → chunk-Q6UH4DEV.js} +1 -1
- package/public/{chunk-7DPKY52D.js → chunk-QEG3OQ7B.js} +1 -1
- package/public/{chunk-5Y2R4LGP.js → chunk-QJ445K5M.js} +1 -1
- package/public/{chunk-MO7W4MOJ.js → chunk-QVKCJ4SR.js} +1 -1
- package/public/chunk-QYXVENKH.js +1 -0
- package/public/{chunk-UZYLEARI.js → chunk-RJUV23IZ.js} +1 -1
- package/public/chunk-SH7JZ7PA.js +49 -0
- package/public/{chunk-GIT2LKLO.js → chunk-SP5IPQP6.js} +1 -1
- package/public/{chunk-IF4NZHXC.js → chunk-T5B6OVIH.js} +2 -2
- package/public/{chunk-47E4YM3R.js → chunk-TDH7HYAU.js} +1 -1
- package/public/chunk-TFFUSSEA.js +2 -0
- package/public/{chunk-2XYBM4MH.js → chunk-TLGNUWU6.js} +1 -1
- package/public/chunk-TTLX53WB.js +1 -0
- package/public/chunk-UGI34NWT.js +1 -0
- package/public/chunk-UMW5IGSH.js +1 -0
- package/public/{chunk-XOZXV7OE.js → chunk-UUXVPC6B.js} +1 -1
- package/public/{chunk-LAQQMELG.js → chunk-UV4UNUVO.js} +1 -1
- package/public/chunk-V2MV6MJL.js +4 -0
- package/public/chunk-VYTDBITY.js +1 -0
- package/public/{chunk-IPOMOAHN.js → chunk-WDWDHEI2.js} +1 -1
- package/public/{chunk-R2QGD4ZP.js → chunk-WIJDDKLW.js} +1 -1
- package/public/chunk-WTWQSU5J.js +1 -0
- package/public/chunk-X5GSN6SK.js +1 -0
- package/public/chunk-Y7KVPAMR.js +1 -0
- package/public/chunk-Z3IOKVH5.js +1 -0
- package/public/index.html +2 -2
- package/public/main-D5FOFUEC.js +1 -0
- package/public/{styles-IKV7T7ID.css → styles-KAER7B5R.css} +1 -1
- package/dist/core/config/config.interfaces.d.ts +0 -120
- package/dist/core/config/config.interfaces.js +0 -3
- package/dist/core/config/config.interfaces.js.map +0 -1
- package/dist/core/spa/spa-html.service.d.ts +0 -5
- package/dist/core/spa/spa-html.service.js +0 -38
- package/dist/core/spa/spa-html.service.js.map +0 -1
- package/dist/modules/log/log.interfaces.d.ts +0 -4
- package/dist/modules/log/log.interfaces.js +0 -3
- package/dist/modules/log/log.interfaces.js.map +0 -1
- package/dist/modules/platform-tools/terminal/terminal.interfaces.d.ts +0 -8
- package/dist/modules/platform-tools/terminal/terminal.interfaces.js +0 -3
- package/dist/modules/platform-tools/terminal/terminal.interfaces.js.map +0 -1
- package/dist/modules/plugins/plugins.interfaces.d.ts +0 -211
- package/dist/modules/plugins/plugins.interfaces.js +0 -3
- package/dist/modules/plugins/plugins.interfaces.js.map +0 -1
- package/dist/modules/status/status.interfaces.d.ts +0 -27
- package/dist/modules/status/status.interfaces.js +0 -10
- package/dist/modules/status/status.interfaces.js.map +0 -1
- package/public/chunk-2C3DY6J6.js +0 -1
- package/public/chunk-2E7HLMEU.js +0 -1
- package/public/chunk-2FOPYKT6.js +0 -1
- package/public/chunk-2UI7JQVK.js +0 -1
- package/public/chunk-373LCADB.js +0 -49
- package/public/chunk-4CDU66PK.js +0 -1
- package/public/chunk-4FMF7TRK.js +0 -1
- package/public/chunk-4KXGQOBW.js +0 -1
- package/public/chunk-4PRUAGPI.js +0 -1
- package/public/chunk-6LB7WDKS.js +0 -1
- package/public/chunk-7RP6K46B.js +0 -1
- package/public/chunk-AVEURRDL.js +0 -1
- package/public/chunk-B4PQSEFN.js +0 -1
- package/public/chunk-BVKLD6LI.js +0 -1
- package/public/chunk-BWTOO3LD.js +0 -1
- package/public/chunk-CHQBR6NW.js +0 -1
- package/public/chunk-CRWZOHDY.js +0 -1
- package/public/chunk-DMXOO6AC.js +0 -1
- package/public/chunk-GNL4VW44.js +0 -1
- package/public/chunk-H3TL3W5T.js +0 -2
- package/public/chunk-HSEQMY4I.js +0 -1
- package/public/chunk-HZVPINFF.js +0 -1
- package/public/chunk-JOACZPZU.js +0 -19
- package/public/chunk-KQNDAXRL.js +0 -1
- package/public/chunk-KSBVTRAJ.js +0 -1
- package/public/chunk-MJ2H7BCH.js +0 -40
- package/public/chunk-NWC3LNPG.js +0 -1
- package/public/chunk-OMS5FGR5.js +0 -1
- package/public/chunk-PKKJJ6G3.js +0 -1
- package/public/chunk-Q7XGDGF7.js +0 -1
- package/public/chunk-SZHGGXWK.js +0 -1
- package/public/chunk-TUN7H57E.js +0 -1
- package/public/chunk-VZEOV5HE.js +0 -1
- package/public/chunk-WFIS75PH.js +0 -1
- package/public/chunk-WWMJUVLA.js +0 -5
- package/public/chunk-WXETYSG6.js +0 -1
- package/public/chunk-X3C7IKY7.js +0 -1
- package/public/chunk-XN4LK7O3.js +0 -1
- package/public/chunk-Y2DW72HC.js +0 -1
- package/public/chunk-ZIMFIGPT.js +0 -1
- package/public/chunk-ZQJQWHQX.js +0 -1
- package/public/main-CFXMUMBW.js +0 -1
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import type { Buffer } from 'node:buffer';
|
|
2
|
-
export interface StartupConfig {
|
|
3
|
-
host?: '::' | '0.0.0.0' | string;
|
|
4
|
-
httpsOptions?: {
|
|
5
|
-
key?: Buffer;
|
|
6
|
-
cert?: Buffer;
|
|
7
|
-
pfx?: Buffer;
|
|
8
|
-
passphrase?: string;
|
|
9
|
-
};
|
|
10
|
-
cspWsOverride?: string;
|
|
11
|
-
debug?: boolean;
|
|
12
|
-
webroot?: string;
|
|
13
|
-
}
|
|
14
|
-
interface PluginChildBridge {
|
|
15
|
-
username: string;
|
|
16
|
-
port?: number;
|
|
17
|
-
pin?: string;
|
|
18
|
-
name?: string;
|
|
19
|
-
manufacturer?: string;
|
|
20
|
-
model?: string;
|
|
21
|
-
firmwareRevision?: string;
|
|
22
|
-
env?: {
|
|
23
|
-
DEBUG?: string;
|
|
24
|
-
NODE_OPTIONS?: string;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
export interface PlatformConfig {
|
|
28
|
-
platform: string;
|
|
29
|
-
name?: string;
|
|
30
|
-
_bridge?: PluginChildBridge;
|
|
31
|
-
[key: string]: any;
|
|
32
|
-
}
|
|
33
|
-
export interface AccessoryConfig {
|
|
34
|
-
accessory: string;
|
|
35
|
-
name: string;
|
|
36
|
-
_bridge?: PluginChildBridge;
|
|
37
|
-
[key: string]: any;
|
|
38
|
-
}
|
|
39
|
-
export interface HomebridgeConfig {
|
|
40
|
-
bridge: {
|
|
41
|
-
username: string;
|
|
42
|
-
pin: string;
|
|
43
|
-
name: string;
|
|
44
|
-
port: number;
|
|
45
|
-
advertiser?: 'avahi' | 'resolved' | 'ciao' | 'bonjour-hap';
|
|
46
|
-
bind?: string | string[];
|
|
47
|
-
manufacturer?: string;
|
|
48
|
-
model?: string;
|
|
49
|
-
firmwareRevision?: string;
|
|
50
|
-
};
|
|
51
|
-
mdns?: {
|
|
52
|
-
interface?: string | string[];
|
|
53
|
-
legacyAdvertiser?: boolean;
|
|
54
|
-
};
|
|
55
|
-
ports?: {
|
|
56
|
-
start?: number;
|
|
57
|
-
end?: number;
|
|
58
|
-
};
|
|
59
|
-
platforms?: PlatformConfig[];
|
|
60
|
-
accessories?: AccessoryConfig[];
|
|
61
|
-
plugins?: string[];
|
|
62
|
-
disabledPlugins?: string[];
|
|
63
|
-
}
|
|
64
|
-
export interface HomebridgeUiConfig {
|
|
65
|
-
name: string;
|
|
66
|
-
port: number;
|
|
67
|
-
host?: '::' | '0.0.0.0' | string;
|
|
68
|
-
webroot?: string;
|
|
69
|
-
proxyHost?: string;
|
|
70
|
-
auth: 'form' | 'none';
|
|
71
|
-
theme: string;
|
|
72
|
-
lightingMode: 'auto' | 'light' | 'dark';
|
|
73
|
-
menuMode?: 'default' | 'freeze';
|
|
74
|
-
sudo?: boolean;
|
|
75
|
-
restart?: string;
|
|
76
|
-
lang?: string;
|
|
77
|
-
log?: {
|
|
78
|
-
method?: 'file' | 'custom' | 'systemd' | 'native';
|
|
79
|
-
command?: string;
|
|
80
|
-
path?: string;
|
|
81
|
-
service?: string;
|
|
82
|
-
maxSize?: number;
|
|
83
|
-
truncateSize?: number;
|
|
84
|
-
};
|
|
85
|
-
ssl?: {
|
|
86
|
-
key?: string;
|
|
87
|
-
cert?: string;
|
|
88
|
-
pfx?: string;
|
|
89
|
-
passphrase?: string;
|
|
90
|
-
};
|
|
91
|
-
accessoryControl?: {
|
|
92
|
-
debug?: boolean;
|
|
93
|
-
instanceBlacklist?: string[];
|
|
94
|
-
};
|
|
95
|
-
plugins?: {
|
|
96
|
-
hideUpdatesFor?: string[];
|
|
97
|
-
alwaysShowBetas?: boolean;
|
|
98
|
-
};
|
|
99
|
-
temp?: string;
|
|
100
|
-
tempUnits?: string;
|
|
101
|
-
wallpaper?: string;
|
|
102
|
-
linux?: {
|
|
103
|
-
shutdown?: string;
|
|
104
|
-
restart?: string;
|
|
105
|
-
};
|
|
106
|
-
debug?: boolean;
|
|
107
|
-
sessionTimeout?: number;
|
|
108
|
-
sessionTimeoutInactivityBased?: boolean;
|
|
109
|
-
homebridgePackagePath?: string;
|
|
110
|
-
scheduledBackupPath?: string;
|
|
111
|
-
scheduledBackupDisable?: boolean;
|
|
112
|
-
disableServerMetricsMonitoring?: boolean;
|
|
113
|
-
enableMdnsAdvertise?: boolean;
|
|
114
|
-
terminal?: {
|
|
115
|
-
persistence?: boolean;
|
|
116
|
-
hideWarning?: boolean;
|
|
117
|
-
bufferSize?: number;
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.interfaces.js","sourceRoot":"","sources":["../../../src/core/config/config.interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -1,38 +0,0 @@
|
|
|
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.SpaHtmlService = void 0;
|
|
7
|
-
const node_path_1 = require("node:path");
|
|
8
|
-
const node_process_1 = __importDefault(require("node:process"));
|
|
9
|
-
const fs_extra_1 = require("fs-extra");
|
|
10
|
-
class SpaHtmlService {
|
|
11
|
-
static async updateIndexHtml(webroot) {
|
|
12
|
-
const indexPath = (0, node_path_1.resolve)(node_process_1.default.env.UIX_BASE_PATH, 'public/index.html');
|
|
13
|
-
if (!(await (0, fs_extra_1.exists)(indexPath))) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
const originalHtml = await (0, fs_extra_1.readFile)(indexPath, 'utf-8');
|
|
17
|
-
const normalizedWebroot = this.normalizeWebroot(webroot);
|
|
18
|
-
const modifiedHtml = this.transformHtmlForWebroot(originalHtml, normalizedWebroot);
|
|
19
|
-
await (0, fs_extra_1.writeFile)(indexPath, modifiedHtml);
|
|
20
|
-
}
|
|
21
|
-
static normalizeWebroot(webroot) {
|
|
22
|
-
if (!webroot || webroot === '/') {
|
|
23
|
-
return '';
|
|
24
|
-
}
|
|
25
|
-
return webroot.replace(/\/+/g, '/').replace(/^\/+|\/+$/g, '');
|
|
26
|
-
}
|
|
27
|
-
static transformHtmlForWebroot(html, webroot) {
|
|
28
|
-
const baseHref = webroot ? `/${webroot}/` : '/';
|
|
29
|
-
return html
|
|
30
|
-
.replace(/<base href="[^"]*"(\s*)\/?>/g, `<base href="${baseHref}"$1/>`)
|
|
31
|
-
.replace(/href="\/(?:.*?\/)?assets\//g, 'href="assets/')
|
|
32
|
-
.replace(/href="\/(?:.*?\/)?favicon\.ico"/g, 'href="favicon.ico"')
|
|
33
|
-
.replace(/href="\/(?:.*?\/)?([^"/]+\.(png|svg|webmanifest))"/g, 'href="$1"')
|
|
34
|
-
.replace(/src="\/(?:.*?\/)?assets\//g, 'src="assets/');
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
exports.SpaHtmlService = SpaHtmlService;
|
|
38
|
-
//# sourceMappingURL=spa-html.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spa-html.service.js","sourceRoot":"","sources":["../../../src/core/spa/spa-html.service.ts"],"names":[],"mappings":";;;;;;AAAA,yCAAmC;AACnC,gEAAkC;AAElC,uCAAsD;AAEtD,MAAa,cAAc;IAKzB,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,OAAe;QAC1C,MAAM,SAAS,GAAG,IAAA,mBAAO,EAAC,sBAAO,CAAC,GAAG,CAAC,aAAa,EAAE,mBAAmB,CAAC,CAAA;QACzE,IAAI,CAAC,CAAC,MAAM,IAAA,iBAAM,EAAC,SAAS,CAAC,CAAC,EAAE,CAAC;YAC/B,OAAM;QACR,CAAC;QACD,MAAM,YAAY,GAAG,MAAM,IAAA,mBAAQ,EAAC,SAAS,EAAE,OAAO,CAAC,CAAA;QACvD,MAAM,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAA;QACxD,MAAM,YAAY,GAAG,IAAI,CAAC,uBAAuB,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAAA;QAClF,MAAM,IAAA,oBAAS,EAAC,SAAS,EAAE,YAAY,CAAC,CAAA;IAC1C,CAAC;IAOO,MAAM,CAAC,gBAAgB,CAAC,OAAe;QAC7C,IAAI,CAAC,OAAO,IAAI,OAAO,KAAK,GAAG,EAAE,CAAC;YAChC,OAAO,EAAE,CAAA;QACX,CAAC;QAED,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAA;IAC/D,CAAC;IAQO,MAAM,CAAC,uBAAuB,CAAC,IAAY,EAAE,OAAe;QAClE,MAAM,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,OAAO,GAAG,CAAC,CAAC,CAAC,GAAG,CAAA;QAE/C,OAAO,IAAI;aACR,OAAO,CAAC,8BAA8B,EAAE,eAAe,QAAQ,OAAO,CAAC;aACvE,OAAO,CAAC,6BAA6B,EAAE,eAAe,CAAC;aACvD,OAAO,CAAC,kCAAkC,EAAE,oBAAoB,CAAC;aACjE,OAAO,CAAC,qDAAqD,EAAE,WAAW,CAAC;aAC3E,OAAO,CAAC,4BAA4B,EAAE,cAAc,CAAC,CAAA;IAC1D,CAAC;CACF;AA7CD,wCA6CC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"log.interfaces.js","sourceRoot":"","sources":["../../../src/modules/log/log.interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"terminal.interfaces.js","sourceRoot":"","sources":["../../../../src/modules/platform-tools/terminal/terminal.interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
export interface HomebridgePlugin {
|
|
2
|
-
name: string;
|
|
3
|
-
private: boolean;
|
|
4
|
-
displayName?: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
keywords?: string[];
|
|
7
|
-
verifiedPlugin?: boolean;
|
|
8
|
-
verifiedPlusPlugin?: boolean;
|
|
9
|
-
icon?: string;
|
|
10
|
-
publicPackage?: boolean;
|
|
11
|
-
installedVersion?: string;
|
|
12
|
-
latestVersion?: string;
|
|
13
|
-
lastUpdated?: string;
|
|
14
|
-
updateAvailable?: boolean;
|
|
15
|
-
updateEngines?: {
|
|
16
|
-
homebridge?: string;
|
|
17
|
-
node?: string;
|
|
18
|
-
};
|
|
19
|
-
updateTag?: string;
|
|
20
|
-
installPath?: string;
|
|
21
|
-
globalInstall?: boolean;
|
|
22
|
-
settingsSchema?: boolean;
|
|
23
|
-
disabled?: boolean;
|
|
24
|
-
links?: {
|
|
25
|
-
npm?: string;
|
|
26
|
-
homepage?: string;
|
|
27
|
-
bugs?: string;
|
|
28
|
-
};
|
|
29
|
-
author?: string;
|
|
30
|
-
engines?: {
|
|
31
|
-
homebridge?: string;
|
|
32
|
-
node?: string;
|
|
33
|
-
};
|
|
34
|
-
funding?: NpmFunding;
|
|
35
|
-
isHbScoped?: boolean;
|
|
36
|
-
isHbMaintained?: boolean;
|
|
37
|
-
newHbScope?: {
|
|
38
|
-
from: string;
|
|
39
|
-
to: string;
|
|
40
|
-
switch: string;
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
export interface HomebridgePluginUiMetadata {
|
|
44
|
-
devServer: null | string;
|
|
45
|
-
publicPath: string;
|
|
46
|
-
serverPath: string;
|
|
47
|
-
plugin: HomebridgePlugin;
|
|
48
|
-
}
|
|
49
|
-
export interface HomebridgePluginVersions {
|
|
50
|
-
tags: Record<string, string>;
|
|
51
|
-
versions: {
|
|
52
|
-
[key: string]: IPackageJson;
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
export interface INpmPerson {
|
|
56
|
-
name?: string;
|
|
57
|
-
email?: string;
|
|
58
|
-
homepage?: string;
|
|
59
|
-
username?: string;
|
|
60
|
-
url?: string;
|
|
61
|
-
}
|
|
62
|
-
export interface INpmRegistryModule {
|
|
63
|
-
'_id': string;
|
|
64
|
-
'_rev': string;
|
|
65
|
-
'name': string;
|
|
66
|
-
'dist-tags': {
|
|
67
|
-
latest: string;
|
|
68
|
-
[key: string]: string;
|
|
69
|
-
};
|
|
70
|
-
'versions': {
|
|
71
|
-
[key: string]: IPackageJson;
|
|
72
|
-
};
|
|
73
|
-
'time': {
|
|
74
|
-
created: string;
|
|
75
|
-
modified: string;
|
|
76
|
-
[key: string]: string;
|
|
77
|
-
};
|
|
78
|
-
'maintainers': INpmPerson[];
|
|
79
|
-
'description': string;
|
|
80
|
-
'homepage': string;
|
|
81
|
-
'keywords': string[];
|
|
82
|
-
'repository': {
|
|
83
|
-
type: string;
|
|
84
|
-
url: string;
|
|
85
|
-
};
|
|
86
|
-
'author': INpmPerson;
|
|
87
|
-
'bugs': {
|
|
88
|
-
email?: string;
|
|
89
|
-
url?: string;
|
|
90
|
-
};
|
|
91
|
-
'license': string;
|
|
92
|
-
'readme': string;
|
|
93
|
-
'readmeFilename': string;
|
|
94
|
-
}
|
|
95
|
-
export interface INpmSearchResultItem {
|
|
96
|
-
package: {
|
|
97
|
-
name: string;
|
|
98
|
-
scope: string;
|
|
99
|
-
version: string;
|
|
100
|
-
description: string;
|
|
101
|
-
keywords: string[];
|
|
102
|
-
date: string;
|
|
103
|
-
links: {
|
|
104
|
-
npm: string;
|
|
105
|
-
homebridge?: string;
|
|
106
|
-
repository?: string;
|
|
107
|
-
bugs?: string;
|
|
108
|
-
};
|
|
109
|
-
author: INpmPerson;
|
|
110
|
-
publisher: INpmPerson;
|
|
111
|
-
maintainers: INpmPerson[];
|
|
112
|
-
};
|
|
113
|
-
flags: {
|
|
114
|
-
unstable: boolean;
|
|
115
|
-
};
|
|
116
|
-
score: {
|
|
117
|
-
final: number;
|
|
118
|
-
detail: {
|
|
119
|
-
quality: number;
|
|
120
|
-
popularity: number;
|
|
121
|
-
maintenance: number;
|
|
122
|
-
};
|
|
123
|
-
};
|
|
124
|
-
searchScore: number;
|
|
125
|
-
}
|
|
126
|
-
export interface INpmSearchResults {
|
|
127
|
-
objects: INpmSearchResultItem[];
|
|
128
|
-
}
|
|
129
|
-
export interface IPackageJson {
|
|
130
|
-
name: string;
|
|
131
|
-
displayName?: string;
|
|
132
|
-
version?: string;
|
|
133
|
-
description?: string;
|
|
134
|
-
keywords?: string[];
|
|
135
|
-
homepage?: string;
|
|
136
|
-
bugs?: string | {
|
|
137
|
-
email?: string;
|
|
138
|
-
url?: string;
|
|
139
|
-
};
|
|
140
|
-
license?: string;
|
|
141
|
-
author?: string | INpmPerson;
|
|
142
|
-
maintainers?: INpmPerson[];
|
|
143
|
-
contributors?: string[] | INpmPerson[];
|
|
144
|
-
funding?: NpmFunding;
|
|
145
|
-
files?: string[];
|
|
146
|
-
main?: string;
|
|
147
|
-
bin?: string | {
|
|
148
|
-
[key: string]: string;
|
|
149
|
-
};
|
|
150
|
-
repository?: string | {
|
|
151
|
-
type: string;
|
|
152
|
-
url: string;
|
|
153
|
-
};
|
|
154
|
-
scripts?: {
|
|
155
|
-
[key: string]: string;
|
|
156
|
-
};
|
|
157
|
-
dependencies?: {
|
|
158
|
-
[key: string]: string;
|
|
159
|
-
};
|
|
160
|
-
devDependencies?: {
|
|
161
|
-
[key: string]: string;
|
|
162
|
-
};
|
|
163
|
-
peerDependencies?: {
|
|
164
|
-
[key: string]: string;
|
|
165
|
-
};
|
|
166
|
-
optionalDependencies?: {
|
|
167
|
-
[key: string]: string;
|
|
168
|
-
};
|
|
169
|
-
bundledDependencies?: string[];
|
|
170
|
-
engines?: {
|
|
171
|
-
[key: string]: string;
|
|
172
|
-
};
|
|
173
|
-
os?: string[];
|
|
174
|
-
cpu?: string[];
|
|
175
|
-
preferGlobal?: boolean;
|
|
176
|
-
private?: boolean;
|
|
177
|
-
publishConfig?: {
|
|
178
|
-
registry?: string;
|
|
179
|
-
};
|
|
180
|
-
deprecated?: string;
|
|
181
|
-
}
|
|
182
|
-
export type NpmFunding = {
|
|
183
|
-
type: string;
|
|
184
|
-
url: string;
|
|
185
|
-
} | string | Array<{
|
|
186
|
-
type: string;
|
|
187
|
-
url: string;
|
|
188
|
-
} | string>;
|
|
189
|
-
export interface PluginAlias {
|
|
190
|
-
pluginAlias: null | string;
|
|
191
|
-
pluginType: null | 'platform' | 'accessory';
|
|
192
|
-
}
|
|
193
|
-
export interface PluginListNewScopeItem {
|
|
194
|
-
from: string;
|
|
195
|
-
to: string;
|
|
196
|
-
switch: string;
|
|
197
|
-
}
|
|
198
|
-
export interface PluginListItem {
|
|
199
|
-
c?: string;
|
|
200
|
-
h?: 1;
|
|
201
|
-
i?: string;
|
|
202
|
-
m?: 1;
|
|
203
|
-
a?: string;
|
|
204
|
-
n?: string;
|
|
205
|
-
s?: PluginListNewScopeItem;
|
|
206
|
-
v?: 1;
|
|
207
|
-
p?: 1;
|
|
208
|
-
}
|
|
209
|
-
export interface PluginListData {
|
|
210
|
-
data: Record<string, PluginListItem>;
|
|
211
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.interfaces.js","sourceRoot":"","sources":["../../../src/modules/plugins/plugins.interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export declare enum HomebridgeStatus {
|
|
2
|
-
OK = "ok",
|
|
3
|
-
UP = "up",
|
|
4
|
-
DOWN = "down"
|
|
5
|
-
}
|
|
6
|
-
export interface HomebridgeStatusUpdate {
|
|
7
|
-
status: HomebridgeStatus;
|
|
8
|
-
paired?: null | boolean;
|
|
9
|
-
setupUri?: null | string;
|
|
10
|
-
name?: string;
|
|
11
|
-
username?: string;
|
|
12
|
-
pin?: string;
|
|
13
|
-
}
|
|
14
|
-
export interface DockerRelease {
|
|
15
|
-
tag_name: string;
|
|
16
|
-
published_at: string;
|
|
17
|
-
prerelease: boolean;
|
|
18
|
-
body: string;
|
|
19
|
-
}
|
|
20
|
-
export interface DockerReleaseInfo {
|
|
21
|
-
version: string;
|
|
22
|
-
publishedAt: string;
|
|
23
|
-
isPrerelease: boolean;
|
|
24
|
-
isTest: boolean;
|
|
25
|
-
testTag: 'beta' | 'test' | null;
|
|
26
|
-
isLatestStable: boolean;
|
|
27
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HomebridgeStatus = void 0;
|
|
4
|
-
var HomebridgeStatus;
|
|
5
|
-
(function (HomebridgeStatus) {
|
|
6
|
-
HomebridgeStatus["OK"] = "ok";
|
|
7
|
-
HomebridgeStatus["UP"] = "up";
|
|
8
|
-
HomebridgeStatus["DOWN"] = "down";
|
|
9
|
-
})(HomebridgeStatus || (exports.HomebridgeStatus = HomebridgeStatus = {}));
|
|
10
|
-
//# sourceMappingURL=status.interfaces.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"status.interfaces.js","sourceRoot":"","sources":["../../../src/modules/status/status.interfaces.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,6BAAS,CAAA;IACT,6BAAS,CAAA;IACT,iCAAa,CAAA;AACf,CAAC,EAJW,gBAAgB,gCAAhB,gBAAgB,QAI3B"}
|
package/public/chunk-2C3DY6J6.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{m as J}from"./chunk-3ZU7ZAMP.js";import{B as H,e as O,l as W,s as z,t as q,v as G}from"./chunk-MCPFJTIS.js";import{d as Y}from"./chunk-6LB7WDKS.js";import{k as K,l as Q,n as X,q as Z}from"./chunk-4PRUAGPI.js";import{Db as w,Gb as b,Ib as d,Kc as j,La as s,Vb as c,Wa as D,Wb as g,Xb as h,Yb as V,a as T,ac as F,b as R,bc as U,cc as L,h as M,hc as N,ic as P,ja as y,kb as A,lb as _,mb as u,mc as m,nc as p,oa as v,ob as k,pa as C,pb as E,qb as $,rb as f,sb as o,tb as a,ub as B,w as S}from"./chunk-WWMJUVLA.js";var te=(t,l)=>({"btn-danger":t,"btn-elegant":l}),ie=(t,l,e)=>({"fa-trash":t,"fa-undo":l,"fa-spinner fa-pulse":e});function ne(t,l){t&1&&(o(0,"div",12),B(1,"i",13),a(),o(2,"p",14),c(3),m(4,"translate"),a()),t&2&&(s(3),g(p(4,1,"reset.no_accessories")))}function se(t,l){if(t&1&&(o(0,"option",24),c(1),a()),t&2){let e=l.$implicit;f("value",e._id),s(),V("",e.name," (",e._username,")")}}function oe(t,l){if(t&1){let e=w();o(0,"li",20),c(1),m(2,"translate"),a(),o(3,"li",18)(4,"label",21),c(5),m(6,"translate"),a(),o(7,"div",22)(8,"select",23),L("ngModelChange",function(i){v(e);let r=d(2);return U(r.selectedBridge,i)||(r.selectedBridge=i),C(i)}),b("change",function(i){v(e);let r=d(2);return C(r.onBridgeChange(i.target.value))}),E(9,se,2,3,"option",24,k),a()()()}if(t&2){let e=d(2);s(),g(p(2,3,"form.label.changes_kept")),s(4),g(p(6,5,"reset.accessory_ind.bridge")),s(3),F("ngModel",e.selectedBridge),s(),$(e.pairings)}}function ae(t,l){if(t&1&&(o(0,"li",18)(1,"label",25),c(2),m(3,"translate"),a(),o(4,"div",26),c(5),a()()),t&2){let e=d(2);s(2),g(p(3,2,"reset.accessory_ind.bridge")),s(3),h(" ",e.getCurrentlySelectedBridge()," ")}}function re(t,l){if(t&1){let e=w();o(0,"li",19)(1,"span"),c(2),B(3,"br"),o(4,"small")(5,"span",27),c(6),a()()(),o(7,"button",28),m(8,"translate"),b("click",function(){let i=v(e).$implicit,r=d(2);return C(r.toggleList(i.UUID,i.$cacheFile))}),B(9,"i",29),a()()}if(t&2){let e=l.$implicit,n=d(2);s(2),h(" ",e.displayName),s(4),g(e.UUID),s(),f("disabled",n.clicked)("ngClass",N(8,te,!n.isInList(e.UUID,e.$cacheFile),n.isInList(e.UUID,e.$cacheFile))),A("aria-label",p(8,6,"form.button_delete")),s(2),f("ngClass",P(11,ie,!n.isInList(e.UUID,e.$cacheFile),n.isInList(e.UUID,e.$cacheFile)&&!n.clicked,n.isInList(e.UUID,e.$cacheFile)&&n.clicked))}}function le(t,l){if(t&1&&(o(0,"div",12),B(1,"i",15),a(),o(2,"ul",16)(3,"li"),c(4),m(5,"translate"),a(),o(6,"li"),c(7),m(8,"translate"),a(),o(9,"li"),c(10),m(11,"translate"),a()(),o(12,"ul",17),_(13,oe,11,7),_(14,ae,6,4,"li",18),E(15,re,10,15,"li",19,k),a()),t&2){let e=d();s(4),g(p(5,5,"reset.accessory_ind.list_1")),s(3),g(p(8,7,"reset.accessory_ind.list_2")),s(3),g(p(11,9,"reset.accessory_ind.list_3")),s(3),u(e.pairings.length>1?13:-1),s(),u(e.pairings.length===1?14:-1),s(),$(e.selectedBridgeAccessories)}}function ce(t,l){if(t&1){let e=w();o(0,"button",30),b("click",function(){v(e);let i=d();return C(i.dismissModal())}),c(1),m(2,"translate"),a()}if(t&2){let e=d();f("disabled",e.clicked),s(),h(" ",p(2,2,"form.button_close")," ")}}function de(t,l){if(t&1){let e=w();o(0,"button",31),b("click",function(){v(e);let i=d();return C(i.dismissModal())}),c(1),m(2,"translate"),a()}t&2&&(s(),h(" ",p(2,1,"form.button_close")," "))}function me(t,l){if(t&1&&c(0),t&2){let e=d(3);h(" (",e.toDelete.length,") ")}}function pe(t,l){if(t&1&&(c(0),m(1,"translate"),_(2,me,1,1)),t&2){let e=d(2);h(" ",p(1,2,"form.button_remove")," "),s(2),u(e.toDelete.length>0?2:-1)}}function _e(t,l){t&1&&B(0,"i",33)}function ue(t,l){if(t&1){let e=w();o(0,"button",32),b("click",function(){v(e);let i=d();return C(i.removeAccessories())}),_(1,pe,3,4),_(2,_e,1,0,"i",33),a()}if(t&2){let e=d();f("disabled",!e.toDelete.length||e.clicked),s(),u(e.clicked?-1:1),s(),u(e.clicked?2:-1)}}var ke=(()=>{class t{$activeModal=y(J);$api=y(Z);$router=y(Y);$toastr=y(X);$translate=y(K);selectedBridge="";pairings=[];clicked=!1;selectedBridgeAccessories=[];accessoriesExist=!1;toDelete=[];ngOnInit(){this.loadCachedAccessories()}onBridgeChange(e){this.selectedBridge=e,this.selectedBridgeAccessories=this.pairings.find(n=>n._id===this.selectedBridge)?.accessories}getCurrentlySelectedBridge(){let e=this.pairings.find(n=>n._id===this.selectedBridge);return`${e.name} - ${e._username}`}toggleList(e,n){this.toDelete.some(i=>i.uuid===e&&i.cacheFile===n)?this.toDelete=this.toDelete.filter(i=>i.uuid!==e||i.cacheFile!==n):this.toDelete.push({cacheFile:n,uuid:e})}isInList(e,n){return this.toDelete.some(i=>i.uuid===e&&i.cacheFile===n)}removeAccessories(){return this.clicked=!0,this.$api.delete("/server/cached-accessories",{body:this.toDelete}).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("reset.accessory_ind.done"),this.$translate.instant("toast.title_success")),this.$activeModal.close(),this.$router.navigate(["/restart"],{queryParams:{restarting:!0}})},error:e=>{this.clicked=!1,console.error(e),this.$toastr.error(this.$translate.instant("reset.accessory_ind.fail"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadCachedAccessories(){return M(this,null,function*(){try{let[e,n]=yield Promise.all([S(this.$api.get("/server/cached-accessories")),S(this.$api.get("/server/pairings"))]),i=new Map(n.map(r=>[r._id,R(T({},r),{accessories:[]})]));e.sort((r,x)=>r.displayName.localeCompare(x.displayName)).forEach(r=>{let x=n.find(ee=>ee._main),I=r.$cacheFile?.split(".")?.[1]||x._id;(!this.selectedBridge||this.selectedBridge===I)&&(i.has(I)||i.set(I,{_id:I,_username:I.match(/.{1,2}/g).join(":"),name:this.$translate.instant("reset.accessory_ind.unknown"),accessories:[]}),i.get(I).accessories.push(r))}),this.pairings=Array.from(i.values()).filter(r=>r.accessories.length>0).sort((r,x)=>r._main&&!x._main?-1:!r._main&&x._main?1:r.name.localeCompare(x.name)),this.selectedBridge=this.selectedBridge||this.pairings[0]?._id,this.selectedBridge&&(this.accessoriesExist=!0,this.selectedBridgeAccessories=this.pairings[0].accessories)}catch(e){console.error(e),this.$toastr.error(this.$translate.instant("reset.error_message"),this.$translate.instant("toast.title_error")),this.$activeModal.close()}})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=D({type:t,selectors:[["ng-component"]],inputs:{selectedBridge:"selectedBridge"},decls:17,vars:12,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click","disabled"],[1,"modal-body"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"disabled"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"disabled"],[1,"text-center","mb-3"],[1,"fas","fa-circle-check","primary-text",2,"font-size","75px"],[1,"mb-0","text-center"],[1,"fas","fa-network-wired","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"list-group-item","text-center","grey-text","small"],["for","bridgeSelect",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["id","bridgeSelect",1,"custom-select",3,"ngModelChange","change","ngModel"],[3,"value"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50","grey-text","font-monospace"],[1,"font-monospace","grey-text"],[1,"btn","btn-danger","m-0","ms-3",3,"click","disabled","ngClass"],[1,"fas",3,"ngClass"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"],[1,"fas","fa-spinner","fa-pulse"]],template:function(n,i){n&1&&(o(0,"div",0)(1,"div",1)(2,"h5",2),c(3),m(4,"translate"),a(),o(5,"button",3),m(6,"translate"),b("click",function(){return i.dismissModal()}),a()(),o(7,"div",4),_(8,ne,5,3),_(9,le,17,11),a(),o(10,"div",5)(11,"div",6),_(12,ce,3,4,"button",7),a(),o(13,"div",8),_(14,de,3,3,"button",9),a(),o(15,"div",10),_(16,ue,3,3,"button",11),a()()()),n&2&&(s(3),g(p(4,8,"reset.accessory_ind.title")),s(2),f("disabled",i.clicked),A("aria-label",p(6,10,"form.button_close")),s(3),u(i.accessoriesExist?-1:8),s(),u(i.accessoriesExist?9:-1),s(3),u(i.accessoriesExist?12:-1),s(2),u(i.accessoriesExist?-1:14),s(2),u(i.accessoriesExist?16:-1))},dependencies:[j,H,q,G,z,O,W,Q],encapsulation:2})}return t})();export{ke as a};
|
package/public/chunk-2E7HLMEU.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{B as G,C as Q,c as $,d as C,e as B,f as O,g as T,j as w,m as q,q as z,r as D,y as H,z as A}from"./chunk-MCPFJTIS.js";import{b as K}from"./chunk-4FMF7TRK.js";import{d as U}from"./chunk-6LB7WDKS.js";import{b as J}from"./chunk-DMXOO6AC.js";import{l as j,p as W}from"./chunk-4PRUAGPI.js";import{Ac as L,Ga as x,Gb as E,Ib as M,Kc as N,La as i,M as I,Nc as V,Pb as v,Qb as F,Vb as g,Wa as k,Wb as h,Xb as R,Xc as P,gc as f,h as y,ja as p,lb as u,mb as c,mc as l,nc as d,rb as m,sb as r,tb as a,ub as s,w as S,xc as b}from"./chunk-WWMJUVLA.js";var Y=["password"],Z=["username"],ee=["otp"],te=e=>({background:e}),ie=e=>({anim:e}),X=e=>({"is-invalid":e});function ne(e,_){if(e&1&&(r(0,"div",8)(1,"span",12),s(2,"i",13),a(),s(3,"input",14,0),l(5,"translate"),a(),r(6,"div",8)(7,"span",12),s(8,"i",15),a(),s(9,"input",16,1),l(11,"translate"),a()),e&2){let n=M();i(3),m("placeholder",d(5,4,"users.label_username"))("ngClass",f(8,X,n.form.controls.username.dirty&&n.form.controls.username.errors)),i(6),m("placeholder",d(11,6,"users.label_password"))("ngClass",f(10,X,n.form.controls.password.dirty&&n.form.controls.password.errors))}}function oe(e,_){e&1&&(r(0,"div",8)(1,"span",12),s(2,"i",17),a(),s(3,"input",18,2),l(5,"translate"),a()),e&2&&(i(3),m("placeholder",d(5,1,"login.label_2fa_code")))}function ae(e,_){e&1&&(r(0,"div",9)(1,"div",12),s(2,"i",19),a(),r(3,"div",20)(4,"div",21),g(5),l(6,"translate"),a(),s(7,"div",22),l(8,"translate"),a()()),e&2&&(i(5),h(d(6,2,"login.invalid_credentials")),i(2),m("innerHTML",d(8,4,"login.invalid_credentials_2"),x))}function re(e,_){e&1&&(r(0,"div",9)(1,"div",12),s(2,"i",19),a(),r(3,"div",20)(4,"div",21),g(5),l(6,"translate"),a(),s(7,"div",22),l(8,"translate"),a()()),e&2&&(i(5),h(d(6,2,"login.invalid_code")),i(2),m("innerHTML",d(8,4,"login.invalid_credentials_2"),x))}var _e=(()=>{class e{$auth=p(K);$cdr=p(L);$router=p(U);$settings=p(J);targetRoute;validNonAdminRoutes=["/accessories","/plugins","/logs","/support"];passwordInput=b("password");usernameInput=b("username");otpInput=b("otp");backgroundStyle;invalidCredentials=!1;invalid2faCode=!1;twoFactorCodeRequired=!1;inProgress=!1;form;ngOnInit(){this.form=new T({username:new w(""),password:new w("")}),this.form.valueChanges.pipe(I(500)).subscribe(n=>{let o=this.passwordInput()?.nativeElement.value;o&&o!==n.password&&this.form.controls.password.setValue(o)}),this.targetRoute=window.sessionStorage.getItem("target_route")||"",this.setBackground()}ngAfterViewChecked(){this.$cdr.detectChanges()}onSubmit(){return y(this,null,function*(){this.invalidCredentials=!1,this.invalid2faCode=!1,this.inProgress=!0,document.getElementById("submit-button")?.blur();let n=this.passwordInput()?.nativeElement.value;n&&n!==this.form.get("password").value&&this.form.controls.password.setValue(n);let o=this.usernameInput()?.nativeElement.value;if(o&&o!==this.form.get("username").value&&this.form.controls.username.setValue(o),this.twoFactorCodeRequired){let t=this.otpInput()?.nativeElement.value;t&&t!==this.form.get("otp").value&&this.form.controls.username.setValue(t)}try{yield this.$auth.login(this.form.getRawValue()),!this.$auth.user.admin&&!this.validNonAdminRoutes.includes(this.targetRoute)&&(this.targetRoute="/"),this.$router.navigateByUrl(this.targetRoute),window.sessionStorage.removeItem("target_route")}catch(t){t.status===412?(this.form.controls.otp?(this.form.controls.otp.setErrors(["Invalid Code"]),this.invalid2faCode=!0):this.form.addControl("otp",new w("",[C.required,C.minLength(6),C.maxLength(6)])),this.twoFactorCodeRequired=!0,setTimeout(()=>{document.getElementById("form-ota").focus()},100)):this.invalidCredentials=!0}this.inProgress=!1})}setBackground(){return y(this,null,function*(){if(this.$settings.settingsLoaded||(yield S(this.$settings.onSettingsLoaded)),this.$settings.env.customWallpaperHash){let n=`${W.api.base}/auth/wallpaper/${this.$settings.env.customWallpaperHash}`;this.backgroundStyle=`url('${n}') center/cover`}})}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=k({type:e,selectors:[["ng-component"]],viewQuery:function(o,t){o&1&&(v(t.passwordInput,Y,5),v(t.usernameInput,Z,5),v(t.otpInput,ee,5)),o&2&&F(3)},decls:15,vars:18,consts:[["username",""],["password",""],["otp",""],[1,"login-container","gradient","d-flex","align-items-start","justify-content-center",3,"ngStyle","ngClass"],[1,"w-100","login-card","d-flex","py-4","flex-column"],["ngSrc","assets/homebridge-color-round.svg","alt","Homebridge Logo","height","100","width","100","priority","true",1,"homebridge-logo","mx-auto","my-3"],["novalidate","",3,"ngSubmit","formGroup"],[1,"mb-4","text-center"],[1,"input-group","mb-4"],[1,"input-group","no-border","mb-4"],[1,"text-center"],["tabindex","3","id","submit-button","type","submit",1,"btn","btn-primary","mb-2",3,"disabled"],[1,"input-group-text","custom-input"],[1,"fas","fa-user","primary-text","fa-lg"],["formControlName","username","type","text","id","form-username","autofocus","","autocomplete","username","autocapitalize","none","tabindex","1","required","",1,"form-control","custom-input",3,"placeholder","ngClass"],[1,"fas","fa-lock","primary-text","fa-lg"],["formControlName","password","type","password","id","form-pass","autocomplete","current-password","tabindex","2","required","",1,"form-control","custom-input",3,"placeholder","ngClass"],[1,"fas","fa-key","primary-text","fa-lg"],["formControlName","otp","type","text","id","form-ota","autofocus","","autocomplete","one-time-code","autocapitalize","none","inputmode","numeric","pattern","[0-9]*","tabindex","1",1,"form-control","custom-input",3,"placeholder"],[1,"fas","fa-exclamation-triangle","pink-text","fa-lg"],[1,"form-control","custom-input"],[1,"small","grey-text","fw-semibold"],[1,"small","grey-text",3,"innerHTML"]],template:function(o,t){o&1&&(r(0,"div",3)(1,"div",4),s(2,"img",5),r(3,"form",6),E("ngSubmit",function(){return t.onSubmit()}),r(4,"h4",7),g(5),l(6,"translate"),a(),u(7,ne,12,12),u(8,oe,6,3,"div",8),u(9,ae,9,6,"div",9),u(10,re,9,6,"div",9),r(11,"div",10)(12,"button",11),g(13),l(14,"translate"),a()()()()()),o&2&&(m("ngStyle",f(14,te,t.backgroundStyle))("ngClass",f(16,ie,!t.backgroundStyle)),i(3),m("formGroup",t.form),i(2),h(d(6,10,"setup.welcome_to_homebridge")),i(2),c(t.twoFactorCodeRequired?-1:7),i(),c(t.twoFactorCodeRequired?8:-1),i(),c(t.invalidCredentials?9:-1),i(),c(t.invalid2faCode?10:-1),i(2),m("disabled",t.form.invalid),i(),R(" ",d(14,12,"form.button_continue")," "))},dependencies:[V,G,q,$,B,O,H,A,Q,z,D,N,P,j],styles:["body{overflow:scroll!important} body.dark-mode .login-card{background-color:#2b2b2b;color:#fff}.login-container[_ngcontent-%COMP%]{z-index:-1;padding-top:2em;padding-bottom:2em;min-height:100%;background-size:300% 300%}.anim[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_gradient 20s ease infinite;-moz-animation:gradient 20s ease infinite;-o-animation:gradient 20s ease infinite;animation:_ngcontent-%COMP%_gradient 20s ease infinite}@keyframes _ngcontent-%COMP%_gradient{0%{background-position:0 50%}50%{background-position:100% 50%}to{background-position:0 50%}}.login-card[_ngcontent-%COMP%]{max-width:550px;border-radius:1rem;padding-right:25px;padding-left:25px;background-color:#ffffffe6}.login-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (max-width: 575px){.login-card[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em}}.homebridge-logo[_ngcontent-%COMP%]{margin-bottom:10px}"]})}return e})();export{_e as LoginComponent};
|
package/public/chunk-2FOPYKT6.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as n}from"./chunk-IPOMOAHN.js";import{g as i}from"./chunk-6LB7WDKS.js";import"./chunk-DMXOO6AC.js";import"./chunk-4PRUAGPI.js";import{Xa as r,fa as o}from"./chunk-WWMJUVLA.js";var a=[{path:"",loadComponent:()=>import("./chunk-H3TL3W5T.js").then(t=>t.SetupWizardComponent)}],u=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({imports:[i.forChild(a),i]})}return t})();var l=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({providers:[n],imports:[u]})}return t})();export{l as SetupWizardModule};
|
package/public/chunk-2UI7JQVK.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as r}from"./chunk-6LB7WDKS.js";import{Xa as e,fa as t}from"./chunk-WWMJUVLA.js";var u=[{path:"",loadComponent:()=>import("./chunk-SZHGGXWK.js").then(o=>o.LogsComponent)}],n=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[r.forChild(u),r]})}return o})();var p=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[n]})}return o})();export{p as LogsModule};
|