@revturbine/cli 0.17.1 → 0.17.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.
Files changed (3) hide show
  1. package/README.md +14 -0
  2. package/dist/cli.js +18 -2
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -83,10 +83,24 @@ Commands that read a config name the version explicitly — there is no default:
83
83
  | `evaluate` | Run a config version's placement/entitlement decisions locally for a user context. Use `--slot` with optional `--component-type`; deprecated `--surface-type` remains an alias. |
84
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
  | `analytics catalog\|templates\|views\|view\|create\|preview\|query` | Work with the hosted Semantic Catalog and canonical analytics-view documents. Create and preview pass the document through unchanged to the same server contract used by the web editor and MCP tools; preview remains subject to the server's query limits. |
86
+ | `ingest-keys create` (alias `mint`) | Mint a tenant-bound public ingest token for browser SDK use. Requires one or more `--origin` values; optional `--ip` restrictions. The full token is returned once. `ingest-keys list` shows ids/previews and `ingest-keys revoke <id>` invalidates one. |
86
87
 
87
88
  `--json` on read commands emits machine-readable output. Results go to stdout,
88
89
  diagnostics to stderr.
89
90
 
91
+ ### Mint a publishable ingest token
92
+
93
+ ```bash
94
+ revturbine login
95
+ revturbine ingest-keys mint --origin https://app.example.com --json
96
+ # Store the once-only token, then use the returned id when it is no longer needed:
97
+ revturbine ingest-keys revoke <ingest-key-id> --yes
98
+ ```
99
+
100
+ Public ingest tokens are intentionally embeddable but remain tenant-bound,
101
+ origin-restricted, and optionally IP-restricted. They cannot mint other tokens
102
+ or access private control-plane APIs.
103
+
90
104
  ## Exit-code classes
91
105
 
92
106
  ```
package/dist/cli.js CHANGED
@@ -11878,7 +11878,7 @@ Command groups:
11878
11878
  Inspect status, history, preview, evaluate
11879
11879
  Codegen generate types
11880
11880
  Analytics analytics catalog|templates|views|view|create|preview|query
11881
- Keys ingest-keys create|list|revoke
11881
+ Keys ingest-keys create (alias: mint)|list|revoke
11882
11882
 
11883
11883
  Version selectors (no defaults \u2014 a command that reads a config requires one):
11884
11884
  <file> a local Playbook file (positional, or --file <path>)
@@ -11908,6 +11908,11 @@ Common workflows:
11908
11908
  revturbine history
11909
11909
  revturbine restore <playbook-version-id> --launch
11910
11910
 
11911
+ # Mint an origin-restricted browser token (shown once), then revoke it
11912
+ revturbine ingest-keys mint --origin https://app.example.com --json
11913
+ revturbine ingest-keys list
11914
+ revturbine ingest-keys revoke <ingest-key-id> --yes
11915
+
11911
11916
  Exit-code classes: 0 ok \xB7 1 unexpected \xB7 2 usage \xB7 3 auth \xB7 4 validation
11912
11917
  blocked \xB7 5 conflict/stale \xB7 6 network \xB7 7 server error.
11913
11918
 
@@ -12579,7 +12584,18 @@ analyticsConnectionOptions(
12579
12584
  emitAnalyticsResult(conn, "analytics query", result, opts.json);
12580
12585
  });
12581
12586
  var ingestKeys = program.command("ingest-keys").description("Manage public ingest keys (embeddable SDK telemetry credentials) for the tenant.");
12582
- ingestKeys.command("create").description("Mint a public ingest key. The full token is printed ONCE and cannot be retrieved again.").requiredOption("--origin <url...>", "Allowed browser origin(s), e.g. https://app.example.com (repeatable; at least one required)").option("--ip <cidr...>", "Optional IP / CIDR allowlist (empty = no IP restriction)").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 (token on stdout for scripted capture)").action(async (opts) => {
12587
+ ingestKeys.command("create").alias("mint").description("Mint a public ingest key. The full token is printed ONCE and cannot be retrieved again.").requiredOption("--origin <url...>", "Allowed browser origin(s), e.g. https://app.example.com (repeatable; at least one required)").option("--ip <cidr...>", "Optional IP / CIDR allowlist (empty = no IP restriction)").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 (token on stdout for scripted capture)").addHelpText(
12588
+ "after",
12589
+ [
12590
+ "",
12591
+ "Examples:",
12592
+ " revturbine ingest-keys mint --origin https://app.example.com",
12593
+ " revturbine ingest-keys create --origin https://app.example.com --ip 203.0.113.0/24 --json",
12594
+ "",
12595
+ "The full token is returned only by this command. Store it securely or",
12596
+ "capture --json output, and revoke it by id when the integration or test ends."
12597
+ ].join("\n")
12598
+ ).action(async (opts) => {
12583
12599
  const conn = connect(opts.url, opts.tenantId);
12584
12600
  const result = await createIngestKey(conn.url, conn.headers, { originAllowlist: opts.origin, ipAllowlist: opts.ip });
12585
12601
  if (!result.ok || !result.key) httpFail(conn, "ingest-keys create", result.status, result.error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revturbine/cli",
3
- "version": "0.17.1",
3
+ "version": "0.17.2",
4
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": {