Compare commits
7 Commits
61a44347cc
...
3a91cdee18
Author | SHA1 | Date |
---|---|---|
|
3a91cdee18 | |
|
bebdfa2a88 | |
|
26d0efb036 | |
|
73c899bc81 | |
|
99e7bf2e64 | |
|
ad4622a853 | |
|
f962d29eda |
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@hono/oauth-providers': minor
|
||||
---
|
||||
|
||||
Optionally pass state as an option to oauth provider
|
|
@ -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",
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -12,10 +12,11 @@ export function discordAuth(options: {
|
|||
client_id?: string
|
||||
client_secret?: string
|
||||
redirect_uri?: string
|
||||
state?: string
|
||||
}): MiddlewareHandler {
|
||||
return async (c, next) => {
|
||||
// Generate encoded "keys"
|
||||
const newState = getRandomState()
|
||||
const newState = options.state || getRandomState()
|
||||
|
||||
// Create new Auth instance
|
||||
const auth = new AuthFlow({
|
||||
|
|
|
@ -13,9 +13,10 @@ export function facebookAuth(options: {
|
|||
client_id?: string
|
||||
client_secret?: string
|
||||
redirect_uri?: string
|
||||
state?: string
|
||||
}): MiddlewareHandler {
|
||||
return async (c, next) => {
|
||||
const newState = getRandomState()
|
||||
const newState = options.state || getRandomState()
|
||||
// Create new Auth instance
|
||||
const auth = new AuthFlow({
|
||||
client_id: options.client_id || (env(c).FACEBOOK_ID as string),
|
||||
|
|
|
@ -13,9 +13,10 @@ export function githubAuth(options: {
|
|||
scope?: GitHubScope[]
|
||||
oauthApp?: boolean
|
||||
redirect_uri?: string
|
||||
state?: string
|
||||
}): MiddlewareHandler {
|
||||
return async (c, next) => {
|
||||
const newState = getRandomState()
|
||||
const newState = options.state || getRandomState()
|
||||
// Create new Auth instance
|
||||
const auth = new AuthFlow({
|
||||
client_id: options.client_id || (env(c).GITHUB_ID as string),
|
||||
|
|
|
@ -13,9 +13,10 @@ export function linkedinAuth(options: {
|
|||
scope?: LinkedInScope[]
|
||||
appAuth?: boolean
|
||||
redirect_uri?: string
|
||||
state?: string
|
||||
}): MiddlewareHandler {
|
||||
return async (c, next) => {
|
||||
const newState = getRandomState()
|
||||
const newState = options.state || getRandomState()
|
||||
// Create new Auth instance
|
||||
const auth = new AuthFlow({
|
||||
client_id: options.client_id || (env(c).LINKEDIN_ID as string),
|
||||
|
|
|
@ -14,10 +14,11 @@ export function xAuth(options: {
|
|||
client_id?: string
|
||||
client_secret?: string
|
||||
redirect_uri?: string
|
||||
state?: string
|
||||
}): MiddlewareHandler {
|
||||
return async (c, next) => {
|
||||
// Generate encoded "keys"
|
||||
const newState = getRandomState()
|
||||
const newState = options.state || getRandomState()
|
||||
const challenge = await getCodeChallenge()
|
||||
|
||||
const auth = new AuthFlow({
|
||||
|
|
|
@ -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