@startanaicompany/cli 1.0.0 → 1.3.0
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/CLAUDE.md +358 -0
- package/README.md +98 -14
- package/auth_session_update.md +785 -0
- package/bin/saac.js +73 -3
- package/create-application-update.md +759 -0
- package/package.json +2 -2
- package/src/commands/create.js +278 -4
- package/src/commands/login.js +38 -44
- package/src/commands/logout.js +41 -3
- package/src/commands/logoutAll.js +74 -0
- package/src/commands/register.js +46 -34
- package/src/commands/sessions.js +75 -0
- package/src/commands/status.js +164 -4
- package/src/commands/update.js +284 -0
- package/src/commands/verify.js +32 -4
- package/src/lib/api.js +47 -1
- package/src/lib/config.js +60 -11
- package/test-session-token.js +117 -0
package/bin/saac.js
CHANGED
|
@@ -14,8 +14,11 @@ const register = require('../src/commands/register');
|
|
|
14
14
|
const login = require('../src/commands/login');
|
|
15
15
|
const verify = require('../src/commands/verify');
|
|
16
16
|
const logout = require('../src/commands/logout');
|
|
17
|
+
const logoutAll = require('../src/commands/logoutAll');
|
|
18
|
+
const sessions = require('../src/commands/sessions');
|
|
17
19
|
const init = require('../src/commands/init');
|
|
18
20
|
const create = require('../src/commands/create');
|
|
21
|
+
const update = require('../src/commands/update');
|
|
19
22
|
const deploy = require('../src/commands/deploy');
|
|
20
23
|
const logs = require('../src/commands/logs');
|
|
21
24
|
const env = require('../src/commands/env');
|
|
@@ -54,9 +57,20 @@ program
|
|
|
54
57
|
|
|
55
58
|
program
|
|
56
59
|
.command('logout')
|
|
57
|
-
.description('
|
|
60
|
+
.description('Logout from current device')
|
|
58
61
|
.action(logout);
|
|
59
62
|
|
|
63
|
+
program
|
|
64
|
+
.command('logout-all')
|
|
65
|
+
.description('Logout from all devices (revoke all sessions)')
|
|
66
|
+
.option('-y, --yes', 'Skip confirmation')
|
|
67
|
+
.action(logoutAll);
|
|
68
|
+
|
|
69
|
+
program
|
|
70
|
+
.command('sessions')
|
|
71
|
+
.description('List all active sessions')
|
|
72
|
+
.action(sessions);
|
|
73
|
+
|
|
60
74
|
// Application management
|
|
61
75
|
program
|
|
62
76
|
.command('init')
|
|
@@ -70,12 +84,68 @@ program
|
|
|
70
84
|
program
|
|
71
85
|
.command('create [name]')
|
|
72
86
|
.description('Create a new application')
|
|
87
|
+
// Required options
|
|
73
88
|
.option('-s, --subdomain <subdomain>', 'Subdomain')
|
|
74
|
-
.option('-
|
|
75
|
-
.option('-
|
|
89
|
+
.option('-r, --repository <url>', 'Git repository URL (SSH format)')
|
|
90
|
+
.option('-t, --git-token <token>', 'Git API token')
|
|
91
|
+
// Basic options
|
|
76
92
|
.option('-b, --branch <branch>', 'Git branch', 'master')
|
|
93
|
+
.option('-d, --domain-suffix <suffix>', 'Domain suffix', 'startanaicompany.com')
|
|
94
|
+
.option('-p, --port <port>', 'Port to expose (default: 3000)')
|
|
95
|
+
// Build configuration
|
|
96
|
+
.option('--build-pack <pack>', 'Build pack: dockercompose, nixpacks, dockerfile, static')
|
|
97
|
+
.option('--install-cmd <command>', 'Install command')
|
|
98
|
+
.option('--build-cmd <command>', 'Build command')
|
|
99
|
+
.option('--start-cmd <command>', 'Start command')
|
|
100
|
+
.option('--pre-deploy-cmd <command>', 'Pre-deployment command')
|
|
101
|
+
.option('--post-deploy-cmd <command>', 'Post-deployment command')
|
|
102
|
+
// Resource limits
|
|
103
|
+
.option('--cpu-limit <limit>', 'CPU limit (e.g., "1", "2.5")')
|
|
104
|
+
.option('--memory-limit <limit>', 'Memory limit (e.g., "512M", "2G")')
|
|
105
|
+
// Health checks
|
|
106
|
+
.option('--health-check', 'Enable health checks')
|
|
107
|
+
.option('--health-path <path>', 'Health check path')
|
|
108
|
+
.option('--health-interval <seconds>', 'Health check interval in seconds')
|
|
109
|
+
.option('--health-timeout <seconds>', 'Health check timeout in seconds')
|
|
110
|
+
.option('--health-retries <count>', 'Health check retries (1-10)')
|
|
111
|
+
// Environment variables
|
|
112
|
+
.option('--env <KEY=VALUE>', 'Environment variable (can be used multiple times)', (val, prev) => {
|
|
113
|
+
return prev ? [...prev, val] : [val];
|
|
114
|
+
}, [])
|
|
77
115
|
.action(create);
|
|
78
116
|
|
|
117
|
+
program
|
|
118
|
+
.command('update')
|
|
119
|
+
.description('Update application configuration')
|
|
120
|
+
// Basic options
|
|
121
|
+
.option('-n, --name <name>', 'Application name')
|
|
122
|
+
.option('-b, --branch <branch>', 'Git branch')
|
|
123
|
+
.option('-p, --port <port>', 'Port to expose')
|
|
124
|
+
// Build configuration
|
|
125
|
+
.option('--build-pack <pack>', 'Build pack: dockercompose, nixpacks, dockerfile, static')
|
|
126
|
+
.option('--install-cmd <command>', 'Install command')
|
|
127
|
+
.option('--build-cmd <command>', 'Build command')
|
|
128
|
+
.option('--start-cmd <command>', 'Start command')
|
|
129
|
+
.option('--pre-deploy-cmd <command>', 'Pre-deployment command')
|
|
130
|
+
.option('--post-deploy-cmd <command>', 'Post-deployment command')
|
|
131
|
+
// Resource limits
|
|
132
|
+
.option('--cpu-limit <limit>', 'CPU limit (e.g., "1", "2.5")')
|
|
133
|
+
.option('--memory-limit <limit>', 'Memory limit (e.g., "512M", "2G")')
|
|
134
|
+
// Health checks
|
|
135
|
+
.option('--health-check', 'Enable health checks')
|
|
136
|
+
.option('--no-health-check', 'Disable health checks')
|
|
137
|
+
.option('--health-path <path>', 'Health check path')
|
|
138
|
+
.option('--health-interval <seconds>', 'Health check interval in seconds')
|
|
139
|
+
.option('--health-timeout <seconds>', 'Health check timeout in seconds')
|
|
140
|
+
.option('--health-retries <count>', 'Health check retries (1-10)')
|
|
141
|
+
// Restart policy
|
|
142
|
+
.option('--restart <policy>', 'Restart policy: always, on-failure, unless-stopped, no')
|
|
143
|
+
// Environment variables
|
|
144
|
+
.option('--env <KEY=VALUE>', 'Environment variable (can be used multiple times)', (val, prev) => {
|
|
145
|
+
return prev ? [...prev, val] : [val];
|
|
146
|
+
}, [])
|
|
147
|
+
.action(update);
|
|
148
|
+
|
|
79
149
|
program
|
|
80
150
|
.command('deploy')
|
|
81
151
|
.description('Deploy current application')
|