-
Notifications
You must be signed in to change notification settings - Fork 359
chore(repo): Add 1Password CLI script #6168
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: f58f3c6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types 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 |
📝 WalkthroughWalkthroughA new Node.js script was added to automate the retrieval of environment and key files from 1Password using its CLI, with the script placed at 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
scripts/1password-keys.mjs (3)
3-5
: Fix import sorting and unused variables.The static analysis tools have identified some issues that should be addressed:
- Import sorting needs to be fixed
- Unused error parameters should be prefixed with underscore
Apply this diff to fix the linting issues:
-import { writeFile } from 'node:fs/promises'; -import { join } from 'node:path'; -import { $ } from 'zx'; +import { join } from 'node:path'; +import { writeFile } from 'node:fs/promises'; + +import { $ } from 'zx';
22-24
: Fix unused error parameter.The error parameter is unused and should be prefixed with underscore to satisfy linting rules.
Apply this diff:
- .catch(err => { + .catch(_err => {
34-36
: Fix unused error parameter.The error parameter is unused and should be prefixed with underscore to satisfy linting rules.
Apply this diff:
- .catch(err => { + .catch(_err => {
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.changeset/odd-doors-sneeze.md
(1 hunks)integration/README.md
(1 hunks)package.json
(1 hunks)scripts/1password-keys.mjs
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.md`: Follow all instructions, patterns and conventions that are defined in these MD files.
**/*.md
: Follow all instructions, patterns and conventions that are defined in these MD files.
integration/README.md
🪛 ESLint
scripts/1password-keys.mjs
[error] 3-5: Run autofix to sort these imports!
(simple-import-sort/imports)
[error] 22-22: 'err' is defined but never used. Allowed unused args must match /^_/u.
(no-unused-vars)
[error] 22-22: 'err' is defined but never used. Allowed unused args must match /^_/u.
(@typescript-eslint/no-unused-vars)
[error] 34-34: 'err' is defined but never used. Allowed unused args must match /^_/u.
(no-unused-vars)
[error] 34-34: 'err' is defined but never used. Allowed unused args must match /^_/u.
(@typescript-eslint/no-unused-vars)
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: semgrep-cloud-platform/scan
- GitHub Check: Build Packages
- GitHub Check: Formatting | Dedupe | Changeset
- GitHub Check: semgrep/ci
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (6)
.changeset/odd-doors-sneeze.md (1)
1-3
: LGTM! Standard changeset file structure.The empty changeset file is appropriate for internal tooling changes that don't require version bumps for published packages.
package.json (1)
18-18
: LGTM! Well-named script that follows existing conventions.The new
integration:secrets
script is appropriately named and placed among other integration-related scripts.integration/README.md (1)
27-30
: Excellent simplification of the setup process.The updated documentation significantly improves developer experience by replacing manual steps with a single automated command. The prerequisites are clearly stated and the instructions are easy to follow.
scripts/1password-keys.mjs (3)
7-12
: Excellent 1Password CLI validation.The script properly validates that the 1Password CLI is installed before attempting to use it, with clear error messaging and appropriate exit codes.
14-43
: Robust error handling for 1Password operations.The script handles 1Password CLI failures gracefully by checking exit codes and providing helpful error messages. The fallback to null values and subsequent validation ensures users get clear guidance when the CLI isn't properly configured.
45-48
: Secure file writing with appropriate success feedback.The script writes files to the correct integration directory and provides clear confirmation of successful operation.
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/elements
@clerk/clerk-expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/clerk-react
@clerk/react-router
@clerk/remix
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/themes
@clerk/types
@clerk/upgrade
@clerk/vue
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that was ⚡
Description
This PR adds a new
pnpm integration:secrets
script that uses the 1Password CLI to setupintegration/.env.local
andintegration/.keys.json
automatically from the Clerk Shared vault.Checklist
pnpm test
runs as expected.pnpm build
runs as expected.Type of change
Summary by CodeRabbit
New Features
Documentation