Compare commits

...

7 Commits

Author SHA1 Message Date
yuta.suzuki 4c6fbf46aa
Merge fba3d9e38d into bebdfa2a88 2025-04-09 20:25:42 +10:00
Jonathan Haines bebdfa2a88
ci(release): yarn config set npmAuthToken (#1117) 2025-04-09 19:25:08 +09:00
chimame 26d0efb036
chore(conform-validator): Change conform valibot adapter to official library (#1114) 2025-04-09 19:08:21 +09:00
Jonathan Haines 73c899bc81
ci(release): restore build during release (#1116) 2025-04-09 18:59:58 +09:00
github-actions[bot] 99e7bf2e64
Version Packages (#1115)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-09 18:40:50 +09:00
Jonathan Haines ad4622a853
fix(zod-openapi): republish without workspace reference (#1111)
fixes #1109
2025-04-09 18:37:30 +09:00
euxn23 fba3d9e38d docs(oauth-providers): use process.env instead of Bun.env as default 2024-07-03 09:25:09 +09:00
9 changed files with 54 additions and 38 deletions

View File

@ -26,11 +26,17 @@ jobs:
- name: Build - name: Build
run: yarn 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 - name: Create Release Pull Request or Publish to npm
id: changesets id: changesets
uses: changesets/action@v1 uses: changesets/action@v1
with: with:
publish: yarn changeset publish publish: yarn run publish
version: yarn changeset version
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

View File

@ -10,6 +10,7 @@
"scripts": { "scripts": {
"build": "yarn workspaces foreach --all --topological --verbose run build", "build": "yarn workspaces foreach --all --topological --verbose run build",
"publint": "yarn workspaces foreach --all --topological --verbose run publint", "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": "yarn tsc --build",
"typecheck:clean": "yarn tsc --build --clean", "typecheck:clean": "yarn tsc --build --clean",
"typecheck:watch": "yarn tsc --build --watch", "typecheck:watch": "yarn tsc --build --watch",

View File

@ -59,7 +59,7 @@ Valibot:
```ts ```ts
import { object, string } from 'valibot' import { object, string } from 'valibot'
import { parseWithValibot } from 'conform-to-valibot' import { parseWithValibot } from '@conform-to/valibot'
import { conformValidator } from '@hono/conform-validator' import { conformValidator } from '@hono/conform-validator'
import { HTTPException } from 'hono/http-exception' import { HTTPException } from 'hono/http-exception'

View File

@ -46,9 +46,9 @@
"devDependencies": { "devDependencies": {
"@arethetypeswrong/cli": "^0.17.4", "@arethetypeswrong/cli": "^0.17.4",
"@conform-to/dom": "^1.1.5", "@conform-to/dom": "^1.1.5",
"@conform-to/valibot": "^1.0.0",
"@conform-to/yup": "^1.1.5", "@conform-to/yup": "^1.1.5",
"@conform-to/zod": "^1.1.5", "@conform-to/zod": "^1.1.5",
"conform-to-valibot": "^1.10.0",
"publint": "^0.3.9", "publint": "^0.3.9",
"tsup": "^8.4.0", "tsup": "^8.4.0",
"typescript": "^5.8.2", "typescript": "^5.8.2",

View File

@ -1,4 +1,4 @@
import { parseWithValibot } from 'conform-to-valibot' import { parseWithValibot } from '@conform-to/valibot'
import { Hono } from 'hono' import { Hono } from 'hono'
import { hc } from 'hono/client' import { hc } from 'hono/client'
import type { ExtractSchema, ParsedFormValue } from 'hono/types' import type { ExtractSchema, ParsedFormValue } from 'hono/types'

View File

@ -30,8 +30,8 @@ Also, there is two ways to use this middleware:
app.use( app.use(
'/google', '/google',
googleAuth({ googleAuth({
client_id: Bun.env.GOOGLE_ID, client_id: process.env.GOOGLE_ID,
client_secret: Bun.env.GOOGLE_SECRET, client_secret: process.env.GOOGLE_SECRET,
scope: ['openid', 'email', 'profile'], scope: ['openid', 'email', 'profile'],
}) })
) )
@ -57,8 +57,8 @@ Or
app.get( app.get(
'/google', '/google',
googleAuth({ googleAuth({
client_id: Bun.env.GOOGLE_ID, client_id: process.env.GOOGLE_ID,
client_secret: Bun.env.GOOGLE_SECRET, client_secret: process.env.GOOGLE_SECRET,
scope: ['openid', 'email', 'profile'], scope: ['openid', 'email', 'profile'],
}), }),
(c) => { (c) => {
@ -77,6 +77,8 @@ app.get(
export default app export default app
``` ```
If you are using Bun, replace `process.env` to `Bun.env` to resolve Environments at runtime.
### Google ### Google
```ts ```ts
@ -88,8 +90,8 @@ const app = new Hono()
app.use( app.use(
'/google', '/google',
googleAuth({ googleAuth({
client_id: Bun.env.GOOGLE_ID, client_id: process.env.GOOGLE_ID,
client_secret: Bun.env.GOOGLE_SECRET, client_secret: process.env.GOOGLE_SECRET,
scope: ['openid', 'email', 'profile'], scope: ['openid', 'email', 'profile'],
}) })
) )
@ -200,8 +202,8 @@ const app = new Hono()
app.use( app.use(
'/facebook', '/facebook',
facebookAuth({ facebookAuth({
client_id: Bun.env.FACEBOOK_ID, client_id: process.env.FACEBOOK_ID,
client_secret: Bun.env.FACEBOOK_SECRET, client_secret: process.env.FACEBOOK_SECRET,
scope: ['email', 'public_profile'], scope: ['email', 'public_profile'],
fields: [ fields: [
'email', 'email',
@ -412,8 +414,8 @@ const app = new Hono()
app.use( app.use(
'/github', '/github',
githubAuth({ githubAuth({
client_id: Bun.env.GITHUB_ID, client_id: process.env.GITHUB_ID,
client_secret: Bun.env.GITHUB_SECRET, client_secret: process.env.GITHUB_SECRET,
}) })
) )
@ -441,8 +443,8 @@ const app = new Hono()
app.use( app.use(
'/github', '/github',
githubAuth({ githubAuth({
client_id: Bun.env.GITHUB_ID, client_id: process.env.GITHUB_ID,
client_secret: Bun.env.GITHUB_SECRET, client_secret: process.env.GITHUB_SECRET,
scope: ['public_repo', 'read:user', 'user', 'user:email', 'user:follow'], scope: ['public_repo', 'read:user', 'user', 'user:email', 'user:follow'],
oauthApp: true, oauthApp: true,
}) })
@ -545,8 +547,8 @@ const app = new Hono()
app.use( app.use(
'/linkedin', '/linkedin',
linkedinAuth({ linkedinAuth({
client_id: Bun.env.LINKEDIN_ID, client_id: process.env.LINKEDIN_ID,
client_secret: Bun.env.LINKEDIN_SECRET, client_secret: process.env.LINKEDIN_SECRET,
scope: ['email', 'openid', 'profile'], scope: ['email', 'openid', 'profile'],
}) })
) )
@ -575,8 +577,8 @@ const app = new Hono()
app.use( app.use(
'/linkedin', '/linkedin',
linkedinAuth({ linkedinAuth({
client_id: Bun.env.LINKEDIN_ID, client_id: process.env.LINKEDIN_ID,
client_secret: Bun.env.LINKEDIN_SECRET, client_secret: process.env.LINKEDIN_SECRET,
appAuth: true, appAuth: true,
}) })
) )
@ -629,8 +631,8 @@ const app = new Hono()
app.use( app.use(
'/x', '/x',
xAuth({ xAuth({
client_id: Bun.env.X_ID, client_id: process.env.X_ID,
client_secret: Bun.env.X_SECRET, client_secret: process.env.X_SECRET,
scope: ['tweet.read', 'users.read', 'offline.access'], scope: ['tweet.read', 'users.read', 'offline.access'],
fields: ['profile_image_url', 'url'], fields: ['profile_image_url', 'url'],
}) })
@ -786,8 +788,8 @@ const app = new Hono()
app.use( app.use(
'/discord', '/discord',
discordAuth({ discordAuth({
client_id: Bun.env.DISCORD_ID, client_id: process.env.DISCORD_ID,
client_secret: Bun.env.DISCORD_SECRET, client_secret: process.env.DISCORD_SECRET,
scope: ['identify', 'email'], scope: ['identify', 'email'],
}) })
) )

View File

@ -1,5 +1,11 @@
# @hono/zod-openapi # @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 ## 0.19.3
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@hono/zod-openapi", "name": "@hono/zod-openapi",
"version": "0.19.3", "version": "0.19.4",
"description": "A wrapper class of Hono which supports OpenAPI.", "description": "A wrapper class of Hono which supports OpenAPI.",
"type": "module", "type": "module",
"module": "dist/index.js", "module": "dist/index.js",

View File

@ -836,13 +836,24 @@ __metadata:
languageName: node languageName: node
linkType: hard 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 version: 1.3.0
resolution: "@conform-to/dom@npm:1.3.0" resolution: "@conform-to/dom@npm:1.3.0"
checksum: 1b00c9a072c27484efb2832fd5e04e791fe8926cd551732108889979cae1e3bef88a420cae0a8f813370d686d5b44dfff910c4638a486223ccac654574c68a04 checksum: 1b00c9a072c27484efb2832fd5e04e791fe8926cd551732108889979cae1e3bef88a420cae0a8f813370d686d5b44dfff910c4638a486223ccac654574c68a04
languageName: node languageName: node
linkType: hard 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": "@conform-to/yup@npm:^1.1.5":
version: 1.3.0 version: 1.3.0
resolution: "@conform-to/yup@npm:1.3.0" resolution: "@conform-to/yup@npm:1.3.0"
@ -1919,9 +1930,9 @@ __metadata:
dependencies: dependencies:
"@arethetypeswrong/cli": "npm:^0.17.4" "@arethetypeswrong/cli": "npm:^0.17.4"
"@conform-to/dom": "npm:^1.1.5" "@conform-to/dom": "npm:^1.1.5"
"@conform-to/valibot": "npm:^1.0.0"
"@conform-to/yup": "npm:^1.1.5" "@conform-to/yup": "npm:^1.1.5"
"@conform-to/zod": "npm:^1.1.5" "@conform-to/zod": "npm:^1.1.5"
conform-to-valibot: "npm:^1.10.0"
publint: "npm:^0.3.9" publint: "npm:^0.3.9"
tsup: "npm:^8.4.0" tsup: "npm:^8.4.0"
typescript: "npm:^5.8.2" typescript: "npm:^5.8.2"
@ -5655,16 +5666,6 @@ __metadata:
languageName: node languageName: node
linkType: hard 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": "connect@npm:^3.7.0":
version: 3.7.0 version: 3.7.0
resolution: "connect@npm:3.7.0" resolution: "connect@npm:3.7.0"