diff --git a/README.md b/README.md index 48a4119..1f7aca4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # setup-vp -GitHub Action to set up [Vite+](https://viteplus.dev) (`vp`) with dependency caching support. +GitHub Action to set up [Vite+](https://viteplus.void.app) (`vp`) with dependency caching support. ## Features @@ -243,8 +243,8 @@ jobs: ### Install Vite+ CLI -- **Linux / macOS:** `curl -fsSL https://viteplus.dev/install.sh | bash` -- **Windows:** `irm https://viteplus.dev/install.ps1 | iex` +- **Linux / macOS:** `curl -fsSL https://viteplus.void.app/install.sh | bash` +- **Windows:** `irm https://viteplus.void.app/install.ps1 | iex` ### Setup diff --git a/dist/index.mjs b/dist/index.mjs index 858e8c7..18255f8 100644 --- a/dist/index.mjs +++ b/dist/index.mjs @@ -190,7 +190,7 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\ `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=wa,s=!ua.jitless,c=s&&Ta.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?Rs([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function Vs(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!za(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Ua(e,r,da())))}),t)}const Hs=z(`$ZodUnion`,(e,t)=>{ts.init(e,t),va(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),va(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),va(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),va(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>ga(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Vs(t,r,e,i)):Vs(o,r,e,i)}}),Us=z(`$ZodIntersection`,(e,t)=>{ts.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Gs(e,t,n)):Gs(e,i,a)}});function Ws(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ea(e)&&Ea(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Ws(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;re.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),za(e))return e;let o=Ws(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const Ks=z(`$ZodEnum`,(e,t)=>{ts.init(e,t);let n=fa(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>Oa.has(typeof e)).map(e=>typeof e==`string`?ka(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),qs=z(`$ZodTransform`,(e,t)=>{ts.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new la(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new ca;return n.value=i,n.fallback=!0,n}});function Js(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const Ys=z(`$ZodOptional`,(e,t)=>{ts.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,va(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),va(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${ga(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>Js(e,r)):Js(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Xs=z(`$ZodExactOptional`,(e,t)=>{Ys.init(e,t),va(e._zod,`values`,()=>t.innerType._zod.values),va(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Zs=z(`$ZodNullable`,(e,t)=>{ts.init(e,t),va(e._zod,`optin`,()=>t.innerType._zod.optin),va(e._zod,`optout`,()=>t.innerType._zod.optout),va(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${ga(e.source)}|null)$`):void 0}),va(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Qs=z(`$ZodDefault`,(e,t)=>{ts.init(e,t),e._zod.optin=`optional`,va(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>$s(e,t)):$s(r,t)}});function $s(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const ec=z(`$ZodPrefault`,(e,t)=>{ts.init(e,t),e._zod.optin=`optional`,va(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),tc=z(`$ZodNonOptional`,(e,t)=>{ts.init(e,t),va(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>nc(t,e)):nc(i,e)}});function nc(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}const rc=z(`$ZodCatch`,(e,t)=>{ts.init(e,t),e._zod.optin=`optional`,va(e._zod,`optout`,()=>t.innerType._zod.optout),va(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Ua(e,n,da()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Ua(e,n,da()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),ic=z(`$ZodPipe`,(e,t)=>{ts.init(e,t),va(e._zod,`values`,()=>t.in._zod.values),va(e._zod,`optin`,()=>t.in._zod.optin),va(e._zod,`optout`,()=>t.out._zod.optout),va(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>ac(e,t.in,n)):ac(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>ac(e,t.out,n)):ac(r,t.out,n)}});function ac(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const oc=z(`$ZodReadonly`,(e,t)=>{ts.init(e,t),va(e._zod,`propValues`,()=>t.innerType._zod.propValues),va(e._zod,`values`,()=>t.innerType._zod.values),va(e._zod,`optin`,()=>t.innerType?._zod?.optin),va(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(sc):sc(r)}});function sc(e){return e.value=Object.freeze(e.value),e}const cc=z(`$ZodCustom`,(e,t)=>{Vo.init(e,t),ts.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>lc(t,n,r,e));lc(i,n,r,e)}});function lc(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Ga(e))}}var uc,dc=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function fc(){return new dc}(uc=globalThis).__zod_globalRegistry??(uc.__zod_globalRegistry=fc());const pc=globalThis.__zod_globalRegistry;function mc(e,t){return new e({type:`string`,...B(t)})}function hc(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...B(t)})}function gc(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...B(t)})}function _c(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...B(t)})}function vc(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...B(t)})}function yc(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...B(t)})}function bc(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...B(t)})}function xc(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...B(t)})}function Sc(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...B(t)})}function Cc(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...B(t)})}function wc(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...B(t)})}function Tc(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...B(t)})}function Ec(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...B(t)})}function Dc(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...B(t)})}function Oc(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...B(t)})}function kc(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...B(t)})}function Ac(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...B(t)})}function jc(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...B(t)})}function Mc(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...B(t)})}function Nc(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...B(t)})}function Pc(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...B(t)})}function Fc(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...B(t)})}function Ic(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...B(t)})}function Lc(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...B(t)})}function Rc(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...B(t)})}function zc(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...B(t)})}function Bc(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...B(t)})}function Vc(e,t){return new e({type:`boolean`,...B(t)})}function Hc(e,t){return new e({type:`null`,...B(t)})}function Uc(e){return new e({type:`unknown`})}function Wc(e,t){return new e({type:`never`,...B(t)})}function Gc(e,t){return new Ho({check:`max_length`,...B(t),maximum:e})}function Kc(e,t){return new Uo({check:`min_length`,...B(t),minimum:e})}function qc(e,t){return new Wo({check:`length_equals`,...B(t),length:e})}function Jc(e,t){return new Ko({check:`string_format`,format:`regex`,...B(t),pattern:e})}function Yc(e){return new qo({check:`string_format`,format:`lowercase`,...B(e)})}function Xc(e){return new Jo({check:`string_format`,format:`uppercase`,...B(e)})}function Zc(e,t){return new Yo({check:`string_format`,format:`includes`,...B(t),includes:e})}function Qc(e,t){return new Xo({check:`string_format`,format:`starts_with`,...B(t),prefix:e})}function $c(e,t){return new Zo({check:`string_format`,format:`ends_with`,...B(t),suffix:e})}function el(e){return new Qo({check:`overwrite`,tx:e})}function tl(e){return el(t=>t.normalize(e))}function nl(){return el(e=>e.trim())}function rl(){return el(e=>e.toLowerCase())}function il(){return el(e=>e.toUpperCase())}function al(){return el(e=>Sa(e))}function ol(e,t,n){return new e({type:`array`,element:t,...B(n)})}function sl(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...B(n)})}function cl(e,t){let n=ll(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Ga(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Ga(r))}},e(t.value,t)),t);return n}function ll(e,t){let n=new Vo({check:`custom`,...B(t)});return n._zod.check=e,n}function ul(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??pc,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function dl(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,dl(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&ml(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function fl(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function pl(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:gl(t,`input`,e.processors),output:gl(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function ml(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return ml(r.element,n);if(r.type===`set`)return ml(r.valueType,n);if(r.type===`lazy`)return ml(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return ml(r.innerType,n);if(r.type===`intersection`)return ml(r.left,n)||ml(r.right,n);if(r.type===`record`||r.type===`map`)return ml(r.keyType,n)||ml(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:ml(r.in,n)||ml(r.out,n);if(r.type===`object`){for(let e in r.shape)if(ml(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(ml(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(ml(e,n))return!0;return!!(r.rest&&ml(r.rest,n))}return!1}const hl=(e,t={})=>n=>{let r=ul({...n,processors:t});return dl(e,r),fl(r,e),pl(r,e)},gl=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=ul({...i??{},target:a,io:t,processors:n});return dl(e,o),fl(o,e),pl(o,e)},_l={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},vl=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=_l[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},yl=(e,t,n,r)=>{n.type=`boolean`},bl=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},xl=(e,t,n,r)=>{n.not={}},Sl=(e,t,n,r)=>{let i=e._zod.def,a=fa(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Cl=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},wl=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Tl=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=dl(a.element,t,{...r,path:[...r.path,`items`]})},El=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=dl(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=dl(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Dl=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>dl(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Ol=(e,t,n,r)=>{let i=e._zod.def,a=dl(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=dl(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},kl=(e,t,n,r)=>{let i=e._zod.def,a=dl(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Al=(e,t,n,r)=>{let i=e._zod.def;dl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},jl=(e,t,n,r)=>{let i=e._zod.def;dl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Ml=(e,t,n,r)=>{let i=e._zod.def;dl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Nl=(e,t,n,r)=>{let i=e._zod.def;dl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Pl=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;dl(o,t,r);let s=t.seen.get(e);s.ref=o},Fl=(e,t,n,r)=>{let i=e._zod.def;dl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Il=(e,t,n,r)=>{let i=e._zod.def;dl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ll=z(`ZodISODateTime`,(e,t)=>{hs.init(e,t),fu.init(e,t)});function Rl(e){return Lc(Ll,e)}const zl=z(`ZodISODate`,(e,t)=>{gs.init(e,t),fu.init(e,t)});function Bl(e){return Rc(zl,e)}const Vl=z(`ZodISOTime`,(e,t)=>{_s.init(e,t),fu.init(e,t)});function Hl(e){return zc(Vl,e)}const Ul=z(`ZodISODuration`,(e,t)=>{vs.init(e,t),fu.init(e,t)});function Wl(e){return Bc(Ul,e)}const Gl=(e,t)=>{qa.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Xa(e,t)},flatten:{value:t=>Ya(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,pa,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,pa,2)}},isEmpty:{get(){return e.issues.length===0}}})},Kl=z(`ZodError`,Gl),ql=z(`ZodError`,Gl,{Parent:Error}),Jl=Za(ql),Yl=Qa(ql),Xl=$a(ql),Zl=to(ql),Ql=ro(ql),$l=io(ql),eu=ao(ql),tu=oo(ql),nu=so(ql),ru=co(ql),iu=lo(ql),au=uo(ql),ou=new WeakMap;function su(e,t,n){let r=Object.getPrototypeOf(e),i=ou.get(r);if(i||(i=new Set,ou.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}const cu=z(`ZodType`,(e,t)=>(ts.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:gl(e,`input`),output:gl(e,`output`)}}),e.toJSONSchema=hl(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.parse=(t,n)=>Jl(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Xl(e,t,n),e.parseAsync=async(t,n)=>Yl(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Zl(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Ql(e,t,n),e.decode=(t,n)=>$l(e,t,n),e.encodeAsync=async(t,n)=>eu(e,t,n),e.decodeAsync=async(t,n)=>tu(e,t,n),e.safeEncode=(t,n)=>nu(e,t,n),e.safeDecode=(t,n)=>ru(e,t,n),e.safeEncodeAsync=async(t,n)=>iu(e,t,n),e.safeDecodeAsync=async(t,n)=>au(e,t,n),su(e,`ZodType`,{check(...e){let t=this.def;return this.clone(ba(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Aa(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(_d(e,t))},superRefine(e,t){return this.check(vd(e,t))},overwrite(e){return this.check(el(e))},optional(){return $u(this)},exactOptional(){return td(this)},nullable(){return rd(this)},nullish(){return $u(rd(this))},nonoptional(e){return ld(this,e)},array(){return Vu(this)},or(e){return Gu([this,e])},and(e){return qu(this,e)},transform(e){return pd(this,Zu(e))},default(e){return ad(this,e)},prefault(e){return sd(this,e)},catch(e){return dd(this,e)},pipe(e){return pd(this,e)},readonly(){return hd(this)},describe(e){let t=this.clone();return pc.add(t,{description:e}),t},meta(...e){if(e.length===0)return pc.get(this);let t=this.clone();return pc.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,`description`,{get(){return pc.get(e)?.description},configurable:!0}),e)),lu=z(`_ZodString`,(e,t)=>{ns.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vl(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,su(e,`_ZodString`,{regex(...e){return this.check(Jc(...e))},includes(...e){return this.check(Zc(...e))},startsWith(...e){return this.check(Qc(...e))},endsWith(...e){return this.check($c(...e))},min(...e){return this.check(Kc(...e))},max(...e){return this.check(Gc(...e))},length(...e){return this.check(qc(...e))},nonempty(...e){return this.check(Kc(1,...e))},lowercase(e){return this.check(Yc(e))},uppercase(e){return this.check(Xc(e))},trim(){return this.check(nl())},normalize(...e){return this.check(tl(...e))},toLowerCase(){return this.check(rl())},toUpperCase(){return this.check(il())},slugify(){return this.check(al())}})}),uu=z(`ZodString`,(e,t)=>{ns.init(e,t),lu.init(e,t),e.email=t=>e.check(hc(pu,t)),e.url=t=>e.check(xc(gu,t)),e.jwt=t=>e.check(Ic(ju,t)),e.emoji=t=>e.check(Sc(_u,t)),e.guid=t=>e.check(gc(mu,t)),e.uuid=t=>e.check(_c(hu,t)),e.uuidv4=t=>e.check(vc(hu,t)),e.uuidv6=t=>e.check(yc(hu,t)),e.uuidv7=t=>e.check(bc(hu,t)),e.nanoid=t=>e.check(Cc(vu,t)),e.guid=t=>e.check(gc(mu,t)),e.cuid=t=>e.check(wc(yu,t)),e.cuid2=t=>e.check(Tc(bu,t)),e.ulid=t=>e.check(Ec(xu,t)),e.base64=t=>e.check(Nc(Ou,t)),e.base64url=t=>e.check(Pc(ku,t)),e.xid=t=>e.check(Dc(Su,t)),e.ksuid=t=>e.check(Oc(Cu,t)),e.ipv4=t=>e.check(kc(wu,t)),e.ipv6=t=>e.check(Ac(Tu,t)),e.cidrv4=t=>e.check(jc(Eu,t)),e.cidrv6=t=>e.check(Mc(Du,t)),e.e164=t=>e.check(Fc(Au,t)),e.datetime=t=>e.check(Rl(t)),e.date=t=>e.check(Bl(t)),e.time=t=>e.check(Hl(t)),e.duration=t=>e.check(Wl(t))});function du(e){return mc(uu,e)}const fu=z(`ZodStringFormat`,(e,t)=>{rs.init(e,t),lu.init(e,t)}),pu=z(`ZodEmail`,(e,t)=>{os.init(e,t),fu.init(e,t)}),mu=z(`ZodGUID`,(e,t)=>{is.init(e,t),fu.init(e,t)}),hu=z(`ZodUUID`,(e,t)=>{as.init(e,t),fu.init(e,t)}),gu=z(`ZodURL`,(e,t)=>{ss.init(e,t),fu.init(e,t)}),_u=z(`ZodEmoji`,(e,t)=>{cs.init(e,t),fu.init(e,t)}),vu=z(`ZodNanoID`,(e,t)=>{ls.init(e,t),fu.init(e,t)}),yu=z(`ZodCUID`,(e,t)=>{us.init(e,t),fu.init(e,t)}),bu=z(`ZodCUID2`,(e,t)=>{ds.init(e,t),fu.init(e,t)}),xu=z(`ZodULID`,(e,t)=>{fs.init(e,t),fu.init(e,t)}),Su=z(`ZodXID`,(e,t)=>{ps.init(e,t),fu.init(e,t)}),Cu=z(`ZodKSUID`,(e,t)=>{ms.init(e,t),fu.init(e,t)}),wu=z(`ZodIPv4`,(e,t)=>{ys.init(e,t),fu.init(e,t)}),Tu=z(`ZodIPv6`,(e,t)=>{bs.init(e,t),fu.init(e,t)}),Eu=z(`ZodCIDRv4`,(e,t)=>{xs.init(e,t),fu.init(e,t)}),Du=z(`ZodCIDRv6`,(e,t)=>{Ss.init(e,t),fu.init(e,t)}),Ou=z(`ZodBase64`,(e,t)=>{ws.init(e,t),fu.init(e,t)}),ku=z(`ZodBase64URL`,(e,t)=>{Es.init(e,t),fu.init(e,t)}),Au=z(`ZodE164`,(e,t)=>{Ds.init(e,t),fu.init(e,t)}),ju=z(`ZodJWT`,(e,t)=>{ks.init(e,t),fu.init(e,t)}),Mu=z(`ZodBoolean`,(e,t)=>{As.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yl(e,t,n,r)});function Nu(e){return Vc(Mu,e)}const Pu=z(`ZodNull`,(e,t)=>{js.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bl(e,t,n,r)});function Fu(e){return Hc(Pu,e)}const Iu=z(`ZodUnknown`,(e,t)=>{Ms.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Lu(){return Uc(Iu)}const Ru=z(`ZodNever`,(e,t)=>{Ns.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xl(e,t,n,r)});function zu(e){return Wc(Ru,e)}const Bu=z(`ZodArray`,(e,t)=>{Fs.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Tl(e,t,n,r),e.element=t.element,su(e,`ZodArray`,{min(e,t){return this.check(Kc(e,t))},nonempty(e){return this.check(Kc(1,e))},max(e,t){return this.check(Gc(e,t))},length(e,t){return this.check(qc(e,t))},unwrap(){return this.element}})});function Vu(e,t){return ol(Bu,e,t)}const Hu=z(`ZodObject`,(e,t)=>{Bs.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>El(e,t,n,r),va(e,`shape`,()=>t.shape),su(e,`ZodObject`,{keyof(){return Yu(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:Lu()})},loose(){return this.clone({...this._zod.def,catchall:Lu()})},strict(){return this.clone({...this._zod.def,catchall:zu()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return Pa(this,e)},safeExtend(e){return Fa(this,e)},merge(e){return Ia(this,e)},pick(e){return Ma(this,e)},omit(e){return Na(this,e)},partial(...e){return La(Qu,this,e[0])},required(...e){return Ra(cd,this,e[0])}})});function Uu(e,t){return new Hu({type:`object`,shape:e??{},...B(t)})}const Wu=z(`ZodUnion`,(e,t)=>{Hs.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Dl(e,t,n,r),e.options=t.options});function Gu(e,t){return new Wu({type:`union`,options:e,...B(t)})}const Ku=z(`ZodIntersection`,(e,t)=>{Us.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ol(e,t,n,r)});function qu(e,t){return new Ku({type:`intersection`,left:e,right:t})}const Ju=z(`ZodEnum`,(e,t)=>{Ks.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sl(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Ju({...t,checks:[],...B(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Ju({...t,checks:[],...B(r),entries:i})}});function Yu(e,t){return new Ju({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...B(t)})}const Xu=z(`ZodTransform`,(e,t)=>{qs.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wl(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new la(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Ga(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Ga(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function Zu(e){return new Xu({type:`transform`,transform:e})}const Qu=z(`ZodOptional`,(e,t)=>{Ys.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Il(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function $u(e){return new Qu({type:`optional`,innerType:e})}const ed=z(`ZodExactOptional`,(e,t)=>{Xs.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Il(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function td(e){return new ed({type:`optional`,innerType:e})}const nd=z(`ZodNullable`,(e,t)=>{Zs.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function rd(e){return new nd({type:`nullable`,innerType:e})}const id=z(`ZodDefault`,(e,t)=>{Qs.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function ad(e,t){return new id({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Da(t)}})}const od=z(`ZodPrefault`,(e,t)=>{ec.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ml(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function sd(e,t){return new od({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Da(t)}})}const cd=z(`ZodNonOptional`,(e,t)=>{tc.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Al(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ld(e,t){return new cd({type:`nonoptional`,innerType:e,...B(t)})}const ud=z(`ZodCatch`,(e,t)=>{rc.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function dd(e,t){return new ud({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}const fd=z(`ZodPipe`,(e,t)=>{ic.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pl(e,t,n,r),e.in=t.in,e.out=t.out});function pd(e,t){return new fd({type:`pipe`,in:e,out:t})}const md=z(`ZodReadonly`,(e,t)=>{oc.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function hd(e){return new md({type:`readonly`,innerType:e})}const gd=z(`ZodCustom`,(e,t)=>{cc.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cl(e,t,n,r)});function _d(e,t={}){return sl(gd,e,t)}function vd(e,t){return cl(e,t)}var yd=oa();const bd=Uu({cwd:du().optional(),args:Vu(du()).optional()}),xd=Gu([Fu(),Nu(),bd,Vu(bd)]),Sd=`Vite+`;function Cd(){return{version:jr(`version`)||`latest`,nodeVersion:jr(`node-version`)||void 0,nodeVersionFile:jr(`node-version-file`)||void 0,workingDirectory:jr(`working-directory`)||void 0,runInstall:wd(jr(`run-install`)),cache:Mr(`cache`),cacheDependencyPath:jr(`cache-dependency-path`)||void 0,registryUrl:jr(`registry-url`)||void 0,scope:jr(`scope`)||void 0}}function wd(e){if(!e||e===`false`||e===`null`)return[];if(e===`true`)return[{}];let t=(0,yd.parse)(e);try{let e=xd.parse(t);return e?e===!0?[{}]:Array.isArray(e)?e:[e]:[]}catch(e){throw e instanceof Kl?Error(`Invalid run-install input: ${e.issues.map(e=>e.message).join(`, `)}`):e}}function Td(){return N((process.platform===`win32`?process.env.USERPROFILE:process.env.HOME)||fe(),`.vite-plus`)}function Ed(){return process.env.GITHUB_WORKSPACE||process.cwd()}function Dd(e,t){return ee(e)?e:N(t,e)}function Od(e){if(!e.workingDirectory)return Ed();let t=Dd(e.workingDirectory,Ed());if(!ie(t))throw Error(`working-directory not found: ${e.workingDirectory} (resolved to ${t})`);if(!se(t).isDirectory())throw Error(`working-directory is not a directory: ${e.workingDirectory} (resolved to ${t})`);return t}function kd(e,t){return t?Dd(t,e):e}const Ad=[{filename:`pnpm-lock.yaml`,type:`pnpm`},{filename:`bun.lockb`,type:`bun`},{filename:`bun.lock`,type:`bun`},{filename:`package-lock.json`,type:`npm`},{filename:`npm-shrinkwrap.json`,type:`npm`},{filename:`yarn.lock`,type:`yarn`}];function jd(e,t=Ed()){if(e){let n=Dd(e,t);if(ie(n)){let e=j(n),t=Ad.find(t=>t.filename===e);return t?{type:t.type,path:n,filename:e}:Md(n,e)}return}let n=oe(t);for(let e of Ad)if(n.includes(e.filename)){let n=N(t,e.filename);return Rr(`Auto-detected lock file: ${e.filename}`),{type:e.type,path:n,filename:e.filename}}}function Md(e,t){return t.includes(`pnpm`)?{type:`pnpm`,path:e,filename:t}:t.includes(`yarn`)?{type:`yarn`,path:e,filename:t}:t.startsWith(`bun.`)?{type:`bun`,path:e,filename:t}:{type:`npm`,path:e,filename:t}}async function Nd(e,t){switch(e){case`npm`:case`pnpm`:case`yarn`:case`bun`:return Fd(t);default:return[]}}async function Pd(e,t,n){let r=`${e} ${t.join(` `)}`;try{let i=await Er(e,t,{cwd:n?.cwd,silent:!0,ignoreReturnCode:!0});if(i.exitCode===0)return i.stdout.trim();R(`Command "${r}" exited with code ${i.exitCode}`);return}catch(e){Lr(`Failed to run "${r}": ${String(e)}`);return}}async function Fd(e){let t=await Pd(`vp`,[`pm`,`cache`,`dir`],{cwd:e});return t?[t]:[]}const Id=[`https://viteplus.dev/install.sh`,`https://raw.githubusercontent.com/voidzero-dev/vite-plus/main/packages/cli/install.sh`],Ld=[`https://viteplus.dev/install.ps1`,`https://raw.githubusercontent.com/voidzero-dev/vite-plus/main/packages/cli/install.ps1`],Rd=2e3;async function zd(e){let{version:t}=e;Rr(`Installing ${Sd}@${t}...`);let n={...process.env,VP_VERSION:t,VITE_PLUS_VERSION:t},r=process.platform===`win32`?Ld:Id,i=2*r.length,a=``,o=0;for(let e=0;e<2;e++)for(let e of r){o++;try{let t=await Bd(e,n);if(t===0){Vd();return}a=`exit code ${t}`}catch(e){a=e instanceof Error?e.message:String(e)}o!e.negate);let t={};for(let n of e){let e=$d?n.searchPath.toUpperCase():n.searchPath;t[e]=`candidate`}let n=[];for(let r of e){let e=$d?r.searchPath.toUpperCase():r.searchPath;if(t[e]===`included`)continue;let i=!1,a=e,o=Kd(a);for(;o!==a;){if(t[o]){i=!0;break}a=o,o=Kd(a)}i||(n.push(r.searchPath),t[e]=`included`)}return n}function tf(e,t){let n=Qd.None;for(let r of e)r.negate?n&=~r.match(t):n|=r.match(t);return n}function nf(e,t){return e.some(e=>!e.negate&&e.partialMatch(t))}var rf=P(((e,t)=>{t.exports=function(e,t){for(var r=[],i=0;i{t.exports=n;function n(e,t,n){e instanceof RegExp&&(e=r(e,n)),t instanceof RegExp&&(t=r(t,n));var a=i(e,t,n);return a&&{start:a[0],end:a[1],pre:n.slice(0,a[0]),body:n.slice(a[0]+e.length,a[1]),post:n.slice(a[1]+t.length)}}function r(e,t){var n=t.match(e);return n?n[0]:null}n.range=i;function i(e,t,n){var r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!s;)u==c?(r.push(u),c=n.indexOf(e,u+1)):r.length==1?s=[r.pop(),l]:(i=r.pop(),i=0?c:l;r.length&&(s=[a,o])}return s}})),of=P(((e,t)=>{var n=rf(),r=af();t.exports=p;var i=`\0SLASH`+Math.random()+`\0`,a=`\0OPEN`+Math.random()+`\0`,o=`\0CLOSE`+Math.random()+`\0`,s=`\0COMMA`+Math.random()+`\0`,c=`\0PERIOD`+Math.random()+`\0`;function l(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function u(e){return e.split(`\\\\`).join(i).split(`\\{`).join(a).split(`\\}`).join(o).split(`\\,`).join(s).split(`\\.`).join(c)}function d(e){return e.split(i).join(`\\`).split(a).join(`{`).split(o).join(`}`).split(s).join(`,`).split(c).join(`.`)}function f(e){if(!e)return[``];var t=[],n=r(`{`,`}`,e);if(!n)return e.split(`,`);var i=n.pre,a=n.body,o=n.post,s=i.split(`,`);s[s.length-1]+=`{`+a+`}`;var c=f(o);return o.length&&(s[s.length-1]+=c.shift(),s.push.apply(s,c)),t.push.apply(t,s),t}function p(e){return e?(e.substr(0,2)===`{}`&&(e=`\\{\\}`+e.substr(2)),v(u(e),!0).map(d)):[]}function m(e){return`{`+e+`}`}function h(e){return/^-?0\d/.test(e)}function g(e,t){return e<=t}function _(e,t){return e>=t}function v(e,t){var i=[],a=r(`{`,`}`,e);if(!a||/\$$/.test(a.pre))return[e];var s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body),u=s||c,d=a.body.indexOf(`,`)>=0;if(!u&&!d)return a.post.match(/,(?!,).*\}/)?(e=a.pre+`{`+a.body+o+a.post,v(e)):[e];var p;if(u)p=a.body.split(/\.\./);else if(p=f(a.body),p.length===1&&(p=v(p[0],!1).map(m),p.length===1)){var y=a.post.length?v(a.post,!1):[``];return y.map(function(e){return a.pre+p[0]+e})}var b=a.pre,y=a.post.length?v(a.post,!1):[``],x;if(u){var S=l(p[0]),C=l(p[1]),w=Math.max(p[0].length,p[1].length),T=p.length==3?Math.abs(l(p[2])):1,E=g;C0){var j=Array(A+1).join(`0`);k=O<0?`-`+j+k.slice(1):j+k}}x.push(k)}}else x=n(p,function(e){return v(e,!1)});for(var M=0;M{t.exports=h,h.Minimatch=g;var n=function(){try{return F(`path`)}catch{}}()||{sep:`/`};h.sep=n.sep;var r=h.GLOBSTAR=g.GLOBSTAR={},i=of(),a={"!":{open:`(?:(?!(?:`,close:`))[^/]*?)`},"?":{open:`(?:`,close:`)?`},"+":{open:`(?:`,close:`)+`},"*":{open:`(?:`,close:`)*`},"@":{open:`(?:`,close:`)`}},o=`[^/]`,s=o+`*?`,c=`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`,l=`(?:(?!(?:\\/|^)\\.).)*?`,u=d(`().*{}+?[]^$\\!`);function d(e){return e.split(``).reduce(function(e,t){return e[t]=!0,e},{})}var f=/\/+/;h.filter=p;function p(e,t){return t||={},function(n,r,i){return h(n,e,t)}}function m(e,t){t||={};var n={};return Object.keys(e).forEach(function(t){n[t]=e[t]}),Object.keys(t).forEach(function(e){n[e]=t[e]}),n}h.defaults=function(e){if(!e||typeof e!=`object`||!Object.keys(e).length)return h;var t=h,n=function(n,r,i){return t(n,r,m(e,i))};return n.Minimatch=function(n,r){return new t.Minimatch(n,m(e,r))},n.Minimatch.defaults=function(n){return t.defaults(m(e,n)).Minimatch},n.filter=function(n,r){return t.filter(n,m(e,r))},n.defaults=function(n){return t.defaults(m(e,n))},n.makeRe=function(n,r){return t.makeRe(n,m(e,r))},n.braceExpand=function(n,r){return t.braceExpand(n,m(e,r))},n.match=function(n,r,i){return t.match(n,r,m(e,i))},n},g.defaults=function(e){return h.defaults(e).Minimatch};function h(e,t,n){return x(t),n||={},!n.nocomment&&t.charAt(0)===`#`?!1:new g(t,n).match(e)}function g(e,t){if(!(this instanceof g))return new g(e,t);x(e),t||={},e=e.trim(),!t.allowWindowsEscape&&n.sep!==`/`&&(e=e.split(n.sep).join(`/`)),this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion===void 0?200:t.maxGlobstarRecursion,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}g.prototype.debug=function(){},g.prototype.make=_;function _(){var e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();var n=this.globSet=this.braceExpand();t.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,n),n=this.globParts=n.map(function(e){return e.split(f)}),this.debug(this.pattern,n),n=n.map(function(e,t,n){return e.map(this.parse,this)},this),this.debug(this.pattern,n),n=n.filter(function(e){return e.indexOf(!1)===-1}),this.debug(this.pattern,n),this.set=n}g.prototype.parseNegate=v;function v(){var e=this.pattern,t=!1,n=this.options,r=0;if(!n.nonegate){for(var i=0,a=e.length;ib)throw TypeError(`pattern is too long`)};g.prototype.parse=C;var S={};function C(e,t){x(e);var n=this.options;if(e===`**`)if(n.noglobstar)e=`*`;else return r;if(e===``)return``;var i=``,c=!!n.nocase,l=!1,d=[],f=[],p,m=!1,h=-1,g=-1,_=e.charAt(0)===`.`?``:n.dot?`(?!(?:^|\\/)\\.{1,2}(?:$|\\/))`:`(?!\\.)`,v=this;function y(){if(p){switch(p){case`*`:i+=s,c=!0;break;case`?`:i+=o,c=!0;break;default:i+=`\\`+p;break}v.debug(`clearStateChar %j %j`,p,i),p=!1}}for(var b=0,C=e.length,w;b1&&e.reused===`ref`){a(n);continue}}}function pl(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:gl(t,`input`,e.processors),output:gl(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function ml(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return ml(r.element,n);if(r.type===`set`)return ml(r.valueType,n);if(r.type===`lazy`)return ml(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return ml(r.innerType,n);if(r.type===`intersection`)return ml(r.left,n)||ml(r.right,n);if(r.type===`record`||r.type===`map`)return ml(r.keyType,n)||ml(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:ml(r.in,n)||ml(r.out,n);if(r.type===`object`){for(let e in r.shape)if(ml(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(ml(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(ml(e,n))return!0;return!!(r.rest&&ml(r.rest,n))}return!1}const hl=(e,t={})=>n=>{let r=ul({...n,processors:t});return dl(e,r),fl(r,e),pl(r,e)},gl=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=ul({...i??{},target:a,io:t,processors:n});return dl(e,o),fl(o,e),pl(o,e)},_l={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},vl=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=_l[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},yl=(e,t,n,r)=>{n.type=`boolean`},bl=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},xl=(e,t,n,r)=>{n.not={}},Sl=(e,t,n,r)=>{let i=e._zod.def,a=fa(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Cl=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},wl=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Tl=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=dl(a.element,t,{...r,path:[...r.path,`items`]})},El=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=dl(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=dl(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Dl=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>dl(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Ol=(e,t,n,r)=>{let i=e._zod.def,a=dl(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=dl(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},kl=(e,t,n,r)=>{let i=e._zod.def,a=dl(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Al=(e,t,n,r)=>{let i=e._zod.def;dl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},jl=(e,t,n,r)=>{let i=e._zod.def;dl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Ml=(e,t,n,r)=>{let i=e._zod.def;dl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Nl=(e,t,n,r)=>{let i=e._zod.def;dl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Pl=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;dl(o,t,r);let s=t.seen.get(e);s.ref=o},Fl=(e,t,n,r)=>{let i=e._zod.def;dl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Il=(e,t,n,r)=>{let i=e._zod.def;dl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ll=z(`ZodISODateTime`,(e,t)=>{hs.init(e,t),fu.init(e,t)});function Rl(e){return Lc(Ll,e)}const zl=z(`ZodISODate`,(e,t)=>{gs.init(e,t),fu.init(e,t)});function Bl(e){return Rc(zl,e)}const Vl=z(`ZodISOTime`,(e,t)=>{_s.init(e,t),fu.init(e,t)});function Hl(e){return zc(Vl,e)}const Ul=z(`ZodISODuration`,(e,t)=>{vs.init(e,t),fu.init(e,t)});function Wl(e){return Bc(Ul,e)}const Gl=(e,t)=>{qa.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Xa(e,t)},flatten:{value:t=>Ya(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,pa,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,pa,2)}},isEmpty:{get(){return e.issues.length===0}}})},Kl=z(`ZodError`,Gl),ql=z(`ZodError`,Gl,{Parent:Error}),Jl=Za(ql),Yl=Qa(ql),Xl=$a(ql),Zl=to(ql),Ql=ro(ql),$l=io(ql),eu=ao(ql),tu=oo(ql),nu=so(ql),ru=co(ql),iu=lo(ql),au=uo(ql),ou=new WeakMap;function su(e,t,n){let r=Object.getPrototypeOf(e),i=ou.get(r);if(i||(i=new Set,ou.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}const cu=z(`ZodType`,(e,t)=>(ts.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:gl(e,`input`),output:gl(e,`output`)}}),e.toJSONSchema=hl(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.parse=(t,n)=>Jl(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Xl(e,t,n),e.parseAsync=async(t,n)=>Yl(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Zl(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Ql(e,t,n),e.decode=(t,n)=>$l(e,t,n),e.encodeAsync=async(t,n)=>eu(e,t,n),e.decodeAsync=async(t,n)=>tu(e,t,n),e.safeEncode=(t,n)=>nu(e,t,n),e.safeDecode=(t,n)=>ru(e,t,n),e.safeEncodeAsync=async(t,n)=>iu(e,t,n),e.safeDecodeAsync=async(t,n)=>au(e,t,n),su(e,`ZodType`,{check(...e){let t=this.def;return this.clone(ba(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Aa(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(_d(e,t))},superRefine(e,t){return this.check(vd(e,t))},overwrite(e){return this.check(el(e))},optional(){return $u(this)},exactOptional(){return td(this)},nullable(){return rd(this)},nullish(){return $u(rd(this))},nonoptional(e){return ld(this,e)},array(){return Vu(this)},or(e){return Gu([this,e])},and(e){return qu(this,e)},transform(e){return pd(this,Zu(e))},default(e){return ad(this,e)},prefault(e){return sd(this,e)},catch(e){return dd(this,e)},pipe(e){return pd(this,e)},readonly(){return hd(this)},describe(e){let t=this.clone();return pc.add(t,{description:e}),t},meta(...e){if(e.length===0)return pc.get(this);let t=this.clone();return pc.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,`description`,{get(){return pc.get(e)?.description},configurable:!0}),e)),lu=z(`_ZodString`,(e,t)=>{ns.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vl(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,su(e,`_ZodString`,{regex(...e){return this.check(Jc(...e))},includes(...e){return this.check(Zc(...e))},startsWith(...e){return this.check(Qc(...e))},endsWith(...e){return this.check($c(...e))},min(...e){return this.check(Kc(...e))},max(...e){return this.check(Gc(...e))},length(...e){return this.check(qc(...e))},nonempty(...e){return this.check(Kc(1,...e))},lowercase(e){return this.check(Yc(e))},uppercase(e){return this.check(Xc(e))},trim(){return this.check(nl())},normalize(...e){return this.check(tl(...e))},toLowerCase(){return this.check(rl())},toUpperCase(){return this.check(il())},slugify(){return this.check(al())}})}),uu=z(`ZodString`,(e,t)=>{ns.init(e,t),lu.init(e,t),e.email=t=>e.check(hc(pu,t)),e.url=t=>e.check(xc(gu,t)),e.jwt=t=>e.check(Ic(ju,t)),e.emoji=t=>e.check(Sc(_u,t)),e.guid=t=>e.check(gc(mu,t)),e.uuid=t=>e.check(_c(hu,t)),e.uuidv4=t=>e.check(vc(hu,t)),e.uuidv6=t=>e.check(yc(hu,t)),e.uuidv7=t=>e.check(bc(hu,t)),e.nanoid=t=>e.check(Cc(vu,t)),e.guid=t=>e.check(gc(mu,t)),e.cuid=t=>e.check(wc(yu,t)),e.cuid2=t=>e.check(Tc(bu,t)),e.ulid=t=>e.check(Ec(xu,t)),e.base64=t=>e.check(Nc(Ou,t)),e.base64url=t=>e.check(Pc(ku,t)),e.xid=t=>e.check(Dc(Su,t)),e.ksuid=t=>e.check(Oc(Cu,t)),e.ipv4=t=>e.check(kc(wu,t)),e.ipv6=t=>e.check(Ac(Tu,t)),e.cidrv4=t=>e.check(jc(Eu,t)),e.cidrv6=t=>e.check(Mc(Du,t)),e.e164=t=>e.check(Fc(Au,t)),e.datetime=t=>e.check(Rl(t)),e.date=t=>e.check(Bl(t)),e.time=t=>e.check(Hl(t)),e.duration=t=>e.check(Wl(t))});function du(e){return mc(uu,e)}const fu=z(`ZodStringFormat`,(e,t)=>{rs.init(e,t),lu.init(e,t)}),pu=z(`ZodEmail`,(e,t)=>{os.init(e,t),fu.init(e,t)}),mu=z(`ZodGUID`,(e,t)=>{is.init(e,t),fu.init(e,t)}),hu=z(`ZodUUID`,(e,t)=>{as.init(e,t),fu.init(e,t)}),gu=z(`ZodURL`,(e,t)=>{ss.init(e,t),fu.init(e,t)}),_u=z(`ZodEmoji`,(e,t)=>{cs.init(e,t),fu.init(e,t)}),vu=z(`ZodNanoID`,(e,t)=>{ls.init(e,t),fu.init(e,t)}),yu=z(`ZodCUID`,(e,t)=>{us.init(e,t),fu.init(e,t)}),bu=z(`ZodCUID2`,(e,t)=>{ds.init(e,t),fu.init(e,t)}),xu=z(`ZodULID`,(e,t)=>{fs.init(e,t),fu.init(e,t)}),Su=z(`ZodXID`,(e,t)=>{ps.init(e,t),fu.init(e,t)}),Cu=z(`ZodKSUID`,(e,t)=>{ms.init(e,t),fu.init(e,t)}),wu=z(`ZodIPv4`,(e,t)=>{ys.init(e,t),fu.init(e,t)}),Tu=z(`ZodIPv6`,(e,t)=>{bs.init(e,t),fu.init(e,t)}),Eu=z(`ZodCIDRv4`,(e,t)=>{xs.init(e,t),fu.init(e,t)}),Du=z(`ZodCIDRv6`,(e,t)=>{Ss.init(e,t),fu.init(e,t)}),Ou=z(`ZodBase64`,(e,t)=>{ws.init(e,t),fu.init(e,t)}),ku=z(`ZodBase64URL`,(e,t)=>{Es.init(e,t),fu.init(e,t)}),Au=z(`ZodE164`,(e,t)=>{Ds.init(e,t),fu.init(e,t)}),ju=z(`ZodJWT`,(e,t)=>{ks.init(e,t),fu.init(e,t)}),Mu=z(`ZodBoolean`,(e,t)=>{As.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yl(e,t,n,r)});function Nu(e){return Vc(Mu,e)}const Pu=z(`ZodNull`,(e,t)=>{js.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bl(e,t,n,r)});function Fu(e){return Hc(Pu,e)}const Iu=z(`ZodUnknown`,(e,t)=>{Ms.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Lu(){return Uc(Iu)}const Ru=z(`ZodNever`,(e,t)=>{Ns.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xl(e,t,n,r)});function zu(e){return Wc(Ru,e)}const Bu=z(`ZodArray`,(e,t)=>{Fs.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Tl(e,t,n,r),e.element=t.element,su(e,`ZodArray`,{min(e,t){return this.check(Kc(e,t))},nonempty(e){return this.check(Kc(1,e))},max(e,t){return this.check(Gc(e,t))},length(e,t){return this.check(qc(e,t))},unwrap(){return this.element}})});function Vu(e,t){return ol(Bu,e,t)}const Hu=z(`ZodObject`,(e,t)=>{Bs.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>El(e,t,n,r),va(e,`shape`,()=>t.shape),su(e,`ZodObject`,{keyof(){return Yu(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:Lu()})},loose(){return this.clone({...this._zod.def,catchall:Lu()})},strict(){return this.clone({...this._zod.def,catchall:zu()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return Pa(this,e)},safeExtend(e){return Fa(this,e)},merge(e){return Ia(this,e)},pick(e){return Ma(this,e)},omit(e){return Na(this,e)},partial(...e){return La(Qu,this,e[0])},required(...e){return Ra(cd,this,e[0])}})});function Uu(e,t){return new Hu({type:`object`,shape:e??{},...B(t)})}const Wu=z(`ZodUnion`,(e,t)=>{Hs.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Dl(e,t,n,r),e.options=t.options});function Gu(e,t){return new Wu({type:`union`,options:e,...B(t)})}const Ku=z(`ZodIntersection`,(e,t)=>{Us.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ol(e,t,n,r)});function qu(e,t){return new Ku({type:`intersection`,left:e,right:t})}const Ju=z(`ZodEnum`,(e,t)=>{Ks.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sl(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Ju({...t,checks:[],...B(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Ju({...t,checks:[],...B(r),entries:i})}});function Yu(e,t){return new Ju({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...B(t)})}const Xu=z(`ZodTransform`,(e,t)=>{qs.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wl(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new la(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Ga(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Ga(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function Zu(e){return new Xu({type:`transform`,transform:e})}const Qu=z(`ZodOptional`,(e,t)=>{Ys.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Il(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function $u(e){return new Qu({type:`optional`,innerType:e})}const ed=z(`ZodExactOptional`,(e,t)=>{Xs.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Il(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function td(e){return new ed({type:`optional`,innerType:e})}const nd=z(`ZodNullable`,(e,t)=>{Zs.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function rd(e){return new nd({type:`nullable`,innerType:e})}const id=z(`ZodDefault`,(e,t)=>{Qs.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function ad(e,t){return new id({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Da(t)}})}const od=z(`ZodPrefault`,(e,t)=>{ec.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ml(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function sd(e,t){return new od({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Da(t)}})}const cd=z(`ZodNonOptional`,(e,t)=>{tc.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Al(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ld(e,t){return new cd({type:`nonoptional`,innerType:e,...B(t)})}const ud=z(`ZodCatch`,(e,t)=>{rc.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function dd(e,t){return new ud({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}const fd=z(`ZodPipe`,(e,t)=>{ic.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pl(e,t,n,r),e.in=t.in,e.out=t.out});function pd(e,t){return new fd({type:`pipe`,in:e,out:t})}const md=z(`ZodReadonly`,(e,t)=>{oc.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function hd(e){return new md({type:`readonly`,innerType:e})}const gd=z(`ZodCustom`,(e,t)=>{cc.init(e,t),cu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cl(e,t,n,r)});function _d(e,t={}){return sl(gd,e,t)}function vd(e,t){return cl(e,t)}var yd=oa();const bd=Uu({cwd:du().optional(),args:Vu(du()).optional()}),xd=Gu([Fu(),Nu(),bd,Vu(bd)]),Sd=`Vite+`;function Cd(){return{version:jr(`version`)||`latest`,nodeVersion:jr(`node-version`)||void 0,nodeVersionFile:jr(`node-version-file`)||void 0,workingDirectory:jr(`working-directory`)||void 0,runInstall:wd(jr(`run-install`)),cache:Mr(`cache`),cacheDependencyPath:jr(`cache-dependency-path`)||void 0,registryUrl:jr(`registry-url`)||void 0,scope:jr(`scope`)||void 0}}function wd(e){if(!e||e===`false`||e===`null`)return[];if(e===`true`)return[{}];let t=(0,yd.parse)(e);try{let e=xd.parse(t);return e?e===!0?[{}]:Array.isArray(e)?e:[e]:[]}catch(e){throw e instanceof Kl?Error(`Invalid run-install input: ${e.issues.map(e=>e.message).join(`, `)}`):e}}function Td(){return N((process.platform===`win32`?process.env.USERPROFILE:process.env.HOME)||fe(),`.vite-plus`)}function Ed(){return process.env.GITHUB_WORKSPACE||process.cwd()}function Dd(e,t){return ee(e)?e:N(t,e)}function Od(e){if(!e.workingDirectory)return Ed();let t=Dd(e.workingDirectory,Ed());if(!ie(t))throw Error(`working-directory not found: ${e.workingDirectory} (resolved to ${t})`);if(!se(t).isDirectory())throw Error(`working-directory is not a directory: ${e.workingDirectory} (resolved to ${t})`);return t}function kd(e,t){return t?Dd(t,e):e}const Ad=[{filename:`pnpm-lock.yaml`,type:`pnpm`},{filename:`bun.lockb`,type:`bun`},{filename:`bun.lock`,type:`bun`},{filename:`package-lock.json`,type:`npm`},{filename:`npm-shrinkwrap.json`,type:`npm`},{filename:`yarn.lock`,type:`yarn`}];function jd(e,t=Ed()){if(e){let n=Dd(e,t);if(ie(n)){let e=j(n),t=Ad.find(t=>t.filename===e);return t?{type:t.type,path:n,filename:e}:Md(n,e)}return}let n=oe(t);for(let e of Ad)if(n.includes(e.filename)){let n=N(t,e.filename);return Rr(`Auto-detected lock file: ${e.filename}`),{type:e.type,path:n,filename:e.filename}}}function Md(e,t){return t.includes(`pnpm`)?{type:`pnpm`,path:e,filename:t}:t.includes(`yarn`)?{type:`yarn`,path:e,filename:t}:t.startsWith(`bun.`)?{type:`bun`,path:e,filename:t}:{type:`npm`,path:e,filename:t}}async function Nd(e,t){switch(e){case`npm`:case`pnpm`:case`yarn`:case`bun`:return Fd(t);default:return[]}}async function Pd(e,t,n){let r=`${e} ${t.join(` `)}`;try{let i=await Er(e,t,{cwd:n?.cwd,silent:!0,ignoreReturnCode:!0});if(i.exitCode===0)return i.stdout.trim();R(`Command "${r}" exited with code ${i.exitCode}`);return}catch(e){Lr(`Failed to run "${r}": ${String(e)}`);return}}async function Fd(e){let t=await Pd(`vp`,[`pm`,`cache`,`dir`],{cwd:e});return t?[t]:[]}const Id=[`https://viteplus.void.app/install.sh`,`https://raw.githubusercontent.com/voidzero-dev/vite-plus/main/packages/cli/install.sh`],Ld=[`https://viteplus.void.app/install.ps1`,`https://raw.githubusercontent.com/voidzero-dev/vite-plus/main/packages/cli/install.ps1`],Rd=2e3;async function zd(e){let{version:t}=e;Rr(`Installing ${Sd}@${t}...`);let n={...process.env,VP_VERSION:t,VITE_PLUS_VERSION:t},r=process.platform===`win32`?Ld:Id,i=2*r.length,a=``,o=0;for(let e=0;e<2;e++)for(let e of r){o++;try{let t=await Bd(e,n);if(t===0){Vd();return}a=`exit code ${t}`}catch(e){a=e instanceof Error?e.message:String(e)}o!e.negate);let t={};for(let n of e){let e=$d?n.searchPath.toUpperCase():n.searchPath;t[e]=`candidate`}let n=[];for(let r of e){let e=$d?r.searchPath.toUpperCase():r.searchPath;if(t[e]===`included`)continue;let i=!1,a=e,o=Kd(a);for(;o!==a;){if(t[o]){i=!0;break}a=o,o=Kd(a)}i||(n.push(r.searchPath),t[e]=`included`)}return n}function tf(e,t){let n=Qd.None;for(let r of e)r.negate?n&=~r.match(t):n|=r.match(t);return n}function nf(e,t){return e.some(e=>!e.negate&&e.partialMatch(t))}var rf=P(((e,t)=>{t.exports=function(e,t){for(var r=[],i=0;i{t.exports=n;function n(e,t,n){e instanceof RegExp&&(e=r(e,n)),t instanceof RegExp&&(t=r(t,n));var a=i(e,t,n);return a&&{start:a[0],end:a[1],pre:n.slice(0,a[0]),body:n.slice(a[0]+e.length,a[1]),post:n.slice(a[1]+t.length)}}function r(e,t){var n=t.match(e);return n?n[0]:null}n.range=i;function i(e,t,n){var r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!s;)u==c?(r.push(u),c=n.indexOf(e,u+1)):r.length==1?s=[r.pop(),l]:(i=r.pop(),i=0?c:l;r.length&&(s=[a,o])}return s}})),of=P(((e,t)=>{var n=rf(),r=af();t.exports=p;var i=`\0SLASH`+Math.random()+`\0`,a=`\0OPEN`+Math.random()+`\0`,o=`\0CLOSE`+Math.random()+`\0`,s=`\0COMMA`+Math.random()+`\0`,c=`\0PERIOD`+Math.random()+`\0`;function l(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function u(e){return e.split(`\\\\`).join(i).split(`\\{`).join(a).split(`\\}`).join(o).split(`\\,`).join(s).split(`\\.`).join(c)}function d(e){return e.split(i).join(`\\`).split(a).join(`{`).split(o).join(`}`).split(s).join(`,`).split(c).join(`.`)}function f(e){if(!e)return[``];var t=[],n=r(`{`,`}`,e);if(!n)return e.split(`,`);var i=n.pre,a=n.body,o=n.post,s=i.split(`,`);s[s.length-1]+=`{`+a+`}`;var c=f(o);return o.length&&(s[s.length-1]+=c.shift(),s.push.apply(s,c)),t.push.apply(t,s),t}function p(e){return e?(e.substr(0,2)===`{}`&&(e=`\\{\\}`+e.substr(2)),v(u(e),!0).map(d)):[]}function m(e){return`{`+e+`}`}function h(e){return/^-?0\d/.test(e)}function g(e,t){return e<=t}function _(e,t){return e>=t}function v(e,t){var i=[],a=r(`{`,`}`,e);if(!a||/\$$/.test(a.pre))return[e];var s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body),u=s||c,d=a.body.indexOf(`,`)>=0;if(!u&&!d)return a.post.match(/,(?!,).*\}/)?(e=a.pre+`{`+a.body+o+a.post,v(e)):[e];var p;if(u)p=a.body.split(/\.\./);else if(p=f(a.body),p.length===1&&(p=v(p[0],!1).map(m),p.length===1)){var y=a.post.length?v(a.post,!1):[``];return y.map(function(e){return a.pre+p[0]+e})}var b=a.pre,y=a.post.length?v(a.post,!1):[``],x;if(u){var S=l(p[0]),C=l(p[1]),w=Math.max(p[0].length,p[1].length),T=p.length==3?Math.abs(l(p[2])):1,E=g;C0){var j=Array(A+1).join(`0`);k=O<0?`-`+j+k.slice(1):j+k}}x.push(k)}}else x=n(p,function(e){return v(e,!1)});for(var M=0;M{t.exports=h,h.Minimatch=g;var n=function(){try{return F(`path`)}catch{}}()||{sep:`/`};h.sep=n.sep;var r=h.GLOBSTAR=g.GLOBSTAR={},i=of(),a={"!":{open:`(?:(?!(?:`,close:`))[^/]*?)`},"?":{open:`(?:`,close:`)?`},"+":{open:`(?:`,close:`)+`},"*":{open:`(?:`,close:`)*`},"@":{open:`(?:`,close:`)`}},o=`[^/]`,s=o+`*?`,c=`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`,l=`(?:(?!(?:\\/|^)\\.).)*?`,u=d(`().*{}+?[]^$\\!`);function d(e){return e.split(``).reduce(function(e,t){return e[t]=!0,e},{})}var f=/\/+/;h.filter=p;function p(e,t){return t||={},function(n,r,i){return h(n,e,t)}}function m(e,t){t||={};var n={};return Object.keys(e).forEach(function(t){n[t]=e[t]}),Object.keys(t).forEach(function(e){n[e]=t[e]}),n}h.defaults=function(e){if(!e||typeof e!=`object`||!Object.keys(e).length)return h;var t=h,n=function(n,r,i){return t(n,r,m(e,i))};return n.Minimatch=function(n,r){return new t.Minimatch(n,m(e,r))},n.Minimatch.defaults=function(n){return t.defaults(m(e,n)).Minimatch},n.filter=function(n,r){return t.filter(n,m(e,r))},n.defaults=function(n){return t.defaults(m(e,n))},n.makeRe=function(n,r){return t.makeRe(n,m(e,r))},n.braceExpand=function(n,r){return t.braceExpand(n,m(e,r))},n.match=function(n,r,i){return t.match(n,r,m(e,i))},n},g.defaults=function(e){return h.defaults(e).Minimatch};function h(e,t,n){return x(t),n||={},!n.nocomment&&t.charAt(0)===`#`?!1:new g(t,n).match(e)}function g(e,t){if(!(this instanceof g))return new g(e,t);x(e),t||={},e=e.trim(),!t.allowWindowsEscape&&n.sep!==`/`&&(e=e.split(n.sep).join(`/`)),this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion===void 0?200:t.maxGlobstarRecursion,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}g.prototype.debug=function(){},g.prototype.make=_;function _(){var e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();var n=this.globSet=this.braceExpand();t.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,n),n=this.globParts=n.map(function(e){return e.split(f)}),this.debug(this.pattern,n),n=n.map(function(e,t,n){return e.map(this.parse,this)},this),this.debug(this.pattern,n),n=n.filter(function(e){return e.indexOf(!1)===-1}),this.debug(this.pattern,n),this.set=n}g.prototype.parseNegate=v;function v(){var e=this.pattern,t=!1,n=this.options,r=0;if(!n.nonegate){for(var i=0,a=e.length;ib)throw TypeError(`pattern is too long`)};g.prototype.parse=C;var S={};function C(e,t){x(e);var n=this.options;if(e===`**`)if(n.noglobstar)e=`*`;else return r;if(e===``)return``;var i=``,c=!!n.nocase,l=!1,d=[],f=[],p,m=!1,h=-1,g=-1,_=e.charAt(0)===`.`?``:n.dot?`(?!(?:^|\\/)\\.{1,2}(?:$|\\/))`:`(?!\\.)`,v=this;function y(){if(p){switch(p){case`*`:i+=s,c=!0;break;case`?`:i+=o,c=!0;break;default:i+=`\\`+p;break}v.debug(`clearStateChar %j %j`,p,i),p=!1}}for(var b=0,C=e.length,w;b-1;M--){var ee=f[M],N=i.slice(0,ee.reStart),te=i.slice(ee.reStart,ee.reEnd-8),ne=i.slice(ee.reEnd-8,ee.reEnd),re=i.slice(ee.reEnd);ne+=re;var ie=N.split(`(`).length-1,ae=re;for(b=0;b=0&&(a=e[o],!a);o--);for(o=0;o=0;o--)if(t[o]===r){c=o;break}var l=t.slice(a,s),u=n?t.slice(s+1):t.slice(s+1,c),d=n?[]:t.slice(c+1);if(l.length){var f=e.slice(i,i+l.length);if(!this._matchOne(f,l,n,0,0))return!1;i+=l.length}var p=0;if(d.length){if(d.length+i>e.length)return!1;var m=e.length-d.length;if(this._matchOne(e,d,n,m,0))p=d.length;else{if(e[e.length-1]!==``||i+d.length===e.length||(m--,!this._matchOne(e,d,n,m,0)))return!1;p=d.length+1}}if(!u.length){var h=!!p;for(o=i;o0,`Parameter 'itemPath' must not be an empty array`);for(let t=0;te.getLiteral(t)).filter(e=>!o&&!(o=e===``));this.searchPath=new lf(s).toString(),this.rootRegExp=new RegExp(e.regExpEscape(s[0]),df?`i`:``),this.isImplicitPattern=n;let c={dot:!0,nobrace:!0,nocase:df,nocomment:!0,noext:!0,nonegate:!0};a=df?a.replace(/\\/g,`/`):a,this.minimatch=new uf(a,c)}match(e){return this.segments[this.segments.length-1]===`**`?(e=Xd(e),!e.endsWith(u.sep)&&this.isImplicitPattern===!1&&(e=`${e}${u.sep}`)):e=Zd(e),this.minimatch.match(e)?this.trailingSeparator?Qd.Directory:Qd.All:Qd.None}partialMatch(e){return e=Zd(e),Kd(e)===e?this.rootRegExp.test(e):this.minimatch.matchOne(e.split(df?/\\+/:/\/+/),this.minimatch.set[0],!0)}static globEscape(e){return(df?e:e.replace(/\\/g,`\\\\`)).replace(/(\[)(?=[^/]+\])/g,`[[]`).replace(/\?/g,`[?]`).replace(/\*/g,`[*]`)}static fixupPattern(n,r){h(n,`pattern cannot be empty`);let i=new lf(n).segments.map(t=>e.getLiteral(t));if(h(i.every((e,t)=>(e!==`.`||t===0)&&e!==`..`),`Invalid pattern '${n}'. Relative pathing '.' and '..' is not allowed.`),h(!Yd(n)||i[0],`Invalid pattern '${n}'. Root segment must not contain globs.`),n=Xd(n),n===`.`||n.startsWith(`.${u.sep}`))n=e.globEscape(process.cwd())+n.substr(1);else if(n===`~`||n.startsWith(`~${u.sep}`))r||=t.homedir(),h(r,`Unable to determine HOME directory`),h(Jd(r),`Expected HOME directory to be a rooted path. Actual '${r}'`),n=e.globEscape(r)+n.substr(1);else if(df&&(n.match(/^[A-Z]:$/i)||n.match(/^[A-Z]:[^\\]/i))){let t=qd(`C:\\dummy-root`,n.substr(0,2));n.length>2&&!t.endsWith(`\\`)&&(t+=`\\`),n=e.globEscape(t)+n.substr(2)}else if(df&&(n===`\\`||n.match(/^\\[^\\]/))){let t=qd(`C:\\dummy-root`,`\\`);t.endsWith(`\\`)||(t+=`\\`),n=e.globEscape(t)+n.substr(1)}else n=qd(e.globEscape(process.cwd()),n);return Xd(n)}static getLiteral(e){let t=``;for(let n=0;n=0){if(r.length>1)return``;if(r){t+=r,n=i;continue}}}t+=r}return t}static regExpEscape(e){return e.replace(/[[\\^$.|?*+()]/g,`\\$&`)}},pf=class{constructor(e,t){this.path=e,this.level=t}},mf=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},hf=function(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof __values==`function`?__values(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}},gf=function(e){return this instanceof gf?(this.v=e,this):new gf(e)},_f=function(e,t,n){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator==`function`?AsyncIterator:Object).prototype),s(`next`),s(`throw`),s(`return`,o),i[Symbol.asyncIterator]=function(){return this},i;function o(e){return function(t){return Promise.resolve(t).then(e,d)}}function s(e,t){r[e]&&(i[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||c(e,t)})},t&&(i[e]=t(i[e])))}function c(e,t){try{l(r[e](t))}catch(e){f(a[0][3],e)}}function l(e){e.value instanceof gf?Promise.resolve(e.value.v).then(u,d):f(a[0][2],e)}function u(e){c(`next`,e)}function d(e){c(`throw`,e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}};const vf=process.platform===`win32`;var yf=class e{constructor(e){this.patterns=[],this.searchPaths=[],this.options=Wd(e)}getSearchPaths(){return this.searchPaths.slice()}glob(){return mf(this,void 0,void 0,function*(){var e,t,n,r;let i=[];try{for(var a=!0,o=hf(this.globGenerator()),s;s=yield o.next(),e=s.done,!e;a=!0){r=s.value,a=!1;let e=r;i.push(e)}}catch(e){t={error:e}}finally{try{!a&&!e&&(n=o.return)&&(yield n.call(o))}finally{if(t)throw t.error}}return i})}globGenerator(){return _f(this,arguments,function*(){let t=Wd(this.options),n=[];for(let e of this.patterns)n.push(e),t.implicitDescendants&&(e.trailingSeparator||e.segments[e.segments.length-1]!==`**`)&&n.push(new ff(e.negate,!0,e.segments.concat(`**`)));let r=[];for(let e of ef(n)){R(`Search path '${e}'`);try{yield gf(a.promises.lstat(e))}catch(e){if(e.code===`ENOENT`)continue;throw e}r.unshift(new pf(e,1))}let i=[];for(;r.length;){let o=r.pop(),s=tf(n,o.path),c=!!s||nf(n,o.path);if(!s&&!c)continue;let l=yield gf(e.stat(o,t,i));if(l&&!(t.excludeHiddenFiles&&u.basename(o.path).match(/^\./)))if(l.isDirectory()){if(s&Qd.Directory&&t.matchDirectories)yield yield gf(o.path);else if(!c)continue;let e=o.level+1,n=(yield gf(a.promises.readdir(o.path))).map(t=>new pf(u.join(o.path,t),e));r.push(...n.reverse())}else s&Qd.File&&(yield yield gf(o.path))}})}static create(t,n){return mf(this,void 0,void 0,function*(){let r=new e(n);vf&&(t=t.replace(/\r\n/g,` `),t=t.replace(/\r/g,` `));let i=t.split(` diff --git a/src/install-viteplus.test.ts b/src/install-viteplus.test.ts index 128f13a..ec03edc 100644 --- a/src/install-viteplus.test.ts +++ b/src/install-viteplus.test.ts @@ -78,7 +78,7 @@ describe("installVitePlus", () => { expect(exec).toHaveBeenCalledTimes(2); const primaryScript = (vi.mocked(exec).mock.calls[0][1] as string[])[1]; - expect(primaryScript).toContain("https://viteplus.dev/install.sh"); + expect(primaryScript).toContain("https://viteplus.void.app/install.sh"); const fallbackScript = (vi.mocked(exec).mock.calls[1][1] as string[])[1]; expect(fallbackScript).toContain( @@ -93,9 +93,9 @@ describe("installVitePlus", () => { const scripts = vi.mocked(exec).mock.calls.map((call) => (call[1] as string[])[1]); expect(scripts).toHaveLength(4); - expect(scripts[0]).toContain("viteplus.dev/install.sh"); + expect(scripts[0]).toContain("viteplus.void.app/install.sh"); expect(scripts[1]).toContain("raw.githubusercontent.com"); - expect(scripts[2]).toContain("viteplus.dev/install.sh"); + expect(scripts[2]).toContain("viteplus.void.app/install.sh"); expect(scripts[3]).toContain("raw.githubusercontent.com"); }); diff --git a/src/install-viteplus.ts b/src/install-viteplus.ts index 686ecf3..aa7d184 100644 --- a/src/install-viteplus.ts +++ b/src/install-viteplus.ts @@ -9,11 +9,11 @@ import { getVitePlusHome } from "./utils.js"; // Try the CDN first, then fall back to the install scripts in the vite-plus // repo so a CDN/edge incident doesn't fully block CI. const INSTALL_URLS_SH = [ - "https://viteplus.dev/install.sh", + "https://viteplus.void.app/install.sh", "https://raw.githubusercontent.com/voidzero-dev/vite-plus/main/packages/cli/install.sh", ]; const INSTALL_URLS_PS1 = [ - "https://viteplus.dev/install.ps1", + "https://viteplus.void.app/install.ps1", "https://raw.githubusercontent.com/voidzero-dev/vite-plus/main/packages/cli/install.ps1", ]; // Alternate primary/fallback for up to N rounds (max attempts = rounds * URLs).