gemi 0.44.0 → 0.44.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  // @bun
2
- import{m as y}from"./chunk-ppt296ye.js";import{createElement as j}from"react";function z(i,n){let t=Object.keys(n).sort((e,s)=>s.length-e.length).map((e)=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),p=new RegExp(t.join("|"),"g");return i.replace(p,(e)=>n[e])}async function W(i,n,t=[]){let p=[...t.map((b)=>`${i}/views/${b}.tsx`),`${i}/views/RootLayout.tsx`],e=new Set;for(let b of p){let u=n.moduleGraph.getModulesByFile(b);if(u)for(let g of u)e.add(g)}let s=[],r=[],c={};for(let b of e)if(b)for(let u of b.importedModules){if(u.file.includes("module.css"))c[u.file]=u.ssrTransformResult.map.sourcesContent.join("");if(u.file.includes(".css"))r.push(u.file)}for(let b of r){let u=await n.transformRequest(b+"?direct"),g=b.includes("module.css"),h="";if(g)h=z(c[b],u.default);s.push({isDev:!0,id:b,content:g?h:u.code})}return s.map((b,u)=>{return j("style",{key:u,type:"text/css","data-vite-dev-id":b.id,dangerouslySetInnerHTML:{__html:b.content}})})}async function X(i=[]){return i.map((n,t)=>{return j("style",{key:t,id:n?.id,type:"text/css",dangerouslySetInnerHTML:{__html:n.content}})})}import{existsSync as T}from"fs";import{basename as a}from"path";import{networkInterfaces as q}from"os";var v={name:"gemi",version:"0.44.0",private:!1,license:"MIT",author:"Enes Tufekci <enes@gemijs.dev>",repository:{type:"git",url:"git+https://github.com/nstfkc/gemi.git",directory:"packages/gemi"},bin:{gemi:"./dist/bin/gemi.js"},files:["dist/**/*"],module:!0,exports:{"./http":"./http/index.ts","./client":"./client/index.ts","./app":"./app/index.ts","./facades":"./facades/index.ts","./email":"./email/index.ts","./vite":"./dist/vite/index.mjs","./runtime":"./client/runtime.ts","./kernel":"./kernel/index.ts","./services":"./services/index.ts","./broadcasting":"./broadcasting/index.ts","./i18n":"./i18n/index.ts","./server":"./server/index.ts","./config":"./config/index.ts","./bun/preload":"./bun/preload.ts","./bun/plugin":"./bun/plugin.ts"},scripts:{lint:"oxlint",build:"NODE_ENV=production bun run build:core && bun run build:bin && bun run build:types && bun run build:client && bun run build:plugin && bun run build:client-types","build:core":"bun ./scripts/build.ts","build:bin":"bun build --outdir=./dist/bin --target=bun --external=vite --external=react-dom --external=react/jsx-runtime --external=bun --external=sharp --external=@azure/storage-blob --sourcemap ./bin/gemi.ts && bun ./scripts/prepare-bin.ts","build:client":"vite build -c vite.client.config.mts","build:plugin":"vite build -c vite.plugin.config.mts","build:types":"tsc","build:client-types":"tsc -p tsconfig.browser.json",test:"vitest","test:types":"vitest run --typecheck.only","build:publish":"bun scripts/build-publish.ts",prepublishOnly:"echo 'Do not publish from this directory \u2014 its exports point at TS source. Run: bun run build:publish, then publish from .publish/' && exit 1"},dependencies:{"@aws-sdk/client-s3":"^3.629.0","@aws-sdk/s3-request-presigner":"^3.629.0","@prisma/client":"^6.4.1","ast-types":"^0.14.2",commander:"^12.1.0",history:"^5.3.0","jsx-email":"2.0.0-rc2.1",open:"^10.1.0","react-error-boundary":"^6.0.0",recast:"^0.23.9",resend:"^6.12.3",satori:"^0.12.2","temporal-polyfill":"^0.2.5","twitter-api-v2":"^1.20.2","urlpattern-polyfill":"^10.0.0",uuid:"^9.0.1"},devDependencies:{"@babel/parser":"^7.25.4","@repo/typescript-config":"*","@types/bun":"^1.3.14","@types/eslint":"^8.56.5","@types/node":"^20.11.24","@types/react":"^19.0.2","@types/react-dom":"^19.0.2",eslint:"^8.57.0",oxlint:"^1.39.0",react:"19.2.3","react-dom":"19.2.3",typescript:"^5.7.3",vitest:"^4.0.0"},peerDependencies:{"@azure/storage-blob":"^12.28.0",react:">=19","react-dom":">=19",sharp:"^0.34.2",vite:"^8.0.0"},peerDependenciesMeta:{"@azure/storage-blob":{optional:!0}}};var _=[" \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557\u2588\u2588\u2557","\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551","\u2588\u2588\u2551 \u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2554\u2588\u2588\u2588\u2588\u2554\u2588\u2588\u2551\u2588\u2588\u2551","\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551\u255A\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2551","\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u255A\u2550\u255D \u2588\u2588\u2551\u2588\u2588\u2551"," \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D"],k=Boolean(process.stdout.isTTY)&&!process.env.NO_COLOR,l=(i,n)=>k?`\x1B[${i}m${n}\x1B[0m`:n,G=(i)=>l("1",i),d=(i)=>l("2",i),x=(i)=>l("36",i),H=(i)=>l("32",i),J=(i)=>l("35",i);function L(){return v.version??"?"}function N(i){for(let n of Object.values(q()))for(let t of n??[])if((t.family==="IPv4"||t.family===4)&&!t.internal)return`http://${t.address}:${i}`;return null}function Q(i){return y(i).filter((n)=>T(n)).map((n)=>a(n))}function I(i){let{port:n,rootDir:t}=i,p=`http://localhost:${n}`,e=N(n),s=Q(t),r=(b,u)=>` ${H("\u279C")} ${G(b.padEnd(9))}${u}`,c=["",..._.map((b)=>J(b)),"",` ${d("gemi")} ${x(`v${L()}`)}`,"",r("Local:",x(p)),r("Network:",e?x(e):d("unavailable")),r("Env:",s.length?s.join(", "):d("none")),""];console.log(c.join(`
2
+ import{m as y}from"./chunk-ppt296ye.js";import{createElement as j}from"react";function z(i,n){let t=Object.keys(n).sort((e,s)=>s.length-e.length).map((e)=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),p=new RegExp(t.join("|"),"g");return i.replace(p,(e)=>n[e])}async function W(i,n,t=[]){let p=[...t.map((b)=>`${i}/views/${b}.tsx`),`${i}/views/RootLayout.tsx`],e=new Set;for(let b of p){let u=n.moduleGraph.getModulesByFile(b);if(u)for(let g of u)e.add(g)}let s=[],r=[],c={};for(let b of e)if(b)for(let u of b.importedModules){if(u.file.includes("module.css"))c[u.file]=u.ssrTransformResult.map.sourcesContent.join("");if(u.file.includes(".css"))r.push(u.file)}for(let b of r){let u=await n.transformRequest(b+"?direct"),g=b.includes("module.css"),h="";if(g)h=z(c[b],u.default);s.push({isDev:!0,id:b,content:g?h:u.code})}return s.map((b,u)=>{return j("style",{key:u,type:"text/css","data-vite-dev-id":b.id,dangerouslySetInnerHTML:{__html:b.content}})})}async function X(i=[]){return i.map((n,t)=>{return j("style",{key:t,id:n?.id,type:"text/css",dangerouslySetInnerHTML:{__html:n.content}})})}import{existsSync as T}from"fs";import{basename as a}from"path";import{networkInterfaces as q}from"os";var v={name:"gemi",version:"0.44.1",private:!1,license:"MIT",author:"Enes Tufekci <enes@gemijs.dev>",repository:{type:"git",url:"git+https://github.com/nstfkc/gemi.git",directory:"packages/gemi"},bin:{gemi:"./dist/bin/gemi.js"},files:["dist/**/*"],module:!0,exports:{"./http":"./http/index.ts","./client":"./client/index.ts","./app":"./app/index.ts","./facades":"./facades/index.ts","./email":"./email/index.ts","./vite":"./dist/vite/index.mjs","./runtime":"./client/runtime.ts","./kernel":"./kernel/index.ts","./services":"./services/index.ts","./broadcasting":"./broadcasting/index.ts","./i18n":"./i18n/index.ts","./server":"./server/index.ts","./config":"./config/index.ts","./bun/preload":"./bun/preload.ts","./bun/plugin":"./bun/plugin.ts"},scripts:{lint:"oxlint",build:"NODE_ENV=production bun run build:core && bun run build:bin && bun run build:types && bun run build:client && bun run build:plugin && bun run build:client-types","build:core":"bun ./scripts/build.ts","build:bin":"bun build --outdir=./dist/bin --target=bun --external=vite --external=react-dom --external=react/jsx-runtime --external=bun --external=sharp --external=@azure/storage-blob --sourcemap ./bin/gemi.ts && bun ./scripts/prepare-bin.ts","build:client":"vite build -c vite.client.config.mts","build:plugin":"vite build -c vite.plugin.config.mts","build:types":"tsc","build:client-types":"tsc -p tsconfig.browser.json",test:"vitest","test:types":"vitest run --typecheck.only","build:publish":"bun scripts/build-publish.ts",prepublishOnly:"echo 'Do not publish from this directory \u2014 its exports point at TS source. Run: bun run build:publish, then publish from .publish/' && exit 1"},dependencies:{"@aws-sdk/client-s3":"^3.629.0","@aws-sdk/s3-request-presigner":"^3.629.0","@prisma/client":"^6.4.1","ast-types":"^0.14.2",commander:"^12.1.0",history:"^5.3.0","jsx-email":"2.0.0-rc2.1",open:"^10.1.0","react-error-boundary":"^6.0.0",recast:"^0.23.9",resend:"^6.12.3",satori:"^0.12.2","temporal-polyfill":"^0.2.5","twitter-api-v2":"^1.20.2","urlpattern-polyfill":"^10.0.0",uuid:"^9.0.1"},devDependencies:{"@babel/parser":"^7.25.4","@repo/typescript-config":"*","@types/bun":"^1.3.14","@types/eslint":"^8.56.5","@types/node":"^20.11.24","@types/react":"^19.0.2","@types/react-dom":"^19.0.2",eslint:"^8.57.0",oxlint:"^1.39.0",react:"19.2.3","react-dom":"19.2.3",typescript:"^5.7.3",vitest:"^4.0.0"},peerDependencies:{"@azure/storage-blob":"^12.28.0",react:">=19","react-dom":">=19",sharp:"^0.34.2",vite:"^8.0.0"},peerDependenciesMeta:{"@azure/storage-blob":{optional:!0}}};var _=[" \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557\u2588\u2588\u2557","\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551","\u2588\u2588\u2551 \u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2554\u2588\u2588\u2588\u2588\u2554\u2588\u2588\u2551\u2588\u2588\u2551","\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551\u255A\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2551","\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u255A\u2550\u255D \u2588\u2588\u2551\u2588\u2588\u2551"," \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D"],k=Boolean(process.stdout.isTTY)&&!process.env.NO_COLOR,l=(i,n)=>k?`\x1B[${i}m${n}\x1B[0m`:n,G=(i)=>l("1",i),d=(i)=>l("2",i),x=(i)=>l("36",i),H=(i)=>l("32",i),J=(i)=>l("35",i);function L(){return v.version??"?"}function N(i){for(let n of Object.values(q()))for(let t of n??[])if((t.family==="IPv4"||t.family===4)&&!t.internal)return`http://${t.address}:${i}`;return null}function Q(i){return y(i).filter((n)=>T(n)).map((n)=>a(n))}function I(i){let{port:n,rootDir:t}=i,p=`http://localhost:${n}`,e=N(n),s=Q(t),r=(b,u)=>` ${H("\u279C")} ${G(b.padEnd(9))}${u}`,c=["",..._.map((b)=>J(b)),"",` ${d("gemi")} ${x(`v${L()}`)}`,"",r("Local:",x(p)),r("Network:",e?x(e):d("unavailable")),r("Env:",s.length?s.join(", "):d("none")),""];console.log(c.join(`
3
3
  `))}
4
4
  export{W as g,X as h,I as i};
5
5
 
6
- //# debugId=7AC21DDB17FC70C564756E2164756E21
6
+ //# debugId=F3EB9E544704305464756E2164756E21
@@ -6,6 +6,6 @@
6
6
  "import { existsSync } from \"node:fs\";\nimport { basename } from \"node:path\";\nimport { networkInterfaces } from \"node:os\";\nimport { envFiles } from \"./watchEnv\";\nimport pkg from \"../package.json\";\n\n// \"GEMI\" — ANSI Shadow figlet font.\nconst ART = [\n \" ██████╗ ███████╗███╗ ███╗██╗\",\n \"██╔════╝ ██╔════╝████╗ ████║██║\",\n \"██║ ███╗█████╗ ██╔████╔██║██║\",\n \"██║ ██║██╔══╝ ██║╚██╔╝██║██║\",\n \"╚██████╔╝███████╗██║ ╚═╝ ██║██║\",\n \" ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝\",\n];\n\nconst useColor = Boolean(process.stdout.isTTY) && !process.env.NO_COLOR;\nconst paint = (code: string, text: string) =>\n useColor ? `\\x1b[${code}m${text}\\x1b[0m` : text;\nconst bold = (t: string) => paint(\"1\", t);\nconst dim = (t: string) => paint(\"2\", t);\nconst cyan = (t: string) => paint(\"36\", t);\nconst green = (t: string) => paint(\"32\", t);\nconst magenta = (t: string) => paint(\"35\", t);\n\nfunction gemiVersion(): string {\n return (pkg as { version?: string }).version ?? \"?\";\n}\n\nfunction networkUrl(port: number | string): string | null {\n for (const ifaces of Object.values(networkInterfaces())) {\n for (const iface of ifaces ?? []) {\n // Node <18 reported `family` as the number 4; newer Bun/Node use \"IPv4\".\n const isV4 = iface.family === \"IPv4\" || (iface.family as unknown) === 4;\n if (isV4 && !iface.internal) return `http://${iface.address}:${port}`;\n }\n }\n return null;\n}\n\nfunction loadedEnvFiles(rootDir: string): string[] {\n return envFiles(rootDir)\n .filter((file) => existsSync(file))\n .map((file) => basename(file));\n}\n\nexport function printStartupBanner(params: {\n port: number | string;\n rootDir: string;\n}) {\n const { port, rootDir } = params;\n const local = `http://localhost:${port}`;\n const network = networkUrl(port);\n const env = loadedEnvFiles(rootDir);\n\n const row = (label: string, value: string) =>\n ` ${green(\"➜\")} ${bold(label.padEnd(9))}${value}`;\n\n const out = [\n \"\",\n ...ART.map((line) => magenta(line)),\n \"\",\n ` ${dim(\"gemi\")} ${cyan(`v${gemiVersion()}`)}`,\n \"\",\n row(\"Local:\", cyan(local)),\n row(\"Network:\", network ? cyan(network) : dim(\"unavailable\")),\n row(\"Env:\", env.length ? env.join(\", \") : dim(\"none\")),\n \"\",\n ];\n\n console.log(out.join(\"\\n\"));\n}\n"
7
7
  ],
8
8
  "mappings": "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",
9
- "debugId": "7AC21DDB17FC70C564756E2164756E21",
9
+ "debugId": "F3EB9E544704305464756E2164756E21",
10
10
  "names": []
11
11
  }
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{h as g,i as R}from"./chunk-7yrykpak.js";import"./chunk-ppt296ye.js";import{J as K,L as W}from"./chunk-q8haepmm.js";import"./chunk-fk9xtngd.js";import"./chunk-ty3q916e.js";import"./chunk-whj1a3vr.js";import"./chunk-sdx8r2qb.js";import"./chunk-6gtmkbh0.js";import{join as j}from"path";function V(J){let x=J.toString(),Q=new Bun.CryptoHasher("sha1");return Q.update(x),Q.digest("hex")}if(!globalThis.URLPattern)globalThis.URLPattern=K;import{exists as v}from"fs/promises";var u=process.env.GEMI_PROJECT_DIR??"",T=j(process.cwd(),u),F=j(T,"app"),$=j(T,"dist");async function a(J,x){let Q=await import(`${$}/client/.vite/manifest.json`),O=await import(`${$}/server/.vite/manifest.json`);process.env.ROOT_DIR=T,process.env.APP_DIR=F,process.env.DIST_DIR=$;let A={},C={},I={},S=(b,L)=>`"${b}": () => import("${L}")`,_=[];for(let b of["404",...J.getFlatComponentTree.call(J)]){let L=O[`app/views/${b}.tsx`];if(!L?.file){console.log(`Server file not found for ${b}`),console.log(L);let U=Object.keys(O),Y=`app/views/${b}.tsx`;console.log(`${Y} not found in server manifest`),console.log(U)}let z=await import(`${process.env.DIST_DIR}/server/${L?.file}`);A[b]=z.default,C[b]=z.OpenGraph;let k=Q[`app/views/${b}.tsx`];if(k?.css&&k?.css.length>0)I[b]=k?.css;if(k)_.push(S(b,`/${k?.file}`))}let N=`{${_.join(",")}}`,w=Q["app/client.tsx"]?.css??[],M=(await Promise.all(w.map((b)=>Bun.file(`${$}/client/${b}`).text()))).join(`
2
+ import{h as g,i as R}from"./chunk-fksvw2gz.js";import"./chunk-ppt296ye.js";import{J as K,L as W}from"./chunk-q8haepmm.js";import"./chunk-fk9xtngd.js";import"./chunk-ty3q916e.js";import"./chunk-whj1a3vr.js";import"./chunk-sdx8r2qb.js";import"./chunk-6gtmkbh0.js";import{join as j}from"path";function V(J){let x=J.toString(),Q=new Bun.CryptoHasher("sha1");return Q.update(x),Q.digest("hex")}if(!globalThis.URLPattern)globalThis.URLPattern=K;import{exists as v}from"fs/promises";var u=process.env.GEMI_PROJECT_DIR??"",T=j(process.cwd(),u),F=j(T,"app"),$=j(T,"dist");async function a(J,x){let Q=await import(`${$}/client/.vite/manifest.json`),O=await import(`${$}/server/.vite/manifest.json`);process.env.ROOT_DIR=T,process.env.APP_DIR=F,process.env.DIST_DIR=$;let A={},C={},I={},S=(b,L)=>`"${b}": () => import("${L}")`,_=[];for(let b of["404",...J.getFlatComponentTree.call(J)]){let L=O[`app/views/${b}.tsx`];if(!L?.file){console.log(`Server file not found for ${b}`),console.log(L);let U=Object.keys(O),Y=`app/views/${b}.tsx`;console.log(`${Y} not found in server manifest`),console.log(U)}let z=await import(`${process.env.DIST_DIR}/server/${L?.file}`);A[b]=z.default,C[b]=z.OpenGraph;let k=Q[`app/views/${b}.tsx`];if(k?.css&&k?.css.length>0)I[b]=k?.css;if(k)_.push(S(b,`/${k?.file}`))}let N=`{${_.join(",")}}`,w=Q["app/client.tsx"]?.css??[],M=(await Promise.all(w.map((b)=>Bun.file(`${$}/client/${b}`).text()))).join(`
3
3
  `),D=new K({pathname:"/*.:filetype(png|txt|js|css|jpg|svg|jpeg|avif|webp|ico|ttf|map)"});async function E(b){let{pathname:L}=new URL(b.url),z=L.startsWith("/.well-known"),k=D.test({pathname:L})||z,U=L.startsWith("/api");if(k&&!U){let Y=new URL(b.url),B=b.url.replace(Y.origin,"").split("?")[0],Z=`${$}/client${B.replace("/assets/assets","/assets")}`,H=await v(Z);if(!H&&Y.pathname.includes(".js"))return new Response(`if(caches){caches?.delete("${Z}")}window.location.reload();export {}`,{headers:{"Content-Type":"application/javascript"}});if(!H){if(L===W||L.startsWith(`${W}/`))return new Response("Not found",{status:404});return await y(b,L)}try{let G=Bun.file(Z),X=V(G.lastModified);return new Response(G.stream(),{headers:{"Content-Type":G.type,"Cache-Control":"public, max-age=31536000, must-revalidate","Content-Length":String(G.size),ETag:X}})}catch(G){return J.onException?.(G),new Response("Not found",{status:404})}}return await y(b,L)}async function y(b,L){let z=J.fetch.bind(J);try{let k=await z(b);if(k instanceof Response)return k;else{let U=[];return U.push({content:M}),await k({getStyles:async(B)=>{if(!B)return g([]);for(let Z of B){let H=Q[`app/views/${Z}.tsx`];for(let G of H?.css??[]){let X=Bun.file(`${process.env.DIST_DIR}/client/${G}`);U.push({id:G,content:await X.text()})}}return g(U)},bootstrapModules:[`/${Q["app/client.tsx"].file}`],loaders:N,viewImportMap:A,ogMap:C,cssManifest:I})}}catch(k){if(console.error(k),L.startsWith("/api"))return new Response(JSON.stringify({error:k.message}),{status:500,headers:{"Content-Type":"application/json"}});return J.onException?.(k),new Response(k.stack,{status:500})}}let P=Bun.serve({maxRequestBodySize:10737418240,fetch:async(b,L)=>{if(!b.headers.get("x-forwarded-for")){let z=L.requestIP(b);if(z)b.headers.set("x-forwarded-for",z.address)}return await x(b,E)},idleTimeout:Number(process.env.SERVER_IDLE_TIMEOUT??10),port:process.env.PORT||5173});return R({port:P.port,rootDir:T}),P}export{a as httpProd};
4
4
 
5
5
  //# debugId=98F8FC0BCA71CCB764756E2164756E21
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{g as I,i as f}from"./chunk-7yrykpak.js";import{j as b,k as y}from"./chunk-ghes36xj.js";import"./chunk-vv72kw74.js";import"./chunk-ppt296ye.js";import"./chunk-m359awjw.js";import"./chunk-q8haepmm.js";import"./chunk-fk9xtngd.js";import"./chunk-ty3q916e.js";import"./chunk-9r2k5ykk.js";import"./chunk-whj1a3vr.js";import"./chunk-sdx8r2qb.js";import"./chunk-6gtmkbh0.js";import{IncomingMessage as w,ServerResponse as N}from"http";import{Socket as T}from"net";import{join as g}from"path";import{createServer as E}from"vite";function S(H){return H.replace(/\x1b\[[0-9;]*m/g,"").replace(/\[[0-9;]*m/g,"").replace(/\n\s*\n/g,`
2
+ import{g as I,i as f}from"./chunk-fksvw2gz.js";import{j as b,k as y}from"./chunk-ghes36xj.js";import"./chunk-vv72kw74.js";import"./chunk-ppt296ye.js";import"./chunk-m359awjw.js";import"./chunk-q8haepmm.js";import"./chunk-fk9xtngd.js";import"./chunk-ty3q916e.js";import"./chunk-9r2k5ykk.js";import"./chunk-whj1a3vr.js";import"./chunk-sdx8r2qb.js";import"./chunk-6gtmkbh0.js";import{IncomingMessage as w,ServerResponse as N}from"http";import{Socket as T}from"net";import{join as g}from"path";import{createServer as E}from"vite";function S(H){return H.replace(/\x1b\[[0-9;]*m/g,"").replace(/\[[0-9;]*m/g,"").replace(/\n\s*\n/g,`
3
3
  `).split(`
4
4
  `).map((J)=>J.trim()).filter((J)=>J.length>0).join(`
5
5
  `).trim()}function P(H){return`