@solidactions/cli 2.0.2 → 3.0.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 +23 -6
- package/dist/commands/{oauth-actions-list.js → oauth-action-list.js} +4 -4
- package/dist/commands/{oauth-actions-platforms.js → oauth-action-platforms.js} +2 -2
- package/dist/commands/{oauth-actions-search.js → oauth-action-search.js} +4 -4
- package/dist/commands/{oauth-actions-show.js → oauth-action-view.js} +2 -2
- package/dist/index.js +15 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -307,7 +307,7 @@ first three in one command.
|
|
|
307
307
|
|
|
308
308
|
1. **Build** — `npm run build` (must be clean; `tsc` errors block the release).
|
|
309
309
|
2. **Unit tests** — `npm test`. Covers config resolution, command wiring, and
|
|
310
|
-
the `oauth-
|
|
310
|
+
the `oauth-action view` snippet renderer (the highest-risk regression
|
|
311
311
|
surface — array query-param serialization and the proxy-managed header
|
|
312
312
|
filter both have fixture-backed tests under `tests/fixtures/`).
|
|
313
313
|
3. **Init smoke** — `npm run smoke:init` scaffolds a project end to end.
|
|
@@ -330,8 +330,8 @@ first three in one command.
|
|
|
330
330
|
```bash
|
|
331
331
|
SOLIDACTIONS_SMOKE_REQUIRE_SOURCES=1 npm run check:release
|
|
332
332
|
```
|
|
333
|
-
4. **oauth-
|
|
334
|
-
`oauth-
|
|
333
|
+
4. **oauth-action smoke** — `bash scripts/smoke.sh` exercises
|
|
334
|
+
`oauth-action list|search|view` (plus the 404 path) against a real local
|
|
335
335
|
stub server, so it needs no credentials:
|
|
336
336
|
|
|
337
337
|
```bash
|
|
@@ -365,9 +365,26 @@ first three in one command.
|
|
|
365
365
|
check:release`, which serves content at exactly that ref and so fails on a
|
|
366
366
|
bad or unreachable pin. `tests/examples-ref.test.ts` fails if any call site
|
|
367
367
|
stops passing the ref.
|
|
368
|
-
7. **Version
|
|
369
|
-
|
|
370
|
-
|
|
368
|
+
7. **Version** — the GitHub release **tag** is the single source of truth for
|
|
369
|
+
the published npm version. The publish flow from #78 has landed:
|
|
370
|
+
`.github/workflows/publish.yml` asserts the tag is a literal semver, then
|
|
371
|
+
derives the version from it with `npm version --no-git-tag-version`
|
|
372
|
+
immediately before publishing — deliberately *not* relying on a
|
|
373
|
+
`package.json` bump commit, so a release whose `package.json` was never
|
|
374
|
+
bumped can no longer collide with the registry and fail `npm publish`
|
|
375
|
+
silently (#77).
|
|
376
|
+
|
|
377
|
+
Consequences worth knowing before you cut a release:
|
|
378
|
+
|
|
379
|
+
- **`package.json`'s version is not the source of truth** and has drifted
|
|
380
|
+
from the published one. Read the registry (`npm view @solidactions/cli
|
|
381
|
+
version`) or the tag list, not the file.
|
|
382
|
+
- **Feature PRs do not bump it** — see PR #81, the `docs` → `doc` breaking
|
|
383
|
+
rename, which shipped without touching `package.json`.
|
|
384
|
+
- **A breaking change ships as a major tag.** Nothing in `check:release`
|
|
385
|
+
enforces this — the release destination is recorded in the PR and its
|
|
386
|
+
issue, and the releaser applies it when tagging. There is no changelog
|
|
387
|
+
file in this repo.
|
|
371
388
|
|
|
372
389
|
## License
|
|
373
390
|
|
|
@@ -3,11 +3,11 @@ 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.
|
|
6
|
+
exports.oauthActionList = oauthActionList;
|
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
|
8
8
|
const chalk_1 = __importDefault(require("chalk"));
|
|
9
9
|
const api_1 = require("../utils/api");
|
|
10
|
-
async function
|
|
10
|
+
async function oauthActionList(platform, options) {
|
|
11
11
|
const config = await (0, api_1.requireConfigWithWorkspace)();
|
|
12
12
|
try {
|
|
13
13
|
const params = { platform };
|
|
@@ -31,11 +31,11 @@ async function oauthActionsList(platform, options) {
|
|
|
31
31
|
console.log(`${chalk_1.default.cyan(method)} ${chalk_1.default.white(a.path.padEnd(50))} ${chalk_1.default.gray('— ' + (a.title || ''))}`);
|
|
32
32
|
}
|
|
33
33
|
console.log('');
|
|
34
|
-
console.log(chalk_1.default.gray(`${actions.length} action(s) — use "solidactions oauth-
|
|
34
|
+
console.log(chalk_1.default.gray(`${actions.length} action(s) — use "solidactions oauth-action search ${platform} <query>" to narrow, or "oauth-action view ${platform} <action_id>" for detail.`));
|
|
35
35
|
}
|
|
36
36
|
catch (error) {
|
|
37
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-
|
|
38
|
+
console.error(chalk_1.default.red(`Unknown platform "${platform}". Run \`solidactions oauth-action platforms\` to see available platforms.`));
|
|
39
39
|
}
|
|
40
40
|
else if (error.response?.status === 401) {
|
|
41
41
|
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global".'));
|
|
@@ -3,11 +3,11 @@ 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.
|
|
6
|
+
exports.oauthActionPlatforms = oauthActionPlatforms;
|
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
|
8
8
|
const chalk_1 = __importDefault(require("chalk"));
|
|
9
9
|
const api_1 = require("../utils/api");
|
|
10
|
-
async function
|
|
10
|
+
async function oauthActionPlatforms(options) {
|
|
11
11
|
const config = await (0, api_1.requireConfigWithWorkspace)();
|
|
12
12
|
try {
|
|
13
13
|
const response = await axios_1.default.get(`${config.host}/api/v1/oauth-actions/platforms`, {
|
|
@@ -3,11 +3,11 @@ 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.
|
|
6
|
+
exports.oauthActionSearch = oauthActionSearch;
|
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
|
8
8
|
const chalk_1 = __importDefault(require("chalk"));
|
|
9
9
|
const api_1 = require("../utils/api");
|
|
10
|
-
async function
|
|
10
|
+
async function oauthActionSearch(platform, query, options) {
|
|
11
11
|
const config = await (0, api_1.requireConfigWithWorkspace)();
|
|
12
12
|
try {
|
|
13
13
|
const params = { platform };
|
|
@@ -42,11 +42,11 @@ async function oauthActionsSearch(platform, query, options) {
|
|
|
42
42
|
console.log('');
|
|
43
43
|
}
|
|
44
44
|
console.log(chalk_1.default.gray(`${actions.length} action(s) found.`));
|
|
45
|
-
console.log(chalk_1.default.gray(`Run 'solidactions oauth-
|
|
45
|
+
console.log(chalk_1.default.gray(`Run 'solidactions oauth-action view ${platform} <action_id>' for full schema + paste-ready snippet.`));
|
|
46
46
|
}
|
|
47
47
|
catch (error) {
|
|
48
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-
|
|
49
|
+
console.error(chalk_1.default.red(`Unknown platform "${platform}". Run \`solidactions oauth-action platforms\` to see available platforms.`));
|
|
50
50
|
}
|
|
51
51
|
else if (error.response?.status === 401) {
|
|
52
52
|
console.error(chalk_1.default.red('Authentication failed. Run "solidactions login --global" to re-configure.'));
|
|
@@ -3,12 +3,12 @@ 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.
|
|
6
|
+
exports.oauthActionView = oauthActionView;
|
|
7
7
|
exports.buildSnippet = buildSnippet;
|
|
8
8
|
const axios_1 = __importDefault(require("axios"));
|
|
9
9
|
const chalk_1 = __importDefault(require("chalk"));
|
|
10
10
|
const api_1 = require("../utils/api");
|
|
11
|
-
async function
|
|
11
|
+
async function oauthActionView(platform, actionId, options) {
|
|
12
12
|
const config = await (0, api_1.requireConfigWithWorkspace)();
|
|
13
13
|
try {
|
|
14
14
|
const response = await axios_1.default.get(`${config.host}/api/v1/oauth-actions/${platform}/${encodeURIComponent(actionId)}`, {
|
package/dist/index.js
CHANGED
|
@@ -63,10 +63,10 @@ const webhook_secret_1 = require("./commands/webhook-secret");
|
|
|
63
63
|
const dev_1 = require("./commands/dev");
|
|
64
64
|
const ai_init_1 = require("./commands/ai-init");
|
|
65
65
|
const ai_examples_1 = require("./commands/ai-examples");
|
|
66
|
-
const
|
|
67
|
-
const
|
|
68
|
-
const
|
|
69
|
-
const
|
|
66
|
+
const oauth_action_search_1 = require("./commands/oauth-action-search");
|
|
67
|
+
const oauth_action_list_1 = require("./commands/oauth-action-list");
|
|
68
|
+
const oauth_action_view_1 = require("./commands/oauth-action-view");
|
|
69
|
+
const oauth_action_platforms_1 = require("./commands/oauth-action-platforms");
|
|
70
70
|
const workspaces_1 = require("./commands/workspaces");
|
|
71
71
|
const skill_push_1 = require("./commands/skill-push");
|
|
72
72
|
const skill_publish_1 = require("./commands/skill-publish");
|
|
@@ -499,41 +499,41 @@ Where the pin is saved (--local / --global):
|
|
|
499
499
|
await (0, workspaces_1.workspaceSet)(input, opts);
|
|
500
500
|
});
|
|
501
501
|
// =============================================================================
|
|
502
|
-
// oauth-
|
|
502
|
+
// oauth-action <subcommand>
|
|
503
503
|
// =============================================================================
|
|
504
|
-
const
|
|
505
|
-
|
|
504
|
+
const oauthActionCmd = program.command('oauth-action').description('Discover OAuth-backed API operations callable via the SA proxy');
|
|
505
|
+
oauthActionCmd
|
|
506
506
|
.command('search <platform> [query]')
|
|
507
507
|
.description('Search available actions for a connected platform')
|
|
508
508
|
.option('--method <method>', 'Filter by HTTP method (GET, POST, etc.)')
|
|
509
509
|
.option('--limit <n>', 'Maximum results to return', (v) => parseInt(v, 10))
|
|
510
510
|
.option('--json', 'Emit raw JSON for AI/script consumption')
|
|
511
511
|
.action((platform, query, options) => {
|
|
512
|
-
(0,
|
|
512
|
+
(0, oauth_action_search_1.oauthActionSearch)(platform, query, options);
|
|
513
513
|
});
|
|
514
|
-
|
|
514
|
+
oauthActionCmd
|
|
515
515
|
.command('list <platform>')
|
|
516
516
|
.description('List actions for a connected platform')
|
|
517
517
|
.option('--limit <n>', 'Maximum results to return', (v) => parseInt(v, 10))
|
|
518
518
|
.option('--json', 'Emit raw JSON for AI/script consumption')
|
|
519
519
|
.action((platform, options) => {
|
|
520
|
-
(0,
|
|
520
|
+
(0, oauth_action_list_1.oauthActionList)(platform, options);
|
|
521
521
|
});
|
|
522
|
-
|
|
523
|
-
.command('
|
|
522
|
+
oauthActionCmd
|
|
523
|
+
.command('view <platform> <action-id>')
|
|
524
524
|
.description('Show full schema, example body, and a paste-ready fetch snippet for one action')
|
|
525
525
|
.option('--json', 'Emit raw JSON for AI/script consumption')
|
|
526
526
|
.option('--var <NAME>', 'ctx.vars variable name for the connection (default: YOUR_CONNECTION)')
|
|
527
527
|
.option('--legacy-env', 'Emit the deprecated process.env-based snippet (will be removed in a future release)')
|
|
528
528
|
.action((platform, actionId, options) => {
|
|
529
|
-
(0,
|
|
529
|
+
(0, oauth_action_view_1.oauthActionView)(platform, actionId, options);
|
|
530
530
|
});
|
|
531
|
-
|
|
531
|
+
oauthActionCmd
|
|
532
532
|
.command('platforms')
|
|
533
533
|
.description('List available OAuth-backed platforms')
|
|
534
534
|
.option('--json', 'Emit raw JSON for AI/script consumption')
|
|
535
535
|
.action((options) => {
|
|
536
|
-
(0,
|
|
536
|
+
(0, oauth_action_platforms_1.oauthActionPlatforms)(options);
|
|
537
537
|
});
|
|
538
538
|
// =============================================================================
|
|
539
539
|
// ai <subcommand>
|