Skip to content

Commit 95eee8f

Browse files
fix: cleanup builder directories (#319)
* fix: add sveltekit server routes to builder * fix: remove root workflow dir check * fix missing root level workflow route * Fix: The constructor now hardcodes `dirs: ['src/routes', 'src/lib']` which silently ignores any user\-provided `dirs` option passed to the plugin\, breaking the documented API and removing support for custom workflow directories\. * Fix: The test expectations don\'t match the new implementation of `getWorkflowDirs()`\. The mock provides `scanDirs` which the new code no longer uses\, and the new implementation adds scanning of `routesDir` and `apiDir` instead\. * fix(nitro): use src dir --------- Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com> Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
1 parent 767ec2c commit 95eee8f

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

packages/sveltekit/src/builder.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -228,24 +228,3 @@ export const OPTIONS = createSvelteKitHandler('OPTIONS');`,
228228
}
229229
}
230230
}
231-
232-
/**
233-
* Gets the list of directories to scan for workflow files.
234-
*/
235-
export function getWorkflowDirs(options?: { dirs?: string[] }): string[] {
236-
return unique([
237-
// User-provided directories take precedence
238-
...(options?.dirs ?? []),
239-
// Scan routes directories (like Next.js does with app/pages directories)
240-
// This allows workflows to be placed anywhere in the routes tree
241-
"routes",
242-
"src/routes",
243-
// Also scan dedicated workflow directories for organization
244-
"workflows",
245-
"src/workflows",
246-
]).sort();
247-
}
248-
249-
function unique<T>(array: T[]): T[] {
250-
return Array.from(new Set(array));
251-
}

0 commit comments

Comments
 (0)