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
22 changes: 0 additions & 22 deletions .zed/tasks.json

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/clean.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ removeMultiple(
'./src/lib/generated',
'./build',
'.svelte-kit',
'.netlify/functions-internal',
'.netlify',
'./static/pagefind',
// Our L10N generated files (keep old dir for migration compatibility)
'./src/temp/translations',
Expand Down
1 change: 1 addition & 0 deletions src/lib/components/TallyEmbed.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
frameborder="0"
marginheight="0"
marginwidth="0"
title="Tally Form"
allowfullscreen
style="width: 100%; height: {height}px; border: 0;"
sandbox="allow-forms allow-modals allow-orientation-lock allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts allow-top-navigation"
Expand Down
30 changes: 30 additions & 0 deletions src/routes/api/simple-delay/+server.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
export async function GET({ url }) {
const delay = url.searchParams.get('delay') || '1'
const start = Date.now()

try {
const response = await fetch(`https://httpbin.org/delay/${delay}`)
const elapsed = Date.now() - start

return new Response(
JSON.stringify({
requestedDelay: delay,
elapsedMs: elapsed,
status: response.status
}),
{
headers: { 'content-type': 'application/json' }
}
)
} catch (error) {
return new Response(
JSON.stringify({
error: error instanceof Error ? error.message : String(error),
elapsedMs: Date.now() - start
}),
{
headers: { 'content-type': 'application/json' }
}
)
}
}
48 changes: 48 additions & 0 deletions src/routes/api/test-timeout/+server.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
export async function GET({ url }) {
const count = parseInt(url.searchParams.get('count') || '4')
const delay = parseInt(url.searchParams.get('delay') || '10')
const start = Date.now()
const results = []

console.log(`Starting ${count} sequential requests with ${delay}s delay each`)

for (let i = 0; i < count; i++) {
const reqStart = Date.now()
try {
const response = await fetch(`https://httpbin.org/delay/${delay}`)
const data = await response.json()
results.push({
index: i,
success: true,
elapsed: Date.now() - reqStart,
status: response.status
})
} catch (error) {
results.push({
index: i,
success: false,
elapsed: Date.now() - reqStart,
error: error instanceof Error ? error.message : String(error)
})
break // Stop on first error
}
}

const totalElapsed = Date.now() - start

return new Response(
JSON.stringify(
{
requestedTotal: count * delay,
actualTotal: Math.round(totalElapsed / 1000),
totalElapsedMs: totalElapsed,
results
},
null,
2
),
{
headers: { 'content-type': 'application/json' }
}
)
}
Loading