@mahameru/cli 0.0.30 → 0.0.31

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/cli.js +4 -3
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * ┌────────────────────────────────────────────┐
4
4
  * │ │
5
5
  * │ ▲ MahameruJS - CLI │
6
- * │ Version: 0.0.30
6
+ * │ Version: 0.0.31
7
7
  * │ Built: 2026 │
8
8
  * │ │
9
9
  * │ Copyright (c) Bintan <hello@bintvn.co> │
@@ -553,7 +553,8 @@ message:"Unauthorized"}));const r=(0,P.parseCookies)(o);if(!r.mahameru_pm_token)
553
553
  "Content-Type":"application/json"}),t.end(JSON.stringify({success:!1,message:"Unauthorized"}))
554
554
  ;const[n,s]=Buffer.from(r.mahameru_pm_token,"base64").toString().split(":"),i=a.find(e=>e.username===n&&e.password===s)
555
555
  ;return i?(t.writeHead(200,{"Content-Type":"application/json"}),t.end(JSON.stringify({success:!0,data:i
556
- }))):(t.writeHead(401,{"Content-Type":"application/json"}),t.end(JSON.stringify({success:!1,message:"Unauthorized"})))}
556
+ }))):(t.setHeader("Set-Cookie",`mahameru_pm_token=; Max-Age=0; HttpOnly; Path=/;${x?" Secure;":""} SameSite=Strict;`),
557
+ t.writeHead(401,{"Content-Type":"application/json"}),t.end(JSON.stringify({success:!1,message:"Unauthorized"})))}
557
558
  if(("/api/auth/logout"===e.url||"/api/login/logout"===e.url)&&"POST"===e.method){const o=e.headers.cookie
558
559
  ;if(!o)return t.writeHead(401,{"Content-Type":"application/json"}),t.end(JSON.stringify({success:!1,
559
560
  message:"Unauthorized"}))
@@ -735,5 +736,5 @@ e.exports=require("node:child_process")},139(e){e.exports=require("node:cluster"
735
736
  },1455(e){e.exports=require("node:fs/promises")},7067(e){e.exports=require("node:http")},4708(e){
736
737
  e.exports=require("node:https")},8995(e){e.exports=require("node:module")},7030(e){e.exports=require("node:net")},
737
738
  8161(e){e.exports=require("node:os")},6760(e){e.exports=require("node:path")},6928(e){e.exports=require("path")},
738
- 8330(e){e.exports={version:"0.0.30"}}};const t={};(function o(r){const n=t[r];if(void 0!==n)return n.exports
739
+ 8330(e){e.exports={version:"0.0.31"}}};const t={};(function o(r){const n=t[r];if(void 0!==n)return n.exports
739
740
  ;const s=t[r]={exports:{}};return e[r].call(s.exports,s,s.exports,o),s.exports})(8625)})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mahameru/cli",
3
- "version": "0.0.30",
3
+ "version": "0.0.31",
4
4
  "description": "MahameruJS CLI Utility - The command-line interface for running and building Mahameru-based applications",
5
5
  "bin": {
6
6
  "mahameru": "./cli.js"