Compare commits
51 Commits
@hono/reac
...
main
Author | SHA1 | Date |
---|---|---|
|
5cba9a4819 | |
|
acff470c7f | |
|
9235709060 | |
|
40f916f944 | |
|
a2409d2314 | |
|
cf3c17e3d1 | |
|
7c6a860814 | |
|
be73703184 | |
|
2f57dd5ebb | |
|
bb56b3176e | |
|
ede1aaff4f | |
|
44b1c24b95 | |
|
b73b7aed29 | |
|
a7ee664c98 | |
|
86a4ca460d | |
|
0758fd0af1 | |
|
d4cc24f754 | |
|
c880649458 | |
|
3c1ecb0ce9 | |
|
b8802e01b7 | |
|
0bda87e4ee | |
|
1cdfdbd292 | |
|
aaf90c39e6 | |
|
641fd4c3de | |
|
f0475c7324 | |
|
8303d979f1 | |
|
50aa61d9c2 | |
|
e1eae2078f | |
|
ab390305fb | |
|
3a9920a258 | |
|
b6f3bc674b | |
|
683455895d | |
|
1adca4c918 | |
|
471cf0580d | |
|
a70d91950f | |
|
d05b6158ec | |
|
69a0a586f5 | |
|
3c70dcd6ae | |
|
858c6b4fc3 | |
|
ccc49dd508 | |
|
2fccb8b764 | |
|
5c3f61f889 | |
|
c97fcf08b2 | |
|
9afa292ca5 | |
|
a62b59f450 | |
|
deeeac9e1c | |
|
52a1d46cd2 | |
|
7585969171 | |
|
7a45d5749d | |
|
8fafbc1d4d | |
|
cf48336cbd |
|
@ -1,32 +0,0 @@
|
|||
name: ci-ajv-validator
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/ajv-validator/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/ajv-validator/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/ajv-validator
|
||||
- run: yarn workspace @hono/ajv-validator build
|
||||
- run: yarn workspace @hono/ajv-validator publint
|
||||
- run: yarn workspace @hono/ajv-validator typecheck
|
||||
- run: yarn eslint packages/ajv-validator
|
||||
- run: yarn test --coverage --project @hono/ajv-validator
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: ajv-validator
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-arktype-validator
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/arktype-validator/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/arktype-validator/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/arktype-validator
|
||||
- run: yarn workspace @hono/arktype-validator build
|
||||
- run: yarn workspace @hono/arktype-validator publint
|
||||
- run: yarn workspace @hono/arktype-validator typecheck
|
||||
- run: yarn eslint packages/arktype-validator
|
||||
- run: yarn test --coverage --project @hono/arktype-validator
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: arktype-validator
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-auth-js
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/auth-js/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/auth-js/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/auth-js
|
||||
- run: yarn workspace @hono/auth-js build
|
||||
- run: yarn workspace @hono/auth-js publint
|
||||
- run: yarn workspace @hono/auth-js typecheck
|
||||
- run: yarn eslint packages/auth-js
|
||||
- run: yarn test --coverage --project @hono/auth-js
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: auth-js
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-bun-compress
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/bun-compress/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/bun-compress/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/bun-compress
|
||||
- run: yarn workspace @hono/bun-compress build
|
||||
- run: yarn workspace @hono/bun-compress publint
|
||||
- run: yarn workspace @hono/bun-compress typecheck
|
||||
- run: yarn eslint packages/bun-compress
|
||||
- run: yarn test --coverage --project @hono/bun-compress
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: bun-compress
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -22,6 +22,7 @@ jobs:
|
|||
- run: yarn workspace @hono/bun-transpiler publint
|
||||
- run: yarn workspace @hono/bun-transpiler typecheck
|
||||
- run: yarn eslint packages/bun-transpiler
|
||||
- run: yarn prettier --check . !packages packages/bun-transpiler
|
||||
- run: yarn workspace @hono/bun-transpiler test --coverage --coverage-reporter lcov
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-casbin
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/casbin/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/casbin/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/casbin
|
||||
- run: yarn workspace @hono/casbin build
|
||||
- run: yarn workspace @hono/casbin publint
|
||||
- run: yarn workspace @hono/casbin typecheck
|
||||
- run: yarn eslint packages/casbin
|
||||
- run: yarn test --coverage --project @hono/casbin
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: casbin
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-class-validator
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/class-validator/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/class-validator/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/class-validator
|
||||
- run: yarn workspace @hono/class-validator build
|
||||
- run: yarn workspace @hono/class-validator publint
|
||||
- run: yarn workspace @hono/class-validator typecheck
|
||||
- run: yarn eslint packages/class-validator
|
||||
- run: yarn test --coverage --project @hono/class-validator
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: class-validator
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-clerk-auth
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/clerk-auth/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/clerk-auth/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/clerk-auth
|
||||
- run: yarn workspace @hono/clerk-auth build
|
||||
- run: yarn workspace @hono/clerk-auth publint
|
||||
- run: yarn workspace @hono/clerk-auth typecheck
|
||||
- run: yarn eslint packages/clerk-auth
|
||||
- run: yarn test --coverage --project @hono/clerk-auth
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: clerk-auth
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-cloudflare-access
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/cloudflare-access/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/cloudflare-access/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/cloudflare-access
|
||||
- run: yarn workspace @hono/cloudflare-access build
|
||||
- run: yarn workspace @hono/cloudflare-access publint
|
||||
- run: yarn workspace @hono/cloudflare-access typecheck
|
||||
- run: yarn eslint packages/cloudflare-access
|
||||
- run: yarn test --coverage --project @hono/cloudflare-access
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: cloudflare-access
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-conform-validator
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/conform-validator/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/conform-validator/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/conform-validator
|
||||
- run: yarn workspace @hono/conform-validator build
|
||||
- run: yarn workspace @hono/conform-validator publint
|
||||
- run: yarn workspace @hono/conform-validator typecheck
|
||||
- run: yarn eslint packages/conform-validator
|
||||
- run: yarn test --coverage --project @hono/conform-validator
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: conform-validator
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-effect-validator
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/effect-validator/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/effect-validator/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/effect-validator
|
||||
- run: yarn workspace @hono/effect-validator build
|
||||
- run: yarn workspace @hono/effect-validator publint
|
||||
- run: yarn workspace @hono/effect-validator typecheck
|
||||
- run: yarn eslint packages/effect-validator
|
||||
- run: yarn test --coverage --project @hono/effect-validator
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: effect-validator
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-esbuild-transpiler
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/esbuild-transpiler/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/esbuild-transpiler/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/esbuild-transpiler
|
||||
- run: yarn workspace @hono/esbuild-transpiler build
|
||||
- run: yarn workspace @hono/esbuild-transpiler publint
|
||||
- run: yarn workspace @hono/esbuild-transpiler typecheck
|
||||
- run: yarn eslint packages/esbuild-transpiler
|
||||
- run: yarn test --coverage --project @hono/esbuild-transpiler
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: esbuild-transpiler
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-event-emitter
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/event-emitter/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/event-emitter/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/event-emitter
|
||||
- run: yarn workspace @hono/event-emitter build
|
||||
- run: yarn workspace @hono/event-emitter publint
|
||||
- run: yarn workspace @hono/event-emitter typecheck
|
||||
- run: yarn eslint packages/event-emitter
|
||||
- run: yarn test --coverage --project @hono/event-emitter
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: event-emitter
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-firebase-auth
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/firebase-auth/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/firebase-auth/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/firebase-auth
|
||||
- run: yarn workspace @hono/firebase-auth build
|
||||
- run: yarn workspace @hono/firebase-auth publint
|
||||
- run: yarn workspace @hono/firebase-auth typecheck
|
||||
- run: yarn eslint packages/firebase-auth
|
||||
- run: yarn test --coverage --project @hono/firebase-auth
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: firebase-auth
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-graphql-server
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/graphql-server/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/graphql-server/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/graphql-server
|
||||
- run: yarn workspace @hono/graphql-server build
|
||||
- run: yarn workspace @hono/graphql-server publint
|
||||
- run: yarn workspace @hono/graphql-server typecheck
|
||||
- run: yarn eslint packages/graphql-server
|
||||
- run: yarn test --coverage --project @hono/graphql-server
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: graphql-server
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-hello
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/hello/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/hello/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/hello
|
||||
- run: yarn workspace @hono/hello build
|
||||
- run: yarn workspace @hono/hello publint
|
||||
- run: yarn workspace @hono/hello typecheck
|
||||
- run: yarn eslint packages/hello
|
||||
- run: yarn test --coverage --project @hono/hello
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: hello
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-medley-router
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/medley-router/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/medley-router/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/medley-router
|
||||
- run: yarn workspace @hono/medley-router build
|
||||
- run: yarn workspace @hono/medley-router publint
|
||||
- run: yarn workspace @hono/medley-router typecheck
|
||||
- run: yarn eslint packages/medley-router
|
||||
- run: yarn test --coverage --project @hono/medley-router
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: medley-router
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-node-ws
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/node-ws/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/node-ws/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/node-ws
|
||||
- run: yarn workspace @hono/node-ws build
|
||||
- run: yarn workspace @hono/node-ws publint
|
||||
- run: yarn workspace @hono/node-ws typecheck
|
||||
- run: yarn eslint packages/node-ws
|
||||
- run: yarn test --coverage --project @hono/node-ws
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: node-ws
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-oauth-providers
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/oauth-providers/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/oauth-providers/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/oauth-providers
|
||||
- run: yarn workspace @hono/oauth-providers build
|
||||
- run: yarn workspace @hono/oauth-providers publint
|
||||
- run: yarn workspace @hono/oauth-providers typecheck
|
||||
- run: yarn eslint packages/oauth-providers
|
||||
- run: yarn test --coverage --project @hono/oauth-providers
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: oauth-providers
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-oidc-auth
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/oidc-auth/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/oidc-auth/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/oidc-auth
|
||||
- run: yarn workspace @hono/oidc-auth build
|
||||
- run: yarn workspace @hono/oidc-auth publint
|
||||
- run: yarn workspace @hono/oidc-auth typecheck
|
||||
- run: yarn eslint packages/oidc-auth
|
||||
- run: yarn test --coverage --project @hono/oidc-auth
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: oidc-auth
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-otel
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/otel/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/otel/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/otel
|
||||
- run: yarn workspace @hono/otel build
|
||||
- run: yarn workspace @hono/otel publint
|
||||
- run: yarn workspace @hono/otel typecheck
|
||||
- run: yarn eslint packages/otel
|
||||
- run: yarn test --coverage --project @hono/otel
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: otel
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-prometheus
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/prometheus/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/prometheus/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/prometheus
|
||||
- run: yarn workspace @hono/prometheus build
|
||||
- run: yarn workspace @hono/prometheus publint
|
||||
- run: yarn workspace @hono/prometheus typecheck
|
||||
- run: yarn eslint packages/prometheus
|
||||
- run: yarn test --coverage --project @hono/prometheus
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: prometheus
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-qwik-city
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/qwik-city/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/qwik-city/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/qwik-city
|
||||
- run: yarn workspace @hono/qwik-city build
|
||||
- run: yarn workspace @hono/qwik-city publint
|
||||
- run: yarn workspace @hono/qwik-city typecheck
|
||||
- run: yarn eslint packages/qwik-city
|
||||
# - run: yarn test --coverage --project @hono/qwik-city
|
||||
# - uses: codecov/codecov-action@v5
|
||||
# with:
|
||||
# fail_ci_if_error: true
|
||||
# directory: ./coverage
|
||||
# flags: qwik-city
|
||||
# env:
|
||||
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-react-compat
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/react-compat/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/react-compat/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/react-compat
|
||||
- run: yarn workspace @hono/react-compat build
|
||||
- run: yarn workspace @hono/react-compat publint
|
||||
- run: yarn workspace @hono/react-compat typecheck
|
||||
- run: yarn eslint packages/react-compat
|
||||
# - run: yarn test --coverage --project @hono/react-compat
|
||||
# - uses: codecov/codecov-action@v5
|
||||
# with:
|
||||
# fail_ci_if_error: true
|
||||
# directory: ./coverage
|
||||
# flags: react-compat
|
||||
# env:
|
||||
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-react-renderer
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/react-renderer/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/react-renderer/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/react-renderer
|
||||
- run: yarn workspace @hono/react-renderer build
|
||||
- run: yarn workspace @hono/react-renderer publint
|
||||
- run: yarn workspace @hono/react-renderer typecheck
|
||||
- run: yarn eslint packages/react-renderer
|
||||
- run: yarn test --coverage --project @hono/react-renderer
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: react-renderer
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-sentry
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/sentry/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/sentry/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/sentry
|
||||
- run: yarn workspace @hono/sentry build
|
||||
- run: yarn workspace @hono/sentry publint
|
||||
- run: yarn workspace @hono/sentry typecheck
|
||||
- run: yarn eslint packages/sentry
|
||||
- run: yarn test --coverage --project @hono/sentry
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: sentry
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-standard-validator
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/standard-validator/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/standard-validator/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/standard-validator
|
||||
- run: yarn workspace @hono/standard-validator build
|
||||
- run: yarn workspace @hono/standard-validator publint
|
||||
- run: yarn workspace @hono/standard-validator typecheck
|
||||
- run: yarn eslint packages/standard-validator
|
||||
- run: yarn test --coverage --project @hono/standard-validator
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: standard-validator
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-swagger-editor
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/swagger-editor/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/swagger-editor/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/swagger-editor
|
||||
- run: yarn workspace @hono/swagger-editor build
|
||||
- run: yarn workspace @hono/swagger-editor publint
|
||||
- run: yarn workspace @hono/swagger-editor typecheck
|
||||
- run: yarn eslint packages/swagger-editor
|
||||
- run: yarn test --coverage --project @hono/swagger-editor
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: swagger-editor
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-swagger-ui
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/swagger-ui/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/swagger-ui/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/swagger-ui
|
||||
- run: yarn workspace @hono/swagger-ui build
|
||||
- run: yarn workspace @hono/swagger-ui publint
|
||||
- run: yarn workspace @hono/swagger-ui typecheck
|
||||
- run: yarn eslint packages/swagger-ui
|
||||
- run: yarn test --coverage --project @hono/swagger-ui
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: swagger-ui
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-trpc-server
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/trpc-server/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/trpc-server/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/trpc-server
|
||||
- run: yarn workspace @hono/trpc-server build
|
||||
- run: yarn workspace @hono/trpc-server publint
|
||||
- run: yarn workspace @hono/trpc-server typecheck
|
||||
- run: yarn eslint packages/trpc-server
|
||||
- run: yarn test --coverage --project @hono/trpc-server
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: trpc-server
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-tsyringe
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/tsyringe/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/tsyringe/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/tsyringe
|
||||
- run: yarn workspace @hono/tsyringe build
|
||||
- run: yarn workspace @hono/tsyringe publint
|
||||
- run: yarn workspace @hono/tsyringe typecheck
|
||||
- run: yarn eslint packages/tsyringe
|
||||
- run: yarn test --coverage --project @hono/tsyringe
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: tsyringe
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-typebox-validator
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/typebox-validator/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/typebox-validator/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/typebox-validator
|
||||
- run: yarn workspace @hono/typebox-validator build
|
||||
- run: yarn workspace @hono/typebox-validator publint
|
||||
- run: yarn workspace @hono/typebox-validator typecheck
|
||||
- run: yarn eslint packages/typebox-validator
|
||||
- run: yarn test --coverage --project @hono/typebox-validator
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: typebox-validator
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-typia-validator
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/typia-validator/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/typia-validator/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/typia-validator
|
||||
- run: yarn workspace @hono/typia-validator build
|
||||
- run: yarn workspace @hono/typia-validator publint
|
||||
- run: yarn workspace @hono/typia-validator typecheck
|
||||
- run: yarn eslint packages/typia-validator
|
||||
- run: yarn test --coverage --project @hono/typia-validator
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: typia-validator
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -0,0 +1,42 @@
|
|||
name: Sync robots.json
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Runs every day at midnight
|
||||
- cron: '0 0 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
sync-and-pr:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js and Yarn
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
cache: 'yarn'
|
||||
|
||||
- run: yarn workspaces focus hono-middleware @hono/ua-blocker
|
||||
|
||||
- name: Fetch latest robots.json
|
||||
run: yarn workspace @hono/ua-blocker getrobotstxt
|
||||
|
||||
- name: Generate data
|
||||
run: yarn workspace @hono/ua-blocker prebuild
|
||||
|
||||
- name: Create Pull Request if changes exist
|
||||
uses: peter-evans/create-pull-request@v6
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
commit-message: 'chore(ua-blocker): update robots.json from upstream'
|
||||
title: 'chore(ua-blocker): update robots.json from upstream'
|
||||
body: 'This PR was automatically created after detecting changes in the upstream `robots.json` file.'
|
||||
branch: 'chore/sync-robots-json'
|
||||
delete-branch: true
|
||||
# Assignee and labels
|
||||
assignees: finxol
|
||||
reviewers: finxol
|
||||
labels: robots.json
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-valibot-validator
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/valibot-validator/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/valibot-validator/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/valibot-validator
|
||||
- run: yarn workspace @hono/valibot-validator build
|
||||
- run: yarn workspace @hono/valibot-validator publint
|
||||
- run: yarn workspace @hono/valibot-validator typecheck
|
||||
- run: yarn eslint packages/valibot-validator
|
||||
- run: yarn test --coverage --project @hono/valibot-validator
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: valibot-validator
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-zod-openapi
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/zod-openapi/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/zod-openapi/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/zod-openapi
|
||||
- run: yarn workspaces foreach --topological --recursive --from @hono/zod-openapi run build
|
||||
- run: yarn workspace @hono/zod-openapi publint
|
||||
- run: yarn workspace @hono/zod-openapi typecheck
|
||||
- run: yarn eslint packages/zod-openapi
|
||||
- run: yarn test --coverage --project @hono/zod-openapi
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: zod-openapi
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,32 +0,0 @@
|
|||
name: ci-zod-validator
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/zod-validator/**'
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
paths:
|
||||
- 'packages/zod-validator/**'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/zod-validator
|
||||
- run: yarn workspace @hono/zod-validator build
|
||||
- run: yarn workspace @hono/zod-validator publint
|
||||
- run: yarn workspace @hono/zod-validator typecheck
|
||||
- run: yarn eslint packages/zod-validator
|
||||
- run: yarn test --coverage --project @hono/zod-validator
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: zod-validator
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -0,0 +1,74 @@
|
|||
name: ci
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
|
||||
jobs:
|
||||
what-changed:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
packages: ${{ steps.set-packages.outputs.packages }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- name: Get changed packages
|
||||
id: set-packages
|
||||
run: |
|
||||
exclude=(
|
||||
"hono-middleware"
|
||||
"@hono/bun-transpiler"
|
||||
);
|
||||
changed=$(yarn workspaces list --json --since | jq -nc '[inputs.name | select(any(.; inside($ARGS.positional[])) | not) | sub("@hono/"; "")]' --args "${exclude[@]}")
|
||||
echo "packages=${changed}" >> $GITHUB_OUTPUT
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [what-changed]
|
||||
if: ${{ needs.what-changed.outputs.packages != '[]' }}
|
||||
strategy:
|
||||
matrix:
|
||||
package: ${{ fromJSON(needs.what-changed.outputs.packages) }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/${{ matrix.package }}
|
||||
- run: yarn workspaces foreach --topological --recursive --from @hono/${{ matrix.package }} run publint
|
||||
- run: yarn workspace @hono/${{ matrix.package }} typecheck
|
||||
- run: yarn eslint packages/${{ matrix.package }}
|
||||
- run: yarn prettier --check . !packages packages/${{ matrix.package }}
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [what-changed]
|
||||
if: ${{ needs.what-changed.outputs.packages != '[]' }}
|
||||
strategy:
|
||||
matrix:
|
||||
package: ${{ fromJSON(needs.what-changed.outputs.packages) }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn workspaces focus hono-middleware @hono/${{ matrix.package }}
|
||||
- run: yarn workspaces foreach --topological --recursive --from @hono/${{ matrix.package }} run build
|
||||
- run: yarn test --coverage --project @hono/${{ matrix.package }}
|
||||
id: test
|
||||
if: ${{ matrix.package != 'qwik-city' && matrix.package != 'react-compat' }}
|
||||
- uses: codecov/codecov-action@v5
|
||||
if: ${{ matrix.package != 'qwik-city' && matrix.package != 'react-compat' }}
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
directory: ./coverage
|
||||
flags: ${{ matrix.package }}
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@ -1,18 +0,0 @@
|
|||
name: codestyle
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- run: yarn
|
||||
- run: yarn format
|
||||
- run: yarn lint
|
|
@ -3,7 +3,7 @@ dist
|
|||
node_modules
|
||||
*.tgz
|
||||
coverage
|
||||
|
||||
.eslintcache
|
||||
.yarn/*
|
||||
!.yarn/cache
|
||||
!.yarn/patches
|
||||
|
@ -15,4 +15,11 @@ yarn-error.log
|
|||
|
||||
# for debug or playing
|
||||
sandbox
|
||||
*.log
|
||||
*.log
|
||||
|
||||
# Claude Code local files
|
||||
CLAUDE.local.md
|
||||
settings.local.json
|
||||
|
||||
# Code editor
|
||||
.zed
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
.changeset
|
||||
.vscode
|
||||
.yarn
|
||||
|
||||
# Casbin
|
||||
*.conf
|
||||
*.csv
|
||||
|
||||
**/generated.ts
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,5 @@
|
|||
nmHoistingLimits: workspaces
|
||||
|
||||
nodeLinker: node-modules
|
||||
|
||||
yarnPath: .yarn/releases/yarn-4.0.2.cjs
|
||||
|
||||
nmHoistingLimits: 'workspaces'
|
||||
yarnPath: .yarn/releases/yarn-4.9.2.cjs
|
||||
|
|
|
@ -17,7 +17,6 @@ export default defineConfig(globalIgnores(['.yarn', '**/coverage', '**/dist']),
|
|||
},
|
||||
|
||||
rules: {
|
||||
'@typescript-eslint/array-type': 'off',
|
||||
'@typescript-eslint/await-thenable': 'off',
|
||||
'@typescript-eslint/consistent-indexed-object-style': 'off',
|
||||
'@typescript-eslint/consistent-type-definitions': 'off',
|
||||
|
|
10
package.json
10
package.json
|
@ -17,8 +17,8 @@
|
|||
"test": "vitest",
|
||||
"lint": "eslint 'packages/**/*.{ts,tsx}'",
|
||||
"lint:fix": "eslint --fix 'packages/**/*.{ts,tsx}'",
|
||||
"format": "prettier --check 'packages/**/*.{ts,tsx}'",
|
||||
"format:fix": "prettier --write 'packages/**/*.{ts,tsx}'"
|
||||
"format": "prettier --check .",
|
||||
"format:fix": "prettier --write ."
|
||||
},
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
|
@ -38,11 +38,11 @@
|
|||
"@types/ws": "^8.18.0",
|
||||
"@vitest/coverage-istanbul": "^3.0.8",
|
||||
"eslint": "^9.23.0",
|
||||
"hono": "^4.7.5",
|
||||
"hono": "^4.7.11",
|
||||
"prettier": "^3.5.3",
|
||||
"tsup": "^8.4.0",
|
||||
"typescript": "^5.8.2",
|
||||
"vitest": "^3.0.8"
|
||||
},
|
||||
"packageManager": "yarn@4.0.2"
|
||||
}
|
||||
"packageManager": "yarn@4.9.2"
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@arethetypeswrong/cli": "^0.17.4",
|
||||
"ajv": ">=8.12.0",
|
||||
"ajv": "^8.12.0",
|
||||
"publint": "^0.3.9",
|
||||
"tsup": "^8.4.0",
|
||||
"typescript": "^5.8.2",
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
|
||||
"emitDeclarationOnly": false
|
||||
"emitDeclarationOnly": true,
|
||||
"isolatedDeclarations": true
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["**/*.test.ts"],
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
|
||||
"emitDeclarationOnly": false
|
||||
"emitDeclarationOnly": true,
|
||||
"isolatedDeclarations": true
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["**/*.test.ts"],
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
|
|
|
@ -1,5 +1,17 @@
|
|||
# @hono/auth-js
|
||||
|
||||
## 1.0.17
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1210](https://github.com/honojs/middleware/pull/1210) [`0758fd0af1f213131d0894299e5bec716d284580`](https://github.com/honojs/middleware/commit/0758fd0af1f213131d0894299e5bec716d284580) Thanks [@BarryThePenguin](https://github.com/BarryThePenguin)! - Add explicit return types
|
||||
|
||||
## 1.0.16
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1170](https://github.com/honojs/middleware/pull/1170) [`7585969171ad4876e7620c7369eb9b638849d0eb`](https://github.com/honojs/middleware/commit/7585969171ad4876e7620c7369eb9b638849d0eb) Thanks [@hambergerpls](https://github.com/hambergerpls)! - fix(auth-js): use HonoRequest.blob() instead of HonoRequest.raw.body()
|
||||
|
||||
## 1.0.15
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@hono/auth-js",
|
||||
"version": "1.0.15",
|
||||
"version": "1.0.17",
|
||||
"description": "A third-party Auth js middleware for Hono",
|
||||
"main": "dist/index.js",
|
||||
"type": "module",
|
||||
|
|
|
@ -134,7 +134,7 @@ export async function fetchData<T = any>(
|
|||
}
|
||||
}
|
||||
|
||||
export function useOnline() {
|
||||
export function useOnline(): boolean {
|
||||
const [isOnline, setIsOnline] = useState(
|
||||
typeof navigator !== 'undefined' ? navigator.onLine : false
|
||||
)
|
||||
|
@ -157,11 +157,19 @@ export function useOnline() {
|
|||
return isOnline
|
||||
}
|
||||
|
||||
export function now() {
|
||||
export function now(): number {
|
||||
return Math.floor(Date.now() / 1000)
|
||||
}
|
||||
|
||||
export function parseUrl(url?: string) {
|
||||
interface ParsedUrl {
|
||||
origin: string
|
||||
host: string
|
||||
path: string
|
||||
base: string
|
||||
toString: () => string
|
||||
}
|
||||
|
||||
export function parseUrl(url?: string): ParsedUrl {
|
||||
const defaultUrl = 'http://localhost:3000/api/auth'
|
||||
const parsedUrl = new URL(url ? (url.startsWith('http') ? url : `https://${url}`) : defaultUrl)
|
||||
const path = parsedUrl.pathname === '/' ? '/api/auth' : parsedUrl.pathname.replace(/\/$/, '')
|
||||
|
|
|
@ -2,6 +2,7 @@ import { skipCSRFCheck } from '@auth/core'
|
|||
import type { Adapter } from '@auth/core/adapters'
|
||||
import Credentials from '@auth/core/providers/credentials'
|
||||
import { Hono } from 'hono'
|
||||
import { validator } from 'hono/validator'
|
||||
import { describe, expect, it, vi } from 'vitest'
|
||||
import type { AuthConfig } from '.'
|
||||
import { authHandler, verifyAuth, initAuthConfig, reqWithEnvUrl } from '.'
|
||||
|
@ -80,6 +81,128 @@ describe('reqWithEnvUrl()', async () => {
|
|||
it('Should rewrite the base path', () => {
|
||||
expect(newReq.url.toString()).toBe('https://auth-url-base/request-path')
|
||||
})
|
||||
|
||||
const mockAdapter: Adapter = {
|
||||
createVerificationToken: vi.fn(),
|
||||
useVerificationToken: vi.fn(),
|
||||
getUserByEmail: vi.fn(),
|
||||
createUser: vi.fn(),
|
||||
getUser: vi.fn(),
|
||||
getUserByAccount: vi.fn(),
|
||||
updateUser: vi.fn(),
|
||||
linkAccount: vi.fn(),
|
||||
createSession: vi.fn(),
|
||||
getSessionAndUser: vi.fn(),
|
||||
updateSession: vi.fn(),
|
||||
deleteSession: vi.fn(),
|
||||
}
|
||||
|
||||
globalThis.process.env = {
|
||||
AUTH_SECRET: 'secret',
|
||||
}
|
||||
|
||||
const user = { email: 'hono@hono.hono', name: 'Hono' }
|
||||
|
||||
const credentials = Credentials({
|
||||
credentials: {
|
||||
password: {},
|
||||
},
|
||||
authorize: (credentials) => {
|
||||
if (credentials.password === 'password') {
|
||||
return user
|
||||
}
|
||||
return null
|
||||
},
|
||||
})
|
||||
|
||||
function getAuthConfig(): AuthConfig {
|
||||
return {
|
||||
secret: 'secret',
|
||||
providers: [credentials],
|
||||
adapter: mockAdapter,
|
||||
basePath: '/api/auth',
|
||||
callbacks: {
|
||||
jwt: ({ token, user }) => {
|
||||
if (user) {
|
||||
token.id = user.id
|
||||
}
|
||||
return token
|
||||
},
|
||||
},
|
||||
session: {
|
||||
strategy: 'jwt',
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
let cookie = ['']
|
||||
|
||||
it('Should be able to instantiate new Request after passing through validator', async () => {
|
||||
const app = new Hono()
|
||||
|
||||
app.use('*', initAuthConfig(getAuthConfig))
|
||||
app.use(
|
||||
'/api/auth/*',
|
||||
validator('form', (value, _) => {
|
||||
const csrfToken = value['csrfToken']
|
||||
return {
|
||||
csrfToken,
|
||||
}
|
||||
}),
|
||||
authHandler()
|
||||
)
|
||||
|
||||
let csrfRes = await app.request('http://localhost/api/auth/csrf', {
|
||||
method: 'GET',
|
||||
})
|
||||
let { csrfToken } = await csrfRes.json()
|
||||
|
||||
cookie = csrfRes.headers.getSetCookie()
|
||||
|
||||
let headers = new Headers()
|
||||
headers.append('cookie', cookie[0])
|
||||
|
||||
const signInRes = await app.request('http://localhost/api/auth/callback/credentials', {
|
||||
method: 'POST',
|
||||
headers,
|
||||
body: new URLSearchParams({
|
||||
csrfToken,
|
||||
password: 'password',
|
||||
}),
|
||||
})
|
||||
expect(signInRes.status).toBe(302)
|
||||
expect(signInRes.headers.get('location')).toBe('http://localhost')
|
||||
|
||||
cookie = signInRes.headers.getSetCookie()
|
||||
|
||||
const sessionCookie = cookie[1]
|
||||
|
||||
headers = new Headers()
|
||||
headers.append('cookie', cookie[1])
|
||||
headers.append('Content-Type', 'application/json')
|
||||
|
||||
csrfRes = await app.request('http://localhost/api/auth/csrf', {
|
||||
method: 'GET',
|
||||
})
|
||||
;({ csrfToken } = await csrfRes.json())
|
||||
|
||||
cookie = csrfRes.headers.getSetCookie()
|
||||
|
||||
headers = new Headers()
|
||||
headers.append('cookie', cookie[0])
|
||||
headers.append('cookie', sessionCookie)
|
||||
|
||||
const req = new Request('http://localhost/api/auth/signout', {
|
||||
method: 'POST',
|
||||
body: new URLSearchParams({
|
||||
csrfToken,
|
||||
password: 'password',
|
||||
}),
|
||||
headers,
|
||||
})
|
||||
const res = await app.request(req)
|
||||
expect(res.status).toBe(302)
|
||||
})
|
||||
})
|
||||
|
||||
describe('Credentials Provider', () => {
|
||||
|
|
|
@ -31,12 +31,12 @@ export interface AuthConfig extends Omit<AuthConfigCore, 'raw'> {}
|
|||
|
||||
export type ConfigHandler = (c: Context) => AuthConfig
|
||||
|
||||
export function setEnvDefaults(env: AuthEnv, config: AuthConfig) {
|
||||
export function setEnvDefaults(env: AuthEnv, config: AuthConfig): void {
|
||||
config.secret ??= env.AUTH_SECRET
|
||||
coreSetEnvDefaults(env, config)
|
||||
}
|
||||
|
||||
export function reqWithEnvUrl(req: Request, authUrl?: string) {
|
||||
export function reqWithEnvUrl(req: Request, authUrl?: string): Request {
|
||||
if (authUrl) {
|
||||
const reqUrlObj = new URL(req.url)
|
||||
const authUrlObj = new URL(authUrl)
|
||||
|
@ -135,7 +135,27 @@ export function authHandler(): MiddlewareHandler {
|
|||
throw new HTTPException(500, { message: 'Missing AUTH_SECRET' })
|
||||
}
|
||||
|
||||
const res = await Auth(reqWithEnvUrl(c.req.raw, ctxEnv.AUTH_URL), config)
|
||||
const body = c.req.raw.body ? await c.req.blob() : undefined
|
||||
const res = await Auth(
|
||||
reqWithEnvUrl(
|
||||
new Request(c.req.raw.url, {
|
||||
body,
|
||||
cache: c.req.raw.cache,
|
||||
credentials: c.req.raw.credentials,
|
||||
headers: c.req.raw.headers,
|
||||
integrity: c.req.raw.integrity,
|
||||
keepalive: c.req.raw.keepalive,
|
||||
method: c.req.raw.method,
|
||||
mode: c.req.raw.mode,
|
||||
redirect: c.req.raw.redirect,
|
||||
referrer: c.req.raw.referrer,
|
||||
referrerPolicy: c.req.raw.referrerPolicy,
|
||||
signal: c.req.raw.signal,
|
||||
}),
|
||||
ctxEnv.AUTH_URL
|
||||
),
|
||||
config
|
||||
)
|
||||
return new Response(res.body, res)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,9 +65,11 @@ class AuthConfigManager {
|
|||
}
|
||||
}
|
||||
|
||||
export const authConfigManager = AuthConfigManager.getInstance()
|
||||
export const authConfigManager: AuthConfigManager = AuthConfigManager.getInstance()
|
||||
|
||||
export const SessionContext = React.createContext<SessionContextValue | undefined>(undefined)
|
||||
export const SessionContext: React.Context<SessionContextValue | undefined> = React.createContext<
|
||||
SessionContextValue | undefined
|
||||
>(undefined)
|
||||
|
||||
function useInitializeSession(hasInitialSession: boolean, initialSession: Session | null) {
|
||||
const authConfig = authConfigManager.getConfig()
|
||||
|
@ -148,7 +150,7 @@ function useRefetchInterval(
|
|||
}, [refetchInterval, shouldRefetch])
|
||||
}
|
||||
|
||||
export async function getSession(params?: GetSessionParams) {
|
||||
export async function getSession(params?: GetSessionParams): Promise<Session | null> {
|
||||
const { baseUrl, basePath, credentials } = authConfigManager.getConfig()
|
||||
const session = await fetchData<Session>(
|
||||
'session',
|
||||
|
@ -163,7 +165,7 @@ export async function getSession(params?: GetSessionParams) {
|
|||
return session
|
||||
}
|
||||
|
||||
export async function getCsrfToken() {
|
||||
export async function getCsrfToken(): Promise<string> {
|
||||
const { baseUrl, basePath, credentials } = authConfigManager.getConfig()
|
||||
const response = await fetchData<{ csrfToken: string }>(
|
||||
'csrf',
|
||||
|
@ -177,7 +179,7 @@ export async function getCsrfToken() {
|
|||
return response?.csrfToken ?? ''
|
||||
}
|
||||
|
||||
export function SessionProvider(props: SessionProviderProps) {
|
||||
export function SessionProvider(props: SessionProviderProps): React.JSX.Element {
|
||||
if (!SessionContext) {
|
||||
throw new Error('React Context is unavailable in Server Components')
|
||||
}
|
||||
|
@ -274,7 +276,7 @@ export function useSession<R extends boolean>(
|
|||
|
||||
type ProvidersType = Record<LiteralUnion<BuiltInProviderType>, ClientSafeProvider>
|
||||
|
||||
export async function getProviders() {
|
||||
export async function getProviders(): Promise<ProvidersType | null> {
|
||||
return fetchData<ProvidersType>('providers', authConfigManager.getConfig(), logger)
|
||||
}
|
||||
|
||||
|
@ -395,10 +397,14 @@ interface PopupLoginOptions extends Partial<Omit<WindowProps, 'url'>> {
|
|||
callbackUrl?: string
|
||||
}
|
||||
|
||||
interface LoginState extends AuthState {
|
||||
popUpSignin: () => Promise<void>
|
||||
}
|
||||
|
||||
export const useOauthPopupLogin = (
|
||||
provider: Parameters<typeof signIn>[0],
|
||||
options: PopupLoginOptions = {}
|
||||
) => {
|
||||
): LoginState => {
|
||||
const { width = 500, height = 500, title = 'Signin', onSuccess, callbackUrl = '/' } = options
|
||||
|
||||
const [externalWindow, setExternalWindow] = useState<Window | null>()
|
||||
|
|
|
@ -1,9 +1,15 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
|
||||
"emitDeclarationOnly": true,
|
||||
"isolatedDeclarations": true,
|
||||
"jsx": "react"
|
||||
},
|
||||
"include": ["src/**/*.ts", "src/**/*.tsx"],
|
||||
"exclude": ["**/*.test.ts"],
|
||||
"references": []
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc/packages/auth-js",
|
||||
"noEmit": true,
|
||||
"jsx": "react"
|
||||
},
|
||||
"include": ["**/*.test.ts", "vitest.config.ts"],
|
||||
|
|
|
@ -1,20 +1,15 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
|
||||
"emitDeclarationOnly": false,
|
||||
"types": [
|
||||
"node",
|
||||
"bun"
|
||||
],
|
||||
"emitDeclarationOnly": true,
|
||||
"isolatedDeclarations": true,
|
||||
"types": ["node", "bun"]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"**/*.test.ts"
|
||||
],
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["**/*.test.ts"],
|
||||
"references": []
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
# @hono/bun-transpiler
|
||||
|
||||
## 0.2.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1193](https://github.com/honojs/middleware/pull/1193) [`1adca4c91822af8f68f4a134344cca93e0796ad0`](https://github.com/honojs/middleware/commit/1adca4c91822af8f68f4a134344cca93e0796ad0) Thanks [@BarryThePenguin](https://github.com/BarryThePenguin)! - Add explicit `MiddlewareHandler` return type
|
||||
|
||||
## 0.2.0
|
||||
|
||||
### Minor Changes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@hono/bun-transpiler",
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.1",
|
||||
"description": "Bun Transpiler Middleware for Hono",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import Bun from 'bun'
|
||||
import type { MiddlewareHandler } from 'hono'
|
||||
import { createMiddleware } from 'hono/factory'
|
||||
|
||||
type BunTranspilerOptions = {
|
||||
|
@ -16,7 +17,7 @@ export const defaultOptions: Required<BunTranspilerOptions> = {
|
|||
},
|
||||
}
|
||||
|
||||
export const bunTranspiler = (options?: BunTranspilerOptions) => {
|
||||
export const bunTranspiler = (options?: BunTranspilerOptions): MiddlewareHandler => {
|
||||
return createMiddleware(async (c, next) => {
|
||||
await next()
|
||||
const url = new URL(c.req.url)
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
|
||||
"emitDeclarationOnly": false
|
||||
"emitDeclarationOnly": true,
|
||||
"isolatedDeclarations": true
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["**/*.test.ts"],
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
|
||||
"emitDeclarationOnly": false
|
||||
"emitDeclarationOnly": true,
|
||||
"isolatedDeclarations": true
|
||||
},
|
||||
"include": ["./src/**/*.ts"],
|
||||
"references": []
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
|
||||
"emitDeclarationOnly": false
|
||||
"emitDeclarationOnly": true,
|
||||
"isolatedDeclarations": true
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["**/*.test.ts"],
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
# @hono/clerk-auth
|
||||
|
||||
## 2.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1194](https://github.com/honojs/middleware/pull/1194) [`683455895d35de50bd5c4cc60c0d764b99a8c8ec`](https://github.com/honojs/middleware/commit/683455895d35de50bd5c4cc60c0d764b99a8c8ec) Thanks [@BarryThePenguin](https://github.com/BarryThePenguin)! - Add explicit `MiddlewareHandler` return type
|
||||
|
||||
## 2.0.0
|
||||
|
||||
### Major Changes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@hono/clerk-auth",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1",
|
||||
"description": "A third-party Clerk auth middleware for Hono",
|
||||
"type": "module",
|
||||
"main": "dist/index.cjs",
|
||||
|
|
|
@ -12,7 +12,7 @@ declare module 'hono' {
|
|||
}
|
||||
}
|
||||
|
||||
export const getAuth = (c: Context) => {
|
||||
export const getAuth = (c: Context): ClerkAuth => {
|
||||
return c.get('clerkAuth')
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
|
||||
"emitDeclarationOnly": false
|
||||
"emitDeclarationOnly": true,
|
||||
"isolatedDeclarations": true
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["**/*.test.ts"],
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
# @hono/cloudflare-access
|
||||
|
||||
## 0.3.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1195](https://github.com/honojs/middleware/pull/1195) [`b6f3bc674ba8987e32c0207290fc1230ace4d82b`](https://github.com/honojs/middleware/commit/b6f3bc674ba8987e32c0207290fc1230ace4d82b) Thanks [@BarryThePenguin](https://github.com/BarryThePenguin)! - Add explicit `MiddlewareHandler` return type
|
||||
|
||||
## 0.3.0
|
||||
|
||||
### Minor Changes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@hono/cloudflare-access",
|
||||
"version": "0.3.0",
|
||||
"version": "0.3.1",
|
||||
"description": "A third-party Cloudflare Access auth middleware for Hono",
|
||||
"type": "module",
|
||||
"module": "dist/index.js",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type { Context } from 'hono'
|
||||
import type { Context, MiddlewareHandler } from 'hono'
|
||||
import { getCookie } from 'hono/cookie'
|
||||
import { createMiddleware } from 'hono/factory'
|
||||
import { HTTPException } from 'hono/http-exception'
|
||||
|
@ -33,7 +33,7 @@ declare module 'hono' {
|
|||
}
|
||||
}
|
||||
|
||||
export const cloudflareAccess = (accessTeamName: string) => {
|
||||
export const cloudflareAccess = (accessTeamName: string): MiddlewareHandler => {
|
||||
// This var will hold already imported jwt keys, this reduces the load of importing the key on every request
|
||||
let cacheKeys: Record<string, CryptoKey> = {}
|
||||
let cacheExpiration = 0
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
|
||||
"emitDeclarationOnly": false,
|
||||
"emitDeclarationOnly": true,
|
||||
"isolatedDeclarations": true,
|
||||
"types": ["@cloudflare/workers-types"]
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
|
||||
"emitDeclarationOnly": false
|
||||
"emitDeclarationOnly": true,
|
||||
"isolatedDeclarations": true
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["**/*.test.ts"],
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
|
||||
"emitDeclarationOnly": false
|
||||
"emitDeclarationOnly": true,
|
||||
"isolatedDeclarations": true
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["**/*.test.ts"],
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
# @hono/esbuild-transpiler
|
||||
|
||||
## 0.1.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1196](https://github.com/honojs/middleware/pull/1196) [`3a9920a258dbe7ae5fa578f1d7ba8c2e252c60d8`](https://github.com/honojs/middleware/commit/3a9920a258dbe7ae5fa578f1d7ba8c2e252c60d8) Thanks [@BarryThePenguin](https://github.com/BarryThePenguin)! - Add explicit `MiddlewareHandler` return type
|
||||
|
||||
## 0.1.3
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@hono/esbuild-transpiler",
|
||||
"version": "0.1.3",
|
||||
"version": "0.1.4",
|
||||
"description": "esbuild Transpiler Middleware for Hono",
|
||||
"type": "module",
|
||||
"module": "dist/index.js",
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import type { MiddlewareHandler } from 'hono'
|
||||
import { createMiddleware } from 'hono/factory'
|
||||
import type { transform, initialize } from './types.esbuild'
|
||||
|
||||
|
@ -16,7 +17,7 @@ export type EsbuildTranspilerOptions = {
|
|||
transformOptions?: TransformOptions
|
||||
}
|
||||
|
||||
export const esbuildTranspiler = (options?: EsbuildTranspilerOptions) => {
|
||||
export const esbuildTranspiler = (options?: EsbuildTranspilerOptions): MiddlewareHandler => {
|
||||
const esbuild: EsbuildLike | undefined = options?.esbuild
|
||||
|
||||
return createMiddleware(async (c, next) => {
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
import * as esbuild from 'esbuild'
|
||||
import type { MiddlewareHandler } from 'hono'
|
||||
import { createMiddleware } from 'hono/factory'
|
||||
import { esbuildTranspiler as baseTranspiler } from '../transpiler'
|
||||
import type { EsbuildTranspilerOptions } from '../transpiler'
|
||||
|
||||
const transpiler = (options?: Partial<Omit<EsbuildTranspilerOptions, 'esbuild'>>) => {
|
||||
const transpiler = (
|
||||
options?: Partial<Omit<EsbuildTranspilerOptions, 'esbuild'>>
|
||||
): MiddlewareHandler => {
|
||||
return createMiddleware(async (c, next) => {
|
||||
return await baseTranspiler({
|
||||
esbuild,
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import * as esbuild from 'esbuild-wasm'
|
||||
import type { MiddlewareHandler } from 'hono'
|
||||
import { createMiddleware } from 'hono/factory'
|
||||
import { esbuildTranspiler as baseTranspiler } from '../transpiler'
|
||||
import type { EsbuildTranspilerOptions } from '../transpiler'
|
||||
|
@ -10,7 +11,7 @@ const transpiler = (
|
|||
wasmModule?: WebAssembly.Module
|
||||
wasmURL?: string | URL
|
||||
}
|
||||
) => {
|
||||
): MiddlewareHandler => {
|
||||
return createMiddleware(async (c, next) => {
|
||||
if (!initialized) {
|
||||
if (options.wasmModule) {
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
|
||||
"emitDeclarationOnly": false
|
||||
"emitDeclarationOnly": true,
|
||||
"isolatedDeclarations": true
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["**/*.test.ts"],
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
|
|
|
@ -145,7 +145,7 @@ export const createEmitter = <EPMap extends EventPayloadMap>(
|
|||
if (!handlers.has(key as EventKey)) {
|
||||
handlers.set(key as EventKey, [])
|
||||
}
|
||||
const handlerArray = handlers.get(key as EventKey) as Array<EventHandler<EPMap[Key]>>
|
||||
const handlerArray = handlers.get(key as EventKey) as EventHandler<EPMap[Key]>[]
|
||||
const limit = options?.maxHandlers ?? 10
|
||||
if (handlerArray.length >= limit) {
|
||||
throw new RangeError(
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
|
||||
"emitDeclarationOnly": false
|
||||
"emitDeclarationOnly": true,
|
||||
"isolatedDeclarations": true
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["**/*.test.ts"],
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
|
||||
"emitDeclarationOnly": true,
|
||||
"isolatedDeclarations": true,
|
||||
"types": ["@cloudflare/workers-types"]
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["**/*.test.ts"],
|
||||
"references": []
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc/packages/firebase-auth",
|
||||
"noEmit": true
|
||||
"types": ["@cloudflare/workers-types"]
|
||||
},
|
||||
"include": ["**/*.test.ts", "vitest.config.ts"],
|
||||
"include": ["**/*.test.ts", "firebase-tools.d.ts", "vitest.config.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.build.json"
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
# @hono/graphql-server
|
||||
|
||||
## 0.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1197](https://github.com/honojs/middleware/pull/1197) [`ab390305fba1d9bd99da46537f28763f7d5df8df`](https://github.com/honojs/middleware/commit/ab390305fba1d9bd99da46537f28763f7d5df8df) Thanks [@BarryThePenguin](https://github.com/BarryThePenguin)! - Add explicit `Response` return type
|
||||
|
||||
## 0.6.0
|
||||
|
||||
### Minor Changes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@hono/graphql-server",
|
||||
"version": "0.6.0",
|
||||
"version": "0.6.1",
|
||||
"repository": "git@github.com:honojs/middleware.git",
|
||||
"author": "Minghe Huang <h.minghe@gmail.com>",
|
||||
"type": "module",
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue