@revturbine/cli 0.16.1 → 0.16.2
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 +10 -10
- package/dist/cli.js +20 -20
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# revturbine-cli (`revturbine`)
|
|
2
2
|
|
|
3
|
-
Validate [RevTurbine](https://revturbine.com) **
|
|
3
|
+
Validate [RevTurbine](https://revturbine.com) **Playbooks** and ship them to
|
|
4
4
|
a RevTurbine instance through the playbook-version lifecycle (draft → Release) —
|
|
5
5
|
from the terminal, the same operations the in-app studios perform.
|
|
6
6
|
|
|
@@ -39,11 +39,11 @@ Requires Node ≥ 22.13. Source builds use the npm 11.18.0 version declared in
|
|
|
39
39
|
```bash
|
|
40
40
|
revturbine signup # create an account (email + password + emailed code)
|
|
41
41
|
revturbine login # authorize this machine (device flow)
|
|
42
|
-
revturbine download --live --save ./
|
|
43
|
-
# …edit ./
|
|
44
|
-
revturbine validate ./
|
|
45
|
-
revturbine diff ./
|
|
46
|
-
revturbine launch ./
|
|
42
|
+
revturbine download --live --save ./revturbine.playbook.json
|
|
43
|
+
# …edit ./revturbine.playbook.json…
|
|
44
|
+
revturbine validate ./revturbine.playbook.json # schema-validate locally (no network)
|
|
45
|
+
revturbine diff ./revturbine.playbook.json --live # what would change (no writes)
|
|
46
|
+
revturbine launch ./revturbine.playbook.json # upload, gate, and go live
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
`revturbine <command> --help` documents every flag.
|
|
@@ -54,7 +54,7 @@ Commands that read a config name the version explicitly — there is no default:
|
|
|
54
54
|
|
|
55
55
|
| Selector | Meaning |
|
|
56
56
|
|---|---|
|
|
57
|
-
| `<file>` / `--file <path>` | a local
|
|
57
|
+
| `<file>` / `--file <path>` | a local Playbook file |
|
|
58
58
|
| `--draft` | the tenant's single open draft (resolved automatically) |
|
|
59
59
|
| `--live` | the current live Release |
|
|
60
60
|
| `--release <id>` | a specific playbook version / Release |
|
|
@@ -71,9 +71,9 @@ Commands that read a config name the version explicitly — there is no default:
|
|
|
71
71
|
| `docs` | Print the canonical documentation URL. |
|
|
72
72
|
| `download` | Fetch a config version (`--live` / `--draft` / `--release <id>`); `--save`, `--format flatbuffer`. |
|
|
73
73
|
| `validate` | Offline schema validation of a `<file>`, or the full server catalog against the open draft (`--draft`). |
|
|
74
|
-
| `diff` | Compare any two versions
|
|
74
|
+
| `diff` | Compare any two versions (dry-run, no writes). A file vs `--draft`/`--live`/`--release` previews the launch — the server side is the base, so `+`/`-` read as created/pruned on launch. |
|
|
75
75
|
| `show <kind>` | Summary tables: `plans` · `entitlements` · `segments` · `placements` · `trials` for any version. |
|
|
76
|
-
| `upload` | Stage a
|
|
76
|
+
| `upload` | Stage a Playbook file as the open draft. |
|
|
77
77
|
| `launch` | Take a config live: validate (launch gate) → submit → approve → deploy. `launch <file>` or `launch --draft`. |
|
|
78
78
|
| `discard` | Archive the open draft (`--yes`). |
|
|
79
79
|
| `restore` | Stage a draft that restores a past release from its frozen snapshot; `--launch` takes it live. Halts if a draft is open. |
|
|
@@ -81,7 +81,7 @@ Commands that read a config name the version explicitly — there is no default:
|
|
|
81
81
|
| `history` | The Release Version Log, newest first. |
|
|
82
82
|
| `preview` | The open draft's staged changes. |
|
|
83
83
|
| `evaluate` | Run the live config's placement/entitlement decisions for a user context. |
|
|
84
|
-
| `generate types` | Generate a TypeScript module of
|
|
84
|
+
| `generate types` | Generate a TypeScript module of typed Playbook handles from any config version — `Entitlements` (namespaced by type, with the `EntitlementHandle` union for type-safe `can()`/`gate()`/`checkEntitlement()` call sites), plus `Plans`, `Segments`, `SurfaceTemplates`, and `UiPathActionTypes`. Const objects + literal-union types (erasable — no enums). `--out <path>` writes the file; the generated header records the exact command to regenerate it. `--json` for the raw handle map. |
|
|
85
85
|
|
|
86
86
|
`--json` on read commands emits machine-readable output. Results go to stdout,
|
|
87
87
|
diagnostics to stderr.
|
package/dist/cli.js
CHANGED
|
@@ -8967,7 +8967,7 @@ Account created. Enter the verification code emailed to ${opts.email}.`);
|
|
|
8967
8967
|
}
|
|
8968
8968
|
|
|
8969
8969
|
// src/lib/track.ts
|
|
8970
|
-
var CLI_UNTRACKED_COMMANDS = /* @__PURE__ */ new Set(["login", "signup", "logout"
|
|
8970
|
+
var CLI_UNTRACKED_COMMANDS = /* @__PURE__ */ new Set(["login", "signup", "logout"]);
|
|
8971
8971
|
function shouldTrackCommandExecution(name, hasUrl) {
|
|
8972
8972
|
return hasUrl && !CLI_UNTRACKED_COMMANDS.has(name);
|
|
8973
8973
|
}
|
|
@@ -10086,7 +10086,7 @@ Command groups:
|
|
|
10086
10086
|
Keys ingest-keys create|list|revoke
|
|
10087
10087
|
|
|
10088
10088
|
Version selectors (no defaults \u2014 a command that reads a config requires one):
|
|
10089
|
-
<file> a local
|
|
10089
|
+
<file> a local Playbook file (positional, or --file <path>)
|
|
10090
10090
|
--draft the tenant's single open draft (resolved automatically)
|
|
10091
10091
|
--live the current live Release
|
|
10092
10092
|
--release <id> a specific playbook version / Release
|
|
@@ -10097,13 +10097,13 @@ Common workflows:
|
|
|
10097
10097
|
|
|
10098
10098
|
# Author, validate, and ship against the default instance (revturbine.com/app)
|
|
10099
10099
|
revturbine login
|
|
10100
|
-
revturbine download --live --save ./
|
|
10101
|
-
revturbine validate ./
|
|
10102
|
-
revturbine diff ./
|
|
10103
|
-
revturbine launch ./
|
|
10100
|
+
revturbine download --live --save ./revturbine.playbook.json
|
|
10101
|
+
revturbine validate ./revturbine.playbook.json
|
|
10102
|
+
revturbine diff ./revturbine.playbook.json --live
|
|
10103
|
+
revturbine launch ./revturbine.playbook.json
|
|
10104
10104
|
|
|
10105
10105
|
# Manual review flow (stage \u2192 inspect \u2192 launch)
|
|
10106
|
-
revturbine upload ./
|
|
10106
|
+
revturbine upload ./revturbine.playbook.json # stage as the open draft
|
|
10107
10107
|
revturbine preview # inspect the open draft
|
|
10108
10108
|
revturbine validate --draft # full server catalog
|
|
10109
10109
|
revturbine launch --draft
|
|
@@ -10133,7 +10133,7 @@ program.hook("postAction", async (_thisCommand, actionCommand) => {
|
|
|
10133
10133
|
command: actionCommand.name()
|
|
10134
10134
|
});
|
|
10135
10135
|
});
|
|
10136
|
-
program.name("revturbine").description("Validate RevTurbine
|
|
10136
|
+
program.name("revturbine").description("Validate RevTurbine Playbooks and ship them through the playbook-version lifecycle (draft \u2192 Release).").version(`${pkgVersion} (schema ${SCHEMA_VERSION})`, "-V, --version", "Print the revturbine and bundled schema versions").option(NO_LOCAL_FLAG, "Ignore the repo-pinned CLI and run this installation").showHelpAfterError().addHelpText("after", HELP_AFTER);
|
|
10137
10137
|
function runInstall(manager, args, cwd) {
|
|
10138
10138
|
return new Promise((resolve, reject) => {
|
|
10139
10139
|
const child = spawn2(manager, args, { cwd, stdio: "inherit", shell: true });
|
|
@@ -10434,7 +10434,7 @@ program.command("download").description("Fetch a config version from the server.
|
|
|
10434
10434
|
}
|
|
10435
10435
|
}
|
|
10436
10436
|
);
|
|
10437
|
-
program.command("validate").description("Validate a
|
|
10437
|
+
program.command("validate").description("Validate a Playbook file offline (schema), or the open draft against the full server catalog (--draft).").argument("[file...]", "Path(s) to a Playbook file (offline mode)").option("--draft", "Validate the open draft server-side (full catalog)").option("-u, --url <url>", "RevTurbine instance URL (used with --draft)", DEFAULT_URL).option("-t, --tenant-id <id>", "x-tenant-id (defaults to the stored token tenant)").action(async (files, opts) => {
|
|
10438
10438
|
if (opts.draft && files.length > 0) fail(EXIT.USAGE, "validate takes either <file> or --draft, not both.");
|
|
10439
10439
|
if (!opts.draft && files.length === 0) {
|
|
10440
10440
|
throw new SelectorError("STATE_REQUIRED \u2014 validate needs a version: <file> (offline) or --draft (server catalog).");
|
|
@@ -10476,7 +10476,7 @@ program.command("validate").description("Validate a Config File offline (schema)
|
|
|
10476
10476
|
}
|
|
10477
10477
|
diag("\u2713 No blocking findings.");
|
|
10478
10478
|
});
|
|
10479
|
-
program.command("diff").description("Compare two config versions (first \u2192 second; a file vs --draft/--live/--release previews the launch \u2014 the server side is the base). Dry-run, no writes.").argument("[file...]", "Local
|
|
10479
|
+
program.command("diff").description("Compare two config versions (first \u2192 second; a file vs --draft/--live/--release previews the launch \u2014 the server side is the base). Dry-run, no writes.").argument("[file...]", "Local Playbook file path(s)").option("--draft", "The tenant's open draft").option("--live", "The current live Release").option("--release <id>", "A specific playbook version / Release").option("-u, --url <url>", "RevTurbine instance URL", DEFAULT_URL).option("-t, --tenant-id <id>", "x-tenant-id (defaults to the stored token tenant)").action(async (files, opts) => {
|
|
10480
10480
|
const sels = requireSelectors(opts, files, { count: 2, allowed: ["file", "draft", "live", "release"], command: "diff" });
|
|
10481
10481
|
const ordered = orderDiffSelectors(sels);
|
|
10482
10482
|
const needsServer = ordered.some((s) => s.kind !== "file");
|
|
@@ -10486,7 +10486,7 @@ program.command("diff").description("Compare two config versions (first \u2192 s
|
|
|
10486
10486
|
process.stdout.write(`${formatDiff(diffExportedConfig(a, b))}
|
|
10487
10487
|
`);
|
|
10488
10488
|
});
|
|
10489
|
-
program.command("show").description(`Render a summary view of a config version. <kind> \u2208 ${SHOW_KINDS.join(" | ")}.`).argument("<kind>", `One of: ${SHOW_KINDS.join(", ")}`).option("--file <path>", "A local
|
|
10489
|
+
program.command("show").description(`Render a summary view of a config version. <kind> \u2208 ${SHOW_KINDS.join(" | ")}.`).argument("<kind>", `One of: ${SHOW_KINDS.join(", ")}`).option("--file <path>", "A local Playbook file").option("--draft", "The tenant's open draft").option("--live", "The current live Release").option("--release <id>", "A specific playbook version / Release").option("-u, --url <url>", "RevTurbine instance URL", DEFAULT_URL).option("-t, --tenant-id <id>", "x-tenant-id (defaults to the stored token tenant)").option("--json", "Machine-readable output").action(
|
|
10490
10490
|
async (kind, opts) => {
|
|
10491
10491
|
if (!SHOW_KINDS.includes(kind)) {
|
|
10492
10492
|
fail(EXIT.USAGE, `unknown kind '${kind}' \u2014 use one of: ${SHOW_KINDS.join(", ")}.`);
|
|
@@ -10501,7 +10501,7 @@ program.command("show").description(`Render a summary view of a config version.
|
|
|
10501
10501
|
);
|
|
10502
10502
|
var PRUNE_OPTION = ["--prune", "Confirm a convergent delete past the mass-deletion guard (removes entities absent from the file)"];
|
|
10503
10503
|
var NO_PRUNE_OPTION = ["--no-prune", "Additive import \u2014 keep entities that are absent from the file (disables convergent delete)"];
|
|
10504
|
-
program.command("upload").description("Stage a
|
|
10504
|
+
program.command("upload").description("Stage a Playbook file as the open draft (POST /api/config/import).").argument("<config>", "Path to a Playbook file").option("-u, --url <url>", "RevTurbine instance URL", DEFAULT_URL).option("-t, --tenant-id <id>", "x-tenant-id (defaults to the stored token tenant)").option(...PRUNE_OPTION).option(...NO_PRUNE_OPTION).action(async (configFile2, opts) => {
|
|
10505
10505
|
const config = verifyConfig(configFile2);
|
|
10506
10506
|
if (config === null) fail(EXIT.VALIDATION, `Fix the issues above in ${configFile2}, then re-run.`);
|
|
10507
10507
|
const conn = connect(opts.url, uploadTenantFor(opts.url, config, opts.tenantId));
|
|
@@ -10522,7 +10522,7 @@ program.command("upload").description("Stage a Config File as the open draft (PO
|
|
|
10522
10522
|
if (playbookVersionId) diagRaw(` playbook_version_id: ${playbookVersionId}`);
|
|
10523
10523
|
diag("Launch it with `revturbine launch --draft`, or from the UI (Drafts & Releases).");
|
|
10524
10524
|
});
|
|
10525
|
-
program.command("launch").description("Take a config live as a new Release: validate (launch gate), then submit \u2192 approve \u2192 deploy. Synchronous.").argument("[file]", "
|
|
10525
|
+
program.command("launch").description("Take a config live as a new Release: validate (launch gate), then submit \u2192 approve \u2192 deploy. Synchronous.").argument("[file]", "Playbook file to upload and launch directly").option("--draft", "Launch the already-open draft").option("--force", "Launch past incomplete-but-valid findings (error_launch); structural errors (error_draft) still block").option("-u, --url <url>", "RevTurbine instance URL", DEFAULT_URL).option("-t, --tenant-id <id>", "x-tenant-id (defaults to the stored token tenant)").option(...PRUNE_OPTION).option(...NO_PRUNE_OPTION).option("--yes", "Accepted for parity with discard/restore; launch has no confirmation prompt").action(async (file, opts) => {
|
|
10526
10526
|
const [sel] = requireSelectors(opts, file ? [file] : [], { count: 1, allowed: ["file", "draft"], command: "launch" });
|
|
10527
10527
|
let conn;
|
|
10528
10528
|
let playbookVersionId;
|
|
@@ -10666,7 +10666,7 @@ program.command("evaluate").description("Run placement/entitlement decisions for
|
|
|
10666
10666
|
var generateCmd = program.command("generate").description("Code generation from a config version (see: generate types).");
|
|
10667
10667
|
generateCmd.command("types").description(
|
|
10668
10668
|
"Generate a TypeScript module of Playbook handles \u2014 entitlements (namespaced by type), plans, segments, surface-template ids, and ui-path action types \u2014 for type-safe call sites."
|
|
10669
|
-
).argument("[file...]", "Path to a
|
|
10669
|
+
).argument("[file...]", "Path to a Playbook file").option("--draft", "The tenant's open draft").option("--live", "The current live Release").option("--release <id>", "A specific playbook version / Release").option("-o, --out <path>", "Write the generated module to this path (parent dirs created); default stdout").option("--json", "Emit the handle map as JSON instead of TypeScript").option("-u, --url <url>", "RevTurbine instance URL", DEFAULT_URL).option("-t, --tenant-id <id>", "x-tenant-id (defaults to the stored token tenant)").action(
|
|
10670
10670
|
async (files, opts) => {
|
|
10671
10671
|
const [sel] = requireSelectors(opts, files, {
|
|
10672
10672
|
count: 1,
|
|
@@ -10736,23 +10736,23 @@ var COMMAND_EXAMPLES = {
|
|
|
10736
10736
|
download: [
|
|
10737
10737
|
"",
|
|
10738
10738
|
"Examples:",
|
|
10739
|
-
" revturbine download --live --save ./
|
|
10739
|
+
" revturbine download --live --save ./revturbine.playbook.json The live config \u2192 file",
|
|
10740
10740
|
" revturbine download --draft The open draft (rendered on demand) \u2192 stdout",
|
|
10741
10741
|
" revturbine download --release cs_1a2b3c --format flatbuffer --save ./bundle.fb"
|
|
10742
10742
|
].join("\n"),
|
|
10743
10743
|
validate: [
|
|
10744
10744
|
"",
|
|
10745
10745
|
"Examples:",
|
|
10746
|
-
" revturbine validate ./
|
|
10746
|
+
" revturbine validate ./revturbine.playbook.json Offline schema validation (no network)",
|
|
10747
10747
|
" revturbine validate --draft Full server catalog against the open draft"
|
|
10748
10748
|
].join("\n"),
|
|
10749
10749
|
diff: [
|
|
10750
10750
|
"",
|
|
10751
10751
|
"Examples:",
|
|
10752
|
-
" revturbine diff ./
|
|
10752
|
+
" revturbine diff ./revturbine.playbook.json --live Local edits vs the live config",
|
|
10753
10753
|
" revturbine diff --live --draft What the open draft would change"
|
|
10754
10754
|
].join("\n"),
|
|
10755
|
-
show: ["", "Examples:", " revturbine show plans --live", " revturbine show segments --file ./
|
|
10755
|
+
show: ["", "Examples:", " revturbine show plans --live", " revturbine show segments --file ./revturbine.playbook.json"].join("\n"),
|
|
10756
10756
|
generate: [
|
|
10757
10757
|
"",
|
|
10758
10758
|
"Examples:",
|
|
@@ -10764,11 +10764,11 @@ var COMMAND_EXAMPLES = {
|
|
|
10764
10764
|
"entitlement type) and the `EntitlementHandle` union for can()/gate()",
|
|
10765
10765
|
"call sites. Its header records the exact command to regenerate it."
|
|
10766
10766
|
].join("\n"),
|
|
10767
|
-
upload: ["", "Example:", " revturbine upload ./
|
|
10767
|
+
upload: ["", "Example:", " revturbine upload ./revturbine.playbook.json Stage as the open draft"].join("\n"),
|
|
10768
10768
|
launch: [
|
|
10769
10769
|
"",
|
|
10770
10770
|
"Examples:",
|
|
10771
|
-
" revturbine launch ./
|
|
10771
|
+
" revturbine launch ./revturbine.playbook.json Upload, gate, and go live",
|
|
10772
10772
|
" revturbine launch --draft Launch the already-open draft"
|
|
10773
10773
|
].join("\n"),
|
|
10774
10774
|
evaluate: [
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revturbine/cli",
|
|
3
|
-
"version": "0.16.
|
|
4
|
-
"description": "revturbine —
|
|
3
|
+
"version": "0.16.2",
|
|
4
|
+
"description": "revturbine — validate RevTurbine Playbooks and ship them to a RevTurbine instance through the playbook-version lifecycle (draft → Release).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|