@tanstack/router-generator
Advanced tools
Comparing version 1.19.6 to 1.20.0
@@ -5,2 +5,3 @@ import { z } from 'zod'; | ||
routeFileIgnorePrefix: z.ZodDefault<z.ZodOptional<z.ZodString>>; | ||
routeFileIgnorePattern: z.ZodOptional<z.ZodString>; | ||
routesDirectory: z.ZodDefault<z.ZodOptional<z.ZodString>>; | ||
@@ -21,5 +22,7 @@ generatedRouteTree: z.ZodDefault<z.ZodOptional<z.ZodString>>; | ||
routeFilePrefix?: string | undefined; | ||
routeFileIgnorePattern?: string | undefined; | ||
}, { | ||
routeFilePrefix?: string | undefined; | ||
routeFileIgnorePrefix?: string | undefined; | ||
routeFileIgnorePattern?: string | undefined; | ||
routesDirectory?: string | undefined; | ||
@@ -26,0 +29,0 @@ generatedRouteTree?: string | undefined; |
@@ -7,2 +7,3 @@ import path from "path"; | ||
routeFileIgnorePrefix: z.string().optional().default("-"), | ||
routeFileIgnorePattern: z.string().optional(), | ||
routesDirectory: z.string().optional().default("./src/routes"), | ||
@@ -9,0 +10,0 @@ generatedRouteTree: z.string().optional().default("./src/routeTree.gen.ts"), |
@@ -10,4 +10,5 @@ import path from "path"; | ||
async function getRouteNodes(config) { | ||
const { routeFilePrefix, routeFileIgnorePrefix } = config; | ||
const { routeFilePrefix, routeFileIgnorePrefix, routeFileIgnorePattern } = config; | ||
const logger = logging({ disabled: config.disableLogging }); | ||
const routeFileIgnoreRegExp = new RegExp(routeFileIgnorePattern ?? "", "g"); | ||
let routeNodes = []; | ||
@@ -24,2 +25,5 @@ async function recurse(dir) { | ||
} | ||
if (routeFileIgnorePattern) { | ||
return !d.name.match(routeFileIgnoreRegExp); | ||
} | ||
return true; | ||
@@ -26,0 +30,0 @@ }); |
{ | ||
"name": "@tanstack/router-generator", | ||
"version": "1.19.6", | ||
"version": "1.20.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "author": "Tanner Linsley", |
@@ -8,2 +8,3 @@ import path from 'path' | ||
routeFileIgnorePrefix: z.string().optional().default('-'), | ||
routeFileIgnorePattern: z.string().optional(), | ||
routesDirectory: z.string().optional().default('./src/routes'), | ||
@@ -10,0 +11,0 @@ generatedRouteTree: z.string().optional().default('./src/routeTree.gen.ts'), |
@@ -37,4 +37,6 @@ import path from 'path' | ||
async function getRouteNodes(config: Config) { | ||
const { routeFilePrefix, routeFileIgnorePrefix } = config | ||
const { routeFilePrefix, routeFileIgnorePrefix, routeFileIgnorePattern } = | ||
config | ||
const logger = logging({ disabled: config.disableLogging }) | ||
const routeFileIgnoreRegExp = new RegExp(routeFileIgnorePattern ?? '', 'g') | ||
@@ -59,2 +61,6 @@ let routeNodes: RouteNode[] = [] | ||
if (routeFileIgnorePattern) { | ||
return !d.name.match(routeFileIgnoreRegExp) | ||
} | ||
return true | ||
@@ -61,0 +67,0 @@ }) |
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
166729
2150