Skip to content

Platform: adding base64 support#19878

Merged
GTFalcao merged 11 commits intomasterfrom
platform-base64-support
Jan 29, 2026
Merged

Platform: adding base64 support#19878
GTFalcao merged 11 commits intomasterfrom
platform-base64-support

Conversation

@GTFalcao
Copy link
Collaborator

@GTFalcao GTFalcao commented Jan 28, 2026

This adds dedicated file reading from base64 data URLs.

The current implementation only partially handled it, and did not properly extract the metadata. Also, some components require a filename and rely on the file handling method to provide it, so I added a default file.${ext} filename to the metadata here.

Additionally upgraded the Typescript version here a bit since I was getting some build errors.

Here's an example for testing:

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAAZlBMVEU00ov///8/1ZMh0ITC79lU2Zwq0YcYz4Il0IZ+4LHj+O607NDv+/aS5Ltn3KZL15jb9ujN8+Cj6cc40473/vu979bn+fHT9ORi2qGJ4rdz3aus68yc58PU9OS47dPz/Ph6369n2qKZJqBmAAAHDElEQVR4nO2da3erKhCGURSJFzRqk5ikSfr//+TWJG1zI4M9yCCH91vXbl08m9swzAwkeFSaFaIMyfwUlqLI0icecv9jVYQJZ9ht/bMYT8KiekO4FHS+dN9iVCwlhLkLfIN6xvwVYTTj0fkoxqNnwppiN0uraP1IuHALsEdc3BM6B/iLSFwcohddB+qZMHIRsEeMvglzjt2WicTzK6FwZ5u4FxMXwqWbY3QQXZ4Jne3CSyeSoHK3C/tOrHrCwt0u7Dux6AnneBRUVxiQNMFuxKRKUpK5uhlexDPi9DQcJiIR2G2YWIKU2E2YWCVxeyklzvN5eXl5eXl54YhxSjljJCzLsGHs8iN2o0ZoaLL8OMYoK7f7aL26ufxaraN6ETf2Yp6RaK+ENWG82S66Yif5TVp2H89XtNebvc/6RGy83CtjsSjqXRat0/x4bK/N3T37thglxWcrwbvqGJ2obV6xUNLWR3ue8ftrWbkOpV2MMsL7exBGOtngfPW3G5sYZYTB5mZGJYuV7NckjKE9riMp4e9FAY0r2S9J1XbW+P+khMH20omMZaP5Bq1DS5ZVOeHq3At0M3KA/ijf2DFS5YRBx2+jBf6grRULzhvCI2NUcYeQqLAB8Q1hUJMRW8RLdRYM1HeEbf7mH9W0xUd8R6hDJfqKOjXhERtwckL8MJjJCYMF8lScnrBtXCcMlrgmqgHCIHaeEDeeyQQhbkCTEcJPzOXUCGGwcZ4wQ5yJZghbxGFqhjBY4K01hggrvF1/LGEa7fbFouv2WTTqeIwX8zOGsKrjJKGcs8t9U8LFTpkSLzJNmbDNYvq4XjCeiAj+00F4do0qYda8buJ9CpZcOdoJQ42wenPbwtha5RNbrGGqRLh7vxJyFZ/jDmtLVCEEM6qYgl+8srgPFTyCJfwVtKM+TCgUhpeK8x/rHAwSKnrm4QUVa0eECNdqgAqd+IG0I0KEqu7OEIhh6O09JNNUF6HCLdXM+5B1ICGS8a2LkBDgQ2hWjTbC5BMi3M+ckO8gQiS7TRsh20KESAcoffMQtB2Qtgt9hOQIfKqd+TwkDIqcanGye/QRUvAgjGN7ayT8gAhxfPv6CPkeIsTZ8jXOwwXwKSTHt8a19AsixDkhaiSMoQPUHsWo0UhYQoQ4ZptGwhDa8nFuEXUSQr6aw9wJG4gQx1OjkZBAfmGcEDeThDjHJ42EoG9/9oQUui5V9L1qlklCnFJIntAT3giehyiOGo2EHCKc/VrKnd/xwf3QfavNfcsbpyaZyfPh7E/A4Bl/9l6MGPhU0M3dE/UFEZ5mTgj7S933eeNc5Gu8tzgAn0KK+9JICMWbIAXsa5yHkOG9mvsdcAN8CSubVB/hBiKcfSxGAREiZZVoI6Rg0D5SgKm+mCgwOHHmkXuwVZrPPPoStmiwckq0xZeC+UE4Zyd9hOAgtTaSXZGQgpGJaAUyNBE2kAcj+MRK7YIIU6VtmoPbfVBbmxX0or7gsyicboGWkw/nzCgkBcGzMMgNsLyWQt4TmBbE4IUUyRs8SIGwFUDrGoXUNbT0Q7X8w/fpeRyM0u//l/BKDqjlkNZM2gUMjA0ehJX0RJTzgFNZwU66UUrnRqxuopzLHZXJUysZJfAqOmg1j7oYy67h9Hu4MkZZcwIDn68qZlMX4/PQiU1clrE4dZl6VVPUYlh/qYvRgsf5B2EWbzFT+QO1FJYJQsStwhAh7ks4BghRZ6GvKqhDWB4oY4SotdqMEKI/mTY1Iaa9ZoQQJ+DSIGGKjUcmJjziV4KemDC2AHBSQgvKlZMpCVuV4kQGBBGqV9V70NGKIUpgQqHkSntWassDHiDhiZO/vACxs4VPgZARpuZPu9ER8pKbFEQ4BMHQzbhnIDKrXu6CCM9xvYyMeE3nEFrUgUSRsO/GUs012n7EdvHBhD9VAmhZg2O1WhDb+EYQEsKTr10ldZUel0X47Pe3QBDhvQ+C02ZbHKrVHWe7qg77L2bV8nKjcYTkfGFBr88kdkV3Eps4JNRWukEQoTSEgl1ltLV/EWiX2mE+/wd5QmSHtQZBhHhRIroEEeLeG+mQzhxSO+UJPaH98oSe0H55Qk9ovzyhJ7RfntAT2i9P6Antlyf0hPYLIsR9j1mL4vdCDw/18vLy8vLy+t8IN/tteoXEdcuqJAK7CRNLELyX2Y2IFQSnxrIx8YxgvUNrSElKkFOJp1YYELQHoY2IFT0hzsMRhkSrnhCzOMrUYiIYCB3wF8k0lCceXlN2thOHLjwT5q5uiTy/EjrguX2pS2Xby5vftYuItA5+CYGSY7MUvZbq/3633TnEb8AfQtcG6nWI3hIGEXdn02D8t3z2L2GQC5vzc0aIUXGTKXdD2Fs3LjD2fHfJx3eEQVAVYTLj0cp4EhYP+eMPhL3SrBDlHA+NYSmK7LkCwD/CUFq5t1wCvwAAAABJRU5ErkJggg==

Summary by CodeRabbit

  • New Features

    • Support for data: URLs when streaming files, including metadata extraction and size detection.
  • Bug Fixes

    • More robust OAuth1 signing and improved network request error handling and debug logging.
    • Safer JSON/string handling to avoid null/object edge cases.
  • Chores

    • Package version bumped, TypeScript/tooling updated (compiler option added), build workflow refined, prebuild script removed, and dist/ added to .gitignore.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Jan 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
pipedream-docs-redirect-do-not-edit Ignored Ignored Jan 29, 2026 4:35am

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 28, 2026

Walkthrough

Adds first‑class data: URL handling for file streaming, tightens Axios/OAuth1 typings and request signing/error paths, updates utility function types, bumps platform package version and TypeScript range, enables skipLibCheck, removes package prebuild script, adjusts publish workflow to package-scoped build, and ignores dist/.

Changes

Cohort / File(s) Summary
File Streaming
platform/lib/file-stream.ts
Adds detection/parsing for data: URLs and implements getDataUrlStream / getDataUrlStreamAndMetadata; returns stream + metadata (size, inferred filename, content-type) for data URLs before local/remote handling.
HTTP / OAuth1 & Axios
platform/lib/axios.ts
Adds typed imports (AxiosHeaders, AxiosError) and types (OAuth1SignConfig, OAuth1RequestData, PipedreamStep); tightens signatures (transformConfigForOauth, getOauthSignature, callAxios, stepExport, convertAxiosError, create); defaults missing headers to new AxiosHeaders(), uses AxiosError in error handling, and accepts step as optional.
Utilities
platform/lib/utils.ts
Strengthens types: cloneSafe(o: unknown): unknown, `jsonStringifySafe(v: unknown, set?: Set): string
Package & Tooling
platform/package.json, platform/tsconfig.json
Bumps package version to 3.2.0, removes prebuild script from platform/package.json, updates devDependency typescript range to >=5.5.0 <5.7.0, and adds skipLibCheck: true to platform/tsconfig.json.
CI Workflow
.github/workflows/publish-platform-package.yaml
Replaces a global "Compile TypeScript" step with a pnpm --filter @pipedream/platform... build package-scoped build step in the publish workflow.
Repo ignore
platform/.gitignore
Adds dist/ to .gitignore.

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant CreateWrapper as Create
  participant CallAxios as callAxios
  participant OAuthSigner as getOauthSignature
  participant AxiosLib as axios
  participant Exporter as stepExport

  Client->>CreateWrapper: invoke create(config, signConfig?)
  CreateWrapper->>CallAxios: execute request (step may be undefined)
  alt signConfig present
    CallAxios->>OAuthSigner: transform config and request signature
    OAuthSigner-->>CallAxios: returns signature
    CallAxios->>AxiosLib: send signed request
  else no signing
    CallAxios->>AxiosLib: send request
  end
  AxiosLib-->>CallAxios: response / error
  CallAxios->>Exporter: on debug/error call stepExport(step | undefined, message, key)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 31.58% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The PR description clearly explains what was added (base64 data URL support with metadata extraction and default filenames), why it was needed (prior incomplete handling), and includes a concrete testing example. However, it completely lacks the 'WHY' section required by the repository's description template. Add a 'WHY' section explaining the business or technical motivation for this change, as specified in the repository's PR description template.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Platform: adding base64 support' is clear but somewhat vague—it mentions base64 support generally, but the primary changes involve adding dedicated file reading from base64 data URLs with proper metadata extraction and filename defaults, plus a TypeScript version upgrade. The title captures the main feature but could be more specific.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
platform/package.json (1)

3-31: Regenerate lockfile to match updated package.json specifiers.

The pnpm lockfile contains outdated specifiers that don't match platform/package.json. Most critically, TypeScript is pinned to v3.9.10 (^3.5.3) when the package now requires ^4.9.5, and axios is pinned to 1.13.2 instead of the requested ^1.12.0. Run pnpm install at the repository root to regenerate the lockfile and resolve the mismatch.

🤖 Fix all issues with AI agents
In `@platform/lib/axios.ts`:
- Line 1: Replace non-idiomatic casts to AxiosHeaders by creating or mutating an
actual AxiosHeaders instance: where the code does config.headers = {} as
AxiosHeaders, construct a new AxiosHeaders with the desired header (e.g., new
AxiosHeaders({ Authorization: oauthSignature })) or, if inside an interceptor
and config.headers is already an AxiosHeaders instance, call
config.headers.set("Authorization", oauthSignature). Update all occurrences
(including the similar pattern around the config.headers use at the
config.headers lines referenced) so you no longer cast plain objects to
AxiosHeaders but instead use the AxiosHeaders constructor or its .set() method.

In `@platform/lib/file-stream.ts`:
- Around line 74-116: The data URL parsing in parseDataUrl is too strict: update
parseDataUrl to accept full media-type with optional parameters (e.g.,
"text/plain;charset=UTF-8") and to detect a "base64" parameter anywhere in the
parameter list instead of only allowing ";base64" directly; if the mediatype
portion is empty (e.g., "data:,...") return the default
"text/plain;charset=US-ASCII"; return the mediaType string including its
parameters (excluding the "base64" token) and an isBase64 boolean; ensure
getDataUrlStream and getDataUrlStreamAndMetadata use parseDataUrl's mediaType
and isBase64 (decode percent-encoding only for non-base64) so metadata
(contentType and size and filename extension via mime.extension) remains
correct.

Comment on lines +74 to +116
function parseDataUrl(dataUrl: string): ParsedDataUrl {
// Format: data:[<mediatype>][;base64],<data>
const match = dataUrl.match(/^data:([^;,]*)?(?:;(base64))?,(.*)$/);
if (!match) {
throw new Error("Invalid data URL format");
}
const [
,
mediaType = "text/plain;charset=US-ASCII",
base64Flag,
data,
] = match;
return {
mediaType,
isBase64: base64Flag === "base64",
data,
};
}

function getDataUrlStream(dataUrl: string): Readable {
const parsed = parseDataUrl(dataUrl);
const buffer = parsed.isBase64
? Buffer.from(parsed.data, "base64")
: Buffer.from(decodeURIComponent(parsed.data), "utf-8");
return Readable.from(buffer);
}

function getDataUrlStreamAndMetadata(dataUrl: string): { stream: Readable; metadata: FileMetadata } {
const parsed = parseDataUrl(dataUrl);
const buffer = parsed.isBase64
? Buffer.from(parsed.data, "base64")
: Buffer.from(decodeURIComponent(parsed.data), "utf-8");

const ext = mime.extension(parsed.mediaType);
const name = ext
? `file.${ext}`
: "file";

const metadata: FileMetadata = {
size: buffer.length,
contentType: parsed.mediaType || undefined,
name,
};
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Data URL parser rejects valid media-type parameters and loses default type.

The current regex only allows ;base64 and fails for valid URLs like data:text/plain;charset=UTF-8,hello, and it treats data:;base64,... as an empty media type instead of defaulting to text/plain;charset=US-ASCII. That breaks valid data URLs and metadata extraction.

🐛 Proposed fix (more spec‑compliant parsing)
 function parseDataUrl(dataUrl: string): ParsedDataUrl {
   // Format: data:[<mediatype>][;base64],<data>
-  const match = dataUrl.match(/^data:([^;,]*)?(?:;(base64))?,(.*)$/);
-  if (!match) {
-    throw new Error("Invalid data URL format");
-  }
-  const [
-    ,
-    mediaType = "text/plain;charset=US-ASCII",
-    base64Flag,
-    data,
-  ] = match;
-  return {
-    mediaType,
-    isBase64: base64Flag === "base64",
-    data,
-  };
+  if (!dataUrl.startsWith("data:")) {
+    throw new Error("Invalid data URL format");
+  }
+  const commaIndex = dataUrl.indexOf(",");
+  if (commaIndex === -1) {
+    throw new Error("Invalid data URL format");
+  }
+  const meta = dataUrl.slice(5, commaIndex); // after "data:"
+  const data = dataUrl.slice(commaIndex + 1);
+  const isBase64 = /;base64$/i.test(meta);
+  const mediaTypeRaw = isBase64 ? meta.replace(/;base64$/i, "") : meta;
+  const mediaType = mediaTypeRaw ? mediaTypeRaw : "text/plain;charset=US-ASCII";
+  return {
+    mediaType,
+    isBase64,
+    data,
+  };
 }
🤖 Prompt for AI Agents
In `@platform/lib/file-stream.ts` around lines 74 - 116, The data URL parsing in
parseDataUrl is too strict: update parseDataUrl to accept full media-type with
optional parameters (e.g., "text/plain;charset=UTF-8") and to detect a "base64"
parameter anywhere in the parameter list instead of only allowing ";base64"
directly; if the mediatype portion is empty (e.g., "data:,...") return the
default "text/plain;charset=US-ASCII"; return the mediaType string including its
parameters (excluding the "base64" token) and an isBase64 boolean; ensure
getDataUrlStream and getDataUrlStreamAndMetadata use parseDataUrl's mediaType
and isBase64 (decode percent-encoding only for non-base64) so metadata
(contentType and size and filename extension via mime.extension) remains
correct.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@platform/lib/axios.ts`:
- Line 1: The code currently assigns the Authorization header directly
(bypassing Axios header normalization); change those assignments to use
AxiosHeaders.set() instead: import/keep AxiosHeaders (already imported) and in
the request-building code or request interceptor where you currently do
something like headers.Authorization = `Bearer ${token}` or
config.headers['Authorization'] = value, replace it with new
AxiosHeaders(config.headers).set('Authorization', value) or call
AxiosHeaders.set on the existing AxiosHeaders instance (e.g., const headers =
new AxiosHeaders(config.headers); headers.set('Authorization', `Bearer
${token}`); config.headers = headers). Update all occurrences (including the
spots around the current Authorization assignments referenced) to use
AxiosHeaders.set for proper normalization and merging.

In `@platform/package.json`:
- Line 3: Add ts-jest to platform/package.json's devDependencies (e.g.,
"ts-jest": "29.1.2") so the platform package declares the Jest TypeScript
transformer explicitly; update the "devDependencies" object in
platform/package.json to include that entry and run npm/yarn install. Also
address the TypeScript version mismatch between platform's "typescript":
"^4.9.5" and the root's ">=5.5.0 <5.7.0" by either aligning platform's
"typescript" to the root range or adding a comment/README note in the platform
package explaining the intentional divergence.

@@ -1,4 +1,4 @@
import axios from "axios";
import axios, { AxiosHeaders } from "axios";
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

find . -type f -name "axios.ts" | head -20

Repository: PipedreamHQ/pipedream

Length of output: 88


🏁 Script executed:

cat platform/lib/axios.ts | head -50

Repository: PipedreamHQ/pipedream

Length of output: 1650


🏁 Script executed:

sed -n '160,175p' platform/lib/axios.ts

Repository: PipedreamHQ/pipedream

Length of output: 565


🌐 Web query:

AxiosHeaders set method axios 1.x documentation

💡 Result:

In Axios 1.x, AxiosHeaders#set is documented as the primary way to set/merge headers on an AxiosHeaders instance. (axios.rest)

Signature (overloads)

set(headerName, value, rewrite?: boolean);
set(headerName, value, rewrite?: (this: AxiosHeaders, value: string, name: string, headers: RawAxiosHeaders) => boolean);
set(headers?: RawAxiosHeaders | AxiosHeaders | string, rewrite?: boolean);

(axios.rest)

rewrite behavior

  • false: don’t overwrite if the header already has a value (not undefined)
  • undefined (default): overwrite unless the existing value is false
  • true: always overwrite
  • can also be a function to decide per header/value whether to overwrite (github.com)

Notes

  • Accepts a single header, an object of headers, another AxiosHeaders, or a raw header string (newline-separated).
  • Returns this for chaining. (axios.rest)

Citations:


Use AxiosHeaders.set() for Authorization header

In Axios 1.x, AxiosHeaders.set() is the documented primary way to set headers and properly handles header normalization and merge semantics. Direct property assignment bypasses this logic.

♻️ Proposed change
-      if (!config.headers) config.headers = new AxiosHeaders();
-      config.headers.Authorization = oauthSignature;
+      if (!config.headers) config.headers = new AxiosHeaders();
+      config.headers.set("Authorization", oauthSignature);

Also applies to: 165-168

🤖 Prompt for AI Agents
In `@platform/lib/axios.ts` at line 1, The code currently assigns the
Authorization header directly (bypassing Axios header normalization); change
those assignments to use AxiosHeaders.set() instead: import/keep AxiosHeaders
(already imported) and in the request-building code or request interceptor where
you currently do something like headers.Authorization = `Bearer ${token}` or
config.headers['Authorization'] = value, replace it with new
AxiosHeaders(config.headers).set('Authorization', value) or call
AxiosHeaders.set on the existing AxiosHeaders instance (e.g., const headers =
new AxiosHeaders(config.headers); headers.set('Authorization', `Bearer
${token}`); config.headers = headers). Update all occurrences (including the
spots around the current Authorization assignments referenced) to use
AxiosHeaders.set for proper normalization and merging.

{
"name": "@pipedream/platform",
"version": "3.1.1",
"version": "3.2.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

cat -n platform/package.json

Repository: PipedreamHQ/pipedream

Length of output: 1128


🏁 Script executed:

find platform -name "jest.config.*" -o -name "jest.setup.*" | head -20

Repository: PipedreamHQ/pipedream

Length of output: 47


🏁 Script executed:

rg "ts-jest" platform/ 2>/dev/null || echo "No ts-jest references found"

Repository: PipedreamHQ/pipedream

Length of output: 92


🏁 Script executed:

rg "preset" platform/ --type json 2>/dev/null || echo "No preset configuration found"

Repository: PipedreamHQ/pipedream

Length of output: 94


🏁 Script executed:

ls -la | grep -E "jest|test"

Repository: PipedreamHQ/pipedream

Length of output: 134


🏁 Script executed:

find platform -type f \( -name "*.test.ts" -o -name "*.spec.ts" -o -name "*.test.js" -o -name "*.spec.js" \) | head -20

Repository: PipedreamHQ/pipedream

Length of output: 47


🏁 Script executed:

cat jest.config.js 2>/dev/null || cat jest.config.json 2>/dev/null || echo "No root jest config found"

Repository: PipedreamHQ/pipedream

Length of output: 556


🏁 Script executed:

head -60 package.json

Repository: PipedreamHQ/pipedream

Length of output: 2235


🌐 Web query:

ts-jest 29.1.2 TypeScript 4.9 compatibility support

💡 Result:

ts-jest 29.1.2 (released Jan 22, 2024) should be compatible with TypeScript 4.9, because ts-jest 29.x declares a TypeScript peer dependency of >=4.3 <6, which includes 4.9.x. [1][2]

Sources
[1] https://app.unpkg.com/ts-jest%4029.2.2/files/package.json
[2] https://github.com/kulshekhar/ts-jest/tags?after=v29.1.5


🏁 Script executed:

cat package.json | grep -A 100 '"devDependencies"' | grep -E "ts-jest|typescript" | head -10

Repository: PipedreamHQ/pipedream

Length of output: 246


Ensure ts-jest is listed in platform/package.json devDependencies

TypeScript 4.9.5 is compatible with ts-jest 29.1.2 (ts-jest 29.x supports TypeScript >=4.3 <6). However, ts-jest is missing from platform's devDependencies—it's currently only in the root package.json. Add it to platform to ensure explicit dependency declaration and consistency in the monorepo structure.

Also note the TypeScript version mismatch: root requires >=5.5.0 <5.7.0 while platform specifies ^4.9.5. Align these versions or document the intentional difference.

🤖 Prompt for AI Agents
In `@platform/package.json` at line 3, Add ts-jest to platform/package.json's
devDependencies (e.g., "ts-jest": "29.1.2") so the platform package declares the
Jest TypeScript transformer explicitly; update the "devDependencies" object in
platform/package.json to include that entry and run npm/yarn install. Also
address the TypeScript version mismatch between platform's "typescript":
"^4.9.5" and the root's ">=5.5.0 <5.7.0" by either aligning platform's
"typescript" to the root range or adding a comment/README note in the platform
package explaining the intentional divergence.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
platform/lib/axios.ts (1)

71-94: Use AxiosHeaders API for Content-Type detection to avoid OAuth signature mismatches.

When transformConfigForOauth() is called within the request interceptor, config.headers is an AxiosHeaders instance. Using for...in to enumerate its properties is unreliable since AxiosHeaders is a class with non-enumerable properties, not a plain object. This can cause Content-Type detection to fail silently, producing an invalid OAuth signature.

Suggested fix
-  for (const k in config.headers || {}) {
-    if (/content-type/i.test(k)) {
-      hasContentType = true;
-      formEncodedContentType = config.headers?.[k] === "application/x-www-form-urlencoded";
-      break;
-    }
-  }
+  const headers = AxiosHeaders.from(config.headers);
+  const contentType = headers?.get?.("Content-Type");
+  if (contentType != null) {
+    hasContentType = true;
+    formEncodedContentType = contentType === "application/x-www-form-urlencoded";
+  }

Copy link
Collaborator

@js07 js07 left a comment

Choose a reason for hiding this comment

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

Looks good to me overall. I just made one comment about recompiling the TS files.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@platform/package.json`:
- Line 31: The TypeScript semver in platform/package.json ("typescript":
">=5.5.0 <5.7.0") conflicts with workspace packages packages/sdk and packages/ai
which require "^5.6"; update the platform constraint to "^5.6" (or ">=5.6.0
<5.7.0") so the floor matches those packages, or alternatively confirm and
document that packages/sdk and packages/ai accept 5.5.x and adjust their
package.json entries instead; modify the TypeScript entry in
platform/package.json to the agreed version so all workspace constraints align.

"jest": "^29.1.2",
"type-fest": "^4.15.0",
"typescript": "^3.5.3"
"typescript": ">=5.5.0 <5.7.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# List TypeScript constraints and TS tooling versions across the repo.
echo "=== TypeScript version constraints ==="
rg -n -g 'package.json' '"typescript"\s*:' --multiline-dotall

echo -e "\n=== TypeScript-related tooling ==="
rg -n -g 'package.json' '"@typescript-eslint/|ts-node|ts-jest|tsup|tslib|babel-preset-typescript'

Repository: PipedreamHQ/pipedream

Length of output: 1037


Address TypeScript version mismatch in workspace packages.

The platform/package.json constraint of >=5.5.0 <5.7.0 is incompatible with packages/sdk and packages/ai, both of which require ^5.6 (meaning >=5.6.0). This means TypeScript 5.5.x would violate the constraints of these workspace packages. Either raise the floor to ^5.6 or verify that these packages will accept the lower bound before merging.

🤖 Prompt for AI Agents
In `@platform/package.json` at line 31, The TypeScript semver in
platform/package.json ("typescript": ">=5.5.0 <5.7.0") conflicts with workspace
packages packages/sdk and packages/ai which require "^5.6"; update the platform
constraint to "^5.6" (or ">=5.6.0 <5.7.0") so the floor matches those packages,
or alternatively confirm and document that packages/sdk and packages/ai accept
5.5.x and adjust their package.json entries instead; modify the TypeScript entry
in platform/package.json to the agreed version so all workspace constraints
align.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Used the same TS version range here as for the root package.json for the repo

Copy link
Collaborator

@js07 js07 left a comment

Choose a reason for hiding this comment

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

LGTM

@GTFalcao GTFalcao merged commit 33a2142 into master Jan 29, 2026
6 checks passed
@GTFalcao GTFalcao deleted the platform-base64-support branch January 29, 2026 17:44
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