-
Notifications
You must be signed in to change notification settings - Fork 100
Develop #1238
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
base: main
Are you sure you want to change the base?
Develop #1238
Conversation
Co-authored-by: dwhoban <[email protected]>
Co-authored-by: dwhoban <[email protected]>
Co-authored-by: dwhoban <[email protected]>
Co-authored-by: dwhoban <[email protected]>
Co-authored-by: dwhoban <[email protected]>
Co-authored-by: dwhoban <[email protected]>
Add 1Password provider with Item resource and ItemRef
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.
Pull request overview
This PR adds a new 1Password provider to Alchemy, enabling infrastructure-as-code management of 1Password items through the 1Password JavaScript SDK.
Key changes:
- Implements
Itemresource for creating/updating/deleting 1Password items with support for various categories (Login, SecureNote, ApiCredentials, etc.) - Adds
ItemReffunction for read-only fetching of existing items - Includes comprehensive test coverage for item lifecycle management
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| alchemy/src/1password/item.ts | Core implementation of Item resource and ItemRef function with lifecycle management and type mapping |
| alchemy/src/1password/api.ts | API client wrapper for 1Password SDK with authentication handling |
| alchemy/src/1password/index.ts | Barrel export for 1Password provider modules |
| alchemy/test/1password/item.test.ts | Comprehensive tests for Item and ItemRef functionality |
| alchemy/package.json | Adds @1password/sdk dependency as optional peer dependency |
| alchemy/src/1password/README.md | Provider documentation with usage examples |
| alchemy-web/src/content/docs/providers/1password/item.md | User-facing documentation for Item resource |
| alchemy-web/src/content/docs/providers/1password/index.md | Provider overview and authentication guide |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const validCategories = new Set<string>([ | ||
| "Login", "SecureNote", "CreditCard", "CryptoWallet", "Identity", | ||
| "Password", "Document", "ApiCredentials", "BankAccount", "Database", | ||
| "DriverLicense", "Email", "MedicalRecord", "Membership", "OutdoorLicense", | ||
| "Passport", "Rewards", "Router", "Server", "SshKey", "SocialSecurityNumber", | ||
| "SoftwareLicense", "Person", "Unsupported" | ||
| ]); |
Copilot
AI
Dec 5, 2025
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.
The validCategories, validFieldTypes, and validAutofillBehaviors sets are duplicated between the Item resource function (lines 378-396) and ItemRef function (lines 585-603). Extract these into shared constants at the module level to eliminate duplication and ensure consistency.
| const mapFieldType = (fieldType: ItemFieldType) => { | ||
| if (validFieldTypes.has(fieldType)) { | ||
| return sdk.ItemFieldType[fieldType as keyof typeof sdk.ItemFieldType] ?? sdk.ItemFieldType.Text; | ||
| } | ||
| return sdk.ItemFieldType.Text; | ||
| }; |
Copilot
AI
Dec 5, 2025
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.
The mapping functions (mapFieldType, mapAutofillBehavior, mapCategoryFromSdk, mapFieldTypeFromSdk, mapAutofillBehaviorFromSdk) are duplicated between the Item resource and ItemRef function. Extract these into shared utility functions at the module level to reduce duplication.
|
Can you provide a more informative PR title than "develop"? |
No description provided.