@mahameru/cli 0.0.4 → 0.0.6

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/dist/index.js +5 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * ┌────────────────────────────────────────────┐
4
4
  * │ │
5
5
  * │ ▲ MahameruJS - CLI UTILITY │
6
- * │ Version: 0.0.4
6
+ * │ Version: 0.0.6
7
7
  * │ Built: 2026 │
8
8
  * │ │
9
9
  * │ Copyright (c) Bintan <hello@bintvn.co> │
@@ -34,7 +34,7 @@ bgCyanBright:e("",""),bgWhiteBright:e("","")}};t.exports=a
34
34
  ;function _(t){var e=g[t];if(void 0!==e)return e.exports;var i=g[t]={exports:{}};return f[t](i,i.exports,_),i.exports}
35
35
  _.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return _.d(e,{a:e}),e},_.d=(t,e)=>{
36
36
  for(var i in e)_.o(e,i)&&!_.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},
37
- _.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);const v={rE:"0.0.4"
37
+ _.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);const v={rE:"0.0.6"
38
38
  },b=(t=0)=>e=>`[${e+t}m`,O=(t=0)=>e=>`[${38+t};5;${e}m`,x=(t=0)=>(e,i,r)=>`[${38+t};2;${e};${i};${r}m`,y={modifier:{
39
39
  reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],
40
40
  strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],
@@ -644,7 +644,7 @@ return!h.env.NO_COLOR&&"0"!==h.env.FORCE_COLOR&&"false"!==h.env.FORCE_COLOR&&(!(
644
644
  }new Ee;const Pe=process.cwd();function ke(t){const e=parseInt(t,10);if(!isNaN(e))return e}function Re(t,i,r){
645
645
  return new Promise((s,n)=>{const o=e(process.execPath,[t,...i],{stdio:"inherit",cwd:r});o.on("close",t=>s(t??1)),
646
646
  o.on("error",n)})}(async()=>{const t=new Ee,{rE:i}=v;try{
647
- console.clear(),t.name("mahameru").description(`${_e().bold(_e().cyan("▲ Mahameru"))} ${_e().dim(`CLI v${i}`)}`).version(i),
647
+ console.clear(),t.name("mahameru").description(`${_e().bold(_e().cyan("▲ Mahameru"))} ${_e().dim(`CLI v${i}`)}`).option("-v, --version","Show version number").option("-h, --help","Display help for command").version(i),
648
648
  t.command("dev").option("-p, --port <number>","Port to run the server on",ke).option("-h, --host <string>","Host to run the server on").action(async({host:t,port:e})=>{
649
649
  console.log(`${_e().bold(_e().cyan("▲ Mahameru"))} ${_e().dim(`CLI v${i}`)}\n`);const s="mahameru.config.ts",o=r(Pe,s)
650
650
  ;n(o)||(console.error(_e().red(`❌ Error: Config file '${s}' is not found.`)),
@@ -657,8 +657,8 @@ console.error(_e().yellow("Please install it by running: npm install -D tsx")),p
657
657
  console.error(_e().yellow("Please install it by running: npm install -D tsx")),process.exit(1))
658
658
  ;const h=await import("tsx/esm/api").catch(()=>{console.error(_e().red("❌ Error: Runner 'tsx' api is not installed.")),
659
659
  console.error(_e().yellow("Please install it by running: npm install -D tsx")),process.exit(1)}),c=p(o).href
660
- ;let u=(await h.tsImport(c,"file:///F:/Projects/@mahameru/cli/src/index.ts")).default;u={...u,appPath:r(Pe,"src"),
661
- port:void 0!==e?e:void 0!==u.port?u.port:3e3,host:void 0!==t?t:void 0!==u.host?u.host:"localhost",
660
+ ;let u=(await h.tsImport(c,"file:///F:/Projects/@mahameru/cli/src/index.ts")).default;u={...u,dev:!0,
661
+ appPath:r(Pe,"src"),port:void 0!==e?e:void 0!==u.port?u.port:3e3,host:void 0!==t?t:void 0!==u.host?u.host:"localhost",
662
662
  modulesPath:r(Pe,"src","modules"),routesPath:r(Pe,"src","routes")}
663
663
  ;const m=`\n import mahameru from "mahameru";\n\n mahameru(${JSON.stringify(u)}).then(app => \n app.initialize().then(() => {\n console.log("\\x1b[32m Mahameru Server Ready! 🚀\\x1b[0m");\n console.log(" \\x1b[1mMode:\\x1b[22m \\x1b[36m${u.dev?"Development":"Production"}\\x1b[0m");\n console.log(" \\x1b[1mLokal:\\x1b[22m \\x1b[36mhttp://${u.host}:${u.port}\\x1b[0m");\n console.log(" \\x1b[1mHost:\\x1b[22m ${u.host}");\n console.log(" \\x1b[1mPort:\\x1b[22m ${u.port}\\n");\n console.log("\\x1b[90mPress Ctrl+C to stop server\\x1b[0m\\n");\n }).catch(console.error)\n ).catch(console.error)\n `
664
664
  ;await Re(a,["-e",m],Pe)}),t.command("build").description("Build Mahameru production application.").action(async()=>{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mahameru/cli",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "MahameruJS CLI Utility - The command-line interface for running and building Mahameru-based applications",
5
5
  "bin": {
6
6
  "mahameru": "./dist/index.js"