-
Notifications
You must be signed in to change notification settings - Fork 7
feat(cli): simplify KMS options and improve help output #146
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
Open
Leechael
wants to merge
4
commits into
main
Choose a base branch
from
feat/kms-options-simplification
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
- Add --eth-kms and --base-kms boolean flags for easier on-chain KMS selection - Deprecate --kms-id option (still works with warning) - Get KMS info from provision response instead of separate API call - Group help options by basic/advanced/deprecated sections - Handle shorthand conflicts between global and command options - Add SDK support for lowercase kms values with backward compatibility - Fix duplicate resolveKmsSelection calls causing repeated warnings - Add comprehensive tests for new KMS options and help formatting
Contributor
📋 Check Results✨ JS SDK - Code FormattingShow format check results🔍 JS SDK - TypeScript Type CheckShow type check output🧪 JS SDK - Test ResultsShow test output📝 JS SDK - Lint CheckShow lint results🌐 JS SDK - Browser CompatibilityShow browser test results🌐 Browser Compatibility ReportBrowser compatibility tests completed across:
The SDK has been verified to work in modern browser environments. Check run: https://github.com/Phala-Network/phala-cloud/actions/runs/21179023854 |
Restore uppercase TypeScript type definitions (PHALA, ETHEREUM, BASE)
for backwards compatibility with existing code that uses uppercase
enum values. The schema now:
- Accepts uppercase enum values at type level
- Transforms to lowercase internally before sending to API
- Maintains backwards compatibility with SDK v1 users
This ensures existing code like `{ kms: "PHALA" }` continues to work
without TypeScript compilation errors.
Keep user-facing types as uppercase (PHALA, ETHEREUM, BASE) for type safety and backward compatibility. Transform to lowercase only when sending to the API. This fixes TypeScript compilation errors where the schema's output type was incompatible with the input type.
76fde73 to
07a56ee
Compare
… to non-dev OS - SDK now accepts both uppercase and lowercase KMS values (e.g., "BASE" and "base") - Schema transforms input to uppercase internally for type safety - API calls transform to lowercase as backend expects - CLI defaults to prefer_dev=false for ETHEREUM/BASE KMS since dev images may not be available - Added AppRegistered event fallback in deploy_app_auth for contract compatibility
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.
Summary
--eth-kmsand--base-kmsboolean flags for easier on-chain KMS selection--kms-idoption (still works with backward-compatible warning)-i)resolveKmsSelectioncalls causing repeated deprecation warningsTest plan
bun test src/commands/deploy/handler.test.ts- all 18 tests passbun test src/core/help.test.ts- all 2 tests passphala deploy --eth-kms --private-key <key> --rpc-url <url> -c docker-compose.ymlphala deploy --helpshows grouped options--kms-idstill works with deprecation warning