@testsprite/testsprite-cli 0.13.0 → 0.14.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.
Files changed (58) hide show
  1. package/README.md +51 -48
  2. package/dist/commands/doctor.js +12 -11
  3. package/dist/commands/project-env.d.ts +11 -1
  4. package/dist/commands/project-env.js +399 -61
  5. package/dist/commands/project-sign-in.d.ts +60 -0
  6. package/dist/commands/project-sign-in.js +289 -0
  7. package/dist/commands/project.d.ts +9 -0
  8. package/dist/commands/project.js +68 -28
  9. package/dist/commands/schedule.d.ts +12 -0
  10. package/dist/commands/schedule.js +175 -5
  11. package/dist/commands/test.d.ts +53 -20
  12. package/dist/commands/test.js +1356 -342
  13. package/dist/commands/testlist.d.ts +10 -5
  14. package/dist/commands/testlist.js +170 -30
  15. package/dist/commands/tunnel.js +11 -5
  16. package/dist/index.js +12 -37
  17. package/dist/lib/client-factory.d.ts +12 -1
  18. package/dist/lib/client-factory.js +14 -4
  19. package/dist/lib/dry-run/samples.js +53 -0
  20. package/dist/lib/environment-tunnel.d.ts +109 -0
  21. package/dist/lib/environment-tunnel.js +465 -0
  22. package/dist/lib/errors.js +12 -1
  23. package/dist/lib/gh-output.js +3 -0
  24. package/dist/lib/http.d.ts +2 -0
  25. package/dist/lib/junit-report.d.ts +11 -7
  26. package/dist/lib/junit-report.js +13 -7
  27. package/dist/lib/local-target.d.ts +13 -3
  28. package/dist/lib/local-target.js +47 -12
  29. package/dist/lib/output.js +15 -1
  30. package/dist/lib/plan-poll.js +3 -4
  31. package/dist/lib/redact.d.ts +38 -0
  32. package/dist/lib/redact.js +140 -0
  33. package/dist/lib/render-error.d.ts +19 -5
  34. package/dist/lib/render-error.js +31 -0
  35. package/dist/lib/runs.types.d.ts +9 -1
  36. package/dist/lib/target-url.js +5 -5
  37. package/dist/lib/telemetry.d.ts +6 -7
  38. package/dist/lib/telemetry.js +11 -4
  39. package/dist/lib/testlist.types.d.ts +1 -0
  40. package/dist/lib/ticker.d.ts +9 -0
  41. package/dist/lib/ticker.js +18 -0
  42. package/dist/lib/tunnel-session.d.ts +3 -4
  43. package/dist/lib/tunnel-session.js +3 -4
  44. package/dist/lib/v3-advisory.js +0 -1
  45. package/dist/vendor/tunnel-client/client.d.ts +15 -8
  46. package/dist/vendor/tunnel-client/client.js +477 -407
  47. package/dist/vendor/tunnel-client/config.d.ts +5 -5
  48. package/dist/vendor/tunnel-client/config.js +5 -5
  49. package/dist/vendor/tunnel-client/index.d.ts +4 -4
  50. package/dist/vendor/tunnel-client/index.js +4 -4
  51. package/dist/vendor/tunnel-client/types.d.ts +19 -34
  52. package/dist/vendor/tunnel-client/types.js +1 -0
  53. package/dist/vendor/tunnel-client/ws-compat.d.ts +13 -3
  54. package/dist/vendor/tunnel-client/ws-compat.js +70 -12
  55. package/dist/version.d.ts +1 -1
  56. package/dist/version.js +1 -1
  57. package/package.json +1 -1
  58. package/skills/testsprite-onboard.skill.md +4 -4
package/README.md CHANGED
@@ -128,21 +128,21 @@ It only runs what the project is still missing, so a second call picks up where
128
128
 
129
129
  Prefer to configure each step by hand (or learn the surface offline with `--dry-run` first)? See [Manual setup](./DOCUMENTATION.md#manual-setup) and [Install & verify](./DOCUMENTATION.md#install--verify).
130
130
 
131
- ## Testing an app on your machine (--local)
131
+ ## Testing an environment on your machine
132
132
 
133
133
  Frontend tests can reach your running app through a TestSprite tunnel, including on the Free plan (ordinary run credits apply).
134
- Use an API key with `run:tunnel`: keys minted before that scope existed need to be replaced; the CLI names the missing scope.
134
+ Use an API key with `run:tunnel`; the CLI names the missing scope if the key cannot open a tunnel. Existing keys receive this scope on backend v0.18.0 or later unless deliberately narrowed.
135
135
 
136
136
  ```bash
137
137
  testsprite project create --type frontend --name "My local app" --local 3000
138
138
  testsprite test create --plan-from ./checkout.plan.json --project <project-id>
139
- testsprite test run <test-id> --local 3000 # waits up to 1200 seconds
140
- testsprite test run <id> <id> --local 3000 --max-concurrency 5
141
- testsprite test run --all --project <project-id> --local 3000
139
+ testsprite test run <test-id> # the saved loopback URL opens a tunnel and waits
140
+ testsprite test run <id> <id> --max-concurrency 5
141
+ testsprite test run --all --project <project-id>
142
142
  # Or keep one tunnel open in terminal A (no port argument)
143
143
  testsprite tunnel start --ttl 3600
144
144
  # Terminal B: borrow the clientId printed above; keep terminal A running
145
- testsprite test run <test-id> --local 3000 --tunnel-client <client-uuid>
145
+ testsprite test run <test-id> --tunnel-client <client-uuid>
146
146
  testsprite tunnel list
147
147
  testsprite tunnel stop <client-uuid>
148
148
  # Stop every live tunnel on this account only when you intend to revoke them all
@@ -152,7 +152,9 @@ testsprite tunnel stop --all --confirm
152
152
  Run several local frontend tests in one invocation to share one tunnel binding. The batch runs up to 5 tests at once by default; `--max-concurrency` accepts 1–10. `--all --local` skips backend tests. An owned batch cancels unfinished runs on Ctrl-C or tunnel loss; JSON output lists every requested test in input order, including tests that did not start. The minted client id is printed before the tunnel connects.
153
153
  Hit the tunnel limit? Run `testsprite tunnel list`, then `testsprite tunnel stop <client-uuid>` for an unused binding, or `testsprite tunnel stop --all --confirm` to revoke them all. An older server without listing returns exit 4; a key without `run:tunnel` returns exit 3.
154
154
  A second `tunnel start` or process using the same credential takes over, and the first exits **10**.
155
- The examples use `127.0.0.1`. For another loopback listener, pass the same `--local-host localhost` or `--local-host ::1` to project creation and every follow-up run. The selected host is stored in the project URL (`::1` becomes `http://[::1]:<port>`); `project get/list` exposes `originMode: 'local'` in JSON and shows `(Local)` in text output.
155
+ An environment is one origin (scheme, host and port) plus its sign-in configuration. Frontend runs automatically open a tunnel for a saved `localhost`, `127.0.0.1` or `[::1]` URL: `test run`, `test rerun`, `test create --run`, `test create-batch --run` and `testlist run` use this behavior. `--env <name>` selects the environment; omit it for the project default. `--no-wait` disables automatic tunnels; drop it to run through one. If environment reads are unavailable, the command keeps the previous server behavior. Several fresh-run IDs require a tunnel; public targets retain the exit-5 refusal. A named public environment used against a local origin prints a sign-in advisory on stderr. Reruns and test-list runs share one timeout including capacity waits and require the server to confirm tunnel support; an older server triggers a cancellation attempt and a clear error.
156
+
157
+ `--local <port>` remains a shorthand and defaults new project/environment URLs to `http://localhost:<port>`. On a test run it preserves the host of a selected loopback environment, or the one host agreed by saved non-temporary loopback environments on that port; otherwise it uses `localhost`. If environment reads fail, it retains the legacy `127.0.0.1` host. Saved URLs retain their exact spelling, and aliases are not merged. `--local-host` remains accepted but is deprecated and hidden from project/environment help; prefer `--url http://127.0.0.1:<port>` or `--url http://[::1]:<port>` when the host matters. Dev servers can take a minute per page through a tunnel; test a built server with `npm run build` and your framework's preview/start command for heavy apps.
156
158
  The control plane is WebSocket over TLS (`wss://control.tun.testsprite.com/ws`). The data plane, which carries the tunnel secret and proxied traffic, uses TLS at `data.tun.testsprite.com:443` and verifies the certificate with Node's default trust store: its bundled Mozilla roots, plus certificates supplied through `NODE_EXTRA_CA_CERTS` and the system CAs when Node is started with `--use-system-ca`. Node 20 is supported without losing `NODE_EXTRA_CA_CERTS`. Verification cannot be disabled, and the CLI never falls back from TLS to plaintext. On a network that re-signs TLS, export your organisation's root CA to a PEM file and set `NODE_EXTRA_CA_CERTS=/path/to/ca.pem` before running `testsprite`. Plaintext connects and TLS handshakes each time out after 10 seconds. The first failed attempt starts a **60-second** retry episode; writing `TunnelHello` is not enough to reset it. The episode ends only after the first inbound tunnel stream or after the socket remains open for 5 seconds following the hello. A real deadline timer stays armed across retries and destroys an in-flight socket when it expires. After that, an owned `test run --local` run is cancelled and refunded and the command exits **10**; `tunnel start` exits **10**. If a self-hosted or older TestSprite server does not advertise a TLS endpoint, the CLI prints a one-time warning and uses legacy plaintext port **7400** under the same timeout and retry rules. `tunnel start` prints `transport: tls` or `transport: plaintext`.
157
159
  An owned tunnel's timeout or Ctrl-C cancels unfinished runs by default. A borrowed run still detaches without cancellation on Ctrl-C/SIGTERM because its owner keeps the tunnel alive; if that owner disappears while a run is active, the borrower cancels its own run and reports `cancelled`, `already finished`, or `skipped`. A run cancelled before it finishes is refunded. `--no-cancel-on-interrupt` also skips this owner-gone cancellation. Keep the early stderr run-id receipts (`Run <runId>` for one test, `[i/N] <testId> → run <runId>` for a batch) and read the reported runs before re-running.
158
160
  Local projects skip exploration/plan generation; author plans with `test create --plan-from`. Portal runs are blocked for free until you set a public project URL.
@@ -160,47 +162,48 @@ See [the full local-testing reference](./DOCUMENTATION.md#local-frontend-testing
160
162
 
161
163
  ## Commands
162
164
 
163
- | Group | Command | What it does |
164
- | -------------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
165
- | **Setup** | `setup` | **Start here** — one command: configure your API key, verify it, and install the agent verification skill |
166
- | | `doctor` | Environment diagnostic — CLI/Node versions, profile, endpoint, credentials, connectivity, agent skill; exits non-zero on failure |
167
- | **Auth** | `auth status` | Resolve the active profile to its user, key, env, and scopes |
168
- | | `auth remove` | Remove the active profile from the credentials file |
169
- | | `usage` (alias `credits`) | Account pre-flight: identity, plus credit balance / plan info when the backend supplies them |
170
- | **Read** | `project list` / `project get` | List projects / fetch one by id |
171
- | | `test list` / `test get` | List tests under a project / fetch one by id |
172
- | | `test code get` | Print (or write) the generated test source |
173
- | | `test steps` | List the latest run's steps with screenshot / DOM pointers |
174
- | | `test result` | Latest result; `--history` lists a test's prior runs (ENV column; `--env <name>` filters by environment) |
175
- | | `test failure get` | The agent entry point: one self-contained latest-failure bundle |
176
- | | `test failure summary` | One-screen triage card (no media download) |
177
- | | `test diff` | Compare two runs — verdict, failure kind, per-step status flips, code-version drift |
178
- | **Write** | `test scaffold` / `test lint` | Author plans locally: emit a schema-correct starter, validate plan files offline — no network, no credentials |
179
- | | `test create` / `test create-batch` | Create a test (or bulk-create from a plan file); `--step-timeout <ms>` sets a per-test timeout; dependency flags wire BE metadata |
180
- | | `test update` / `test delete` / `test delete-batch` | Edit metadata, set/clear the step timeout (`--step-timeout` / `--clear-step-timeout`), or permanently delete (`--confirm` required) |
181
- | | `test code put` | Replace generated code (etag-guarded) |
182
- | | `test plan put` | Replace a frontend test's plan-steps |
183
- | | `project create` / `project update` / `project delete` | Manage projects; `--test-id-attributes <list>` registers the app's own test-hook attributes (priority order) for exported locators, `--clear-test-id-attributes` reverts; `delete` removes a project and everything under it (`--confirm` required, no restore window) |
184
- | | `project credential` / `project auto-auth` | Configure backend-test auth: a static injected credential, or auto-refresh login (Pro) |
185
- | | `project env list` / `create` / `update` / `delete` / `set-default` | Manage a project's environments — named URL + login bundles that `test run --env <name>` selects. An app on your own machine is named with `--local <port>` instead of `--url` — the same spelling as `project create` — and run with `test run --local <port>`; `delete` refuses the default environment |
186
- | **Generate** | `test plan generate` | Ask TestSprite to propose test cases for a project — proposals are staged server-side for review, never written to disk; only the stages the project is missing actually run |
187
- | | `test plan accept` | Turn staged proposals into real tests — all of them, or a subset with `--only` |
188
- | | `project docs upload` | Upload an API spec or PRD as a project source, so generation has something to read |
189
- | **Run** | `test run` | Trigger a fresh run; `--wait` blocks until terminal; `--all --project <id>` runs all tests in a project in wave order `--env <name>` runs against a named environment. |
190
- | | `test rerun` | Replay one/many tests (FE verbatim; BE with deps); billed as a run (0.5 credits FE / 0.2 BE); `--all --project <id>` reruns all tests `--env <name>` replays against a named environment. |
191
- | | `test flaky` | Replay a test several times (auto-heal off) and report a stability score |
192
- | | `test wait` | Block on one or more `runId`s until terminal |
193
- | | `test cancel` | Cancel one or more in-flight runs (Ctrl-C during `--wait` only detaches, `cancel` is the real stop — except an owned `--local` run, which Ctrl-C cancels by default) |
194
- | | `test artifact get` | Download the failure bundle for a specific `runId` |
195
- | **Test lists** | `testlist list` / `testlist get` | Inspect saved test lists — named, cross-project collections with per-project environment pins (V3-only) |
196
- | | `testlist create` / `update` / `add` / `remove` / `delete` | Manage a list and its cases; `--project-env <id>:<env>` pins environments; `delete` requires `--confirm` |
197
- | | `testlist run` | Run every case (or a `--case` subset) through its pinned environment; `--wait` polls all runs, `--report junit` writes a CI sidecar |
198
- | **Schedule** | `schedule list` / `schedule get` | List schedules visible to the key / fetch one by id (status is `ENABLED`, `PAUSED`, or `AUTO_PAUSED` after repeated failures) |
199
- | | `schedule create` | Run a project or test list on a 5-field cron; states the frequency before sending and the per-run / monthly credit cost once priced |
200
- | | `schedule update` | Retime or rename a schedule, change its recipients, `--pause` / `--resume` it |
201
- | | `schedule delete` | Remove a schedule and its run history, stopping future triggers (`--confirm` required, no restore window) |
202
- | | `schedule run list` | A schedule's past runs, with per-run pass / fail / blocked counts |
203
- | **Agent** | `agent install` / `agent list` / `agent status` | Add, list, or health-check coding-agent skills (pure-local): `claude`, `codex`, `cursor`, `cline`, `antigravity`, `kiro`, `windsurf`, `copilot` |
165
+ | Group | Command | What it does |
166
+ | -------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
167
+ | **Setup** | `setup` | **Start here** — one command: configure your API key, verify it, and install the agent verification skill |
168
+ | | `doctor` | Environment diagnostic — CLI/Node versions, profile, endpoint, credentials, connectivity, agent skill; exits non-zero on failure |
169
+ | **Auth** | `auth status` | Resolve the active profile to its user, key, env, and scopes |
170
+ | | `auth remove` | Remove the active profile from the credentials file |
171
+ | | `usage` (alias `credits`) | Account pre-flight: identity, plus credit balance / plan info when the backend supplies them |
172
+ | **Read** | `project list` / `project get` | List projects / fetch one by id, including the default environment and environment count when the server reports them |
173
+ | | `test list` / `test get` | List tests under a project / fetch one by id; `test list --env <name>` selects frontend status and the ENV column names its source |
174
+ | | `test code get` | Print (or write) the generated test source |
175
+ | | `test steps` | List the latest run's steps with screenshot / DOM pointers |
176
+ | | `test result` | Latest result; `--history` lists a test's prior runs (ENV column; `--env <name>` filters by environment) |
177
+ | | `test failure get` | The agent entry point: one self-contained latest-failure bundle |
178
+ | | `test failure summary` | One-screen triage card (no media download) |
179
+ | | `test diff` | Compare two runs — verdict, failure kind, per-step status flips, code-version drift |
180
+ | **Write** | `test scaffold` / `test lint` | Author plans locally: emit a schema-correct starter, validate plan files offline — no network, no credentials |
181
+ | | `test create` / `test create-batch` | Create a test (or bulk-create from a plan file); `--step-timeout <ms>` sets a per-test timeout; dependency flags wire BE metadata |
182
+ | | `test update` / `test delete` / `test delete-batch` | Edit metadata, set/clear the step timeout (`--step-timeout` / `--clear-step-timeout`), or permanently delete (`--confirm` required) |
183
+ | | `test code put` | Replace generated code (etag-guarded) |
184
+ | | `test plan put` | Replace a frontend test's plan-steps |
185
+ | | `project create` / `project update` / `project delete` | Manage projects; `--test-id-attributes <list>` registers the app's own test-hook attributes (priority order) for exported locators, `--clear-test-id-attributes` reverts; `delete` removes a project and everything under it (`--confirm` required, no restore window) |
186
+ | | `project credential` / `project auto-auth` | Configure backend-test auth: a static injected credential, or auto-refresh login (Pro) |
187
+ | | `project env list` / `get` / `create` / `update` / `delete` / `set-default` | Manage a project's named URL + login bundles. `get` shows safe login details and variables; `create` / `update` accept repeatable `--var KEY=VALUE` (plain text — not for secrets, use `--username`/`--password`), and `update --clear-credentials` disables account login. Use `--url http://localhost:<port>` or `--local <port>` for an app on this machine; runs open its tunnel automatically. `delete` refuses the default environment. |
188
+ | | `project sign-in get` / `set` | Inspect or change an environment's app sign-in mode; choose OTP with `project env create --sign-in otp`. SSO selection requires the per-account manual-login feature flag; capture the session in the Portal. |
189
+ | **Generate** | `test plan generate` | Ask TestSprite to propose test cases for a project — proposals are staged server-side for review, never written to disk; only the stages the project is missing actually run |
190
+ | | `test plan accept` | Turn staged proposals into real tests — all of them, or a subset with `--only` |
191
+ | | `project docs upload` | Upload an API spec or PRD as a project source, so generation has something to read |
192
+ | **Run** | `test run` | Trigger a fresh run; saved loopback environments open a tunnel and wait automatically; `--wait` blocks until terminal; `--all --project <id>` runs all tests in a project in wave order `--env <name>` runs against a named environment. |
193
+ | | `test rerun` | Replay one/many tests (FE verbatim; BE with deps); billed as a run (0.5 credits FE / 0.2 BE); `--all --project <id>` reruns all tests `--env <name>` replays against a named environment; loopback URLs open a tunnel automatically when the server supports it. |
194
+ | | `test flaky` | Replay a test several times (auto-heal off) and report a stability score |
195
+ | | `test wait` | Block on one or more `runId`s until terminal |
196
+ | | `test cancel` | Cancel one or more in-flight runs (Ctrl-C during `--wait` only detaches, `cancel` is the real stop — except a run with an owned tunnel, which Ctrl-C cancels by default) |
197
+ | | `test artifact get` | Download the failure bundle for a specific `runId` |
198
+ | **Test lists** | `testlist list` / `testlist get` | Inspect saved test lists — named, cross-project collections with per-project environment pins (V3-only) |
199
+ | | `testlist create` / `update` / `add` / `remove` / `delete` | Manage a list and its cases; `--project-env <id>:<env>` pins environments; `delete` requires `--confirm` |
200
+ | | `testlist run` | Run every case (or a `--case` subset) through its pinned environment; loopback environments open a tunnel automatically; `--wait` polls all runs, `--report junit` writes a CI sidecar |
201
+ | **Schedule** | `schedule list` / `schedule get` | List schedules visible to the key / fetch one by id, including a project schedule's pinned or inherited environment (status is `ENABLED`, `PAUSED`, or `AUTO_PAUSED` after repeated failures) |
202
+ | | `schedule create` | Run a project or test list on a 5-field cron; `--env <name>` pins a project schedule, while omission inherits the live default; states frequency and estimated cost |
203
+ | | `schedule update` | Retime or rename a schedule, change recipients, pin a project schedule with `--env <name>`, or `--pause` / `--resume` it |
204
+ | | `schedule delete` | Remove a schedule and its run history, stopping future triggers (`--confirm` required, no restore window) |
205
+ | | `schedule run list` | A schedule's past runs, with per-run pass / fail / blocked counts |
206
+ | **Agent** | `agent install` / `agent list` / `agent status` | Add, list, or health-check coding-agent skills (pure-local): `claude`, `codex`, `cursor`, `cline`, `antigravity`, `kiro`, `windsurf`, `copilot` |
204
207
 
205
208
  > The earlier command names — `init`, `auth configure`, `auth whoami`, `auth logout` — still work as hidden, deprecated aliases (each prints a one-line notice pointing at the new name), so existing scripts keep running. `auth configure` now runs the full `setup` (it also installs the skill).
206
209
 
@@ -199,7 +199,7 @@ async function checkConnectivity(opts, deps, ctx) {
199
199
  }
200
200
  }
201
201
  /**
202
- * Can this key open a tunnel to this machine (`test run --local`)?
202
+ * Can this key open a tunnel for an environment on this machine?
203
203
  *
204
204
  * A READ, not a mint. `GET /tunnel/<random-uuid>` runs the same scope guard
205
205
  * and the same environment-configured check as the mint, and answers 404 for
@@ -207,13 +207,10 @@ async function checkConnectivity(opts, deps, ctx) {
207
207
  * one of the caller's few concurrent live bindings or any rate-limit budget on
208
208
  * a diagnostic.
209
209
  *
210
- * The case this exists for: `run:tunnel` is the first scope deliberately kept
211
- * OUT of the grandfather grant, so a key minted before it — most keys in the
212
- * wild — gets a 403 the first time someone tries `--local`, and the remedy is
213
- * to mint a NEW key rather than to re-authenticate. Nothing else in the CLI
214
- * says that until a run has already been refused.
210
+ * Keys deliberately narrowed without `run:tunnel` receive a 403. Older
211
+ * servers may also exclude the scope from their legacy-key grant.
215
212
  *
216
- * Never `fail`: a caller who does not use `--local` should not see `doctor`
213
+ * Never `fail`: a caller who does not use a tunnel should not see `doctor`
217
214
  * exit 1 over a surface that is not even configured in their environment.
218
215
  */
219
216
  async function checkLocalTunnel(opts, deps, ctx) {
@@ -266,21 +263,25 @@ async function checkLocalTunnel(opts, deps, ctx) {
266
263
  };
267
264
  }
268
265
  if (error.code === 'NOT_FOUND') {
269
- return { name, status: 'ok', detail: 'available; this key can open a tunnel (--local)' };
266
+ return {
267
+ name,
268
+ status: 'ok',
269
+ detail: 'available; this key can open a tunnel for an environment on this machine',
270
+ };
270
271
  }
271
272
  if (error.code === 'AUTH_FORBIDDEN') {
272
273
  return {
273
274
  name,
274
275
  status: 'warn',
275
- detail: 'this API key cannot open a tunnel — it predates the `run:tunnel` scope. ' +
276
- 'Mint a new API key in the dashboard to use `test run --local`.',
276
+ detail: 'this API key does not have the `run:tunnel` scope. ' +
277
+ 'Mint a new API key with that scope in the dashboard to run an environment on this machine.',
277
278
  };
278
279
  }
279
280
  if (error.code === 'UNAVAILABLE') {
280
281
  return {
281
282
  name,
282
283
  status: 'warn',
283
- detail: '`test run --local` is not available on this endpoint',
284
+ detail: 'tunnels for environments on this machine are not available on this endpoint',
284
285
  };
285
286
  }
286
287
  return { name, status: 'warn', detail: `could not check (${error.code})` };
@@ -7,7 +7,7 @@ export interface CliProjectEnvironment {
7
7
  name: string;
8
8
  /**
9
9
  * The address runs against this environment open. May be a loopback URL for
10
- * an app that only runs on your own machine — pair it with `--local`.
10
+ * an app that only runs on your own machine — frontend runs open a tunnel.
11
11
  */
12
12
  url: string;
13
13
  isDefault: boolean;
@@ -24,6 +24,7 @@ export interface CliProjectEnvironment {
24
24
  username: string | null;
25
25
  enableOtp: boolean;
26
26
  updatedAt: string;
27
+ variables?: Record<string, string>;
27
28
  }
28
29
  export interface CliProjectEnvListResponse {
29
30
  environments: CliProjectEnvironment[];
@@ -43,6 +44,9 @@ interface EnvListOptions extends CommonOptions {
43
44
  projectId: string;
44
45
  }
45
46
  export declare function runEnvList(opts: EnvListOptions, deps?: ProjectDeps): Promise<CliProjectEnvListResponse>;
47
+ export declare function runEnvGet(opts: EnvListOptions & {
48
+ name: string;
49
+ }, deps?: ProjectDeps): Promise<CliProjectEnvUpdateResponse>;
46
50
  interface EnvCreateOptions extends CommonOptions {
47
51
  projectId: string;
48
52
  name?: string;
@@ -54,8 +58,12 @@ interface EnvCreateOptions extends CommonOptions {
54
58
  username?: string;
55
59
  password?: string;
56
60
  passwordFile?: string;
61
+ vars?: string[];
57
62
  setDefault?: boolean;
58
63
  idempotencyKey?: string;
64
+ signIn?: string;
65
+ otpChannel?: string[];
66
+ sessionTtl?: string;
59
67
  }
60
68
  export declare function runEnvCreate(opts: EnvCreateOptions, deps?: ProjectDeps): Promise<CliProjectEnvCreateResponse>;
61
69
  interface EnvUpdateOptions extends CommonOptions {
@@ -69,6 +77,8 @@ interface EnvUpdateOptions extends CommonOptions {
69
77
  username?: string;
70
78
  password?: string;
71
79
  passwordFile?: string;
80
+ clearCredentials?: boolean;
81
+ vars?: string[];
72
82
  rename?: string;
73
83
  idempotencyKey?: string;
74
84
  }