@dashnex/cli 0.5.24 → 0.5.26

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.
@@ -1 +1 @@
1
- import t from"chalk";import{debug as o,debugError as s}from"../../lib/debug.js";import{getBusinessApiBase as e}from"../../lib/api.js";import{ensureLoggedIn as a}from"../../services/auth.js";import{createSpinner as n}from"../../lib/spinner.js";import{isUserInterrupt as r,INTERRUPTED_MESSAGE as i}from"../../lib/errors.js";class c{async execute(){o("Status flow started");const c=await a();if(!c)return;const l=`${e()}/business/v1/applications`;o(`GET ${l}`);const p=n();p.start("Fetching application status...");try{const s=await fetch(l,{headers:{Authorization:`Bearer ${c.token}`}});if(p.stop(),o(`Response: ${s.status}`),404===s.status)return void console.log(t.yellow("Application not created"));if(!s.ok){const o=s.headers.get("content-type")??"";let e="Failed to fetch application status.";if(401===s.status||403===s.status)e="Please run 'dashnex login' to authenticate.";else if(o.includes("application/json")){const t=await s.json().catch(()=>({}));"string"==typeof t.error?e=t.error:"string"==typeof t.message&&(e=t.message)}console.error(t.red(e)),process.exit(1)}const e=await s.json().catch(()=>({}));o(`Application body: ${JSON.stringify(e)}`);const a=e.status??"unknown";console.log(`Status: ${t.cyan(a)}`),e.subdomain&&console.log(`Subdomain: ${t.cyan(e.subdomain+".dashnex.site")}`)}catch(u){if(p.stop(),s(u),u instanceof Error&&u.message.startsWith("EXIT:"))throw u;if(r(u))return void console.log(t.yellow(i));console.error(t.red("Could not reach DashNex API. Check your connection and try again.")),process.exit(1)}}}export{c as StatusCommand};
1
+ import t from"chalk";import{debug as o,debugError as s}from"../../lib/debug.js";import{getBusinessApiBase as e}from"../../lib/api.js";import{ensureLoggedIn as a}from"../../services/auth.js";import{createSpinner as n}from"../../lib/spinner.js";import{isUserInterrupt as r,INTERRUPTED_MESSAGE as i}from"../../lib/errors.js";class c{async execute(){o("Status flow started");const c=await a();if(!c)return;const l=`${e()}/business/v1/applications`;o(`GET ${l}`);const p=n();p.start("Fetching application status...");try{const s=await fetch(l,{headers:{Authorization:`Bearer ${c.token}`}});if(p.stop(),o(`Response: ${s.status}`),404===s.status)return void console.log(t.yellow("Application not created"));if(!s.ok){const o=s.headers.get("content-type")??"";let e="Failed to fetch application status.";if(401===s.status||403===s.status)e="Please run 'dashnex login' to authenticate.";else if(o.includes("application/json")){const t=await s.json().catch(()=>({}));"string"==typeof t.error?e=t.error:"string"==typeof t.message&&(e=t.message)}console.error(t.red(e)),process.exit(1)}const e=await s.json().catch(()=>({}));o(`Application body: ${JSON.stringify(e)}`);const a=e.status??"unknown";console.log(`Status: ${t.cyan(a)}`);const n=(t=>t.appFullCustomDomain?t.appFullCustomDomain:t.subdomain?"qa"===(process.env.APPLICATION_ENV??"")?`https://${t.subdomain}.dashnex.dev`:`https://${t.subdomain}.dashnexcloud.com`:null)(e);n&&console.log(`URL: ${t.cyan(n)}`)}catch(u){if(p.stop(),s(u),u instanceof Error&&u.message.startsWith("EXIT:"))throw u;if(r(u))return void console.log(t.yellow(i));console.error(t.red("Could not reach DashNex API. Check your connection and try again.")),process.exit(1)}}}export{c as StatusCommand};
@@ -1 +1 @@
1
- const e="@dashnex/cli",a="0.5.24",n="Command-line interface for DashNex framework",o={name:e,version:a,description:n};export{o as default,n as description,e as name,a as version};
1
+ const e="@dashnex/cli",a="0.5.26",n="Command-line interface for DashNex framework",o={name:e,version:a,description:n};export{o as default,n as description,e as name,a as version};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@dashnex/cli",
4
- "version": "0.5.24",
4
+ "version": "0.5.26",
5
5
  "description": "Command-line interface for DashNex framework",
6
6
  "homepage": "https://dashnex.io",
7
7
  "type": "module",
@@ -38,7 +38,7 @@
38
38
  "@types/adm-zip": "^0.5.7",
39
39
  "@types/fs-extra": "^11.0.4",
40
40
  "@types/inquirer": "^9.0.9",
41
- "@types/node": "^20.14.0",
41
+ "@types/node": "^25.3.0",
42
42
  "eslint": "^9.39.2",
43
43
  "rollup-plugin-preserve-directives": "^0.4.0",
44
44
  "terser": "^5.46.0",