Skip to content

Commit

Permalink
fix: fix the redirect function
Browse files Browse the repository at this point in the history
  • Loading branch information
OrJDev committed Nov 5, 2024
1 parent 3303013 commit 8e1bda2
Show file tree
Hide file tree
Showing 18 changed files with 232 additions and 236 deletions.
7 changes: 7 additions & 0 deletions .changeset/polite-poems-greet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@solid-mediakit/prpc-plugin': minor
'@solid-mediakit/auth': minor
'@solid-mediakit/prpc': minor
---

fix: fix the redirect function
16 changes: 8 additions & 8 deletions examples/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,28 @@
},
"type": "module",
"devDependencies": {
"@types/node": "^22.0.0",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"autoprefixer": "^10.4.19",
"esbuild": "^0.23.0",
"eslint": "^9.8.0",
"eslint-plugin-solid": "^0.14.1",
"@types/node": "^22.0.0",
"esbuild": "^0.23.0",
"postcss": "^8.4.40",
"tailwindcss": "^3.4.7",
"autoprefixer": "^10.4.19",
"typescript": "^5.5.4",
"vite": "^5.3.5"
},
"dependencies": {
"zod": "^3.23.8",
"@solid-mediakit/auth": "workspace:*",
"@auth/core": "^0.35.0",
"@solidjs/router": "^0.14.10",
"@solid-mediakit/auth": "workspace:*",
"@solid-mediakit/auth-plugin": "workspace:*",
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.15.1",
"@solidjs/start": "^1.0.8",
"solid-js": "^1.9.2",
"vinxi": "^0.4.3",
"@solidjs/meta": "^0.29.4",
"@solid-mediakit/auth-plugin": "workspace:*"
"zod": "^3.23.8"
},
"engines": {
"node": ">=16"
Expand Down
10 changes: 5 additions & 5 deletions examples/forms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
"vite": "^5.3.5"
},
"dependencies": {
"@solidjs/router": "^0.14.1",
"@solid-mediakit/forms": "workspace:*",
"@solid-mediakit/forms-plugin": "workspace:*",
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.15.1",
"@solidjs/start": "^1.0.6",
"solid-js": "^1.8.19",
"vinxi": "^0.4.1",
"@solidjs/meta": "^0.29.4",
"zod": "^3.22.4",
"@solid-mediakit/forms": "workspace:*",
"@solid-mediakit/forms-plugin": "workspace:*"
"zod": "^3.22.4"
},
"engines": {
"node": ">=16"
Expand Down
28 changes: 14 additions & 14 deletions examples/jd-prpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,30 @@
"@types/node": "^20.11.26",
"@typescript-eslint/eslint-plugin": "^7.6.0",
"@typescript-eslint/parser": "^7.6.0",
"dotenv": "^16.4.5",
"dotenv-cli": "^7.4.2",
"eslint": "^9.13.0",
"eslint-plugin-solid": "^0.14.3",
"typescript": "^5.6.2",
"vite": "^5.1.6",
"prisma": "^5.20.0",
"dotenv": "^16.4.5",
"dotenv-cli": "^7.4.2"
"typescript": "^5.6.2",
"vite": "^5.1.6"
},
"dependencies": {
"@solidjs/router": "^0.14.10",
"@solidjs/start": "^1.0.9",
"solid-js": "^1.9.3",
"vinxi": "^0.4.3",
"@solidjs/meta": "^0.29.4",
"zod": "^3.22.4",
"@auth/core": "0.35.0",
"@solid-mediakit/auth": "workspace:*",
"@auth/prisma-adapter": "^2.6.0",
"@prisma/client": "^5.20.0",
"@solid-mediakit/auth": "workspace:*",
"@solid-mediakit/prpc": "workspace:*",
"@solid-mediakit/prpc-plugin": "workspace:*",
"@prisma/client": "^5.20.0",
"postcss": "^8.4.40",
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.15.1",
"@solidjs/start": "^1.0.9",
"autoprefixer": "^10.4.19",
"tailwindcss": "^3.4.7"
"postcss": "^8.4.40",
"solid-js": "^1.9.3",
"tailwindcss": "^3.4.7",
"vinxi": "^0.4.3",
"zod": "^3.22.4"
},
"engines": {
"node": ">=16"
Expand Down
6 changes: 3 additions & 3 deletions examples/log/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
"version": "vinxi version"
},
"dependencies": {
"@solid-mediakit/log": "workspace:*",
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.14.1",
"@solidjs/router": "^0.15.1",
"@solidjs/start": "^1.0.6",
"solid-js": "^1.8.19",
"vinxi": "^0.4.1",
"@solid-mediakit/log": "workspace:*"
"vinxi": "^0.4.1"
},
"engines": {
"node": ">=18"
Expand Down
8 changes: 4 additions & 4 deletions examples/media/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
"vite": "^5.3.5"
},
"dependencies": {
"@solidjs/router": "^0.14.1",
"@solid-mediakit/media": "workspace:*",
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.15.1",
"@solidjs/start": "^1.0.6",
"solid-js": "^1.8.19",
"vinxi": "^0.4.1",
"@solidjs/meta": "^0.29.4",
"@solid-mediakit/media": "workspace:*"
"vinxi": "^0.4.1"
},
"engines": {
"node": ">=16"
Expand Down
6 changes: 3 additions & 3 deletions examples/og/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
"version": "vinxi version"
},
"dependencies": {
"@solid-mediakit/og": "workspace:*",
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.14.1",
"@solidjs/router": "^0.15.1",
"@solidjs/start": "^1.0.6",
"solid-js": "^1.8.19",
"vinxi": "^0.4.1",
"@solid-mediakit/og": "workspace:*"
"vinxi": "^0.4.1"
},
"engines": {
"node": ">=18"
Expand Down
20 changes: 10 additions & 10 deletions examples/prpc-clerk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
},
"type": "module",
"devDependencies": {
"@types/babel__core": "^7.20.5",
"@types/node": "^22.0.0",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
Expand All @@ -18,22 +19,21 @@
"postcss": "^8.4.40",
"tailwindcss": "^3.4.7",
"typescript": "^5.5.4",
"vite": "^5.3.5",
"@types/babel__core": "^7.20.5"
"vite": "^5.3.5"
},
"dependencies": {
"typescript": "^4.8.2",
"zod": "^3.22.4",
"@solidjs/router": "^0.14.5",
"@solidjs/start": "^1.0.6",
"solid-js": "^1.8.19",
"vinxi": "^0.4.3",
"@solidjs/meta": "^0.29.4",
"@babel/preset-typescript": "^7.24.7",
"@solid-mediakit/prpc": "workspace:*",
"@solid-mediakit/prpc-plugin": "workspace:*",
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.15.1",
"@solidjs/start": "^1.0.6",
"@tanstack/solid-query": "^5.59.17",
"clerk-solidjs": "^2.0.5",
"@tanstack/solid-query": "^5.59.17"
"solid-js": "^1.8.19",
"typescript": "^4.8.2",
"vinxi": "^0.4.3",
"zod": "^3.22.4"
},
"engines": {
"node": ">=16"
Expand Down
26 changes: 13 additions & 13 deletions examples/prpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,34 @@
},
"type": "module",
"devDependencies": {
"@types/babel__core": "^7.20.5",
"@types/node": "^22.0.0",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"autoprefixer": "^10.4.19",
"eslint": "^9.8.0",
"eslint-plugin-solid": "^0.14.1",
"postcss": "^8.4.40",
"autoprefixer": "^10.4.19",
"tailwindcss": "^3.4.7",
"typescript": "^5.5.4",
"vite": "^5.3.5",
"@types/babel__core": "^7.20.5"
"vite": "^5.3.5"
},
"dependencies": {
"@tanstack/solid-query": "^5.56.2",
"typescript": "^4.8.2",
"zod": "^3.22.4",
"@solidjs/router": "^0.14.5",
"@solidjs/start": "^1.0.6",
"solid-js": "^1.9.3",
"vinxi": "^0.4.3",
"@solidjs/meta": "^0.29.4",
"@auth/core": "0.35.0",
"@solid-mediakit/auth": "workspace:*",
"@babel/core": "^7.25.2",
"@babel/preset-typescript": "^7.24.7",
"@solid-mediakit/auth": "workspace:*",
"@solid-mediakit/prpc": "workspace:*",
"@solid-mediakit/prpc-plugin": "workspace:*",
"clerk-solidjs": "^2.0.5"
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.15.1",
"@solidjs/start": "^1.0.6",
"@tanstack/solid-query": "^5.56.2",
"clerk-solidjs": "^2.0.5",
"solid-js": "^1.9.3",
"typescript": "^4.8.2",
"vinxi": "^0.4.3",
"zod": "^3.22.4"
},
"engines": {
"node": ">=16"
Expand Down
4 changes: 2 additions & 2 deletions examples/prpc/src/routes/async.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { createAsync } from '@solidjs/router'
import { type VoidComponent } from 'solid-js'
import { getRequest } from '~/use/use'
import { redirectRequet } from '~/use/test2'

const Home: VoidComponent = () => {
const hello1 = createAsync(() => getRequest.raw({ test: 'yes' }), {
const hello1 = createAsync(() => redirectRequet.raw(), {
deferStream: true,
})

Expand Down
12 changes: 6 additions & 6 deletions examples/routetypes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@
"@types/node": "^22.0.0",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"autoprefixer": "^10.4.19",
"eslint": "^9.8.0",
"eslint-plugin-solid": "^0.14.1",
"postcss": "^8.4.40",
"autoprefixer": "^10.4.19",
"tailwindcss": "^3.4.7",
"typescript": "^5.5.4",
"vite": "^5.3.5"
},
"dependencies": {
"typescript": "^4.8.2",
"@solidjs/router": "^0.14.5",
"@solid-mediakit/routetypes": "workspace:*",
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.15.1",
"@solidjs/start": "^1.0.6",
"solid-js": "^1.9.3",
"vinxi": "^0.4.3",
"@solidjs/meta": "^0.29.4",
"@solid-mediakit/routetypes": "workspace:*"
"typescript": "^4.8.2",
"vinxi": "^0.4.3"
},
"engines": {
"node": ">=16"
Expand Down
26 changes: 13 additions & 13 deletions packages/auth/solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,31 +43,31 @@
"main": "./dist/index.cjs",
"types": "./dist/index.d.ts",
"devDependencies": {
"rollup": "^4.18.0",
"rollup-preset-solid": "^2.0.1",
"@types/node": "^20.14.9",
"@typescript-eslint/parser": "^7.14.1",
"typescript": "^5.5.2",
"@types/set-cookie-parser": "^2.4.9",
"@auth/core": "^0.35.0",
"@solidjs/router": "^0.14.10",
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.15.1",
"@solidjs/start": "^1.0.6",
"@types/node": "^20.14.9",
"@types/set-cookie-parser": "^2.4.9",
"@typescript-eslint/parser": "^7.14.1",
"rollup": "^4.18.0",
"rollup-preset-solid": "^2.0.1",
"solid-js": "^1.8.19",
"vinxi": "^0.4.3",
"@solidjs/meta": "^0.29.4"
"typescript": "^5.5.2",
"vinxi": "^0.4.3"
},
"dependencies": {
"@solid-mediakit/shared": "workspace:*",
"set-cookie-parser": "^2.6.0",
"cookie": "^0.6.0"
"cookie": "^0.6.0",
"set-cookie-parser": "^2.6.0"
},
"peerDependencies": {
"@auth/core": "^0.35.0",
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.14.10",
"@solidjs/start": "^1.0.6",
"solid-js": "^1.8.19",
"vinxi": "^0.4.3",
"@solidjs/meta": "^0.29.4"
"vinxi": "^0.4.3"
},
"engines": {
"node": ">=16"
Expand Down
4 changes: 2 additions & 2 deletions packages/prpc/plugin/src/compiler/babel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,15 @@ export function createTransform$(opts?: PRPCPluginOptions<any>) {
importIfNotThere(
path,
t,
args._cache ? 'cache' : 'GET',
args._cache ? 'query' : 'GET',
args._cache ? '@solidjs/router' : '@solidjs/start',
)
}

const wrappedArg =
args._method === 'GET'
? t.callExpression(
t.identifier(args._cache ? 'cache' : 'GET'),
t.identifier(args._cache ? 'query' : 'GET'),
[originFn],
)
: originFn
Expand Down
23 changes: 11 additions & 12 deletions packages/prpc/solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,34 +34,33 @@
"types": "./dist/index.d.ts",
"module": "./dist/server.js",
"devDependencies": {
"@auth/core": "0.35.0",
"@clerk/backend": "^1.14.1",
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.15.1",
"@solidjs/start": "^1.0.9",
"@tanstack/solid-query": "^5.59.0",
"@types/node": "^22.0.0",
"@typescript-eslint/parser": "^7.18.0",
"solid-js": "^1.9.3",
"tsup": "^8.2.3",
"tsup-preset-solid": "2.2.0",
"typescript": "^5.5.4",
"zod": "^3.23.8",
"@auth/core": "0.35.0",
"valibot": "^0.42.1",
"@clerk/backend": "^1.14.1",
"@solidjs/router": "^0.14.10",
"@solidjs/start": "^1.0.9",
"solid-js": "^1.9.3",
"vinxi": "^0.4.3",
"@solidjs/meta": "^0.29.4"
"zod": "^3.23.8"
},
"dependencies": {
"@rollup/plugin-typescript": "^11.1.6",
"@rollup/pluginutils": "^5.1.0"
},
"peerDependencies": {
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.15.0",
"@tanstack/solid-query": "^5.59.16",
"typescript": "^4.8.2",
"@solidjs/router": "^0.14.10",
"@solidjs/start": "^1.0.9",
"solid-js": "^1.9.3",
"vinxi": "^0.4.3",
"@solidjs/meta": "^0.29.4"
"typescript": "^4.8.2",
"vinxi": "^0.4.3"
},
"peerDependenciesMeta": {
"@tanstack/solid-query": {
Expand Down
Loading

0 comments on commit 8e1bda2

Please sign in to comment.