@solidactions/cli 1.31.0 → 1.31.1
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 +74 -9
- package/dist/commands/crew-env-delete.js +1 -1
- package/dist/commands/crew-env-list.js +1 -1
- package/dist/commands/crew-env-push.js +1 -1
- package/dist/commands/crew-env-set.js +1 -1
- package/dist/commands/docs-upload.js +1 -1
- package/dist/commands/env-delete.js +1 -1
- package/dist/commands/env-list.js +1 -1
- package/dist/commands/env-map.js +1 -1
- package/dist/commands/env-pull.js +2 -2
- package/dist/commands/env-push.js +2 -2
- package/dist/commands/env-set.js +7 -3
- package/dist/commands/login.js +50 -1
- package/dist/commands/oauth-actions-list.js +1 -1
- package/dist/commands/oauth-actions-platforms.js +1 -1
- package/dist/commands/oauth-actions-search.js +1 -1
- package/dist/commands/oauth-actions-show.js +1 -1
- package/dist/commands/project-create.js +1 -1
- package/dist/commands/project-list.js +1 -1
- package/dist/commands/project-logs.js +1 -1
- package/dist/commands/pull.js +1 -1
- package/dist/commands/run-list.js +1 -1
- package/dist/commands/run-start.js +1 -1
- package/dist/commands/run-view.js +1 -1
- package/dist/commands/schedule-delete.js +1 -1
- package/dist/commands/schedule-list.js +1 -1
- package/dist/commands/schedule-set.js +10 -13
- package/dist/commands/webhook-list.js +1 -1
- package/dist/commands/webhook-secret.js +1 -1
- package/dist/index.js +5 -3
- package/dist/utils/api.js +2 -2
- package/dist/utils/github.js +7 -1
- package/dist/utils/skills.js +3 -2
- package/package.json +8 -5
package/README.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Deploy and manage workflow automation with SolidActions.
|
|
4
4
|
|
|
5
|
+
Public setup guides: [www.solidactions.com/docs](https://www.solidactions.com/docs)
|
|
6
|
+
|
|
7
|
+
## Prerequisites
|
|
8
|
+
|
|
9
|
+
- Node.js 24 for generated workflow projects (`@solidactions/sdk` requires Node 24)
|
|
10
|
+
- A SolidActions account, workspace, and API key
|
|
11
|
+
|
|
5
12
|
## Installation
|
|
6
13
|
|
|
7
14
|
```bash
|
|
@@ -10,15 +17,66 @@ npm install -g @solidactions/cli
|
|
|
10
17
|
|
|
11
18
|
## Quick Start
|
|
12
19
|
|
|
20
|
+
Create an API key in the SolidActions app under **Settings → API Keys**, then run:
|
|
21
|
+
|
|
13
22
|
```bash
|
|
14
|
-
|
|
15
|
-
solidactions
|
|
23
|
+
# The API key is requested in a masked prompt and is not placed in shell history.
|
|
24
|
+
solidactions login --global
|
|
25
|
+
|
|
26
|
+
# Choose one agent target. init creates the project and installs local skills.
|
|
27
|
+
solidactions init my-project --claude
|
|
28
|
+
# Or: solidactions init my-project --agents
|
|
29
|
+
|
|
16
30
|
cd my-project
|
|
17
|
-
|
|
18
|
-
solidactions
|
|
19
|
-
solidactions run
|
|
31
|
+
npm install
|
|
32
|
+
solidactions project deploy my-project -e production
|
|
33
|
+
solidactions run start my-project hello -e production -i '{"name":"Ada"}' --wait
|
|
20
34
|
```
|
|
21
35
|
|
|
36
|
+
The generated `hello` workflow requires no third-party credentials. A successful
|
|
37
|
+
run completes with a greeting of `Hello, Ada!`; use the run ID printed by the
|
|
38
|
+
command with `solidactions run view <run-id>` or open the run in the app.
|
|
39
|
+
|
|
40
|
+
For non-interactive automation, explicitly read the key from stdin instead of
|
|
41
|
+
placing it in argv:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
printenv SOLIDACTIONS_API_KEY | solidactions login --stdin --global
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Automation that does not need to write a config file can set
|
|
48
|
+
`SOLIDACTIONS_API_KEY` and `SOLIDACTIONS_WORKSPACE_ID` directly.
|
|
49
|
+
|
|
50
|
+
### Verify the generated AI tooling
|
|
51
|
+
|
|
52
|
+
`solidactions init` installs all five current SolidActions skills plus the SDK
|
|
53
|
+
reference:
|
|
54
|
+
|
|
55
|
+
- `solidactions-getting-started`
|
|
56
|
+
- `solidactions-workflow-coding`
|
|
57
|
+
- `solidactions-deploy-and-config`
|
|
58
|
+
- `solidactions-oauth-actions`
|
|
59
|
+
- `solidactions-crew-skills`
|
|
60
|
+
|
|
61
|
+
For `--claude`, skills are written to `.claude/skills/`; for `--agents`, they
|
|
62
|
+
are written to `.agents/skills/`. Each skill is a flat `solidactions-*.md` file.
|
|
63
|
+
Both targets receive `.solidactions/sdk-reference.md` and a pointer block in
|
|
64
|
+
`CLAUDE.md` or `AGENTS.md`.
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# Use the directory matching the target selected above.
|
|
68
|
+
find .claude/skills -maxdepth 1 -name 'solidactions-*.md' -print
|
|
69
|
+
test -f .solidactions/sdk-reference.md
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Restart the coding-agent session after installation so it reloads project
|
|
73
|
+
instructions. Then ask: “Which SolidActions skills are installed, and which
|
|
74
|
+
one should you use to deploy this workflow?” The answer should identify the
|
|
75
|
+
installed skills and select `solidactions-deploy-and-config` for deployment.
|
|
76
|
+
|
|
77
|
+
For an existing project, install or refresh the same tooling with
|
|
78
|
+
`solidactions ai init --claude` or `solidactions ai init --agents`.
|
|
79
|
+
|
|
22
80
|
## Configuration
|
|
23
81
|
|
|
24
82
|
The CLI stores `host`, `apiKey`, and `workspaceId` in a JSON config file. Two locations are supported:
|
|
@@ -38,6 +96,9 @@ You can mix: e.g., set only `SOLIDACTIONS_WORKSPACE_ID` in the environment while
|
|
|
38
96
|
|
|
39
97
|
### `solidactions login` flags
|
|
40
98
|
|
|
99
|
+
- With no positional argument, `login` securely prompts for the API key using
|
|
100
|
+
masked input. This is the recommended interactive flow.
|
|
101
|
+
- `--stdin` — read the API key from stdin for explicitly non-interactive use.
|
|
41
102
|
- `--local` — write config to `./.solidactions/config.json` in the current folder.
|
|
42
103
|
- `--global` — write config to `~/.solidactions/config.json` (today's default).
|
|
43
104
|
- `--gitignore` — with `--local`, auto-add `.solidactions/` to `.gitignore` without prompting.
|
|
@@ -60,7 +121,7 @@ Set `SOLIDACTIONS_DEBUG=1` on any command to print the resolved configuration an
|
|
|
60
121
|
|
|
61
122
|
If you run multiple AI coding agents in different project folders simultaneously, either:
|
|
62
123
|
|
|
63
|
-
- Run `solidactions login
|
|
124
|
+
- Run `solidactions login --local` interactively in each folder so each has its own config, or
|
|
64
125
|
- Set `SOLIDACTIONS_API_KEY` / `SOLIDACTIONS_WORKSPACE_ID` in the environment each agent uses (no files to share or stomp).
|
|
65
126
|
|
|
66
127
|
### Deploy bundle exclusions (`solidactions.yaml`)
|
|
@@ -89,7 +150,7 @@ Use `solidactions <command> --help` for full flag details on any command.
|
|
|
89
150
|
|
|
90
151
|
| Command | Description |
|
|
91
152
|
|---------|-------------|
|
|
92
|
-
| `login
|
|
153
|
+
| `login` | Authenticate via a masked API-key prompt (`--stdin` for automation) |
|
|
93
154
|
| `logout` | Remove saved credentials |
|
|
94
155
|
| `whoami` | Show current configuration |
|
|
95
156
|
| `init [directory]` | Scaffold a new project (files + AI skills) |
|
|
@@ -129,10 +190,14 @@ Use `solidactions <command> --help` for full flag details on any command.
|
|
|
129
190
|
|
|
130
191
|
| Command | Key Flags | Description |
|
|
131
192
|
|---------|-----------|-------------|
|
|
132
|
-
| `schedule set <project> <cron>` | `--workflow`, `-i`, `-y` | Set cron schedule (warns if exists) |
|
|
193
|
+
| `schedule set <project> <cron>` | `--workflow`, `-i`, `-z`, `-y` | Set cron schedule and optional IANA timezone (warns if exists) |
|
|
133
194
|
| `schedule list <project>` | | List schedules |
|
|
134
195
|
| `schedule delete <project> <id>` | `-y` | Delete a schedule |
|
|
135
196
|
|
|
197
|
+
```bash
|
|
198
|
+
solidactions schedule set my-project '0 9 * * 1-5' --workflow daily-summary --timezone America/Chicago
|
|
199
|
+
```
|
|
200
|
+
|
|
136
201
|
### webhook
|
|
137
202
|
|
|
138
203
|
| Command | Key Flags | Description |
|
|
@@ -213,7 +278,7 @@ You do **not** need `--overwrite` to keep an edited file whose doc was deleted o
|
|
|
213
278
|
| `ai init` | `--claude`, `--agents` | Install AI skills and SDK reference into an **existing** project (use `init` for new projects) |
|
|
214
279
|
| `ai examples [names...]` | `--all`, `--overwrite` | Install example workflows |
|
|
215
280
|
|
|
216
|
-
`ai init` installs
|
|
281
|
+
`ai init` installs five auto-activating SolidActions skills and a
|
|
217
282
|
full SDK reference into your project:
|
|
218
283
|
|
|
219
284
|
- Skills go to `.claude/skills/` (for `--claude` / Claude Code) or
|
|
@@ -33,7 +33,7 @@ async function crewEnvDelete(crewArg, key, options = {}) {
|
|
|
33
33
|
catch (error) {
|
|
34
34
|
if (error.response) {
|
|
35
35
|
if (error.response.status === 401) {
|
|
36
|
-
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login
|
|
36
|
+
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global" to re-configure.'));
|
|
37
37
|
}
|
|
38
38
|
else if (error.response.status === 404) {
|
|
39
39
|
console.error(chalk_1.default.red(error.response.data?.message || `Variable "${key}" not found for crew "${crew.name}".`));
|
|
@@ -63,7 +63,7 @@ async function crewEnvList(crewArg, options = {}) {
|
|
|
63
63
|
catch (error) {
|
|
64
64
|
if (error.response) {
|
|
65
65
|
if (error.response.status === 401) {
|
|
66
|
-
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login
|
|
66
|
+
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global" to re-configure.'));
|
|
67
67
|
}
|
|
68
68
|
else if (error.response.status === 404) {
|
|
69
69
|
console.error(chalk_1.default.red(error.response.data?.message || `Crew "${crewArg}" not found.`));
|
|
@@ -72,7 +72,7 @@ async function crewEnvPush(crewArg, filePath = '.env', options = {}) {
|
|
|
72
72
|
}
|
|
73
73
|
catch (error) {
|
|
74
74
|
if (error.response?.status === 401) {
|
|
75
|
-
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login
|
|
75
|
+
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global" to re-configure.'));
|
|
76
76
|
}
|
|
77
77
|
else if (error.response?.status === 404) {
|
|
78
78
|
console.error(chalk_1.default.red(error.response.data?.message || `Crew "${crewArg}" not found.`));
|
|
@@ -58,7 +58,7 @@ async function crewEnvSet(crewArg, key, value, options = {}) {
|
|
|
58
58
|
catch (error) {
|
|
59
59
|
if (error.response) {
|
|
60
60
|
if (error.response.status === 401) {
|
|
61
|
-
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login
|
|
61
|
+
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global" to re-configure.'));
|
|
62
62
|
}
|
|
63
63
|
else if (error.response.status === 404) {
|
|
64
64
|
console.error(chalk_1.default.red(error.response.data?.message || `Crew "${crewArg}" not found.`));
|
|
@@ -159,7 +159,7 @@ async function docsUpload(files, options = {}) {
|
|
|
159
159
|
console.error(chalk_1.default.red(`✗ ${displayName} — ${data?.message || 'File exceeds the maximum upload size (20MB).'}`));
|
|
160
160
|
}
|
|
161
161
|
else if (status === 401) {
|
|
162
|
-
console.error(chalk_1.default.red(`✗ ${displayName} — Authentication failed. Run "solidactions login
|
|
162
|
+
console.error(chalk_1.default.red(`✗ ${displayName} — Authentication failed. Run "solidactions login --global" to re-configure.`));
|
|
163
163
|
}
|
|
164
164
|
else if (status === 404 && data?.code === 'media_not_found') {
|
|
165
165
|
console.error(chalk_1.default.red(`✗ ${displayName} — doc ${replaceDocId} is not a media doc`));
|
|
@@ -92,7 +92,7 @@ async function envDelete(keyOrProject, keyIfProject, options = {}) {
|
|
|
92
92
|
catch (error) {
|
|
93
93
|
if (error.response) {
|
|
94
94
|
if (error.response.status === 401) {
|
|
95
|
-
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login
|
|
95
|
+
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global" to re-configure.'));
|
|
96
96
|
}
|
|
97
97
|
else if (error.response.status === 404) {
|
|
98
98
|
if (isProjectMode) {
|
|
@@ -187,7 +187,7 @@ async function envList(projectName, options = {}) {
|
|
|
187
187
|
catch (error) {
|
|
188
188
|
if (error.response) {
|
|
189
189
|
if (error.response.status === 401) {
|
|
190
|
-
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login
|
|
190
|
+
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global" to re-configure.'));
|
|
191
191
|
}
|
|
192
192
|
else if (error.response.status === 404) {
|
|
193
193
|
if (projectName) {
|
package/dist/commands/env-map.js
CHANGED
|
@@ -63,7 +63,7 @@ async function envMap(projectName, projectKey, globalKey, options = {}) {
|
|
|
63
63
|
catch (error) {
|
|
64
64
|
if (error.response) {
|
|
65
65
|
if (error.response.status === 401) {
|
|
66
|
-
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login
|
|
66
|
+
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global" to re-configure.'));
|
|
67
67
|
}
|
|
68
68
|
else if (error.response.status === 404) {
|
|
69
69
|
console.error(chalk_1.default.red(`Project "${projectName}" not found.`));
|
|
@@ -205,12 +205,12 @@ async function envPull(projectName, options = {}) {
|
|
|
205
205
|
catch (error) {
|
|
206
206
|
if (error.response) {
|
|
207
207
|
if (error.response.status === 401) {
|
|
208
|
-
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login
|
|
208
|
+
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global" to re-configure.'));
|
|
209
209
|
}
|
|
210
210
|
else if (error.response.status === 404) {
|
|
211
211
|
console.error(chalk_1.default.red(`Project "${projectSlug}" not found.`));
|
|
212
212
|
if (environment !== 'production') {
|
|
213
|
-
console.log(chalk_1.default.gray(`Try deploying with: solidactions project deploy ${projectName}
|
|
213
|
+
console.log(chalk_1.default.gray(`Try deploying with: solidactions project deploy ${projectName} -e ${environment} --create`));
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
else {
|
|
@@ -96,12 +96,12 @@ async function envPush(projectName, sourcePath, options = {}) {
|
|
|
96
96
|
}
|
|
97
97
|
catch (error) {
|
|
98
98
|
if (error.response?.status === 401) {
|
|
99
|
-
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login
|
|
99
|
+
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global" to re-configure.'));
|
|
100
100
|
process.exit(1);
|
|
101
101
|
}
|
|
102
102
|
else if (error.response?.status === 404) {
|
|
103
103
|
console.error(chalk_1.default.red(`Project "${projectSlug}" not found.`));
|
|
104
|
-
console.log(chalk_1.default.gray(`Deploy first with: solidactions project deploy ${projectName}
|
|
104
|
+
console.log(chalk_1.default.gray(`Deploy first with: solidactions project deploy ${projectName} -e ${environment}` + (environment !== 'production' ? ' --create' : '')));
|
|
105
105
|
process.exit(1);
|
|
106
106
|
}
|
|
107
107
|
throw error;
|
package/dist/commands/env-set.js
CHANGED
|
@@ -106,7 +106,7 @@ async function envSet(keyOrProject, valueOrKey, valueIfProject, options = {}) {
|
|
|
106
106
|
catch (error) {
|
|
107
107
|
if (error.response) {
|
|
108
108
|
if (error.response.status === 401) {
|
|
109
|
-
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login
|
|
109
|
+
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global" to re-configure.'));
|
|
110
110
|
}
|
|
111
111
|
else if (error.response.status === 404) {
|
|
112
112
|
const envsList = await (0, api_1.describeProjectEnvironments)(config, projectName);
|
|
@@ -138,7 +138,11 @@ async function envSet(keyOrProject, valueOrKey, valueIfProject, options = {}) {
|
|
|
138
138
|
process.exit(1);
|
|
139
139
|
}
|
|
140
140
|
console.log(chalk_1.default.yellow(exports.GLOBAL_ENV_SCOPE_NOTE));
|
|
141
|
-
|
|
141
|
+
// Keep global and project writes consistent: names that commonly carry
|
|
142
|
+
// credentials are secrets unless the caller explicitly uses a plain
|
|
143
|
+
// name. `--secret` remains available for sensitive values whose names
|
|
144
|
+
// do not match this convention.
|
|
145
|
+
const isSecret = options.secret || /secret|key|token|password|credential/i.test(key);
|
|
142
146
|
// Build the request body with per-environment values
|
|
143
147
|
const body = {
|
|
144
148
|
key,
|
|
@@ -224,7 +228,7 @@ async function envSet(keyOrProject, valueOrKey, valueIfProject, options = {}) {
|
|
|
224
228
|
catch (error) {
|
|
225
229
|
if (error.response) {
|
|
226
230
|
if (error.response.status === 401) {
|
|
227
|
-
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login
|
|
231
|
+
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global" to re-configure.'));
|
|
228
232
|
}
|
|
229
233
|
else if (error.response.status === 422) {
|
|
230
234
|
console.error(chalk_1.default.red((0, api_1.formatValidationError)(error.response.data)));
|
package/dist/commands/login.js
CHANGED
|
@@ -3,6 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.API_KEY_PROMPT = void 0;
|
|
7
|
+
exports.resolveLoginApiKey = resolveLoginApiKey;
|
|
6
8
|
exports.getConfig = getConfig;
|
|
7
9
|
exports.saveConfig = saveConfig;
|
|
8
10
|
exports.clearConfig = clearConfig;
|
|
@@ -15,9 +17,56 @@ exports.whoami = whoami;
|
|
|
15
17
|
const fs_1 = __importDefault(require("fs"));
|
|
16
18
|
const readline_1 = __importDefault(require("readline"));
|
|
17
19
|
const chalk_1 = __importDefault(require("chalk"));
|
|
20
|
+
const prompts_1 = __importDefault(require("prompts"));
|
|
18
21
|
const config_1 = require("../utils/config");
|
|
19
22
|
const config_write_target_1 = require("../utils/config-write-target");
|
|
20
23
|
const workspace_lookup_1 = require("../utils/workspace-lookup");
|
|
24
|
+
exports.API_KEY_PROMPT = {
|
|
25
|
+
type: 'password',
|
|
26
|
+
name: 'apiKey',
|
|
27
|
+
message: 'SolidActions API key',
|
|
28
|
+
};
|
|
29
|
+
async function readAll(input) {
|
|
30
|
+
let value = '';
|
|
31
|
+
for await (const chunk of input) {
|
|
32
|
+
value += chunk.toString();
|
|
33
|
+
}
|
|
34
|
+
return value;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Resolve a login secret without requiring it in argv. The positional key is
|
|
38
|
+
* retained for backwards compatibility, while new interactive documentation
|
|
39
|
+
* uses the masked prompt and automation can opt into stdin explicitly.
|
|
40
|
+
*/
|
|
41
|
+
async function resolveLoginApiKey(apiKey, options = {}, dependencies = {}) {
|
|
42
|
+
if (apiKey && options.stdin) {
|
|
43
|
+
throw new Error('Pass the API key either as the legacy positional argument or via --stdin, not both.');
|
|
44
|
+
}
|
|
45
|
+
let resolved = apiKey;
|
|
46
|
+
if (options.stdin) {
|
|
47
|
+
resolved = await readAll(dependencies.input ?? process.stdin);
|
|
48
|
+
}
|
|
49
|
+
else if (!resolved) {
|
|
50
|
+
const isTTY = dependencies.isTTY ?? process.stdin.isTTY === true;
|
|
51
|
+
if (!isTTY) {
|
|
52
|
+
throw new Error('API key is required in non-interactive mode. Pipe it with --stdin, ' +
|
|
53
|
+
'or set SOLIDACTIONS_API_KEY without running login.');
|
|
54
|
+
}
|
|
55
|
+
const prompt = dependencies.prompt ?? (async () => {
|
|
56
|
+
const response = await (0, prompts_1.default)(exports.API_KEY_PROMPT);
|
|
57
|
+
return response.apiKey;
|
|
58
|
+
});
|
|
59
|
+
resolved = await prompt();
|
|
60
|
+
if (resolved === undefined) {
|
|
61
|
+
throw new Error('Login cancelled.');
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
const trimmed = resolved?.trim();
|
|
65
|
+
if (!trimmed) {
|
|
66
|
+
throw new Error('API key is required.');
|
|
67
|
+
}
|
|
68
|
+
return trimmed;
|
|
69
|
+
}
|
|
21
70
|
function getConfig() {
|
|
22
71
|
const resolved = (0, config_1.resolveConfig)();
|
|
23
72
|
return resolved ? resolved.config : null;
|
|
@@ -207,7 +256,7 @@ function whoami() {
|
|
|
207
256
|
const resolved = (0, config_1.resolveConfig)();
|
|
208
257
|
if (!resolved || !resolved.config.apiKey) {
|
|
209
258
|
console.log(chalk_1.default.yellow('Not initialized.'));
|
|
210
|
-
console.log(chalk_1.default.gray('Run "solidactions login
|
|
259
|
+
console.log(chalk_1.default.gray('Run "solidactions login --global" to configure.'));
|
|
211
260
|
process.exit(1);
|
|
212
261
|
}
|
|
213
262
|
const { config, sources } = resolved;
|
|
@@ -38,7 +38,7 @@ async function oauthActionsList(platform, options) {
|
|
|
38
38
|
console.error(chalk_1.default.red(`Unknown platform "${platform}". Run \`solidactions oauth-actions platforms\` to see available platforms.`));
|
|
39
39
|
}
|
|
40
40
|
else if (error.response?.status === 401) {
|
|
41
|
-
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login
|
|
41
|
+
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global".'));
|
|
42
42
|
}
|
|
43
43
|
else if (error.response) {
|
|
44
44
|
console.error(chalk_1.default.red(`Failed: ${error.response.status}`), error.response.data);
|
|
@@ -28,7 +28,7 @@ async function oauthActionsPlatforms(options) {
|
|
|
28
28
|
}
|
|
29
29
|
catch (error) {
|
|
30
30
|
if (error.response?.status === 401) {
|
|
31
|
-
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login
|
|
31
|
+
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global".'));
|
|
32
32
|
}
|
|
33
33
|
else if (error.response) {
|
|
34
34
|
console.error(chalk_1.default.red(`Failed: ${error.response.status}`), error.response.data);
|
|
@@ -49,7 +49,7 @@ async function oauthActionsSearch(platform, query, options) {
|
|
|
49
49
|
console.error(chalk_1.default.red(`Unknown platform "${platform}". Run \`solidactions oauth-actions platforms\` to see available platforms.`));
|
|
50
50
|
}
|
|
51
51
|
else if (error.response?.status === 401) {
|
|
52
|
-
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login
|
|
52
|
+
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global" to re-configure.'));
|
|
53
53
|
}
|
|
54
54
|
else if (error.response) {
|
|
55
55
|
console.error(chalk_1.default.red(`Failed: ${error.response.status}`), error.response.data);
|
|
@@ -26,7 +26,7 @@ async function oauthActionsShow(platform, actionId, options) {
|
|
|
26
26
|
console.error(chalk_1.default.red(`Action not found: ${platform}/${actionId}`));
|
|
27
27
|
}
|
|
28
28
|
else if (error.response?.status === 401) {
|
|
29
|
-
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login
|
|
29
|
+
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global".'));
|
|
30
30
|
}
|
|
31
31
|
else if (error.response) {
|
|
32
32
|
console.error(chalk_1.default.red(`Failed: ${error.response.status}`), error.response.data);
|
|
@@ -45,7 +45,7 @@ async function projectCreateWithConfig(name, options, config) {
|
|
|
45
45
|
catch (error) {
|
|
46
46
|
if (error.response) {
|
|
47
47
|
if (error.response.status === 401) {
|
|
48
|
-
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login
|
|
48
|
+
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global" to re-configure.'));
|
|
49
49
|
}
|
|
50
50
|
else {
|
|
51
51
|
console.error(chalk_1.default.red('Failed to create project:'), error.response.data?.message || error.message);
|
|
@@ -44,7 +44,7 @@ async function projectList(options = {}) {
|
|
|
44
44
|
catch (error) {
|
|
45
45
|
if (error.response) {
|
|
46
46
|
if (error.response.status === 401) {
|
|
47
|
-
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login
|
|
47
|
+
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global" to re-configure.'));
|
|
48
48
|
}
|
|
49
49
|
else {
|
|
50
50
|
console.error(chalk_1.default.red(`Failed: ${error.response.status}`), error.response.data);
|
|
@@ -45,7 +45,7 @@ async function logsBuild(projectName, environment) {
|
|
|
45
45
|
catch (error) {
|
|
46
46
|
if (error.response) {
|
|
47
47
|
if (error.response.status === 401) {
|
|
48
|
-
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login
|
|
48
|
+
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global" to re-configure.'));
|
|
49
49
|
}
|
|
50
50
|
else if (error.response.status === 404) {
|
|
51
51
|
console.error(chalk_1.default.red(error.response.data?.message ?? `Project "${projectName}" not found.`));
|
package/dist/commands/pull.js
CHANGED
|
@@ -70,7 +70,7 @@ async function pull(projectName, destPath, options = {}) {
|
|
|
70
70
|
console.error(chalk_1.default.red(`Project "${projectName}" not found.`));
|
|
71
71
|
}
|
|
72
72
|
else if (error.response.status === 401) {
|
|
73
|
-
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login
|
|
73
|
+
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global" to re-configure.'));
|
|
74
74
|
}
|
|
75
75
|
else {
|
|
76
76
|
console.error(chalk_1.default.red(`Failed: ${error.response.status}`));
|
|
@@ -82,7 +82,7 @@ async function runs(projectName, options = {}) {
|
|
|
82
82
|
console.error(chalk_1.default.yellow(`Pass -e <env> to disambiguate, e.g.: solidactions run list ${projectName} -e dev`));
|
|
83
83
|
}
|
|
84
84
|
else if (error.response.status === 401) {
|
|
85
|
-
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login
|
|
85
|
+
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global" to re-configure.'));
|
|
86
86
|
}
|
|
87
87
|
else {
|
|
88
88
|
console.error(chalk_1.default.red(`Failed: ${error.response.status}`), error.response.data);
|
|
@@ -69,7 +69,7 @@ async function run(projectName, workflowName, options) {
|
|
|
69
69
|
catch (error) {
|
|
70
70
|
if (error.response) {
|
|
71
71
|
if (error.response.status === 401) {
|
|
72
|
-
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login
|
|
72
|
+
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global" to re-configure.'));
|
|
73
73
|
}
|
|
74
74
|
else if (error.response.status === 404) {
|
|
75
75
|
const envsList = await (0, api_1.describeProjectEnvironments)(config, projectName);
|
|
@@ -110,7 +110,7 @@ async function runView(runId, options) {
|
|
|
110
110
|
catch (error) {
|
|
111
111
|
if (error.response) {
|
|
112
112
|
if (error.response.status === 401) {
|
|
113
|
-
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login
|
|
113
|
+
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global" to re-configure.'));
|
|
114
114
|
}
|
|
115
115
|
else if (error.response.status === 404) {
|
|
116
116
|
console.error(chalk_1.default.red('Run not found.'));
|
|
@@ -46,7 +46,7 @@ async function scheduleDelete(projectName, scheduleId, options = {}) {
|
|
|
46
46
|
catch (error) {
|
|
47
47
|
if (error.response) {
|
|
48
48
|
if (error.response.status === 401) {
|
|
49
|
-
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login
|
|
49
|
+
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global" to re-configure.'));
|
|
50
50
|
}
|
|
51
51
|
else if (error.response.status === 404) {
|
|
52
52
|
console.error(chalk_1.default.red(`Project "${projectName}" or schedule ${scheduleId} not found.`));
|
|
@@ -43,7 +43,7 @@ async function scheduleList(projectName) {
|
|
|
43
43
|
catch (error) {
|
|
44
44
|
if (error.response) {
|
|
45
45
|
if (error.response.status === 401) {
|
|
46
|
-
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login
|
|
46
|
+
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global" to re-configure.'));
|
|
47
47
|
}
|
|
48
48
|
else if (error.response.status === 404) {
|
|
49
49
|
console.error(chalk_1.default.red(`Project "${projectName}" not found.`));
|
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.EXISTING_SCHEDULE_CHOICES = void 0;
|
|
6
7
|
exports.buildSchedulePayload = buildSchedulePayload;
|
|
7
8
|
exports.timezoneMismatch = timezoneMismatch;
|
|
8
9
|
exports.timezoneMismatchRemedy = timezoneMismatchRemedy;
|
|
@@ -35,6 +36,10 @@ function timezoneMismatch(requested, returned) {
|
|
|
35
36
|
function timezoneMismatchRemedy(projectName) {
|
|
36
37
|
return `Your server may not support schedule timezones yet; update the server, or run 'solidactions schedule list ${projectName}' to find the schedule ID and remove it with: solidactions schedule delete ${projectName} <schedule-id>`;
|
|
37
38
|
}
|
|
39
|
+
exports.EXISTING_SCHEDULE_CHOICES = [
|
|
40
|
+
{ title: 'Replace existing schedule', value: 'replace' },
|
|
41
|
+
{ title: 'Cancel', value: 'cancel' },
|
|
42
|
+
];
|
|
38
43
|
async function scheduleSet(projectName, cron, options) {
|
|
39
44
|
const config = await (0, api_1.requireConfigWithWorkspace)();
|
|
40
45
|
// Parse input JSON if provided
|
|
@@ -68,23 +73,15 @@ async function scheduleSet(projectName, cron, options) {
|
|
|
68
73
|
type: 'select',
|
|
69
74
|
name: 'action',
|
|
70
75
|
message: 'What would you like to do?',
|
|
71
|
-
choices:
|
|
72
|
-
{ title: 'Replace existing schedule', value: 'replace' },
|
|
73
|
-
{ title: 'Add another schedule', value: 'add' },
|
|
74
|
-
{ title: 'Cancel', value: 'cancel' },
|
|
75
|
-
],
|
|
76
|
+
choices: exports.EXISTING_SCHEDULE_CHOICES,
|
|
76
77
|
});
|
|
77
78
|
if (confirm.action === 'cancel' || confirm.action === undefined) {
|
|
78
79
|
console.log(chalk_1.default.gray('Cancelled.'));
|
|
79
80
|
return;
|
|
80
81
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
headers: (0, api_1.getApiHeaders)(config),
|
|
85
|
-
});
|
|
86
|
-
console.log(chalk_1.default.gray(`Removed old schedule (${existing.cron_expression}).`));
|
|
87
|
-
}
|
|
82
|
+
// The API owns the one-schedule-per-workflow invariant and
|
|
83
|
+
// updates the existing row. Do not delete first: deletion
|
|
84
|
+
// loses YAML provenance and any persistent override state.
|
|
88
85
|
}
|
|
89
86
|
}
|
|
90
87
|
catch {
|
|
@@ -122,7 +119,7 @@ async function scheduleSet(projectName, cron, options) {
|
|
|
122
119
|
catch (error) {
|
|
123
120
|
if (error.response) {
|
|
124
121
|
if (error.response.status === 401) {
|
|
125
|
-
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login
|
|
122
|
+
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global" to re-configure.'));
|
|
126
123
|
}
|
|
127
124
|
else if (error.response.status === 404) {
|
|
128
125
|
console.error(chalk_1.default.red(`Project "${projectName}" not found.`));
|
|
@@ -50,7 +50,7 @@ async function webhookList(projectName, options = {}) {
|
|
|
50
50
|
catch (error) {
|
|
51
51
|
if (error.response) {
|
|
52
52
|
if (error.response.status === 401) {
|
|
53
|
-
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login
|
|
53
|
+
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global" to re-configure.'));
|
|
54
54
|
}
|
|
55
55
|
else if (error.response.status === 404) {
|
|
56
56
|
console.error(chalk_1.default.red(`Project "${projectName}" not found.`));
|
|
@@ -57,7 +57,7 @@ async function webhookSecret(projectName, options = {}) {
|
|
|
57
57
|
catch (error) {
|
|
58
58
|
if (error.response) {
|
|
59
59
|
if (error.response.status === 401) {
|
|
60
|
-
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login
|
|
60
|
+
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global" to re-configure.'));
|
|
61
61
|
}
|
|
62
62
|
else if (error.response.status === 404) {
|
|
63
63
|
console.error(chalk_1.default.red(`Project "${projectName}" not found.`));
|
package/dist/index.js
CHANGED
|
@@ -108,8 +108,9 @@ program.hook('preAction', (thisCommand, actionCommand) => {
|
|
|
108
108
|
// =============================================================================
|
|
109
109
|
program
|
|
110
110
|
.command('login')
|
|
111
|
-
.description('Authenticate the CLI
|
|
112
|
-
.argument('
|
|
111
|
+
.description('Authenticate the CLI (prompts securely for your API key)')
|
|
112
|
+
.argument('[api-key]', 'Legacy positional API key (prefer the masked prompt or --stdin)')
|
|
113
|
+
.option('--stdin', 'Read the API key from stdin (for non-interactive automation)')
|
|
113
114
|
.option('--dev', 'Use local development server (http://localhost:8000)')
|
|
114
115
|
.option('--host <url>', 'Custom API host URL')
|
|
115
116
|
.option('--workspace <name-or-id>', 'Set workspace by name, slug, or ID (skips interactive prompt). Non-interactive logins without this flag leave the workspace unset.')
|
|
@@ -117,7 +118,8 @@ program
|
|
|
117
118
|
.option('--global', 'Save config to ~/.solidactions/config.json (default if prompted)')
|
|
118
119
|
.option('--gitignore', 'With --local, add .solidactions/ to .gitignore without prompting')
|
|
119
120
|
.action(async (apiKey, options) => {
|
|
120
|
-
await (0, login_1.
|
|
121
|
+
const resolvedApiKey = await (0, login_1.resolveLoginApiKey)(apiKey, { stdin: options.stdin });
|
|
122
|
+
await (0, login_1.login)(resolvedApiKey, options);
|
|
121
123
|
});
|
|
122
124
|
program
|
|
123
125
|
.command('init')
|
package/dist/utils/api.js
CHANGED
|
@@ -108,7 +108,7 @@ function formatValidationError(data) {
|
|
|
108
108
|
function requireResolvedConfig() {
|
|
109
109
|
const resolved = (0, config_1.resolveConfig)();
|
|
110
110
|
if (!resolved || !resolved.config.apiKey) {
|
|
111
|
-
console.error(chalk_1.default.red('Not initialized. Run `solidactions login
|
|
111
|
+
console.error(chalk_1.default.red('Not initialized. Run `solidactions login --global` first.'));
|
|
112
112
|
process.exit(1);
|
|
113
113
|
}
|
|
114
114
|
return resolved;
|
|
@@ -123,7 +123,7 @@ function requireConfig() {
|
|
|
123
123
|
*/
|
|
124
124
|
function authFailureMessage(config, sources) {
|
|
125
125
|
const keySource = sources?.apiKey ?? 'config';
|
|
126
|
-
return `Authentication failed against ${config.host} (key from ${keySource}). Run \`solidactions login
|
|
126
|
+
return `Authentication failed against ${config.host} (key from ${keySource}). Run \`solidactions login --global\` to re-configure.`;
|
|
127
127
|
}
|
|
128
128
|
async function ensureWorkspaceSelected(config) {
|
|
129
129
|
if (config.workspaceId) {
|
package/dist/utils/github.js
CHANGED
|
@@ -3,12 +3,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.rawContentUrl = rawContentUrl;
|
|
6
7
|
exports.fetchRawFile = fetchRawFile;
|
|
7
8
|
exports.listRepoContents = listRepoContents;
|
|
8
9
|
const axios_1 = __importDefault(require("axios"));
|
|
10
|
+
const DEFAULT_RAW_CONTENT_BASE_URL = 'https://raw.githubusercontent.com';
|
|
11
|
+
function rawContentUrl(owner, repo, path, branch = 'main') {
|
|
12
|
+
const baseUrl = (process.env.SOLIDACTIONS_RAW_CONTENT_BASE_URL ?? DEFAULT_RAW_CONTENT_BASE_URL).replace(/\/$/, '');
|
|
13
|
+
return `${baseUrl}/${owner}/${repo}/${branch}/${path}`;
|
|
14
|
+
}
|
|
9
15
|
async function fetchRawFile(owner, repo, path, branch = 'main') {
|
|
10
16
|
try {
|
|
11
|
-
const url =
|
|
17
|
+
const url = rawContentUrl(owner, repo, path, branch);
|
|
12
18
|
const response = await axios_1.default.get(url, { responseType: 'text' });
|
|
13
19
|
return response.data;
|
|
14
20
|
}
|
package/dist/utils/skills.js
CHANGED
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.SOLIDACTIONS_SKILL_NAMES = void 0;
|
|
6
7
|
exports.skillTargetDir = skillTargetDir;
|
|
7
8
|
exports.installSkills = installSkills;
|
|
8
9
|
exports.fetchAiHelperContent = fetchAiHelperContent;
|
|
@@ -11,7 +12,7 @@ const fs_1 = __importDefault(require("fs"));
|
|
|
11
12
|
const path_1 = __importDefault(require("path"));
|
|
12
13
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
13
14
|
const github_1 = require("./github");
|
|
14
|
-
|
|
15
|
+
exports.SOLIDACTIONS_SKILL_NAMES = [
|
|
15
16
|
'solidactions-getting-started',
|
|
16
17
|
'solidactions-workflow-coding',
|
|
17
18
|
'solidactions-deploy-and-config',
|
|
@@ -44,7 +45,7 @@ function skillTargetDir(targetFile, cwd = process.cwd()) {
|
|
|
44
45
|
async function installSkills(targetDir) {
|
|
45
46
|
const written = [];
|
|
46
47
|
fs_extra_1.default.ensureDirSync(targetDir);
|
|
47
|
-
for (const skillName of
|
|
48
|
+
for (const skillName of exports.SOLIDACTIONS_SKILL_NAMES) {
|
|
48
49
|
const remotePath = `${SKILLS_PATH_PREFIX}/${skillName}.md`;
|
|
49
50
|
const content = await (0, github_1.fetchRawFile)(EXAMPLES_OWNER, EXAMPLES_REPO, remotePath);
|
|
50
51
|
const filePath = path_1.default.join(targetDir, `${skillName}.md`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solidactions/cli",
|
|
3
|
-
"version": "1.31.
|
|
3
|
+
"version": "1.31.1",
|
|
4
4
|
"description": "SolidActions CLI - Deploy and manage workflow automation",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -33,24 +33,27 @@
|
|
|
33
33
|
],
|
|
34
34
|
"scripts": {
|
|
35
35
|
"build": "tsc && cp src/commands/dev-shim.mjs dist/commands/dev-shim.mjs",
|
|
36
|
+
"check:release": "npm run build && npm run test && npm run smoke:init",
|
|
36
37
|
"prepublishOnly": "npm run build",
|
|
38
|
+
"smoke:init": "node scripts/smoke-init.mjs",
|
|
37
39
|
"test": "vitest run",
|
|
38
40
|
"test:watch": "vitest"
|
|
39
41
|
},
|
|
40
42
|
"dependencies": {
|
|
41
43
|
"archiver": "^7.0.0",
|
|
42
|
-
"axios": "^1.
|
|
44
|
+
"axios": "^1.18.1",
|
|
43
45
|
"chalk": "^4.1.2",
|
|
44
46
|
"commander": "^11.0.0",
|
|
45
47
|
"dotenv": "^17.3.1",
|
|
46
|
-
"form-data": "^4.0.
|
|
48
|
+
"form-data": "^4.0.6",
|
|
47
49
|
"fs-extra": "^11.0.0",
|
|
48
50
|
"ignore": "^7.0.5",
|
|
49
|
-
"js-yaml": "^4.
|
|
51
|
+
"js-yaml": "^4.3.0",
|
|
50
52
|
"prompts": "^2.4.2",
|
|
51
|
-
"tar": "^7.5.
|
|
53
|
+
"tar": "^7.5.20"
|
|
52
54
|
},
|
|
53
55
|
"devDependencies": {
|
|
56
|
+
"@solidactions/sdk": "^0.7.3",
|
|
54
57
|
"@types/archiver": "^6.0.0",
|
|
55
58
|
"@types/fs-extra": "^11.0.0",
|
|
56
59
|
"@types/js-yaml": "^4.0.9",
|