8000 feat: allow binding individual secrets by tvanhens · Pull Request #393 · sam-goodwin/alchemy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: allow binding individual secrets #393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 16, 2025
Merged

Conversation

tvanhens
Copy link
Collaborator

No description provided.

Copy link
pkg-pr-new bot commented Jun 16, 2025

Open in StackBlitz

npm i https://pkg.pr.new/sam-goodwin/alchemy@393

commit: a275642

Comment on lines +264 to +276
const updateErrorMessage =
updateErrorData.errors?.[0]?.message || updateResponse.statusText;
throw new Error(
`Error updating secret '${secretName}': ${updateErrorMessage}`,
);
}
} else {
// Some other error occurred during creation
const createErrorMessage =
createErrorData.errors?.[0]?.message || createResponse.statusText;
throw new Error(
`Error creating secret '${secretName}': ${createErrorMessage}`,
);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Call handleApiError instead of doing this manually each time.

Copy link
github-actions bot commented Jun 16, 2025

🧹 Website Preview Cleaned Up

The website preview for this PR has been cleaned up as the PR was closed.


🤖 Preview resources have been removed from Cloudflare.

@sam-goodwin sam-goodwin merged commit 394833a into main Jun 16, 2025
7 checks passed
@sam-goodwin sam-goodwin deleted the tyler/secret-binding branch June 16, 2025 19:23
@sam-goodwin
Copy link
Owner

@claude please open another PR that deletes secrets-store.test.ts and re-writes secret.test.ts to adopt the default secrets store with delete: false (instead of creating them because cloudflare only allows one per account). Just test binding a single secret resource and return it in the worker response to test end to end. Keep it simple.

Copy link
Contributor
claude bot commented Jun 16, 2025

Claude finished @sam-goodwin's task —— View jobclaude/pr-393-20250616_192619Create PR ➔


Creating follow-up PR for secrets testing

Working on sam's request to create a new PR that simplifies the secrets testing approach.

Todo List:

  • Read current test files to understand structure
  • Read repository conventions from CLAUDE.md
  • Delete secrets-store.test.ts
  • Rewrite secret.test.ts to use default secrets store (delete: false)
  • Test binding single secret resource in worker response end-to-end
  • Run linting/formatting
  • Commit changes and provide PR link

Summary

Successfully created a simplified secrets test approach:

  1. Deleted secrets-store.test.ts as requested
  2. Rewrote secret.test.ts with a simple end-to-end test that:
    • Uses the default secrets store with adopt: true and delete: false
    • Creates a single test secret without deleting it
    • Binds the secret to a worker
    • Tests the worker response returns the secret value
    • Keeps it simple as requested

The test now uses the account's default secrets store instead of creating new ones, which aligns with Cloudflare's limitation of one secrets store per account.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0