@mahameru/cli 0.0.6 → 0.0.8

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 +6 -6
  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.6
6
+ * │ Version: 0.0.8
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.6"
37
+ _.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);const v={rE:"0.0.8"
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,10 +644,10 @@ 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}`)}`).option("-v, --version","Show version number").option("-h, --help","Display help for command").version(i),
647
+ t.name("mahameru").description(`${_e().bold(_e().cyan("▲ Mahameru"))} ${_e().dim(`CLI v${i}`)}`).version(i,"-v, --version","Display help for command"),
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
- console.log(`${_e().bold(_e().cyan("▲ Mahameru"))} ${_e().dim(`CLI v${i}`)}\n`);const s="mahameru.config.ts",o=r(Pe,s)
650
- ;n(o)||(console.error(_e().red(`❌ Error: Config file '${s}' is not found.`)),
649
+ console.clear(),console.log(`${_e().bold(_e().cyan("▲ Mahameru"))} ${_e().dim(`CLI v${i}`)}\n`)
650
+ ;const s="mahameru.config.ts",o=r(Pe,s);n(o)||(console.error(_e().red(`❌ Error: Config file '${s}' is not found.`)),
651
651
  console.error(_e().yellow("Please create project by running: npm create mahameru")),process.exit(1))
652
652
  ;const a=r(Pe,"node_modules","tsx","dist","cli.mjs")
653
653
  ;n(a)||(console.error(_e().red("❌ Error: Runner 'tsx' is not installed.")),
@@ -662,7 +662,7 @@ appPath:r(Pe,"src"),port:void 0!==e?e:void 0!==u.port?u.port:3e3,host:void 0!==t
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()=>{
665
- console.log(`${_e().bold(_e().cyan("▲ Mahameru"))} ${_e().dim(`CLI v${i}`)}\n`)
665
+ console.clear(),console.log(`${_e().bold(_e().cyan("▲ Mahameru"))} ${_e().dim(`CLI v${i}`)}\n`)
666
666
  ;const t=fe(_e().cyan("Checking environment...")).start()
667
667
  ;n(r(Pe,"package.json"))&&n(r(Pe,"node_modules"))||(t.fail(_e().red(" Current directory is not a Node.js project.")),
668
668
  process.exit(1));const e=r(Pe,"node_modules","typescript","bin","tsc")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mahameru/cli",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
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"