feat(protect): add protect config object#146
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements a new configuration object (ProtectClientConfig) for the Protect client, replacing the deprecated approach of passing csTable parameters directly. Key changes include updating the Protect client API, propagating the new config object through tests and examples, and updating documentation to reflect these changes.
Reviewed Changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/utils/config/index.ts | Updated loadWorkSpaceId to accept an optional workspace CRN argument. |
| packages/protect/src/index.ts | Refactored protect() to accept a config object and pass client config accordingly. |
| packages/protect/src/ffi/index.ts | Updated ProtectClient constructor and init() to align with new config usage. |
| packages/protect/package.json | Upgraded protect-ffi dependency version. |
| tests/.test.ts, examples/, docs/* | Adjusted instantiation of protectClient to use the new config object. |
| .changeset/shaggy-points-sink.md | Added changeset documenting the breaking API change for protectClient. |
auxesis
approved these changes
Jun 3, 2025
CDThomas
approved these changes
Jun 3, 2025
| "dependencies": { | ||
| "@byteslice/result": "^0.2.0", | ||
| "@cipherstash/protect-ffi": "0.14.2", | ||
| "@cipherstash/protect-ffi": "0.15.0-0", |
Contributor
There was a problem hiding this comment.
Suggested change
| "@cipherstash/protect-ffi": "0.15.0-0", | |
| "@cipherstash/protect-ffi": "0.15.0", |
Heads up that I just released 0.15.0 of protect-ffi, so you don't need to use the prerelease anymore.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implemented a more configurable pattern for the Protect client.
This release introduces a new
ProtectClientConfigtype that can be used to configure the Protect client.This is useful if you want to configure the Protect client specific to your application, and will future proof any additional configuration options that are added in the future.
The now deprecated method of passing your tables to the
protectclient is no longer supported.