Compare commits
2 Commits
989a9f4394
...
99502a46f9
Author | SHA1 | Date |
---|---|---|
|
99502a46f9 | |
|
e8512f0ee9 |
|
@ -2,5 +2,5 @@
|
|||
|
||||
- [ ] Add tests
|
||||
- [ ] Run tests
|
||||
- [ ] `yarn changeset` at the top of this repo and push the changeset
|
||||
- [ ] `bun changeset` at the top of this repo and push the changeset
|
||||
- [ ] Follow [the contribution guide](https://github.com/honojs/middleware?tab=readme-ov-file#how-to-contribute)
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/ajv-validator
|
||||
- run: yarn test --coverage --project @hono/ajv-validator
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/ajv-validator'
|
||||
- run: bun --filter './packages/ajv-validator' build
|
||||
- run: bun --filter './packages/ajv-validator' publint
|
||||
- run: bun --filter './packages/ajv-validator' typecheck
|
||||
- run: bun eslint packages/ajv-validator
|
||||
- run: bun vitest --coverage --project @hono/ajv-validator
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/arktype-validator
|
||||
- run: yarn test --coverage --project @hono/arktype-validator
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/arktype-validator'
|
||||
- run: bun --filter './packages/arktype-validator' build
|
||||
- run: bun --filter './packages/arktype-validator' publint
|
||||
- run: bun --filter './packages/arktype-validator' typecheck
|
||||
- run: bun eslint packages/arktype-validator
|
||||
- run: bun vitest --coverage --project @hono/arktype-validator
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/auth-js
|
||||
- run: yarn test --coverage --project @hono/auth-js
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/auth-js'
|
||||
- run: bun --filter './packages/auth-js' build
|
||||
- run: bun --filter './packages/auth-js' publint
|
||||
- run: bun --filter './packages/auth-js' typecheck
|
||||
- run: bun eslint packages/auth-js
|
||||
- run: bun vitest --coverage --project @hono/auth-js
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: oven-sh/setup-bun@v1
|
||||
with:
|
||||
bun-version: 1.1.32
|
||||
- run: yarn workspaces focus hono-middleware @hono/bun-transpiler
|
||||
- run: yarn workspace @hono/bun-transpiler build
|
||||
- run: yarn workspace @hono/bun-transpiler publint
|
||||
- run: yarn eslint packages/bun-transpiler
|
||||
- run: yarn workspace @hono/bun-transpiler test --coverage --coverage-reporter lcov
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/bun-transpiler'
|
||||
- run: bun --filter './packages/bun-transpiler' build
|
||||
- run: bun --filter './packages/bun-transpiler' publint
|
||||
- run: bun --filter './packages/bun-transpiler' typecheck
|
||||
- run: bun eslint packages/bun-transpiler
|
||||
- run: bun --filter './packages/bun-transpiler' test --coverage --coverage-reporter lcov
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/casbin
|
||||
- run: yarn test --coverage --project @hono/casbin
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/casbin'
|
||||
- run: bun --filter './packages/casbin' build
|
||||
- run: bun --filter './packages/casbin' publint
|
||||
- run: bun --filter './packages/casbin' typecheck
|
||||
- run: bun eslint packages/casbin
|
||||
- run: bun vitest --coverage --project @hono/casbin
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/class-validator
|
||||
- run: yarn test --coverage --project @hono/class-validator
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/class-validator'
|
||||
- run: bun --filter './packages/class-validator' build
|
||||
- run: bun --filter './packages/class-validator' publint
|
||||
- run: bun --filter './packages/class-validator' typecheck
|
||||
- run: bun eslint packages/class-validator
|
||||
- run: bun vitest --coverage --project @hono/class-validator
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/clerk-auth
|
||||
- run: yarn test --coverage --project @hono/clerk-auth
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/clerk-auth'
|
||||
- run: bun --filter './packages/clerk-auth' build
|
||||
- run: bun --filter './packages/clerk-auth' publint
|
||||
- run: bun --filter './packages/clerk-auth' typecheck
|
||||
- run: bun eslint packages/clerk-auth
|
||||
- run: bun vitest --coverage --project @hono/clerk-auth
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/cloudflare-access
|
||||
- run: yarn test --coverage --project @hono/cloudflare-access
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/cloudflare-access'
|
||||
- run: bun --filter './packages/cloudflare-access' build
|
||||
- run: bun --filter './packages/cloudflare-access' publint
|
||||
- run: bun --filter './packages/cloudflare-access' typecheck
|
||||
- run: bun eslint packages/cloudflare-access
|
||||
- run: bun vitest --coverage --project @hono/cloudflare-access
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/conform-validator
|
||||
- run: yarn test --coverage --project @hono/conform-validator
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/conform-validator'
|
||||
- run: bun --filter './packages/conform-validator' build
|
||||
- run: bun --filter './packages/conform-validator' publint
|
||||
- run: bun --filter './packages/conform-validator' typecheck
|
||||
- run: bun eslint packages/conform-validator
|
||||
- run: bun vitest --coverage --project @hono/conform-validator
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/effect-validator
|
||||
- run: yarn test --coverage --project @hono/effect-validator
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/effect-validator'
|
||||
- run: bun --filter './packages/effect-validator' build
|
||||
- run: bun --filter './packages/effect-validator' publint
|
||||
- run: bun --filter './packages/effect-validator' typecheck
|
||||
- run: bun eslint packages/effect-validator
|
||||
- run: bun vitest --coverage --project @hono/effect-validator
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/esbuild-transpiler
|
||||
- run: yarn test --coverage --project @hono/esbuild-transpiler
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/esbuild-transpiler'
|
||||
- run: bun --filter './packages/esbuild-transpiler' build
|
||||
- run: bun --filter './packages/esbuild-transpiler' publint
|
||||
- run: bun --filter './packages/esbuild-transpiler' typecheck
|
||||
- run: bun eslint packages/esbuild-transpiler
|
||||
- run: bun vitest --coverage --project @hono/esbuild-transpiler
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/event-emitter
|
||||
- run: yarn test --coverage --project @hono/event-emitter
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/event-emitter'
|
||||
- run: bun --filter './packages/event-emitter' build
|
||||
- run: bun --filter './packages/event-emitter' publint
|
||||
- run: bun --filter './packages/event-emitter' typecheck
|
||||
- run: bun eslint packages/event-emitter
|
||||
- run: bun vitest --coverage --project @hono/event-emitter
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/firebase-auth
|
||||
- run: yarn test --coverage --project @hono/firebase-auth
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/firebase-auth'
|
||||
- run: bun --filter './packages/firebase-auth' build
|
||||
- run: bun --filter './packages/firebase-auth' publint
|
||||
- run: bun --filter './packages/firebase-auth' typecheck
|
||||
- run: bun eslint packages/firebase-auth
|
||||
- run: bun vitest --coverage --project @hono/firebase-auth
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/graphql-server
|
||||
- run: yarn test --coverage --project @hono/graphql-server
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/graphql-server'
|
||||
- run: bun --filter './packages/graphql-server' build
|
||||
- run: bun --filter './packages/graphql-server' publint
|
||||
- run: bun --filter './packages/graphql-server' typecheck
|
||||
- run: bun eslint packages/graphql-server
|
||||
- run: bun vitest --coverage --project @hono/graphql-server
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/hello
|
||||
- run: yarn test --coverage --project @hono/hello
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/hello'
|
||||
- run: bun --filter './packages/hello' build
|
||||
- run: bun --filter './packages/hello' publint
|
||||
- run: bun --filter './packages/hello' typecheck
|
||||
- run: bun eslint packages/hello
|
||||
- run: bun vitest --coverage --project @hono/hello
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/medley-router
|
||||
- run: yarn test --coverage --project @hono/medley-router
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/medley-router'
|
||||
- run: bun --filter './packages/medley-router' build
|
||||
- run: bun --filter './packages/medley-router' publint
|
||||
- run: bun --filter './packages/medley-router' typecheck
|
||||
- run: bun eslint packages/medley-router
|
||||
- run: bun vitest --coverage --project @hono/medley-router
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/node-ws
|
||||
- run: yarn test --coverage --project @hono/node-ws
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/node-ws'
|
||||
- run: bun --filter './packages/node-ws' build
|
||||
- run: bun --filter './packages/node-ws' publint
|
||||
- run: bun --filter './packages/node-ws' typecheck
|
||||
- run: bun eslint packages/node-ws
|
||||
- run: bun vitest --coverage --project @hono/node-ws
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/oauth-providers
|
||||
- run: yarn test --coverage --project @hono/oauth-providers
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/oauth-providers'
|
||||
- run: bun --filter './packages/oauth-providers' build
|
||||
- run: bun --filter './packages/oauth-providers' publint
|
||||
- run: bun --filter './packages/oauth-providers' typecheck
|
||||
- run: bun eslint packages/oauth-providers
|
||||
- run: bun vitest --coverage --project @hono/oauth-providers
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/oidc-auth
|
||||
- run: yarn test --coverage --project @hono/oidc-auth
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/oidc-auth'
|
||||
- run: bun --filter './packages/oidc-auth' build
|
||||
- run: bun --filter './packages/oidc-auth' publint
|
||||
- run: bun --filter './packages/oidc-auth' typecheck
|
||||
- run: bun eslint packages/oidc-auth
|
||||
- run: bun vitest --coverage --project @hono/oidc-auth
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/otel
|
||||
- run: yarn test --coverage --project @hono/otel
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/otel'
|
||||
- run: bun --filter './packages/otel' build
|
||||
- run: bun --filter './packages/otel' publint
|
||||
- run: bun --filter './packages/otel' typecheck
|
||||
- run: bun eslint packages/otel
|
||||
- run: bun vitest --coverage --project @hono/otel
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/prometheus
|
||||
- run: yarn test --coverage --project @hono/prometheus
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/prometheus'
|
||||
- run: bun --filter './packages/prometheus' build
|
||||
- run: bun --filter './packages/prometheus' publint
|
||||
- run: bun --filter './packages/prometheus' typecheck
|
||||
- run: bun eslint packages/prometheus
|
||||
- run: bun vitest --coverage --project @hono/prometheus
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/qwik-city
|
||||
# - run: yarn test --coverage --project @hono/qwik-city
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/qwik-city'
|
||||
- run: bun --filter './packages/qwik-city' build
|
||||
- run: bun --filter './packages/qwik-city' publint
|
||||
- run: bun --filter './packages/qwik-city' typecheck
|
||||
- run: bun eslint packages/qwik-city
|
||||
# - run: bun vitest --coverage --project @hono/qwik-city
|
||||
# - uses: codecov/codecov-action@v5
|
||||
# with:
|
||||
# fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/react-compat
|
||||
# - run: yarn test --coverage --project @hono/react-compat
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/react-compat'
|
||||
- run: bun --filter './packages/react-compat' build
|
||||
- run: bun --filter './packages/react-compat' publint
|
||||
- run: bun --filter './packages/react-compat' typecheck
|
||||
- run: bun eslint packages/react-compat
|
||||
# - run: bun vitest --coverage --project @hono/react-compat
|
||||
# - uses: codecov/codecov-action@v5
|
||||
# with:
|
||||
# fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/react-renderer
|
||||
- run: yarn test --coverage --project @hono/react-renderer
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/react-renderer'
|
||||
- run: bun --filter './packages/react-renderer' build
|
||||
- run: bun --filter './packages/react-renderer' publint
|
||||
- run: bun --filter './packages/react-renderer' typecheck
|
||||
- run: bun eslint packages/react-renderer
|
||||
- run: bun vitest --coverage --project @hono/react-renderer
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/sentry
|
||||
- run: yarn test --coverage --project @hono/sentry
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/sentry'
|
||||
- run: bun --filter './packages/sentry' build
|
||||
- run: bun --filter './packages/sentry' publint
|
||||
- run: bun --filter './packages/sentry' typecheck
|
||||
- run: bun eslint packages/sentry
|
||||
- run: bun vitest --coverage --project @hono/sentry
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/standard-validator
|
||||
- run: yarn test --coverage --project @hono/standard-validator
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/standard-validator'
|
||||
- run: bun --filter './packages/standard-validator' build
|
||||
- run: bun --filter './packages/standard-validator' publint
|
||||
- run: bun --filter './packages/standard-validator' typecheck
|
||||
- run: bun eslint packages/standard-validator
|
||||
- run: bun vitest --coverage --project @hono/standard-validator
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/swagger-editor
|
||||
- run: yarn test --coverage --project @hono/swagger-editor
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/swagger-editor'
|
||||
- run: bun --filter './packages/swagger-editor' build
|
||||
- run: bun --filter './packages/swagger-editor' publint
|
||||
- run: bun --filter './packages/swagger-editor' typecheck
|
||||
- run: bun eslint packages/swagger-editor
|
||||
- run: bun vitest --coverage --project @hono/swagger-editor
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/swagger-ui
|
||||
- run: yarn test --coverage --project @hono/swagger-ui
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/swagger-ui'
|
||||
- run: bun --filter './packages/swagger-ui' build
|
||||
- run: bun --filter './packages/swagger-ui' publint
|
||||
- run: bun --filter './packages/swagger-ui' typecheck
|
||||
- run: bun eslint packages/swagger-ui
|
||||
- run: bun vitest --coverage --project @hono/swagger-ui
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/trpc-server
|
||||
- run: yarn test --coverage --project @hono/trpc-server
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/trpc-server'
|
||||
- run: bun --filter './packages/trpc-server' build
|
||||
- run: bun --filter './packages/trpc-server' publint
|
||||
- run: bun --filter './packages/trpc-server' typecheck
|
||||
- run: bun eslint packages/trpc-server
|
||||
- run: bun vitest --coverage --project @hono/trpc-server
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/tsyringe
|
||||
- run: yarn test --coverage --project @hono/tsyringe
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/tsyringe'
|
||||
- run: bun --filter './packages/tsyringe' build
|
||||
- run: bun --filter './packages/tsyringe' publint
|
||||
- run: bun --filter './packages/tsyringe' typecheck
|
||||
- run: bun eslint packages/tsyringe
|
||||
- run: bun vitest --coverage --project @hono/tsyringe
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/typebox-validator
|
||||
- run: yarn test --coverage --project @hono/typebox-validator
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/typebox-validator'
|
||||
- run: bun --filter './packages/typebox-validator' build
|
||||
- run: bun --filter './packages/typebox-validator' publint
|
||||
- run: bun --filter './packages/typebox-validator' typecheck
|
||||
- run: bun eslint packages/typebox-validator
|
||||
- run: bun vitest --coverage --project @hono/typebox-validator
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/typia-validator
|
||||
- run: yarn test --coverage --project @hono/typia-validator
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/typia-validator'
|
||||
- run: bun --filter './packages/typia-validator' build
|
||||
- run: bun --filter './packages/typia-validator' publint
|
||||
- run: bun --filter './packages/typia-validator' typecheck
|
||||
- run: bun eslint packages/typia-validator
|
||||
- run: bun vitest --coverage --project @hono/typia-validator
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/valibot-validator
|
||||
- run: yarn test --coverage --project @hono/valibot-validator
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/valibot-validator'
|
||||
- run: bun --filter './packages/valibot-validator' build
|
||||
- run: bun --filter './packages/valibot-validator' publint
|
||||
- run: bun --filter './packages/valibot-validator' typecheck
|
||||
- run: bun eslint packages/valibot-validator
|
||||
- run: bun vitest --coverage --project @hono/valibot-validator
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/zod-openapi
|
||||
- run: yarn test --coverage --project @hono/zod-openapi
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/zod-openapi' --filter './packages/zod-validator'
|
||||
- run: bun --filter './packages/zod-openapi' build
|
||||
- run: bun --filter './packages/zod-openapi' publint
|
||||
- run: bun --filter './packages/zod-openapi' typecheck
|
||||
- run: bun eslint packages/zod-openapi
|
||||
- run: bun vitest --coverage --project @hono/zod-openapi
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -14,14 +14,13 @@ jobs:
|
|||
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 eslint packages/zod-validator
|
||||
- run: yarn test --coverage --project @hono/zod-validator
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- run: bun install --filter './' --filter './packages/zod-validator'
|
||||
- run: bun --filter './packages/zod-validator' build
|
||||
- run: bun --filter './packages/zod-validator' publint
|
||||
- run: bun --filter './packages/zod-validator' typecheck
|
||||
- run: bun eslint packages/zod-validator
|
||||
- run: bun vitest --coverage --project @hono/zod-validator
|
||||
- uses: codecov/codecov-action@v5
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -15,22 +15,17 @@ jobs:
|
|||
- name: Checkout Repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js 18.x
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn
|
||||
|
||||
- name: Build
|
||||
run: yarn build
|
||||
run: bun install
|
||||
|
||||
- name: Create Release Pull Request or Publish to npm
|
||||
id: changesets
|
||||
uses: changesets/action@v1
|
||||
with:
|
||||
publish: yarn changeset publish
|
||||
publish: bun run changeset publish
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
|
|
@ -4,15 +4,6 @@ node_modules
|
|||
*.tgz
|
||||
coverage
|
||||
|
||||
.yarn/*
|
||||
!.yarn/cache
|
||||
!.yarn/patches
|
||||
!.yarn/plugins
|
||||
!.yarn/releases
|
||||
!.yarn/sdks
|
||||
!.yarn/versions
|
||||
yarn-error.log
|
||||
|
||||
# for debug or playing
|
||||
sandbox
|
||||
*.log
|
File diff suppressed because one or more lines are too long
|
@ -1,5 +0,0 @@
|
|||
nodeLinker: node-modules
|
||||
|
||||
yarnPath: .yarn/releases/yarn-4.0.2.cjs
|
||||
|
||||
nmHoistingLimits: 'workspaces'
|
|
@ -44,14 +44,14 @@ and include `.test.` in their file name, for example; `index.test.ts`.
|
|||
Run the following command in the middleware directory to run tests.
|
||||
|
||||
```plain
|
||||
yarn test
|
||||
bun test
|
||||
```
|
||||
|
||||
We use [changesets](https://github.com/changesets/changesets) to manage releases and CHANGELOG.
|
||||
Run the following command at the top level to describe any changes.
|
||||
|
||||
```plain
|
||||
yarn changeset
|
||||
```
|
||||
bun changeset
|
||||
```
|
||||
|
||||
When merged into the main, a pull request for release is created.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import baseConfig from '@hono/eslint-config'
|
||||
import { defineConfig, globalIgnores } from 'eslint/config'
|
||||
|
||||
export default defineConfig(globalIgnores(['.yarn', '**/dist']), {
|
||||
export default defineConfig(globalIgnores(['**/dist']), {
|
||||
extends: baseConfig,
|
||||
})
|
||||
|
|
22
package.json
22
package.json
|
@ -2,14 +2,15 @@
|
|||
"name": "hono-middleware",
|
||||
"version": "0.0.0",
|
||||
"description": "Third-party middleware for Hono",
|
||||
"workspaces": {
|
||||
"packages": [
|
||||
"packages/*"
|
||||
]
|
||||
},
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "yarn workspaces foreach --all --parallel --topological --verbose run build",
|
||||
"publint": "yarn workspaces foreach --all --parallel --topological --verbose run publint",
|
||||
"build": "bun run --filter '*' build",
|
||||
"publint": "bun run --filter '*' publint",
|
||||
"typecheck": "bun run tsc --build",
|
||||
"typecheck:clean": "bun run tsc --build --clean",
|
||||
"typecheck:watch": "bun run tsc --build --watch",
|
||||
"test": "vitest",
|
||||
"lint": "eslint 'packages/**/*.{ts,tsx}'",
|
||||
"lint:fix": "eslint --fix 'packages/**/*.{ts,tsx}'",
|
||||
|
@ -29,7 +30,8 @@
|
|||
"@cloudflare/workers-types": "^4.20230307.0",
|
||||
"@hono/eslint-config": "workspace:*",
|
||||
"@ryoppippi/unplugin-typia": "^1.2.0",
|
||||
"@types/node": "^20.14.8",
|
||||
"@types/node": "^20.17.28",
|
||||
"@types/ws": "^8.18.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.7.0",
|
||||
"@typescript-eslint/parser": "^8.7.0",
|
||||
"@vitest/coverage-istanbul": "^3.0.8",
|
||||
|
@ -41,5 +43,5 @@
|
|||
"typescript": "^5.8.2",
|
||||
"vitest": "^3.0.8"
|
||||
},
|
||||
"packageManager": "yarn@4.0.2"
|
||||
}
|
||||
"packageManager": "bun@1.2.8"
|
||||
}
|
|
@ -10,8 +10,9 @@
|
|||
],
|
||||
"scripts": {
|
||||
"build": "tsup ./src/index.ts",
|
||||
"prepack": "yarn build",
|
||||
"prepack": "bun run build",
|
||||
"publint": "attw --pack && publint",
|
||||
"typecheck": "tsc -b tsconfig.json",
|
||||
"test": "vitest"
|
||||
},
|
||||
"exports": {
|
||||
|
@ -46,6 +47,7 @@
|
|||
"ajv": ">=8.12.0",
|
||||
"publint": "^0.3.9",
|
||||
"tsup": "^8.4.0",
|
||||
"typescript": "^5.8.2",
|
||||
"vitest": "^3.0.8"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
import type { JSONSchemaType, type ErrorObject } from 'ajv'
|
||||
import type { JSONSchemaType, ErrorObject } from 'ajv'
|
||||
import { Hono } from 'hono'
|
||||
import type { ContentfulStatusCode } from 'hono/utils/http-status'
|
||||
import type { Equal, Expect } from 'hono/utils/types'
|
||||
import { ajvValidator } from '.'
|
||||
|
||||
|
@ -40,6 +41,8 @@ describe('Basic', () => {
|
|||
success: boolean
|
||||
message: string
|
||||
}
|
||||
outputFormat: 'json'
|
||||
status: ContentfulStatusCode
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
|
||||
"emitDeclarationOnly": false
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["**/*.test.ts"],
|
||||
"references": []
|
||||
}
|
|
@ -1,6 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist"
|
||||
}
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.build.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.spec.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc/packages/ajv-validator",
|
||||
"types": ["vitest/globals"]
|
||||
},
|
||||
"include": ["**/*.test.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.build.json"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -11,8 +11,9 @@
|
|||
],
|
||||
"scripts": {
|
||||
"build": "tsup ./src/index.ts",
|
||||
"prepack": "yarn build",
|
||||
"prepack": "bun run build",
|
||||
"publint": "attw --pack && publint",
|
||||
"typecheck": "tsc -b tsconfig.json",
|
||||
"test": "vitest"
|
||||
},
|
||||
"exports": {
|
||||
|
@ -44,9 +45,10 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@arethetypeswrong/cli": "^0.17.4",
|
||||
"arktype": "^2.0.0-dev.14",
|
||||
"arktype": "2.0.0-dev.14",
|
||||
"publint": "^0.3.9",
|
||||
"tsup": "^8.4.0",
|
||||
"typescript": "^5.8.2",
|
||||
"vitest": "^3.0.8"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
import { type } from 'arktype'
|
||||
import { Hono } from 'hono'
|
||||
import type { ContentfulStatusCode } from 'hono/utils/http-status'
|
||||
import type { Equal, Expect } from 'hono/utils/types'
|
||||
import { arktypeValidator } from '.'
|
||||
|
||||
|
@ -53,6 +54,8 @@ describe('Basic', () => {
|
|||
message: string
|
||||
queryName: string | undefined
|
||||
}
|
||||
outputFormat: 'json'
|
||||
status: ContentfulStatusCode
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
|
||||
"emitDeclarationOnly": false
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["**/*.test.ts"],
|
||||
"references": []
|
||||
}
|
|
@ -1,6 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist"
|
||||
}
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.build.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.spec.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc/packages/arktype-validator",
|
||||
"types": ["vitest/globals"]
|
||||
},
|
||||
"include": ["**/*.test.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.build.json"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -38,8 +38,9 @@
|
|||
],
|
||||
"scripts": {
|
||||
"build": "tsup src/index.ts src/react.tsx",
|
||||
"prepack": "yarn build",
|
||||
"prepack": "bun run build",
|
||||
"publint": "attw --pack --profile node16 && publint",
|
||||
"typecheck": "tsc -b tsconfig.json",
|
||||
"test": "vitest"
|
||||
},
|
||||
"license": "MIT",
|
||||
|
@ -65,9 +66,10 @@
|
|||
"publint": "^0.3.9",
|
||||
"react": "^18.2.0",
|
||||
"tsup": "^8.4.0",
|
||||
"typescript": "^5.8.2",
|
||||
"vitest": "^3.0.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.4.0"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"jsx": "react"
|
||||
},
|
||||
"include": ["src/**/*.ts", "src/**/*.tsx"],
|
||||
"references": []
|
||||
}
|
|
@ -1,11 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "node",
|
||||
"outDir": "./dist",
|
||||
"jsx": "react",
|
||||
"types": ["node", "vitest/globals"]
|
||||
}
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.build.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.spec.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc/packages/auth-js",
|
||||
"noEmit": true,
|
||||
"jsx": "react"
|
||||
},
|
||||
"include": ["**/*.test.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.build.json"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -11,8 +11,9 @@
|
|||
],
|
||||
"scripts": {
|
||||
"build": "tsup ./src/index.ts --external bun",
|
||||
"prepack": "yarn build",
|
||||
"prepack": "bun run build",
|
||||
"publint": "attw --pack && publint",
|
||||
"typecheck": "tsc -b tsconfig.json",
|
||||
"test": "bun test"
|
||||
},
|
||||
"exports": {
|
||||
|
@ -46,9 +47,10 @@
|
|||
"@types/bun": "^1.0.0",
|
||||
"publint": "^0.3.9",
|
||||
"tsup": "^8.4.0",
|
||||
"typescript": "^5.8.2",
|
||||
"vitest": "^3.0.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.14.1"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -8,7 +8,7 @@ const TS = 'const add = (a: number, b: number): number => a + b'
|
|||
const TS_TRANSPILED = 'const add=(a,b)=>a+b;'
|
||||
const TSX = 'const element = <h1>hello world</h1>'
|
||||
const TSX_TRANSPILED =
|
||||
'const element=jsxDEV("h1",{children:"hello world"},undefined,false,undefined,this);'
|
||||
'const element=jsxDEV_7x81h0kn("h1",{children:"hello world"},undefined,false,undefined,this);'
|
||||
const BAD = 'function { !!! !@#$ add(a: INT) return a + b + c; }'
|
||||
|
||||
describe('Bun Transpiler middleware', () => {
|
||||
|
@ -43,7 +43,7 @@ describe('Bun Transpiler middleware', () => {
|
|||
const res = await app.request(`${HOST}/script.tsx`)
|
||||
expect(res).not.toBeNull()
|
||||
expect(res.status).toBe(200)
|
||||
expect(await res.text()).toBe(TSX_TRANSPILED)
|
||||
expect(await res.text()).toMatch(TSX_TRANSPILED)
|
||||
expect(res.headers.get('content-type')).toBe('application/javascript')
|
||||
})
|
||||
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
|
||||
"emitDeclarationOnly": false
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["**/*.test.ts"],
|
||||
"references": []
|
||||
}
|
|
@ -1,6 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist"
|
||||
}
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.build.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.spec.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc/packages/bun-transpiler",
|
||||
"types": ["vitest/globals"]
|
||||
},
|
||||
"include": ["**/*.test.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.build.json"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -33,8 +33,9 @@
|
|||
],
|
||||
"scripts": {
|
||||
"build": "tsup ./src/index.ts ./src/helper/index.ts",
|
||||
"prepack": "yarn build",
|
||||
"prepack": "bun run build",
|
||||
"publint": "attw --pack --profile node16 && publint",
|
||||
"typecheck": "tsc -b tsconfig.json",
|
||||
"test": "vitest"
|
||||
},
|
||||
"license": "MIT",
|
||||
|
@ -57,6 +58,7 @@
|
|||
"casbin": "^5.30.0",
|
||||
"publint": "^0.3.9",
|
||||
"tsup": "^8.4.0",
|
||||
"typescript": "^5.8.2",
|
||||
"vitest": "^3.0.8"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
|
||||
"emitDeclarationOnly": false
|
||||
},
|
||||
"include": ["./src/**/*.ts"],
|
||||
"references": []
|
||||
}
|
|
@ -1,6 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"exactOptionalPropertyTypes": true
|
||||
}
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.build.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.spec.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc/packages/casbin",
|
||||
"types": ["vitest/globals"]
|
||||
},
|
||||
"include": ["**/*.test.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.build.json"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
"name": "@hono/class-validator",
|
||||
"packageManager": "yarn@4.0.2",
|
||||
"description": "Validator middleware using class-validator",
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
|
@ -24,8 +23,9 @@
|
|||
],
|
||||
"scripts": {
|
||||
"build": "tsup ./src/index.ts",
|
||||
"prepack": "yarn build",
|
||||
"prepack": "bun run build",
|
||||
"publint": "attw --pack && publint",
|
||||
"typecheck": "tsc -b tsconfig.json",
|
||||
"test": "vitest"
|
||||
},
|
||||
"license": "MIT",
|
||||
|
@ -46,6 +46,7 @@
|
|||
"@arethetypeswrong/cli": "^0.17.4",
|
||||
"publint": "^0.3.9",
|
||||
"tsup": "^8.4.0",
|
||||
"typescript": "^5.8.2",
|
||||
"vitest": "^3.0.8"
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -53,4 +54,4 @@
|
|||
"class-validator": "^0.14.1",
|
||||
"reflect-metadata": "^0.2.2"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,6 +3,7 @@ import type { ValidationError } from 'class-validator'
|
|||
import { IsInt, IsString, ValidateNested } from 'class-validator'
|
||||
import { Hono } from 'hono'
|
||||
import type { ExtractSchema } from 'hono/types'
|
||||
import type { ContentfulStatusCode } from 'hono/utils/http-status'
|
||||
import type { Equal, Expect } from 'hono/utils/types'
|
||||
import { classValidator } from '.'
|
||||
|
||||
|
@ -39,6 +40,8 @@ describe('Basic', () => {
|
|||
success: boolean
|
||||
message: string
|
||||
}
|
||||
outputFormat: 'json'
|
||||
status: ContentfulStatusCode
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
|
||||
"emitDeclarationOnly": false
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["**/*.test.ts"],
|
||||
"references": []
|
||||
}
|
|
@ -1,8 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist",
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true
|
||||
}
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.build.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.spec.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc/packages/class-validator",
|
||||
"types": ["vitest/globals"]
|
||||
},
|
||||
"include": ["**/*.test.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.build.json"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"types": ["vitest/globals"],
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true
|
||||
}
|
||||
}
|
|
@ -4,7 +4,8 @@ export default defineProject({
|
|||
test: {
|
||||
globals: true,
|
||||
typecheck: {
|
||||
tsconfig: './tsconfig.vitest.json',
|
||||
tsconfig: './tsconfig.json',
|
||||
enabled: true,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
|
@ -11,8 +11,9 @@
|
|||
],
|
||||
"scripts": {
|
||||
"build": "tsup ./src/index.ts",
|
||||
"prepack": "yarn build",
|
||||
"prepack": "bun run build",
|
||||
"publint": "attw --pack && publint",
|
||||
"typecheck": "tsc -b tsconfig.json",
|
||||
"test": "vitest"
|
||||
},
|
||||
"exports": {
|
||||
|
@ -49,9 +50,10 @@
|
|||
"publint": "^0.3.9",
|
||||
"react": "^18.2.0",
|
||||
"tsup": "^8.4.0",
|
||||
"typescript": "^5.8.2",
|
||||
"vitest": "^3.0.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.x.x"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
|
||||
"emitDeclarationOnly": false
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["**/*.test.ts"],
|
||||
"references": []
|
||||
}
|
|
@ -1,7 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist",
|
||||
"types": ["vitest/globals"]
|
||||
}
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.build.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.spec.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc/packages/clerk-auth",
|
||||
"types": ["vitest/globals"]
|
||||
},
|
||||
"include": ["**/*.test.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.build.json"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -10,8 +10,9 @@
|
|||
],
|
||||
"scripts": {
|
||||
"build": "tsup ./src/index.ts",
|
||||
"prepack": "yarn build",
|
||||
"prepack": "bun run build",
|
||||
"publint": "attw --pack && publint",
|
||||
"typecheck": "tsc -b tsconfig.json",
|
||||
"test": "vitest"
|
||||
},
|
||||
"exports": {
|
||||
|
@ -42,9 +43,9 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@arethetypeswrong/cli": "^0.17.4",
|
||||
"@cloudflare/workers-types": "^4.20230307.0",
|
||||
"publint": "^0.3.9",
|
||||
"tsup": "^8.4.0",
|
||||
"typescript": "^5.8.2",
|
||||
"vitest": "^3.0.8"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
|
||||
"emitDeclarationOnly": false,
|
||||
"types": ["@cloudflare/workers-types"]
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["**/*.test.ts"],
|
||||
"references": []
|
||||
}
|
|
@ -1,7 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist",
|
||||
"types": ["@cloudflare/workers-types"]
|
||||
}
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.build.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.spec.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc/packages/cloudflare-access",
|
||||
"types": ["vitest/globals"]
|
||||
},
|
||||
"include": ["**/*.test.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.build.json"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -11,8 +11,9 @@
|
|||
],
|
||||
"scripts": {
|
||||
"build": "tsup ./src/index.ts",
|
||||
"prepack": "yarn build",
|
||||
"prepack": "bun run build",
|
||||
"publint": "attw --pack && publint",
|
||||
"typecheck": "tsc -b tsconfig.json",
|
||||
"test": "vitest"
|
||||
},
|
||||
"exports": {
|
||||
|
@ -50,9 +51,10 @@
|
|||
"conform-to-valibot": "^1.10.0",
|
||||
"publint": "^0.3.9",
|
||||
"tsup": "^8.4.0",
|
||||
"typescript": "^5.8.2",
|
||||
"valibot": "^0.36.0",
|
||||
"vitest": "^3.0.8",
|
||||
"yup": "^1.4.0",
|
||||
"zod": "^3.23.8"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -24,7 +24,7 @@ describe('Validate the hook option processing', () => {
|
|||
handlerMockFn
|
||||
)
|
||||
const client = hc<typeof route>('http://localhost', {
|
||||
fetch: (req, init) => {
|
||||
fetch: (req: RequestInfo | URL, init?: RequestInit) => {
|
||||
return app.request(req, init)
|
||||
},
|
||||
})
|
||||
|
|
|
@ -2,7 +2,7 @@ import { parseWithValibot } from 'conform-to-valibot'
|
|||
import { Hono } from 'hono'
|
||||
import { hc } from 'hono/client'
|
||||
import type { ExtractSchema, ParsedFormValue } from 'hono/types'
|
||||
import type { StatusCode } from 'hono/utils/http-status'
|
||||
import type { ContentfulStatusCode } from 'hono/utils/http-status'
|
||||
import type { Equal, Expect } from 'hono/utils/types'
|
||||
import * as v from 'valibot'
|
||||
import { conformValidator } from '.'
|
||||
|
@ -53,7 +53,7 @@ describe('Validate requests using a Valibot schema', () => {
|
|||
message: string
|
||||
}
|
||||
outputFormat: 'json'
|
||||
status: StatusCode
|
||||
status: ContentfulStatusCode
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ describe('Validate requests using a Valibot schema', () => {
|
|||
|
||||
it('Should return 200 response', async () => {
|
||||
const client = hc<typeof route>('http://localhost', {
|
||||
fetch: (req, init) => {
|
||||
fetch: (req: RequestInfo | URL, init?: RequestInit) => {
|
||||
return app.request(req, init)
|
||||
},
|
||||
})
|
||||
|
|
|
@ -2,7 +2,7 @@ import { parseWithYup } from '@conform-to/yup'
|
|||
import { Hono } from 'hono'
|
||||
import { hc } from 'hono/client'
|
||||
import type { ExtractSchema, ParsedFormValue } from 'hono/types'
|
||||
import type { StatusCode } from 'hono/utils/http-status'
|
||||
import type { ContentfulStatusCode } from 'hono/utils/http-status'
|
||||
import type { Equal, Expect } from 'hono/utils/types'
|
||||
import * as y from 'yup'
|
||||
import { conformValidator } from '.'
|
||||
|
@ -49,7 +49,7 @@ describe('Validate requests using a Yup schema', () => {
|
|||
message: string
|
||||
}
|
||||
outputFormat: 'json'
|
||||
status: StatusCode
|
||||
status: ContentfulStatusCode
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ describe('Validate requests using a Yup schema', () => {
|
|||
|
||||
it('Should return 200 response', async () => {
|
||||
const client = hc<typeof route>('http://localhost', {
|
||||
fetch: (req, init) => {
|
||||
fetch: (req: RequestInfo | URL, init?: RequestInit) => {
|
||||
return app.request(req, init)
|
||||
},
|
||||
})
|
||||
|
|
|
@ -2,7 +2,7 @@ import { parseWithZod } from '@conform-to/zod'
|
|||
import { Hono } from 'hono'
|
||||
import { hc } from 'hono/client'
|
||||
import type { ExtractSchema, ParsedFormValue } from 'hono/types'
|
||||
import type { StatusCode } from 'hono/utils/http-status'
|
||||
import type { ContentfulStatusCode } from 'hono/utils/http-status'
|
||||
import type { Equal, Expect } from 'hono/utils/types'
|
||||
import * as z from 'zod'
|
||||
import { conformValidator } from '.'
|
||||
|
@ -49,7 +49,7 @@ describe('Validate requests using a Zod schema', () => {
|
|||
message: string
|
||||
}
|
||||
outputFormat: 'json'
|
||||
status: StatusCode
|
||||
status: ContentfulStatusCode
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ describe('Validate requests using a Zod schema', () => {
|
|||
|
||||
it('Should return 200 response', async () => {
|
||||
const client = hc<typeof route>('http://localhost', {
|
||||
fetch: (req, init) => {
|
||||
fetch: (req: RequestInfo | URL, init?: RequestInit) => {
|
||||
return app.request(req, init)
|
||||
},
|
||||
})
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
|
||||
"emitDeclarationOnly": false
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["**/*.test.ts"],
|
||||
"references": []
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"module": "CommonJS",
|
||||
"declaration": false,
|
||||
"outDir": "./dist/cjs"
|
||||
}
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"module": "ESNext",
|
||||
"declaration": true,
|
||||
"outDir": "./dist/esm"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist"
|
||||
}
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.build.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.spec.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc/packages/conform-validator",
|
||||
"types": ["vitest/globals"]
|
||||
},
|
||||
"include": ["**/*.test.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.build.json"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -23,8 +23,9 @@
|
|||
],
|
||||
"scripts": {
|
||||
"build": "tsup ./src/index.ts",
|
||||
"prepack": "yarn build",
|
||||
"prepack": "bun run build",
|
||||
"publint": "attw --pack && publint",
|
||||
"typecheck": "tsc -b tsconfig.json",
|
||||
"test": "vitest"
|
||||
},
|
||||
"license": "MIT",
|
||||
|
@ -47,6 +48,7 @@
|
|||
"effect": "3.10.0",
|
||||
"publint": "^0.3.9",
|
||||
"tsup": "^8.4.0",
|
||||
"typescript": "^5.8.2",
|
||||
"vitest": "^3.0.8"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
import { Schema as S } from 'effect'
|
||||
import { Hono } from 'hono'
|
||||
import type { StatusCode } from 'hono/utils/http-status'
|
||||
import type { ContentfulStatusCode } from 'hono/utils/http-status'
|
||||
import type { Equal, Expect } from 'hono/utils/types'
|
||||
import { effectValidator } from '.'
|
||||
|
||||
|
@ -59,7 +59,7 @@ describe('Basic', () => {
|
|||
queryName: string | undefined
|
||||
}
|
||||
outputFormat: 'json'
|
||||
status: StatusCode
|
||||
status: ContentfulStatusCode
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ describe('coerce', () => {
|
|||
page: number
|
||||
}
|
||||
outputFormat: 'json'
|
||||
status: StatusCode
|
||||
status: ContentfulStatusCode
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
|
||||
"emitDeclarationOnly": false
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["**/*.test.ts"],
|
||||
"references": []
|
||||
}
|
|
@ -1,6 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"exactOptionalPropertyTypes": true
|
||||
}
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.build.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.spec.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc/packages/effect-validator",
|
||||
"types": ["vitest/globals"]
|
||||
},
|
||||
"include": ["**/*.test.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.build.json"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -10,8 +10,9 @@
|
|||
],
|
||||
"scripts": {
|
||||
"build": "tsup ./src/*.ts ./src/transpilers/*.ts --no-splitting --external esbuild-wasm,esbuild",
|
||||
"prepack": "yarn build",
|
||||
"prepack": "bun run build",
|
||||
"publint": "attw --pack && publint",
|
||||
"typecheck": "tsc -b tsconfig.json",
|
||||
"test": "vitest"
|
||||
},
|
||||
"exports": {
|
||||
|
@ -76,9 +77,10 @@
|
|||
"esbuild-wasm": "^0.19.5",
|
||||
"publint": "^0.3.9",
|
||||
"tsup": "^8.4.0",
|
||||
"typescript": "^5.8.2",
|
||||
"vitest": "^3.0.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.14.1"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
|
||||
"emitDeclarationOnly": false
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["**/*.test.ts"],
|
||||
"references": []
|
||||
}
|
|
@ -1,6 +1,13 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"skipLibCheck": false
|
||||
}
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.build.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.spec.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue