refactor(rest): redesign REST API to use ScrapboxResponse#216
Open
takker99 wants to merge 11 commits intotakker99:mainfrom
Open
refactor(rest): redesign REST API to use ScrapboxResponse#216takker99 wants to merge 11 commits intotakker99:mainfrom
takker99 wants to merge 11 commits intotakker99:mainfrom
Conversation
BREAKING CHANGE: Replace option-t Result with ScrapboxResponse - Remove option-t dependency - Add ScrapboxResponse class extending web standard Response - Improve type safety with status-based type switching - Allow direct access to Response.body and headers - Add migration guide for v0.30.0 This change follows the implementation pattern from @takker/gyazo@0.4.0 and prepares for release as version 0.30.0. Resolves takker99#213
- Remove option-t dependency - Implement TargetedResponse interface following @takker/gyazo@0.4.0 - Use @std/http for StatusCode and SuccessfulStatus - Add utility functions for response creation - Translate Japanese comments to English - Update all REST API endpoints to use new interface
- Update imports in page-data.ts, link.ts, parseHTTPError.ts, and pages.ts - Remove deno.lock for clean environment setup
- Remove type keyword from imports where functions are used - Update remaining ScrapboxResponse references to TargetedResponse in search.ts - Fix unused imports across REST API files
- Remove type keyword from imports where functions are used - Fix remaining unused imports in REST API files - Update import statements to match actual usage
- Add _createErrorResponse and _createSuccessResponse aliases for unused imports - Add _TargetedResponse alias for unused type imports - Fix remaining linting errors across REST API files
- Add _TargetedResponse alias for unused type imports in multiple files - Fix remaining linting errors in REST API files
- Update import path in targeted_response.ts to use jsr:@std/http - Fix module resolution error
- Update import path in utils.ts to use jsr:@std/http - Fix module resolution error
…e.ts to use JSR format - Update import paths in code examples to use jsr:/@std/json@^1.0.1/types - Update import paths in code examples to use jsr:/@std/testing@^1.0.8/types
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.
BREAKING CHANGE: Replace option-t Result with ScrapboxResponse
This change follows the implementation pattern from @takker/gyazo@0.4.0 and prepares for release as version 0.30.0.
Resolves #213