@duplicati/ngclient 0.0.67 → 0.0.68

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 (55) hide show
  1. package/assets/spk.woff2 +0 -0
  2. package/{chunk-I3KS7JEN.js → chunk-2WKUFTDI.js} +1 -1
  3. package/chunk-3ENWJFPQ.js +1 -0
  4. package/chunk-463RDJNA.js +1 -0
  5. package/{chunk-JWZZL2QQ.js → chunk-7FL7BKSK.js} +3 -3
  6. package/chunk-BYR5ESKA.js +1 -0
  7. package/chunk-CLWDOASW.js +1 -0
  8. package/chunk-CM2VLNFJ.js +1 -0
  9. package/chunk-CY7OE7LN.js +1 -0
  10. package/chunk-DG36NL4T.js +1 -0
  11. package/chunk-F7726SNN.js +1 -0
  12. package/{chunk-34N3NDDX.js → chunk-FC7IHW5V.js} +1 -1
  13. package/chunk-GZNEVVHC.js +1 -0
  14. package/chunk-IAWBIWRR.js +1 -0
  15. package/chunk-ICAVTIBO.js +1 -0
  16. package/chunk-IZGVBNDM.js +1 -0
  17. package/chunk-JHQY3IJK.js +1 -0
  18. package/chunk-K6NJFA6G.js +1 -0
  19. package/chunk-KMQU3ZBK.js +1 -0
  20. package/chunk-KYCK75MH.js +1 -0
  21. package/chunk-MCG7PVR2.js +1 -0
  22. package/chunk-N7TLL5YI.js +1 -0
  23. package/chunk-OC7KIUXG.js +6 -0
  24. package/chunk-OIRMDOOF.js +1 -0
  25. package/chunk-P4OQCLH3.js +1 -0
  26. package/chunk-UPSWAAP2.js +1 -0
  27. package/chunk-VRLSXAI3.js +1 -0
  28. package/chunk-VX3YYMRB.js +1 -0
  29. package/chunk-XAGJKCVP.js +3 -0
  30. package/index.html +1 -1
  31. package/main-M6C3T37C.js +1 -0
  32. package/package.json +1 -1
  33. package/chunk-47KLTONZ.js +0 -1
  34. package/chunk-4C3R2PTH.js +0 -1
  35. package/chunk-4LKWOYIM.js +0 -1
  36. package/chunk-4N2WKEQR.js +0 -1
  37. package/chunk-4OETIYIQ.js +0 -1
  38. package/chunk-737NFYPO.js +0 -1
  39. package/chunk-CP57LBQ6.js +0 -1
  40. package/chunk-EXAIEGUA.js +0 -1
  41. package/chunk-FDU72LLR.js +0 -1
  42. package/chunk-HLEETTI2.js +0 -1
  43. package/chunk-HWBFYM4U.js +0 -1
  44. package/chunk-IDRVDCZF.js +0 -1
  45. package/chunk-IJZSE545.js +0 -1
  46. package/chunk-KWC4F7OI.js +0 -1
  47. package/chunk-PCWXZ2CU.js +0 -1
  48. package/chunk-PMCSEYJK.js +0 -6
  49. package/chunk-QPLDE6B2.js +0 -1
  50. package/chunk-QZ4DM36I.js +0 -3
  51. package/chunk-RUBPUVDQ.js +0 -1
  52. package/chunk-VFTH7UVW.js +0 -1
  53. package/chunk-WCTVFZUZ.js +0 -1
  54. package/chunk-ZNI74FWA.js +0 -1
  55. package/main-UAJKIVXK.js +0 -1
@@ -0,0 +1 @@
1
+ import{b as ie,c as ae}from"./chunk-M27H5SJL.js";import{a as L}from"./chunk-PD4M6YP7.js";import{a as re}from"./chunk-GZNEVVHC.js";import{a as y}from"./chunk-PIVMNQL6.js";import{a as I}from"./chunk-IZGVBNDM.js";import{a as oe}from"./chunk-BSZZLSIX.js";import{a as b,b as u}from"./chunk-OIRMDOOF.js";import"./chunk-GE3T3AG3.js";import{a as w}from"./chunk-T5I4AY74.js";import{d as te}from"./chunk-O2MZ5CAQ.js";import{b as Z,c as Q,f as Y,g as ee}from"./chunk-J76HBC5J.js";import{a as X}from"./chunk-MSK2MH2K.js";import{c as ne}from"./chunk-ZTSITRHY.js";import{a as $,b as K,d as z,e as _,f as q}from"./chunk-NJSJNACP.js";import{ua as B}from"./chunk-BUARZS4A.js";import{b as se}from"./chunk-O53NVQ2A.js";import{Bc as D,Cc as G,Eb as F,G as v,M as j,Mc as J,O as S,Q as H,U as R,Ya as d,_ as r,d as P,eb as W,ka as U,m as E,q as O,y as N,z as x}from"./chunk-VGQ6X3AL.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-FC7IHW5V.js")},{path:"logout",loadComponent:()=>import("./chunk-HARDXXQK.js")},{path:"",canActivate:[fe],children:[{path:"",canActivate:[ge],loadComponent:()=>import("./chunk-CM2VLNFJ.js"),children:[{path:"",loadComponent:()=>import("./chunk-3ENWJFPQ.js")},{path:"add-backup",loadComponent:()=>import("./chunk-KMQU3ZBK.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-F7726SNN.js")},{path:"backup/import",loadComponent:()=>import("./chunk-N7TLL5YI.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-DG36NL4T.js"),loadChildren:()=>import("./chunk-MCG7PVR2.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-DG36NL4T.js"),loadChildren:()=>import("./chunk-MCG7PVR2.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-K6NJFA6G.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-VX3YYMRB.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-XAGJKCVP.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-CLWDOASW.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-ICAVTIBO.js")},{path:"from-config",loadComponent:()=>import("./chunk-KBC4N47O.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-UPSWAAP2.js"),loadChildren:()=>import("./chunk-2WKUFTDI.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-UPSWAAP2.js"),loadChildren:()=>import("./chunk-2WKUFTDI.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-UPSWAAP2.js"),loadChildren:()=>import("./chunk-2WKUFTDI.js")},{path:"settings",loadComponent:()=>import("./chunk-P4OQCLH3.js")},{path:"about",loadComponent:()=>import("./chunk-U2NGUTAO.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-TSQCXGD7.js")},{path:"changelog",loadComponent:()=>import("./chunk-7YT4Y7C3.js")},{path:"libraries",loadComponent:()=>import("./chunk-GRR3LTVK.js")},{path:"system-info",loadComponent:()=>import("./chunk-3CXGKNYN.js")},{path:"logs",loadComponent:()=>import("./chunk-2HC23GJF.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);
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.67",
2
+ "version": "0.0.68",
3
3
  "name": "@duplicati/ngclient",
4
4
  "license": "MIT",
5
5
  "contributors": [
package/chunk-47KLTONZ.js DELETED
@@ -1 +0,0 @@
1
- import{m as a,n as b}from"./chunk-JWZZL2QQ.js";import"./chunk-5NMYYKKU.js";import"./chunk-B6UDSTOM.js";import"./chunk-DNHLTHLR.js";import"./chunk-N3GBABZB.js";import"./chunk-PD4M6YP7.js";import"./chunk-OROSSCXB.js";import"./chunk-O2MZ5CAQ.js";import"./chunk-J76HBC5J.js";import"./chunk-MSK2MH2K.js";import"./chunk-ZTSITRHY.js";import"./chunk-NJSJNACP.js";import"./chunk-BUARZS4A.js";import"./chunk-VGQ6X3AL.js";import"./chunk-C6Q5SG76.js";export{a as createScheduleForm,b as default};
package/chunk-4C3R2PTH.js DELETED
@@ -1 +0,0 @@
1
- import"./chunk-C6Q5SG76.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-PCWXZ2CU.js")},{path:"destination",loadComponent:()=>import("./chunk-HLEETTI2.js")},{path:"source-data",loadComponent:()=>import("./chunk-QPLDE6B2.js")},{path:"schedule",loadComponent:()=>import("./chunk-47KLTONZ.js")},{path:"options",loadComponent:()=>import("./chunk-ZNI74FWA.js")}];export{o as default};
package/chunk-4LKWOYIM.js DELETED
@@ -1 +0,0 @@
1
- import{b as $}from"./chunk-N3GBABZB.js";import{a as R}from"./chunk-4OETIYIQ.js";import"./chunk-GE3T3AG3.js";import"./chunk-OROSSCXB.js";import{b as k}from"./chunk-O2MZ5CAQ.js";import{a as A,d as N}from"./chunk-J76HBC5J.js";import"./chunk-MSK2MH2K.js";import{a as B,g as O}from"./chunk-ZTSITRHY.js";import"./chunk-NJSJNACP.js";import"./chunk-BSZZLSIX.js";import"./chunk-BUARZS4A.js";import"./chunk-O53NVQ2A.js";import{Ab as S,Bb as g,Cb as F,Db as a,Eb as r,Kc as M,Ob as _,Pb as c,Qb as u,Ra as i,Tb as T,Ub as I,Ya as l,_ as m,eb as C,hc as E,jc as L,kb as p,yb as s,zb as f}from"./chunk-VGQ6X3AL.js";import"./chunk-C6Q5SG76.js";function b(e,t){e&1&&u(0,2,1)}function P(e,t){e&1&&u(0,2,2)}function h(e,t){e&1&&u(0,2,3)}function v(e,t){e&1&&u(0,2,4)}function U(e,t){if(e&1&&(E(0),r(1,"br")),e&2){let n=t.$implicit;L(" ",n," ")}}var D=class e{#t=m(k);#e=m(A);#n=$(this.#e.params);runId=M(()=>this.#n()?.runId);offset=l(0);status=l("starting");messageLog=l([]);interval=setInterval(()=>{this.#t.getApiV1CommandlineByRunid({runid:this.runId(),offset:this.offset(),pagesize:100}).subscribe(t=>{this.offset.set(t.Count),this.evalStatus(t),this.messageLog.update(n=>[...n,...t.Items])})},1e3);evalStatus(t){t.Started===!0&&t.Finished===!0&&(this.status.set("finished"),clearInterval(this.interval)),t.Started===!0&&t.Finished===!1&&this.status.set("started")}abort(){this.#t.postApiV1CommandlineByRunidAbort({runid:this.runId()}).subscribe({next:t=>{this.status.set("aborted"),clearInterval(this.interval)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=C({type:e,selectors:[["app-commandline-result"]],decls:18,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let n;n=$localize` Running commandline task... ${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON:Abort${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_BUTTON:`;let o;return o=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Starting... ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_IF_1: Started! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_IF_2: Finished! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_IF_3: Aborted! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:`,o=T(o),[t,n,o,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],["type","button","spk-button","",1,"small",3,"click"],[1,"status"]]},template:function(n,o){n&1&&(r(0,"app-status-bar"),F(1,"section")(2,"div",3)(3,"button",4),_(4,0),r(5,"spk-icon"),c(),a()(),F(6,"h3"),_(7,1),F(8,"button",5),I("click",function(){return o.abort()}),a(),c(),a(),F(9,"div",6),_(10,2),p(11,b,1,0)(12,P,1,0)(13,h,1,0)(14,v,1,0),c(),a(),F(15,"code"),S(16,U,2,1,null,null,f),a()()),n&2&&(i(11),s(o.status()==="starting"?11:-1),i(),s(o.status()==="started"?12:-1),i(),s(o.status()==="finished"?13:-1),i(),s(o.status()==="aborted"?14:-1),i(2),g(o.messageLog()))},dependencies:[R,B,O,N],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:2.5rem;gap:1.25rem}code[_ngcontent-%COMP%]{background-color:var(--grey-800);color:var(--grey-100);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{D as default};