Repository navigation
Build download pagination URLs with encoded query parameters - #84
Closed
sylvesterkaczmarek wants to merge 1 commit into
Closed
sylvesterkaczmarek wants to merge 1 commit into
sylvesterkaczmarek wants to merge 1 commit into
Conversation
Member
|
Are you representing a DAAC that wants to implement Earthdata Download, and this is an issue for your implementation? Yes using |
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.
Overview
Fixes #83. No EDSC ticket has been assigned to this external contribution.
What is the feature?
Correct pagination requests when a
getLinksendpoint has no query string or has a fragment, and preserve cursor tokens containing reserved characters. Direct string concatenation previously changed the request path or interpreted cursor contents as query/fragment syntax.What is the solution?
Construct each request with
URLandURLSearchParams, replace the pagination-ownedpageNum/cursorfields, and retain other query values. Return to numbered pages when a response omits its cursor, as before. Trust checking, authorization, response validation, link insertion, initialization and error handling are unchanged. Update the client integration documentation and patch version to 1.0.10. The lockfile changes only the application's version, not dependency resolutions.Testing
Added 15 Jest cases using the actual
fetchLinksimplementation and intercepted Electron network calls. They cover queryless/existing-query/fragment URLs, reserved and Unicode cursor values, repeated static parameters, stale pagination fields, fallback page numbers, stored links, initialization, authorization and request failures.npm test -- --runInBand --coverage=false: 687 passed, 1 skipped across 103 suites.npm run lint: passed.npm run build: passed for renderer, Electron main and preload bundles.git diff --check: passed.Tested on macOS with Node 26.8.1, based on main at
35d6269945e0cceaf4f7f24af633cdfbfd614a55. Dependencies were installed usingnpm ci --ignore-scripts; the version-only bump usednpm version patch --no-git-tag-version --ignore-scripts. Tests retain the repository's Electron mocks. The live desktop application, packaged installers, native database binary, authentication flows, remote downloads and other operating systems were not exercised. No trusted-source, runtime-dependency or workflow changes are included. This does not overlap PR #80.Checklist