@peterbud/nuxt-query 0.0.5 → 0.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/README.md +1 -0
- package/dist/client/200.html +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/7xTAF4u0.js +1 -0
- package/dist/client/_nuxt/BvntOxyh.js +1 -0
- package/dist/client/_nuxt/CT_2AG9o.js +1 -0
- package/dist/client/_nuxt/Dt426XML.js +1 -0
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/ceab12ee-b789-4462-ac91-23cf46755c63.json +1 -0
- package/dist/client/_nuxt/entry.DaWUQLtg.css +1 -0
- package/dist/client/_nuxt/error-404.DxhCrmoP.css +1 -0
- package/dist/client/_nuxt/error-500.p3F3FbGf.css +1 -0
- package/dist/client/_nuxt/inHIV0xF.js +27 -0
- package/dist/client/_nuxt/ovKt2XYy.js +1 -0
- package/dist/client/_nuxt/vue-query.CGhxX1G4.css +1 -0
- package/dist/client/index.html +1 -1
- package/dist/client/vue-query/index.html +1 -1
- package/dist/module.d.mts +2 -1
- package/dist/module.json +2 -2
- package/dist/module.mjs +2 -5
- package/dist/types.d.mts +3 -1
- package/package.json +15 -15
- package/dist/client/_nuxt/7r6TMl3L.js +0 -1
- package/dist/client/_nuxt/CDkPpbDu.js +0 -1
- package/dist/client/_nuxt/CEiYWZWF.js +0 -1
- package/dist/client/_nuxt/CWapuNhc.js +0 -27
- package/dist/client/_nuxt/N9OdYGzf.js +0 -1
- package/dist/client/_nuxt/S0pjt9wl.js +0 -1
- package/dist/client/_nuxt/builds/meta/41df2067-0ffb-4f01-bb8e-2065f44bdabd.json +0 -1
- package/dist/client/_nuxt/entry.X0kN53mw.css +0 -1
- package/dist/client/_nuxt/error-404.CPg_Q3hw.css +0 -1
- package/dist/client/_nuxt/error-500.DW11PIgJ.css +0 -1
- package/dist/client/_nuxt/vue-query.D0Lgd_-m.css +0 -1
package/dist/module.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { createResolver, defineNuxtModule,
|
|
1
|
+
import { createResolver, defineNuxtModule, addPlugin, addImports } from '@nuxt/kit';
|
|
2
2
|
import { defu } from 'defu';
|
|
3
3
|
import { existsSync } from 'node:fs';
|
|
4
4
|
import { addCustomTab } from '@nuxt/devtools-kit';
|
|
5
5
|
|
|
6
|
-
const version = "0.0
|
|
6
|
+
const version = "0.1.0";
|
|
7
7
|
|
|
8
8
|
const DEVTOOLS_UI_ROUTE = "/__nuxt-query-client";
|
|
9
9
|
const DEVTOOLS_UI_LOCAL_PORT = 3300;
|
|
@@ -54,8 +54,6 @@ const module = defineNuxtModule({
|
|
|
54
54
|
devtools: true
|
|
55
55
|
},
|
|
56
56
|
setup(options, nuxt) {
|
|
57
|
-
const logger = useLogger("nuxt-query");
|
|
58
|
-
logger.info(`Adding nuxt-query module`);
|
|
59
57
|
nuxt.options.runtimeConfig.public.nuxtQuery = defu(
|
|
60
58
|
nuxt.options.runtimeConfig.public.nuxtQuery,
|
|
61
59
|
{
|
|
@@ -67,7 +65,6 @@ const module = defineNuxtModule({
|
|
|
67
65
|
addImports(options.autoImports.map((name) => ({ name, from: "@tanstack/vue-query" })));
|
|
68
66
|
if (options.devtools)
|
|
69
67
|
setupDevToolsUI(nuxt, resolver);
|
|
70
|
-
logger.success(`Added nuxt-query module successfully.`);
|
|
71
68
|
}
|
|
72
69
|
});
|
|
73
70
|
|
package/dist/types.d.mts
CHANGED
|
@@ -4,4 +4,6 @@ declare module '#app' {
|
|
|
4
4
|
interface RuntimeNuxtHooks extends ModuleRuntimeHooks {}
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
export {
|
|
7
|
+
export { default } from './module.mjs'
|
|
8
|
+
|
|
9
|
+
export { type ModuleOptions, type ModuleRuntimeHooks } from './module.mjs'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peterbud/nuxt-query",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Nuxt integration for Tanstack Query",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -52,27 +52,27 @@
|
|
|
52
52
|
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@nuxt/devtools-kit": "^2.2
|
|
56
|
-
"@nuxt/devtools-ui-kit": "^2.2
|
|
57
|
-
"@nuxt/kit": "^3.
|
|
58
|
-
"@tanstack/vue-query": "^5.
|
|
55
|
+
"@nuxt/devtools-kit": "^2.3.2",
|
|
56
|
+
"@nuxt/devtools-ui-kit": "^2.3.2",
|
|
57
|
+
"@nuxt/kit": "^3.16.2",
|
|
58
|
+
"@tanstack/vue-query": "^5.71.10",
|
|
59
59
|
"defu": "^6.1.4",
|
|
60
60
|
"sirv": "^3.0.1"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@nuxt/devtools": "^2.2
|
|
64
|
-
"@nuxt/eslint-config": "^1.
|
|
65
|
-
"@nuxt/module-builder": "1.0.
|
|
66
|
-
"@nuxt/schema": "^3.
|
|
67
|
-
"@nuxt/test-utils": "^3.17.
|
|
63
|
+
"@nuxt/devtools": "^2.3.2",
|
|
64
|
+
"@nuxt/eslint-config": "^1.3.0",
|
|
65
|
+
"@nuxt/module-builder": "1.0.1",
|
|
66
|
+
"@nuxt/schema": "^3.16.2",
|
|
67
|
+
"@nuxt/test-utils": "^3.17.2",
|
|
68
68
|
"@types/node": "latest",
|
|
69
|
-
"@unocss/nuxt": "
|
|
69
|
+
"@unocss/nuxt": "66.1.0-beta.12",
|
|
70
70
|
"changelogen": "^0.6.1",
|
|
71
71
|
"concurrently": "^9.1.2",
|
|
72
|
-
"eslint": "^9.
|
|
73
|
-
"nuxt": "^3.
|
|
74
|
-
"typescript": "~5.8.
|
|
75
|
-
"vitest": "^3.
|
|
72
|
+
"eslint": "^9.24.0",
|
|
73
|
+
"nuxt": "^3.16.2",
|
|
74
|
+
"typescript": "~5.8.3",
|
|
75
|
+
"vitest": "^3.1.1",
|
|
76
76
|
"vue-tsc": "^2.2.8"
|
|
77
77
|
},
|
|
78
78
|
"packageManager": "pnpm@10.2.0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as a}from"./CEiYWZWF.js";import{_ as i,c as u,o as c,a as e,t as r,b as l,w as d,d as p}from"./CWapuNhc.js";import{u as f}from"./S0pjt9wl.js";const m={class:"antialiased bg-white dark:bg-black dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-black"},g={class:"max-w-520px text-center z-20"},h=["textContent"],b=["textContent"],x={class:"flex items-center justify-center w-full"},y={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Not Found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(t){const n=t;return f({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[{children:`!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:[{children:'*,: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}a{color:inherit;text-decoration: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: }'}]}),(k,o)=>{const s=a;return c(),u("div",m,[o[0]||(o[0]=e("div",{class:"fixed left-0 right-0 spotlight z-10"},null,-1)),e("div",g,[e("h1",{class:"font-medium mb-8 sm:text-10xl text-8xl",textContent:r(t.statusCode)},null,8,h),e("p",{class:"font-light leading-tight mb-16 px-8 sm:px-0 sm:text-4xl text-xl",textContent:r(t.description)},null,8,b),e("div",x,[l(s,{to:"/",class:"cursor-pointer gradient-border px-4 py-2 sm:px-6 sm:py-3 sm:text-xl text-md"},{default:d(()=>[p(r(t.backHome),1)]),_:1})])])])}}},z=i(y,[["__scopeId","data-v-6a0c4b03"]]);export{z as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as s,c as a,o as i,a as e,t as o}from"./CWapuNhc.js";import{u}from"./S0pjt9wl.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:[{children:`!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:[{children:'*,: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-f6bea8f8"]]);export{b as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{X as S,m as U,r as A,Y as _,p as B,Z as E,$ as T,h as I,a0 as F,M as w,U as L,a1 as H,a2 as k,A as x,a3 as j,a4 as V,a5 as D,a6 as M,a7 as z,a8 as W,a9 as $}from"./CWapuNhc.js";async function N(t,a=S()){const{path:v,matched:p}=a.resolve(t);if(!p.length||(a._routePreloaded||(a._routePreloaded=new Set),a._routePreloaded.has(v)))return;const g=a._preloadPromises=a._preloadPromises||[];if(g.length>4)return Promise.all(g).then(()=>N(t,a));a._routePreloaded.add(v);const e=p.map(n=>{var s;return(s=n.components)==null?void 0:s.default}).filter(n=>typeof n=="function");for(const n of e){const s=Promise.resolve(n()).catch(()=>{}).finally(()=>g.splice(g.indexOf(s)));g.push(s)}await Promise.all(g)}const G=(...t)=>t.find(a=>a!==void 0);function Q(t){const a=t.componentName||"NuxtLink";function v(e){return typeof e=="string"&&e.startsWith("#")}function p(e,n){if(!e||t.trailingSlash!=="append"&&t.trailingSlash!=="remove")return e;if(typeof e=="string")return O(e,t.trailingSlash);const s="path"in e&&e.path!==void 0?e.path:n(e).path;return{...e,name:void 0,path:O(s,t.trailingSlash)}}function g(e){const n=S(),s=D(),u=x(()=>!!e.target&&e.target!=="_self"),d=x(()=>{const f=e.to||e.href||"";return typeof f=="string"&&j(f,{acceptRelative:!0})}),P=L("RouterLink"),y=P&&typeof P!="string"?P.useLink:void 0,m=x(()=>{if(e.external)return!0;const f=e.to||e.href||"";return typeof f=="object"?!1:f===""||d.value}),r=x(()=>{const f=e.to||e.href||"";return m.value?f:p(f,n.resolve)}),c=m.value||y==null?void 0:y({...e,to:r}),b=x(()=>{var f;if(!r.value||d.value||v(r.value))return r.value;if(m.value){const C=typeof r.value=="object"&&"path"in r.value?k(r.value):r.value,R=typeof C=="object"?n.resolve(C).href:C;return p(R,n.resolve)}return typeof r.value=="object"?((f=n.resolve(r.value))==null?void 0:f.href)??null:p(V(s.app.baseURL,r.value),n.resolve)});return{to:r,hasTarget:u,isAbsoluteUrl:d,isExternal:m,href:b,isActive:(c==null?void 0:c.isActive)??x(()=>r.value===n.currentRoute.value.path),isExactActive:(c==null?void 0:c.isExactActive)??x(()=>r.value===n.currentRoute.value.path),route:(c==null?void 0:c.route)??x(()=>n.resolve(r.value)),async navigate(){await M(b.value,{replace:e.replace,external:m.value||u.value})}}}return U({name:a,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},prefetchOn:{type:[String,Object],default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1}},useLink:g,setup(e,{slots:n}){const s=S(),{to:u,href:d,navigate:P,isExternal:y,hasTarget:m,isAbsoluteUrl:r}=g(e),c=A(!1),b=A(null),f=l=>{var o;b.value=e.custom?(o=l==null?void 0:l.$el)==null?void 0:o.nextElementSibling:l==null?void 0:l.$el};function C(l){var o,i;return!c.value&&(typeof e.prefetchOn=="string"?e.prefetchOn===l:((o=e.prefetchOn)==null?void 0:o[l])??((i=t.prefetchOn)==null?void 0:i[l]))&&(e.prefetch??t.prefetch)!==!1&&e.noPrefetch!==!0&&e.target!=="_blank"&&!Z()}async function R(l=_()){if(c.value)return;c.value=!0;const o=typeof u.value=="string"?u.value:y.value?k(u.value):s.resolve(u.value).fullPath,i=y.value?new URL(o,window.location.href).href:o;await Promise.all([l.hooks.callHook("link:prefetch",i).catch(()=>{}),!y.value&&!m.value&&N(u.value,s).catch(()=>{})])}if(C("visibility")){const l=_();let o,i=null;B(()=>{const h=X();E(()=>{o=T(()=>{var q;(q=b==null?void 0:b.value)!=null&&q.tagName&&(i=h.observe(b.value,async()=>{i==null||i(),i=null,await R(l)}))})})}),I(()=>{o&&F(o),i==null||i(),i=null})}return()=>{var i;if(!y.value&&!m.value&&!v(u.value)){const h={ref:f,to:u.value,activeClass:e.activeClass||t.activeClass,exactActiveClass:e.exactActiveClass||t.exactActiveClass,replace:e.replace,ariaCurrentValue:e.ariaCurrentValue,custom:e.custom};return e.custom||(C("interaction")&&(h.onPointerenter=R.bind(null,void 0),h.onFocus=R.bind(null,void 0)),c.value&&(h.class=e.prefetchedClass||t.prefetchedClass),h.rel=e.rel||void 0),w(L("RouterLink"),h,n.default)}const l=e.target||null,o=G(e.noRel?"":e.rel,t.externalRelAttribute,r.value||m.value?"noopener noreferrer":"")||null;return e.custom?n.default?n.default({href:d.value,navigate:P,prefetch:R,get route(){if(!d.value)return;const h=new URL(d.value,window.location.href);return{path:h.pathname,fullPath:h.pathname,get query(){return H(h.search)},hash:h.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:d.value}},rel:o,target:l,isExternal:y.value||m.value,isActive:!1,isExactActive:!1}):null:w("a",{ref:b,href:d.value||null,rel:o,target:l},(i=n.default)==null?void 0:i.call(n))}}})}const K=Q($);function O(t,a){const v=a==="append"?z:W;return j(t)&&!t.startsWith("http")?t:v(t,!0)}function X(){const t=_();if(t._observer)return t._observer;let a=null;const v=new Map,p=(e,n)=>(a||(a=new IntersectionObserver(s=>{for(const u of s){const d=v.get(u.target);(u.isIntersecting||u.intersectionRatio>0)&&d&&d()}})),v.set(e,n),a.observe(e),()=>{v.delete(e),a==null||a.unobserve(e),v.size===0&&(a==null||a.disconnect(),a=null)});return t._observer={observe:p}}const Y=/2g/;function Z(){const t=navigator.connection;return!!(t&&(t.saveData||Y.test(t.effectiveType)))}export{K as _};
|