mobileboost-cli 0.1.2 → 0.1.3
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/.output/nitro.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import{createMemoryHistory as fe}from"@tanstack/history";import{mergeHeaders as X,json as A}from"@tanstack/router-core/ssr/client";import{isRedirect as $,isNotFound as j,createSerializationAdapter as he,isResolvedRedirect as pe,executeRewriteInput as le,rootRouteId as D,defaultSerovalPlugins as me,makeSerovalPlugin as ye}from"@tanstack/router-core";import{AsyncLocalStorage as Q}from"node:async_hooks";import{getOrigin as be,attachRouterServerSsrUtils as we}from"@tanstack/router-core/ssr/server";import{N as Z}from"../../index.mjs";import J from"tiny-invariant";import{fromJSON as k,toCrossJSONStream as ge,toCrossJSONAsync as Se}from"seroval";import{jsx as K}from"react/jsx-runtime";import{defineHandlerCallback as xe,renderRouterToStream as ve}from"@tanstack/react-router/ssr/server";import{RouterProvider as _e}from"@tanstack/react-router";import"node:http";import"node:stream";import"node:https";import"node:http2";import"node:fs";import"node:url";import"node:path";function ee(e){if(Array.isArray(e))return e.flatMap(u=>ee(u));if(typeof e!="string")return[];const t=[];let r=0,s,n,o,i,a;const c=()=>{for(;r<e.length&&/\s/.test(e.charAt(r));)r+=1;return r<e.length},p=()=>(n=e.charAt(r),n!=="="&&n!==";"&&n!==",");for(;r<e.length;){for(s=r,a=!1;c();)if(n=e.charAt(r),n===","){for(o=r,r+=1,c(),i=r;r<e.length&&p();)r+=1;r<e.length&&e.charAt(r)==="="?(a=!0,r=i,t.push(e.slice(s,o)),s=r):r=o+1}else r+=1;(!a||r>=e.length)&&t.push(e.slice(s))}return t}function te(e,t,r){for(const s of Object.getOwnPropertyNames(t)){if(s==="constructor")continue;const n=Object.getOwnPropertyDescriptor(e,s),o=Object.getOwnPropertyDescriptor(t,s);let i=!1;o.get&&(i=!0,o.get=n?.get||function(){return this[r][s]}),o.set&&(i=!0,o.set=n?.set||function(a){this[r][s]=a}),typeof o.value=="function"&&(i=!0,o.value=function(...a){return this[r][s](...a)}),i&&Object.defineProperty(e,s,o)}}const Te=(()=>{const e=globalThis.URL,t=class{#e;#r;#n;#t;#s;#o;#i;#a;constructor(s){typeof s=="string"?this.#r=s:(this.#n=s.protocol,this.#t=s.host,this.#s=s.pathname,this.#o=s.search)}get _url(){return this.#e?this.#e:(this.#e=new e(this.href),this.#r=void 0,this.#n=void 0,this.#t=void 0,this.#s=void 0,this.#o=void 0,this.#i=void 0,this.#a=void 0,this.#e)}get href(){return this.#e?this.#e.href:(this.#r||(this.#r=`${this.#n||"http:"}//${this.#t||"localhost"}${this.#s||"/"}${this.#o||""}`),this.#r)}#c(){if(!this.#a){const s=this.href,n=s.indexOf("://"),o=n===-1?-1:s.indexOf("/",n+4),i=o===-1?-1:s.indexOf("?",o);this.#a=[n,o,i]}return this.#a}get pathname(){if(this.#e)return this.#e.pathname;if(this.#s===void 0){const[,s,n]=this.#c();if(s===-1)return this._url.pathname;this.#s=this.href.slice(s,n===-1?void 0:n)}return this.#s}get search(){if(this.#e)return this.#e.search;if(this.#o===void 0){const[,s,n]=this.#c();if(s===-1)return this._url.search;const o=this.href;this.#o=n===-1||n===o.length-1?"":o.slice(n)}return this.#o}get searchParams(){return this.#e?this.#e.searchParams:(this.#i||(this.#i=new URLSearchParams(this.search)),this.#i)}get protocol(){if(this.#e)return this.#e.protocol;if(this.#n===void 0){const[s]=this.#c();if(s===-1)return this._url.protocol;const n=this.href;this.#n=n.slice(0,s+1)}return this.#n}toString(){return this.href}toJSON(){return this.href}};return te(t.prototype,e.prototype,"_url"),Object.setPrototypeOf(t.prototype,e.prototype),Object.setPrototypeOf(t,e),t})(),F=(()=>{const e=globalThis.Response,t=globalThis.process?.getBuiltinModule?.("node:http")?.STATUS_CODES||{};class r{#e;#r;#n;#t;constructor(n,o){this.#e=n,this.#r=o}get status(){return this.#t?.status||this.#r?.status||200}get statusText(){return this.#t?.statusText||this.#r?.statusText||t[this.status]||""}get headers(){if(this.#t)return this.#t.headers;if(this.#n)return this.#n;const n=this.#r?.headers;return this.#n=n instanceof Headers?n:new Headers(n)}get ok(){if(this.#t)return this.#t.ok;const n=this.status;return n>=200&&n<300}get _response(){return this.#t?this.#t:(this.#t=new e(this.#e,this.#n?{...this.#r,headers:this.#n}:this.#r),this.#r=void 0,this.#n=void 0,this.#e=void 0,this.#t)}nodeResponse(){const n=this.status,o=this.statusText;let i,a,c;this.#t?i=this.#t.body:this.#e&&(this.#e instanceof ReadableStream?i=this.#e:typeof this.#e=="string"?(i=this.#e,a="text/plain; charset=UTF-8",c=Buffer.byteLength(this.#e)):this.#e instanceof ArrayBuffer?(i=Buffer.from(this.#e),c=this.#e.byteLength):this.#e instanceof Uint8Array?(i=this.#e,c=this.#e.byteLength):this.#e instanceof DataView?(i=Buffer.from(this.#e.buffer),c=this.#e.byteLength):this.#e instanceof Blob?(i=this.#e.stream(),a=this.#e.type,c=this.#e.size):typeof this.#e.pipe=="function"?i=this.#e:i=this._response.body);const p=[],u=this.#r?.headers,b=this.#t?.headers||this.#n||(u?Array.isArray(u)?u:u?.entries?u.entries():Object.entries(u).map(([m,g])=>[m.toLowerCase(),g]):void 0);let y,x;if(b)for(const[m,g]of b){if(m==="set-cookie"){for(const T of ee(g))p.push(["set-cookie",T]);continue}p.push([m,g]),m==="content-type"?y=!0:m==="content-length"&&(x=!0)}return a&&!y&&p.push(["content-type",a]),c&&!x&&p.push(["content-length",String(c)]),this.#r=void 0,this.#n=void 0,this.#t=void 0,this.#e=void 0,{status:n,statusText:o,headers:p,body:i}}}return te(r.prototype,e.prototype,"_response"),Object.setPrototypeOf(r,e),Object.setPrototypeOf(r.prototype,e.prototype),r})();var Ee=class{app;req;url;context;static __is_event__=!0;_res;constructor(e,t,r){this.context=t||e.context||new Z,this.req=e,this.app=r;const s=e._url;this.url=s&&s instanceof URL?s:new Te(e.url)}get res(){return this._res||(this._res=new Fe),this._res}get runtime(){return this.req.runtime}waitUntil(e){this.req.waitUntil?.(e)}toString(){return`[${this.req.method}] ${this.req.url}`}toJSON(){return this.toString()}get node(){return this.req.runtime?.node}get headers(){return this.req.headers}get path(){return this.url.pathname+this.url.search}get method(){return this.req.method}},Fe=class{status;statusText;_headers;get headers(){return this._headers||(this._headers=new Headers),this._headers}};const Re=/[^\u0009\u0020-\u007E]/g;function Ne(e=""){return e.replace(Re,"")}function Oe(e,t=200){return!e||(typeof e=="string"&&(e=+e),e<100||e>599)?t:e}var H=class re extends Error{get name(){return"HTTPError"}status;statusText;headers;cause;data;body;unhandled;static isError(t){return t instanceof Error&&t?.name==="HTTPError"}static status(t,r,s){return new re({...s,statusText:r,status:t})}constructor(t,r){let s,n;typeof t=="string"?(s=t,n=r):n=t;const o=Oe(n?.status||n?.cause?.status||n?.status||n?.statusCode,500),i=Ne(n?.statusText||n?.cause?.statusText||n?.statusText||n?.statusMessage),a=s||n?.message||n?.cause?.message||n?.statusText||n?.statusMessage||["HTTPError",o,i].filter(Boolean).join(" ");super(a,{cause:n}),this.cause=n,Error.captureStackTrace?.(this,this.constructor),this.status=o,this.statusText=i||void 0;const c=n?.headers||n?.cause?.headers;this.headers=c?new Headers(c):void 0,this.unhandled=n?.unhandled??n?.cause?.unhandled??void 0,this.data=n?.data,this.body=n?.body}get statusCode(){return this.status}get statusMessage(){return this.statusText}toJSON(){const t=this.unhandled;return{status:this.status,statusText:this.statusText,unhandled:t,message:t?"HTTPError":this.message,data:t?void 0:this.data,...t?void 0:this.body}}};function Ae(e,t){if(e==null)return!0;if(t!=="object")return t==="boolean"||t==="number"||t==="string";if(typeof e.toJSON=="function"||Array.isArray(e))return!0;if(typeof e.pipe=="function"||typeof e.pipeTo=="function")return!1;if(e instanceof Z)return!0;const r=Object.getPrototypeOf(e);return r===Object.prototype||r===null}const He=Symbol.for("h3.notFound"),Pe=Symbol.for("h3.handled");function q(e,t,r={}){if(typeof e?.then=="function")return(e.catch?.(o=>o)||Promise.resolve(e)).then(o=>q(o,t,r));const s=ne(e,t,r);if(typeof s?.then=="function")return q(s,t,r);const{onResponse:n}=r;return n?Promise.resolve(n(s,t)).then(()=>s):s}function ne(e,t,r,s){if(e===Pe)return new F(null);if(e===He&&(e=new H({status:404,message:`Cannot find any route matching [${t.req.method}] ${t.url}`})),e&&e instanceof Error){const o=H.isError(e),i=o?e:new H(e);o||(i.unhandled=!0,e?.stack&&(i.stack=e.stack)),i.unhandled&&!r.silent&&console.error(i);const{onError:a}=r;return a&&!s?Promise.resolve(a(i,t)).catch(c=>c).then(c=>ne(c??e,t,r,!0)):Ie(i,r.debug)}const n=t.res._headers;if(!(e instanceof Response)){const o=Le(e,t,r),i=t.res.status;return new F(z(t.req.method,i)?null:o.body,{status:i,statusText:t.res.statusText,headers:o.headers&&n?U(o.headers,n):o.headers||n})}return n?new F(z(t.req.method,e.status)?null:e.body,{status:e.status,statusText:e.statusText,headers:U(n,e.headers)}):e}function U(e,t){const r=new Headers(e);for(const[s,n]of t)s==="set-cookie"?r.append(s,n):r.set(s,n);return r}const Ce=new Headers({"content-length":"0"}),N=new Headers({"content-type":"application/json;charset=UTF-8"});function Le(e,t,r){if(e==null)return{body:"",headers:Ce};const s=typeof e;if(s==="string")return{body:e};if(e instanceof Uint8Array)return t.res.headers.set("content-length",e.byteLength.toString()),{body:e};if(Ae(e,s))return{body:JSON.stringify(e,void 0,r.debug?2:void 0),headers:N};if(s==="bigint")return{body:e.toString(),headers:N};if(e instanceof Blob){const n={"content-type":e.type,"content-length":e.size.toString()};let o=e.name;return o&&(o=encodeURIComponent(o),n["content-disposition"]=`filename="${o}"; filename*=UTF-8''${o}`),{body:e.stream(),headers:n}}return s==="symbol"?{body:e.toString()}:s==="function"?{body:`${e.name}()`}:{body:e}}function z(e,t){return e==="HEAD"||t===100||t===101||t===102||t===204||t===205||t===304}function Ie(e,t){return new F(JSON.stringify({...e.toJSON(),stack:t&&e.stack?e.stack.split(`
|
|
2
|
-
`).map(r=>r.trim()):void 0},void 0,t?2:void 0),{status:e.status,statusText:e.statusText,headers:e.headers?U(N,e.headers):N})}function je(e){return K(_e,{router:e.router})}const qe=xe(({request:e,router:t,responseHeaders:r})=>ve({request:e,router:t,responseHeaders:r,children:K(je,{router:t})})),V="__TSS_CONTEXT",M=Symbol.for("TSS_SERVER_FUNCTION"),B=Symbol.for("TSS_SERVER_FUNCTION_FACTORY"),P="x-tss-serialized",Ue="x-tss-raw",se=new Q;async function Me(e,t){return se.run(e,t)}function oe(e){const t=se.getStore();if(!t&&e?.throwIfNotFound!==!1)throw new Error("No Start context found in AsyncLocalStorage. Make sure you are using the function within the server runtime.");return t}const ie=()=>oe().startOptions,$e=oe,C=(e,t)=>{const r=t||e||{};return typeof r.method>"u"&&(r.method="GET"),Object.assign(s=>{const n={...r,...s};return C(void 0,n)},{options:r,middleware:s=>{const n=[...r.middleware||[]];s.map(a=>{B in a?a.options.middleware&&n.push(...a.options.middleware):n.push(a)});const o={...r,middleware:n},i=C(void 0,o);return i[B]=!0,i},inputValidator:s=>{const n={...r,inputValidator:s};return C(void 0,n)},handler:(...s)=>{const[n,o]=s,i={...r,extractedFn:n,serverFn:o},a=[...i.middleware||[],ke(i)];return Object.assign(async c=>G(a,"client",{...n,...i,data:c?.data,headers:c?.headers,signal:c?.signal,context:{}}).then(p=>{if(p.error)throw p.error;return p.result}),{...n,__executeServer:async(c,p)=>{const u=$e(),b=u.contextAfterGlobalMiddlewares,y={...n,...c,context:{...b,...c.context},signal:p,request:u.request};return G(a,"server",y).then(x=>({result:x.result,error:x.error,context:x.sendContext}))}})}})};async function G(e,t,r){const s=ie()?.functionMiddleware||[],n=O([...s,...e]),o=async i=>{const a=n.shift();if(!a)return i;"inputValidator"in a.options&&a.options.inputValidator&&t==="server"&&(i.data=await Je(a.options.inputValidator,i.data));let c;return t==="client"?"client"in a.options&&(c=a.options.client):"server"in a.options&&(c=a.options.server),c?De(c,i,async p=>o(p).catch(u=>{if($(u)||j(u))return{...p,error:u};throw u})):o(i)};return o({...r,headers:r.headers||{},sendContext:r.sendContext||{},context:r.context||{}})}function O(e){const t=new Set,r=[],s=n=>{n.forEach(o=>{o.options.middleware&&s(o.options.middleware),t.has(o)||(t.add(o),r.push(o))})};return s(e),r}const De=async(e,t,r)=>e({...t,next:(async(s={})=>r({...t,...s,context:{...t.context,...s.context},sendContext:{...t.sendContext,...s.sendContext??{}},headers:X(t.headers,s.headers),result:s.result!==void 0?s.result:s instanceof Response?s:t.result,error:s.error??t.error}))});function Je(e,t){if(e==null)return{};if("~standard"in e){const r=e["~standard"].validate(t);if(r instanceof Promise)throw new Error("Async validation not supported");if(r.issues)throw new Error(JSON.stringify(r.issues,void 0,2));return r.value}if("parse"in e)return e.parse(t);if(typeof e=="function")return e(t);throw new Error("Invalid validator type!")}function ke(e){return{_types:void 0,options:{inputValidator:e.inputValidator,client:async({next:t,sendContext:r,...s})=>{const n={...s,context:r},o=await e.extractedFn?.(n);return t(o)},server:async({next:t,...r})=>{const s=await e.serverFn?.(r);return t({...r,result:s})}}}}function ze(){return[...ie()?.serializationAdapters?.map(ye)??[],...me]}const ae=new Q;function Ve(e){return(t,r)=>{const s=new Ee(t),n=ae.run({h3Event:s},()=>e(t,r));return q(n,s)}}function Be(){const e=ae.getStore();if(!e)throw new Error("No StartEvent found in AsyncLocalStorage. Make sure you are using the function within the server runtime.");return e.h3Event}function W(){return Be()._res}async function Ge(){const{tsrStartManifest:e}=await import("./_tanstack-start-manifest_v-CUvi9Zok.mjs"),t=e(),r=t.routes[D]=t.routes[D]||{};r.assets=r.assets||[];let s=`import('${t.clientEntry}')`;return r.assets.push({tag:"script",attrs:{type:"module",async:!0},children:s}),{routes:Object.fromEntries(Object.entries(t.routes).map(([n,o])=>{const i={};let a=!1;return o.preloads&&o.preloads.length>0&&(i.preloads=o.preloads,a=!0),o.assets&&o.assets.length>0&&(i.assets=o.assets,a=!0),a?[n,i]:[]}))}}const We={"00fb1fe03e9689cf8c179ba0d5cadc5eeaa6879def224ac38037d70a1a51300d":{functionName:"fetchFilesFn_createServerFn_handler",importer:()=>import("./files-CIdgnUJn.mjs")},ac7bf7f1d727949cd28713a8f36bb77e7bd8fc0e48854ed8cb1ee93ce80fb6d0:{functionName:"createFileFn_createServerFn_handler",importer:()=>import("./files-CIdgnUJn.mjs")},b41e844ce533c224e7c720e69d821468deffcbf208fc008a7f5af83cb0596b15:{functionName:"readFileFn_createServerFn_handler",importer:()=>import("./files-CIdgnUJn.mjs")},"1b2a0d276d9ce90b2a1d72134c1bf95b9f6b7b049a8f415e8f0da3e6fc5ce4ae":{functionName:"saveFileFn_createServerFn_handler",importer:()=>import("./files-CIdgnUJn.mjs")},"098d52adf25ea567d43facba347871f887828c6ab804021bbfa0f2759209c0c6":{functionName:"renameFileFn_createServerFn_handler",importer:()=>import("./files-CIdgnUJn.mjs")},efbbc22c41cf491631b07076417c9ec65d5ac71debfcc00b5a7e0d368772104f:{functionName:"moveFileFn_createServerFn_handler",importer:()=>import("./files-CIdgnUJn.mjs")},"33557b2fcc5cedc5814d20bca9cd9cde2e45318755de1da4d613e8fa84ee38d1":{functionName:"getDevicesFn_createServerFn_handler",importer:()=>import("./list-Dq_Nh07i.mjs")},"05faf0772038a170c70083fd8de4a8b77a40e4ec46e0bbf6878670f02621b5df":{functionName:"getElementIdFn_createServerFn_handler",importer:()=>import("./hierarchy-Q35yGKlr.mjs")},"9bcbf5303827d2a25f347c2054b0121655a82322fa07108653f43246875348f7":{functionName:"findElementByIdFn_createServerFn_handler",importer:()=>import("./hierarchy-Q35yGKlr.mjs")},c5aeaa72b9b3303af5d82ee2fa59e3e90ffef3c3f0fb32707cee49e78ff41066:{functionName:"screenshotFn_createServerFn_handler",importer:()=>import("./screenshot-BD59si87.mjs")},"5918013064f9b88efb265b30a770275d6c9d52bf42318f451bab8a47bc850917":{functionName:"executeAgentStepFn_createServerFn_handler",importer:()=>import("./agent-CeaBVldB.mjs")},fcbe7e11d05240fa28a1dd79ec8c395f6c03682edbaeb19f469bd78d6399cdde:{functionName:"populateCacheMutation_createServerFn_handler",importer:()=>import("./client-DG3m9828.mjs")},"7d2aacaab26ab11cdc66f03a4ed01b8b38186abf16ab1f9306801ea7769aaa2a":{functionName:"executeFromCacheMutation_createServerFn_handler",importer:()=>import("./client-DG3m9828.mjs")},"9f335634267a450fc9f34b1ab33c55da00cb1efc709604b2e3114602020075a2":{functionName:"disableAnimationsFn_createServerFn_handler",importer:()=>import("./adb-CsX2v8FE.mjs")},f8084cb106c8126bb2deaeef7c98992d9ff9475ad3dc85c6ced04f08c3962b6e:{functionName:"describeInteractionFn_createServerFn_handler",importer:()=>import("./describe-NXd8kuzS.mjs")},eea1073a910f7f023004366aafcef05a8c47a3a1a4a09721f71a2efe311ee70f:{functionName:"startAppiumFn_createServerFn_handler",importer:()=>import("./appium-BbkeYpmk.mjs")},"6dbdc2968dc27a948c345034d1e55082b86918953b61da020ea8dd5836c79db3":{functionName:"getAppiumStatusFn_createServerFn_handler",importer:()=>import("./appium-BbkeYpmk.mjs")},"605c05774def700303f9889c0f8a28fed026e0b5c36a1563cff2835ee01d26b1":{functionName:"tapFn_createServerFn_handler",importer:()=>import("./actions-2SMY1JO3.mjs")},"07e23aa87e88d53c6c9e3d8e88de788d27d7b10930150bc4fd510d4447aaf3de":{functionName:"typeFn_createServerFn_handler",importer:()=>import("./actions-2SMY1JO3.mjs")},"5c526b678a7596f28beca76784df0ac58acd292627c5770c0c8029e38e4681ec":{functionName:"scrollFn_createServerFn_handler",importer:()=>import("./actions-2SMY1JO3.mjs")},"2b4a002699960d578addbcf4dd83fedcec62444d7da4bf7c2359be991ed6207e":{functionName:"swipeFn_createServerFn_handler",importer:()=>import("./actions-2SMY1JO3.mjs")},"10b616f4aacf11bb275166e4ae03f441f1d7c9a68a670dfadb03b74e1d012900":{functionName:"scrollUntilFn_createServerFn_handler",importer:()=>import("./actions-2SMY1JO3.mjs")},"566ee4344553ab6300f847f5de346e037f92d986cb824ba1c313346e62345fbe":{functionName:"deepLinkFn_createServerFn_handler",importer:()=>import("./actions-2SMY1JO3.mjs")}};async function ce(e){const t=We[e];if(!t)throw new Error("Server function info not found for "+e);const r=await t.importer();if(!r)throw console.info("serverFnInfo",t),new Error("Server function module not resolved for "+e);const s=r[t.functionName];if(!s)throw console.info("serverFnInfo",t),console.info("fnModule",r),new Error(`Server function module export not resolved for serverFn ID: ${e}`);return s}let L;const Ye=async({request:e,context:t})=>{const r=new AbortController,s=r.signal,n=()=>r.abort();e.signal.addEventListener("abort",n),L===void 0&&(L=new RegExp("/_serverFn/([^/?#]+)"));const o=e.method,i=new URL(e.url,"http://localhost:3000"),a=i.pathname.match(L),c=a?a[1]:null,p=Object.fromEntries(i.searchParams.entries()),u="createServerFn"in p;if(typeof c!="string")throw new Error("Invalid server action param for serverFnId: "+c);const b=await ce(c),y=["multipart/form-data","application/x-www-form-urlencoded"],x=e.headers.get("Content-Type"),m=ze();function g(h){return k(h,{plugins:m})}const T=await(async()=>{try{let h=await(async()=>{if(y.some(d=>x&&x.includes(d))){J(o.toLowerCase()!=="get","GET requests with FormData payloads are not supported");const d=await e.formData(),v=d.get(V);d.delete(V);const E={context:t,data:d};if(typeof v=="string")try{const S=JSON.parse(v),_=k(S,{plugins:m});typeof _=="object"&&_&&(E.context={...t,..._})}catch{}return await b(E,s)}if(o.toLowerCase()==="get"){J(u,"expected GET request to originate from createServerFn");let d=p.payload;return d=d?g(JSON.parse(d)):{},d.context={...t,...d.context},await b(d,s)}if(o.toLowerCase()!=="post")throw new Error("expected POST method");let l;if(x?.includes("application/json")&&(l=await e.json()),u){const d=l?g(l):{};return d.context={...d.context,...t},await b(d,s)}return await b(...l)})();if(h.result instanceof Response)return h.result.headers.set(Ue,"true"),h.result;if(!u&&(h=h.result,h instanceof Response))return h;if(j(h))return Y(h);const f=W();let w;if(h!==void 0){let l=!1;const d={onParse:S=>{w=S},onDone:()=>{l=!0},onError:S=>{throw S}};if(ge(h,{refs:new Map,plugins:m,onParse(S){d.onParse(S)},onDone(){d.onDone()},onError:S=>{d.onError(S)}}),l)return new Response(w?JSON.stringify(w):void 0,{status:f?.status,statusText:f?.statusText,headers:{"Content-Type":"application/json",[P]:"true"}});const v=new TextEncoder,E=new ReadableStream({start(S){d.onParse=_=>S.enqueue(v.encode(JSON.stringify(_)+`
|
|
2
|
+
`).map(r=>r.trim()):void 0},void 0,t?2:void 0),{status:e.status,statusText:e.statusText,headers:e.headers?U(N,e.headers):N})}function je(e){return K(_e,{router:e.router})}const qe=xe(({request:e,router:t,responseHeaders:r})=>ve({request:e,router:t,responseHeaders:r,children:K(je,{router:t})})),V="__TSS_CONTEXT",M=Symbol.for("TSS_SERVER_FUNCTION"),B=Symbol.for("TSS_SERVER_FUNCTION_FACTORY"),P="x-tss-serialized",Ue="x-tss-raw",se=new Q;async function Me(e,t){return se.run(e,t)}function oe(e){const t=se.getStore();if(!t&&e?.throwIfNotFound!==!1)throw new Error("No Start context found in AsyncLocalStorage. Make sure you are using the function within the server runtime.");return t}const ie=()=>oe().startOptions,$e=oe,C=(e,t)=>{const r=t||e||{};return typeof r.method>"u"&&(r.method="GET"),Object.assign(s=>{const n={...r,...s};return C(void 0,n)},{options:r,middleware:s=>{const n=[...r.middleware||[]];s.map(a=>{B in a?a.options.middleware&&n.push(...a.options.middleware):n.push(a)});const o={...r,middleware:n},i=C(void 0,o);return i[B]=!0,i},inputValidator:s=>{const n={...r,inputValidator:s};return C(void 0,n)},handler:(...s)=>{const[n,o]=s,i={...r,extractedFn:n,serverFn:o},a=[...i.middleware||[],ke(i)];return Object.assign(async c=>G(a,"client",{...n,...i,data:c?.data,headers:c?.headers,signal:c?.signal,context:{}}).then(p=>{if(p.error)throw p.error;return p.result}),{...n,__executeServer:async(c,p)=>{const u=$e(),b=u.contextAfterGlobalMiddlewares,y={...n,...c,context:{...b,...c.context},signal:p,request:u.request};return G(a,"server",y).then(x=>({result:x.result,error:x.error,context:x.sendContext}))}})}})};async function G(e,t,r){const s=ie()?.functionMiddleware||[],n=O([...s,...e]),o=async i=>{const a=n.shift();if(!a)return i;"inputValidator"in a.options&&a.options.inputValidator&&t==="server"&&(i.data=await Je(a.options.inputValidator,i.data));let c;return t==="client"?"client"in a.options&&(c=a.options.client):"server"in a.options&&(c=a.options.server),c?De(c,i,async p=>o(p).catch(u=>{if($(u)||j(u))return{...p,error:u};throw u})):o(i)};return o({...r,headers:r.headers||{},sendContext:r.sendContext||{},context:r.context||{}})}function O(e){const t=new Set,r=[],s=n=>{n.forEach(o=>{o.options.middleware&&s(o.options.middleware),t.has(o)||(t.add(o),r.push(o))})};return s(e),r}const De=async(e,t,r)=>e({...t,next:(async(s={})=>r({...t,...s,context:{...t.context,...s.context},sendContext:{...t.sendContext,...s.sendContext??{}},headers:X(t.headers,s.headers),result:s.result!==void 0?s.result:s instanceof Response?s:t.result,error:s.error??t.error}))});function Je(e,t){if(e==null)return{};if("~standard"in e){const r=e["~standard"].validate(t);if(r instanceof Promise)throw new Error("Async validation not supported");if(r.issues)throw new Error(JSON.stringify(r.issues,void 0,2));return r.value}if("parse"in e)return e.parse(t);if(typeof e=="function")return e(t);throw new Error("Invalid validator type!")}function ke(e){return{_types:void 0,options:{inputValidator:e.inputValidator,client:async({next:t,sendContext:r,...s})=>{const n={...s,context:r},o=await e.extractedFn?.(n);return t(o)},server:async({next:t,...r})=>{const s=await e.serverFn?.(r);return t({...r,result:s})}}}}function ze(){return[...ie()?.serializationAdapters?.map(ye)??[],...me]}const ae=new Q;function Ve(e){return(t,r)=>{const s=new Ee(t),n=ae.run({h3Event:s},()=>e(t,r));return q(n,s)}}function Be(){const e=ae.getStore();if(!e)throw new Error("No StartEvent found in AsyncLocalStorage. Make sure you are using the function within the server runtime.");return e.h3Event}function W(){return Be()._res}async function Ge(){const{tsrStartManifest:e}=await import("./_tanstack-start-manifest_v-CUvi9Zok.mjs"),t=e(),r=t.routes[D]=t.routes[D]||{};r.assets=r.assets||[];let s=`import('${t.clientEntry}')`;return r.assets.push({tag:"script",attrs:{type:"module",async:!0},children:s}),{routes:Object.fromEntries(Object.entries(t.routes).map(([n,o])=>{const i={};let a=!1;return o.preloads&&o.preloads.length>0&&(i.preloads=o.preloads,a=!0),o.assets&&o.assets.length>0&&(i.assets=o.assets,a=!0),a?[n,i]:[]}))}}const We={"00fb1fe03e9689cf8c179ba0d5cadc5eeaa6879def224ac38037d70a1a51300d":{functionName:"fetchFilesFn_createServerFn_handler",importer:()=>import("./files-CIdgnUJn.mjs")},ac7bf7f1d727949cd28713a8f36bb77e7bd8fc0e48854ed8cb1ee93ce80fb6d0:{functionName:"createFileFn_createServerFn_handler",importer:()=>import("./files-CIdgnUJn.mjs")},b41e844ce533c224e7c720e69d821468deffcbf208fc008a7f5af83cb0596b15:{functionName:"readFileFn_createServerFn_handler",importer:()=>import("./files-CIdgnUJn.mjs")},"1b2a0d276d9ce90b2a1d72134c1bf95b9f6b7b049a8f415e8f0da3e6fc5ce4ae":{functionName:"saveFileFn_createServerFn_handler",importer:()=>import("./files-CIdgnUJn.mjs")},"098d52adf25ea567d43facba347871f887828c6ab804021bbfa0f2759209c0c6":{functionName:"renameFileFn_createServerFn_handler",importer:()=>import("./files-CIdgnUJn.mjs")},efbbc22c41cf491631b07076417c9ec65d5ac71debfcc00b5a7e0d368772104f:{functionName:"moveFileFn_createServerFn_handler",importer:()=>import("./files-CIdgnUJn.mjs")},c5aeaa72b9b3303af5d82ee2fa59e3e90ffef3c3f0fb32707cee49e78ff41066:{functionName:"screenshotFn_createServerFn_handler",importer:()=>import("./screenshot-BD59si87.mjs")},"9f335634267a450fc9f34b1ab33c55da00cb1efc709604b2e3114602020075a2":{functionName:"disableAnimationsFn_createServerFn_handler",importer:()=>import("./adb-CsX2v8FE.mjs")},"33557b2fcc5cedc5814d20bca9cd9cde2e45318755de1da4d613e8fa84ee38d1":{functionName:"getDevicesFn_createServerFn_handler",importer:()=>import("./list-Dq_Nh07i.mjs")},f8084cb106c8126bb2deaeef7c98992d9ff9475ad3dc85c6ced04f08c3962b6e:{functionName:"describeInteractionFn_createServerFn_handler",importer:()=>import("./describe-NXd8kuzS.mjs")},"05faf0772038a170c70083fd8de4a8b77a40e4ec46e0bbf6878670f02621b5df":{functionName:"getElementIdFn_createServerFn_handler",importer:()=>import("./hierarchy-Q35yGKlr.mjs")},"9bcbf5303827d2a25f347c2054b0121655a82322fa07108653f43246875348f7":{functionName:"findElementByIdFn_createServerFn_handler",importer:()=>import("./hierarchy-Q35yGKlr.mjs")},fcbe7e11d05240fa28a1dd79ec8c395f6c03682edbaeb19f469bd78d6399cdde:{functionName:"populateCacheMutation_createServerFn_handler",importer:()=>import("./client-DG3m9828.mjs")},"7d2aacaab26ab11cdc66f03a4ed01b8b38186abf16ab1f9306801ea7769aaa2a":{functionName:"executeFromCacheMutation_createServerFn_handler",importer:()=>import("./client-DG3m9828.mjs")},"5918013064f9b88efb265b30a770275d6c9d52bf42318f451bab8a47bc850917":{functionName:"executeAgentStepFn_createServerFn_handler",importer:()=>import("./agent-CeaBVldB.mjs")},"605c05774def700303f9889c0f8a28fed026e0b5c36a1563cff2835ee01d26b1":{functionName:"tapFn_createServerFn_handler",importer:()=>import("./actions-2SMY1JO3.mjs")},"07e23aa87e88d53c6c9e3d8e88de788d27d7b10930150bc4fd510d4447aaf3de":{functionName:"typeFn_createServerFn_handler",importer:()=>import("./actions-2SMY1JO3.mjs")},"5c526b678a7596f28beca76784df0ac58acd292627c5770c0c8029e38e4681ec":{functionName:"scrollFn_createServerFn_handler",importer:()=>import("./actions-2SMY1JO3.mjs")},"2b4a002699960d578addbcf4dd83fedcec62444d7da4bf7c2359be991ed6207e":{functionName:"swipeFn_createServerFn_handler",importer:()=>import("./actions-2SMY1JO3.mjs")},"10b616f4aacf11bb275166e4ae03f441f1d7c9a68a670dfadb03b74e1d012900":{functionName:"scrollUntilFn_createServerFn_handler",importer:()=>import("./actions-2SMY1JO3.mjs")},"566ee4344553ab6300f847f5de346e037f92d986cb824ba1c313346e62345fbe":{functionName:"deepLinkFn_createServerFn_handler",importer:()=>import("./actions-2SMY1JO3.mjs")},eea1073a910f7f023004366aafcef05a8c47a3a1a4a09721f71a2efe311ee70f:{functionName:"startAppiumFn_createServerFn_handler",importer:()=>import("./appium-BbkeYpmk.mjs")},"6dbdc2968dc27a948c345034d1e55082b86918953b61da020ea8dd5836c79db3":{functionName:"getAppiumStatusFn_createServerFn_handler",importer:()=>import("./appium-BbkeYpmk.mjs")}};async function ce(e){const t=We[e];if(!t)throw new Error("Server function info not found for "+e);const r=await t.importer();if(!r)throw console.info("serverFnInfo",t),new Error("Server function module not resolved for "+e);const s=r[t.functionName];if(!s)throw console.info("serverFnInfo",t),console.info("fnModule",r),new Error(`Server function module export not resolved for serverFn ID: ${e}`);return s}let L;const Ye=async({request:e,context:t})=>{const r=new AbortController,s=r.signal,n=()=>r.abort();e.signal.addEventListener("abort",n),L===void 0&&(L=new RegExp("/_serverFn/([^/?#]+)"));const o=e.method,i=new URL(e.url,"http://localhost:3000"),a=i.pathname.match(L),c=a?a[1]:null,p=Object.fromEntries(i.searchParams.entries()),u="createServerFn"in p;if(typeof c!="string")throw new Error("Invalid server action param for serverFnId: "+c);const b=await ce(c),y=["multipart/form-data","application/x-www-form-urlencoded"],x=e.headers.get("Content-Type"),m=ze();function g(h){return k(h,{plugins:m})}const T=await(async()=>{try{let h=await(async()=>{if(y.some(d=>x&&x.includes(d))){J(o.toLowerCase()!=="get","GET requests with FormData payloads are not supported");const d=await e.formData(),v=d.get(V);d.delete(V);const E={context:t,data:d};if(typeof v=="string")try{const S=JSON.parse(v),_=k(S,{plugins:m});typeof _=="object"&&_&&(E.context={...t,..._})}catch{}return await b(E,s)}if(o.toLowerCase()==="get"){J(u,"expected GET request to originate from createServerFn");let d=p.payload;return d=d?g(JSON.parse(d)):{},d.context={...t,...d.context},await b(d,s)}if(o.toLowerCase()!=="post")throw new Error("expected POST method");let l;if(x?.includes("application/json")&&(l=await e.json()),u){const d=l?g(l):{};return d.context={...d.context,...t},await b(d,s)}return await b(...l)})();if(h.result instanceof Response)return h.result.headers.set(Ue,"true"),h.result;if(!u&&(h=h.result,h instanceof Response))return h;if(j(h))return Y(h);const f=W();let w;if(h!==void 0){let l=!1;const d={onParse:S=>{w=S},onDone:()=>{l=!0},onError:S=>{throw S}};if(ge(h,{refs:new Map,plugins:m,onParse(S){d.onParse(S)},onDone(){d.onDone()},onError:S=>{d.onError(S)}}),l)return new Response(w?JSON.stringify(w):void 0,{status:f?.status,statusText:f?.statusText,headers:{"Content-Type":"application/json",[P]:"true"}});const v=new TextEncoder,E=new ReadableStream({start(S){d.onParse=_=>S.enqueue(v.encode(JSON.stringify(_)+`
|
|
3
3
|
`)),d.onDone=()=>{try{S.close()}catch(_){S.error(_)}},d.onError=_=>S.error(_),w!==void 0&&d.onParse(w)}});return new Response(E,{status:f?.status,statusText:f?.statusText,headers:{"Content-Type":"application/x-ndjson",[P]:"true"}})}return new Response(void 0,{status:f?.status,statusText:f?.statusText})}catch(h){if(h instanceof Response)return h;if(j(h))return Y(h);console.info(),console.info("Server Fn Error!"),console.info(),console.error(h),console.info();const f=JSON.stringify(await Promise.resolve(Se(h,{refs:new Map,plugins:m}))),w=W();return new Response(f,{status:w?.status??500,statusText:w?.statusText,headers:{"Content-Type":"application/json",[P]:"true"}})}})();return e.signal.removeEventListener("abort",n),T};function Y(e){const{headers:t,...r}=e;return new Response(JSON.stringify(r),{status:404,headers:{"Content-Type":"application/json",...t||{}}})}const Xe={TSS_SHELL:"X-TSS_SHELL"},Qe=(e,t)=>Object.assign(t,{functionId:e,[M]:!0}),Ze=he({key:"$TSS/serverfn",test:e=>typeof e!="function"||!(M in e)?!1:!!e[M],toSerializable:({functionId:e})=>({functionId:e}),fromSerializable:({functionId:e})=>Qe(e,async(t,r)=>(await(await ce(e))(t??{},r)).result)});function Ke(e){return X({"Content-Type":"text/html; charset=utf-8"},...e.router.state.matches.map(t=>t.headers))}function et(e){let t=null,r=null,s=null;const n=async()=>(s===null&&(s=await import("./router-Bufjq1jN.mjs")),r===null&&(r=await import("./start-BClswEUm.mjs")),{startEntry:r,routerEntry:s});return Ve(async(o,i)=>{let a=null,c=!1;try{const p=be(o),u=new URL(o.url),b=u.href.replace(u.origin,""),y=await(await n()).startEntry.startInstance?.getOptions()||{},x=[...y.serializationAdapters||[],Ze],m={...y,serializationAdapters:x},g=async()=>{if(a)return a;a=await(await n()).routerEntry.getRouter();const w=process.env.TSS_PRERENDERING==="true";let l=process.env.TSS_SHELL==="true";w&&!l&&(l=o.headers.get(Xe.TSS_SHELL)==="true");const d=fe({initialEntries:[b]});return a.update({history:d,isShell:l,isPrerendering:w,origin:a.options.origin??p,defaultSsr:m.defaultSsr,serializationAdapters:[...m.serializationAdapters,...a.options.serializationAdapters||[]],basepath:"/"}),a},T=R(async({context:w})=>await Me({getRouter:g,startOptions:m,contextAfterGlobalMiddlewares:w,request:o},async()=>{try{return b.startsWith("/_serverFn/")?await Ye({request:o,context:i?.context}):await tt({getRouter:g,request:o,executeRouter:async({serverContext:l})=>{const d=(o.headers.get("Accept")||"*/*").split(",");if(!["*/*","text/html"].some(S=>d.some(_=>_.trim().startsWith(S))))return A({error:"Only HTML requests are supported here"},{status:500});t===null&&(t=await Ge());const v=await g();if(we({router:v,manifest:t}),v.update({additionalContext:{serverContext:l}}),await v.load(),v.state.redirect)return v.state.redirect;await v.serverSsr.dehydrate();const E=Ke({router:v});return c=!0,await e({request:o,router:v,responseHeaders:E})},context:w})}catch(l){if(l instanceof Response)return l;throw l}})),h=(y.requestMiddleware?O(y.requestMiddleware):[]).map(w=>w.options.server),f=(await ue([...h,T],{request:o,context:i?.context||{}})).response;if($(f)){if(pe(f))return o.headers.get("x-tsr-redirect")==="manual"?A({...f.options,isSerializedRedirect:!0},{headers:f.headers}):f;if(f.options.to&&typeof f.options.to=="string"&&!f.options.to.startsWith("/"))throw new Error(`Server side redirects must use absolute paths via the 'href' or 'to' options. The redirect() method's "to" property accepts an internal path only. Use the "href" property to provide an external URL. Received: ${JSON.stringify(f.options)}`);if(["params","search","hash"].some(l=>typeof f.options[l]=="function"))throw new Error(`Server side redirects must use static search, params, and hash values and do not support functional values. Received functional values for: ${Object.keys(f.options).filter(l=>typeof f.options[l]=="function").map(l=>`"${l}"`).join(", ")}`);const w=(await g()).resolveRedirect(f);return o.headers.get("x-tsr-redirect")==="manual"?A({...f.options,isSerializedRedirect:!0},{headers:f.headers}):w}return f}finally{a&&!c&&a.serverSsr?.cleanup(),a=null}})}async function tt({getRouter:e,request:t,executeRouter:r,context:s}){const n=await e();let o=new URL(t.url);o=le(n.rewrite,o);const i=o.pathname,{matchedRoutes:a,foundRoute:c,routeParams:p}=n.getMatchedRoutes(i),u=O(a.flatMap(y=>y.options.server?.middleware).filter(Boolean)).map(y=>y.options.server),b=c?.options.server;if(b&&b.handlers){const y=typeof b.handlers=="function"?b.handlers({createHandlers:g=>g}):b.handlers,x=t.method.toUpperCase(),m=y[x]??y.ANY;if(m){const g=!!c.options.component;if(typeof m=="function")u.push(R(m,g));else{const{middleware:T}=m;T&&T.length&&u.push(...O(T).map(h=>h.options.server)),m.handler&&u.push(R(m.handler,g))}}}return u.push(R(y=>r({serverContext:y.context}))),(await ue(u,{request:t,context:s,params:p,pathname:i})).response}function rt(){throw process.env.NODE_ENV==="development"?new Error("It looks like you forgot to return a response from your server route handler. If you want to defer to the app router, make sure to have a component set in this route."):new Error("Internal Server Error")}function nt(){throw process.env.NODE_ENV==="development"?new Error("You cannot defer to the app router if there is no component defined on this route."):new Error("Internal Server Error")}function R(e,t=!1){return t?e:async({next:r,...s})=>{const n=await e({...s,next:nt});return n||rt(),n}}function ue(e,t){let r=-1;const s=async n=>{r++;const o=e[r];if(!o)return n;let i;try{i=await o({...n,next:async a=>{const c=await s({...n,...a,context:{...n.context,...a?.context||{}}});return Object.assign(n,I(c))}})}catch(a){if(de(a))i={response:a};else throw a}return Object.assign(n,I(i))};return I(s(t))}function I(e){return de(e)?{response:e}:e}function de(e){return st(e)||$(e)}function st(e){return e instanceof Response}const ot=et(qe);function it(e){return{async fetch(...t){return await e.fetch(...t)}}}const Ft=it({fetch:ot});export{M as T,C as a,Qe as c,it as createServerEntry,Ft as default,ce as g};
|
package/.output/server/index.mjs
CHANGED
|
@@ -4,4 +4,4 @@ Shutting down server in ${n}s...`));let a;await Promise.race([t.close().finally(
|
|
|
4
4
|
Force closing connections in ${s}s...`)),a=setTimeout(()=>{i(ft(`
|
|
5
5
|
Could not close connections in time, force exiting.`)),h()},s*1e3),t.close(!0)),n*1e3)})]),globalThis.process.exit(0)};for(const i of["SIGINT","SIGTERM"])globalThis.process.on(i,o)},St=(()=>{const t=globalThis.Response,e=globalThis.process?.getBuiltinModule?.("node:http")?.STATUS_CODES||{};class n{#t;#e;#r;#s;constructor(r,o){this.#t=r,this.#e=o}static[Symbol.hasInstance](r){return r instanceof t}get status(){return this.#s?.status||this.#e?.status||200}get statusText(){return this.#s?.statusText||this.#e?.statusText||e[this.status]||""}get headers(){if(this.#s)return this.#s.headers;if(this.#r)return this.#r;const r=this.#e?.headers;return this.#r=r instanceof Headers?r:new Headers(r)}get ok(){if(this.#s)return this.#s.ok;const r=this.status;return r>=200&&r<300}get _response(){return this.#s?this.#s:(this.#s=new t(this.#t,this.#r?{...this.#e,headers:this.#r}:this.#e),this.#e=void 0,this.#r=void 0,this.#t=void 0,this.#s)}_toNodeResponse(){const r=this.status,o=this.statusText;let i,a,h;this.#s?i=this.#s.body:this.#t&&(this.#t instanceof ReadableStream?i=this.#t:typeof this.#t=="string"?(i=this.#t,a="text/plain; charset=UTF-8",h=Buffer.byteLength(this.#t)):this.#t instanceof ArrayBuffer?(i=Buffer.from(this.#t),h=this.#t.byteLength):this.#t instanceof Uint8Array?(i=this.#t,h=this.#t.byteLength):this.#t instanceof DataView?(i=Buffer.from(this.#t.buffer),h=this.#t.byteLength):this.#t instanceof Blob?(i=this.#t.stream(),a=this.#t.type,h=this.#t.size):typeof this.#t.pipe=="function"?i=this.#t:i=this._response.body);const c=[],u=this.#e?.headers,l=this.#s?.headers||this.#r||(u?Array.isArray(u)?u:u?.entries?u.entries():Object.entries(u).map(([f,d])=>[f.toLowerCase(),d]):void 0);let p,m;if(l)for(const[f,d]of l){if(Array.isArray(d))for(const O of d)c.push([f,O]);else c.push([f,d]);f==="content-type"?p=!0:f==="content-length"&&(m=!0)}return a&&!p&&c.push(["content-type",a]),h&&!m&&c.push(["content-length",String(h)]),this.#e=void 0,this.#r=void 0,this.#s=void 0,this.#t=void 0,{status:r,statusText:o,headers:c,body:i}}}return S(n.prototype,t.prototype,"_response"),Object.setPrototypeOf(n,t),Object.setPrototypeOf(n.prototype,t.prototype),n})();async function N(t,e){if(!e)return t.statusCode=500,R(t);if(e._toNodeResponse){const s=e._toNodeResponse();if(A(t,s.status,s.statusText,s.headers),s.body){if(s.body instanceof ReadableStream)return U(s.body,t);if(typeof s.body?.pipe=="function")return s.body.pipe(t),new Promise(r=>t.on("close",r));t.write(s.body)}return R(t)}const n=[...e.headers];return A(t,e.status,e.statusText,n),e.body?U(e.body,t):R(t)}function A(t,e,n,s){const r=globalThis.Deno?s:s.flat();t.headersSent||(t.req?.httpVersion==="2.0"?t.writeHead(e,r):t.writeHead(e,n,r))}function R(t){return new Promise(e=>t.end(e))}function U(t,e){if(e.destroyed){t.cancel();return}const n=t.getReader();function s(o){n.cancel(o).catch(()=>{}),o&&e.destroy(o)}function r({done:o,value:i}){try{o?e.end():e.write(i)?n.read().then(r,s):e.once("drain",()=>n.read().then(r,s))}catch(a){s(a instanceof Error?a:void 0)}}return e.on("close",s),e.on("error",s),n.read().then(r,s),n.closed.catch(s).finally(()=>{e.off("close",s),e.off("error",s)})}var Ot=class extends dt{#t;constructor({req:t}){const e=t.url||"/";if(e[0]==="/"){const n=e.indexOf("?"),s=n===-1?e:e?.slice(0,n)||"/",r=n===-1?"":e?.slice(n)||"",o=t.headers.host||t.headers[":authority"]||`${t.socket.localFamily==="IPv6"?"["+t.socket.localAddress+"]":t.socket.localAddress}:${t.socket?.localPort||"80"}`,i=t.socket?.encrypted||t.headers["x-forwarded-proto"]==="https"||t.headers[":scheme"]==="https"?"https:":"http:";super({protocol:i,host:o,pathname:s,search:r})}else super(e);this.#t=t}get pathname(){return super.pathname}set pathname(t){this._url.pathname=t,this.#t.url=this._url.pathname+this._url.search}};const _t=(()=>{const t=globalThis.Headers;class e{#t;#e;constructor(s){this.#t=s}static[Symbol.hasInstance](s){return s instanceof t}get _headers(){if(!this.#e){const s=new t,r=this.#t.rawHeaders,o=r.length;for(let i=0;i<o;i+=2){const a=r[i];if(a.charCodeAt(0)===58)continue;const h=r[i+1];s.append(a,h)}this.#e=s}return this.#e}get(s){if(this.#e)return this.#e.get(s);const r=this.#t.headers[s.toLowerCase()];return Array.isArray(r)?r.join(", "):r||null}has(s){return this.#e?this.#e.has(s):s.toLowerCase()in this.#t.headers}getSetCookie(){if(this.#e)return this.#e.getSetCookie();const s=this.#t.headers["set-cookie"];return Array.isArray(s)?s:s?[s]:[]}*_entries(){const s=this.#t.rawHeaders,r=s.length;for(let o=0;o<r;o+=2){const i=s[o];i.charCodeAt(0)!==58&&(yield[i.toLowerCase(),s[o+1]])}}entries(){return this.#e?this.#e.entries():this._entries()}[Symbol.iterator](){return this.entries()}}return S(e.prototype,t.prototype,"_headers"),Object.setPrototypeOf(e,t),Object.setPrototypeOf(e.prototype,t.prototype),e})(),Rt=(()=>{const t=globalThis[Symbol.for("srvx.nativeRequest")]??=globalThis.Request,e=class extends t{static _srvx=!0;static[Symbol.hasInstance](r){return this===e?r instanceof t:Object.prototype.isPrototypeOf.call(this.prototype,r)}constructor(r,o){typeof r=="object"&&"_request"in r&&(r=r._request),o?.body?.getReader!==void 0&&(o.duplex??="half"),super(r,o)}};globalThis.Request._srvx||(globalThis.Request=e);class n{runtime;#t;#e;#r;#s;#o;#n;constructor(r){this.#t=r.req,this.runtime={name:"node",node:r}}static[Symbol.hasInstance](r){return r instanceof t}get ip(){return this.#t.socket?.remoteAddress}get method(){return this.#s?this.#s.method:this.#t.method||"GET"}get _url(){return this.#e||=new Ot({req:this.#t})}set _url(r){this.#e=r}get url(){return this.#s?this.#s.url:this._url.href}get headers(){return this.#s?this.#s.headers:this.#o||=new _t(this.#t)}get _abortController(){if(!this.#n){this.#n=new AbortController;const r=this.#t,o=i=>{this.#n?.abort?.(i)};r.once("error",o),r.once("end",o)}return this.#n}get signal(){return this.#s?this.#s.signal:this._abortController.signal}get body(){if(this.#s)return this.#s.body;if(this.#r===void 0){const r=this.method;this.#r=r==="GET"||r==="HEAD"?null:et.toWeb(this.#t)}return this.#r}text(){return this.#s?this.#s.text():this.#r!==void 0?this.#r?new Response(this.#r).text():Promise.resolve(""):xt(this.#t).then(r=>r.toString())}json(){return this.#s?this.#s.json():this.text().then(r=>JSON.parse(r))}get _request(){return this.#s||(this.#s=new e(this.url,{method:this.method,headers:this.headers,body:this.body,signal:this._abortController.signal}),this.#o=void 0,this.#r=void 0),this.#s}}return S(n.prototype,t.prototype,"_request"),Object.setPrototypeOf(n.prototype,t.prototype),n})();function xt(t){return new Promise((e,n)=>{const s=[],r=a=>{s.push(a)},o=a=>{n(a)},i=()=>{t.off("error",o),t.off("data",r),e(Buffer.concat(s))};t.on("data",r).once("end",i).once("error",o)})}function Ht(t){return new Pt(t)}var Pt=class{runtime="node";options;node;serveOptions;fetch;#t;#e;#r;constructor(t){this.options={...t,middleware:[...t.middleware||[]]};for(const a of t.plugins||[])a(this);wt(this),Tt(this);const e=this.fetch=bt(this);this.#r=yt();const n=(a,h)=>{const c=new Rt({req:a,res:h});c.waitUntil=this.#r.waitUntil;const u=e(c);return u instanceof Promise?u.then(l=>N(h,l)):N(h,u)},s=gt(this.options),{port:r,hostname:o}=lt(this.options);this.serveOptions={port:r,host:o,exclusive:!this.options.reusePort,...s?{cert:s.cert,key:s.key,passphrase:s.passphrase}:{},...this.options.node};let i;if(this.#t=!!this.serveOptions.cert&&this.options.protocol!=="http",this.options.node?.http2??this.#t)if(this.#t)i=rt.createSecureServer({allowHTTP1:!0,...this.serveOptions},n);else throw new Error("node.http2 option requires tls certificate!");else this.#t?i=st.createServer(this.serveOptions,n):i=tt.createServer(this.serveOptions,n);this.node={server:i,handler:n},t.manual||this.serve()}serve(){if(this.#e)return Promise.resolve(this.#e).then(()=>this);this.#e=new Promise(t=>{this.node.server.listen(this.serveOptions,()=>{mt(this.options,this.url),t()})})}get url(){const t=this.node?.server?.address();if(t)return typeof t=="string"?t:pt(t.address,t.port,this.#t)}ready(){return Promise.resolve(this.#e).then(()=>this)}async close(t){await Promise.all([this.#r.wait(),new Promise((e,n)=>{const s=this.node?.server;if(!s)return e();t&&"closeAllConnections"in s&&s.closeAllConnections(),s.close(r=>r?n(r):e())})])}};const D=(()=>{const t=function(){};return t.prototype=Object.create(null),Object.freeze(t.prototype),t})();function z(t,e,n){for(const s of[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)]){if(s==="constructor")continue;const r=Object.getOwnPropertyDescriptor(t,s),o=Object.getOwnPropertyDescriptor(e,s);let i=!1;o.get&&(i=!0,o.get=r?.get||function(){return this[n][s]}),o.set&&(i=!0,o.set=r?.set||function(a){this[n][s]=a}),!r?.value&&typeof o.value=="function"&&(i=!0,o.value=function(...a){return this[n][s](...a)}),i&&Object.defineProperty(t,s,o)}}const Et=(()=>{const t=globalThis.URL,e=class{#t;#e;#r;#s;#o;#n;#i;#a;constructor(s){typeof s=="string"?this.#e=s:(this.#r=s.protocol,this.#s=s.host,this.#o=s.pathname,this.#n=s.search)}static[Symbol.hasInstance](s){return s instanceof t}get _url(){return this.#t?this.#t:(this.#t=new t(this.href),this.#e=void 0,this.#r=void 0,this.#s=void 0,this.#o=void 0,this.#n=void 0,this.#i=void 0,this.#a=void 0,this.#t)}get href(){return this.#t?this.#t.href:(this.#e||(this.#e=`${this.#r||"http:"}//${this.#s||"localhost"}${this.#o||"/"}${this.#n||""}`),this.#e)}#h(){if(!this.#a){const s=this.href,r=s.indexOf("://"),o=r===-1?-1:s.indexOf("/",r+4);this.#a=[r,o,o===-1?-1:s.indexOf("?",o)]}return this.#a}get pathname(){if(this.#t)return this.#t.pathname;if(this.#o===void 0){const[,s,r]=this.#h();if(s===-1)return this._url.pathname;this.#o=this.href.slice(s,r===-1?void 0:r)}return this.#o}get search(){if(this.#t)return this.#t.search;if(this.#n===void 0){const[,s,r]=this.#h();if(s===-1)return this._url.search;const o=this.href;this.#n=r===-1||r===o.length-1?"":o.slice(r)}return this.#n}get searchParams(){return this.#t?this.#t.searchParams:(this.#i||(this.#i=new URLSearchParams(this.search)),this.#i)}get protocol(){if(this.#t)return this.#t.protocol;if(this.#r===void 0){const[s]=this.#h();if(s===-1)return this._url.protocol;this.#r=this.href.slice(0,s+1)}return this.#r}toString(){return this.href}toJSON(){return this.href}};return z(e.prototype,t.prototype,"_url"),Object.setPrototypeOf(e.prototype,t.prototype),Object.setPrototypeOf(e,t),e})(),b=(()=>{const t=globalThis.Response,e=globalThis.process?.getBuiltinModule?.("node:http")?.STATUS_CODES||{};class n{#t;#e;#r;#s;constructor(r,o){this.#t=r,this.#e=o}static[Symbol.hasInstance](r){return r instanceof t}get status(){return this.#s?.status||this.#e?.status||200}get statusText(){return this.#s?.statusText||this.#e?.statusText||e[this.status]||""}get headers(){if(this.#s)return this.#s.headers;if(this.#r)return this.#r;const r=this.#e?.headers;return this.#r=r instanceof Headers?r:new Headers(r)}get ok(){if(this.#s)return this.#s.ok;const r=this.status;return r>=200&&r<300}get _response(){return this.#s?this.#s:(this.#s=new t(this.#t,this.#r?{...this.#e,headers:this.#r}:this.#e),this.#e=void 0,this.#r=void 0,this.#t=void 0,this.#s)}_toNodeResponse(){const r=this.status,o=this.statusText;let i,a,h;this.#s?i=this.#s.body:this.#t&&(this.#t instanceof ReadableStream?i=this.#t:typeof this.#t=="string"?(i=this.#t,a="text/plain; charset=UTF-8",h=Buffer.byteLength(this.#t)):this.#t instanceof ArrayBuffer?(i=Buffer.from(this.#t),h=this.#t.byteLength):this.#t instanceof Uint8Array?(i=this.#t,h=this.#t.byteLength):this.#t instanceof DataView?(i=Buffer.from(this.#t.buffer),h=this.#t.byteLength):this.#t instanceof Blob?(i=this.#t.stream(),a=this.#t.type,h=this.#t.size):typeof this.#t.pipe=="function"?i=this.#t:i=this._response.body);const c=[],u=this.#e?.headers,l=this.#s?.headers||this.#r||(u?Array.isArray(u)?u:u?.entries?u.entries():Object.entries(u).map(([f,d])=>[f.toLowerCase(),d]):void 0);let p,m;if(l)for(const[f,d]of l){if(Array.isArray(d))for(const O of d)c.push([f,O]);else c.push([f,d]);f==="content-type"?p=!0:f==="content-length"&&(m=!0)}return a&&!p&&c.push(["content-type",a]),h&&!m&&c.push(["content-length",String(h)]),this.#e=void 0,this.#r=void 0,this.#s=void 0,this.#t=void 0,{status:r,statusText:o,headers:c,body:i}}}return z(n.prototype,t.prototype,"_response"),Object.setPrototypeOf(n,t),Object.setPrototypeOf(n.prototype,t.prototype),n})(),F="h3.internal.event.",V=Symbol.for(`${F}res`),Z=Symbol.for(`${F}res.headers`);var J=class{app;req;url;context;static __is_event__=!0;constructor(t,e,n){this.context=e||t.context||new D,this.req=t,this.app=n;const s=t._url;this.url=s&&s instanceof URL?s:new Et(t.url)}get res(){return this[V]||=new vt}get runtime(){return this.req.runtime}waitUntil(t){this.req.waitUntil?.(t)}toString(){return`[${this.req.method}] ${this.req.url}`}toJSON(){return this.toString()}get node(){return this.req.runtime?.node}get headers(){return this.req.headers}get path(){return this.url.pathname+this.url.search}get method(){return this.req.method}},vt=class{status;statusText;get headers(){return this[Z]||=new Headers}};const Lt=/[^\u0009\u0020-\u007E]/g;function Nt(t=""){return t.replace(Lt,"")}function At(t,e=200){return!t||(typeof t=="string"&&(t=+t),t<100||t>599)?e:t}var g=class W extends Error{get name(){return"HTTPError"}status;statusText;headers;cause;data;body;unhandled;static isError(e){return e instanceof Error&&e?.name==="HTTPError"}static status(e,n,s){return new W({...s,statusText:n,status:e})}constructor(e,n){let s,r;typeof e=="string"?(s=e,r=n):r=e;const o=At(r?.status||r?.cause?.status||r?.status||r?.statusCode,500),i=Nt(r?.statusText||r?.cause?.statusText||r?.statusText||r?.statusMessage),a=s||r?.message||r?.cause?.message||r?.statusText||r?.statusMessage||["HTTPError",o,i].filter(Boolean).join(" ");super(a,{cause:r}),this.cause=r,Error.captureStackTrace?.(this,this.constructor),this.status=o,this.statusText=i||void 0;const h=r?.headers||r?.cause?.headers;this.headers=h?new Headers(h):void 0,this.unhandled=r?.unhandled??r?.cause?.unhandled??void 0,this.data=r?.data,this.body=r?.body}get statusCode(){return this.status}get statusMessage(){return this.statusText}toJSON(){const e=this.unhandled;return{status:this.status,statusText:this.statusText,unhandled:e,message:e?"HTTPError":this.message,data:e?void 0:this.data,...e?void 0:this.body}}};function Ut(t,e){if(t==null)return!0;if(e!=="object")return e==="boolean"||e==="number"||e==="string";if(typeof t.toJSON=="function"||Array.isArray(t))return!0;if(typeof t.pipe=="function"||typeof t.pipeTo=="function")return!1;if(t instanceof D)return!0;const n=Object.getPrototypeOf(t);return n===Object.prototype||n===null}const H=Symbol.for("h3.notFound"),jt=Symbol.for("h3.handled");function y(t,e,n={}){if(typeof t?.then=="function")return(t.catch?.(o=>o)||Promise.resolve(t)).then(o=>y(o,e,n));const s=G(t,e,n);if(typeof s?.then=="function")return y(s,e,n);const{onResponse:r}=n;return r?Promise.resolve(r(s,e)).then(()=>s):s}var kt=class{#t;#e;body;constructor(t,e){this.body=t,this.#e=e}get status(){return this.#e?.status||200}get statusText(){return this.#e?.statusText||"OK"}get headers(){return this.#t||=new Headers(this.#e?.headers)}};function G(t,e,n,s){if(t===jt)return new b(null);if(t===H&&(t=new g({status:404,message:`Cannot find any route matching [${e.req.method}] ${e.url}`})),t&&t instanceof Error){const i=g.isError(t),a=i?t:new g(t);i||(a.unhandled=!0,t?.stack&&(a.stack=t.stack)),a.unhandled&&!n.silent&&console.error(a);const{onError:h}=n;return h&&!s?Promise.resolve(h(a,e)).catch(c=>c).then(c=>G(c??t,e,n,!0)):Bt(a,n.debug)}const r=e[V],o=r?.[Z];if(!(t instanceof Response)){const i=Ct(t,e,n),a=i.status||r?.status;return new b(j(e.req.method,a)?null:i.body,{status:a,statusText:i.statusText||r?.statusText,headers:i.headers&&o?w(i.headers,o):i.headers||o})}if(!o||s||!t.ok)return t;try{return w(t.headers,o,t.headers),t}catch{return new b(j(e.req.method,t.status)?null:t.body,{status:t.status,statusText:t.statusText,headers:w(t.headers,o)})}}function w(t,e,n=new Headers(t)){for(const[s,r]of e)s==="set-cookie"?n.append(s,r):n.set(s,r);return n}const $t=()=>{throw new Error("Headers are frozen")};var Q=class extends Headers{constructor(t){super(t),this.set=this.append=this.delete=$t}};const It=new Q({"content-length":"0"}),T=new Q({"content-type":"application/json;charset=UTF-8"});function Ct(t,e,n){if(t==null)return{body:"",headers:It};const s=typeof t;if(s==="string")return{body:t};if(t instanceof Uint8Array)return e.res.headers.set("content-length",t.byteLength.toString()),{body:t};if(t instanceof kt||t?.constructor?.name==="HTTPResponse")return t;if(Ut(t,s))return{body:JSON.stringify(t,void 0,n.debug?2:void 0),headers:T};if(s==="bigint")return{body:t.toString(),headers:T};if(t instanceof Blob){const r=new Headers({"content-type":t.type,"content-length":t.size.toString()});let o=t.name;return o&&(o=encodeURIComponent(o),r.set("content-disposition",`filename="${o}"; filename*=UTF-8''${o}`)),{body:t.stream(),headers:r}}return s==="symbol"?{body:t.toString()}:s==="function"?{body:`${t.name}()`}:{body:t}}function j(t,e){return t==="HEAD"||e===100||e===101||e===102||e===204||e===205||e===304}function Bt(t,e){return new b(JSON.stringify({...t.toJSON(),stack:e&&t.stack?t.stack.split(`
|
|
6
6
|
`).map(n=>n.trim()):void 0},void 0,e?2:void 0),{status:t.status,statusText:t.statusText,headers:t.headers?w(T,t.headers):new Headers(T)})}function P(t,e,n,s=0){if(s===e.length)return n(t);const r=e[s];let o,i;const a=()=>(o||(o=!0,i=P(t,e,n,s+1)),i),h=r(t,a);return k(h)?a():typeof h?.then=="function"?h.then(c=>k(c)?a():c):h}function k(t){return t===void 0||t===H}function qt(t,e){if(typeof t=="string"){let n=t;return n[0]==="/"&&(n=`http://localhost${n}`),new Request(n,e)}else if(t instanceof URL)return new Request(t,e);return t}function Y(t){if(typeof t=="function")return $(t);const e=t.handler||(t.fetch?function(s){return t.fetch(s.req)}:K);return Object.assign($(t.middleware?.length?function(s){return P(s,t.middleware,e)}:e),t)}function $(t){return"fetch"in t?t:Object.assign(t,{fetch:e=>{typeof e=="string"&&(e=new URL(e,"http://_")),e instanceof URL&&(e=new Request(e));const n=new J(e);try{return Promise.resolve(y(t(n),n))}catch(s){return Promise.resolve(y(s,n))}}})}function Mt(t){let e,n;const s=()=>e?Promise.resolve(e):n??=Promise.resolve(t()).then(r=>{if(e=x(r)||x(r.default),typeof e!="function")throw new TypeError("Invalid lazy handler",{cause:{resolved:r}});return e});return Y(function(o){return e?e(o):s().then(i=>i(o))})}function x(t){if(typeof t=="function")return t;if(typeof t?.handler=="function")return t.handler;if(typeof t?.fetch=="function")return function(n){return t.fetch(n.req)}}const K=()=>H;var Dt=class{config;"~middleware";"~routes"=[];constructor(t={}){this["~middleware"]=[],this.config=t,this.fetch=this.fetch.bind(this),this.handler=this.handler.bind(this)}fetch(t){return this["~request"](t)}handler(t){const e=this["~findRoute"](t);e&&(t.context.params=e.params,t.context.matchedRoute=e.data);const n=e?.data.handler||K,s=this["~getMiddleware"](t,e);return s.length>0?P(t,s,n):n(t)}"~request"(t,e){const n=new J(t,e,this);let s;try{if(this.config.onRequest){const r=this.config.onRequest(n);s=typeof r?.then=="function"?r.then(()=>this.handler(n)):this.handler(n)}else s=this.handler(n)}catch(r){s=Promise.reject(r)}return y(s,n,this.config)}"~findRoute"(t){}"~addRoute"(t){this["~routes"].push(t)}"~getMiddleware"(t,e){const n=e?.data.middleware,s=this["~middleware"];return n?[...s,...n]:s}};const zt=(t,e)=>{const n=X(t,e);return new St(typeof n.body=="string"?n.body:JSON.stringify(n.body,null,2),n)};function X(t,e,n){const s=t.unhandled,r=t.status||500,o=e.url||new URL(e.req.url);if(r===404&&/^\/[^/]/.test("/")&&!o.pathname.startsWith("/"))return{status:302,statusText:"Found",headers:{location:`/${o.pathname.slice(1)}${o.search}`},body:"Redirecting..."};if(s&&!n?.silent){const h=[t.unhandled&&"[unhandled]"].filter(Boolean).join(" ");console.error(`[request error] ${h} [${e.req.method}] ${o}
|
|
7
|
-
`,t)}const i={"content-type":"application/json","x-content-type-options":"nosniff","x-frame-options":"DENY","referrer-policy":"no-referrer","content-security-policy":"script-src 'none'; frame-ancestors 'none';"};(r===404||!e.res.headers.has("cache-control"))&&(i["cache-control"]="no-cache");const a={error:!0,url:o.href,status:r,statusText:t.statusText,message:s?"Server Error":t.message,data:s?void 0:t.data};return{status:r,statusText:t.statusText,headers:i,body:a}}const Ft=[zt];async function Vt(t,e){for(const n of Ft)try{const s=await n(t,e,{defaultHandler:X});if(s)return s}catch(s){console.error(s)}}const Zt=/%2f/gi;function Jt(t=""){try{return decodeURIComponent(""+t)}catch{return""+t}}function Wt(t){return Jt(t.replace(Zt,"%252F"))}const Gt=/^\.?\//;function Qt(t="",e){return t.endsWith("/")}function Yt(t="",e){return(Qt(t)?t.slice(0,-1):t)||"/"}function Kt(t="",e){return t.endsWith("/")?t:t+"/"}function Xt(t=""){return t.startsWith("/")}function te(t=""){return Xt(t)?t:"/"+t}function ee(t){return t&&t!=="/"}function se(t,...e){let n=t||"";for(const s of e.filter(r=>ee(r)))if(n){const r=s.replace(Gt,"");n=Kt(n)+r}else n=s;return n}const re=(t=>function(n){for(const[s,r]of Object.entries(t.options||{}))n.res.headers.set(s,r)}),E={"/assets/index-Bu1akwRM.js":{type:"text/javascript; charset=utf-8",etag:'"a411d-MGi5M7aJc4kUIk0cxhmS7NHAyVc"',mtime:"2025-12-16T13:
|
|
7
|
+
`,t)}const i={"content-type":"application/json","x-content-type-options":"nosniff","x-frame-options":"DENY","referrer-policy":"no-referrer","content-security-policy":"script-src 'none'; frame-ancestors 'none';"};(r===404||!e.res.headers.has("cache-control"))&&(i["cache-control"]="no-cache");const a={error:!0,url:o.href,status:r,statusText:t.statusText,message:s?"Server Error":t.message,data:s?void 0:t.data};return{status:r,statusText:t.statusText,headers:i,body:a}}const Ft=[zt];async function Vt(t,e){for(const n of Ft)try{const s=await n(t,e,{defaultHandler:X});if(s)return s}catch(s){console.error(s)}}const Zt=/%2f/gi;function Jt(t=""){try{return decodeURIComponent(""+t)}catch{return""+t}}function Wt(t){return Jt(t.replace(Zt,"%252F"))}const Gt=/^\.?\//;function Qt(t="",e){return t.endsWith("/")}function Yt(t="",e){return(Qt(t)?t.slice(0,-1):t)||"/"}function Kt(t="",e){return t.endsWith("/")?t:t+"/"}function Xt(t=""){return t.startsWith("/")}function te(t=""){return Xt(t)?t:"/"+t}function ee(t){return t&&t!=="/"}function se(t,...e){let n=t||"";for(const s of e.filter(r=>ee(r)))if(n){const r=s.replace(Gt,"");n=Kt(n)+r}else n=s;return n}const re=(t=>function(n){for(const[s,r]of Object.entries(t.options||{}))n.res.headers.set(s,r)}),E={"/assets/index-Bu1akwRM.js":{type:"text/javascript; charset=utf-8",etag:'"a411d-MGi5M7aJc4kUIk0cxhmS7NHAyVc"',mtime:"2025-12-16T13:59:08.035Z",size:672029,path:"../public/assets/index-Bu1akwRM.js"},"/assets/index-DcK8FECE.css":{type:"text/css; charset=utf-8",etag:'"120d-IXkTZIZ30b9HPVr3RkIm6wzrQjU"',mtime:"2025-12-16T13:59:08.035Z",size:4621,path:"../public/assets/index-DcK8FECE.css"},"/assets/main-BOWxdROu.js":{type:"text/javascript; charset=utf-8",etag:'"66985-OHbiooowOKhtMXVm47XYQRj3T4k"',mtime:"2025-12-16T13:59:08.035Z",size:420229,path:"../public/assets/main-BOWxdROu.js"},"/assets/roboto-cyrillic-ext-wght-normal-3VVPul60.woff2":{type:"font/woff2",etag:'"8acc-p43USNJU0dZgB+r8qSgPZHGTowE"',mtime:"2025-12-16T13:59:08.035Z",size:35532,path:"../public/assets/roboto-cyrillic-ext-wght-normal-3VVPul60.woff2"},"/assets/roboto-cyrillic-wght-normal-B1tIhOr4.woff2":{type:"font/woff2",etag:'"590c-3/YoL4BWPAntDVhPFf3A/AB4cx8"',mtime:"2025-12-16T13:59:08.035Z",size:22796,path:"../public/assets/roboto-cyrillic-wght-normal-B1tIhOr4.woff2"},"/assets/roboto-greek-ext-wght-normal-DnPa8eh0.woff2":{type:"font/woff2",etag:'"10f4-nCaESMIjcsN3gI/6aVFg3GKvX1w"',mtime:"2025-12-16T13:59:08.035Z",size:4340,path:"../public/assets/roboto-greek-ext-wght-normal-DnPa8eh0.woff2"},"/assets/roboto-greek-wght-normal-iaUSDqqS.woff2":{type:"font/woff2",etag:'"44dc-K7VDABq1du0s8KDJwRMcUBoyucE"',mtime:"2025-12-16T13:59:08.035Z",size:17628,path:"../public/assets/roboto-greek-wght-normal-iaUSDqqS.woff2"},"/assets/roboto-latin-ext-wght-normal-Dqr_DJ6L.woff2":{type:"font/woff2",etag:'"673c-l3kFukQy1ODCTg2j9yrOucBSWYc"',mtime:"2025-12-16T13:59:08.035Z",size:26428,path:"../public/assets/roboto-latin-ext-wght-normal-Dqr_DJ6L.woff2"},"/assets/roboto-latin-wght-normal-CHnqiQTt.woff2":{type:"font/woff2",etag:'"9cc0-jtHVkAPQ2+Y2BIEBe0RmUVNmX74"',mtime:"2025-12-16T13:59:08.035Z",size:40128,path:"../public/assets/roboto-latin-wght-normal-CHnqiQTt.woff2"},"/assets/roboto-math-wght-normal-CBNGtO38.woff2":{type:"font/woff2",etag:'"9ef0-mAra9vmz/nCpVJTrxA3RMVFTM2Y"',mtime:"2025-12-16T13:59:08.035Z",size:40688,path:"../public/assets/roboto-math-wght-normal-CBNGtO38.woff2"},"/assets/roboto-symbols-wght-normal-Bm5C9Z0M.woff2":{type:"font/woff2",etag:'"4fb8-Hvy+6QnOdL8Eh410hn8SoeQa56Q"',mtime:"2025-12-16T13:59:08.035Z",size:20408,path:"../public/assets/roboto-symbols-wght-normal-Bm5C9Z0M.woff2"},"/assets/roboto-vietnamese-wght-normal-24ctNiOc.woff2":{type:"font/woff2",etag:'"32f0-ZIhVt0GRHJoB0P03+ge9WVBdZVA"',mtime:"2025-12-16T13:59:08.035Z",size:13040,path:"../public/assets/roboto-vietnamese-wght-normal-24ctNiOc.woff2"}};function ne(t){const e=it(ot(globalThis.__nitro_main__));return nt.readFile(at(e,E[t].path))}const oe={};function ie(t=""){if(E[t])return!0;for(const e in oe)if(t.startsWith(e))return!0;return!1}function ae(t){return E[t]}const he=new Set(["HEAD","GET"]),ce={gzip:".gz",br:".br"},ue=Y(t=>{if(t.req.method&&!he.has(t.req.method))return;let e=Wt(te(Yt(t.url.pathname))),n;const r=[...(t.req.headers.get("accept-encoding")||"").split(",").map(h=>ce[h.trim()]).filter(Boolean).sort(),""];r.length>1&&t.res.headers.append("Vary","Accept-Encoding");for(const h of r)for(const c of[e+h,se(e,"index.html"+h)]){const u=ae(c);if(u){n=u,e=c;break}}if(!n){if(ie(e))throw t.res.headers.delete("Cache-Control"),new g({status:404});return}if(t.req.headers.get("if-none-match")===n.etag)return t.res.status=304,t.res.statusText="Not Modified","";const i=t.req.headers.get("if-modified-since"),a=new Date(n.mtime);return i&&n.mtime&&new Date(i)>=a?(t.res.status=304,t.res.statusText="Not Modified",""):(n.type&&t.res.headers.set("Content-Type",n.type),n.etag&&!t.res.headers.has("ETag")&&t.res.headers.set("ETag",n.etag),n.mtime&&!t.res.headers.has("Last-Modified")&&t.res.headers.set("Last-Modified",a.toUTCString()),n.encoding&&!t.res.headers.has("Content-Encoding")&&t.res.headers.set("Content-Encoding",n.encoding),n.size>0&&!t.res.headers.has("Content-Length")&&t.res.headers.set("Content-Length",n.size.toString()),ne(e))}),fe=(()=>{const t=[{name:"headers",route:"/assets/**",handler:re,options:{"cache-control":"public, max-age=31536000, immutable"}}];return(e,n)=>{let s=[];n.charCodeAt(n.length-1)===47&&(n=n.slice(0,-1)||"/");let r=n.split("/");return r.length-1,r[1]==="assets"&&s.unshift({data:t,params:{_:r.slice(2).join("/")}}),s}})(),de=Mt(()=>Promise.resolve().then(function(){return xe})),le=(()=>{const t={route:"/**",handler:de};return((e,n)=>({data:t,params:{_:n.slice(1)}}))})(),pe=[x(ue)].filter(Boolean);function v(){return v.__instance__??=me()}function me(){const t=ge();return globalThis.__nitro__=t,t}function ge(){const e=(o,i)=>{if(i?.event){const a=i.event.req.context?.nitro?.errors;a&&a.push({error:o,context:i})}},n=ye({onError(o,i){return Vt(o,i)}});return{fetch:o=>(o.context||={},o.context.nitro=o.context.nitro||{errors:[]},n.fetch(o)),h3:n,hooks:void 0,captureError:e}}function ye(t){const e=new Dt(t);return e["~findRoute"]=n=>le(n.req.method,n.url.pathname),e["~middleware"].push(...pe),e["~getMiddleware"]=(n,s)=>{const r=n.url.pathname,o=n.req.method,i=[];{const a=be(o,r);n.context.routeRules=a?.routeRules,a?.routeRuleMiddleware.length&&i.push(...a.routeRuleMiddleware)}return i.push(...e["~middleware"]),s?.data?.middleware?.length&&i.push(...s.data.middleware),i},e}function be(t,e){const n=fe(t,e);if(!n?.length)return{routeRuleMiddleware:[]};const s={};for(const o of n)for(const i of o.data){const a=s[i.name];if(a){if(i.options===!1){delete s[i.name];continue}typeof a.options=="object"&&typeof i.options=="object"?a.options={...a.options,...i.options}:a.options=i.options,a.route=i.route,a.params={...a.params,...o.params}}else i.options!==!1&&(s[i.name]={...i,params:o.params})}const r=[];for(const o of Object.values(s))o.options===!1||!o.handler||r.push(o.handler(o));return{routeRules:s,routeRuleMiddleware:r}}function I(t,e){console.error(`[${e}]`,t),v().captureError?.(t,{tags:[e]})}function we(){process.on("unhandledRejection",t=>I(t,"unhandledRejection")),process.on("uncaughtException",t=>I(t,"uncaughtException"))}const Te=Number.parseInt(process.env.NITRO_PORT||process.env.PORT||"")||3e3,Se=process.env.NITRO_HOST||process.env.HOST,C=process.env.NITRO_SSL_CERT,B=process.env.NITRO_SSL_KEY,Oe=v();Ht({port:Te,hostname:Se,tls:C&&B?{cert:C,key:B}:void 0,fetch:Oe.fetch});we();const $e={};function _e(t,e,n){const r=(globalThis.__nitro_vite_envs__||{})[t];if(!r)throw g.status(404);return Promise.resolve(r.fetch(qt(e,n)))}function Re({req:t}){return _e("ssr",t)}const xe=Object.freeze({__proto__:null,default:Re});export{D as N,$e as default};
|
package/dist/commands/studio.js
CHANGED
|
@@ -65,7 +65,6 @@ export async function studio() {
|
|
|
65
65
|
];
|
|
66
66
|
const serverEntry = serverEntryCandidates.find((p) => fs.existsSync(p));
|
|
67
67
|
if (serverEntry) {
|
|
68
|
-
console.log(chalk.green('Detected TanStack Start build output.'));
|
|
69
68
|
console.log(chalk.gray(`Starting SSR server from ${serverEntry}`));
|
|
70
69
|
const child = spawn(process.execPath, [serverEntry], {
|
|
71
70
|
env: { ...process.env, PORT: String(port) },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"studio.js","sourceRoot":"","sources":["../../src/commands/studio.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,GAAG,MAAM,UAAU,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,oCAAoC;AACpC,SAAS,WAAW,CAAC,IAAY;IAC/B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,MAAM,MAAM,GAAG,GAAG,CAAC,YAAY,EAAE,CAAA;QACjC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,GAAQ,EAAE,EAAE;YAChC,IAAI,GAAG,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;gBAC9B,OAAO,CAAC,IAAI,CAAC,CAAA;YACf,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,KAAK,CAAC,CAAA;YAChB,CAAC;QACH,CAAC,CAAC,CAAA;QACF,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE;YAC5B,MAAM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