nuxt-graphql-middleware 5.0.0 → 5.1.1
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/dist/client/200.html +9 -9
- package/dist/client/404.html +9 -9
- package/dist/client/_nuxt/B-BZSpkz.js +25 -0
- package/dist/client/_nuxt/C6_BMIRJ.js +1 -0
- package/dist/client/_nuxt/{FTbv7CO6.js → CFKT0oF2.js} +1 -1
- package/dist/client/_nuxt/{lIgCBhS_.js → CrwW1KlQ.js} +1 -1
- package/dist/client/_nuxt/{CROlboVl.js → CyxO-88q.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/bab648bf-3b57-4a37-bfa7-d3789fe7395f.json +1 -0
- package/dist/client/_nuxt/{entry.Cn9qfNGa.css → entry.BBgLZ1Jk.css} +1 -1
- package/dist/client/_nuxt/error-404.Bbd2eCoc.css +1 -0
- package/dist/client/_nuxt/error-500.Cd2cwFc3.css +1 -0
- package/dist/client/index.html +9 -9
- package/dist/module.d.mts +1 -1
- package/dist/module.json +2 -2
- package/dist/module.mjs +159 -55
- package/dist/runtime/composables/nuxtApp.d.ts +30 -2
- package/dist/runtime/composables/nuxtApp.js +66 -24
- package/dist/runtime/composables/useAsyncGraphqlQuery.js +28 -25
- package/dist/runtime/composables/useGraphqlMutation.d.ts +1 -1
- package/dist/runtime/composables/useGraphqlMutation.js +11 -16
- package/dist/runtime/composables/useGraphqlQuery.d.ts +1 -1
- package/dist/runtime/composables/useGraphqlQuery.js +7 -25
- package/dist/runtime/composables/useGraphqlUploadMutation.js +1 -1
- package/dist/runtime/helpers/ClientCache.d.ts +1 -0
- package/dist/runtime/helpers/ClientCache.js +12 -0
- package/dist/runtime/helpers/composables.d.ts +8 -0
- package/dist/runtime/helpers/composables.js +27 -0
- package/dist/runtime/helpers/index.d.ts +0 -4
- package/dist/runtime/helpers/index.js +0 -13
- package/dist/runtime/helpers/queryEncoding.d.ts +11 -0
- package/dist/runtime/helpers/queryEncoding.js +89 -0
- package/dist/runtime/plugins/devMode.js +2 -1
- package/dist/runtime/server/api/query.js +5 -7
- package/dist/runtime/server/utils/useGraphqlQuery.js +2 -2
- package/dist/runtime/settings/index.d.ts +1 -0
- package/dist/runtime/settings/index.js +1 -0
- package/dist/shared/{nuxt-graphql-middleware.cXfDI4U3.d.mts → nuxt-graphql-middleware.-BeiPV4H.d.mts} +49 -0
- package/dist/utils.d.mts +1 -1
- package/package.json +7 -7
- package/dist/client/_nuxt/BM34SYth.js +0 -1
- package/dist/client/_nuxt/D5hBL5aZ.js +0 -25
- package/dist/client/_nuxt/builds/meta/83f9fcd5-bd28-4608-b499-05e08fe0f7d0.json +0 -1
- package/dist/client/_nuxt/error-404.ehK72JOs.css +0 -1
- package/dist/client/_nuxt/error-500._g0akJim.css +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as L,t as w,v as g,H as z,I as Ie,r as W,J as ie,j as O,K as ae,L as T,M as he,N as ze,O as x,x as v,P as fe,Q as me,R as P,S as F,y as V,T as Fe,U as Ve,V as B,W as ne,z as N,A as Y,B as re,X as Te,_ as Me}from"./
|
|
1
|
+
import{d as L,t as w,v as g,H as z,I as Ie,r as W,J as ie,j as O,K as ae,L as T,M as he,N as ze,O as x,x as v,P as fe,Q as me,R as P,S as F,y as V,T as Fe,U as Ve,V as B,W as ne,z as N,A as Y,B as re,X as Te,_ as Me}from"./B-BZSpkz.js";const pe=L({__name:"NIcon",props:{icon:{}},setup(o){return(e,t)=>(g(),w("div",{class:z(["n-icon",e.icon])},null,2))}});typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Oe=o=>typeof o<"u";function Le(o){return JSON.parse(JSON.stringify(o))}function _e(o,e,t,n={}){var s,i,r;const{clone:c=!1,passive:l=!1,eventName:d,deep:u=!1,defaultValue:a,shouldEmit:f}=n,m=Ie(),p=t||(m==null?void 0:m.emit)||((s=m==null?void 0:m.$emit)==null?void 0:s.bind(m))||((r=(i=m==null?void 0:m.proxy)==null?void 0:i.$emit)==null?void 0:r.bind(m==null?void 0:m.proxy));let h=d;e||(e="modelValue"),h=h||`update:${e.toString()}`;const _=S=>c?typeof c=="function"?c(S):Le(S):S,k=()=>Oe(o[e])?_(o[e]):a,b=S=>{f?f(S)&&p(h,S):p(h,S)};if(l){const S=k(),$=W(S);let I=!1;return ie(()=>o[e],C=>{I||(I=!0,$.value=_(C),ae(()=>I=!1))}),ie($,C=>{!I&&(C!==o[e]||u)&&b(C)},{deep:u}),$}else return O({get(){return k()},set(S){b(S)}})}const $e={class:"n-text-input flex flex items-center border n-border-base rounded py-1 pl-1 pr-2 focus-within:n-focus-base focus-within:border-context n-bg-base"},Ee=L({__name:"NTextInput",props:{modelValue:{default:""},icon:{},placeholder:{},disabled:{type:Boolean},autofocus:{type:Boolean},autocomplete:{},readonly:{type:Boolean},type:{default:"text"}},emits:["keydown","keyup","change"],setup(o,{emit:e}){const s=_e(o,"modelValue",e,{passive:!0});return(i,r)=>{const c=pe;return g(),w("div",$e,[T(i.$slots,"icon",{},()=>[i.icon?(g(),P(c,{key:0,icon:i.icon,class:"ml-0.3em mr-0.1em text-1.1em op50"},null,8,["icon"])):F("",!0)]),he(v("input",fe({"onUpdate:modelValue":r[0]||(r[0]=l=>me(s)?s.value=l:null)},i.$props,{class:"ml-0.4em w-full flex-auto n-bg-base !outline-none"}),null,16),[[ze,x(s)]])])}}}),ge=L({__name:"Tag",props:{green:{type:Boolean},orange:{type:Boolean},text:{}},setup(o){const e=o,t=O(()=>e.green?"bg-green-400:10 text-green-400":e.orange?"bg-orange-400:10 text-orange-400":"bg-gray-400:10 text-gray");return(n,s)=>(g(),w("span",{class:z(["mx-0.5 select-none whitespace-nowrap rounded px-1.5 py-0.5 text-xs inline-block",x(t)])},V(n.text),3))}});let E;const j=[];function ve(o){if(j.push(o),!(typeof window>"u"))return window.__NUXT_DEVTOOLS__&&j.forEach(e=>e(window.__NUXT_DEVTOOLS__)),Object.defineProperty(window,"__NUXT_DEVTOOLS__",{set(e){e&&j.forEach(t=>t(e))},get(){return E.value},configurable:!0}),()=>{j.splice(j.indexOf(o),1)}}function De(){E||(E=Fe(),ve(e));function o(){E&&Ve(E)}function e(t){E.value=t,t.host&&t.host.hooks.hook("host:update:reactivity",o)}return E}const Ne=De(),Ae=["innerHTML"],Pe=["textContent"],Be=L({__name:"NCodeBlock",props:{code:{},lang:{},lines:{type:Boolean,default:!0},inline:{type:Boolean},grammarContextCode:{},transformRendered:{}},emits:["loaded"],setup(o,{emit:e}){const t=o,n=e,s=O(()=>{var c;const r=t.lang==="text"?{code:t.code,supported:!1}:((c=Ne.value)==null?void 0:c.devtools.renderCodeHighlight(t.code,t.lang,{grammarContextCode:t.grammarContextCode}))||{code:t.code,supported:!1};return r.supported&&t.transformRendered&&(r.code=t.transformRendered(r.code)),r.supported&&ae(()=>n("loaded")),r}),i=O(()=>["n-code-block shiki",t.lines&&!t.inline?"n-code-block-lines":""]);return(r,c)=>r.lang&&s.value.supported?(g(),w("pre",{key:0,class:z(i.value)},[v("code",{innerHTML:s.value.code},null,8,Ae)],2)):(g(),w("pre",{key:1,class:z(i.value)},[v("code",null,[(g(!0),w(B,null,ne(r.code.split(`
|
|
2
2
|
`),(l,d)=>(g(),w(B,{key:d},[v("span",{class:"line",textContent:V(l)},null,8,Pe),c[0]||(c[0]=v("br",null,null,-1))],64))),128))])],2))}}),Re={flex:"~ gap-3","items-center":""},je=L({__name:"NIconTitle",props:{icon:{},text:{}},setup(o){return(e,t)=>(g(),w("div",Re,[e.icon?(g(),w("div",{key:0,class:z(e.icon)},null,2)):F("",!0),T(e.$slots,"default",{},()=>[v("div",null,V(e.text),1)])]))}}),We=["open"],Ue={"text-base":""},Je={key:0,"text-sm":"",op50:""},Qe=L({__name:"NSectionBlock",props:{icon:{},text:{},description:{},containerClass:{default:""},headerClass:{},collapse:{type:Boolean,default:!0},open:{type:Boolean,default:!0},padding:{type:[Boolean,String],default:!0}},setup(o){const t=_e(o,"open",void 0,{passive:!0});function n(s){t.value=s.target.open}return(s,i)=>{const r=pe,c=je;return g(),w(B,null,[v("details",{open:x(t),onToggle:i[0]||(i[0]=(...l)=>n&&n(...l))},[v("summary",{class:z(["cursor-pointer select-none hover:bg-active p4",s.collapse?"":"pointer-events-none"])},[N(c,{icon:s.icon,text:s.text,"text-xl":"",transition:"",class:z([x(t)?"op100":"op60",s.headerClass])},{default:Y(()=>[v("div",null,[v("div",Ue,[T(s.$slots,"text",{},()=>[re(V(s.text),1)],!0)]),s.description||s.$slots.description?(g(),w("div",Je,[T(s.$slots,"description",{},()=>[re(V(s.description),1)],!0)])):F("",!0)]),i[1]||(i[1]=v("div",{class:"flex-auto"},null,-1)),T(s.$slots,"actions",{},void 0,!0),s.collapse?(g(),P(r,{key:0,icon:"carbon-chevron-down",class:"chevron","cursor-pointer":"","place-self-start":"","text-base":"",op75:"",transition:"","duration-500":""})):F("",!0)]),_:3},8,["icon","text","class"])],2),i._lazyshow1||x(t)?(i._lazyshow1=!0,g(),w(B,null,[he(v("div",{class:z(["flex flex-col flex-gap2 pb6 pt2",typeof s.padding=="string"?s.padding:s.padding?"px4":""])},[T(s.$slots,"details",{},void 0,!0),v("div",{class:z([s.containerClass,"mt1"])},[T(s.$slots,"default",{},void 0,!0)],2),T(s.$slots,"footer",{},void 0,!0)],2),[[Te,x(t)]])],64)):F("v-show-if",!0)],40,We),i[2]||(i[2]=v("div",{class:"x-divider"},null,-1))],64)}}}),qe=Me(Qe,[["__scopeId","data-v-f3591bcd"]]),Ge={class:"h-full of-auto p2"},He={class:"p5"},Ke={class:"font-mono mb4 font-bold text-3xl"},Xe={key:0,class:"mb3"},Ye=["href"],Ze={key:0,class:"font-mono bg-red-900 text-red-100 p2"},et=L({__name:"DocumentDetail",props:{id:{},timestamp:{},source:{},name:{},identifier:{},filePath:{},serverApiPrefix:{}},setup(o){const e=o,t=O(()=>[]),n=O(()=>e.identifier!=="fragment"?`${e.serverApiPrefix}/${e.identifier}/${e.name}`:null);return(s,i)=>{const r=ge,c=Be,l=qe;return g(),w("div",Ge,[v("div",He,[v("h2",Ke,V(s.name),1),x(n)?(g(),w("div",Xe,[s.identifier==="query"?(g(),P(r,{key:0,green:"",text:"GET"})):(g(),P(r,{key:1,orange:"",text:"POST"})),v("a",{class:"n-transition n-link n-link-base hover:n-link-hover ml2",target:"_blank",href:x(n)},V(x(n)),9,Ye)])):F("",!0)]),N(l,{text:"Document",description:s.filePath,padding:"px4"},{default:Y(()=>[N(c,{code:s.source,lang:"graphql"},null,8,["code"])]),_:1},8,["description"]),N(l,{text:"Errors",description:x(t).length+" errors",padding:"px4"},{default:Y(()=>[x(t).length?(g(),w("div",Ze,[(g(!0),w(B,null,ne(x(t),(d,u)=>(g(),w("div",{key:u},V(d),1))),128))])):F("",!0)]),_:1},8,["description"])])}}}),tt="ENTRIES",we="KEYS",ye="VALUES",y="";class q{constructor(e,t){const n=e._tree,s=Array.from(n.keys());this.set=e,this._type=t,this._path=s.length>0?[{node:n,keys:s}]:[]}next(){const e=this.dive();return this.backtrack(),e}dive(){if(this._path.length===0)return{done:!0,value:void 0};const{node:e,keys:t}=D(this._path);if(D(t)===y)return{done:!1,value:this.result()};const n=e.get(D(t));return this._path.push({node:n,keys:Array.from(n.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;const e=D(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:e})=>D(e)).filter(e=>e!==y).join("")}value(){return D(this._path).node.get(y)}result(){switch(this._type){case ye:return this.value();case we:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const D=o=>o[o.length-1],nt=(o,e,t)=>{const n=new Map;if(e===void 0)return n;const s=e.length+1,i=s+t,r=new Uint8Array(i*s).fill(t+1);for(let c=0;c<s;++c)r[c]=c;for(let c=1;c<i;++c)r[c*s]=c;return xe(o,e,t,n,r,1,s,""),n},xe=(o,e,t,n,s,i,r,c)=>{const l=i*r;e:for(const d of o.keys())if(d===y){const u=s[l-1];u<=t&&n.set(c,[o.get(d),u])}else{let u=i;for(let a=0;a<d.length;++a,++u){const f=d[a],m=r*u,p=m-r;let h=s[m];const _=Math.max(0,u-t-1),k=Math.min(r-1,u+t);for(let b=_;b<k;++b){const S=f!==e[b],$=s[p+b]+ +S,I=s[p+b+1]+1,C=s[m+b]+1,R=s[m+b+1]=Math.min($,I,C);R<h&&(h=R)}if(h>t)continue e}xe(o.get(d),e,t,n,s,u,r,c+d)}};class M{constructor(e=new Map,t=""){this._size=void 0,this._tree=e,this._prefix=t}atPrefix(e){if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");const[t,n]=Q(this._tree,e.slice(this._prefix.length));if(t===void 0){const[s,i]=se(n);for(const r of s.keys())if(r!==y&&r.startsWith(i)){const c=new Map;return c.set(r.slice(i.length),s.get(r)),new M(c,e)}}return new M(t,e)}clear(){this._size=void 0,this._tree.clear()}delete(e){return this._size=void 0,st(this._tree,e)}entries(){return new q(this,tt)}forEach(e){for(const[t,n]of this)e(t,n,this)}fuzzyGet(e,t){return nt(this._tree,e,t)}get(e){const t=Z(this._tree,e);return t!==void 0?t.get(y):void 0}has(e){const t=Z(this._tree,e);return t!==void 0&&t.has(y)}keys(){return new q(this,we)}set(e,t){if(typeof e!="string")throw new Error("key must be a string");return this._size=void 0,G(this._tree,e).set(y,t),this}get size(){if(this._size)return this._size;this._size=0;const e=this.entries();for(;!e.next().done;)this._size+=1;return this._size}update(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;const n=G(this._tree,e);return n.set(y,t(n.get(y))),this}fetch(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;const n=G(this._tree,e);let s=n.get(y);return s===void 0&&n.set(y,s=t()),s}values(){return new q(this,ye)}[Symbol.iterator](){return this.entries()}static from(e){const t=new M;for(const[n,s]of e)t.set(n,s);return t}static fromObject(e){return M.from(Object.entries(e))}}const Q=(o,e,t=[])=>{if(e.length===0||o==null)return[o,t];for(const n of o.keys())if(n!==y&&e.startsWith(n))return t.push([o,n]),Q(o.get(n),e.slice(n.length),t);return t.push([o,e]),Q(void 0,"",t)},Z=(o,e)=>{if(e.length===0||o==null)return o;for(const t of o.keys())if(t!==y&&e.startsWith(t))return Z(o.get(t),e.slice(t.length))},G=(o,e)=>{const t=e.length;e:for(let n=0;o&&n<t;){for(const i of o.keys())if(i!==y&&e[n]===i[0]){const r=Math.min(t-n,i.length);let c=1;for(;c<r&&e[n+c]===i[c];)++c;const l=o.get(i);if(c===i.length)o=l;else{const d=new Map;d.set(i.slice(c),l),o.set(e.slice(n,n+c),d),o.delete(i),o=d}n+=c;continue e}const s=new Map;return o.set(e.slice(n),s),s}return o},st=(o,e)=>{const[t,n]=Q(o,e);if(t!==void 0){if(t.delete(y),t.size===0)be(n);else if(t.size===1){const[s,i]=t.entries().next().value;Se(n,s,i)}}},be=o=>{if(o.length===0)return;const[e,t]=se(o);if(e.delete(t),e.size===0)be(o.slice(0,-1));else if(e.size===1){const[n,s]=e.entries().next().value;n!==y&&Se(o.slice(0,-1),n,s)}},Se=(o,e,t)=>{if(o.length===0)return;const[n,s]=se(o);n.set(s+e,t),n.delete(s)},se=o=>o[o.length-1],oe="or",ke="and",ot="and_not";class A{constructor(e){if((e==null?void 0:e.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');const t=e.autoVacuum==null||e.autoVacuum===!0?X:e.autoVacuum;this._options={...K,...e,autoVacuum:t,searchOptions:{...ce,...e.searchOptions||{}},autoSuggestOptions:{...dt,...e.autoSuggestOptions||{}}},this._index=new M,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=te,this.addFields(this._options.fields)}add(e){const{extractField:t,tokenize:n,processTerm:s,fields:i,idField:r}=this._options,c=t(e,r);if(c==null)throw new Error(`MiniSearch: document does not have ID field "${r}"`);if(this._idToShortId.has(c))throw new Error(`MiniSearch: duplicate ID ${c}`);const l=this.addDocumentId(c);this.saveStoredFields(l,e);for(const d of i){const u=t(e,d);if(u==null)continue;const a=n(u.toString(),d),f=this._fieldIds[d],m=new Set(a).size;this.addFieldLength(l,f,this._documentCount-1,m);for(const p of a){const h=s(p,d);if(Array.isArray(h))for(const _ of h)this.addTerm(f,l,_);else h&&this.addTerm(f,l,h)}}}addAll(e){for(const t of e)this.add(t)}addAllAsync(e,t={}){const{chunkSize:n=10}=t,s={chunk:[],promise:Promise.resolve()},{chunk:i,promise:r}=e.reduce(({chunk:c,promise:l},d,u)=>(c.push(d),(u+1)%n===0?{chunk:[],promise:l.then(()=>new Promise(a=>setTimeout(a,0))).then(()=>this.addAll(c))}:{chunk:c,promise:l}),s);return r.then(()=>this.addAll(i))}remove(e){const{tokenize:t,processTerm:n,extractField:s,fields:i,idField:r}=this._options,c=s(e,r);if(c==null)throw new Error(`MiniSearch: document does not have ID field "${r}"`);const l=this._idToShortId.get(c);if(l==null)throw new Error(`MiniSearch: cannot remove document with ID ${c}: it is not in the index`);for(const d of i){const u=s(e,d);if(u==null)continue;const a=t(u.toString(),d),f=this._fieldIds[d],m=new Set(a).size;this.removeFieldLength(l,f,this._documentCount,m);for(const p of a){const h=n(p,d);if(Array.isArray(h))for(const _ of h)this.removeTerm(f,l,_);else h&&this.removeTerm(f,l,h)}}this._storedFields.delete(l),this._documentIds.delete(l),this._idToShortId.delete(c),this._fieldLength.delete(l),this._documentCount-=1}removeAll(e){if(e)for(const t of e)this.remove(t);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new M,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(e){const t=this._idToShortId.get(e);if(t==null)throw new Error(`MiniSearch: cannot discard document with ID ${e}: it is not in the index`);this._idToShortId.delete(e),this._documentIds.delete(t),this._storedFields.delete(t),(this._fieldLength.get(t)||[]).forEach((n,s)=>{this.removeFieldLength(t,s,this._documentCount,n)}),this._fieldLength.delete(t),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;const{minDirtFactor:e,minDirtCount:t,batchSize:n,batchWait:s}=this._options.autoVacuum;this.conditionalVacuum({batchSize:n,batchWait:s},{minDirtCount:t,minDirtFactor:e})}discardAll(e){const t=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(const n of e)this.discard(n)}finally{this._options.autoVacuum=t}this.maybeAutoVacuum()}replace(e){const{idField:t,extractField:n}=this._options,s=n(e,t);this.discard(s),this.add(e)}vacuum(e={}){return this.conditionalVacuum(e)}conditionalVacuum(e,t){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&t,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{const n=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=te,this.performVacuuming(e,n)}),this._enqueuedVacuum)):this.vacuumConditionsMet(t)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(e),this._currentVacuum)}async performVacuuming(e,t){const n=this._dirtCount;if(this.vacuumConditionsMet(t)){const s=e.batchSize||ee.batchSize,i=e.batchWait||ee.batchWait;let r=1;for(const[c,l]of this._index){for(const[d,u]of l)for(const[a]of u)this._documentIds.has(a)||(u.size<=1?l.delete(d):u.delete(a));this._index.get(c).size===0&&this._index.delete(c),r%s===0&&await new Promise(d=>setTimeout(d,i)),r+=1}this._dirtCount-=n}await null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null}vacuumConditionsMet(e){if(e==null)return!0;let{minDirtCount:t,minDirtFactor:n}=e;return t=t||X.minDirtCount,n=n||X.minDirtFactor,this.dirtCount>=t&&this.dirtFactor>=n}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(e){return this._idToShortId.has(e)}getStoredFields(e){const t=this._idToShortId.get(e);if(t!=null)return this._storedFields.get(t)}search(e,t={}){const{searchOptions:n}=this._options,s={...n,...t},i=this.executeQuery(e,t),r=[];for(const[c,{score:l,terms:d,match:u}]of i){const a=d.length||1,f={id:this._documentIds.get(c),score:l*a,terms:Object.keys(u),queryTerms:d,match:u};Object.assign(f,this._storedFields.get(c)),(s.filter==null||s.filter(f))&&r.push(f)}return e===A.wildcard&&s.boostDocument==null||r.sort(de),r}autoSuggest(e,t={}){t={...this._options.autoSuggestOptions,...t};const n=new Map;for(const{score:i,terms:r}of this.search(e,t)){const c=r.join(" "),l=n.get(c);l!=null?(l.score+=i,l.count+=1):n.set(c,{score:i,terms:r,count:1})}const s=[];for(const[i,{score:r,terms:c,count:l}]of n)s.push({suggestion:i,terms:c,score:r/l});return s.sort(de),s}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(e,t){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(e),t)}static async loadJSONAsync(e,t){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(e),t)}static getDefault(e){if(K.hasOwnProperty(e))return H(K,e);throw new Error(`MiniSearch: unknown option "${e}"`)}static loadJS(e,t){const{index:n,documentIds:s,fieldLength:i,storedFields:r,serializationVersion:c}=e,l=this.instantiateMiniSearch(e,t);l._documentIds=U(s),l._fieldLength=U(i),l._storedFields=U(r);for(const[d,u]of l._documentIds)l._idToShortId.set(u,d);for(const[d,u]of n){const a=new Map;for(const f of Object.keys(u)){let m=u[f];c===1&&(m=m.ds),a.set(parseInt(f,10),U(m))}l._index.set(d,a)}return l}static async loadJSAsync(e,t){const{index:n,documentIds:s,fieldLength:i,storedFields:r,serializationVersion:c}=e,l=this.instantiateMiniSearch(e,t);l._documentIds=await J(s),l._fieldLength=await J(i),l._storedFields=await J(r);for(const[u,a]of l._documentIds)l._idToShortId.set(a,u);let d=0;for(const[u,a]of n){const f=new Map;for(const m of Object.keys(a)){let p=a[m];c===1&&(p=p.ds),f.set(parseInt(m,10),await J(p))}++d%1e3===0&&await Ce(0),l._index.set(u,f)}return l}static instantiateMiniSearch(e,t){const{documentCount:n,nextId:s,fieldIds:i,averageFieldLength:r,dirtCount:c,serializationVersion:l}=e;if(l!==1&&l!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");const d=new A(t);return d._documentCount=n,d._nextId=s,d._idToShortId=new Map,d._fieldIds=i,d._avgFieldLength=r,d._dirtCount=c||0,d._index=new M,d}executeQuery(e,t={}){if(e===A.wildcard)return this.executeWildcardQuery(t);if(typeof e!="string"){const f={...t,...e,queries:void 0},m=e.queries.map(p=>this.executeQuery(p,f));return this.combineResults(m,f.combineWith)}const{tokenize:n,processTerm:s,searchOptions:i}=this._options,r={tokenize:n,processTerm:s,...i,...t},{tokenize:c,processTerm:l}=r,a=c(e).flatMap(f=>l(f)).filter(f=>!!f).map(lt(r)).map(f=>this.executeQuerySpec(f,r));return this.combineResults(a,r.combineWith)}executeQuerySpec(e,t){const n={...this._options.searchOptions,...t},s=(n.fields||this._options.fields).reduce((h,_)=>({...h,[_]:H(n.boost,_)||1}),{}),{boostDocument:i,weights:r,maxFuzzy:c,bm25:l}=n,{fuzzy:d,prefix:u}={...ce.weights,...r},a=this._index.get(e.term),f=this.termResults(e.term,e.term,1,e.termBoost,a,s,i,l);let m,p;if(e.prefix&&(m=this._index.atPrefix(e.term)),e.fuzzy){const h=e.fuzzy===!0?.2:e.fuzzy,_=h<1?Math.min(c,Math.round(e.term.length*h)):h;_&&(p=this._index.fuzzyGet(e.term,_))}if(m)for(const[h,_]of m){const k=h.length-e.term.length;if(!k)continue;p==null||p.delete(h);const b=u*h.length/(h.length+.3*k);this.termResults(e.term,h,b,e.termBoost,_,s,i,l,f)}if(p)for(const h of p.keys()){const[_,k]=p.get(h);if(!k)continue;const b=d*h.length/(h.length+k);this.termResults(e.term,h,b,e.termBoost,_,s,i,l,f)}return f}executeWildcardQuery(e){const t=new Map,n={...this._options.searchOptions,...e};for(const[s,i]of this._documentIds){const r=n.boostDocument?n.boostDocument(i,"",this._storedFields.get(s)):1;t.set(s,{score:r,terms:[],match:{}})}return t}combineResults(e,t=oe){if(e.length===0)return new Map;const n=t.toLowerCase(),s=it[n];if(!s)throw new Error(`Invalid combination operator: ${t}`);return e.reduce(s)||new Map}toJSON(){const e=[];for(const[t,n]of this._index){const s={};for(const[i,r]of n)s[i]=Object.fromEntries(r);e.push([t,s])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:e,serializationVersion:2}}termResults(e,t,n,s,i,r,c,l,d=new Map){if(i==null)return d;for(const u of Object.keys(r)){const a=r[u],f=this._fieldIds[u],m=i.get(f);if(m==null)continue;let p=m.size;const h=this._avgFieldLength[f];for(const _ of m.keys()){if(!this._documentIds.has(_)){this.removeTerm(f,_,t),p-=1;continue}const k=c?c(this._documentIds.get(_),t,this._storedFields.get(_)):1;if(!k)continue;const b=m.get(_),S=this._fieldLength.get(_)[f],$=ct(b,p,this._documentCount,S,h,l),I=n*s*a*k*$,C=d.get(_);if(C){C.score+=I,ut(C.terms,e);const R=H(C.match,t);R?R.push(u):C.match[t]=[u]}else d.set(_,{score:I,terms:[e],match:{[t]:[u]}})}}return d}addTerm(e,t,n){const s=this._index.fetch(n,ue);let i=s.get(e);if(i==null)i=new Map,i.set(t,1),s.set(e,i);else{const r=i.get(t);i.set(t,(r||0)+1)}}removeTerm(e,t,n){if(!this._index.has(n)){this.warnDocumentChanged(t,e,n);return}const s=this._index.fetch(n,ue),i=s.get(e);i==null||i.get(t)==null?this.warnDocumentChanged(t,e,n):i.get(t)<=1?i.size<=1?s.delete(e):i.delete(t):i.set(t,i.get(t)-1),this._index.get(n).size===0&&this._index.delete(n)}warnDocumentChanged(e,t,n){for(const s of Object.keys(this._fieldIds))if(this._fieldIds[s]===t){this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(e)} has changed before removal: term "${n}" was not present in field "${s}". Removing a document after it has changed can corrupt the index!`,"version_conflict");return}}addDocumentId(e){const t=this._nextId;return this._idToShortId.set(e,t),this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t}addFields(e){for(let t=0;t<e.length;t++)this._fieldIds[e[t]]=t}addFieldLength(e,t,n,s){let i=this._fieldLength.get(e);i==null&&this._fieldLength.set(e,i=[]),i[t]=s;const c=(this._avgFieldLength[t]||0)*n+s;this._avgFieldLength[t]=c/(n+1)}removeFieldLength(e,t,n,s){if(n===1){this._avgFieldLength[t]=0;return}const i=this._avgFieldLength[t]*n-s;this._avgFieldLength[t]=i/(n-1)}saveStoredFields(e,t){const{storeFields:n,extractField:s}=this._options;if(n==null||n.length===0)return;let i=this._storedFields.get(e);i==null&&this._storedFields.set(e,i={});for(const r of n){const c=s(t,r);c!==void 0&&(i[r]=c)}}}A.wildcard=Symbol("*");const H=(o,e)=>Object.prototype.hasOwnProperty.call(o,e)?o[e]:void 0,it={[oe]:(o,e)=>{for(const t of e.keys()){const n=o.get(t);if(n==null)o.set(t,e.get(t));else{const{score:s,terms:i,match:r}=e.get(t);n.score=n.score+s,n.match=Object.assign(n.match,r),le(n.terms,i)}}return o},[ke]:(o,e)=>{const t=new Map;for(const n of e.keys()){const s=o.get(n);if(s==null)continue;const{score:i,terms:r,match:c}=e.get(n);le(s.terms,r),t.set(n,{score:s.score+i,terms:s.terms,match:Object.assign(s.match,c)})}return t},[ot]:(o,e)=>{for(const t of e.keys())o.delete(t);return o}},rt={k:1.2,b:.7,d:.5},ct=(o,e,t,n,s,i)=>{const{k:r,b:c,d:l}=i;return Math.log(1+(t-e+.5)/(e+.5))*(l+o*(r+1)/(o+r*(1-c+c*n/s)))},lt=o=>(e,t,n)=>{const s=typeof o.fuzzy=="function"?o.fuzzy(e,t,n):o.fuzzy||!1,i=typeof o.prefix=="function"?o.prefix(e,t,n):o.prefix===!0,r=typeof o.boostTerm=="function"?o.boostTerm(e,t,n):1;return{term:e,fuzzy:s,prefix:i,termBoost:r}},K={idField:"id",extractField:(o,e)=>o[e],tokenize:o=>o.split(at),processTerm:o=>o.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(o,e)=>{typeof(console==null?void 0:console[o])=="function"&&console[o](e)},autoVacuum:!0},ce={combineWith:oe,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:rt},dt={combineWith:ke,prefix:(o,e,t)=>e===t.length-1},ee={batchSize:1e3,batchWait:10},te={minDirtFactor:.1,minDirtCount:20},X={...ee,...te},ut=(o,e)=>{o.includes(e)||o.push(e)},le=(o,e)=>{for(const t of e)o.includes(t)||o.push(t)},de=({score:o},{score:e})=>e-o,ue=()=>new Map,U=o=>{const e=new Map;for(const t of Object.keys(o))e.set(parseInt(t,10),o[t]);return e},J=async o=>{const e=new Map;let t=0;for(const n of Object.keys(o))e.set(parseInt(n,10),o[n]),++t%1e3===0&&await Ce(0);return e},Ce=o=>new Promise(e=>setTimeout(e,o)),at=/[\n\r\p{Z}\p{P}]+/u,ht={class:"relative",style:{height:"100vh"}},ft={class:"flex h-full"},mt={class:"h-full border-r border-r-gray-800 of-auto","h-full":"",style:{width:"22rem","min-width":"0",flex:"0 0 auto"}},pt={flex:"~ col gap2",border:"b base",class:"border-b-gray-800 p3 flex-1"},_t=["onClick"],gt={style:{width:"6rem"},class:"text-left"},vt=["onClick"],wt={key:0,class:"h-full relative w-full of-auto"},yt="nuxt-graphql-middleware",bt=L({__name:"index",setup(o){const e=new A({fields:["id","source","name","filePath","identifier"],storeFields:["id","source","name","identifier","filePath"],searchOptions:{fuzzy:.7}}),t=W(""),n=W([]),s=W(""),i=W(""),r=O(()=>{if(t.value)return n.value.find(u=>u.id===t.value)});async function c(u){e.removeAll(),n.value=u,e.addAll(u)}ve(async u=>{const a=u.devtools.extendClientRpc(yt,{showNotification(){},documentsUpdated(p){c(p)}}),f=await a.getDocuments();c(f);const m=await a.getModuleOptions();i.value=m.serverApiPrefix});function l(u){const a=document.createElement("textarea");a.value=u.source,a.style.top="0",a.style.left="0",a.style.position="fixed",document.body.appendChild(a),a.focus(),a.select();try{document.execCommand("copy")}catch{}document.body.removeChild(a)}const d=O(()=>s.value?e.search(s.value):n.value);return(u,a)=>{const f=Ee,m=ge,p=et;return g(),w("div",ht,[v("div",ft,[v("div",mt,[v("div",pt,[N(f,{modelValue:x(s),"onUpdate:modelValue":a[0]||(a[0]=h=>me(s)?s.value=h:null),placeholder:"Search documents...",icon:"carbon-search",class:"w-full"},null,8,["modelValue"])]),(g(!0),w(B,null,ne(x(d),h=>(g(),w("div",{key:h.id,class:"relative group"},[v("button",{class:"text-secondary hover:n-bg-hover flex select-none truncate px2 py2 font-mono text-sm w-full",onClick:_=>t.value=h.id},[v("div",gt,[h.identifier==="query"?(g(),P(m,{key:0,green:"",text:"Query"})):h.identifier==="mutation"?(g(),P(m,{key:1,orange:"",text:"Mutation"})):F("",!0)]),v("div",null,V(h.name),1)],8,_t),v("button",{class:"absolute right-0 top-0 text-sm h-full flex items-center opacity-0 group-hover:opacity-100 pr2",onClick:_=>l(h)},a[1]||(a[1]=[v("span",null,"Copy",-1)]),8,vt)]))),128))]),a[2]||(a[2]=v("div",{class:"splitpanes__splitter"},null,-1)),x(r)?(g(),w("div",wt,[N(p,fe(x(r),{"server-api-prefix":x(i)}),null,16,["server-api-prefix"])])):F("",!0)])])}}});export{bt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as s,t as a,v as i,x as e,y as o}from"./
|
|
1
|
+
import{_ as s,t as a,v as i,x as e,y as o}from"./B-BZSpkz.js";import{u}from"./CFKT0oF2.js";const l={class:"antialiased bg-white dark:bg-black dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-black"},c={class:"max-w-520px text-center"},d=["textContent"],p=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const r=t;return u({title:`${r.statusCode} - ${r.statusMessage} | ${r.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver((e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)})).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1{font-size:inherit;font-weight:inherit}h1,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(g,n)=>(i(),a("div",l,[n[0]||(n[0]=e("div",{class:"-bottom-1/2 fixed h-1/2 left-0 right-0 spotlight"},null,-1)),e("div",c,[e("h1",{class:"font-medium mb-8 sm:text-10xl text-8xl",textContent:o(t.statusCode)},null,8,d),e("p",{class:"font-light leading-tight mb-16 px-8 sm:px-0 sm:text-4xl text-xl",textContent:o(t.description)},null,8,p)])]))}},b=s(f,[["__scopeId","data-v-15ef2dd2"]]);export{b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"bab648bf-3b57-4a37-bfa7-d3789fe7395f","timestamp":1749205473953}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"bab648bf-3b57-4a37-bfa7-d3789fe7395f","timestamp":1749205473953,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--nui-c-context:125,125,125}html{background-color:#fff}html.dark{background-color:#151515;color:#fff;color-scheme:dark}::-moz-selection{background:#8884}::selection{background:#8884}.shiki .line{display:inline-block;position:relative;width:100%}.shiki.diff .line>span{filter:saturate(.75);opacity:.75}.shiki.diff .line-added,.shiki.diff .line-removed{scroll-margin:5em}.shiki.diff .line-added>span,.shiki.diff .line-removed>span{opacity:1!important;position:inherit;scroll-margin:20px;z-index:100}.shiki.diff .line-added>span{color:#218c3b!important}.shiki.diff .line-removed>span{color:#d15547!important}.shiki .line-added:after{background-color:#43885420}.shiki .line-added:after,.shiki .line-removed:after{bottom:0;content:"";display:block;left:0;position:absolute;right:0;top:0}.shiki .line-removed:after{background-color:#8f4c3926}::view-transition-new(root),::view-transition-old(root){animation:none;mix-blend-mode:normal}::view-transition-old(root){z-index:1}::view-transition-new(root){z-index:2147483646}.dark::view-transition-old(root){z-index:2147483646}.dark::view-transition-new(root){z-index:1}*,:after,:before{border-color:var(--un-default-border-color, #e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content: ""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }@font-face{font-display:swap;font-family:DM Mono;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/dmmono/v14/aFTU7PB1QTsUX8KYthSQBK6PYK3EXw.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c0,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-display:swap;font-family:DM Mono;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/dmmono/v14/aFTU7PB1QTsUX8KYthqQBK6PYK0.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-display:swap;font-family:DM Sans;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/dmsans/v15/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAopxRR232RmYJp8I5zzw.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c0,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-display:swap;font-family:DM Sans;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/dmsans/v15/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAopxRSW32RmYJp8I5.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}.carbon-chevron-down{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 22L6 12l1.4-1.4l8.6 8.6l8.6-8.6L26 12z'/%3E%3C/svg%3E");background-color:currentColor;color:inherit;display:inline-block;height:1.2em;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;vertical-align:middle;width:1.2em}.carbon-search{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m29 27.586l-7.552-7.552a11.018 11.018 0 1 0-1.414 1.414L27.586 29ZM4 13a9 9 0 1 1 9 9a9.01 9.01 0 0 1-9-9'/%3E%3C/svg%3E");background-color:currentColor;color:inherit;display:inline-block;height:1.2em;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;vertical-align:middle;width:1.2em}.n-icon{flex:none}.n-border-base{border-color:#9ca3af33}.dark .n-bg-base{--un-bg-opacity:1;background-color:rgb(21 21 21 / var(--un-bg-opacity))}.n-bg-base,.n-code-block{--un-bg-opacity:1;background-color:rgb(255 255 255 / var(--un-bg-opacity))}.dark .n-code-block{--un-bg-opacity:1;background-color:rgb(18 18 18 / var(--un-bg-opacity))}.hover\:n-bg-hover:hover{background-color:#9ca3af08}.hover\:n-link-hover:hover{--un-text-opacity:1;color:rgba(var(--nui-c-context),var(--un-text-opacity));-webkit-text-decoration-color:rgba(var(--nui-c-context),var(--un-line-opacity))!important;--un-line-opacity:1 !important;opacity:1!important;text-decoration-color:rgba(var(--nui-c-context),var(--un-line-opacity))!important;text-decoration-style:dotted}.n-link-base{text-decoration-color:#0003;text-decoration-line:underline;text-underline-offset:2px}.dark .n-link-base{text-decoration-color:#fff6}.focus-within\:n-focus-base:focus-within{--un-ring-width:2px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);--un-ring-color:rgba(var(--nui-c-context),.5) }.n-transition{transition-duration:.15s;transition-duration:.2s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.-bottom-1\/2{bottom:-50%}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-10{z-index:10}.z-20{z-index:20}.grid{display:grid}.mx-0\.5{margin-left:.125rem;margin-right:.125rem}.mb-16{margin-bottom:4rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mb3{margin-bottom:.75rem}.mb4{margin-bottom:1rem}.ml-0\.3em{margin-left:.3em}.ml-0\.4em{margin-left:.4em}.ml2{margin-left:.5rem}.mr-0\.1em{margin-right:.1em}.mt1{margin-top:.25rem}.inline,[inline=""]{display:inline}.inline-block{display:inline-block}.h-1\/2{height:50%}.h-auto{height:auto}.h-full,[h-full=""]{height:100%}.h1{height:.25rem}.h2{height:.5rem}.max-w-520px{max-width:520px}.min-h-screen{min-height:100vh}.w-full{width:100%}.flex,[flex~="~"]{display:flex}.flex-1{flex:1 1 0%}.flex-auto{flex:1 1 auto}.flex-col,[flex~=col]{flex-direction:column}.cursor-pointer,[cursor-pointer=""]{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.place-content-center{place-content:center}.place-self-start,[place-self-start=""]{place-self:start}.items-center,[items-center=""]{align-items:center}.justify-center{justify-content:center}.flex-gap2,.gap2,[flex~=gap2]{gap:.5rem}.gap-3,[flex~=gap-3]{gap:.75rem}.of-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.b,.border{border-width:1px}.border-r{border-right-width:1px}[border~=b]{border-bottom-width:1px}.focus-within\:border-context:focus-within{--un-border-opacity:1;border-color:rgba(var(--nui-c-context),var(--un-border-opacity))}.border-b-gray-800{--un-border-opacity:1;--un-border-bottom-opacity:var(--un-border-opacity);border-bottom-color:rgb(31 41 55 / var(--un-border-bottom-opacity))}.border-r-gray-800{--un-border-opacity:1;--un-border-right-opacity:var(--un-border-opacity);border-right-color:rgb(31 41 55 / var(--un-border-right-opacity))}.rounded{border-radius:.25rem}.rounded-t-md{border-top-left-radius:.375rem;border-top-right-radius:.375rem}.bg-black\/5{background-color:#0000000d}.bg-gray-400\:10{background-color:#9ca3af1a}.bg-green-400\:10{background-color:#4ade801a}.bg-orange-400\:10{background-color:#fb923c1a}.bg-red-900{--un-bg-opacity:1;background-color:rgb(127 29 29 / var(--un-bg-opacity))}.bg-white{--un-bg-opacity:1;background-color:rgb(255 255 255 / var(--un-bg-opacity))}.dark .dark\:bg-black{--un-bg-opacity:1;background-color:rgb(0 0 0 / var(--un-bg-opacity))}.dark .dark\:bg-white\/10{background-color:#ffffff1a}.p-8{padding:2rem}.p2{padding:.5rem}.p3{padding:.75rem}.p4{padding:1rem}.p5{padding:1.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-4,.px4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.px2{padding-left:.5rem;padding-right:.5rem}.py-0\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2,.py2{padding-bottom:.5rem;padding-top:.5rem}.pb6{padding-bottom:1.5rem}.pl-1{padding-left:.25rem}.pr-2,.pr2{padding-right:.5rem}.pt-14{padding-top:3.5rem}.pt2{padding-top:.5rem}.text-center{text-align:center}.text-left{text-align:left}.text-1\.1em{font-size:1.1em}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-6xl{font-size:3.75rem;line-height:1}.text-8xl{font-size:6rem;line-height:1}.text-base,[text-base=""]{font-size:1rem;line-height:1.5rem}.text-sm,[text-sm=""]{font-size:.875rem;line-height:1.25rem}.text-xl,[text-xl=""]{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.dark .dark\:text-white{--un-text-opacity:1;color:rgb(255 255 255 / var(--un-text-opacity))}.text-black{--un-text-opacity:1;color:rgb(0 0 0 / var(--un-text-opacity))}.text-gray{--un-text-opacity:1;color:rgb(156 163 175 / var(--un-text-opacity))}.text-green-400{--un-text-opacity:1;color:rgb(74 222 128 / var(--un-text-opacity))}.text-orange-400{--un-text-opacity:1;color:rgb(251 146 60 / var(--un-text-opacity))}.text-red-100{--un-text-opacity:1;color:rgb(254 226 226 / var(--un-text-opacity))}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.leading-tight{line-height:1.25}.font-mono{font-family:DM Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:DM Sans,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.group:hover .group-hover\:opacity-100,.op100{opacity:1}.op50,[op50=""]{opacity:.5}.op60{opacity:.6}.op75,[op75=""]{opacity:.75}.opacity-0{opacity:0}.\!outline-none{outline:2px solid transparent!important;outline-offset:2px!important}.transition,[transition=""]{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-500,[duration-500=""]{transition-duration:.5s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (min-width:640px){.sm\:px-0{padding-left:0;padding-right:0}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-3{padding-bottom:.75rem;padding-top:.75rem}.sm\:text-2xl{font-size:1.5rem;line-height:2rem}.sm\:text-4xl{font-size:2.25rem;line-height:2.5rem}.sm\:text-8xl{font-size:6rem;line-height:1}.sm\:text-xl{font-size:1.25rem;line-height:1.75rem}}
|
|
1
|
+
:root{--nui-c-context:125,125,125}html{background-color:#fff}html.dark{background-color:#151515;color:#fff;color-scheme:dark}::-moz-selection{background:#8884}::selection{background:#8884}.shiki .line{display:inline-block;position:relative;width:100%}.shiki.diff .line>span{filter:saturate(.75);opacity:.75}.shiki.diff .line-added,.shiki.diff .line-removed{scroll-margin:5em}.shiki.diff .line-added>span,.shiki.diff .line-removed>span{opacity:1!important;position:inherit;scroll-margin:20px;z-index:100}.shiki.diff .line-added>span{color:#218c3b!important}.shiki.diff .line-removed>span{color:#d15547!important}.shiki .line-added:after{background-color:#43885420}.shiki .line-added:after,.shiki .line-removed:after{bottom:0;content:"";display:block;left:0;position:absolute;right:0;top:0}.shiki .line-removed:after{background-color:#8f4c3926}::view-transition-new(root),::view-transition-old(root){animation:none;mix-blend-mode:normal}::view-transition-old(root){z-index:1}::view-transition-new(root){z-index:2147483646}.dark::view-transition-old(root){z-index:2147483646}.dark::view-transition-new(root){z-index:1}*,:after,:before{border-color:var(--un-default-border-color, #e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content: ""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }@font-face{font-display:swap;font-family:DM Mono;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/dmmono/v15/aFTU7PB1QTsUX8KYthSQBK6PYK3EXw.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c0,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-display:swap;font-family:DM Mono;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/dmmono/v15/aFTU7PB1QTsUX8KYthqQBK6PYK0.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-display:swap;font-family:DM Sans;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/dmsans/v16/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAopxRR232RmYJp8I5zzw.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c0,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-display:swap;font-family:DM Sans;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/dmsans/v16/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAopxRSW32RmYJp8I5.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}.carbon-chevron-down{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 22L6 12l1.4-1.4l8.6 8.6l8.6-8.6L26 12z'/%3E%3C/svg%3E");background-color:currentColor;color:inherit;display:inline-block;height:1.2em;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;vertical-align:middle;width:1.2em}.carbon-search{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m29 27.586l-7.552-7.552a11.018 11.018 0 1 0-1.414 1.414L27.586 29ZM4 13a9 9 0 1 1 9 9a9.01 9.01 0 0 1-9-9'/%3E%3C/svg%3E");background-color:currentColor;color:inherit;display:inline-block;height:1.2em;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;vertical-align:middle;width:1.2em}.n-icon{flex:none}.n-border-base{border-color:#9ca3af33}.dark .n-bg-base{--un-bg-opacity:1;background-color:rgb(21 21 21 / var(--un-bg-opacity))}.n-bg-base,.n-code-block{--un-bg-opacity:1;background-color:rgb(255 255 255 / var(--un-bg-opacity))}.dark .n-code-block{--un-bg-opacity:1;background-color:rgb(18 18 18 / var(--un-bg-opacity))}.hover\:n-bg-hover:hover{background-color:#9ca3af08}.hover\:n-link-hover:hover{--un-text-opacity:1;color:rgba(var(--nui-c-context),var(--un-text-opacity));-webkit-text-decoration-color:rgba(var(--nui-c-context),var(--un-line-opacity))!important;--un-line-opacity:1 !important;opacity:1!important;text-decoration-color:rgba(var(--nui-c-context),var(--un-line-opacity))!important;text-decoration-style:dotted}.n-link-base{text-decoration-color:#0003;text-decoration-line:underline;text-underline-offset:2px}.dark .n-link-base{text-decoration-color:#fff6}.focus-within\:n-focus-base:focus-within{--un-ring-width:2px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);--un-ring-color:rgba(var(--nui-c-context),.5) }.n-transition{transition-duration:.15s;transition-duration:.2s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.-bottom-1\/2{bottom:-50%}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-10{z-index:10}.z-20{z-index:20}.grid{display:grid}.mx-0\.5{margin-left:.125rem;margin-right:.125rem}.mb-16{margin-bottom:4rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mb3{margin-bottom:.75rem}.mb4{margin-bottom:1rem}.ml-0\.3em{margin-left:.3em}.ml-0\.4em{margin-left:.4em}.ml2{margin-left:.5rem}.mr-0\.1em{margin-right:.1em}.mt1{margin-top:.25rem}.inline,[inline=""]{display:inline}.inline-block{display:inline-block}.h-1\/2{height:50%}.h-auto{height:auto}.h-full,[h-full=""]{height:100%}.h1{height:.25rem}.h2{height:.5rem}.max-w-520px{max-width:520px}.min-h-screen{min-height:100vh}.w-full{width:100%}.flex,[flex~="~"]{display:flex}.flex-1{flex:1 1 0%}.flex-auto{flex:1 1 auto}.flex-col,[flex~=col]{flex-direction:column}.cursor-pointer,[cursor-pointer=""]{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.place-content-center{place-content:center}.place-self-start,[place-self-start=""]{place-self:start}.items-center,[items-center=""]{align-items:center}.justify-center{justify-content:center}.flex-gap2,.gap2,[flex~=gap2]{gap:.5rem}.gap-3,[flex~=gap-3]{gap:.75rem}.of-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.b,.border{border-width:1px}.border-r{border-right-width:1px}[border~=b]{border-bottom-width:1px}.focus-within\:border-context:focus-within{--un-border-opacity:1;border-color:rgba(var(--nui-c-context),var(--un-border-opacity))}.border-b-gray-800{--un-border-opacity:1;--un-border-bottom-opacity:var(--un-border-opacity);border-bottom-color:rgb(31 41 55 / var(--un-border-bottom-opacity))}.border-r-gray-800{--un-border-opacity:1;--un-border-right-opacity:var(--un-border-opacity);border-right-color:rgb(31 41 55 / var(--un-border-right-opacity))}.rounded{border-radius:.25rem}.rounded-t-md{border-top-left-radius:.375rem;border-top-right-radius:.375rem}.bg-black\/5{background-color:#0000000d}.bg-gray-400\:10{background-color:#9ca3af1a}.bg-green-400\:10{background-color:#4ade801a}.bg-orange-400\:10{background-color:#fb923c1a}.bg-red-900{--un-bg-opacity:1;background-color:rgb(127 29 29 / var(--un-bg-opacity))}.bg-white{--un-bg-opacity:1;background-color:rgb(255 255 255 / var(--un-bg-opacity))}.dark .dark\:bg-black{--un-bg-opacity:1;background-color:rgb(0 0 0 / var(--un-bg-opacity))}.dark .dark\:bg-white\/10{background-color:#ffffff1a}.p-8{padding:2rem}.p2{padding:.5rem}.p3{padding:.75rem}.p4{padding:1rem}.p5{padding:1.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-4,.px4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.px2{padding-left:.5rem;padding-right:.5rem}.py-0\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2,.py2{padding-bottom:.5rem;padding-top:.5rem}.pb6{padding-bottom:1.5rem}.pl-1{padding-left:.25rem}.pr-2,.pr2{padding-right:.5rem}.pt-14{padding-top:3.5rem}.pt2{padding-top:.5rem}.text-center{text-align:center}.text-left{text-align:left}.text-1\.1em{font-size:1.1em}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-6xl{font-size:3.75rem;line-height:1}.text-8xl{font-size:6rem;line-height:1}.text-base,[text-base=""]{font-size:1rem;line-height:1.5rem}.text-sm,[text-sm=""]{font-size:.875rem;line-height:1.25rem}.text-xl,[text-xl=""]{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.dark .dark\:text-white{--un-text-opacity:1;color:rgb(255 255 255 / var(--un-text-opacity))}.text-black{--un-text-opacity:1;color:rgb(0 0 0 / var(--un-text-opacity))}.text-gray{--un-text-opacity:1;color:rgb(156 163 175 / var(--un-text-opacity))}.text-green-400{--un-text-opacity:1;color:rgb(74 222 128 / var(--un-text-opacity))}.text-orange-400{--un-text-opacity:1;color:rgb(251 146 60 / var(--un-text-opacity))}.text-red-100{--un-text-opacity:1;color:rgb(254 226 226 / var(--un-text-opacity))}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.leading-tight{line-height:1.25}.font-mono{font-family:DM Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:DM Sans,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.group:hover .group-hover\:opacity-100,.op100{opacity:1}.op50,[op50=""]{opacity:.5}.op60{opacity:.6}.op75,[op75=""]{opacity:.75}.opacity-0{opacity:0}.\!outline-none{outline:2px solid transparent!important;outline-offset:2px!important}.transition,[transition=""]{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-500,[duration-500=""]{transition-duration:.5s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (min-width:640px){.sm\:px-0{padding-left:0;padding-right:0}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-3{padding-bottom:.75rem;padding-top:.75rem}.sm\:text-2xl{font-size:1.5rem;line-height:2rem}.sm\:text-4xl{font-size:2.25rem;line-height:2.5rem}.sm\:text-8xl{font-size:6rem;line-height:1}.sm\:text-xl{font-size:1.25rem;line-height:1.75rem}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.spotlight[data-v-3f6a44b2]{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);bottom:-30vh;filter:blur(20vh);height:40vh}.gradient-border[data-v-3f6a44b2]{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:.5rem;position:relative}@media (prefers-color-scheme:light){.gradient-border[data-v-3f6a44b2]{background-color:#ffffff4d}.gradient-border[data-v-3f6a44b2]:before{background:linear-gradient(90deg,#e2e2e2,#e2e2e2 25%,#00dc82,#36e4da 75%,#0047e1)}}@media (prefers-color-scheme:dark){.gradient-border[data-v-3f6a44b2]{background-color:#1414144d}.gradient-border[data-v-3f6a44b2]:before{background:linear-gradient(90deg,#303030,#303030 25%,#00dc82,#36e4da 75%,#0047e1)}}.gradient-border[data-v-3f6a44b2]:before{background-size:400% auto;border-radius:.5rem;bottom:0;content:"";left:0;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:.5;padding:2px;position:absolute;right:0;top:0;transition:background-position .3s ease-in-out,opacity .2s ease-in-out;width:100%}.gradient-border[data-v-3f6a44b2]:hover:before{background-position:-50% 0;opacity:1}.fixed[data-v-3f6a44b2]{position:fixed}.left-0[data-v-3f6a44b2]{left:0}.right-0[data-v-3f6a44b2]{right:0}.z-10[data-v-3f6a44b2]{z-index:10}.z-20[data-v-3f6a44b2]{z-index:20}.grid[data-v-3f6a44b2]{display:grid}.mb-16[data-v-3f6a44b2]{margin-bottom:4rem}.mb-8[data-v-3f6a44b2]{margin-bottom:2rem}.max-w-520px[data-v-3f6a44b2]{max-width:520px}.min-h-screen[data-v-3f6a44b2]{min-height:100vh}.w-full[data-v-3f6a44b2]{width:100%}.flex[data-v-3f6a44b2]{display:flex}.cursor-pointer[data-v-3f6a44b2]{cursor:pointer}.place-content-center[data-v-3f6a44b2]{place-content:center}.items-center[data-v-3f6a44b2]{align-items:center}.justify-center[data-v-3f6a44b2]{justify-content:center}.overflow-hidden[data-v-3f6a44b2]{overflow:hidden}.bg-white[data-v-3f6a44b2]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-4[data-v-3f6a44b2]{padding-left:1rem;padding-right:1rem}.px-8[data-v-3f6a44b2]{padding-left:2rem;padding-right:2rem}.py-2[data-v-3f6a44b2]{padding-bottom:.5rem;padding-top:.5rem}.text-center[data-v-3f6a44b2]{text-align:center}.text-8xl[data-v-3f6a44b2]{font-size:6rem;line-height:1}.text-xl[data-v-3f6a44b2]{font-size:1.25rem;line-height:1.75rem}.text-black[data-v-3f6a44b2]{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.font-light[data-v-3f6a44b2]{font-weight:300}.font-medium[data-v-3f6a44b2]{font-weight:500}.leading-tight[data-v-3f6a44b2]{line-height:1.25}.font-sans[data-v-3f6a44b2]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.antialiased[data-v-3f6a44b2]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){.dark\:bg-black[data-v-3f6a44b2]{--un-bg-opacity:1;background-color:rgb(0 0 0/var(--un-bg-opacity))}.dark\:text-white[data-v-3f6a44b2]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media (min-width:640px){.sm\:px-0[data-v-3f6a44b2]{padding-left:0;padding-right:0}.sm\:px-6[data-v-3f6a44b2]{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-3[data-v-3f6a44b2]{padding-bottom:.75rem;padding-top:.75rem}.sm\:text-4xl[data-v-3f6a44b2]{font-size:2.25rem;line-height:2.5rem}.sm\:text-xl[data-v-3f6a44b2]{font-size:1.25rem;line-height:1.75rem}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.spotlight[data-v-15ef2dd2]{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);filter:blur(20vh)}.fixed[data-v-15ef2dd2]{position:fixed}.-bottom-1\/2[data-v-15ef2dd2]{bottom:-50%}.left-0[data-v-15ef2dd2]{left:0}.right-0[data-v-15ef2dd2]{right:0}.grid[data-v-15ef2dd2]{display:grid}.mb-16[data-v-15ef2dd2]{margin-bottom:4rem}.mb-8[data-v-15ef2dd2]{margin-bottom:2rem}.h-1\/2[data-v-15ef2dd2]{height:50%}.max-w-520px[data-v-15ef2dd2]{max-width:520px}.min-h-screen[data-v-15ef2dd2]{min-height:100vh}.place-content-center[data-v-15ef2dd2]{place-content:center}.overflow-hidden[data-v-15ef2dd2]{overflow:hidden}.bg-white[data-v-15ef2dd2]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-8[data-v-15ef2dd2]{padding-left:2rem;padding-right:2rem}.text-center[data-v-15ef2dd2]{text-align:center}.text-8xl[data-v-15ef2dd2]{font-size:6rem;line-height:1}.text-xl[data-v-15ef2dd2]{font-size:1.25rem;line-height:1.75rem}.text-black[data-v-15ef2dd2]{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.font-light[data-v-15ef2dd2]{font-weight:300}.font-medium[data-v-15ef2dd2]{font-weight:500}.leading-tight[data-v-15ef2dd2]{line-height:1.25}.font-sans[data-v-15ef2dd2]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.antialiased[data-v-15ef2dd2]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){.dark\:bg-black[data-v-15ef2dd2]{--un-bg-opacity:1;background-color:rgb(0 0 0/var(--un-bg-opacity))}.dark\:text-white[data-v-15ef2dd2]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media (min-width:640px){.sm\:px-0[data-v-15ef2dd2]{padding-left:0;padding-right:0}.sm\:text-4xl[data-v-15ef2dd2]{font-size:2.25rem;line-height:2.5rem}}
|
package/dist/client/index.html
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<!DOCTYPE html><html><head><meta charset="utf-8">
|
|
2
2
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
3
|
-
<link rel="stylesheet" href="/__nuxt-graphql-middleware/_nuxt/entry.
|
|
4
|
-
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/
|
|
5
|
-
<link rel="prefetch" as="style" crossorigin href="/__nuxt-graphql-middleware/_nuxt/error-404.
|
|
6
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/
|
|
7
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/
|
|
8
|
-
<link rel="prefetch" as="style" crossorigin href="/__nuxt-graphql-middleware/_nuxt/error-500.
|
|
9
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/
|
|
10
|
-
<script type="module" src="/__nuxt-graphql-middleware/_nuxt/
|
|
11
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-graphql-middleware",buildId:"
|
|
3
|
+
<link rel="stylesheet" href="/__nuxt-graphql-middleware/_nuxt/entry.BBgLZ1Jk.css" crossorigin>
|
|
4
|
+
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/B-BZSpkz.js">
|
|
5
|
+
<link rel="prefetch" as="style" crossorigin href="/__nuxt-graphql-middleware/_nuxt/error-404.Bbd2eCoc.css">
|
|
6
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/C6_BMIRJ.js">
|
|
7
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/CFKT0oF2.js">
|
|
8
|
+
<link rel="prefetch" as="style" crossorigin href="/__nuxt-graphql-middleware/_nuxt/error-500.Cd2cwFc3.css">
|
|
9
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-graphql-middleware/_nuxt/CyxO-88q.js">
|
|
10
|
+
<script type="module" src="/__nuxt-graphql-middleware/_nuxt/B-BZSpkz.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1749205476125,false]</script>
|
|
11
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-graphql-middleware",buildId:"bab648bf-3b57-4a37-bfa7-d3789fe7395f",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/module.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
-
import { M as ModuleContext, a as ModuleOptions } from './shared/nuxt-graphql-middleware.
|
|
2
|
+
import { M as ModuleContext, a as ModuleOptions } from './shared/nuxt-graphql-middleware.-BeiPV4H.mjs';
|
|
3
3
|
import { OperationResponseError } from '../dist/runtime/types.js';
|
|
4
4
|
import { HookResult } from 'nuxt/schema';
|
|
5
5
|
import { GeneratorOutput } from 'graphql-typescript-deluxe';
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -15,11 +15,12 @@ import { defu } from 'defu';
|
|
|
15
15
|
import micromatch from 'micromatch';
|
|
16
16
|
import { ConfirmPrompt } from '@clack/core';
|
|
17
17
|
import isUnicodeSupported from 'is-unicode-supported';
|
|
18
|
+
import { hash } from 'ohash';
|
|
18
19
|
import { existsSync as existsSync$1 } from 'fs';
|
|
19
20
|
import { onDevToolsInitialized, extendServerRpc } from '@nuxt/devtools-kit';
|
|
20
21
|
|
|
21
22
|
const name = "nuxt-graphql-middleware";
|
|
22
|
-
const version = "5.
|
|
23
|
+
const version = "5.1.1";
|
|
23
24
|
|
|
24
25
|
const logger = useLogger("nuxt-graphql-middleware");
|
|
25
26
|
const defaultOptions = {
|
|
@@ -32,7 +33,14 @@ const defaultOptions = {
|
|
|
32
33
|
documents: [],
|
|
33
34
|
devtools: true,
|
|
34
35
|
errorOverlay: true,
|
|
35
|
-
graphqlConfigFilePath: "./graphql.config.ts"
|
|
36
|
+
graphqlConfigFilePath: "./graphql.config.ts",
|
|
37
|
+
experimental: {
|
|
38
|
+
improvedQueryParamEncoding: false
|
|
39
|
+
},
|
|
40
|
+
clientCache: {
|
|
41
|
+
enabled: false,
|
|
42
|
+
maxSize: 100
|
|
43
|
+
}
|
|
36
44
|
};
|
|
37
45
|
function validateOptions(options) {
|
|
38
46
|
if (!options.graphqlEndpoint) {
|
|
@@ -816,6 +824,7 @@ class ModuleHelper {
|
|
|
816
824
|
if (!mergedOptions.autoImportPatterns) {
|
|
817
825
|
mergedOptions.autoImportPatterns = [
|
|
818
826
|
"~~/**/*.{gql,graphql}",
|
|
827
|
+
"~/**/*.{gql,graphql}",
|
|
819
828
|
"!node_modules"
|
|
820
829
|
];
|
|
821
830
|
}
|
|
@@ -1070,7 +1079,7 @@ const ClientOptions = defineStaticTemplate(
|
|
|
1070
1079
|
export { clientOptions }
|
|
1071
1080
|
`;
|
|
1072
1081
|
}
|
|
1073
|
-
return `export const clientOptions =
|
|
1082
|
+
return `export const clientOptions = undefined`;
|
|
1074
1083
|
},
|
|
1075
1084
|
(helper) => {
|
|
1076
1085
|
if (helper.paths.clientOptions) {
|
|
@@ -1080,19 +1089,41 @@ export { clientOptions }
|
|
|
1080
1089
|
return `import type { GraphqlClientOptions } from '${helper.paths.runtimeTypes}'
|
|
1081
1090
|
import clientOptionsImport from '${pathRelative}'
|
|
1082
1091
|
|
|
1083
|
-
declare export const clientOptions: GraphqlClientOptions
|
|
1092
|
+
declare export const clientOptions: GraphqlClientOptions|undefined
|
|
1084
1093
|
export type GraphqlClientContext = typeof clientOptionsImport extends GraphqlClientOptions<infer R> ? R : {}
|
|
1085
1094
|
`;
|
|
1086
1095
|
}
|
|
1087
1096
|
return `
|
|
1088
1097
|
import type { GraphqlClientOptions } from '${helper.paths.runtimeTypes}'
|
|
1089
1098
|
|
|
1090
|
-
declare export const clientOptions: GraphqlClientOptions
|
|
1099
|
+
declare export const clientOptions: GraphqlClientOptions|undefined
|
|
1091
1100
|
export type GraphqlClientContext = {}
|
|
1092
1101
|
`;
|
|
1093
1102
|
}
|
|
1094
1103
|
);
|
|
1095
1104
|
|
|
1105
|
+
const Config = defineStaticTemplate(
|
|
1106
|
+
{ path: "nuxt-graphql-middleware/config" },
|
|
1107
|
+
(helper) => {
|
|
1108
|
+
const experimentalQueryParamEncoding = !!helper.options.experimental.improvedQueryParamEncoding;
|
|
1109
|
+
const clientCacheEnabledAtBuild = !!helper.options.clientCache.enabled;
|
|
1110
|
+
return `
|
|
1111
|
+
export const experimentalQueryParamEncoding = ${JSON.stringify(experimentalQueryParamEncoding)}
|
|
1112
|
+
export const clientCacheEnabledAtBuild = ${JSON.stringify(clientCacheEnabledAtBuild)}
|
|
1113
|
+
export const importMetaServer = import.meta.server
|
|
1114
|
+
export const importMetaClient = import.meta.client
|
|
1115
|
+
`;
|
|
1116
|
+
},
|
|
1117
|
+
() => {
|
|
1118
|
+
return `
|
|
1119
|
+
declare export const experimentalQueryParamEncoding: boolean
|
|
1120
|
+
declare export const clientCacheEnabledAtBuild: boolean
|
|
1121
|
+
declare export const importMetaServer: boolean
|
|
1122
|
+
declare export const importMetaClient: boolean
|
|
1123
|
+
`;
|
|
1124
|
+
}
|
|
1125
|
+
);
|
|
1126
|
+
|
|
1096
1127
|
const Documents = defineGeneratorTemplate(
|
|
1097
1128
|
{ path: "nuxt-graphql-middleware/documents", virtual: true },
|
|
1098
1129
|
(output, helper) => {
|
|
@@ -1136,7 +1167,7 @@ const GraphqlConfig = defineStaticTemplate(
|
|
|
1136
1167
|
)
|
|
1137
1168
|
);
|
|
1138
1169
|
return `
|
|
1139
|
-
import { hookFiles } from './hook-files'
|
|
1170
|
+
import { hookFiles } from './hook-files.js'
|
|
1140
1171
|
|
|
1141
1172
|
const schema = ${JSON.stringify(schemaPath)}
|
|
1142
1173
|
|
|
@@ -1181,6 +1212,43 @@ export function getEndpoint(operation: string, operationName: string): string`;
|
|
|
1181
1212
|
}
|
|
1182
1213
|
);
|
|
1183
1214
|
|
|
1215
|
+
const HookDocuments = defineGeneratorTemplate(
|
|
1216
|
+
{
|
|
1217
|
+
path: "nuxt-graphql-middleware/hook-documents.graphql",
|
|
1218
|
+
virtual: false,
|
|
1219
|
+
isFullPath: true
|
|
1220
|
+
},
|
|
1221
|
+
(_output, _helper, collector) => {
|
|
1222
|
+
return collector.getHookDocuments().map((v) => {
|
|
1223
|
+
return `
|
|
1224
|
+
# ${v.identifier}
|
|
1225
|
+
${v.source}
|
|
1226
|
+
`;
|
|
1227
|
+
}).join("\n\n");
|
|
1228
|
+
},
|
|
1229
|
+
null
|
|
1230
|
+
);
|
|
1231
|
+
|
|
1232
|
+
const HookFiles = defineGeneratorTemplate(
|
|
1233
|
+
{
|
|
1234
|
+
path: "nuxt-graphql-middleware/hook-files",
|
|
1235
|
+
virtual: false
|
|
1236
|
+
},
|
|
1237
|
+
(_output, helper, collector) => {
|
|
1238
|
+
const configPath = helper.resolvers.root.resolve(
|
|
1239
|
+
(helper.options.graphqlConfigFilePath || "").replace(
|
|
1240
|
+
"/graphql.config.ts",
|
|
1241
|
+
""
|
|
1242
|
+
)
|
|
1243
|
+
);
|
|
1244
|
+
const files = collector.getHookFiles().map((filePath) => {
|
|
1245
|
+
return "./" + relative(configPath, filePath);
|
|
1246
|
+
});
|
|
1247
|
+
return `export const hookFiles = ${JSON.stringify(files, null, 2)}`;
|
|
1248
|
+
},
|
|
1249
|
+
null
|
|
1250
|
+
);
|
|
1251
|
+
|
|
1184
1252
|
const NitroTypes = defineGeneratorTemplate(
|
|
1185
1253
|
{ path: "nuxt-graphql-middleware/nitro" },
|
|
1186
1254
|
null,
|
|
@@ -1211,6 +1279,46 @@ ${endpoints.sort().join("\n")}
|
|
|
1211
1279
|
}
|
|
1212
1280
|
);
|
|
1213
1281
|
|
|
1282
|
+
const OperationHashes = defineGeneratorTemplate(
|
|
1283
|
+
{ path: "nuxt-graphql-middleware/operation-hashes", virtual: true },
|
|
1284
|
+
(output, helper) => {
|
|
1285
|
+
if (helper.isDev) {
|
|
1286
|
+
return `export const operationHashes = {}`;
|
|
1287
|
+
}
|
|
1288
|
+
const fragmentHashMap = {};
|
|
1289
|
+
const generatedCode = output.getGeneratedCode();
|
|
1290
|
+
generatedCode.forEach((code) => {
|
|
1291
|
+
if (code.type === "fragment") {
|
|
1292
|
+
const fragmentHash = hash(code.source);
|
|
1293
|
+
if (code.graphqlName) {
|
|
1294
|
+
fragmentHashMap[code.graphqlName] = fragmentHash;
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
});
|
|
1298
|
+
const lines = [];
|
|
1299
|
+
generatedCode.forEach((code) => {
|
|
1300
|
+
if (code.type === "operation" && code.graphqlName && code.source) {
|
|
1301
|
+
const source = code.source;
|
|
1302
|
+
const fragments = code.getGraphQLFragmentDependencies().map((fragmentName) => {
|
|
1303
|
+
return fragmentHashMap[fragmentName];
|
|
1304
|
+
}).join("");
|
|
1305
|
+
const sourceHash = hash(source + fragments);
|
|
1306
|
+
lines.push(`"${code.graphqlName}": "${sourceHash.substring(0, 10)}"`);
|
|
1307
|
+
}
|
|
1308
|
+
});
|
|
1309
|
+
return `export const operationHashes = {
|
|
1310
|
+
${lines.sort().join(",\n ")}
|
|
1311
|
+
}`;
|
|
1312
|
+
},
|
|
1313
|
+
() => {
|
|
1314
|
+
return `
|
|
1315
|
+
declare module '#nuxt-graphql-middleware/operation-hashes' {
|
|
1316
|
+
export const operationHashes: Record<string, string>;
|
|
1317
|
+
}
|
|
1318
|
+
`;
|
|
1319
|
+
}
|
|
1320
|
+
);
|
|
1321
|
+
|
|
1214
1322
|
const OperationTypesAll = defineGeneratorTemplate(
|
|
1215
1323
|
{ path: "nuxt-graphql-middleware/operation-types" },
|
|
1216
1324
|
() => `export {}`,
|
|
@@ -1233,6 +1341,27 @@ const Operations = defineGeneratorTemplate(
|
|
|
1233
1341
|
}
|
|
1234
1342
|
);
|
|
1235
1343
|
|
|
1344
|
+
const OperationVariables = defineGeneratorTemplate(
|
|
1345
|
+
{ path: "nuxt-graphql-middleware/operation-variables" },
|
|
1346
|
+
(output) => {
|
|
1347
|
+
const operations = output.getCollectedOperations().reduce((acc, collectedOperation) => {
|
|
1348
|
+
const node = collectedOperation.node;
|
|
1349
|
+
const operationName = collectedOperation.graphqlName;
|
|
1350
|
+
const variables = (node.variableDefinitions || []).map(
|
|
1351
|
+
(v) => v.variable.name.value
|
|
1352
|
+
);
|
|
1353
|
+
acc[operationName] = variables;
|
|
1354
|
+
return acc;
|
|
1355
|
+
}, {});
|
|
1356
|
+
return `export const operationVariables = ${JSON.stringify(operations, null, 2)}`;
|
|
1357
|
+
},
|
|
1358
|
+
() => {
|
|
1359
|
+
return `
|
|
1360
|
+
declare export const operationVariables: Record<string, string[]>
|
|
1361
|
+
`;
|
|
1362
|
+
}
|
|
1363
|
+
);
|
|
1364
|
+
|
|
1236
1365
|
const Response = defineGeneratorTemplate(
|
|
1237
1366
|
{ path: "nuxt-graphql-middleware/response" },
|
|
1238
1367
|
null,
|
|
@@ -1313,56 +1442,22 @@ export const operationSources = {
|
|
|
1313
1442
|
}
|
|
1314
1443
|
);
|
|
1315
1444
|
|
|
1316
|
-
const HookDocuments = defineGeneratorTemplate(
|
|
1317
|
-
{
|
|
1318
|
-
path: "nuxt-graphql-middleware/hook-documents.graphql",
|
|
1319
|
-
virtual: false,
|
|
1320
|
-
isFullPath: true
|
|
1321
|
-
},
|
|
1322
|
-
(_output, _helper, collector) => {
|
|
1323
|
-
return collector.getHookDocuments().map((v) => {
|
|
1324
|
-
return `
|
|
1325
|
-
# ${v.identifier}
|
|
1326
|
-
${v.source}
|
|
1327
|
-
`;
|
|
1328
|
-
}).join("\n\n");
|
|
1329
|
-
},
|
|
1330
|
-
null
|
|
1331
|
-
);
|
|
1332
|
-
|
|
1333
|
-
const HookFiles = defineGeneratorTemplate(
|
|
1334
|
-
{
|
|
1335
|
-
path: "nuxt-graphql-middleware/hook-files",
|
|
1336
|
-
virtual: false
|
|
1337
|
-
},
|
|
1338
|
-
(_output, helper, collector) => {
|
|
1339
|
-
const configPath = helper.resolvers.root.resolve(
|
|
1340
|
-
(helper.options.graphqlConfigFilePath || "").replace(
|
|
1341
|
-
"/graphql.config.ts",
|
|
1342
|
-
""
|
|
1343
|
-
)
|
|
1344
|
-
);
|
|
1345
|
-
const files = collector.getHookFiles().map((filePath) => {
|
|
1346
|
-
return "./" + relative(configPath, filePath);
|
|
1347
|
-
});
|
|
1348
|
-
return `export const hookFiles = ${JSON.stringify(files, null, 2)}`;
|
|
1349
|
-
},
|
|
1350
|
-
null
|
|
1351
|
-
);
|
|
1352
|
-
|
|
1353
1445
|
const TEMPLATES = [
|
|
1354
1446
|
ClientOptions,
|
|
1447
|
+
Config,
|
|
1355
1448
|
Documents,
|
|
1356
1449
|
GraphqlConfig,
|
|
1357
1450
|
Helpers,
|
|
1451
|
+
HookDocuments,
|
|
1452
|
+
HookFiles,
|
|
1358
1453
|
NitroTypes,
|
|
1454
|
+
OperationHashes,
|
|
1359
1455
|
OperationTypesAll,
|
|
1360
1456
|
Operations,
|
|
1457
|
+
OperationVariables,
|
|
1361
1458
|
Response,
|
|
1362
1459
|
ServerOptions,
|
|
1363
|
-
Sources
|
|
1364
|
-
HookDocuments,
|
|
1365
|
-
HookFiles
|
|
1460
|
+
Sources
|
|
1366
1461
|
];
|
|
1367
1462
|
|
|
1368
1463
|
const DEVTOOLS_UI_ROUTE = "/__nuxt-graphql-middleware";
|
|
@@ -1418,6 +1513,7 @@ class DevModeHandler {
|
|
|
1418
1513
|
nitro = null;
|
|
1419
1514
|
viteWebSocket = null;
|
|
1420
1515
|
operationsToReload = /* @__PURE__ */ new Set();
|
|
1516
|
+
emitBroadcastEventTimeout = null;
|
|
1421
1517
|
init() {
|
|
1422
1518
|
this.nuxt.hooks.hookOnce("ready", this.onReady.bind(this));
|
|
1423
1519
|
this.nuxt.hooks.hookOnce(
|
|
@@ -1485,15 +1581,23 @@ class DevModeHandler {
|
|
|
1485
1581
|
);
|
|
1486
1582
|
}
|
|
1487
1583
|
if (this.devToolsRpc) {
|
|
1488
|
-
|
|
1489
|
-
this.
|
|
1490
|
-
...this.collector.rpcItems.values()
|
|
1491
|
-
]);
|
|
1492
|
-
} catch {
|
|
1493
|
-
logger.info(
|
|
1494
|
-
"Failed to update GraphQL documents in dev tools. The documents might be stale."
|
|
1495
|
-
);
|
|
1584
|
+
if (this.emitBroadcastEventTimeout) {
|
|
1585
|
+
globalThis.clearTimeout(this.emitBroadcastEventTimeout);
|
|
1496
1586
|
}
|
|
1587
|
+
this.emitBroadcastEventTimeout = globalThis.setTimeout(() => {
|
|
1588
|
+
if (!this.devToolsRpc) {
|
|
1589
|
+
return;
|
|
1590
|
+
}
|
|
1591
|
+
try {
|
|
1592
|
+
this.devToolsRpc.broadcast.documentsUpdated([
|
|
1593
|
+
...this.collector.rpcItems.values()
|
|
1594
|
+
]);
|
|
1595
|
+
} catch {
|
|
1596
|
+
logger.info(
|
|
1597
|
+
"Failed to update GraphQL documents in dev tools. The documents might be stale."
|
|
1598
|
+
);
|
|
1599
|
+
}
|
|
1600
|
+
}, 1e3);
|
|
1497
1601
|
}
|
|
1498
1602
|
}
|
|
1499
1603
|
onViteServerCreated(server) {
|
|
@@ -1612,7 +1716,7 @@ const module = defineNuxtModule({
|
|
|
1612
1716
|
configKey: "graphqlMiddleware",
|
|
1613
1717
|
version,
|
|
1614
1718
|
compatibility: {
|
|
1615
|
-
nuxt: ">=3.
|
|
1719
|
+
nuxt: ">=3.17.0"
|
|
1616
1720
|
}
|
|
1617
1721
|
},
|
|
1618
1722
|
defaults: defaultOptions,
|
|
@@ -1,8 +1,36 @@
|
|
|
1
1
|
import type { FetchOptions } from 'ofetch';
|
|
2
|
-
import { GraphqlMiddlewareCache } from '../helpers/ClientCache.js';
|
|
2
|
+
import type { GraphqlMiddlewareCache } from '../helpers/ClientCache.js';
|
|
3
3
|
import type { GraphqlResponse } from '#nuxt-graphql-middleware/response';
|
|
4
4
|
import type { RequestCacheOptions } from './../types.js';
|
|
5
|
-
export declare function performRequest<T>(
|
|
5
|
+
export declare function performRequest<T>(
|
|
6
|
+
/**
|
|
7
|
+
* The operation type.
|
|
8
|
+
*/
|
|
9
|
+
operation: 'query' | 'mutation',
|
|
10
|
+
/**
|
|
11
|
+
* The name of the operation.
|
|
12
|
+
*/
|
|
13
|
+
operationName: string,
|
|
14
|
+
/**
|
|
15
|
+
* The operation variables.
|
|
16
|
+
*/
|
|
17
|
+
variablesOrBody: Record<string, any>,
|
|
18
|
+
/**
|
|
19
|
+
* Fetch options set on the composable.
|
|
20
|
+
*/
|
|
21
|
+
overrideFetchOptions: FetchOptions,
|
|
22
|
+
/**
|
|
23
|
+
* The global client options determined in the composable.
|
|
24
|
+
*/
|
|
25
|
+
globalClientContext: Record<string, any>,
|
|
26
|
+
/**
|
|
27
|
+
* Client options overrides set on the composable.
|
|
28
|
+
*/
|
|
29
|
+
overrideClientContext: Record<string, any>,
|
|
30
|
+
/**
|
|
31
|
+
* The cache options set on the composable.
|
|
32
|
+
*/
|
|
33
|
+
cacheOptions: RequestCacheOptions): Promise<GraphqlResponse<T>>;
|
|
6
34
|
declare module '#app' {
|
|
7
35
|
interface NuxtApp {
|
|
8
36
|
$graphqlCache?: GraphqlMiddlewareCache;
|