Skip to content

♻️ uniformize with other sdks#470

Open
sebastianMindee wants to merge 3 commits into
mainfrom
uniformize-with-other-sdks
Open

♻️ uniformize with other sdks#470
sebastianMindee wants to merge 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
Comment thread src/v2/parsing/job/job.ts
@sebastianMindee sebastianMindee force-pushed the uniformize-with-other-sdks branch from d469614 to ab49b90 Compare July 15, 2026 20:54
@sebastianMindee sebastianMindee force-pushed the uniformize-with-other-sdks branch from ab49b90 to 07f3d44 Compare July 16, 2026 08:55
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.

2 participants