Skip to content

Commit 7302aeb

Browse files
authored
Merge branch 'main' into 218-a11y-form-fields
2 parents f78d79b + 867aa8e commit 7302aeb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1363
-3186
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,7 @@ build
4848
.cache
4949

5050
# macOS
51-
.DS_Store
51+
.DS_Store
52+
53+
# React Router
54+
.react-router/

api/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"license": "ISC",
1515
"description": "",
1616
"dependencies": {
17-
"@hono/zod-validator": "^0.7.3",
17+
"@hono/zod-validator": "^0.7.5",
1818
"@interledger/open-payments": "^7.1.3",
1919
"@noble/ed25519": "^3.0.0",
2020
"@paralleldrive/cuid2": "^2.2.2",
@@ -24,14 +24,14 @@
2424
"hono": "^4.9.8",
2525
"http-message-signatures": "^1.0.4",
2626
"httpbis-digest-headers": "^1.0.0",
27-
"zod": "^3.25.76"
27+
"zod": "^4.1.13"
2828
},
2929
"types": "./src/types.ts",
3030
"devDependencies": {
3131
"@cloudflare/workers-types": "^4.20251011.0",
3232
"@shared/defines": "workspace:^",
3333
"@shared/types": "workspace:^",
34-
"typescript": "5.9.2",
34+
"typescript": "5.9.3",
3535
"wrangler": "^4.40.0"
3636
}
3737
}

api/src/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ app.onError((error, c) => {
4646
message: 'Validation failed',
4747
code: 'VALIDATION_ERROR',
4848
details: {
49-
issues: error.errors.map((err) => ({
49+
issues: error.issues.map((err) => ({
5050
path: err.path.join('.'),
5151
message: err.message,
5252
code: err.code

api/src/routes/get-config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { zValidator } from '@hono/zod-validator'
22
import { HTTPException } from 'hono/http-exception'
3-
import { z } from 'zod'
3+
import z from 'zod'
44
import { ConfigStorageService } from '@shared/config-storage-service'
55
import { AWS_PREFIX } from '@shared/defines'
66
import { PRESET_IDS, TOOLS } from '@shared/types'
@@ -26,7 +26,7 @@ app.get(
2626
zValidator(
2727
'query',
2828
z.object({
29-
wa: z.string().url(),
29+
wa: z.url(),
3030
preset: z.enum(PRESET_IDS)
3131
})
3232
),

api/src/routes/probabilistic-revshare.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { HTTPException } from 'hono/http-exception'
22
import { zValidator } from '@hono/zod-validator'
3-
import { z } from 'zod'
3+
import z from 'zod'
44
import type { ContentfulStatusCode } from 'hono/utils/http-status'
55
import type { WalletAddress } from '@interledger/open-payments'
66
import { decode, pickWeightedRandom } from '@shared/probabilistic-revenue-share'
@@ -14,7 +14,7 @@ app.get(
1414
zValidator(
1515
'param',
1616
z.object({
17-
payload: z.string().base64url().max(50_000).min(20)
17+
payload: z.base64url().max(50_000).min(20)
1818
})
1919
),
2020
async ({ req, json }) => {

api/src/schemas/payment.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import * as z from 'zod/v4'
1+
import z from 'zod'
22

33
export const PaymentQuoteSchema = z.object({
4-
senderWalletAddress: z.string().url('Invalid sender wallet address'),
5-
receiverWalletAddress: z.string().url('Invalid receiver wallet address'),
4+
senderWalletAddress: z.url('Invalid sender wallet address'),
5+
receiverWalletAddress: z.url('Invalid receiver wallet address'),
66
amount: z.number().positive('Amount must be positive'),
77
note: z.string().optional()
88
})
@@ -35,11 +35,11 @@ export const PaymentFinalizeSchema = z.object({
3535
walletAddress: WalletAddressSchema,
3636
pendingGrant: z.object({
3737
interact: z.object({
38-
redirect: z.string().url(),
38+
redirect: z.url(),
3939
finish: z.string()
4040
}),
4141
continue: z.object({
42-
uri: z.string().url(),
42+
uri: z.url(),
4343
access_token: z.object({
4444
value: z.string()
4545
}),
@@ -48,18 +48,18 @@ export const PaymentFinalizeSchema = z.object({
4848
}),
4949
quote: z.object({
5050
id: z.string(),
51-
walletAddress: z.string().url('Invalid wallet address'),
52-
receiver: z.string().url(),
51+
walletAddress: z.url('Invalid wallet address'),
52+
receiver: z.url(),
5353
receiveAmount: AmountSchema,
5454
debitAmount: AmountSchema,
5555
method: z.literal('ilp'),
56-
createdAt: z.string().datetime(),
57-
expiresAt: z.string().datetime().optional()
56+
createdAt: z.iso.datetime(),
57+
expiresAt: z.iso.datetime().optional()
5858
}),
5959
incomingPaymentGrant: z.object({
6060
access_token: z.object({
6161
value: z.string(),
62-
manage: z.string().url(),
62+
manage: z.url(),
6363
expires_in: z.number().int(),
6464
access: z.array(
6565
z.object({
@@ -73,7 +73,7 @@ export const PaymentFinalizeSchema = z.object({
7373
access_token: z.object({
7474
value: z.string()
7575
}),
76-
uri: z.string().url(),
76+
uri: z.url(),
7777
wait: z.number().int().optional()
7878
})
7979
}),

api/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type {
44
PaymentQuoteSchema,
55
WalletAddressParamSchema
66
} from './schemas/payment.js'
7-
import type { z } from 'zod/v4'
7+
import type z from 'zod'
88

99
export type PaymentStatusSuccess = {
1010
paymentId: string

cdn/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"directory-tree": "^3.5.2",
2323
"esbuild": "0.25.10",
2424
"esbuild-plugin-copy": "^2.1.1",
25-
"typescript": "^5.9.2",
25+
"typescript": "^5.9.3",
2626
"wrangler": "^4.40.0"
2727
}
2828
}

components/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
"lit": "^3.3.1"
1414
},
1515
"devDependencies": {
16-
"@shared/types": "workspace:^",
1716
"@interledger/open-payments": "^7.1.3",
17+
"@shared/types": "workspace:^",
1818
"publisher-tools-api": "workspace:^",
19-
"typescript": "^5.9.2",
19+
"typescript": "^5.9.3",
2020
"vite": "^5.4.20"
2121
},
2222
"scripts": {

eslint.config.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export default [
1616
pluginJs.configs.recommended,
1717
...tseslint.configs.recommended,
1818
{
19+
files: ['frontend/**/*.{ts,tsx}', 'components/**/*.{ts,tsx}'],
1920
...pluginReact.configs.flat.recommended,
2021
settings: {
2122
react: {
@@ -40,6 +41,13 @@ export default [
4041
}
4142
},
4243
{
43-
ignores: ['**/node_modules/', '**/dist/', '**/build/', '**/public/init.js']
44+
ignores: [
45+
'**/node_modules/',
46+
'**/dist/',
47+
'**/build/',
48+
'**/public/init.js',
49+
'**/.react-router/',
50+
'**/.wrangler/'
51+
]
4452
}
4553
]

0 commit comments

Comments
 (0)