create-tezx-app 4.0.7 → 4.0.9

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.
Files changed (2) hide show
  1. package/bin +53 -52
  2. package/package.json +1 -1
package/bin CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { execSync as B } from "node:child_process"; import { mkdirSync as S, writeFileSync as q } from "node:fs"; import k, { join as V, resolve as J } from "node:path"; import W from "node:readline"; var p = (n, s) => ({ version: s, npm: ["npm install", n], bun: ["bun add", n], yarn: ["yarn add", n], pnpm: ["pnpm add", n] }); var $ = {
2
+ var O = Object.defineProperty; var c = (o, s) => O(o, "name", { value: s, configurable: !0 }); import { execSync as j } from "node:child_process"; import { mkdirSync as v, writeFileSync as h } from "node:fs"; import k, { join as g, resolve as A } from "node:path"; import T from "node:readline"; const d = c((o, s) => ({ version: s, npm: ["npm install", o], bun: ["bun add", o], yarn: ["yarn add", o], pnpm: ["pnpm add", o] }), "packageManagerCommands"), I = {
3
3
  readme: `
4
4
  # \u{1F510} GitHub OAuth2 Example for TezX
5
5
 
@@ -21,7 +21,7 @@ This example demonstrates how to implement GitHub OAuth2 login using \`@tezx/git
21
21
  ### 1. Install the required package
22
22
 
23
23
  \`\`\`bash
24
- ${Object.values(p("@tezx/github-oauth2", "^1.0.9"))?.filter(n => typeof n != "string")?.join(`
24
+ ${Object.values(d("@tezx/github-oauth2", "^1.0.9"))?.filter(o => typeof o != "string")?.join(`
25
25
  #or
26
26
  `)}
27
27
  \`\`\`
@@ -125,8 +125,8 @@ app.get('/github/callback', verifyGithubToken({
125
125
  `.trim(), files: [{
126
126
  content: `GITHUB_CLIENT_ID=12323
127
127
  GITHUB_CLIENT_SECRET=234234`, path: ".env"
128
- }], import: ["import { GitHubOauthClient, getGithubOAuthURL, verifyGithubToken } from '@tezx/github-oauth2';"], package: [p("@tezx/github-oauth2", "^1.0.9")]
129
- }; var C = {
128
+ }], import: ["import { GitHubOauthClient, getGithubOAuthURL, verifyGithubToken } from '@tezx/github-oauth2';"], package: [d("@tezx/github-oauth2", "^1.0.9")]
129
+ }, G = {
130
130
  readme: `
131
131
  # \u{1F510} Google OAuth2 Example for TezX
132
132
 
@@ -150,12 +150,12 @@ This example demonstrates how to use \`@tezx/google-oauth2\` to implement Google
150
150
  Choose your package manager and install:
151
151
 
152
152
  \`\`\`bash
153
- ${Object.values(p("@tezx/google-oauth2", "^1.0.13")).filter(n => typeof n != "string").join(`
153
+ ${Object.values(d("@tezx/google-oauth2", "^1.0.13")).filter(o => typeof o != "string").join(`
154
154
  # or
155
155
  `)}
156
156
 
157
157
  # Plus Google OAuth SDK
158
- ${Object.values(p("@googleapis/oauth2", "^2.0.1")).filter(n => typeof n != "string").join(`
158
+ ${Object.values(d("@googleapis/oauth2", "^2.0.1")).filter(o => typeof o != "string").join(`
159
159
  # or
160
160
  `)}
161
161
  \`\`\`
@@ -288,8 +288,8 @@ app.get('/auth/callback', verifyGoogleToken({
288
288
  content: `GOOGLE_CLIENT_ID=12323
289
289
  GOOGLE_CLIENT_SECRET=234234
290
290
  `, path: ".env"
291
- }], import: ['import { GoogleOauthClient, getGoogleOAuthURL, verifyGoogleToken } from "@tezx/google-oauth2";'], package: [p("@tezx/google-oauth2", "^1.0.13"), p("@googleapis/oauth2", "^2.0.1")]
292
- }; var O = {
291
+ }], import: ['import { GoogleOauthClient, getGoogleOAuthURL, verifyGoogleToken } from "@tezx/google-oauth2";'], package: [d("@tezx/google-oauth2", "^1.0.13"), d("@googleapis/oauth2", "^2.0.1")]
292
+ }, R = {
293
293
  readme: `
294
294
  # TezX View Engine Example
295
295
 
@@ -368,8 +368,8 @@ app.get("engine", async (ctx) => {
368
368
  </body>
369
369
  </html>
370
370
  `.trim(), path: "views/home.ejs"
371
- }], import: ['import { ViewEngine } from "@tezx/view-engine";'], package: [p("@tezx/view-engine", "^1.0.3"), p("ejs", "^3.1.10")]
372
- }; var L = `
371
+ }], import: ['import { ViewEngine } from "@tezx/view-engine";'], package: [d("@tezx/view-engine", "^1.0.3"), d("ejs", "^3.1.10")]
372
+ }; let H = `
373
373
  <!DOCTYPE html>
374
374
  <html lang="en">
375
375
  <head>
@@ -534,11 +534,11 @@ app.get("engine", async (ctx) => {
534
534
  appendMessage("Client: ping", "client");
535
535
  }
536
536
  }
537
- </script>
537
+ <\/script>
538
538
  </body>
539
539
  </html>
540
- `, j = {
541
- readme: `
540
+ `; const W = {
541
+ readme: `
542
542
  # \u{1F50C} TezX WebSocket Example
543
543
 
544
544
  This example demonstrates how to set up a WebSocket server using \`upgradeWebSocket\` from \`tezx/ws\`.
@@ -598,7 +598,7 @@ A simple HTML file is included in \`public/ws.html\`:
598
598
  ws.onclose = () => {
599
599
  console.log("Disconnected.");
600
600
  };
601
- </script>
601
+ <\/script>
602
602
  \`\`\`
603
603
 
604
604
  ---
@@ -653,15 +653,15 @@ app.get(
653
653
  return ctx.sendFile("public/ws.html");
654
654
  },
655
655
  );
656
- `.trim(), files: [{ content: L, path: "public/ws.html" }], import: ['import { upgradeWebSocket } from "tezx/ws";']
657
- }; var T = { minimal: { readme: "", content: "", files: [], import: [], package: [] }, ws: j, "github-oauth2": $, "google-oauth2": C, "view-engine": O }; import M from "node:readline"; async function R(n, s, t) {
658
- return new Promise(a => {
659
- let o = 0; M.emitKeypressEvents(process.stdin, n), process.stdin.isTTY && process.stdin.setRawMode(!0); let l = () => {
660
- process.stdout.write("\x1B[2J\x1B[0f"), console.log(s + ` (Use \u2191 \u2193 arrows, Enter to confirm)
661
- `), t.forEach((c, r) => { console.log(`${r === o ? "\u{1F449}" : " "} ${r === o ? "\x1B[36m" : "\x1B[0m"}${c}\x1B[0m`) })
662
- }, i = (c, r) => { if (r.name === "up") o = (o - 1 + t.length) % t.length, l(); else if (r.name === "down") o = (o + 1) % t.length, l(); else if (r.name === "return") return a(t[o]) }; l(), process.stdin.on("keypress", i)
663
- })
664
- } var I = { reset: "\x1B[0m", bold: "\x1B[1m", underline: "\x1B[4m", gray: "\x1B[90m", white: "\x1B[97m", black: "\x1B[30m", red: "\x1B[31m", green: "\x1B[32m", yellow: "\x1B[33m", blue: "\x1B[34m", magenta: "\x1B[35m", cyan: "\x1B[36m", bgRed: "\x1B[41m", bgGreen: "\x1B[42m", bgYellow: "\x1B[43m", bgBlue: "\x1B[44m", bgMagenta: "\x1B[45m", bgCyan: "\x1B[46m", bgWhite: "\x1B[47m", orange: "\x1B[38;2;255;88;30m", bgOrange: "\x1B[48;2;255;88;30m" }; function e(n, s) { return `${I[s]}${n}${I.reset}` } import { mkdirSync as D, writeFileSync as x } from "node:fs"; import { join as d } from "node:path"; var g = "4.0.7"; var U = `
656
+ `.trim(), files: [{ content: H, path: "public/ws.html" }], import: ['import { upgradeWebSocket } from "tezx/ws";']
657
+ }; let C = { minimal: { readme: "", content: "", files: [], import: [], package: [] }, ws: W, "github-oauth2": I, "google-oauth2": G, "view-engine": R }; async function _(o, s, t) {
658
+ return new Promise(a => {
659
+ let n = 0; T.emitKeypressEvents(process.stdin, o), process.stdin.isTTY && process.stdin.setRawMode(!0); const u = c(() => {
660
+ process.stdout.write("\x1B[2J\x1B[0f"), console.log(s + ` (Use \u2191 \u2193 arrows, Enter to confirm)
661
+ `), t.forEach((l, r) => { console.log(`${r === n ? "\u{1F449}" : " "} ${r === n ? "\x1B[36m" : "\x1B[0m"}${l}\x1B[0m`) })
662
+ }, "render"), i = c((l, r) => { if (r.name === "up") n = (n - 1 + t.length) % t.length, u(); else if (r.name === "down") n = (n + 1) % t.length, u(); else if (r.name === "return") return a(t[n]) }, "onKeyPress"); u(), process.stdin.on("keypress", i)
663
+ })
664
+ } c(_, "arrowSelect"); const $ = { reset: "\x1B[0m", bold: "\x1B[1m", underline: "\x1B[4m", gray: "\x1B[90m", white: "\x1B[97m", black: "\x1B[30m", red: "\x1B[31m", green: "\x1B[32m", yellow: "\x1B[33m", blue: "\x1B[34m", magenta: "\x1B[35m", cyan: "\x1B[36m", bgRed: "\x1B[41m", bgGreen: "\x1B[42m", bgYellow: "\x1B[43m", bgBlue: "\x1B[44m", bgMagenta: "\x1B[45m", bgCyan: "\x1B[46m", bgWhite: "\x1B[47m", orange: "\x1B[38;2;255;88;30m", bgOrange: "\x1B[48;2;255;88;30m" }; function e(o, s) { return `${$[s]}${o}${$.reset}` } c(e, "colorText"); const F = "4.0.1"; let D = `
665
665
  # \u26A1 TezX \u2013 High-Performance JavaScript Framework for **Bun**
666
666
 
667
667
  **TezX** is a modern, ultra-fast, and lightweight JavaScript framework built specifically for **Bun**.
@@ -852,8 +852,8 @@ Your support helps improve the framework.
852
852
 
853
853
  ---
854
854
 
855
- `, G = ({ ts: n, template: s, root: t, useStatic: a = !1, staticFolder: o }) => {
856
- let l = d(t, n ? "src/index.ts" : "src/index.js"); D(d(t, "src"), { recursive: !0 }); let i = ""; s?.import?.push('import { wsHandlers } from "tezx/ws";'), i = `
855
+ `, P = c(({ ts: o, template: s, root: t, useStatic: a = !1, staticFolder: n }) => {
856
+ const u = g(t, o ? "src/index.ts" : "src/index.js"); v(g(t, "src"), { recursive: !0 }); let i = ""; s?.import?.push('import { wsHandlers } from "tezx/ws";'), i = `
857
857
  let PORT = Number(process.env.PORT) || 3000;
858
858
  Bun.serve({
859
859
  port: PORT,
@@ -866,26 +866,27 @@ Bun.serve({
866
866
  })
867
867
  });
868
868
  console.log(\`\u{1F680} TezX is running at http://localhost:\${PORT}\`);
869
- `; let c = `
869
+ `; let l = `
870
870
  import { TezX } from "tezx";
871
871
  import { serveStatic } from "tezx/static";
872
872
  import { logger } from "tezx/middleware";
873
873
  ${s?.import?.join(`
874
874
  `)}
875
875
  const app = new TezX({
876
+ debugMode: true,
876
877
  // Additional options
877
878
  });
878
879
  app.use([logger()]);
879
880
 
880
881
  app.get("/", (ctx) => ctx.text("Hello from TezX"));
881
882
 
882
- ${a ? `app.static(serveStatic("${o || "public"}"));` : ""}
883
+ ${a ? `app.static(serveStatic("${n || "public"}"));` : ""}
883
884
  ${s?.content ? `
884
885
  ${s?.content?.trim()}
885
886
  `: ""}
886
887
  ${i}
887
- `; if (n) {
888
- let r = `
888
+ `; if (o) {
889
+ const r = `
889
890
  {
890
891
  "compilerOptions": {
891
892
  "module": "esnext",
@@ -899,10 +900,10 @@ ${i}
899
900
  "include": ["src"],
900
901
  "exclude": ["node_modules", "dist"]
901
902
  }
902
- `.trim(); x(d(t, "tsconfig.json"), r)
903
- } x(l, c.trim())
904
- }, A = ({ template: n, root: s, projectName: t, ts: a, useWS: o, choiceStep: l }) => {
905
- let i = []; Array.isArray(n?.package) && n?.package?.forEach(h => { let { version: b, npm: m } = h || {}; i.push(`"${m?.[1]}": "${b}"`) }); let c = ['"@types/bun": "^1.3.1"']; a && (c.push('"typescript": "^5.8.2"'), c.push('"@types/node": "^22.13.14"')); let r = `
903
+ `.trim(); h(g(t, "tsconfig.json"), r)
904
+ } h(u, l.trim())
905
+ }, "index"), X = c(({ template: o, root: s, projectName: t, ts: a, useWS: n, choiceStep: u }) => {
906
+ let i = []; Array.isArray(o?.package) && o?.package?.forEach(b => { let { version: x, npm: m } = b || {}; i.push(`"${m?.[1]}": "${x}"`) }); let l = ['"@types/bun": "^1.3.1"']; a && (l.push('"typescript": "^5.8.2"'), l.push('"@types/node": "^22.13.14"')); let r = `
906
907
  {
907
908
  "name": "${t || "tezx-app-example"}",
908
909
  "version": "1.0.0",
@@ -925,18 +926,18 @@ ${i}
925
926
  },
926
927
  "homepage": "https://github.com/tezxjs/tezx-app-example",
927
928
  "dependencies": {
928
- "tezx": "^${g}"${i.length ? `,
929
+ "tezx": "^${F}"${i.length ? `,
929
930
  ${i.join(`,
930
931
  `)}` : ""}
931
932
  },
932
933
  "devDependencies": {
933
- ${c.join(`,
934
+ ${l.join(`,
934
935
  `)}
935
936
  }
936
937
  }
937
- `.trim(); x(d(s, "package.json"), r)
938
- }, H = ({ root: n }) => {
939
- let s = `
938
+ `.trim(); h(g(s, "package.json"), r)
939
+ }, "packageJson"); const N = c(({ root: o }) => {
940
+ const s = `
940
941
  # Node dependencies
941
942
  node_modules/
942
943
  .env
@@ -1006,22 +1007,22 @@ Thumbs.db
1006
1007
  .vscode/
1007
1008
  .idea/
1008
1009
  *.swp
1009
- `.trim(); x(d(n, ".gitignore"), s, { encoding: "utf8" })
1010
- }, P = ({ root: n, readme: s }) => { let t = typeof s == "string" && s ? s?.trim() : U.trim(); x(d(n, "README.md"), t, { encoding: "utf8" }) }; var w = ["npm", "bun", "yarn", "pnpm"]; function Y(n) {
1011
- let s = 0, t = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"], a = setInterval(() => { process.stdout.write(`\r${t[s = ++s % t.length]} ${n}`) }, 80); return () => {
1012
- clearInterval(a), process.stdout.write(`\r\u2705 Done!
1010
+ `.trim(); h(g(o, ".gitignore"), s, { encoding: "utf8" })
1011
+ }, "gitignore"), L = c(({ root: o, readme: s }) => { const t = typeof s == "string" && s ? s?.trim() : D.trim(); h(g(o, "README.md"), t, { encoding: "utf8" }) }, "README"); let S = ["npm", "bun", "yarn", "pnpm"]; function M(o) {
1012
+ let s = 0; const t = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"], a = setInterval(() => { process.stdout.write(`\r${t[s = ++s % t.length]} ${o}`) }, 80); return () => {
1013
+ clearInterval(a), process.stdout.write(`\r\u2705 Done!
1013
1014
  `)
1014
- }
1015
- } var z = W.createInterface({ input: process.stdin, output: process.stdout }); W.emitKeypressEvents(process.stdin); process.stdin.isTTY && process.stdin.setRawMode(!0); var y = (n, s = "") => new Promise(t => { z.question(s ? `${n} (${s}): ` : n, a => { t(a.trim() || s) }) }); async function _(n) {
1016
- let s = n?.directory, t = n?.options; console.log(e(`
1017
- \u26A1 TezX App Creator(v${g})`, "orange")), s || (s = await y(e("\u{1F4E6} Project name: ", "magenta")), s || (console.log(e("\u274C Project name required.", "red")), process.exit(0))); let a = k.basename(s), o = J(process.cwd(), s), l = !!t?.ts, i = t?.staticFolder || "public", c = !0, r = { content: "", import: [], readme: "", files: [] }; if (t?.t || t?.template) { let u = t.t || t.template, v = T?.[u]; v || (console.error(`\u274C Unknown template: "${u}"`), console.error(`\u2139\uFE0F Available templates: ${Object.keys(T).join(", ")}`), process.exit(0)), r = v } else l = !!(t?.ts || (await y("\u{1F7E6} Use TypeScript? (y/N): ")).toLowerCase() === "y"), c = !!t?.useStatic || (await y("\u{1F4C1} Use static folder? (y/N): ")).toLowerCase() === "y", i = c ? t?.staticFolder || await y("\u{1F4C2} Static folder name? (default: public): ") : ""; let h = t?.pm || t?.p, b = w?.includes(h) ? h : await R(z, "\u{1F4E6} Choose your package manager", w), m = t?.i === "true" || t?.install === "true" || (await y("\u{1F4E5} Install dependencies now? (y/N): ")).toLowerCase() === "y"; console.log(`
1015
+ }
1016
+ } c(M, "startLoader"); const E = T.createInterface({ input: process.stdin, output: process.stdout }); T.emitKeypressEvents(process.stdin), process.stdin.isTTY && process.stdin.setRawMode(!0); const y = c((o, s = "") => new Promise(t => { E.question(s ? `${o} (${s}): ` : o, a => { t(a.trim() || s) }) }), "ask"); async function U(o) {
1017
+ let s = o?.directory, t = o?.options; console.log(e(`
1018
+ \u26A1 TezX App Creator(v${F})`, "orange")), s || (s = await y(e("\u{1F4E6} Project name: ", "magenta")), s || (console.log(e("\u274C Project name required.", "red")), process.exit(0))); let a = k.basename(s); const n = A(process.cwd(), s); let u = !!t?.ts, i = t?.staticFolder || "public", l = !0, r = { content: "", import: [], readme: "", files: [] }; if (t?.t || t?.template) { const p = t.t || t.template, w = C?.[p]; w || (console.error(`\u274C Unknown template: "${p}"`), console.error(`\u2139\uFE0F Available templates: ${Object.keys(C).join(", ")}`), process.exit(0)), r = w } else u = !!(t?.ts || (await y("\u{1F7E6} Use TypeScript? (y/N): ")).toLowerCase() === "y"), l = !!t?.useStatic || (await y("\u{1F4C1} Use static folder? (y/N): ")).toLowerCase() === "y", i = l ? t?.staticFolder || await y("\u{1F4C2} Static folder name? (default: public): ") : ""; let b = t?.pm || t?.p; const x = S?.includes(b) ? b : await _(E, "\u{1F4E6} Choose your package manager", S), m = t?.i === "true" || t?.install === "true" || (await y("\u{1F4E5} Install dependencies now? (y/N): ")).toLowerCase() === "y"; console.log(`
1018
1019
  \u{1F4C1} Creating project: ${a}...
1019
- `); let X = Y("Creating Project"); if (S(o, { recursive: !0 }), c) { let u = V(o, i || "public"); S(u, { recursive: !0 }) } let f = { bun: { cd: "cd " + s, install: "bun install", tezx: "bun add tezx@latest", dev: "bun dev", build: "bun build:esm && bun build:dts" }, npm: { cd: "cd " + s, install: "npm install", tezx: "npm install tezx@latest", dev: "npm run dev", build: "npm run build:esm && npm run build:dts" }, yarn: { cd: "cd " + s, install: "yarn", tezx: "yarn add tezx@latest", dev: "yarn dev", build: "yarn build:esm && yarn build:dts" }, pnpm: { cd: "cd " + s, install: "pnpm install", tezx: "pnpm add tezx@latest", dev: "pnpm run dev", build: "pnpm run build:esm && pnpm run build:dts" } }[b]; G({ template: r, root: o, ts: !!l, staticFolder: i, useStatic: c }), A({ projectName: a, root: o, ts: !!l, template: r, choiceStep: f }), H({ root: o }), P({ root: o, readme: r?.readme }), z.close(), r?.files?.forEach(u => { let v = k.join(o, k.dirname(u?.path)); S(v, { recursive: !0 }), q(k.join(o, u?.path), u?.content) }), m && B(f?.install, { cwd: o, stdio: "inherit" }), console.log(e(`
1020
+ `); let B = M("Creating Project"); if (v(n, { recursive: !0 }), l) { const p = g(n, i || "public"); v(p, { recursive: !0 }) } let f = { bun: { cd: "cd " + s, install: "bun install", dev: "bun dev", build: "bun build:esm && bun build:dts" }, npm: { cd: "cd " + s, install: "npm install", dev: "npm run dev", build: "npm run build:esm && npm run build:dts" }, yarn: { cd: "cd " + s, install: "yarn", dev: "yarn dev", build: "yarn build:esm && yarn build:dts" }, pnpm: { cd: "cd " + s, install: "pnpm install", dev: "pnpm run dev", build: "pnpm run build:esm && pnpm run build:dts" } }[x]; P({ template: r, root: n, ts: !!u, staticFolder: i, useStatic: l }), X({ projectName: a, root: n, ts: !!u, template: r, choiceStep: f }), N({ root: n }), L({ root: n, readme: r?.readme }), E.close(), r?.files?.forEach(p => { let w = k.join(n, k.dirname(p?.path)); v(w, { recursive: !0 }), h(k.join(n, p?.path), p?.content) }), m && j(f?.install, { cwd: n, stdio: "inherit" }), console.log(e(`
1020
1021
  \u2705 TezX project "${a}" is ready!
1021
- `, "green")), console.log(e("\u{1F9F0} Summary of your configuration:", "cyan")), console.log(`\u{1F4C1} Project Name: ${e(a, "yellow")}`); let E = t?.t || t?.template; E && console.log(`\u{1F4C1} Template Name: ${e(E, "orange")}`), console.log(`\u{1F7E6} TypeScript: ${e(l ? "Yes" : "No", l ? "green" : "gray")}`), console.log(`\u{1F4C1} Static Folder: ${e(c ? i || "public" : "Not Used", c ? "green" : "gray")}`), console.log(`\u{1F4E6} Package Manager: ${e(b, "magenta")}`), console.log(`\u{1F4E5} Dependencies Installed: ${e(m ? "Yes" : "No", m ? "green" : "red")}
1022
- `), console.log(e("\u{1F449} Next Steps:", "cyan")), console.log(e(` ${f?.cd}`, "white")), m || console.log(e(` ${f?.install}`, "white")), console.log(e(` ${f?.dev}`, "white")), console.log(""), X(), process.exit(0)
1023
- } function F() {
1024
- console.log(`
1022
+ `, "green")), console.log(e("\u{1F9F0} Summary of your configuration:", "cyan")), console.log(`\u{1F4C1} Project Name: ${e(a, "yellow")}`); let z = t?.t || t?.template; z && console.log(`\u{1F4C1} Template Name: ${e(z, "orange")}`), console.log(`\u{1F7E6} TypeScript: ${e(u ? "Yes" : "No", u ? "green" : "gray")}`), console.log(`\u{1F4C1} Static Folder: ${e(l ? i || "public" : "Not Used", l ? "green" : "gray")}`), console.log(`\u{1F4E6} Package Manager: ${e(x, "magenta")}`), console.log(`\u{1F4E5} Dependencies Installed: ${e(m ? "Yes" : "No", m ? "green" : "red")}
1023
+ `), console.log(e("\u{1F449} Next Steps:", "cyan")), console.log(e(` ${f?.cd}`, "white")), m || console.log(e(` ${f?.install}`, "white")), console.log(e(` ${f?.dev}`, "white")), console.log(""), B(), process.exit(0)
1024
+ } c(U, "create"); function q() {
1025
+ console.log(`
1025
1026
  ${e("\u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E", "gray")}
1026
1027
  ${e("\u2502", "gray")}${e(" \u26A1 Create TezX", "yellow")} - Scaffold your next backend app ${e("\u2502", "gray")}
1027
1028
  ${e("\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F", "gray")}
@@ -1060,4 +1061,4 @@ Thumbs.db
1060
1061
 
1061
1062
  ${e("\u{1F9D1}\u200D\u{1F4BB} Author:", "cyan")}
1062
1063
  Rakibul Islam ${e("<https://github.com/srakib17>", "blue")}`), process.exit(0)
1063
- } function N() { console.log(`TezX CLI v${g}`), process.exit(0) } (async () => { let n = (l, i) => { i.name === "c" && i.ctrl && (process.stdin.off("keypress", n), process.stdin.isTTY && process.stdin.setRawMode(!1), process.exit(0)) }; process.stdin.on("keypress", n); let s = process.argv.slice(2), t = {}, a; for (let l = 0; l < s.length; l++) { let i = s[l]; if (i.startsWith("--")) { let c = i.slice(2), r = s[l + 1]; r && !r.startsWith("-") ? (t[c] = r, l++) : t[c] = "true" } else if (i.startsWith("-")) { let c = i.slice(1), r = s[l + 1]; r && !r.startsWith("-") ? (t[c] = r, l++) : t[c] = "true" } else a || (a = i) } let o = { directory: a, options: t }; if ((t.y === "true" || t.yes === "true") && (o.options.ts = "true", o.options.useStatic = "true", o.options.staticFolder = "public", o.options.pm = w?.includes(o.options?.p || o?.options?.pm) ? o.options?.p || o?.options?.pm : "npm", o.options.p = w?.includes(o.options?.p || o?.options?.pm) ? o.options?.p || o?.options?.pm : "npm", o.options.install = "true"), t.help || t.h) { F(); return } if (t.v || t.version) { N(); return } _(o) })();
1064
+ } c(q, "showHelp"); function V() { console.log(`TezX CLI v${F}`), process.exit(0) } c(V, "showVersion"), (async () => { const o = c((u, i) => { i.name === "c" && i.ctrl && (process.stdin.off("keypress", o), process.stdin.isTTY && process.stdin.setRawMode(!1), process.exit(0)) }, "onKeyPress"); process.stdin.on("keypress", o); const s = process.argv.slice(2); let t = {}, a; for (let u = 0; u < s.length; u++) { const i = s[u]; if (i.startsWith("--")) { const l = i.slice(2), r = s[u + 1]; r && !r.startsWith("-") ? (t[l] = r, u++) : t[l] = "true" } else if (i.startsWith("-")) { const l = i.slice(1), r = s[u + 1]; r && !r.startsWith("-") ? (t[l] = r, u++) : t[l] = "true" } else a || (a = i) } let n = { directory: a, options: t }; if ((t.y === "true" || t.yes === "true") && (n.options.ts = "true", n.options.useStatic = "true", n.options.staticFolder = "public", n.options.pm = S?.includes(n.options?.p || n?.options?.pm) ? n.options?.p || n?.options?.pm : "npm", n.options.p = S?.includes(n.options?.p || n?.options?.pm) ? n.options?.p || n?.options?.pm : "npm", n.options.install = "true"), t.help || t.h) { q(); return } if (t.v || t.version) { V(); return } U(n) })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-tezx-app",
3
- "version": "4.0.7",
3
+ "version": "4.0.9",
4
4
  "type": "module",
5
5
  "description": "TezX is a high-performance, lightweight JavaScript framework designed for speed, scalability, and flexibility. It enables efficient routing, middleware management, and static file serving with minimal configuration. Fully compatible with Node.js, Deno, and Bun.",
6
6
  "bin": "./bin",