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
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ interface ApplicationStarterSearchParams {
template?: string // template preset ID
features?: string // comma-separated feature IDs
pm?: string // package manager: pnpm, npm, yarn, bun
tailwind?: string
tailwind?: 'false' | true
// Feature options serialized as: featureId.optionKey=value
[key: string]: string | undefined
[key: string]: string | boolean | undefined
}

export function useApplicationStarterUrl() {
Expand Down
2 changes: 1 addition & 1 deletion src/routes/application-starter.index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const applicationStarterSearchSchema = v.pipe(
framework: v.optional(v.string()),
features: v.optional(v.string()), // comma-separated feature IDs
pm: v.optional(v.picklist(['pnpm', 'npm', 'yarn', 'bun'])),
tailwind: v.optional(v.literal('false')),
tailwind: v.optional(v.union([v.literal('false'), v.literal(true)])),
tab: v.optional(v.picklist(['summary', 'code', 'preview'])),
file: v.optional(v.string()), // selected file in files tab
addon: v.optional(v.string()), // selected addon in addons tab
Expand Down
2 changes: 1 addition & 1 deletion tests/application-starter-search.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ test('application starter preserves optional fields and custom feature options',
},
...['pnpm', 'npm', 'yarn', 'bun'].map((pm) => ({ pm })),
...['summary', 'code', 'preview'].map((tab) => ({ tab })),
{ tailwind: true },
]) {
const result = await standardSchema.validate(input)
assert.equal(result.issues, undefined)
Expand All @@ -41,7 +42,6 @@ test('application starter rejects invalid known fields instead of coercing them'
[],
'name=app',
{ pm: 'deno' },
{ tailwind: true },
{ tailwind: 'true' },
{ tab: 'unknown' },
...[
Expand Down
Loading