-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #72 from upstash/DX-462
Add new wrapper for appRouter and replace rome with biome
- Loading branch information
Showing
6 changed files
with
240 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Tests | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
prerelease: | ||
outputs: | ||
version: ${{ steps.version.outputs.version }} | ||
name: Pre release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get version | ||
id: version | ||
run: echo "::set-output name=version::v0.0.0-ci.${GITHUB_SHA}-$(date +%Y%m%d%H%M%S)" | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install pnpm | ||
run: npm install -g pnpm | ||
|
||
- name: Set version | ||
run: | | ||
echo $(jq --arg v "${{ steps.version.outputs.version }}" '(.version) = $v' package.json) > package.json | ||
- name: Install Dependencies | ||
run: pnpm install | ||
|
||
- name: Build | ||
run: pnpm run build | ||
|
||
- name: Set NPM_TOKEN | ||
run: npm config set //registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}} | ||
|
||
- name: Publish ci version | ||
run: npm publish --tag=ci --verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { verifySignatureAppRouter } from "@upstash/qstash/dist/nextjs"; | ||
import { NextRequest, NextResponse } from "next/server"; | ||
|
||
async function handler(_req: NextRequest) { | ||
// simulate work | ||
await new Promise((r) => setTimeout(r, 1000)); | ||
|
||
console.log("Success"); | ||
return NextResponse.json({ name: "John Doe Serverless" }); | ||
} | ||
export const POST = verifySignatureAppRouter(handler); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.