@roarkanalytics/cli 0.31.1 → 0.32.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/CHANGELOG.md +14 -0
- package/README.md +0 -22
- package/commands.js +2 -2
- package/npm-shrinkwrap.json +5 -5
- package/package.json +1 -1
- package/runtime/commands/auth.js +17 -3
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.32.1](https://github.com/roarkhq/cli-roark-analytics/compare/v0.32.0...v0.32.1) (2026-09-30)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **auth:** `auth status` reports the project a user credential already falls back to ([#81](https://github.com/roarkhq/cli-roark-analytics/issues/81)) ([4274667](https://github.com/roarkhq/cli-roark-analytics/commit/427466763aac7cf8144c455d3a2c78c1ba91ae03))
|
|
9
|
+
|
|
10
|
+
## [0.32.0](https://github.com/roarkhq/cli-roark-analytics/compare/v0.31.1...v0.32.0) (2026-09-29)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **cli:** cli update ([#79](https://github.com/roarkhq/cli-roark-analytics/issues/79)) ([9147caa](https://github.com/roarkhq/cli-roark-analytics/commit/9147caab0016324dd5307014257ca497e32aaaac))
|
|
16
|
+
|
|
3
17
|
## [0.31.1](https://github.com/roarkhq/cli-roark-analytics/compare/v0.31.0...v0.31.1) (2026-09-29)
|
|
4
18
|
|
|
5
19
|
|
package/README.md
CHANGED
|
@@ -40,28 +40,6 @@ a stored or environment credential to it. Pass `--allow-project-base-url` (or se
|
|
|
40
40
|
`ROARK_ALLOW_PROJECT_BASE_URL`) once you have read the file, or `--token` to send a
|
|
41
41
|
different credential.
|
|
42
42
|
|
|
43
|
-
## Choose a project
|
|
44
|
-
|
|
45
|
-
`auth login` gives you a credential that acts as you, and it can reach every project
|
|
46
|
-
you belong to. So commands need to know which project they act on. The login writes
|
|
47
|
-
the project you picked on the consent screen, and after that there is nothing to do:
|
|
48
|
-
|
|
49
|
-
```sh
|
|
50
|
-
roark config set project <project-id> # change it
|
|
51
|
-
roark config get project # see it
|
|
52
|
-
roark agent list --project <id> # just this once
|
|
53
|
-
export ROARK_PROJECT_ID="..." # or for a shell
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Precedence is the usual one: `--project`, then `ROARK_PROJECT_ID`, then `.roark.json`,
|
|
57
|
-
then the user config. Committing `{"project": "..."}` in a repository's `.roark.json`
|
|
58
|
-
is the intended way to pin a checkout to one project, and unlike `baseURL` it needs no
|
|
59
|
-
opt-in: a project id chooses which of your own projects you act on, it cannot send your
|
|
60
|
-
credential anywhere new.
|
|
61
|
-
|
|
62
|
-
If you authenticate with a **project API key** instead, the key already names its
|
|
63
|
-
project and all of this is ignored.
|
|
64
|
-
|
|
65
43
|
## Usage
|
|
66
44
|
|
|
67
45
|
Commands read noun before verb, and the verb is one of `list`, `get`, `create`,
|
package/commands.js
CHANGED
|
@@ -1796,7 +1796,7 @@ exports.COMMANDS = [
|
|
|
1796
1796
|
httpMethod: 'post',
|
|
1797
1797
|
httpPath: '/v1/config/apply',
|
|
1798
1798
|
summary: 'Apply a config bundle',
|
|
1799
|
-
description: 'Reconcile a config-as-code bundle
|
|
1799
|
+
description: 'Reconcile a config-as-code bundle. With a PROJECT API key, submit project-scoped resources (agents, personas, flows, collectors, metrics, ...). With an ORGANIZATION API key, submit `kind: project` resources, each optionally carrying its members and its own nested `resources`. Submit the full desired set; managed resources are updated, new ones created, and (unless prune is false) managed resources absent from the bundle are deleted. Identity is by name.',
|
|
1800
1800
|
positionals: [],
|
|
1801
1801
|
flags: [
|
|
1802
1802
|
{
|
|
@@ -1830,7 +1830,7 @@ exports.COMMANDS = [
|
|
|
1830
1830
|
httpMethod: 'post',
|
|
1831
1831
|
httpPath: '/v1/config/diff',
|
|
1832
1832
|
summary: 'Diff a config bundle',
|
|
1833
|
-
description: 'Dry run for
|
|
1833
|
+
description: 'Dry run for an apply: returns the projected changes (create / update / delete) for the submitted bundle without writing anything. Works for both project and organization keys.',
|
|
1834
1834
|
positionals: [],
|
|
1835
1835
|
flags: [
|
|
1836
1836
|
{
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roarkanalytics/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@roarkanalytics/cli",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.32.1",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@roarkanalytics/sdk": "^4.15.0",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"node_modules/@roarkanalytics/sdk": {
|
|
24
|
-
"version": "4.
|
|
25
|
-
"resolved": "https://registry.npmjs.org/@roarkanalytics/sdk/-/sdk-4.
|
|
26
|
-
"integrity": "sha512
|
|
24
|
+
"version": "4.18.0",
|
|
25
|
+
"resolved": "https://registry.npmjs.org/@roarkanalytics/sdk/-/sdk-4.18.0.tgz",
|
|
26
|
+
"integrity": "sha512-+s6s6Owxqe/Mvh6/7TkNbYcVtsrdjYYciRrpinTSURliSnM+T63XWZW0lkEuIvn4d+Y/BTbNDtRtP14aCpw72A==",
|
|
27
27
|
"license": "Apache-2.0"
|
|
28
28
|
},
|
|
29
29
|
"node_modules/commander": {
|
package/package.json
CHANGED
package/runtime/commands/auth.js
CHANGED
|
@@ -58,7 +58,12 @@ const describeCredential = async (clientFor) => {
|
|
|
58
58
|
};
|
|
59
59
|
try {
|
|
60
60
|
const me = (await client.get(AUTH_DESCRIBE_PATH));
|
|
61
|
-
return {
|
|
61
|
+
return {
|
|
62
|
+
kind: 'live',
|
|
63
|
+
scope: me.data?.tokenScope,
|
|
64
|
+
email: me.data?.user?.email ?? null,
|
|
65
|
+
...(me.data?.defaultProject?.id ? { defaultProject: me.data.defaultProject.id } : {}),
|
|
66
|
+
};
|
|
62
67
|
}
|
|
63
68
|
catch (error) {
|
|
64
69
|
if (error.status !== 404)
|
|
@@ -275,10 +280,19 @@ const registerAuthCommands = (root, binaryName, clientFor) => {
|
|
|
275
280
|
if (state.scope === 'USER') {
|
|
276
281
|
// A user credential reaches every project you belong to, so which one it acts on is part
|
|
277
282
|
// of the answer, not a detail.
|
|
283
|
+
//
|
|
284
|
+
// Three cases, not two. A locally configured project wins; failing that the credential's
|
|
285
|
+
// own default is what the API will use, and saying "commands will fail" there would be
|
|
286
|
+
// plainly wrong (they succeed). Only a credential with neither is actually stuck.
|
|
278
287
|
const project = (0, config_1.loadConfig)().project;
|
|
279
|
-
|
|
288
|
+
const message = project ?
|
|
280
289
|
`Acting on project ${project}. Change it with \`${binaryName} config set project <id>\`.`
|
|
281
|
-
:
|
|
290
|
+
: state.defaultProject ?
|
|
291
|
+
`Acting on project ${state.defaultProject}, the default stored on this credential. ` +
|
|
292
|
+
`Override it with \`${binaryName} config set project <id>\`.`
|
|
293
|
+
: `No project selected, and this credential has no default: project commands will fail until ` +
|
|
294
|
+
`you run \`${binaryName} config set project <id>\`. \`${binaryName} project list\` shows the ids.`;
|
|
295
|
+
(0, output_1.write)((0, output_1.paint)(message, 'dim', color), process.stderr);
|
|
282
296
|
}
|
|
283
297
|
}
|
|
284
298
|
if (fromEnv && stored) {
|
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.
|
|
1
|
+
export declare const version = "0.32.1";
|
package/version.js
CHANGED