Compare commits
7 Commits
8cfe1222fa
...
4c6fbf46aa
Author | SHA1 | Date |
---|---|---|
|
4c6fbf46aa | |
|
bebdfa2a88 | |
|
26d0efb036 | |
|
73c899bc81 | |
|
99e7bf2e64 | |
|
ad4622a853 | |
|
fba3d9e38d |
|
@ -26,11 +26,17 @@ jobs:
|
|||
- name: Build
|
||||
run: yarn build
|
||||
|
||||
- name: Set NPM Auth Token
|
||||
run: yarn config set npmAuthToken ${NPM_TOKEN}
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
- name: Create Release Pull Request or Publish to npm
|
||||
id: changesets
|
||||
uses: changesets/action@v1
|
||||
with:
|
||||
publish: yarn changeset publish
|
||||
publish: yarn run publish
|
||||
version: yarn changeset version
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"scripts": {
|
||||
"build": "yarn workspaces foreach --all --topological --verbose run build",
|
||||
"publint": "yarn workspaces foreach --all --topological --verbose run publint",
|
||||
"publish": "yarn workspaces foreach --all --no-private --topological --verbose npm publish --tolerate-republish",
|
||||
"typecheck": "yarn tsc --build",
|
||||
"typecheck:clean": "yarn tsc --build --clean",
|
||||
"typecheck:watch": "yarn tsc --build --watch",
|
||||
|
@ -44,4 +45,4 @@
|
|||
"vitest": "^3.0.8"
|
||||
},
|
||||
"packageManager": "yarn@4.0.2"
|
||||
}
|
||||
}
|
|
@ -59,7 +59,7 @@ Valibot:
|
|||
|
||||
```ts
|
||||
import { object, string } from 'valibot'
|
||||
import { parseWithValibot } from 'conform-to-valibot'
|
||||
import { parseWithValibot } from '@conform-to/valibot'
|
||||
import { conformValidator } from '@hono/conform-validator'
|
||||
import { HTTPException } from 'hono/http-exception'
|
||||
|
||||
|
|
|
@ -46,9 +46,9 @@
|
|||
"devDependencies": {
|
||||
"@arethetypeswrong/cli": "^0.17.4",
|
||||
"@conform-to/dom": "^1.1.5",
|
||||
"@conform-to/valibot": "^1.0.0",
|
||||
"@conform-to/yup": "^1.1.5",
|
||||
"@conform-to/zod": "^1.1.5",
|
||||
"conform-to-valibot": "^1.10.0",
|
||||
"publint": "^0.3.9",
|
||||
"tsup": "^8.4.0",
|
||||
"typescript": "^5.8.2",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { parseWithValibot } from 'conform-to-valibot'
|
||||
import { parseWithValibot } from '@conform-to/valibot'
|
||||
import { Hono } from 'hono'
|
||||
import { hc } from 'hono/client'
|
||||
import type { ExtractSchema, ParsedFormValue } from 'hono/types'
|
||||
|
|
|
@ -30,8 +30,8 @@ Also, there is two ways to use this middleware:
|
|||
app.use(
|
||||
'/google',
|
||||
googleAuth({
|
||||
client_id: Bun.env.GOOGLE_ID,
|
||||
client_secret: Bun.env.GOOGLE_SECRET,
|
||||
client_id: process.env.GOOGLE_ID,
|
||||
client_secret: process.env.GOOGLE_SECRET,
|
||||
scope: ['openid', 'email', 'profile'],
|
||||
})
|
||||
)
|
||||
|
@ -57,8 +57,8 @@ Or
|
|||
app.get(
|
||||
'/google',
|
||||
googleAuth({
|
||||
client_id: Bun.env.GOOGLE_ID,
|
||||
client_secret: Bun.env.GOOGLE_SECRET,
|
||||
client_id: process.env.GOOGLE_ID,
|
||||
client_secret: process.env.GOOGLE_SECRET,
|
||||
scope: ['openid', 'email', 'profile'],
|
||||
}),
|
||||
(c) => {
|
||||
|
@ -77,6 +77,8 @@ app.get(
|
|||
export default app
|
||||
```
|
||||
|
||||
If you are using Bun, replace `process.env` to `Bun.env` to resolve Environments at runtime.
|
||||
|
||||
### Google
|
||||
|
||||
```ts
|
||||
|
@ -88,8 +90,8 @@ const app = new Hono()
|
|||
app.use(
|
||||
'/google',
|
||||
googleAuth({
|
||||
client_id: Bun.env.GOOGLE_ID,
|
||||
client_secret: Bun.env.GOOGLE_SECRET,
|
||||
client_id: process.env.GOOGLE_ID,
|
||||
client_secret: process.env.GOOGLE_SECRET,
|
||||
scope: ['openid', 'email', 'profile'],
|
||||
})
|
||||
)
|
||||
|
@ -200,8 +202,8 @@ const app = new Hono()
|
|||
app.use(
|
||||
'/facebook',
|
||||
facebookAuth({
|
||||
client_id: Bun.env.FACEBOOK_ID,
|
||||
client_secret: Bun.env.FACEBOOK_SECRET,
|
||||
client_id: process.env.FACEBOOK_ID,
|
||||
client_secret: process.env.FACEBOOK_SECRET,
|
||||
scope: ['email', 'public_profile'],
|
||||
fields: [
|
||||
'email',
|
||||
|
@ -412,8 +414,8 @@ const app = new Hono()
|
|||
app.use(
|
||||
'/github',
|
||||
githubAuth({
|
||||
client_id: Bun.env.GITHUB_ID,
|
||||
client_secret: Bun.env.GITHUB_SECRET,
|
||||
client_id: process.env.GITHUB_ID,
|
||||
client_secret: process.env.GITHUB_SECRET,
|
||||
})
|
||||
)
|
||||
|
||||
|
@ -441,8 +443,8 @@ const app = new Hono()
|
|||
app.use(
|
||||
'/github',
|
||||
githubAuth({
|
||||
client_id: Bun.env.GITHUB_ID,
|
||||
client_secret: Bun.env.GITHUB_SECRET,
|
||||
client_id: process.env.GITHUB_ID,
|
||||
client_secret: process.env.GITHUB_SECRET,
|
||||
scope: ['public_repo', 'read:user', 'user', 'user:email', 'user:follow'],
|
||||
oauthApp: true,
|
||||
})
|
||||
|
@ -545,8 +547,8 @@ const app = new Hono()
|
|||
app.use(
|
||||
'/linkedin',
|
||||
linkedinAuth({
|
||||
client_id: Bun.env.LINKEDIN_ID,
|
||||
client_secret: Bun.env.LINKEDIN_SECRET,
|
||||
client_id: process.env.LINKEDIN_ID,
|
||||
client_secret: process.env.LINKEDIN_SECRET,
|
||||
scope: ['email', 'openid', 'profile'],
|
||||
})
|
||||
)
|
||||
|
@ -575,8 +577,8 @@ const app = new Hono()
|
|||
app.use(
|
||||
'/linkedin',
|
||||
linkedinAuth({
|
||||
client_id: Bun.env.LINKEDIN_ID,
|
||||
client_secret: Bun.env.LINKEDIN_SECRET,
|
||||
client_id: process.env.LINKEDIN_ID,
|
||||
client_secret: process.env.LINKEDIN_SECRET,
|
||||
appAuth: true,
|
||||
})
|
||||
)
|
||||
|
@ -629,8 +631,8 @@ const app = new Hono()
|
|||
app.use(
|
||||
'/x',
|
||||
xAuth({
|
||||
client_id: Bun.env.X_ID,
|
||||
client_secret: Bun.env.X_SECRET,
|
||||
client_id: process.env.X_ID,
|
||||
client_secret: process.env.X_SECRET,
|
||||
scope: ['tweet.read', 'users.read', 'offline.access'],
|
||||
fields: ['profile_image_url', 'url'],
|
||||
})
|
||||
|
@ -786,8 +788,8 @@ const app = new Hono()
|
|||
app.use(
|
||||
'/discord',
|
||||
discordAuth({
|
||||
client_id: Bun.env.DISCORD_ID,
|
||||
client_secret: Bun.env.DISCORD_SECRET,
|
||||
client_id: process.env.DISCORD_ID,
|
||||
client_secret: process.env.DISCORD_SECRET,
|
||||
scope: ['identify', 'email'],
|
||||
})
|
||||
)
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
# @hono/zod-openapi
|
||||
|
||||
## 0.19.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1111](https://github.com/honojs/middleware/pull/1111) [`ad4622a8536c8ef9c5feec2e447f36c2629ecbca`](https://github.com/honojs/middleware/commit/ad4622a8536c8ef9c5feec2e447f36c2629ecbca) Thanks [@BarryThePenguin](https://github.com/BarryThePenguin)! - Republish v0.19.3 without workspace reference
|
||||
|
||||
## 0.19.3
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@hono/zod-openapi",
|
||||
"version": "0.19.3",
|
||||
"version": "0.19.4",
|
||||
"description": "A wrapper class of Hono which supports OpenAPI.",
|
||||
"type": "module",
|
||||
"module": "dist/index.js",
|
||||
|
|
25
yarn.lock
25
yarn.lock
|
@ -836,13 +836,24 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@conform-to/dom@npm:1.3.0, @conform-to/dom@npm:^1.1.5":
|
||||
"@conform-to/dom@npm:1.3.0, @conform-to/dom@npm:^1.1.5, @conform-to/dom@npm:^1.3.0":
|
||||
version: 1.3.0
|
||||
resolution: "@conform-to/dom@npm:1.3.0"
|
||||
checksum: 1b00c9a072c27484efb2832fd5e04e791fe8926cd551732108889979cae1e3bef88a420cae0a8f813370d686d5b44dfff910c4638a486223ccac654574c68a04
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@conform-to/valibot@npm:^1.0.0":
|
||||
version: 1.0.0
|
||||
resolution: "@conform-to/valibot@npm:1.0.0"
|
||||
dependencies:
|
||||
"@conform-to/dom": "npm:^1.3.0"
|
||||
peerDependencies:
|
||||
valibot: ">= 0.32.0"
|
||||
checksum: 0d15518be8d76df4edb59e04aa252593fed6291f3e1f39b95f417411900fcb5edccf7ded90fa73cb521c66b364f59c2aa82266824397c3b6f5d7a1952b037e58
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@conform-to/yup@npm:^1.1.5":
|
||||
version: 1.3.0
|
||||
resolution: "@conform-to/yup@npm:1.3.0"
|
||||
|
@ -1919,9 +1930,9 @@ __metadata:
|
|||
dependencies:
|
||||
"@arethetypeswrong/cli": "npm:^0.17.4"
|
||||
"@conform-to/dom": "npm:^1.1.5"
|
||||
"@conform-to/valibot": "npm:^1.0.0"
|
||||
"@conform-to/yup": "npm:^1.1.5"
|
||||
"@conform-to/zod": "npm:^1.1.5"
|
||||
conform-to-valibot: "npm:^1.10.0"
|
||||
publint: "npm:^0.3.9"
|
||||
tsup: "npm:^8.4.0"
|
||||
typescript: "npm:^5.8.2"
|
||||
|
@ -5655,16 +5666,6 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"conform-to-valibot@npm:^1.10.0":
|
||||
version: 1.14.3
|
||||
resolution: "conform-to-valibot@npm:1.14.3"
|
||||
peerDependencies:
|
||||
"@conform-to/dom": ">= 1.0.0"
|
||||
valibot: ">= 0.32.0"
|
||||
checksum: 73eaa0c8973a3d05a67a721555a8f5beb56ef145f6ac1414d0bab35b4dc511b940aaa1321c091fa58da696207873cf6839e36021a46f7c17540825897b418218
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"connect@npm:^3.7.0":
|
||||
version: 3.7.0
|
||||
resolution: "connect@npm:3.7.0"
|
||||
|
|
Loading…
Reference in New Issue