@duplicati/ngclient 0.0.73 → 0.0.75
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/chunk-27WZKWHA.js +1 -0
- package/{chunk-NPTPCXGL.js → chunk-44756Q4J.js} +1 -1
- package/{chunk-TLE3RBQZ.js → chunk-47W7PRQ6.js} +1 -1
- package/chunk-4U7FEVBB.js +6 -0
- package/{chunk-GGE2QVTB.js → chunk-6UCUDY7Y.js} +1 -1
- package/chunk-6UENVGZZ.js +1 -0
- package/{chunk-7DFG7XLB.js → chunk-75LRDDG3.js} +1 -1
- package/{chunk-3IX6IFMC.js → chunk-AVE4TFNY.js} +1 -1
- package/{chunk-F2G22QDO.js → chunk-B2WGFVBU.js} +1 -1
- package/chunk-BATRQ3TX.js +1 -0
- package/{chunk-ZDKGDOMK.js → chunk-BH76PDAQ.js} +1 -1
- package/{chunk-5RREYMYL.js → chunk-BRC25F45.js} +1 -1
- package/{chunk-UWXUWL6K.js → chunk-EIXQH7S4.js} +1 -1
- package/chunk-GDAK2UGG.js +1 -0
- package/chunk-GJ6GRAEW.js +1 -0
- package/{chunk-RSKHLT37.js → chunk-GUYLCNVM.js} +1 -1
- package/{chunk-I24WOYYC.js → chunk-H7TJZPPJ.js} +1 -1
- package/{chunk-DDV6526X.js → chunk-HSJOAC3M.js} +1 -1
- package/{chunk-ME6FB7HY.js → chunk-JRIOZ5MP.js} +1 -1
- package/{chunk-LINJJMSY.js → chunk-JZQC7RPU.js} +1 -1
- package/{chunk-53QX2PXI.js → chunk-MLTG5TKC.js} +1 -1
- package/{chunk-W3KOTZHW.js → chunk-MO2Z6B4L.js} +1 -1
- package/{chunk-52DF5DLH.js → chunk-O6RVMQZJ.js} +1 -1
- package/{chunk-NONIM5EZ.js → chunk-OW3MZ4H6.js} +1 -1
- package/{chunk-GQLC6TYK.js → chunk-R7TYMWSG.js} +1 -1
- package/{chunk-NESEFSQ3.js → chunk-RHYWPAMY.js} +1 -1
- package/{chunk-NGOETFI3.js → chunk-VYEOCR5P.js} +1 -1
- package/{chunk-7DXV4HCW.js → chunk-WC5LGG33.js} +1 -1
- package/chunk-YBPSOGY5.js +1 -0
- package/index.html +1 -1
- package/main-LMBIECYV.js +1 -0
- package/package.json +1 -1
- package/chunk-2P3GS5BJ.js +0 -1
- package/chunk-3BW5OEST.js +0 -1
- package/chunk-ASPLJ6GL.js +0 -1
- package/chunk-CP2S6DC4.js +0 -1
- package/chunk-IGKAD6UF.js +0 -6
- package/chunk-QHSLOG7W.js +0 -1
- package/chunk-UOIY2QTL.js +0 -1
- package/main-PHZR6ITE.js +0 -1
package/chunk-UOIY2QTL.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-C6Q5SG76.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-GQLC6TYK.js")},{path:"destination",loadComponent:()=>import("./chunk-NPTPCXGL.js")},{path:"source-data",loadComponent:()=>import("./chunk-ME6FB7HY.js")},{path:"schedule",loadComponent:()=>import("./chunk-3IX6IFMC.js")},{path:"options",loadComponent:()=>import("./chunk-5RREYMYL.js")}];export{o as default};
|
package/main-PHZR6ITE.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as ie,c as ae}from"./chunk-ANP5WEOJ.js";import{a as L}from"./chunk-22GS6UCG.js";import{a as re}from"./chunk-NGOETFI3.js";import{a as y}from"./chunk-4RXB65JX.js";import{a as I}from"./chunk-I24WOYYC.js";import{a as oe}from"./chunk-ASPLJ6GL.js";import{a as b,b as u}from"./chunk-CP2S6DC4.js";import"./chunk-6TZWRTRA.js";import{a as w}from"./chunk-2P3GS5BJ.js";import{d as te}from"./chunk-KJ4O6F3R.js";import{b as Z,c as Q,f as Y,g as ee}from"./chunk-ETEYALHD.js";import{a as X}from"./chunk-TS4YY2WO.js";import{c as ne}from"./chunk-NQVULKI2.js";import{a as $,b as K,d as z,e as _,f as q}from"./chunk-6LUM2XU4.js";import{ua as B}from"./chunk-3WKDD2IN.js";import{b as se}from"./chunk-GK7T43YY.js";import{Dc as D,Eb as F,Ec as G,F as v,L as j,N as S,Oc as J,P as H,T as R,Z as r,d as P,eb as W,ja as U,m as E,q as O,va as d,y as N,z as x}from"./chunk-Q3JJWGXW.js";import"./chunk-C6Q5SG76.js";var M=class e{#o=r(y);#s=r(b);ngOnInit(){this.#s.fetchConfig(),this.#o.clearAllNotCurrentVersion()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=W({type:e,selectors:[["app-root"]],decls:1,vars:0,template:function(t,n){t&1&&F(0,"router-outlet")},dependencies:[Z],encapsulation:2})};var ce={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var T=class e{#o=r(te);isLoaded=d(!1);webmodules=d(null);preload(o=!1){let t=this.#o.getApiV1Webmodules().pipe(H(n=>this.webmodules.set(n)),v(()=>this.isLoaded.set(!0)));if(o)return t;t.subscribe()}static \u0275fac=function(t){return new(t||e)};static \u0275prov=R({token:e,factory:e.\u0275fac,providedIn:"root"})};var fe=()=>{let e=r(w);return e.token()?!0:e.refreshToken().pipe(O(()=>!0))},ge=()=>{let e=r(b),o=r(I),t=r(U),n=e.relayIsEnabled()?"longpoll":"websocket",p=[t.get(L).preload(!0),t.get(L).preloadFilterGroups(!0),t.get(T).preload(!0)];return e.configLoaded===null?N(p).pipe(O(()=>n)):e.configLoaded?.pipe(S(()=>N(p)))},le=[{path:"",children:[{path:"login",canActivate:[],loadComponent:()=>import("./chunk-ZDKGDOMK.js")},{path:"logout",loadComponent:()=>import("./chunk-F2G22QDO.js")},{path:"",canActivate:[fe],children:[{path:"",canActivate:[ge],loadComponent:()=>import("./chunk-QHSLOG7W.js"),children:[{path:"",loadComponent:()=>import("./chunk-NONIM5EZ.js")},{path:"add-backup",loadComponent:()=>import("./chunk-52DF5DLH.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-BZKHWYFG.js")},{path:"backup/import",loadComponent:()=>import("./chunk-L5ZZZJEY.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-7DXV4HCW.js"),loadChildren:()=>import("./chunk-UOIY2QTL.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-7DXV4HCW.js"),loadChildren:()=>import("./chunk-UOIY2QTL.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-GGE2QVTB.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-DDV6526X.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-UWXUWL6K.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-RSKHLT37.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-W3KOTZHW.js")},{path:"from-config",loadComponent:()=>import("./chunk-5KGMNBD7.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-NESEFSQ3.js"),loadChildren:()=>import("./chunk-LINJJMSY.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-NESEFSQ3.js"),loadChildren:()=>import("./chunk-LINJJMSY.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-NESEFSQ3.js"),loadChildren:()=>import("./chunk-LINJJMSY.js")},{path:"settings",loadComponent:()=>import("./chunk-3BW5OEST.js")},{path:"about",loadComponent:()=>import("./chunk-C6ELLTE3.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-VKMKZKNR.js")},{path:"changelog",loadComponent:()=>import("./chunk-2QQJM43S.js")},{path:"libraries",loadComponent:()=>import("./chunk-VJQDP23H.js")},{path:"system-info",loadComponent:()=>import("./chunk-BY56DZ7Y.js")},{path:"logs",loadComponent:()=>import("./chunk-BEBLA2OU.js")}]}]}]}]}];var A=null,me=(e,o)=>{let t=r(w),n=r(Q),p=r(y),i=r(u),m=p.getItem("locale"),s=r(ne),c=ie(m),f=e.url==="/api/v1/auth/login",l=e;if(t.token()&&e.url.startsWith(i.baseUrl)){let a=e.headers.set("Authorization",`Bearer ${t.token()}`);m&&m!=="en-US"&&(a=a.set("X-Ui-Language",c)),l=e.clone({headers:a})}return o(l).pipe(x(a=>{if(s.error(a.message),!f&&a.status===401&&!A&&(A=t.refreshToken().pipe(j())),!f&&a.status===401)return A.pipe(S(()=>o(e.clone({headers:e.headers.set("Authorization",`Bearer ${t.token()}`)}))),x(g=>(n.navigate(["/logout"]),E(()=>g))),v(()=>A=null));let h=`Error Code: ${a.status}, Message: ${a.message}`;return E(()=>({error:a,message:h}))}))};var ye="1.0.0",de="portal-proxy-client",be=1,k=class e{#o=1e3;#s=r(u);#t=d("disconnected");#l=d(this.#o);#i=d(!1);#n=d(!1);#a=d(null);isConnectedToMachineServer=this.#n.asReadonly();wsState=this.#t.asReadonly();#p=[];#r={};#e=null;#m=new TextDecoder("utf-8");#c=null;#d=J(()=>{let o=this.#i(),t=this.#l(),n=this.#a();if(!n||!o||!t||t<this.#o){this.#c&&window.clearInterval(this.#c);return}this.#c=window.setInterval(()=>{this.connectToMachineServer(n)},t)});utf8Atob(o){let t=Uint8Array.from(atob(o),p=>p.charCodeAt(0)),n=this.#m.decode(t);return n?JSON.parse(n):null}connectToMachineServer(o,t){let n=t?.reconnect??!1;this.#e&&this.wsState()==="authenticated"&&!n||(this.#e&&this.wsState()!=="authenticated"&&this.#e.close(),this.#e=new WebSocket(this.#s.machineServerUrl),this.#e.onopen=()=>{this.#t.set("connect"),this.#n.set(!0),this.#i.set(!1),this.#a.set(null)},this.#e.onclose=()=>{this.#t.set("disconnected"),this.#n.set(!1),this.#a.set(o),this.#i.set(!0)},this.#e.onerror=()=>{this.#t.set("error")},this.#e.onmessage=p=>{let i=JSON.parse(p.data);if(this.wsState()==="connect"){if(i.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${i.type}'`);return}let s={token:o,publicKey:"",clientVersion:ye,protocolVersion:be},c=this.createResponse(i,"authportal",s);this.#t.set("welcome"),this.#e?.send(c)}else if(this.wsState()==="welcome"){if(i.type!=="authportal"){this.disconnectFromMachineServer(`Unexpected message type, expected 'authportal' but got '${i.type}'`);return}var m=JSON.parse(i.payload??"");if(m.accepted===!1){this.disconnectFromMachineServer("Authentication failed");return}for(this.#t.set("authenticated"),this.#n.set(!0);this.#p.length>0;){let s=this.#p.pop();s&&this.#r[s.messageId]&&this.activateCommand(s)}}else if(this.wsState()==="authenticated"){if(i.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${i.type}'`);return}let s=this.#r[i.messageId];if(s){if(i.errorMessage){s.reject(i.errorMessage);return}else{let c=JSON.parse(i.payload??"");c.body=c?.body==null?null:this.utf8Atob(c.body),s.resolve(c)}delete this.#r[i.messageId],window.clearTimeout(s.timer)}}})}disconnectFromMachineServer(o=null){o&&console.error(o),this.#e?.close(),this.#e=null,this.#t.set("disconnected"),this.#n.set(!1)}createResponse(o,t,n){let p={from:de,to:o.from,type:t,messageId:o.messageId,payload:JSON.stringify(n)};return JSON.stringify(p)}sendCommand(o,t,n,p,i,m,s=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(o),new Promise((c,f)=>{let l=crypto.randomUUID(),h={from:de,to:t,type:"command",messageId:l,payload:JSON.stringify({method:n,path:p,body:i,headers:m})},g={resolve:c,reject:f,timer:window.setTimeout(()=>{let C=this.#r[l];C&&(delete this.#r[l],C.reject("Timeout"))},s)};this.#r[l]=g,this.#n()?this.activateCommand(h):this.#p.push(h)})}activateCommand(o){this.#e?.send(JSON.stringify(o))}static \u0275fac=function(t){return new(t||e)};static \u0275prov=R({token:e,factory:e.\u0275fac,providedIn:"root"})};function Ce(e){if(typeof e!="string")return null;let t=new TextEncoder().encode(e);return window.btoa(String.fromCharCode(...t))}var ue=(e,o)=>{let n=r(b).config(),p=r(u);if(n===null)return o(e);let i=r(k),m=Ce(e.body),s={};e.headers.keys().forEach(a=>{s[a]=e.headers.get(a)??""});let c=e.headers.get("timeout"),f=c!==null?parseInt(c):p.defaultTimeout,l=i.sendCommand(n.accessToken,n.clientId,e.method,e.url,m,s,f);return new P(a=>{l.then(h=>{let g=new $;s!=null&&Object.keys(s).forEach(V=>{g.set(V,s[V])});let C=new K({body:h.body,status:h.code,statusText:"OK",headers:g});a.next(C),a.complete()})})};var he={providers:[D(),Y(le,ee()),z(q(),_([ue,me])),y,{provide:u,useValue:ce},{provide:G,useValue:ae()},re,I,se,B,oe]};X(M,he);
|