Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/vercel-connect-token-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: vercel-node-connect-token CI

on:
push:
branches: [master]
paths:
- examples/vercel-node-connect-token/**
- .github/workflows/vercel-connect-token-ci.yml
pull_request:
paths:
- examples/vercel-node-connect-token/**
- .github/workflows/vercel-connect-token-ci.yml

concurrency:
group: vercel-connect-token-${{ github.ref }}
cancel-in-progress: true

jobs:
ci:
name: install / lint / test / build
runs-on: ubuntu-latest
defaults:
run:
working-directory: examples/vercel-node-connect-token

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 11.1.1
run_install: false

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm
cache-dependency-path: examples/vercel-node-connect-token/pnpm-lock.yaml

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Lint
run: pnpm run lint

- name: Test
run: pnpm run test

- name: Build
run: pnpm run build
5 changes: 5 additions & 0 deletions examples/vercel-node-connect-token/api/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ import { PluggyClient } from 'pluggy-sdk'
const { PLUGGY_CLIENT_ID, PLUGGY_CLIENT_SECRET } = process.env

export default function (req: VercelRequest, res: VercelResponse) {
if (!PLUGGY_CLIENT_ID || !PLUGGY_CLIENT_SECRET) {
res.status(500).json({ error: 'Missing PLUGGY_CLIENT_ID or PLUGGY_CLIENT_SECRET' })
return
}

const pluggyClient = new PluggyClient({
clientId: PLUGGY_CLIENT_ID,
clientSecret: PLUGGY_CLIENT_SECRET
Expand Down
9 changes: 7 additions & 2 deletions examples/vercel-node-connect-token/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,17 @@
},
"scripts": {
"preinstall": "pnpm audit && pnpm audit signatures",
"lint:lockfile": "pnpm install --frozen-lockfile"
"lint:lockfile": "pnpm install --frozen-lockfile",
"typecheck": "tsc --noEmit",
"lint": "tsc --noEmit",
"test": "tsc --noEmit",
"build": "tsc --noEmit"
},
"dependencies": {
"pluggy-sdk": "0.7.1"
},
"devDependencies": {
"@vercel/node": "1.10.0"
"@vercel/node": "1.10.0",
"typescript": "5.9.3"
}
}
10 changes: 10 additions & 0 deletions examples/vercel-node-connect-token/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions examples/vercel-node-connect-token/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"noEmit": true
},
"include": ["api/**/*"]
}
Loading