@toa.io/extensions.configuration 1.0.0-alpha.283 → 1.0.0-alpha.284
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 +11 -0
- package/components/configuration.values/operations/create.js +1 -1
- package/components/configuration.values/operations/fetch.js +1 -1
- package/components/configuration.values/operations/get.js +1 -1
- package/components/configuration.values/operations/lib/map.js +1 -1
- package/components/configuration.values/operations/lib/resolve.js +1 -1
- package/components/configuration.values/operations/list.js +1 -1
- package/components/configuration.values/tsconfig.json +1 -1
- package/components/configuration.values/tsconfig.tsbuildinfo +1 -1
- package/components/configuration.values/types/index.d.ts +1 -1
- package/package.json +3 -3
- package/tsconfig.json +3 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/ui/dist/_app/immutable/chunks/{D4R3sAUA.js → Bxde3uE_.js} +2 -2
- package/ui/dist/_app/immutable/chunks/BzG-gka8.js +1 -0
- package/ui/dist/_app/immutable/chunks/{pcT5puVp.js → _I_MUoRn.js} +1 -1
- package/ui/dist/_app/immutable/chunks/{4P-VMHlb.js → mvspXr3J.js} +2 -2
- package/ui/dist/_app/immutable/chunks/{BR0r7ehv.js → p9RyiXQ-.js} +1 -1
- package/ui/dist/_app/immutable/entry/{app.iFQBmOia.js → app.C1VIepN7.js} +2 -2
- package/ui/dist/_app/immutable/entry/start.BQWCs_Pq.js +1 -0
- package/ui/dist/_app/immutable/nodes/{0.COfWb7Uk.js → 0.D_0dtFej.js} +1 -1
- package/ui/dist/_app/immutable/nodes/{1.Do_XXsj8.js → 1.DFlgHh-H.js} +1 -1
- package/ui/dist/_app/immutable/nodes/{2.YNbZtxbt.js → 2.BIHgAxXR.js} +1 -1
- package/ui/dist/_app/immutable/nodes/3.R-_yCt5X.js +1 -0
- package/ui/dist/_app/immutable/nodes/{4.BDs6ujpw.js → 4.BZMuJGfA.js} +1 -1
- package/ui/dist/_app/version.json +1 -1
- package/ui/dist/index.html +10 -10
- package/components/configuration.values/operations/create.d.ts +0 -16
- package/components/configuration.values/operations/create.js.map +0 -1
- package/components/configuration.values/operations/fetch.d.ts +0 -11
- package/components/configuration.values/operations/fetch.js.map +0 -1
- package/components/configuration.values/operations/get.d.ts +0 -17
- package/components/configuration.values/operations/get.js.map +0 -1
- package/components/configuration.values/operations/lib/map.d.ts +0 -11
- package/components/configuration.values/operations/lib/map.js.map +0 -1
- package/components/configuration.values/operations/lib/map.test.d.ts +0 -1
- package/components/configuration.values/operations/lib/map.test.js +0 -26
- package/components/configuration.values/operations/lib/map.test.js.map +0 -1
- package/components/configuration.values/operations/lib/resolve.d.ts +0 -27
- package/components/configuration.values/operations/lib/resolve.js.map +0 -1
- package/components/configuration.values/operations/list.d.ts +0 -10
- package/components/configuration.values/operations/list.js.map +0 -1
- package/transpiled/Aspect.test.d.ts +0 -1
- package/transpiled/Aspect.test.js +0 -66
- package/transpiled/Aspect.test.js.map +0 -1
- package/transpiled/Client.test.d.ts +0 -1
- package/transpiled/Client.test.js +0 -78
- package/transpiled/Client.test.js.map +0 -1
- package/transpiled/Secret.test.d.ts +0 -1
- package/transpiled/Secret.test.js +0 -26
- package/transpiled/Secret.test.js.map +0 -1
- package/transpiled/configuration.test.d.ts +0 -1
- package/transpiled/configuration.test.js +0 -111
- package/transpiled/configuration.test.js.map +0 -1
- package/transpiled/deployment.test.d.ts +0 -1
- package/transpiled/deployment.test.js +0 -66
- package/transpiled/deployment.test.js.map +0 -1
- package/transpiled/epoch.test.d.ts +0 -1
- package/transpiled/epoch.test.js +0 -22
- package/transpiled/epoch.test.js.map +0 -1
- package/transpiled/manifest.test.d.ts +0 -1
- package/transpiled/manifest.test.js +0 -14
- package/transpiled/manifest.test.js.map +0 -1
- package/ui/dist/_app/immutable/chunks/C6SvLx74.js +0 -1
- package/ui/dist/_app/immutable/entry/start.BJ8wH2bz.js +0 -1
- package/ui/dist/_app/immutable/nodes/3.DPdUtAMe.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/.configuration/_app/immutable/nodes/0.
|
|
2
|
-
import{$ as e,A as t,B as n,E as r,Et as i,H as a,J as o,P as s,Q as c,Y as l,bt as u,i as d,it as f,j as p,k as m,n as h,ot as g,q as _,r as v,s as y,st as b,tt as x,v as S,w as C,yt as w}from"../chunks/CcD_ISxM.js";import"../chunks/xihTtKlq.js";var T=`modulepreload`,E=function(e,t){return new URL(e,t).href},D={},O=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=E(t,n),t=s(t),t in D)return;D[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:T,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},k={},A=p(`<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>`),j=p(`<!> <!>`,1);function M(p,v){u(v,!0);let T=d(v,`components`,23,()=>[]),E=d(v,`data_0`,3,null),D=d(v,`data_1`,3,null),O=d(v,`data_2`,3,null);l(()=>v.stores.page.set(v.page)),o(()=>{v.stores,v.page,v.constructors,T(),v.form,E(),D(),O(),v.stores.page.notify()});let k=g(!1),M=g(!1),N=g(null);h(()=>{let e=v.stores.page.subscribe(()=>{n(k)&&(f(M,!0),a().then(()=>{f(N,document.title||`untitled page`,!0)}))});return f(k,!0),e});let P=b(()=>v.constructors[2]);var F=j(),I=e(F),L=r=>{let i=b(()=>v.constructors[0]);var a=t(),o=e(a);S(o,()=>n(i),(r,i)=>{y(i(r,{get data(){return E()},get form(){return v.form},get params(){return v.page.params},children:(r,i)=>{var a=t(),o=e(a),s=r=>{let i=b(()=>v.constructors[1]);var a=t(),o=e(a);S(o,()=>n(i),(r,i)=>{y(i(r,{get data(){return D()},get form(){return v.form},get params(){return v.page.params},children:(r,i)=>{var a=t(),o=e(a);S(o,()=>n(P),(e,t)=>{y(t(e,{get data(){return O()},get form(){return v.form},get params(){return v.page.params}}),e=>T()[2]=e,()=>T()?.[2])}),m(r,a)},$$slots:{default:!0}}),e=>T()[1]=e,()=>T()?.[1])}),m(r,a)},c=r=>{let i=b(()=>v.constructors[1]);var a=t(),o=e(a);S(o,()=>n(i),(e,t)=>{y(t(e,{get data(){return D()},get form(){return v.form},get params(){return v.page.params}}),e=>T()[1]=e,()=>T()?.[1])}),m(r,a)};C(o,e=>{v.constructors[2]?e(s):e(c,-1)}),m(r,a)},$$slots:{default:!0}}),e=>T()[0]=e,()=>T()?.[0])}),m(r,a)},R=r=>{let i=b(()=>v.constructors[0]);var a=t(),o=e(a);S(o,()=>n(i),(e,t)=>{y(t(e,{get data(){return E()},get form(){return v.form},get params(){return v.page.params}}),e=>T()[0]=e,()=>T()?.[0])}),m(r,a)};C(I,e=>{v.constructors[1]?e(L):e(R,-1)});var z=x(I,2),B=e=>{var t=A(),a=c(t),o=e=>{var t=s();_(()=>r(t,n(N))),m(e,t)};C(a,e=>{n(M)&&e(o)}),i(t),m(e,t)};C(z,e=>{n(k)&&e(B)}),m(p,F),w()}var N=v(M),P=[()=>O(()=>import(`../nodes/0.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/.configuration/_app/immutable/nodes/0.D_0dtFej.js","/.configuration/_app/immutable/chunks/CcD_ISxM.js","/.configuration/_app/immutable/chunks/BzG-gka8.js","/.configuration/_app/immutable/chunks/xihTtKlq.js","/.configuration/_app/immutable/chunks/mvspXr3J.js","/.configuration/_app/immutable/chunks/_I_MUoRn.js","/.configuration/_app/immutable/assets/0.CNS8Cqhc.css","/.configuration/_app/immutable/nodes/1.DFlgHh-H.js","/.configuration/_app/immutable/nodes/2.BIHgAxXR.js","/.configuration/_app/immutable/chunks/Bxde3uE_.js","/.configuration/_app/immutable/chunks/p9RyiXQ-.js","/.configuration/_app/immutable/assets/ui.BghF56l_.css","/.configuration/_app/immutable/nodes/3.R-_yCt5X.js","/.configuration/_app/immutable/nodes/4.BZMuJGfA.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{$ as e,A as t,B as n,E as r,Et as i,H as a,J as o,P as s,Q as c,Y as l,bt as u,i as d,it as f,j as p,k as m,n as h,ot as g,q as _,r as v,s as y,st as b,tt as x,v as S,w as C,yt as w}from"../chunks/CcD_ISxM.js";import"../chunks/xihTtKlq.js";var T=`modulepreload`,E=function(e,t){return new URL(e,t).href},D={},O=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=E(t,n),t=s(t),t in D)return;D[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:T,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},k={},A=p(`<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>`),j=p(`<!> <!>`,1);function M(p,v){u(v,!0);let T=d(v,`components`,23,()=>[]),E=d(v,`data_0`,3,null),D=d(v,`data_1`,3,null),O=d(v,`data_2`,3,null);l(()=>v.stores.page.set(v.page)),o(()=>{v.stores,v.page,v.constructors,T(),v.form,E(),D(),O(),v.stores.page.notify()});let k=g(!1),M=g(!1),N=g(null);h(()=>{let e=v.stores.page.subscribe(()=>{n(k)&&(f(M,!0),a().then(()=>{f(N,document.title||`untitled page`,!0)}))});return f(k,!0),e});let P=b(()=>v.constructors[2]);var F=j(),I=e(F),L=r=>{let i=b(()=>v.constructors[0]);var a=t(),o=e(a);S(o,()=>n(i),(r,i)=>{y(i(r,{get data(){return E()},get form(){return v.form},get params(){return v.page.params},children:(r,i)=>{var a=t(),o=e(a),s=r=>{let i=b(()=>v.constructors[1]);var a=t(),o=e(a);S(o,()=>n(i),(r,i)=>{y(i(r,{get data(){return D()},get form(){return v.form},get params(){return v.page.params},children:(r,i)=>{var a=t(),o=e(a);S(o,()=>n(P),(e,t)=>{y(t(e,{get data(){return O()},get form(){return v.form},get params(){return v.page.params}}),e=>T()[2]=e,()=>T()?.[2])}),m(r,a)},$$slots:{default:!0}}),e=>T()[1]=e,()=>T()?.[1])}),m(r,a)},c=r=>{let i=b(()=>v.constructors[1]);var a=t(),o=e(a);S(o,()=>n(i),(e,t)=>{y(t(e,{get data(){return D()},get form(){return v.form},get params(){return v.page.params}}),e=>T()[1]=e,()=>T()?.[1])}),m(r,a)};C(o,e=>{v.constructors[2]?e(s):e(c,-1)}),m(r,a)},$$slots:{default:!0}}),e=>T()[0]=e,()=>T()?.[0])}),m(r,a)},R=r=>{let i=b(()=>v.constructors[0]);var a=t(),o=e(a);S(o,()=>n(i),(e,t)=>{y(t(e,{get data(){return E()},get form(){return v.form},get params(){return v.page.params}}),e=>T()[0]=e,()=>T()?.[0])}),m(r,a)};C(I,e=>{v.constructors[1]?e(L):e(R,-1)});var z=x(I,2),B=e=>{var t=A(),a=c(t),o=e=>{var t=s();_(()=>r(t,n(N))),m(e,t)};C(a,e=>{n(M)&&e(o)}),i(t),m(e,t)};C(z,e=>{n(k)&&e(B)}),m(p,F),w()}var N=v(M),P=[()=>O(()=>import(`../nodes/0.D_0dtFej.js`),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url),()=>O(()=>import(`../nodes/1.DFlgHh-H.js`),__vite__mapDeps([7,1,3,5,2]),import.meta.url),()=>O(()=>import(`../nodes/2.BIHgAxXR.js`),__vite__mapDeps([8,1,2,3,4,9,5,10,11]),import.meta.url),()=>O(()=>import(`../nodes/3.R-_yCt5X.js`),__vite__mapDeps([12,1,3,9,2,4]),import.meta.url),()=>O(()=>import(`../nodes/4.BZMuJGfA.js`),__vite__mapDeps([13,1,2,3,4,9,5,10,11]),import.meta.url)],F=[],I={"/(private)":[3,[2]],"/(private)/[component]":[4,[2]]},L={handleError:(({error:e})=>{console.error(e)}),reroute:(()=>{}),transport:{}},R=Object.fromEntries(Object.entries(L.transport).map(([e,t])=>[e,t.decode])),z=Object.fromEntries(Object.entries(L.transport).map(([e,t])=>[e,t.encode])),B=!1,V=(e,t)=>R[e](t),H=()=>O(()=>import(`../chunks/Bjy-W4x2.js`).then(e=>e.default),[],import.meta.url);export{V as decode,R as decoders,I as dictionary,z as encoders,H as get_error_template,B as hash,L as hooks,k as matchers,P as nodes,N as root,F as server_loads};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e,r as t}from"../chunks/BzG-gka8.js";export{e as load_css,t as start};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,A as t,B as n,G as r,J as i,X as a,bt as o,d as s,dt as c,g as l,ht as u,j as d,jt as f,k as p,q as m,st as h,ut as g,y as _,yt as v}from"../chunks/CcD_ISxM.js";import{n as y}from"../chunks/
|
|
1
|
+
import{$ as e,A as t,B as n,G as r,J as i,X as a,bt as o,d as s,dt as c,g as l,ht as u,j as d,jt as f,k as p,q as m,st as h,ut as g,y as _,yt as v}from"../chunks/CcD_ISxM.js";import{n as y}from"../chunks/BzG-gka8.js";import"../chunks/xihTtKlq.js";import{C as b,S as x,T as S,b as C,o as w,r as T,t as E,v as D,w as O,y as k}from"../chunks/mvspXr3J.js";import{t as A}from"../chunks/_I_MUoRn.js";var j=x();j.on(`*`,(e,t)=>{t===void 0?console.debug(e):console.debug(e,t)});var M=u({status:`disconnected`,events:[]});j.on(`*`,(e,t)=>{M.update(n=>(n.events.push({label:e,payload:t}),n.events=n.events.slice(-128),n))});function N(e){M.update(t=>(t.status=e,(e===`connected`||e===`disconnected`)&&t.events.push({label:e}),t))}function P(){M.update(()=>({status:`disconnected`,events:[]}))}var F=k.resource(`/presence/`);async function I(e,t){return await F.multipart(e,{credentials:`include`,...t})}var L=null,R=null;async function z(e){if(L!==null&&L!==e&&V(),L!==e)for(L=e;L===e;){N(`connecting`);let t=await B(e).catch(e=>e);t!==void 0&&(t.name===`AbortError`?console.debug(`Realtime connection aborted`):(console.warn(`Realtime connection exception`,t),await new Promise(e=>setTimeout(e,3e3))))}}async function B(e){R=new AbortController;let t=R.signal,n=Intl.DateTimeFormat().resolvedOptions().timeZone,r=await I(e,{signal:t,body:{timezone:n}});if(r instanceof Error)throw N(`disconnected`),r;console.debug(`Realtime connected`,e),N(`connected`);for await(let e of r)H(e);console.debug(`Realtime connection lost`,e)}function V(){if(L!==null){if(L=null,R===null)throw Error(`Realtime controller is NULL`);R.abort(),P()}}function H(e){typeof e==`string`?j.emit(`heartbeat`):j.emit(e.event,e.data)}function U(){O.subscribe(e=>{let t=b.extract();e?z(t.id):V()})}function W(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`);return atob(t.padEnd(t.length+(4-t.length%4)%4,`=`))}function G(){let e=T(`challenge`);return e===null?null:W(e)}function K(){k.events.on(`challenge`,e=>S.set(e)),k.events.on(`error`,e=>{e.code===401&&S.set(null)}),S.subscribe(e=>k.authenticate(e));let e=G();e!==null&&S.set(e),D()}var q=f({prerender:()=>!1,ssr:()=>!1,trailingSlash:()=>J});K(),U();var J=`always`,Y=d(`<meta name="description"/>`);function X(u,d){o(d,!0);let f=()=>c(E,`$dict`,b),[b,x]=g(),S=h(()=>A.data.meta?.title??C.title),T=h(()=>A.data.meta?.description??C.description);y(w),i(()=>{document.dir=f().dir});var D=t();l(`12qhfyh`,e=>{var t=Y();m(()=>s(t,`content`,n(T))),r(()=>{a.title=n(S)??``}),p(e,t)});var O=e(D);_(O,()=>d.children),p(u,D),v(),x()}export{X as component,q as universal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,E as t,bt as n,et as r,j as i,k as a,q as o,tt as s,yt as c}from"../chunks/CcD_ISxM.js";import"../chunks/xihTtKlq.js";import{t as l}from"../chunks/
|
|
1
|
+
import{$ as e,E as t,bt as n,et as r,j as i,k as a,q as o,tt as s,yt as c}from"../chunks/CcD_ISxM.js";import"../chunks/xihTtKlq.js";import{t as l}from"../chunks/_I_MUoRn.js";var u=i(`<h1> </h1> <p> </p>`,1);function d(i,d){n(d,!0);var f=u(),p=e(f),m=r(p,!0),h=s(p,2),g=r(h,!0);o(()=>{t(m,l.status),t(g,l.error?.message)}),a(i,f),c()}export{d as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,A as t,B as n,Dt as r,E as i,Et as a,L as o,P as s,Q as c,Tt as l,Z as u,a as d,bt as f,d as p,dt as m,et as h,ft as g,i as _,it as v,j as y,k as b,lt as x,o as S,ot as C,q as w,s as T,st as E,tt as D,u as O,ut as k,y as A,yt as j}from"../chunks/CcD_ISxM.js";import{c as M,n as N}from"../chunks/
|
|
1
|
+
import{$ as e,A as t,B as n,Dt as r,E as i,Et as a,L as o,P as s,Q as c,Tt as l,Z as u,a as d,bt as f,d as p,dt as m,et as h,ft as g,i as _,it as v,j as y,k as b,lt as x,o as S,ot as C,q as w,s as T,st as E,tt as D,u as O,ut as k,y as A,yt as j}from"../chunks/CcD_ISxM.js";import{c as M,n as N}from"../chunks/BzG-gka8.js";import"../chunks/xihTtKlq.js";import{b as P,h as F,i as I,j as L,t as R}from"../chunks/mvspXr3J.js";import{H as z,W as B,o as V,s as H}from"../chunks/Bxde3uE_.js";import{t as U}from"../chunks/_I_MUoRn.js";import{i as W,n as G,r as K,t as q}from"../chunks/p9RyiXQ-.js";var J=new Set([`$$slots`,`$$events`,`$$legacy`]);function Y(e,t){let n=d(t,J),r=[[`path`,{d:`m21 21-4.34-4.34`}],[`circle`,{cx:`11`,cy:`11`,r:`8`}]];L(e,S({name:`search`},()=>n,{get iconNode(){return r}}))}var X=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),Z=y(`<kbd><!></kbd>`);function Q(e,t){f(t,!0);let n=_(t,`ref`,15,null),i=d(t,X);var o=Z();O(o,e=>({"data-slot":`kbd`,class:e,...i}),[()=>B(`h-5 w-fit min-w-5 gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3 pointer-events-none inline-flex items-center justify-center select-none`,t.class)]);var s=c(o);A(s,()=>t.children??r),a(o),T(o,e=>n(e),()=>n()),b(e,o),j()}var $=y(`<div class="flex h-dvh flex-col"><header class="flex items-center gap-4 px-4 py-3" style="view-transition-name: chrome"><div class="hidden flex-1 items-center gap-4 md:flex"><h1 class="min-w-0 truncate text-lg font-medium"><a id="nav-home-link" class="hover:text-muted-foreground transition-colors"> </a></h1></div> <div class="relative w-full max-w-64 min-w-0 shrink"><!> <!> <!></div> <div class="flex flex-1 justify-end"><!></div></header> <main class="min-h-0 flex-1"><!></main></div>`);function ee(r,d){f(d,!0);let _=()=>m(V,`$only`,T),y=()=>m(H,`$query`,T),S=()=>m(R,`$dict`,T),[T,O]=k(),L=E(()=>U.url.pathname===M+`/`?`.`:`..`);N(()=>H.set(``));let B=C(null);function J(e){e.key===`Enter`&&_()?.()}function X(e){e.key===`k`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),n(B)?.focus(),n(B)?.select())}o(`keydown`,u,X),G(r,{children:(r,o)=>{var u=$(),f=c(u),m=c(f),_=c(m),C=c(_),T=h(C,!0);a(_),a(m);var E=D(m,2),O=c(E);Y(O,{class:`text-muted-foreground pointer-events-none absolute start-2.5 top-1/2 size-3.5 -translate-y-1/2`});var k=D(O,2);K(k,{id:`nav-filter-input`,type:`search`,onkeydown:J,get"aria-label"(){return S().nav.filter},class:`ps-8 pe-3 md:pe-14 [&::-webkit-search-cancel-button]:hidden`,get ref(){return n(B)},set ref(e){v(B,e,!0)},get value(){return x(),y()},set value(e){g(H,e)}}),Q(D(k,2),{class:`absolute end-2 top-1/2 hidden -translate-y-1/2 md:inline-flex`,children:(e,t)=>{l();var n=s();w(()=>i(n,I?`⌘K`:`Ctrl K`)),b(e,n)},$$slots:{default:!0}}),a(E);var j=D(E,2),M=c(j);z(M,{id:`iam-logout-button`,variant:`ghost`,size:`icon`,get"aria-label"(){return S().nav.signout},class:`text-destructive hover:text-destructive`,get onclick(){return F},children:(e,t)=>{W(e,{})},$$slots:{default:!0}}),a(j),a(f);var N=D(f,2),R=c(N);q(R,{role:`system:configuration:get`,children:(n,r)=>{var i=t(),a=e(i);A(a,()=>d.children),b(n,i)},$$slots:{default:!0}}),a(N),a(u),w(()=>{p(C,`href`,n(L)),i(T,P.title)}),b(r,u)},$$slots:{default:!0}}),j(),O()}export{ee as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Et as e,Q as t,j as n,k as r}from"../chunks/CcD_ISxM.js";import"../chunks/xihTtKlq.js";import{r as i}from"../chunks/Bxde3uE_.js";var a=n(`<div class="mx-auto h-full max-w-7xl overflow-auto px-4 pb-12"><!></div>`);function o(n){var o=a(),s=t(o);i(s,{}),e(o),r(n,o)}export{o as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,A as t,B as n,Dt as r,E as i,Et as a,Q as o,a as s,bt as c,d as l,dt as u,et as d,j as f,k as p,o as m,q as h,st as g,tt as _,ut as v,w as y,yt as b}from"../chunks/CcD_ISxM.js";import{c as x}from"../chunks/
|
|
1
|
+
import{$ as e,A as t,B as n,Dt as r,E as i,Et as a,Q as o,a as s,bt as c,d as l,dt as u,et as d,j as f,k as p,o as m,q as h,st as g,tt as _,ut as v,w as y,yt as b}from"../chunks/CcD_ISxM.js";import{c as x}from"../chunks/BzG-gka8.js";import"../chunks/xihTtKlq.js";import{j as S,k as C}from"../chunks/mvspXr3J.js";import{c as w,i as T,l as E,n as D,t as O}from"../chunks/Bxde3uE_.js";import{t as k}from"../chunks/_I_MUoRn.js";import{t as A}from"../chunks/p9RyiXQ-.js";var j=new Set([`$$slots`,`$$events`,`$$legacy`]);function M(e,t){let n=s(t,j),r=[[`path`,{d:`m15 18-6-6 6-6`}]];S(e,m({name:`chevron-left`},()=>n,{get iconNode(){return r}}))}var N=f(`<span class="text-muted-foreground"> </span>`),P=f(`<!> <p class="text-muted-foreground mt-2 text-center font-mono text-xs"> </p>`,1),F=f(`<p class="text-muted-foreground py-20 text-center"> </p>`),I=f(`<p class="text-destructive py-20 text-center"> </p>`),L=f(`<div class="mx-auto h-full max-w-2xl overflow-auto px-4 pb-12"><div class="flex items-center gap-2 py-2"><a id="configuration-back-link" class="text-muted-foreground hover:text-foreground -ms-1 rounded-md p-1 transition-colors"><!></a> <h2 class="min-w-0 truncate font-medium"><!> </h2> <div class="ms-auto"><!></div></div> <!></div>`);function R(s,f){c(f,!0);let m=()=>u(T,`$dict`,S),[S,j]=v(),R=g(()=>k.params.component??``),z=g(()=>E.get(n(R))),B=g(()=>w(n(R)));function V(e){return`code`in e&&e.code===404}var H=L(),U=o(H),W=o(U);M(o(W),{class:`size-4`}),a(W);var G=_(W,2),K=o(G),q=e=>{var t=N(),r=d(t);h(()=>i(r,`${n(B).namespace??``}.`)),p(e,t)};y(K,e=>{n(B).namespace!=="default"&&e(q)});var J=_(K,1,!0);a(G);var Y=_(G,2),X=o(Y);C(X,{get store(){return n(z)},silent:!0,awaited:(e,t=r)=>{A(e,{role:`system:configuration:create`,denied:e=>{},children:(e,n)=>{O(e,{get configuration(){return t()}})},$$slots:{denied:!0,default:!0}})},$$slots:{awaited:!0}}),a(Y),a(U);var Z=_(U,2);C(Z,{get store(){return n(z)},awaited:(t,n=r)=>{var a=P(),o=e(a);D(o,{get value(){return n().configuration}});var s=_(o,2),c=d(s,!0);h(()=>i(c,n().epoch)),p(t,a)},error:(a,o=r)=>{var s=t(),c=e(s),l=e=>{var t=F(),n=d(t,!0);h(()=>i(n,m().value.none)),p(e,t)},u=g(()=>V(o())),f=e=>{var t=I(),n=d(t,!0);h(()=>i(n,o().message)),p(e,t)};y(c,e=>{n(u)?e(l):e(f,-1)}),p(a,s)},$$slots:{awaited:!0,error:!0}}),a(H),h(()=>{l(W,`href`,`${x??``}/`),l(W,`aria-label`,m().value.title),i(J,n(B).component)}),p(s,H),b(),j()}export{R as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"1788614955706"}
|
package/ui/dist/index.html
CHANGED
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
<link rel="icon" href="/.configuration/favicon-96x96.png" type="image/png" sizes="96x96" />
|
|
12
12
|
<link rel="apple-touch-icon" href="/.configuration/apple-touch-icon.png" />
|
|
13
13
|
|
|
14
|
-
<link href="/.configuration/_app/immutable/entry/start.
|
|
15
|
-
<link href="/.configuration/_app/immutable/chunks/
|
|
14
|
+
<link href="/.configuration/_app/immutable/entry/start.BQWCs_Pq.js" rel="modulepreload">
|
|
15
|
+
<link href="/.configuration/_app/immutable/chunks/BzG-gka8.js" rel="modulepreload">
|
|
16
16
|
<link href="/.configuration/_app/immutable/chunks/CcD_ISxM.js" rel="modulepreload">
|
|
17
|
-
<link href="/.configuration/_app/immutable/entry/app.
|
|
17
|
+
<link href="/.configuration/_app/immutable/entry/app.C1VIepN7.js" rel="modulepreload">
|
|
18
18
|
<link href="/.configuration/_app/immutable/chunks/xihTtKlq.js" rel="modulepreload">
|
|
19
|
-
<link href="/.configuration/_app/immutable/nodes/0.
|
|
20
|
-
<link href="/.configuration/_app/immutable/chunks/
|
|
21
|
-
<link href="/.configuration/_app/immutable/chunks/
|
|
19
|
+
<link href="/.configuration/_app/immutable/nodes/0.D_0dtFej.js" rel="modulepreload">
|
|
20
|
+
<link href="/.configuration/_app/immutable/chunks/mvspXr3J.js" rel="modulepreload">
|
|
21
|
+
<link href="/.configuration/_app/immutable/chunks/_I_MUoRn.js" rel="modulepreload">
|
|
22
22
|
<link href="/.configuration/_app/env.js" rel="modulepreload">
|
|
23
23
|
|
|
24
24
|
<link href="/.configuration/_app/immutable/assets/0.CNS8Cqhc.css" rel="stylesheet">
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<div style="display: contents">
|
|
28
28
|
<script>
|
|
29
29
|
{
|
|
30
|
-
|
|
30
|
+
__sveltekit_1mnh5aw = {
|
|
31
31
|
base: "/.configuration",
|
|
32
32
|
assets: "/.configuration",
|
|
33
33
|
env: null
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
const element = document.currentScript.parentElement;
|
|
37
37
|
|
|
38
38
|
import("/.configuration/_app/env.js").then(({ env }) => {
|
|
39
|
-
|
|
39
|
+
__sveltekit_1mnh5aw.env = env;
|
|
40
40
|
|
|
41
41
|
Promise.all([
|
|
42
|
-
import("/.configuration/_app/immutable/entry/start.
|
|
43
|
-
import("/.configuration/_app/immutable/entry/app.
|
|
42
|
+
import("/.configuration/_app/immutable/entry/start.BQWCs_Pq.js"),
|
|
43
|
+
import("/.configuration/_app/immutable/entry/app.C1VIepN7.js")
|
|
44
44
|
]).then(([kit, app]) => {
|
|
45
45
|
kit.start(app, element);
|
|
46
46
|
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare function transition(input: Input, object: Entity): Promise<Entity | Error>;
|
|
2
|
-
interface Input {
|
|
3
|
-
component: string;
|
|
4
|
-
configuration: object;
|
|
5
|
-
originator: {
|
|
6
|
-
id: string;
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
interface Entity {
|
|
10
|
-
id: string;
|
|
11
|
-
component: string;
|
|
12
|
-
epoch: string;
|
|
13
|
-
configuration: object;
|
|
14
|
-
originator: string;
|
|
15
|
-
}
|
|
16
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../source/create.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAGpC,MAAM,CAAC,KAAK,UAAU,UAAU,CAAE,KAAY,EAAE,MAAc;IAC5D,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;IAEpC,IAAI,KAAK,KAAK,SAAS;QACrB,OAAO,IAAI,qBAAqB,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;IAEnD,4DAA4D;IAC5D,MAAM,aAAa,GAAG,eAAe,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;IAE1D,MAAM,MAAM,GAAgB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAExD,IAAI,CAAC;QACH,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAA;IAChC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,IAAI,yBAAyB,CAAE,KAAe,CAAC,OAAO,CAAC,CAAA;IAChE,CAAC;IAED,MAAM,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAA;IAClC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAA;IAC1B,MAAM,CAAC,aAAa,GAAG,aAAa,CAAA;IACpC,MAAM,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,EAAE,CAAA;IAEvC,OAAO,MAAM,CAAA;AACf,CAAC;AAED,MAAM,qBAAsB,SAAQ,KAAK;IACvB,IAAI,GAAG,mBAAmB,CAAA;IAE1C,YAAoB,SAAiB;QACnC,KAAK,CAAC,cAAc,SAAS,qBAAqB,CAAC,CAAA;IACrD,CAAC;CACF;AAED,MAAM,yBAA0B,SAAQ,KAAK;IAC3B,IAAI,GAAG,uBAAuB,CAAA;CAC/C"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type Context } from './lib/resolve.js';
|
|
2
|
-
export declare function computation(input: Pair[], context: Context): Promise<Fetched[]>;
|
|
3
|
-
interface Pair {
|
|
4
|
-
component: string;
|
|
5
|
-
epoch: string;
|
|
6
|
-
}
|
|
7
|
-
interface Fetched extends Pair {
|
|
8
|
-
configuration: object | null;
|
|
9
|
-
created: number;
|
|
10
|
-
}
|
|
11
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../source/fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAgB,MAAM,kBAAkB,CAAA;AAExD,MAAM,CAAC,KAAK,UAAU,WAAW,CAAE,KAAa,EAAE,OAAgB;IAChE,OAAO,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE;QAChE,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,CAAA;QAEtD,OAAO;YACL,SAAS;YACT,KAAK;YACL,aAAa,EAAE,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa;YAC1D,OAAO,EAAE,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO;SAC5C,CAAA;IACH,CAAC,CAAC,CAAC,CAAA;AACL,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type Context } from './lib/resolve.js';
|
|
2
|
-
/**
|
|
3
|
-
* The latest configuration of a component, with the schema it is checked against. The
|
|
4
|
-
* schema is the deployment's, so an epoch the deployment does not know has none — the
|
|
5
|
-
* value is still what was stored for it.
|
|
6
|
-
*/
|
|
7
|
-
export declare function computation(input: Input, context: Context): Promise<Item | null>;
|
|
8
|
-
interface Input {
|
|
9
|
-
component: string;
|
|
10
|
-
epoch?: string;
|
|
11
|
-
}
|
|
12
|
-
interface Item {
|
|
13
|
-
configuration: object;
|
|
14
|
-
schema?: object;
|
|
15
|
-
epoch: string;
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get.js","sourceRoot":"","sources":["../source/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AACpC,OAAO,EAAE,OAAO,EAAgB,MAAM,kBAAkB,CAAA;AAExD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAE,KAAY,EAAE,OAAgB;IAC/D,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,CAAA;IAElE,IAAI,KAAK,KAAK,IAAI;QAChB,OAAO,IAAI,CAAA;IAEb,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;IAEpC,OAAO;QACL,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,MAAM,EAAE,KAAK,EAAE,MAAM;QACrB,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,KAAM,CAAC,KAAK;KACnC,CAAA;AACH,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/** What the deployment told the service about every configured component. */
|
|
2
|
-
export declare function entry(component: string): Entry | undefined;
|
|
3
|
-
/** The configured components, by name. */
|
|
4
|
-
export declare function components(): string[];
|
|
5
|
-
export declare const VARIABLE = "TOA_CONFIGURATION_VALUES";
|
|
6
|
-
export interface Entry {
|
|
7
|
-
epoch: string;
|
|
8
|
-
schema: object;
|
|
9
|
-
defaults?: object;
|
|
10
|
-
}
|
|
11
|
-
export type Values = Record<string, Entry>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"map.js","sourceRoot":"","sources":["../../source/lib/map.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,MAAM,UAAU,KAAK,CAAE,SAAiB;IACtC,OAAO,IAAI,EAAE,CAAC,SAAS,CAAC,CAAA;AAC1B,CAAC;AAED,0CAA0C;AAC1C,MAAM,UAAU,UAAU;IACxB,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAA;AACnC,CAAC;AAED,SAAS,IAAI;IACX,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAA;IAE5C,oFAAoF;IACpF,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAW,CAAA;QACrC,MAAM,GAAG,MAAM,CAAA;IACjB,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AAED,IAAI,MAAM,GAAkB,IAAI,CAAA;AAChC,IAAI,MAAM,GAAW,EAAE,CAAA;AAEvB,MAAM,CAAC,MAAM,QAAQ,GAAG,0BAA0B,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { it, afterEach } from 'node:test';
|
|
2
|
-
import assert from 'node:assert/strict';
|
|
3
|
-
import { VARIABLE, components, entry } from './map.js';
|
|
4
|
-
afterEach(() => {
|
|
5
|
-
delete process.env[VARIABLE];
|
|
6
|
-
});
|
|
7
|
-
it('should be empty without the variable', () => {
|
|
8
|
-
assert.strictEqual(entry('a.b'), undefined);
|
|
9
|
-
});
|
|
10
|
-
it('should read the variable', () => {
|
|
11
|
-
const values = { 'a.b': { epoch: 'e', schema: { type: 'object' }, defaults: { foo: 1 } } };
|
|
12
|
-
process.env[VARIABLE] = JSON.stringify(values);
|
|
13
|
-
assert.deepStrictEqual(entry('a.b'), values['a.b']);
|
|
14
|
-
assert.strictEqual(entry('a.c'), undefined);
|
|
15
|
-
});
|
|
16
|
-
it('should follow the variable', () => {
|
|
17
|
-
process.env[VARIABLE] = JSON.stringify({ 'a.b': { epoch: 'e1', schema: {} } });
|
|
18
|
-
assert.deepStrictEqual(entry('a.b')?.epoch, 'e1');
|
|
19
|
-
process.env[VARIABLE] = JSON.stringify({ 'a.b': { epoch: 'e2', schema: {} } });
|
|
20
|
-
assert.deepStrictEqual(entry('a.b')?.epoch, 'e2');
|
|
21
|
-
});
|
|
22
|
-
it('should list the components by name', () => {
|
|
23
|
-
process.env[VARIABLE] = JSON.stringify({ 'b.two': { epoch: 'e', schema: {} }, 'a.one': { epoch: 'e', schema: {} } });
|
|
24
|
-
assert.deepStrictEqual(components(), ['a.one', 'b.two']);
|
|
25
|
-
});
|
|
26
|
-
//# sourceMappingURL=map.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"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,CAAC,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,CAAA;IAEjD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA;IAE9E,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,CAAA;AACnD,CAAC,CAAC,CAAA;AAEF,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;IAC5C,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA;IAEpH,MAAM,CAAC,eAAe,CAAC,UAAU,EAAE,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAA;AAC1D,CAAC,CAAC,CAAA"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The latest configuration created for the component and the epoch; the deployed
|
|
3
|
-
* defaults when none was; `null` when the epoch is not the one deployed.
|
|
4
|
-
*/
|
|
5
|
-
export declare function resolve(context: Context, component: string, epoch?: string): Promise<Value | null>;
|
|
6
|
-
/** A configuration and when it was created; `0` for the deployed defaults. */
|
|
7
|
-
export interface Value {
|
|
8
|
-
configuration: object;
|
|
9
|
-
created: number;
|
|
10
|
-
}
|
|
11
|
-
export interface Context {
|
|
12
|
-
local: {
|
|
13
|
-
enumerate: (request: {
|
|
14
|
-
query: Query;
|
|
15
|
-
}) => Promise<Stored[]>;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
interface Query {
|
|
19
|
-
criteria: string;
|
|
20
|
-
sort: string[];
|
|
21
|
-
limit: number;
|
|
22
|
-
}
|
|
23
|
-
interface Stored {
|
|
24
|
-
configuration: object;
|
|
25
|
-
_created: number;
|
|
26
|
-
}
|
|
27
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../source/lib/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAEhC;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO,CAAE,OAAgB,EAAE,SAAiB,EAAE,KAAc;IAChF,MAAM,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,CAAA;IAE9B,KAAK,KAAK,KAAK,EAAE,KAAK,CAAA;IAEtB,IAAI,KAAK,KAAK,SAAS;QACrB,OAAO,IAAI,CAAA;IAEb,wFAAwF;IACxF,MAAM,KAAK,GAAU;QACnB,QAAQ,EAAE,eAAe,SAAS,aAAa,KAAK,GAAG;QACvD,IAAI,EAAE,CAAC,eAAe,CAAC;QACvB,KAAK,EAAE,CAAC;KACT,CAAA;IAED,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,CAAC,CAAA;IAExD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;QACpB,OAAO,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,aAAa,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAA;IAElF,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK;QAC9C,OAAO,EAAE,aAAa,EAAE,KAAK,CAAC,QAAQ,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAA;IAE5D,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type Context } from './lib/resolve.js';
|
|
2
|
-
/** The configuration of every component for its deployed epoch, by component name. */
|
|
3
|
-
export declare function computation(_: null, context: Context): Promise<Item[]>;
|
|
4
|
-
interface Item {
|
|
5
|
-
component: string;
|
|
6
|
-
epoch: string;
|
|
7
|
-
schema: object;
|
|
8
|
-
configuration: object;
|
|
9
|
-
}
|
|
10
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../source/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,EAAE,OAAO,EAAgB,MAAM,kBAAkB,CAAA;AAExD,sFAAsF;AACtF,MAAM,CAAC,KAAK,UAAU,WAAW,CAAE,CAAO,EAAE,OAAgB;IAC1D,OAAO,MAAM,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE;QAC5D,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,SAAS,CAAE,CAAA;QAC3C,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,CAAA;QAEtD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,KAAM,CAAC,aAAa,EAAE,CAAA;IAC1E,CAAC,CAAC,CAAC,CAAA;AACL,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { it, beforeEach, afterEach, mock } from 'node:test';
|
|
2
|
-
import assert from 'node:assert/strict';
|
|
3
|
-
import { isDeepStrictEqual } from 'node:util';
|
|
4
|
-
import { Connector, Locator } from '@toa.io/core';
|
|
5
|
-
import { generate } from 'randomstring';
|
|
6
|
-
import { Aspect } from './Aspect.js';
|
|
7
|
-
class Fake extends Connector {
|
|
8
|
-
fetch = mock.fn(async () => ({ configuration: { foo: 'served' }, created: 5 }));
|
|
9
|
-
subscribe = mock.fn();
|
|
10
|
-
unsubscribe = mock.fn();
|
|
11
|
-
}
|
|
12
|
-
const manifest = {
|
|
13
|
-
schema: {
|
|
14
|
-
type: 'object',
|
|
15
|
-
properties: {
|
|
16
|
-
foo: { type: 'string' },
|
|
17
|
-
bar: { type: 'object', properties: { baz: { type: 'string' } }, default: { baz: 'quux' } }
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
let locator;
|
|
22
|
-
beforeEach(() => {
|
|
23
|
-
locator = new Locator(generate(), generate());
|
|
24
|
-
});
|
|
25
|
-
afterEach(() => {
|
|
26
|
-
delete process.env['TOA_CONFIGURATION_' + locator.uppercase];
|
|
27
|
-
});
|
|
28
|
-
it('should be named', async () => {
|
|
29
|
-
assert.deepStrictEqual(new Aspect(locator, manifest, null).name, 'configuration');
|
|
30
|
-
});
|
|
31
|
-
it('should resolve locally without a client', async () => {
|
|
32
|
-
process.env['TOA_CONFIGURATION_' + locator.uppercase] = JSON.stringify({ foo: 'local' });
|
|
33
|
-
const aspect = new Aspect(locator, manifest, null);
|
|
34
|
-
await aspect.connect();
|
|
35
|
-
assert.deepStrictEqual(aspect.invoke(), { foo: 'local', bar: { baz: 'quux' } });
|
|
36
|
-
assert.deepStrictEqual(aspect.invoke(['foo']), 'local');
|
|
37
|
-
assert.deepStrictEqual(aspect.invoke(['bar', 'baz']), 'quux');
|
|
38
|
-
});
|
|
39
|
-
it('should fetch from the client and follow it', async () => {
|
|
40
|
-
const client = new Fake();
|
|
41
|
-
const aspect = new Aspect(locator, manifest, client);
|
|
42
|
-
await aspect.connect();
|
|
43
|
-
assert.deepStrictEqual(client.connected, true);
|
|
44
|
-
assert.strictEqual(client.fetch.mock.callCount(), 1);
|
|
45
|
-
const [component, epoch] = client.fetch.mock.calls[0].arguments;
|
|
46
|
-
assert.deepStrictEqual(component, locator.id);
|
|
47
|
-
assert.match(epoch, /^[a-f0-9]{64}$/);
|
|
48
|
-
assert.deepStrictEqual(aspect.invoke(), { foo: 'served', bar: { baz: 'quux' } });
|
|
49
|
-
assert.ok(client.subscribe.mock.calls.some((call) => call.arguments.length === 3 && isDeepStrictEqual(call.arguments[0], component) && isDeepStrictEqual(call.arguments[1], epoch) && typeof call.arguments[2] === 'function'));
|
|
50
|
-
const listener = client.subscribe.mock.calls[0].arguments[2];
|
|
51
|
-
listener({ configuration: { foo: 'updated' }, created: 6 });
|
|
52
|
-
assert.deepStrictEqual(aspect.invoke(['foo']), 'updated');
|
|
53
|
-
// what is not newer than the held value is left alone
|
|
54
|
-
listener({ configuration: { foo: 'stale' }, created: 6 });
|
|
55
|
-
listener({ configuration: { foo: 'older' }, created: 4 });
|
|
56
|
-
assert.deepStrictEqual(aspect.invoke(['foo']), 'updated');
|
|
57
|
-
// a value that does not fit keeps the previous one
|
|
58
|
-
listener({ configuration: { foo: { nested: true } }, created: 7 });
|
|
59
|
-
assert.deepStrictEqual(aspect.invoke(['foo']), 'updated');
|
|
60
|
-
// and the one after it still applies
|
|
61
|
-
listener({ configuration: { foo: 'latest' }, created: 8 });
|
|
62
|
-
assert.deepStrictEqual(aspect.invoke(['foo']), 'latest');
|
|
63
|
-
await aspect.disconnect();
|
|
64
|
-
assert.ok(client.unsubscribe.mock.calls.some((call) => call.arguments.length === 3 && isDeepStrictEqual(call.arguments[0], component) && isDeepStrictEqual(call.arguments[1], epoch) && isDeepStrictEqual(call.arguments[2], listener)));
|
|
65
|
-
});
|
|
66
|
-
//# sourceMappingURL=Aspect.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Aspect.test.js","sourceRoot":"","sources":["../source/Aspect.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAC3D,OAAO,MAAM,MAAM,oBAAoB,CAAA;AACvC,OAAO,EA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1,78 +0,0 @@
|
|
|
1
|
-
import { it, beforeEach, afterEach, mock } from 'node:test';
|
|
2
|
-
import assert from 'node:assert/strict';
|
|
3
|
-
import { isDeepStrictEqual } from 'node:util';
|
|
4
|
-
import { Connector } from '@toa.io/core';
|
|
5
|
-
import { timeout } from '@toa.io/generic';
|
|
6
|
-
import { Client } from './Client.js';
|
|
7
|
-
import { EVENT } from './const.js';
|
|
8
|
-
class Remote extends Connector {
|
|
9
|
-
invoke = mock.fn(async (_endpoint, request) => request.input.map((pair) => ({
|
|
10
|
-
...pair,
|
|
11
|
-
configuration: this.values[pair.component] ?? null,
|
|
12
|
-
created: this.values[pair.component] === undefined ? 0 : 7
|
|
13
|
-
})));
|
|
14
|
-
values = {};
|
|
15
|
-
}
|
|
16
|
-
let remote;
|
|
17
|
-
let receiver;
|
|
18
|
-
let host;
|
|
19
|
-
let client;
|
|
20
|
-
beforeEach(() => {
|
|
21
|
-
remote = new Remote();
|
|
22
|
-
receiver = null;
|
|
23
|
-
host = {
|
|
24
|
-
remote: mock.fn(async (locator) => {
|
|
25
|
-
assert.deepStrictEqual(locator.id, 'configuration.values');
|
|
26
|
-
return remote;
|
|
27
|
-
}),
|
|
28
|
-
receive: mock.fn(async (label, consumer) => {
|
|
29
|
-
assert.deepStrictEqual(label, EVENT);
|
|
30
|
-
receiver = consumer;
|
|
31
|
-
return new Connector();
|
|
32
|
-
})
|
|
33
|
-
};
|
|
34
|
-
client = new Client(host, { base: 10, max: 20, warn: 2 });
|
|
35
|
-
});
|
|
36
|
-
afterEach(async () => {
|
|
37
|
-
await client.disconnect();
|
|
38
|
-
});
|
|
39
|
-
it('should send the requests of one tick as one call', async () => {
|
|
40
|
-
remote.values = { 'a.one': { foo: 1 }, 'a.two': { foo: 2 } };
|
|
41
|
-
await client.connect();
|
|
42
|
-
const [one, two] = await Promise.all([client.fetch('a.one', 'e1'), client.fetch('a.two', 'e2')]);
|
|
43
|
-
assert.deepStrictEqual(one, { configuration: { foo: 1 }, created: 7 });
|
|
44
|
-
assert.deepStrictEqual(two, { configuration: { foo: 2 }, created: 7 });
|
|
45
|
-
assert.strictEqual(remote.invoke.mock.callCount(), 1);
|
|
46
|
-
assert.deepStrictEqual(remote.invoke.mock.calls[0].arguments[1], {
|
|
47
|
-
input: [{ component: 'a.one', epoch: 'e1' }, { component: 'a.two', epoch: 'e2' }]
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
it('should keep asking until served', async () => {
|
|
51
|
-
await client.connect();
|
|
52
|
-
const fetching = client.fetch('a.one', 'e1');
|
|
53
|
-
const deadline = Date.now() + 1000;
|
|
54
|
-
while (remote.invoke.mock.calls.length < 2 && Date.now() < deadline)
|
|
55
|
-
await timeout(5);
|
|
56
|
-
assert.ok(remote.invoke.mock.calls.length >= 2);
|
|
57
|
-
remote.values = { 'a.one': { foo: 1 } };
|
|
58
|
-
assert.deepStrictEqual((await fetching).configuration, { foo: 1 });
|
|
59
|
-
});
|
|
60
|
-
it('should hand a created object to its subscribers', async () => {
|
|
61
|
-
await client.connect();
|
|
62
|
-
const listener = mock.fn();
|
|
63
|
-
const other = mock.fn();
|
|
64
|
-
client.subscribe('a.one', 'e1', listener);
|
|
65
|
-
client.subscribe('a.one', 'e0', other);
|
|
66
|
-
await receiver.receive({
|
|
67
|
-
payload: { component: 'a.one', epoch: 'e1', configuration: { foo: 2 }, _created: 12 }
|
|
68
|
-
});
|
|
69
|
-
assert.ok(listener.mock.calls.some((call) => call.arguments.length === 1 && isDeepStrictEqual(call.arguments[0], { configuration: { foo: 2 }, created: 12 })));
|
|
70
|
-
assert.strictEqual(other.mock.callCount(), 0);
|
|
71
|
-
assert.strictEqual(remote.invoke.mock.callCount(), 0);
|
|
72
|
-
client.unsubscribe('a.one', 'e1', listener);
|
|
73
|
-
await receiver.receive({
|
|
74
|
-
payload: { component: 'a.one', epoch: 'e1', configuration: { foo: 3 }, _created: 13 }
|
|
75
|
-
});
|
|
76
|
-
assert.strictEqual(listener.mock.callCount(), 1);
|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C,CAAA;IAE3C,MAAM,QAAS,CAAC,OAAO,CAAC;QACtB,OAAO,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;KACpE,CAAC,CAAA;IAEpB,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,CAAA;AAClD,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { it } from 'node:test';
|
|
2
|
-
import assert from 'node:assert/strict';
|
|
3
|
-
import { inspect } from 'node:util';
|
|
4
|
-
import { REDACTED, Secret } from './Secret.js';
|
|
5
|
-
const secret = new Secret('s3cret');
|
|
6
|
-
it('should unwrap', () => {
|
|
7
|
-
assert.deepStrictEqual(secret.unwrap(), 's3cret');
|
|
8
|
-
});
|
|
9
|
-
it('should not show as a string', () => {
|
|
10
|
-
assert.deepStrictEqual(String(secret), REDACTED);
|
|
11
|
-
assert.deepStrictEqual(`${secret}`, REDACTED);
|
|
12
|
-
assert.deepStrictEqual('' + secret, REDACTED);
|
|
13
|
-
});
|
|
14
|
-
it('should not show in JSON', () => {
|
|
15
|
-
assert.deepStrictEqual(JSON.stringify({ key: secret }), '{"key":"<REDACTED>"}');
|
|
16
|
-
});
|
|
17
|
-
it('should not show when inspected', () => {
|
|
18
|
-
assert.deepStrictEqual(inspect(secret), REDACTED);
|
|
19
|
-
assert.ok(inspect({ key: secret }).includes(REDACTED));
|
|
20
|
-
assert.ok(!(inspect({ key: secret }).includes('s3cret')));
|
|
21
|
-
});
|
|
22
|
-
it('should not expose the value as a property', () => {
|
|
23
|
-
assert.deepStrictEqual(Object.keys(secret), []);
|
|
24
|
-
assert.deepStrictEqual({ ...secret }, {});
|
|
25
|
-
});
|
|
26
|
-
//# source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