PipedreamHQ / PipedreamHQ/pipedream-sdk-typescript
Browser createFrontendClient ignores projectId, causing connect-react calls to use /v1/connect//...
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 10
- Forks
- 5
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 2
Description
createFrontendClient from @pipedream/sdk/browser appears to ignore a configured projectId.
This looks related to #209 and #281, but the browser-specific client still hardcodes projectId: "".
Tested with:
@pipedream/sdk@3.0.7@pipedream/connect-react@3.0.1
Reproduction:
import { createFrontendClient } from "@pipedream/sdk/browser";
const client = createFrontendClient({
externalUserId: "user_123",
projectEnvironment: "development",
projectId: "proj_expected",
tokenCallback: async () => ({
token: "token",
expiresAt: new Date(Date.now() + 60_000),
connectLinkUrl: "",
}),
});
console.log(client._options.projectId); // ""
Observed behavior:
connect-react calls such as client.accounts.list(...) and client.components.list(...) produce URLs like:
https://api.pipedream.com/v1/connect//accounts
https://api.pipedream.com/v1/connect//components
Expected behavior:
The browser client should preserve the configured projectId, or the docs should describe the supported browser-side way for connect-react account/component calls to resolve the project.
Relevant source on current main:
// src/browser/index.ts
super({
baseUrl,
projectEnvironment,
projectId: "",
tokenProvider,
workflowDomain,
});
Additional local verification:
Even when passing projectId through public createFrontendClient options, a rendered ComponentForm still attempts account/component requests under /v1/connect//....
Previous related issue/PR:
- #209
- #281
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/browser/index.ts at the createFrontendClient super call, then reproduce the issue with the provided example and inspect the resulting accounts.list or components.list URLs. Done means a configured projectId is preserved for browser client requests, so connect-react calls no longer use /v1/connect//...; compare the behavior with related issues #209 and #281.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- api, frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100