Skip to content

Commit

Permalink
🐛 Fix types-checking
Browse files Browse the repository at this point in the history
  • Loading branch information
cermakjiri committed Nov 28, 2024
1 parent ad76efb commit e34fc49
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 10 deletions.
3 changes: 0 additions & 3 deletions .env
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# just for storage, only used manully
VERCEL_TOKEN=jHo8acroWcT3NjbOqT70DIZz

# Each demo has separate origin due to relying party restrictions (https://webauthn.wtf/how-it-works/relying-party)
NEXT_PUBLIC_DEFAULT_EXAMPLE_ORIGIN="http://localhost:3000"
NEXT_PUBLIC_UPGRADE_EXAMPLE_ORIGIN="http://localhost:3001"
6 changes: 4 additions & 2 deletions examples/webauthn-default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "next dev --turbopack -p 3000",
"types-check": "tsc --noEmit -w",
"dev": "next dev --turbopack -p 3000 & yarn types-check",
"build": "next build",
"start": "next start -p 3000",
"lint": "eslint-lint --config=eslint.config.mjs ./src/**/*.{ts,tsx}",
Expand All @@ -16,7 +17,8 @@
"@workspace/sentry": "workspace:*",
"next": "15.0.3",
"react": "18.3.1",
"react-dom": "18.3.1"
"react-dom": "18.3.1",
"typescript": "5.7.2"
},
"devDependencies": {
"@tooling/eslint": "workspace:*",
Expand Down
6 changes: 4 additions & 2 deletions examples/webauthn-upgrade/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "next dev --turbopack -p 3001",
"types-check": "tsc --noEmit -w",
"dev": "next dev --turbopack -p 3001 & yarn types-check",
"build": "next build",
"start": "next start -p 3001",
"lint": "eslint-lint --config=eslint.config.mjs ./src/**/*.{ts,tsx}",
Expand All @@ -16,7 +17,8 @@
"@workspace/sentry": "workspace:*",
"next": "15.0.3",
"react": "18.3.1",
"react-dom": "18.3.1"
"react-dom": "18.3.1",
"typescript": "5.7.2"
},
"devDependencies": {
"@tooling/eslint": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"scripts": {
"postinstall": "turbo telemetry disable",
"build": "turbo run build --parallel",
"build": "yarn workspace @workspace/common build && turbo run build --parallel",
"dev": "yarn workspace @workspace/common build && turbo run dev --concurrency 100%",
"cir-dep": "turbo run cir-dep --parallel",
"test:ci": "turbo run test:ci",
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"lint:fix": "yarn lint --fix",
"format": "prettier-format",
"cir-dep": "check-cir-deps .",
"build": "yarn clean && tsc && tsc-alias",
"build": "tsc && tsc-alias",
"clean": "rm -rf dist .cache",
"dev": "tsc -w & tsc-alias -w"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { deleteChallengeSession, getChallengeSession, setChallengeSession } from

export type InitializeChallengeSessionProps = {
timeout: number;
challenge: ArrayBuffer;
challenge: Uint8Array;
} & (
| {
type: 'attestation';
Expand Down Expand Up @@ -39,6 +39,7 @@ export async function initializeChallengeSession(
await setChallengeSession({
...restProps,
id: sessionId,
// @ts-ignore
challenge: bufferToBase64URLString(challenge),
expiresAt: expiresAt.toISOString(),
origin: env.NEXT_PUBLIC_CLIENT_ORIGIN,
Expand Down
2 changes: 2 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9862,6 +9862,7 @@ __metadata:
next: "npm:15.0.3"
react: "npm:18.3.1"
react-dom: "npm:18.3.1"
typescript: "npm:5.7.2"
languageName: unknown
linkType: soft

Expand All @@ -9879,6 +9880,7 @@ __metadata:
next: "npm:15.0.3"
react: "npm:18.3.1"
react-dom: "npm:18.3.1"
typescript: "npm:5.7.2"
languageName: unknown
linkType: soft

Expand Down

0 comments on commit e34fc49

Please sign in to comment.