Skip to content

Commit bd3c667

Browse files
committed
chore: update more dependencies
1 parent a8a2e20 commit bd3c667

File tree

6 files changed

+48
-60
lines changed

6 files changed

+48
-60
lines changed

bun.lockb

3.98 KB
Binary file not shown.

packages/cli/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@
1212
"release-it": "release-it"
1313
},
1414
"dependencies": {
15-
"@effect/schema": "0.75.4",
16-
"@effect/platform": "0.68.4",
17-
"effect": "3.9.2",
15+
"@effect/schema": "0.75.5",
16+
"@effect/platform": "0.69.13",
17+
"effect": "3.10.8",
1818
"fs-extra": "11.2.0",
1919
"pkg-dir": "8.0.0",
2020
"yargs": "17.7.2"
2121
},
2222
"devDependencies": {
2323
"@release-it/keep-a-changelog": "5.0.0",
2424
"@types/fs-extra": "11.0.4",
25-
"@types/node": "22.7.5",
25+
"@types/node": "22.8.7",
2626
"@types/yargs": "17.0.33",
27-
"release-it": "17.8.2",
27+
"release-it": "17.10.0",
2828
"typescript": "5.6.3"
2929
},
3030
"peerDependencies": {

packages/panda/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@
2929
"ts-pattern": "5.5.0"
3030
},
3131
"devDependencies": {
32-
"@pandacss/dev": "0.46.1",
32+
"@pandacss/dev": "0.47.0",
3333
"@release-it/keep-a-changelog": "5.0.0",
3434
"clean-package": "2.2.0",
35-
"release-it": "17.8.2",
36-
"tsup": "8.3.0"
35+
"release-it": "17.10.0",
36+
"tsup": "8.3.5"
3737
},
3838
"peerDependencies": {
3939
"@pandacss/dev": ">0.22.0"

website/package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,40 +17,40 @@
1717
},
1818
"dependencies": {
1919
"@ark-ui/react": "4.2.0",
20-
"@auth/prisma-adapter": "2.7.0",
21-
"@biomejs/biome": "1.9.3",
22-
"@effect/platform": "0.61.1",
23-
"@effect/schema": "0.70.0",
24-
"@icons-pack/react-simple-icons": "10.0.0",
25-
"@pandacss/dev": "0.46.1",
20+
"@auth/prisma-adapter": "2.7.2",
21+
"@biomejs/biome": "1.9.4",
22+
"@effect/platform": "0.69.13",
23+
"@effect/schema": "0.75.5",
24+
"@icons-pack/react-simple-icons": "10.1.0",
25+
"@pandacss/dev": "0.47.0",
2626
"@park-ui/panda-preset": "workspace:*",
27-
"@prisma/client": "5.20.0",
27+
"@prisma/client": "5.21.1",
2828
"@types/file-saver": "2.0.7",
2929
"file-saver": "2.0.5",
3030
"jszip": "3.10.1",
31-
"@types/node": "22.7.5",
32-
"@types/react": "18.3.11",
31+
"@types/node": "22.8.7",
32+
"@types/react": "18.3.12",
3333
"@types/react-dom": "18.3.1",
3434
"@uidotdev/usehooks": "2.4.1",
35-
"effect": "3.6.0",
35+
"effect": "3.10.8",
3636
"globby": "14.0.2",
37-
"lucide-react": "0.452.0",
37+
"lucide-react": "0.454.0",
3838
"next": "14.2.15",
3939
"next-auth": "5.0.0-beta.19",
4040
"next-themes": "0.3.0",
4141
"pandacss-preset-typography": "0.1.6",
42-
"prisma": "5.20.0",
42+
"prisma": "5.21.1",
4343
"re-resizable": "6.10.0",
4444
"react": "18.3.1",
4545
"react-dom": "18.3.1",
4646
"react-frame-component": "5.2.7",
4747
"react-runner": "1.0.5",
4848
"rehype-autolink-headings": "7.1.0",
4949
"rehype-slug": "6.0.0",
50-
"shiki": "1.22.0",
50+
"shiki": "1.22.2",
5151
"typescript": "5.6.3",
5252
"usehooks-ts": "3.1.0",
5353
"velite": "0.1.1",
54-
"zustand": "5.0.0"
54+
"zustand": "5.0.1"
5555
}
5656
}
Lines changed: 26 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,34 @@
1-
import { HttpClient, HttpClientRequest, HttpClientResponse } from '@effect/platform'
2-
import { Schema } from '@effect/schema'
3-
import { Effect, Schedule, pipe } from 'effect'
41
import type { NextRequest } from 'next/server'
52

6-
const Order = Schema.Struct({
7-
data: Schema.optional(
8-
Schema.Struct({
9-
attributes: Schema.Struct({
10-
refunded: Schema.Boolean,
11-
}),
12-
}),
13-
),
14-
})
15-
163
const { FIGMA_KIT_URL, LEMON_SQUEEZY_API_KEY } = process.env
174

185
export const GET = async (req: NextRequest) => {
196
const { searchParams } = new URL(req.url)
7+
const orderId = searchParams.get('order_id')
8+
9+
if (!orderId) {
10+
return Response.redirect('https://park-ui.com')
11+
}
12+
13+
try {
14+
const response = await fetch(`https://api.lemonsqueezy.com/v1/orders/${orderId}`, {
15+
headers: {
16+
Accept: 'application/vnd.api+json',
17+
'Content-Type': 'application/vnd.api+json',
18+
Authorization: `Bearer ${LEMON_SQUEEZY_API_KEY}`,
19+
},
20+
})
21+
22+
if (!response.ok) {
23+
throw new Error('Network response was not ok')
24+
}
25+
26+
const data = await response.json()
27+
28+
const isValid = data.data?.attributes?.refunded === false
2029

21-
const isValid = await Effect.runPromise(
22-
pipe(
23-
Effect.fromNullable(searchParams.get('order_id')),
24-
Effect.flatMap((orderId) =>
25-
pipe(
26-
HttpClientRequest.get(`https://api.lemonsqueezy.com/v1/orders/${orderId}`, {
27-
headers: {
28-
Accept: 'application/vnd.api+json',
29-
'Content-Type': 'application/vnd.api+json',
30-
Authorization: `Bearer ${LEMON_SQUEEZY_API_KEY}`,
31-
},
32-
}),
33-
HttpClient.fetchOk,
34-
HttpClientResponse.schemaBodyJsonScoped(Order),
35-
Effect.timeout('1 seconds'),
36-
Effect.retry(Schedule.exponential(200).pipe(Schedule.compose(Schedule.recurs(3)))),
37-
),
38-
),
39-
Effect.map((data) => !data.data?.attributes.refunded),
40-
Effect.catchAll(() => Effect.succeed(false)),
41-
),
42-
)
43-
44-
return Response.redirect(isValid ? FIGMA_KIT_URL : 'https://park-ui.com')
30+
return Response.redirect(isValid ? FIGMA_KIT_URL : 'https://park-ui.com')
31+
} catch (error) {
32+
return Response.redirect('https://park-ui.com')
33+
}
4534
}

website/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"allowJs": true,
44
"baseUrl": ".",
55
"esModuleInterop": true,
6-
"exactOptionalPropertyTypes": true,
76
"forceConsistentCasingInFileNames": true,
87
"incremental": true,
98
"isolatedModules": true,

0 commit comments

Comments
 (0)