@dashnex/cli 0.5.49 → 0.5.51
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.
- package/README.md +13 -3
- package/dist/package.json.js +1 -1
- package/dist/services/agreements.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -30,9 +30,12 @@ dashnex <command> [options]
|
|
|
30
30
|
| `app delete` | Delete application from DashNex |
|
|
31
31
|
| `app deploy` | Deploy application to DashNex |
|
|
32
32
|
| `app status` | Show current application status |
|
|
33
|
-
| `install` | Install dependencies using pnpm or npm |
|
|
34
|
-
| `dev` | Run the development server |
|
|
35
|
-
| `check` | Run build-time validations |
|
|
33
|
+
| `app install` | Install dependencies using pnpm or npm |
|
|
34
|
+
| `app dev` | Run the development server |
|
|
35
|
+
| `app check` | Run build-time validations |
|
|
36
|
+
| `secrets list` | List all secret names bound to the worker |
|
|
37
|
+
| `secrets set` | Create or update a secret |
|
|
38
|
+
| `secrets delete` | Delete a secret |
|
|
36
39
|
|
|
37
40
|
### Options
|
|
38
41
|
|
|
@@ -55,3 +58,10 @@ dashnex <command> [options]
|
|
|
55
58
|
|
|
56
59
|
**app delete**:
|
|
57
60
|
- `-y, --yes` — Skip confirmation prompt
|
|
61
|
+
|
|
62
|
+
**secrets set**:
|
|
63
|
+
- `--name <name>` — Secret name (prompted if omitted)
|
|
64
|
+
- `--value <value>` — Secret value (prompted with masked input if omitted)
|
|
65
|
+
|
|
66
|
+
**secrets delete**:
|
|
67
|
+
- `--name <name>` — Secret name (prompted if omitted)
|
package/dist/package.json.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e="@dashnex/cli",a="0.5.
|
|
1
|
+
const e="@dashnex/cli",a="0.5.51",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 +1 @@
|
|
|
1
|
-
import e from"chalk";import t from"inquirer";import{debug as r,debugError as n}from"../lib/debug.js";import{getBusinessApiBase as
|
|
1
|
+
import e from"chalk";import t from"inquirer";import{debug as r,debugError as n}from"../lib/debug.js";import{getBusinessApiBase as s}from"../lib/api.js";const o=async t=>{const n=`${s()}/business/v1/agreements/payment-processing/status`;r(`GET ${n}`);const o=await fetch(n,{headers:{Authorization:`Bearer ${t}`}});if(r(`Payment agreement response: ${o.status}`),!o.ok)return!0;if((await o.json().catch(()=>({}))).hasAccepted)return!0;const a=`${await(async()=>"qa"===process.env.APPLICATION_ENV?"https://business.qa.dashnex.com":"https://business.dashnex.com")()}/money/agreement/`;return console.error(e.red(`You need to accept Master Payment Processing Agreement first by visiting this link: ${a}`)),!1},a=async(a,c={})=>{const i=c.ciMode??!1;if(!(await o(a)))return!1;const p=await(async(o,a)=>{const c=`${s()}/business/v1/tos/latest`;r(`GET ${c}`);const i=await fetch(c,{headers:{Authorization:`Bearer ${o}`}});if(r(`TOS latest response: ${i.status}`),i.ok)return!0;if(404!==i.status)return!0;const p=`${s()}/business/v1/tos/current`;r(`GET ${p}`);const l=await fetch(p,{headers:{Authorization:`Bearer ${o}`}});if(r(`TOS current response: ${l.status}`),!l.ok)return r("Could not fetch current TOS, skipping check"),!0;const u=await l.json().catch(()=>({})),g=u.version??"unknown";if(u.text&&(console.log(e.dim("─".repeat(60))),console.log(e.bold(`Terms of Service ${g}`)),console.log(e.dim("─".repeat(60))),console.log(u.text.replace(/<br\s*\/?>/gi,"\n").replace(/<\/p>/gi,"\n\n").replace(/<\/div>/gi,"\n").replace(/<\/li>/gi,"\n").replace(/<[^>]+>/g,"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/ /g," ").replace(/\n{3,}/g,"\n\n").trim()),console.log(e.dim("─".repeat(60)))),a)return console.log(e.yellow(`By proceeding you accept the Terms of Service ${g}.`)),!0;const{accept:m}=await t.prompt([{type:"confirm",name:"accept",message:`By creating an application you accept the Terms of Service ${g}. Continue?`,default:!0}]);if(!m)return console.log(e.yellow("Cancelled.")),!1;try{const e=`${s()}/business/v1/tos/${u.id}/accept`;r(`POST ${e}`),await fetch(e,{method:"POST",headers:{Authorization:`Bearer ${o}`,"Content-Type":"application/json"},body:JSON.stringify({})})}catch(h){n(h)}return!0})(a,i);return!!p};export{a as ensureAgreements};
|
package/package.json
CHANGED