homebridge-config-ui-x 5.3.1-beta.6 → 5.3.1-beta.8
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 +8 -1
- package/dist/modules/status/status.controller.d.ts +0 -1
- package/dist/modules/status/status.gateway.d.ts +0 -1
- package/dist/modules/status/status.service.d.ts +0 -1
- package/dist/modules/status/status.service.js +0 -1
- package/dist/modules/status/status.service.js.map +1 -1
- package/package.json +1 -1
- package/public/assets/hap-icons/air-purifier.svg +60 -48
- package/public/assets/hap-icons/air-quality-sensor.svg +28 -23
- package/public/assets/hap-icons/doorbell.svg +5 -13
- package/public/assets/hap-icons/microphone.svg +9 -17
- package/public/assets/hap-icons/{vacuum-on.svg → robot-vacuum.svg} +27 -24
- package/public/assets/hap-icons/speaker.svg +4 -4
- package/public/{chunk-55VRHX4J.js → chunk-23FYLGHC.js} +2 -2
- package/public/{chunk-CEOGTV3W.js → chunk-2JIV277Z.js} +1 -1
- package/public/{chunk-RLOXNDKY.js → chunk-3QFXC5X6.js} +1 -1
- package/public/{chunk-A3FDC2RI.js → chunk-6YLJWQUB.js} +1 -1
- package/public/{chunk-7DGKYQML.js → chunk-76XPFTSX.js} +1 -1
- package/public/{chunk-RD6RNUQD.js → chunk-7CDOEUGY.js} +1 -1
- package/public/{chunk-DLIN5XRB.js → chunk-7RYLBOQ5.js} +1 -1
- package/public/{chunk-SPBCLN6C.js → chunk-AAPPFSR7.js} +1 -1
- package/public/{chunk-45YKBUA7.js → chunk-ALZRCF67.js} +1 -1
- package/public/{chunk-5JJBA5NA.js → chunk-B2VW3ZQI.js} +1 -1
- package/public/{chunk-HKWKRLTJ.js → chunk-BNM7RGNK.js} +1 -1
- package/public/{chunk-CBO7A3WJ.js → chunk-BSXHN5WA.js} +1 -1
- package/public/{chunk-MFDWAJON.js → chunk-CNMZOW2D.js} +1 -1
- package/public/{chunk-H7IUJOQV.js → chunk-DSUQJPY2.js} +1 -1
- package/public/{chunk-JI7N45WI.js → chunk-EMOJK6NQ.js} +1 -1
- package/public/{chunk-5GFFBF2U.js → chunk-ESQQ74VV.js} +4 -4
- package/public/{chunk-3G44W43N.js → chunk-FBTBVR2O.js} +1 -1
- package/public/{chunk-FDE4QOCI.js → chunk-GHVVXIDF.js} +1 -1
- package/public/{chunk-SGRWNDKG.js → chunk-GR3ILWWZ.js} +1 -1
- package/public/{chunk-RIOL5L75.js → chunk-GWJ7ISZW.js} +1 -1
- package/public/{chunk-VXZULIDS.js → chunk-HEUWGOF3.js} +1 -1
- package/public/{chunk-NYLPZDFB.js → chunk-HWMBWLXB.js} +1 -1
- package/public/{chunk-2HOYB2OG.js → chunk-IXXVSSF7.js} +1 -1
- package/public/{chunk-P53ZAJKT.js → chunk-J23T3NRY.js} +1 -1
- package/public/{chunk-LGAXNHLN.js → chunk-JAZMMXSA.js} +1 -1
- package/public/{chunk-2MW4VCVC.js → chunk-JNVGCARV.js} +1 -1
- package/public/{chunk-D2B6WJXR.js → chunk-JXNVM6CK.js} +1 -1
- package/public/{chunk-VPFLC5T6.js → chunk-LBAYQDOV.js} +1 -1
- package/public/{chunk-BGO33NLB.js → chunk-LPDYQHMD.js} +1 -1
- package/public/{chunk-Z3YYYPO7.js → chunk-N2AJOFIZ.js} +1 -1
- package/public/{chunk-HYWVRZRF.js → chunk-OIOLFXMO.js} +1 -1
- package/public/{chunk-CP3RMAEH.js → chunk-PWD63BNX.js} +1 -1
- package/public/{chunk-IMRBVS7T.js → chunk-Q5XUVLJA.js} +1 -1
- package/public/{chunk-RQN36FME.js → chunk-R33OISYU.js} +1 -1
- package/public/{chunk-UIKKQXZE.js → chunk-RMRJFNIT.js} +1 -1
- package/public/{chunk-H7PHC7TD.js → chunk-SPLSJVTN.js} +1 -1
- package/public/{chunk-FN2SV3W4.js → chunk-SW6PIZF7.js} +1 -1
- package/public/{chunk-N5N26WGC.js → chunk-TJCBCOGJ.js} +1 -1
- package/public/chunk-TTMAUECI.js +12 -0
- package/public/{chunk-UM5FQBDM.js → chunk-V2QWJKFB.js} +1 -1
- package/public/{chunk-NKF5K4FR.js → chunk-V5ZUMJ2X.js} +1 -1
- package/public/{chunk-MQLQNZOG.js → chunk-VQIHIGLC.js} +1 -1
- package/public/{chunk-ZUDSTYUK.js → chunk-VRIOVBXE.js} +1 -1
- package/public/{chunk-VFLTIW32.js → chunk-WBB65MTJ.js} +1 -1
- package/public/{chunk-F7J56M55.js → chunk-XWQ3MP3R.js} +1 -1
- package/public/{chunk-I2CYU7FC.js → chunk-YL2ITUR4.js} +1 -1
- package/public/{chunk-PML6IICL.js → chunk-YWMVRJI5.js} +1 -1
- package/public/index.html +1 -1
- package/public/main-I34D7ZNT.js +1 -0
- package/public/assets/hap-icons/vacuum-off.svg +0 -34
- package/public/chunk-D7RI4DRX.js +0 -12
- package/public/main-JAQ6A2NZ.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as i}from"./chunk-25NXLXGL.js";import"./chunk-RJOGO4M5.js";import{ha as t,nb as e}from"./chunk-WEVBEUAJ.js";var d=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"docker",loadChildren:()=>import("./chunk-
|
|
1
|
+
import{g as i}from"./chunk-25NXLXGL.js";import"./chunk-RJOGO4M5.js";import{ha as t,nb as e}from"./chunk-WEVBEUAJ.js";var d=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"docker",loadChildren:()=>import("./chunk-AAPPFSR7.js").then(o=>o.DockerModule)},{path:"linux",loadChildren:()=>import("./chunk-J23T3NRY.js").then(o=>o.LinuxModule)},{path:"terminal",loadChildren:()=>import("./chunk-EMOJK6NQ.js").then(o=>o.TerminalModule)}],l=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[i.forChild(d),i]})}return o})();var p=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[l]})}return o})();export{p as PlatformToolsModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as _,b as D}from"./chunk-
|
|
1
|
+
import{a as _,b as D}from"./chunk-LPDYQHMD.js";import{m as c,n as S}from"./chunk-SPLSJVTN.js";import{f as x}from"./chunk-RJOGO4M5.js";import{C as v,g as O,ga as h,h as a,ha as E,ja as y,ka as l,la as f,nb as I,r as p,va as j,w as d,x as T,z as w}from"./chunk-WEVBEUAJ.js";var g=new y("JWT_OPTIONS"),m=(()=>{class r{constructor(e=null){this.tokenGetter=e&&e.tokenGetter||function(){}}urlBase64Decode(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:{t+="==";break}case 3:{t+="=";break}default:throw new Error("Illegal base64url string!")}return this.b64DecodeUnicode(t)}b64decode(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o="";if(e=String(e).replace(/=+$/,""),e.length%4===1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(let i=0,s,n,b=0;n=e.charAt(b++);~n&&(s=i%4?s*64+n:n,i++%4)?o+=String.fromCharCode(255&s>>(-2*i&6)):0)n=t.indexOf(n);return o}b64DecodeUnicode(e){return decodeURIComponent(Array.prototype.map.call(this.b64decode(e),t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)).join(""))}decodeToken(e=this.tokenGetter()){return e instanceof Promise?e.then(t=>this._decodeToken(t)):this._decodeToken(e)}_decodeToken(e){if(!e||e==="")return null;let t=e.split(".");if(t.length!==3)throw new Error("The inspected token doesn't appear to be a JWT. Check to make sure it has three parts and see https://jwt.io for more.");let o=this.urlBase64Decode(t[1]);if(!o)throw new Error("Cannot decode the token.");return JSON.parse(o)}getTokenExpirationDate(e=this.tokenGetter()){return e instanceof Promise?e.then(t=>this._getTokenExpirationDate(t)):this._getTokenExpirationDate(e)}_getTokenExpirationDate(e){let t;if(t=this.decodeToken(e),!t||!t.hasOwnProperty("exp"))return null;let o=new Date(0);return o.setUTCSeconds(t.exp),o}isTokenExpired(e=this.tokenGetter(),t){return e instanceof Promise?e.then(o=>this._isTokenExpired(o,t)):this._isTokenExpired(e,t)}_isTokenExpired(e,t){if(!e||e==="")return!0;let o=this.getTokenExpirationDate(e);return t=t||0,o===null?!1:!(o.valueOf()>new Date().valueOf()+t*1e3)}getAuthScheme(e,t){return typeof e=="function"?e(t):e}}return r.\u0275fac=function(e){return new(e||r)(l(g))},r.\u0275prov=h({token:r,factory:r.\u0275fac}),r})(),$=r=>r instanceof Promise?v(()=>r):p(r),R=(()=>{class r{constructor(e,t,o){this.jwtHelper=t,this.document=o,this.standardPorts=["80","443"],this.tokenGetter=e.tokenGetter,this.headerName=e.headerName||"Authorization",this.authScheme=e.authScheme||e.authScheme===""?e.authScheme:"Bearer ",this.allowedDomains=e.allowedDomains||[],this.disallowedRoutes=e.disallowedRoutes||[],this.throwNoTokenError=e.throwNoTokenError||!1,this.skipWhenExpired=e.skipWhenExpired}isAllowedDomain(e){let t=new URL(e.url,this.document.location.origin);if(t.host===this.document.location.host)return!0;let o=`${t.hostname}${t.port&&!this.standardPorts.includes(t.port)?":"+t.port:""}`;return this.allowedDomains.findIndex(i=>typeof i=="string"?i===o:i instanceof RegExp?i.test(o):!1)>-1}isDisallowedRoute(e){let t=new URL(e.url,this.document.location.origin);return this.disallowedRoutes.findIndex(o=>{if(typeof o=="string"){let i=new URL(o,this.document.location.origin);return i.hostname===t.hostname&&i.pathname===t.pathname}return o instanceof RegExp?o.test(e.url):!1})>-1}handleInterception(e,t,o){let i=this.jwtHelper.getAuthScheme(this.authScheme,t);if(!e&&this.throwNoTokenError)throw new Error("Could not get token from tokenGetter function.");let s=p(!1);return this.skipWhenExpired&&(s=e?$(this.jwtHelper.isTokenExpired(e)):p(!0)),e?s.pipe(T(n=>n&&this.skipWhenExpired?t.clone():t.clone({setHeaders:{[this.headerName]:`${i}${e}`}})),w(n=>o.handle(n))):o.handle(t)}intercept(e,t){if(!this.isAllowedDomain(e)||this.isDisallowedRoute(e))return t.handle(e);let o=this.tokenGetter(e);return $(o).pipe(w(i=>this.handleInterception(i,e,t)))}}return r.\u0275fac=function(e){return new(e||r)(l(g),l(m),l(j))},r.\u0275prov=h({token:r,factory:r.\u0275fac}),r})(),F=(()=>{class r{constructor(e){if(e)throw new Error("JwtModule is already loaded. It should only be imported in your application's main module.")}static forRoot(e){return{ngModule:r,providers:[{provide:x,useClass:R,multi:!0},e.jwtOptionsProvider||{provide:g,useValue:e.config},m]}}}return r.\u0275fac=function(e){return new(e||r)(l(r,12))},r.\u0275mod=I({type:r}),r.\u0275inj=E({}),r})();var k=O(_(),1);var q=(()=>{class r{$api=f(S);$jwtHelper=f(m);$settings=f(D);token;user={};logoutTimer;constructor(){this.loadToken()}login(e){return a(this,null,function*(){let t=yield d(this.$api.post("/auth/login",e));if(!this.validateToken(t.access_token))throw new Error("Invalid username or password.");window.localStorage.setItem(c.jwt.tokenKey,t.access_token),yield this.$settings.getAppSettings()})}noauth(){return a(this,null,function*(){let e=yield d(this.$api.post("/auth/noauth",{}));if(this.validateToken(e.access_token))window.localStorage.setItem(c.jwt.tokenKey,e.access_token),yield this.$settings.getAppSettings();else throw new Error("Invalid username or password.")})}logout(){this.user=null,this.token=null,window.localStorage.removeItem(c.jwt.tokenKey),window.location.reload()}loadToken(){return a(this,null,function*(){this.$settings.settingsLoaded||(yield d(this.$settings.onSettingsLoaded));let e=window.localStorage.getItem(c.jwt.tokenKey);e&&this.validateToken(e)})}checkToken(){return a(this,null,function*(){try{return yield d(this.$api.get("/auth/check"))}catch(e){e.status===401&&(console.error("Current token is not valid"),this.logout())}})}isLoggedIn(){return this.$settings.env.instanceId!==this.user.instanceId?(console.error("Token does not match instance"),!1):this.user&&this.token&&!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)}validateToken(e){try{return this.$jwtHelper.isTokenExpired(e,this.$settings.serverTimeOffset)&&this.logout(),this.user=this.$jwtHelper.decodeToken(e),this.token=e,this.setLogoutTimer(),!0}catch{return window.localStorage.removeItem(c.jwt.tokenKey),this.token=null,!1}}setLogoutTimer(){if(clearTimeout(this.logoutTimer),!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)){let t=(0,k.default)(this.$jwtHelper.getTokenExpirationDate(this.token)).diff((0,k.default)().add(this.$settings.serverTimeOffset,"s"),"millisecond");t<=2147483647&&(this.logoutTimer=setTimeout(()=>a(this,null,function*(){this.$settings.formAuth===!1?(yield this.noauth(),window.location.reload()):this.logout()}),t))}}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac})}return r})();export{F as a,q as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"./chunk-IMT3YYMD.js";import{k as p,n as m}from"./chunk-
|
|
1
|
+
import{a as u}from"./chunk-IMT3YYMD.js";import{k as p,n as m}from"./chunk-SPLSJVTN.js";import{a as c}from"./chunk-CPAHENLQ.js";import{g as f,ga as n,h as r,la as a,w as s}from"./chunk-WEVBEUAJ.js";var l=f(u(),1);var $=(()=>{class e{$api=a(m);$toastr=a(p);$translate=a(c);downloadBackup(){return r(this,null,function*(){let t=yield s(this.$api.get("/backup/download",{observe:"response",responseType:"blob"})),i=t.headers.get("File-Name")||"homebridge-backup.tar.gz",o=t.body.size;if(o>globalThis.backup.maxBackupSize){let b=this.$translate.instant("backup.backup_exceeds_max_size",{maxBackupSizeText:globalThis.backup.maxBackupSizeText,size:`${(o/1048576).toFixed(1)}MB`});this.$toastr.warning(b,this.$translate.instant("toast.title_warning"))}(0,l.saveAs)(t.body,i)})}static \u0275fac=function(i){return new(i||e)};static \u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{$ as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as z,b,c as k}from"./chunk-H337OZRD.js";import{a as u}from"./chunk-
|
|
1
|
+
import{a as z,b,c as k}from"./chunk-H337OZRD.js";import{a as u}from"./chunk-TJCBCOGJ.js";import{n as f}from"./chunk-SPLSJVTN.js";import{M as t,g as n,ga as p,h as c,la as a,n as h}from"./chunk-WEVBEUAJ.js";var d=n(z(),1),l=n(b(),1),m=n(k(),1);var v=(()=>{class o{$ws=a(u);$api=a(f);io;fitAddon;webLinksAddon;resize;elementResize;dataDisposable=null;isInitializing=!1;hasUserTyped=!1;term;destroyTerminal(){this.dataDisposable&&(this.dataDisposable.dispose(),this.dataDisposable=null),this.io&&this.io.end(),this.term&&(this.term.dispose(),this.term=null),this.resize&&this.resize.complete(),this.elementResize&&this.elementResize.complete(),this.isInitializing=!1,this.hasUserTyped=!1}destroyPersistentSession(){this.destroyTerminal(),this.$api.post("/platform-tools/terminal/destroy-persistent-session",{}).subscribe({error:s=>console.error("Failed to destroy persistent session:",s)})}detachTerminal(){this.dataDisposable&&(this.dataDisposable.dispose(),this.dataDisposable=null),this.term&&this.term.dispose(),this.resize&&this.resize.complete(),this.elementResize&&this.elementResize.complete(),this.isInitializing=!1}hasActiveSession(){return this.io&&this.io.socket&&this.io.socket.connected}checkBackendPersistentSession(){return c(this,null,function*(){try{return(yield this.$api.get("/platform-tools/terminal/has-persistent-session").toPromise()).hasPersistentSession}catch(s){return console.error("Failed to check backend persistent session:",s),!1}})}hasUserTypedInSession(){return this.hasUserTyped}isTerminalReady(){return this.term&&!this.isInitializing}reconnectTerminal(s,e={},r){if(this.isInitializing)return!1;this.isInitializing=!0,this.elementResize=r,this.io&&this.io.socket&&this.io.socket.connected?(this.term=new m.Terminal(e),this.fitAddon=new d.FitAddon,this.webLinksAddon=new l.WebLinksAddon,setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.resize=new h,this.term.open(s.nativeElement),setTimeout(()=>{this.fitAddon.activate(this.term),this.fitAddon.fit()}),this.io.socket.removeAllListeners("stdout"),this.io.socket.removeAllListeners("process-exit"),this.io.socket.on("stdout",i=>{this.term.write(i)}),this.io.socket.on("process-exit",()=>{this.startSession()}),this.dataDisposable&&this.dataDisposable.dispose(),this.dataDisposable=this.term.onData(i=>{this.hasUserTyped=!0,this.io.socket.emit("stdin",i)}),this.term.onResize(i=>{this.resize.next(i)}),this.resize.pipe(t(500)).subscribe(i=>{this.io.socket.emit("resize",i)}),this.elementResize&&this.elementResize.pipe(t(100)).subscribe({next:()=>{this.fitAddon.fit()}}),this.io.socket.emit("start-session",{cols:this.term.cols,rows:this.term.rows}),this.isInitializing=!1):this.startTerminal(s,e,r)}startTerminal(s,e={},r){return this.isInitializing?!1:(this.isInitializing=!0,this.elementResize=r,this.io=this.$ws.connectToNamespace("platform-tools/terminal"),this.term=new m.Terminal(e),setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.fitAddon=new d.FitAddon,this.webLinksAddon=new l.WebLinksAddon,this.resize=new h,this.term.open(s.nativeElement),setTimeout(()=>{this.fitAddon.activate(this.term),this.fitAddon.fit()}),this.io.connected.pipe(t(200)).subscribe(()=>{this.startSession()}),this.io.socket.on("disconnect",()=>{this.term.write(`
|
|
2
2
|
\r
|
|
3
3
|
\rTerminal disconnected. Is the server running?
|
|
4
4
|
\r
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as r}from"./chunk-25NXLXGL.js";import"./chunk-RJOGO4M5.js";import{ha as e,nb as o}from"./chunk-WEVBEUAJ.js";var m=[{path:"",loadComponent:()=>import("./chunk-
|
|
1
|
+
import{g as r}from"./chunk-25NXLXGL.js";import"./chunk-RJOGO4M5.js";import{ha as e,nb as o}from"./chunk-WEVBEUAJ.js";var m=[{path:"",loadComponent:()=>import("./chunk-GWJ7ISZW.js").then(t=>t.TerminalComponent),canDeactivate:[t=>t.canDeactivate?t.canDeactivate():!0]}],n=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=o({type:t});static \u0275inj=e({imports:[r.forChild(m),r]})}return t})();var s=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=o({type:t});static \u0275inj=e({imports:[n]})}return t})();export{s as TerminalModule};
|