Add shared B2 config JSON provider#113
Open
goanpeca wants to merge 8 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a shared b2-config: virtual JSON editing surface for B2 bucket configuration (lifecycle, CORS, notifications, bucketInfo) via a VS Code FileSystemProvider, along with bundled JSON schemas for validation/completions and helper logic to mask/merge notification secrets.
Changes:
- Added
B2ConfigFileSystemProviderand supporting JSON helper utilities (path parsing, stable fingerprinting, masking/merge, basic validation). - Registered the provider during extension activation and added
jsonValidationschema bindings forb2-config:URIs. - Added unit tests for the JSON helper functions and introduced new JSON schema resources per config kind.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/unit/b2ConfigJson.test.ts | Adds unit coverage for path parsing, masking/merge behavior, validation, and stable JSON fingerprinting. |
| src/providers/b2ConfigJson.ts | Implements shared JSON utilities including notification secret masking and merge-on-save support. |
| src/providers/b2ConfigFileSystemProvider.ts | Adds the b2-config: FileSystemProvider with read/write, optimistic concurrency checks, and secret-masking integration. |
| src/extension.ts | Registers the new provider on activation. |
| resources/schemas/b2-config-notifications.schema.json | Adds schema for notification rules (completion/validation on b2-config: docs). |
| resources/schemas/b2-config-lifecycle.schema.json | Adds schema for lifecycle rules. |
| resources/schemas/b2-config-cors.schema.json | Adds schema for CORS rules. |
| resources/schemas/b2-config-bucketInfo.schema.json | Adds schema for bucketInfo metadata. |
| package.json | Adds activation event + jsonValidation bindings for b2-config: JSON docs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Extension Build ReadyDownload the VSIX from the workflow artifacts above. InstallationVS Code UI: Extensions > ... > Install from VSIX... CLI: |
goanpeca
marked this pull request as ready for review
July 3, 2026 15:14
goanpeca
force-pushed
the
feat/issue-103-config-provider
branch
from
July 8, 2026 23:14
76be4ec to
eba7103
Compare
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.
Summary
b2-config:FileSystemProvider for bucket lifecycle, CORS, notifications, and bucketInfo JSON documents.Linked issue
Fixes #103
Tests run
npm run test:unitnpm run checknpm run compilenpm testnpm run contract:hashnpm run assert:dist-assetsFollow-up notes
buildB2ConfigUri(...)in follow-up issues.