gemi 0.45.0 → 0.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/index.js +1 -1
- package/dist/bin/gemi.js +185 -49
- package/dist/bin/gemi.js.map +10 -7
- package/dist/{chunk-tvp3xgfq.js → chunk-3ervqphj.js} +2 -2
- package/dist/{chunk-tvp3xgfq.js.map → chunk-3ervqphj.js.map} +1 -1
- package/dist/{chunk-v0qh5dqv.js → chunk-5hggqap1.js} +15 -15
- package/dist/{chunk-v0qh5dqv.js.map → chunk-5hggqap1.js.map} +3 -3
- package/dist/chunk-d9k245jt.js +79 -0
- package/dist/{chunk-jxpwexpz.js.map → chunk-d9k245jt.js.map} +8 -5
- package/dist/chunk-evkv0xa7.js +4 -0
- package/dist/{chunk-atv6nybp.js.map → chunk-evkv0xa7.js.map} +4 -4
- package/dist/{chunk-396qq8ge.js → chunk-qmsngk2y.js} +1 -1
- package/dist/{chunk-ppn0j67g.js → chunk-r64ba1pf.js} +1 -1
- package/dist/{chunk-63gmzy5r.js → chunk-zp9ybbp6.js} +1 -1
- package/dist/client/ClientRouter.d.ts.map +1 -1
- package/dist/client/Head.d.ts.map +1 -1
- package/dist/client/QueryManagerContext.d.ts +5 -2
- package/dist/client/QueryManagerContext.d.ts.map +1 -1
- package/dist/client/QueryResource.d.ts +23 -1
- package/dist/client/QueryResource.d.ts.map +1 -1
- package/dist/client/helpers/mergeCarriedSegments.d.ts +23 -0
- package/dist/client/helpers/mergeCarriedSegments.d.ts.map +1 -0
- package/dist/client/index.js +173 -27
- package/dist/client/index.js.map +1 -1
- package/dist/client/useQuery.d.ts +2 -0
- package/dist/client/useQuery.d.ts.map +1 -1
- package/dist/facades/index.js +1 -1
- package/dist/http/Metadata.d.ts +6 -0
- package/dist/http/Metadata.d.ts.map +1 -1
- package/dist/http/ViewRouter.d.ts +12 -0
- package/dist/http/ViewRouter.d.ts.map +1 -1
- package/dist/http/index.js +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/kernel/index.js +1 -1
- package/dist/server/index.js +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/router/ViewRouterServiceContainer.d.ts.map +1 -1
- package/dist/services/router/ViewRouterServiceProvider.d.ts +10 -0
- package/dist/services/router/ViewRouterServiceProvider.d.ts.map +1 -1
- package/dist/services/router/createFlatViewRoutes.d.ts +16 -0
- package/dist/services/router/createFlatViewRoutes.d.ts.map +1 -1
- package/dist/services/router/matchViewRoute.d.ts +12 -0
- package/dist/services/router/matchViewRoute.d.ts.map +1 -0
- package/dist/services/router/planPartialRender.d.ts +43 -0
- package/dist/services/router/planPartialRender.d.ts.map +1 -0
- package/dist/utils/partialRender.d.ts +28 -0
- package/dist/utils/partialRender.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-atv6nybp.js +0 -4
- package/dist/chunk-jxpwexpz.js +0 -79
- /package/dist/{chunk-396qq8ge.js.map → chunk-qmsngk2y.js.map} +0 -0
- /package/dist/{chunk-ppn0j67g.js.map → chunk-r64ba1pf.js.map} +0 -0
- /package/dist/{chunk-63gmzy5r.js.map → chunk-zp9ybbp6.js.map} +0 -0
|
@@ -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.
|
|
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.46.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(`
|
|
3
3
|
`))}
|
|
4
4
|
export{W as g,X as h,I as i};
|
|
5
5
|
|
|
6
|
-
//# debugId=
|
|
6
|
+
//# debugId=647CE11009C57C5964756E2164756E21
|
|
@@ -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": ";wCAAA,wBAAS,cAGT,SAAS,CAAc,CAAC,EAAc,EAAwC,CAC5E,IAAM,EAAc,OAAO,KAAK,CAAM,EACnC,KAAK,CAAC,EAAG,IAAM,EAAE,OAAS,EAAE,MAAM,EAClC,IAAI,CAAC,IAAQ,EAAI,QAAQ,sBAAuB,MAAM,CAAC,EAGpD,EAAQ,IAAI,OAAO,EAAY,KAAK,GAAG,EAAG,GAAG,EAEnD,OAAO,EAAK,QAAQ,EAAO,CAAC,IAAU,EAAO,EAAM,EAGrD,eAAsB,CAAe,CACnC,EACA,EACA,EAAyB,CAAC,EAC1B,CACA,IAAM,EAAQ,CACZ,GAAG,EAAa,IAAI,CAAC,IAAS,GAAG,WAAgB,OAAU,EAC3D,GAAG,wBACL,EAEM,EAAU,IAAI,IACpB,QAAW,KAAQ,EAAO,CACxB,IAAM,EAAM,EAAK,YAAY,iBAAiB,CAAI,EAClD,GAAI,EACF,QAAW,KAAK,EAAK,EAAQ,IAAI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