feat(cli) Add command to Update a Secret - #2990
Conversation
🦋 Changeset detectedLatest commit: 9a8a6f3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
All reported issues were addressed across 6 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| ]; | ||
| static override args = { | ||
| secretId: Args.string({ | ||
| description: "Project secret ID.", |
There was a problem hiding this comment.
nit: maybe mention the format or give an example of a secretId if helpful for agents? but if not done for other CRUD operations, no need to do here
There was a problem hiding this comment.
I can add it for the other crud ops too here
shrey150
left a comment
There was a problem hiding this comment.
would address / resolve cubic comments before continuing
bfbb841 to
ff31e3c
Compare
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
0e9f6cb to
9a8a6f3
Compare
# why Browse needs commands to manage project secrets and attach them to Functions. The seven component PRs were merged into `agent/browse-v4-7-context-names`; this PR brings those changes onto current `main` at `fbcdf61`. # what changed - Add `browse cloud secrets` commands to list, get, create, update, and delete secrets, including client-side encryption for create/update and password input support. - Add `browse functions secrets` commands to attach, detach, and list secrets for a function. - Include API helpers, command contract tests, dependencies, and the seven Browse changesets. Cherry-picked in order from #2946, #2949, #2967, #2990, #3006, #3007, and #3009. All seven applied without conflicts. The secrets implementation is unchanged from the original branch. This branch retains main's Browse 0.10.0 release and excludes the old parent branch's context-name and eval changes. # test plan Validated locally on macOS with Node 24.18.0 and pnpm 11.23.0: - `pnpm install --frozen-lockfile` — passed. - `pnpm exec turbo run build --filter=browse` — all four tasks passed (protocol, extension, SDK, CLI). - `pnpm --filter browse lint` — formatting, ESLint, and TypeScript passed. - `pnpm --filter browse test:cli` — 36 files / 471 tests passed, using an isolated daemon directory and umask 022. - `pnpm exec node --import tsx scripts/release/check-changesets.ts` and `git diff --check` — passed. Validation covers the built CLI and local contract fixtures; no production secrets were created or modified. --------- Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
why
We want to add secrets support to the browse cli and is a continuation of the efforts introduced in this PR:
#2946.
In this particular PR, we add support for updating a secret by retrieving the public key for the project, reading the secret value from an env variable, a value piped to stdin, or prompting them in a password prompt (the inquire package), encrypting the value with the public key, then calling the update secret endpoint via patch with the provided secret-id and the encrypted value.
what changed
test plan