Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 24
- name: Install dependencies
run: npm ci
- name: Run checks
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion api/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { VercelRequest, VercelResponse } from '@vercel/node'
import PKPassGenerator from 'passkit-generator'
import { join } from 'path'

import * as certs from './certs.enc.js'
import * as certs from './certs.js'
import { decrypt } from '../lib/encryption.js'

const { PKPass } = PKPassGenerator
Expand Down
5 changes: 0 additions & 5 deletions jest.config.cjs

This file was deleted.

1 change: 1 addition & 0 deletions lib/encryption.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, it, expect } from 'vitest'
import { encrypt, decrypt } from './encryption'

describe('encryption', () => {
Expand Down
46,458 changes: 17,738 additions & 28,720 deletions package-lock.json

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,44 +10,44 @@
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"build": "tsc && vite build",
"serve": "vite preview",
"test": "jest",
"test": "vitest",
"encrypt-certs": "tsx tools/encrypt-certs.ts"
},
"dependencies": {
"@iconify-json/fa-brands": "^1.0.2",
"@iconify-json/fa-solid": "^1.0.2",
"@svgr/core": "^5.5.0",
"@types/jest": "^27.0.3",
"@types/node": "^16.11.12",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@typescript-eslint/eslint-plugin": "^5.59.8",
"@typescript-eslint/parser": "^5.59.8",
"@vercel/node": "^2.14.5",
"@vercel/node": "5.6.16",
"@vitejs/plugin-react": "^1.1.1",
"eslint": "^8.42.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.32.2",
"jest": "^29.5.0",
"passkit-generator": "^3.1.9",
"query-string": "^7.0.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-ga4": "^1.4.1",
"react-qr-code": "^2.0.3",
"react-router-dom": "^6.2.1",
"ts-jest": "^29.1.0",
"typescript": "^4.5.2",
"unplugin-icons": "^0.12.23",
"vercel": "^30.1.0",
"vite": "^2.7.0",
"vite-plugin-windicss": "^1.5.4",
"windicss": "^3.2.1"
"typescript": "5.9.3"
},
"devDependencies": {
"tsx": "^4.19.2"
"@iconify-json/fa-brands": "1.2.2",
"@iconify-json/fa-solid": "1.2.2",
"@svgr/core": "8.1.0",
"@svgr/plugin-jsx": "8.1.0",
"@tailwindcss/forms": "0.5.11",
"@types/node": "25.5.0",
"tsx": "4.21.0",
"unplugin-icons": "23.0.1",
"vercel": "50.33.0",
"vite": "7.3.1",
"vite-plugin-windicss": "1.9.4",
"vitest": "4.1.0",
"windicss": "3.5.6"
}
}
4 changes: 2 additions & 2 deletions tools/encrypt-certs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const signerKey = readFileSync(join(__dirname, 'pass.run.dfyb.key'))
const signerKeyEncrypted = encrypt(signerKey, key)
output += `export const signerKey = '${signerKeyEncrypted.data}'\n`

writeFileSync(join(__dirname, '..', 'api', 'certs.enc.js'), output)
writeFileSync(join(__dirname, '..', 'api', 'certs.ts'), output)

console.log('Successfully encrypted to /pass-models/certs.enc.json')
console.log('Successfully encrypted to /pass-models/certs.ts')
console.log('The following encryption key will only be shown once - make sure to copy it')
console.log(`Key: ${key.toString('base64')}`)
27 changes: 10 additions & 17 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
{
"compilerOptions": {
"target": "esnext",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"jsx": "react-jsx",
"module": "esnext",
"moduleResolution": "node",
"moduleResolution": "bundler",
"noEmit": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
Expand All @@ -22,13 +14,14 @@
"strict": true,
"types": [
"node",
"jest",
"unplugin-icons/types/react"
],
"useDefineForClassFields": true
]
},
"include": ["./**/*", ".*"],
"ts-node": {
"esm": true
}
}
"include": [
"api",
"lib",
"tools",
"web",
"vite.config.ts"
],
}
9 changes: 6 additions & 3 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import React from '@vitejs/plugin-react'
import Icons from 'unplugin-icons/vite'
import { defineConfig } from 'vite'
import { defineConfig } from 'vitest/config'
import WindiCSS from 'vite-plugin-windicss'

export default defineConfig({
root: 'web',
root: process.env.VITEST ? '.' : 'web',
plugins: [
React(),
Icons({ compiler: 'jsx', jsx: 'react' }),
WindiCSS()
],
publicDir: './assets'
publicDir: './assets',
test: {
include: ['**/*.test.{ts,tsx}']
}
})
2 changes: 1 addition & 1 deletion web/windi.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default defineConfig({
secondary: '#ECD95F',
warning: '#D36525',
success: '#59C9A5',
gray: colors.trueGray
gray: colors.neutral
},
fontFamily: {
header: ['"Barlow Semi Condensed"', 'sans-serif']
Expand Down
16 changes: 16 additions & 0 deletions web/windicss-fix.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
declare module 'windicss/colors' {
interface ColorScale {
[key: string | number]: string
}

interface WindiColors {
[key: string]: string | ColorScale
}

const colors: WindiColors
export default colors
}

declare module 'windicss/helpers' {
export function defineConfig(config: object): object
}
Loading