@solidactions/cli 1.24.0 → 1.25.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/README.md CHANGED
@@ -109,7 +109,7 @@ Use `solidactions <command> --help` for full flag details on any command.
109
109
 
110
110
  | Command | Key Flags | Description |
111
111
  |---------|-----------|-------------|
112
- | `run start <project> <workflow>` | `-e`, `-i`, `-w` | Trigger a workflow run |
112
+ | `run start <project> <workflow>` | `-e`, `-i`, `--wait` | Trigger a workflow run |
113
113
  | `run list [project]` | `--json`, `--detailed`, `--status`, `--since`, `--workflow`, `--limit`, `--offset` | List and filter runs |
114
114
  | `run view <run-id>` | `--json`, `--timeline`, `--steps`, `--logs` | Inspect a run |
115
115
 
@@ -129,7 +129,7 @@ Use `solidactions <command> --help` for full flag details on any command.
129
129
 
130
130
  | Command | Key Flags | Description |
131
131
  |---------|-----------|-------------|
132
- | `schedule set <project> <cron>` | `-w`, `-i`, `-y` | Set cron schedule (warns if exists) |
132
+ | `schedule set <project> <cron>` | `--workflow`, `-i`, `-y` | Set cron schedule (warns if exists) |
133
133
  | `schedule list <project>` | | List schedules |
134
134
  | `schedule delete <project> <id>` | `-y` | Delete a schedule |
135
135
 
@@ -23,7 +23,7 @@ async function oauthActionsList(platform, options) {
23
23
  return;
24
24
  }
25
25
  if (actions.length === 0) {
26
- console.log(`No actions found for "${platform}" — check the platform name and that a connection exists (\`solidactions env pull --update-oauth\` syncs connections).`);
26
+ console.log(`No actions found for platform "${platform}".`);
27
27
  return;
28
28
  }
29
29
  for (const a of actions) {
@@ -34,7 +34,10 @@ async function oauthActionsList(platform, options) {
34
34
  console.log(chalk_1.default.gray(`${actions.length} action(s) — use "solidactions oauth-actions search ${platform} <query>" to narrow, or "oauth-actions show ${platform} <action_id>" for detail.`));
35
35
  }
36
36
  catch (error) {
37
- if (error.response?.status === 401) {
37
+ if (error.response?.status === 404 && error.response.data?.code === 'platform_unknown') {
38
+ console.error(chalk_1.default.red(`Unknown platform "${platform}". Run \`solidactions oauth-actions platforms\` to see available platforms.`));
39
+ }
40
+ else if (error.response?.status === 401) {
38
41
  console.error(chalk_1.default.red('Authentication failed. Run "solidactions login <api-key>".'));
39
42
  }
40
43
  else if (error.response) {
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.oauthActionsPlatforms = oauthActionsPlatforms;
7
+ const axios_1 = __importDefault(require("axios"));
8
+ const chalk_1 = __importDefault(require("chalk"));
9
+ const api_1 = require("../utils/api");
10
+ async function oauthActionsPlatforms(options) {
11
+ const config = await (0, api_1.requireConfigWithWorkspace)();
12
+ try {
13
+ const response = await axios_1.default.get(`${config.host}/api/v1/oauth-actions/platforms`, {
14
+ headers: (0, api_1.getApiHeaders)(config),
15
+ });
16
+ const platforms = response.data.platforms || [];
17
+ if (options.json) {
18
+ process.stdout.write(JSON.stringify(platforms, null, 2) + '\n');
19
+ return;
20
+ }
21
+ if (platforms.length === 0) {
22
+ console.log('No platforms available.');
23
+ return;
24
+ }
25
+ for (const platform of platforms) {
26
+ console.log(platform);
27
+ }
28
+ }
29
+ catch (error) {
30
+ if (error.response?.status === 401) {
31
+ console.error(chalk_1.default.red('Authentication failed. Run "solidactions login <api-key>".'));
32
+ }
33
+ else if (error.response) {
34
+ console.error(chalk_1.default.red(`Failed: ${error.response.status}`), error.response.data);
35
+ }
36
+ else {
37
+ console.error(chalk_1.default.red('Connection failed:'), error.message);
38
+ }
39
+ process.exit(1);
40
+ }
41
+ }
@@ -27,7 +27,7 @@ async function oauthActionsSearch(platform, query, options) {
27
27
  return;
28
28
  }
29
29
  if (actions.length === 0) {
30
- console.log(`No actions found for "${platform}" — check the platform name and that a connection exists (\`solidactions env pull --update-oauth\` syncs connections).`);
30
+ console.log(`No actions found for platform "${platform}".`);
31
31
  return;
32
32
  }
33
33
  for (const a of actions) {
@@ -45,7 +45,10 @@ async function oauthActionsSearch(platform, query, options) {
45
45
  console.log(chalk_1.default.gray(`Run 'solidactions oauth-actions show ${platform} <action_id>' for full schema + paste-ready snippet.`));
46
46
  }
47
47
  catch (error) {
48
- if (error.response?.status === 401) {
48
+ if (error.response?.status === 404 && error.response.data?.code === 'platform_unknown') {
49
+ console.error(chalk_1.default.red(`Unknown platform "${platform}". Run \`solidactions oauth-actions platforms\` to see available platforms.`));
50
+ }
51
+ else if (error.response?.status === 401) {
49
52
  console.error(chalk_1.default.red('Authentication failed. Run "solidactions login <api-key>" to re-configure.'));
50
53
  }
51
54
  else if (error.response) {
package/dist/index.js CHANGED
@@ -33,6 +33,7 @@ const ai_examples_1 = require("./commands/ai-examples");
33
33
  const oauth_actions_search_1 = require("./commands/oauth-actions-search");
34
34
  const oauth_actions_list_1 = require("./commands/oauth-actions-list");
35
35
  const oauth_actions_show_1 = require("./commands/oauth-actions-show");
36
+ const oauth_actions_platforms_1 = require("./commands/oauth-actions-platforms");
36
37
  const workspaces_1 = require("./commands/workspaces");
37
38
  const skill_push_1 = require("./commands/skill-push");
38
39
  const skill_pull_1 = require("./commands/skill-pull");
@@ -210,7 +211,7 @@ runCmd
210
211
  .argument('<workflow>', 'Workflow name')
211
212
  .option('-e, --env <environment>', 'Environment (production/staging/dev)', 'dev')
212
213
  .option('-i, --input <json>', 'JSON input for the workflow')
213
- .option('-w, --wait', 'Wait for the workflow to complete')
214
+ .option('--wait', 'Wait for the workflow to complete')
214
215
  .action((projectName, workflow, options) => {
215
216
  (0, run_start_1.run)(projectName, workflow, options);
216
217
  });
@@ -423,6 +424,13 @@ oauthActionsCmd
423
424
  .action((platform, actionId, options) => {
424
425
  (0, oauth_actions_show_1.oauthActionsShow)(platform, actionId, options);
425
426
  });
427
+ oauthActionsCmd
428
+ .command('platforms')
429
+ .description('List available OAuth-backed platforms')
430
+ .option('--json', 'Emit raw JSON for AI/script consumption')
431
+ .action((options) => {
432
+ (0, oauth_actions_platforms_1.oauthActionsPlatforms)(options);
433
+ });
426
434
  // =============================================================================
427
435
  // ai <subcommand>
428
436
  // =============================================================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidactions/cli",
3
- "version": "1.24.0",
3
+ "version": "1.25.0",
4
4
  "description": "SolidActions CLI - Deploy and manage workflow automation",
5
5
  "main": "dist/index.js",
6
6
  "bin": {