Skip to content

Commit 0c19952

Browse files
Regenerate SDK with Fern's v3 Node generator (#222)
--------- Co-authored-by: Jay Vercellone <[email protected]>
1 parent 5d9e40d commit 0c19952

File tree

398 files changed

+3852
-5558
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

398 files changed

+3852
-5558
lines changed

.fernignore

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# Custom CI/CD
44
.github/workflows/auto-close-empty-prs.yml
5+
.github/workflows/ci.yml
56

67
.gitignore
78
.prettierignore
@@ -17,10 +18,41 @@ reference.md
1718
MIGRATE.md
1819

1920
# Custom Pipedream client files
21+
src/api/resources/index.ts
22+
src/api/types/index.ts
2023
src/browser/index.ts
2124
src/index.ts
2225
src/wrapper
2326

2427
# Ideally, we shouldn't. But until Fern supports the changes that we've made we
2528
# have to override some parts.
26-
29+
src/Client.ts
30+
31+
# Custom auth files
32+
src/core/auth/index.ts
33+
src/core/auth/ConnectTokenProvider.ts
34+
src/core/auth/StaticTokenProvider.ts
35+
src/core/auth/TokenProvider.ts
36+
37+
# Custom configuration props files
38+
src/api/types/ConfiguredProps.ts
39+
src/serialization/types/ConfiguredProps.ts
40+
41+
# Custom Proxy files
42+
src/api/resources/proxy/client/requests/ProxyPutRequest.ts
43+
src/api/resources/proxy/client/requests/ProxyGetRequest.ts
44+
src/api/resources/proxy/client/requests/index.ts
45+
src/api/resources/proxy/client/requests/ProxyPostRequest.ts
46+
src/api/resources/proxy/client/requests/ProxyPatchRequest.ts
47+
src/api/resources/proxy/client/requests/ProxyDeleteRequest.ts
48+
src/api/resources/proxy/client/Client.ts
49+
src/api/resources/proxy/client/index.ts
50+
51+
# Custom Workflow files
52+
src/api/resources/workflows/client/requests/InvokeWorkflowForExternalUserOpts.ts
53+
src/api/resources/workflows/client/requests/index.ts
54+
src/api/resources/workflows/client/requests/InvokeWorkflowOpts.ts
55+
src/api/resources/workflows/client/Client.ts
56+
src/api/resources/workflows/client/index.ts
57+
src/api/resources/workflows/index.ts
58+
src/api/types/HTTPAuthType.ts

.github/workflows/ci.yml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,14 @@ jobs:
1313
- name: Set up node
1414
uses: actions/setup-node@v3
1515

16+
- name: Install pnpm
17+
uses: pnpm/action-setup@v4
18+
19+
- name: Install dependencies
20+
run: pnpm install
21+
1622
- name: Compile
17-
run: yarn && yarn build
23+
run: pnpm build
1824

1925
test:
2026
runs-on: ubuntu-latest
@@ -26,13 +32,20 @@ jobs:
2632
- name: Set up node
2733
uses: actions/setup-node@v3
2834

29-
- name: Compile
30-
run: yarn && yarn test
35+
- name: Install pnpm
36+
uses: pnpm/action-setup@v4
37+
38+
- name: Install dependencies
39+
run: pnpm install
40+
41+
- name: Test
42+
run: pnpm test
3143

3244
publish:
3345
needs:
3446
- compile
3547
- test
48+
3649
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
3750
runs-on: ubuntu-latest
3851

@@ -42,12 +55,18 @@ jobs:
4255

4356
- name: Set up node
4457
uses: actions/setup-node@v3
58+
59+
- name: Install pnpm
60+
uses: pnpm/action-setup@v4
61+
4562
- name: Install dependencies
46-
run: yarn install --frozen-lockfile --non-interactive
63+
run: pnpm install --frozen-lockfile
4764

4865
- name: Build
49-
run: yarn build
66+
run: pnpm build
67+
5068
- name: Set up NPM authentication
5169
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
70+
5271
- name: Publish
53-
run: npm publish --access public --no-git-tag-version --tag latest
72+
run: pnpm publish --access public

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ tests
44
.gitignore
55
.github
66
.fernignore
7-
.prettierrc.yml
7+
biome.json
88
tsconfig.json
99
yarn.lock
1010
pnpm-lock.yaml

README.md

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,10 @@ Instantiate and use the client with the following:
2727
```typescript
2828
import { PipedreamClient } from "@pipedream/sdk";
2929

30-
const client = new PipedreamClient({
31-
clientId: "YOUR_CLIENT_ID",
32-
clientSecret: "YOUR_CLIENT_SECRET",
33-
projectEnvironment: "YOUR_PROJECT_ENVIRONMENT",
34-
projectId: "YOUR_PROJECT_ID",
35-
});
30+
const client = new PipedreamClient({ clientId: "YOUR_CLIENT_ID", clientSecret: "YOUR_CLIENT_SECRET", projectEnvironment: "YOUR_PROJECT_ENVIRONMENT", projectId: "YOUR_PROJECT_ID" });
3631
await client.actions.run({
3732
id: "id",
38-
externalUserId: "external_user_id",
33+
externalUserId: "external_user_id"
3934
});
4035
```
4136

@@ -86,7 +81,6 @@ const stream: ReadableStream<Uint8Array> = response.stream();
8681
// If you want to check if the response body has been used, you can use the following property.
8782
const bodyUsed = response.bodyUsed;
8883
```
89-
9084
<details>
9185
<summary>Save binary response to a file</summary>
9286

@@ -469,19 +463,14 @@ List endpoints are paginated. The SDK provides an iterator so that you can simpl
469463
```typescript
470464
import { PipedreamClient } from "@pipedream/sdk";
471465

472-
const client = new PipedreamClient({
473-
clientId: "YOUR_CLIENT_ID",
474-
clientSecret: "YOUR_CLIENT_SECRET",
475-
projectEnvironment: "YOUR_PROJECT_ENVIRONMENT",
476-
projectId: "YOUR_PROJECT_ID",
477-
});
466+
const client = new PipedreamClient({ clientId: "YOUR_CLIENT_ID", clientSecret: "YOUR_CLIENT_SECRET", projectEnvironment: "YOUR_PROJECT_ENVIRONMENT", projectId: "YOUR_PROJECT_ID" });
478467
const response = await client.apps.list({
479468
after: "after",
480469
before: "before",
481470
limit: 1,
482471
q: "q",
483472
sortKey: "name",
484-
sortDirection: "asc",
473+
sortDirection: "asc"
485474
});
486475
for await (const item of response) {
487476
console.log(item);
@@ -494,7 +483,7 @@ let page = await client.apps.list({
494483
limit: 1,
495484
q: "q",
496485
sortKey: "name",
497-
sortDirection: "asc",
486+
sortDirection: "asc"
498487
});
499488
while (page.hasNextPage()) {
500489
page = page.getNextPage();
@@ -583,8 +572,11 @@ console.log(rawResponse.headers['X-My-Header']);
583572

584573
### Runtime Compatibility
585574

575+
586576
The SDK works in the following runtimes:
587577

578+
579+
588580
- Node.js 18+
589581
- Vercel
590582
- Cloudflare Workers
@@ -614,4 +606,4 @@ otherwise they would be overwritten upon the next generated release. Feel free t
614606
a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
615607
an issue first to discuss with us!
616608

617-
On the other hand, contributions to the README are always very welcome!
609+
On the other hand, contributions to the README are always very welcome!

biome.json

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.2.5/schema.json",
3+
"root": true,
4+
"vcs": {
5+
"enabled": false
6+
},
7+
"files": {
8+
"ignoreUnknown": true,
9+
"includes": [
10+
"./**",
11+
"!dist",
12+
"!lib",
13+
"!*.tsbuildinfo",
14+
"!_tmp_*",
15+
"!*.tmp",
16+
"!.tmp/",
17+
"!*.log",
18+
"!.DS_Store",
19+
"!Thumbs.db"
20+
]
21+
},
22+
"formatter": {
23+
"enabled": true,
24+
"indentStyle": "space",
25+
"indentWidth": 4,
26+
"lineWidth": 120
27+
},
28+
"javascript": {
29+
"formatter": {
30+
"quoteStyle": "double"
31+
}
32+
},
33+
"assist": {
34+
"enabled": true,
35+
"actions": {
36+
"source": {
37+
"organizeImports": "on"
38+
}
39+
}
40+
},
41+
"linter": {
42+
"rules": {
43+
"style": {
44+
"useNodejsImportProtocol": "off"
45+
},
46+
"suspicious": {
47+
"noAssignInExpressions": "warn",
48+
"noUselessEscapeInString": {
49+
"level": "warn",
50+
"fix": "none",
51+
"options": {}
52+
},
53+
"noThenProperty": "warn",
54+
"useIterableCallbackReturn": "warn",
55+
"noShadowRestrictedNames": "warn",
56+
"noTsIgnore": {
57+
"level": "warn",
58+
"fix": "none",
59+
"options": {}
60+
},
61+
"noConfusingVoidType": {
62+
"level": "warn",
63+
"fix": "none",
64+
"options": {}
65+
}
66+
}
67+
}
68+
}
69+
}

jest.config.mjs

Lines changed: 0 additions & 42 deletions
This file was deleted.

package.json

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/sdk",
3-
"version": "2.0.13",
3+
"version": "2.1.0",
44
"private": false,
55
"repository": "github:PipedreamHQ/pipedream-sdk-typescript",
66
"type": "commonjs",
@@ -70,27 +70,24 @@
7070
"LICENSE"
7171
],
7272
"scripts": {
73-
"format": "prettier . --write --ignore-unknown",
74-
"build": "yarn build:cjs && yarn build:esm",
73+
"format": "biome format --write --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
74+
"check": "biome check --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
75+
"check:fix": "biome check --fix --unsafe --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
76+
"build": "pnpm build:cjs && pnpm build:esm",
7577
"build:cjs": "tsc --project ./tsconfig.cjs.json",
7678
"build:esm": "tsc --project ./tsconfig.esm.json && node scripts/rename-to-esm-files.js dist/esm",
77-
"test": "jest --config jest.config.mjs",
78-
"test:unit": "jest --selectProjects unit",
79-
"test:browser": "jest --selectProjects browser",
80-
"test:wire": "jest --selectProjects wire"
79+
"test": "vitest",
80+
"test:unit": "vitest --project unit",
81+
"test:wire": "vitest --project wire"
8182
},
8283
"devDependencies": {
83-
"@jest/globals": "^29.7.0",
84-
"@types/jest": "^29.5.14",
85-
"@types/node": "^18.19.70",
86-
"jest": "^29.7.0",
87-
"jest-environment-jsdom": "^29.7.0",
88-
"msw": "^2.8.4",
89-
"prettier": "^3.4.2",
90-
"ts-jest": "^29.3.4",
84+
"webpack": "^5.97.1",
9185
"ts-loader": "^9.5.1",
92-
"typescript": "~5.7.2",
93-
"webpack": "^5.97.1"
86+
"vitest": "^3.2.4",
87+
"msw": "2.11.2",
88+
"@types/node": "^18.19.70",
89+
"@biomejs/biome": "2.2.5",
90+
"typescript": "~5.7.2"
9491
},
9592
"browser": {
9693
"./dist/cjs/wrapper/utils/getBaseUrl.js": "./dist/cjs/wrapper/utils/getBaseUrl.browser.js",
@@ -100,7 +97,7 @@
10097
"path": false,
10198
"stream": false
10299
},
103-
"packageManager": "[email protected]",
100+
"packageManager": "[email protected]",
104101
"engines": {
105102
"node": ">=18.0.0"
106103
},

0 commit comments

Comments
 (0)