Skip to content

♻️ uniformize with other sdks#470

Merged
sebastianMindee merged 3 commits into
mainfrom
uniformize-with-other-sdks
Jul 21, 2026
Merged

♻️ uniformize with other sdks#470
sebastianMindee merged 3 commits into
mainfrom
uniformize-with-other-sdks

Conversation

@sebastianMindee

Copy link
Copy Markdown
Collaborator

Description

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires a change to the official Guide documentation.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to “uniformize with other SDKs” by tightening URL input handling (including redirect/auth behavior) and introducing a typed V2 job status enum that is re-exported through the V2 API surface.

Changes:

  • Add URL validation and credential masking to UrlInput, plus new tests for blocking loopback/private hosts.
  • Introduce JobStatus enum and use it in V2 job polling logic.
  • Update exports and lockfile to align with the new public API surface and dependency metadata.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/input/urlInputSource.spec.ts Adds tests for URL init validation (localhost/loopback/private ranges).
src/v2/parsing/job/jobStatus.ts Introduces JobStatus enum for V2 job statuses.
src/v2/parsing/job/job.ts Uses JobStatus for job status typing/parsing.
src/v2/parsing/job/index.ts Re-exports JobStatus from the job module.
src/v2/parsing/index.ts Re-exports JobStatus from parsing index.
src/v2/index.ts Re-exports JobStatus in the public V2 API.
src/v2/client.ts Compares polling job status against JobStatus enum values.
src/input/urlInput.ts Adds URL validation, credential masking, and auth header handling; validates redirects.
package-lock.json Lockfile metadata normalization (removes libc fields for some optional deps).
Comments suppressed due to low confidence (1)

src/input/urlInput.ts:174

  • UrlInput URL validation is only performed in init(). Callers can bypass the HTTPS/host checks by calling asLocalInputSource()/saveToFile() directly, since makeRequest() currently performs no validation on its url parameter.
    redirects: number,
    maxRedirects: number
  ): Promise<{ content: Buffer; finalUrl: string }> {
    const parsedUrl = new URL(url);

Comment thread src/input/urlInput.ts Outdated
Comment thread src/input/urlInput.ts
Comment thread src/v2/parsing/job/job.ts Outdated
Comment thread src/v2/parsing/job/job.ts Outdated
@sebastianMindee
sebastianMindee force-pushed the uniformize-with-other-sdks branch 3 times, most recently from 07f3d44 to cca2b38 Compare July 21, 2026 14:25
@sebastianMindee
sebastianMindee force-pushed the uniformize-with-other-sdks branch from cca2b38 to 8a79f6c Compare July 21, 2026 14:50
@sebastianMindee
sebastianMindee requested a review from ianardee July 21, 2026 15:06
@sebastianMindee
sebastianMindee merged commit 2d96730 into main Jul 21, 2026
22 checks passed
@sebastianMindee
sebastianMindee deleted the uniformize-with-other-sdks branch July 21, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants