@tanstack/router-generator
Advanced tools
Comparing version 1.28.2 to 1.30.0
@@ -13,2 +13,4 @@ import { z } from 'zod'; | ||
disableLogging: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
routeTreeFileHeader: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>; | ||
routeTreeFileFooter: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>; | ||
}, "strip", z.ZodTypeAny, { | ||
@@ -23,2 +25,4 @@ routeFileIgnorePrefix: string; | ||
disableLogging: boolean; | ||
routeTreeFileHeader: string[]; | ||
routeTreeFileFooter: string[]; | ||
routeFilePrefix?: string | undefined; | ||
@@ -37,4 +41,6 @@ routeFileIgnorePattern?: string | undefined; | ||
disableLogging?: boolean | undefined; | ||
routeTreeFileHeader?: string[] | undefined; | ||
routeTreeFileFooter?: string[] | undefined; | ||
}>; | ||
export type Config = z.infer<typeof configSchema>; | ||
export declare function getConfig(inlineConfig?: Partial<Config>, configDirectory?: string): Promise<Config>; |
@@ -14,3 +14,10 @@ import path from "path"; | ||
addExtensions: z.boolean().optional().default(false), | ||
disableLogging: z.boolean().optional().default(false) | ||
disableLogging: z.boolean().optional().default(false), | ||
routeTreeFileHeader: z.array(z.string()).optional().default([ | ||
"/* prettier-ignore-start */", | ||
"/* eslint-disable */", | ||
"// @ts-nocheck", | ||
"// noinspection JSUnusedGlobalSymbols" | ||
]), | ||
routeTreeFileFooter: z.array(z.string()).optional().default(["/* prettier-ignore-end */"]) | ||
}); | ||
@@ -17,0 +24,0 @@ async function getConfig(inlineConfig = {}, configDirectory) { |
@@ -324,6 +324,3 @@ import path from "path"; | ||
const routeImports = [ | ||
"/* prettier-ignore-start */", | ||
"/* eslint-disable */", | ||
"// @ts-nocheck", | ||
"// noinspection JSUnusedGlobalSymbols", | ||
...config.routeTreeFileHeader, | ||
"// This file is auto-generated by TanStack Router", | ||
@@ -432,3 +429,3 @@ imports.length ? `import { ${imports.join(", ")} } from '@tanstack/react-router' | ||
`export const routeTree = rootRoute.addChildren([${routeConfigChildrenText}])`, | ||
"/* prettier-ignore-end */" | ||
...config.routeTreeFileFooter | ||
].filter(Boolean).join("\n\n"); | ||
@@ -435,0 +432,0 @@ const routeConfigFileContent = await prettier.format(routeImports, { |
{ | ||
"name": "@tanstack/router-generator", | ||
"version": "1.28.2", | ||
"version": "1.30.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "author": "Tanner Linsley", |
@@ -16,2 +16,15 @@ import path from 'path' | ||
disableLogging: z.boolean().optional().default(false), | ||
routeTreeFileHeader: z | ||
.array(z.string()) | ||
.optional() | ||
.default([ | ||
'/* prettier-ignore-start */', | ||
'/* eslint-disable */', | ||
'// @ts-nocheck', | ||
'// noinspection JSUnusedGlobalSymbols', | ||
]), | ||
routeTreeFileFooter: z | ||
.array(z.string()) | ||
.optional() | ||
.default(['/* prettier-ignore-end */']), | ||
}) | ||
@@ -18,0 +31,0 @@ |
@@ -460,6 +460,3 @@ import path from 'path' | ||
const routeImports = [ | ||
'/* prettier-ignore-start */', | ||
'/* eslint-disable */', | ||
'// @ts-nocheck', | ||
'// noinspection JSUnusedGlobalSymbols', | ||
...config.routeTreeFileHeader, | ||
'// This file is auto-generated by TanStack Router', | ||
@@ -607,3 +604,3 @@ imports.length | ||
`export const routeTree = rootRoute.addChildren([${routeConfigChildrenText}])`, | ||
'/* prettier-ignore-end */', | ||
...config.routeTreeFileFooter, | ||
] | ||
@@ -610,0 +607,0 @@ .filter(Boolean) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
168917
2161