@tanstack/router-generator 1.121.16 → 1.121.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/package.json +4 -4
  2. package/dist/cjs/config.cjs +0 -140
  3. package/dist/cjs/config.cjs.map +0 -1
  4. package/dist/cjs/config.d.cts +0 -155
  5. package/dist/cjs/filesystem/physical/getRouteNodes.cjs +0 -204
  6. package/dist/cjs/filesystem/physical/getRouteNodes.cjs.map +0 -1
  7. package/dist/cjs/filesystem/physical/getRouteNodes.d.cts +0 -15
  8. package/dist/cjs/filesystem/physical/rootPathId.cjs +0 -5
  9. package/dist/cjs/filesystem/physical/rootPathId.cjs.map +0 -1
  10. package/dist/cjs/filesystem/physical/rootPathId.d.cts +0 -1
  11. package/dist/cjs/filesystem/virtual/config.cjs +0 -37
  12. package/dist/cjs/filesystem/virtual/config.cjs.map +0 -1
  13. package/dist/cjs/filesystem/virtual/config.d.cts +0 -3
  14. package/dist/cjs/filesystem/virtual/getRouteNodes.cjs +0 -192
  15. package/dist/cjs/filesystem/virtual/getRouteNodes.cjs.map +0 -1
  16. package/dist/cjs/filesystem/virtual/getRouteNodes.d.cts +0 -8
  17. package/dist/cjs/filesystem/virtual/loadConfigFile.cjs +0 -11
  18. package/dist/cjs/filesystem/virtual/loadConfigFile.cjs.map +0 -1
  19. package/dist/cjs/filesystem/virtual/loadConfigFile.d.cts +0 -1
  20. package/dist/cjs/generator.cjs +0 -970
  21. package/dist/cjs/generator.cjs.map +0 -1
  22. package/dist/cjs/generator.d.cts +0 -76
  23. package/dist/cjs/index.cjs +0 -35
  24. package/dist/cjs/index.cjs.map +0 -1
  25. package/dist/cjs/index.d.cts +0 -12
  26. package/dist/cjs/logger.cjs +0 -37
  27. package/dist/cjs/logger.cjs.map +0 -1
  28. package/dist/cjs/logger.d.cts +0 -10
  29. package/dist/cjs/plugin/default-generator-plugin.cjs +0 -101
  30. package/dist/cjs/plugin/default-generator-plugin.cjs.map +0 -1
  31. package/dist/cjs/plugin/default-generator-plugin.d.cts +0 -2
  32. package/dist/cjs/plugin/types.d.cts +0 -46
  33. package/dist/cjs/template.cjs +0 -110
  34. package/dist/cjs/template.cjs.map +0 -1
  35. package/dist/cjs/template.d.cts +0 -33
  36. package/dist/cjs/transform/default-transform-plugin.cjs +0 -95
  37. package/dist/cjs/transform/default-transform-plugin.cjs.map +0 -1
  38. package/dist/cjs/transform/default-transform-plugin.d.cts +0 -2
  39. package/dist/cjs/transform/transform.cjs +0 -374
  40. package/dist/cjs/transform/transform.cjs.map +0 -1
  41. package/dist/cjs/transform/transform.d.cts +0 -4
  42. package/dist/cjs/transform/types.d.cts +0 -43
  43. package/dist/cjs/transform/utils.cjs +0 -36
  44. package/dist/cjs/transform/utils.cjs.map +0 -1
  45. package/dist/cjs/transform/utils.d.cts +0 -2
  46. package/dist/cjs/types.d.cts +0 -47
  47. package/dist/cjs/utils.cjs +0 -438
  48. package/dist/cjs/utils.cjs.map +0 -1
  49. package/dist/cjs/utils.d.cts +0 -133
  50. package/dist/esm/config.d.ts +0 -155
  51. package/dist/esm/config.js +0 -140
  52. package/dist/esm/config.js.map +0 -1
  53. package/dist/esm/filesystem/physical/getRouteNodes.d.ts +0 -15
  54. package/dist/esm/filesystem/physical/getRouteNodes.js +0 -187
  55. package/dist/esm/filesystem/physical/getRouteNodes.js.map +0 -1
  56. package/dist/esm/filesystem/physical/rootPathId.d.ts +0 -1
  57. package/dist/esm/filesystem/physical/rootPathId.js +0 -5
  58. package/dist/esm/filesystem/physical/rootPathId.js.map +0 -1
  59. package/dist/esm/filesystem/virtual/config.d.ts +0 -3
  60. package/dist/esm/filesystem/virtual/config.js +0 -37
  61. package/dist/esm/filesystem/virtual/config.js.map +0 -1
  62. package/dist/esm/filesystem/virtual/getRouteNodes.d.ts +0 -8
  63. package/dist/esm/filesystem/virtual/getRouteNodes.js +0 -192
  64. package/dist/esm/filesystem/virtual/getRouteNodes.js.map +0 -1
  65. package/dist/esm/filesystem/virtual/loadConfigFile.d.ts +0 -1
  66. package/dist/esm/filesystem/virtual/loadConfigFile.js +0 -11
  67. package/dist/esm/filesystem/virtual/loadConfigFile.js.map +0 -1
  68. package/dist/esm/generator.d.ts +0 -76
  69. package/dist/esm/generator.js +0 -953
  70. package/dist/esm/generator.js.map +0 -1
  71. package/dist/esm/index.d.ts +0 -12
  72. package/dist/esm/index.js +0 -35
  73. package/dist/esm/index.js.map +0 -1
  74. package/dist/esm/logger.d.ts +0 -10
  75. package/dist/esm/logger.js +0 -37
  76. package/dist/esm/logger.js.map +0 -1
  77. package/dist/esm/plugin/default-generator-plugin.d.ts +0 -2
  78. package/dist/esm/plugin/default-generator-plugin.js +0 -101
  79. package/dist/esm/plugin/default-generator-plugin.js.map +0 -1
  80. package/dist/esm/plugin/types.d.ts +0 -46
  81. package/dist/esm/template.d.ts +0 -33
  82. package/dist/esm/template.js +0 -110
  83. package/dist/esm/template.js.map +0 -1
  84. package/dist/esm/transform/default-transform-plugin.d.ts +0 -2
  85. package/dist/esm/transform/default-transform-plugin.js +0 -95
  86. package/dist/esm/transform/default-transform-plugin.js.map +0 -1
  87. package/dist/esm/transform/transform.d.ts +0 -4
  88. package/dist/esm/transform/transform.js +0 -374
  89. package/dist/esm/transform/transform.js.map +0 -1
  90. package/dist/esm/transform/types.d.ts +0 -43
  91. package/dist/esm/transform/utils.d.ts +0 -2
  92. package/dist/esm/transform/utils.js +0 -36
  93. package/dist/esm/transform/utils.js.map +0 -1
  94. package/dist/esm/types.d.ts +0 -47
  95. package/dist/esm/utils.d.ts +0 -133
  96. package/dist/esm/utils.js +0 -420
  97. package/dist/esm/utils.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/router-generator",
3
- "version": "1.121.16",
3
+ "version": "1.121.17",
4
4
  "description": "Modern and scalable routing for React applications",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
@@ -54,12 +54,12 @@
54
54
  "source-map": "^0.7.4",
55
55
  "tsx": "^4.19.2",
56
56
  "zod": "^3.24.2",
57
- "@tanstack/router-utils": "^1.121.0",
57
+ "@tanstack/router-core": "^1.121.17",
58
58
  "@tanstack/virtual-file-routes": "^1.120.17",
59
- "@tanstack/router-core": "^1.121.16"
59
+ "@tanstack/router-utils": "^1.121.0"
60
60
  },
61
61
  "devDependencies": {
62
- "@tanstack/react-router": "^1.121.16"
62
+ "@tanstack/react-router": "^1.121.17"
63
63
  },
64
64
  "scripts": {}
65
65
  }
@@ -1,140 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const path = require("node:path");
4
- const node_fs = require("node:fs");
5
- const zod = require("zod");
6
- const config = require("./filesystem/virtual/config.cjs");
7
- const baseConfigSchema = zod.z.object({
8
- target: zod.z.enum(["react", "solid"]).optional().default("react"),
9
- virtualRouteConfig: config.virtualRootRouteSchema.or(zod.z.string()).optional(),
10
- routeFilePrefix: zod.z.string().optional(),
11
- routeFileIgnorePrefix: zod.z.string().optional().default("-"),
12
- routeFileIgnorePattern: zod.z.string().optional(),
13
- routesDirectory: zod.z.string().optional().default("./src/routes"),
14
- quoteStyle: zod.z.enum(["single", "double"]).optional().default("single"),
15
- semicolons: zod.z.boolean().optional().default(false),
16
- disableLogging: zod.z.boolean().optional().default(false),
17
- routeTreeFileHeader: zod.z.array(zod.z.string()).optional().default([
18
- "/* eslint-disable */",
19
- "// @ts-nocheck",
20
- "// noinspection JSUnusedGlobalSymbols"
21
- ]),
22
- indexToken: zod.z.string().optional().default("index"),
23
- routeToken: zod.z.string().optional().default("route"),
24
- pathParamsAllowedCharacters: zod.z.array(zod.z.enum([";", ":", "@", "&", "=", "+", "$", ","])).optional()
25
- });
26
- const configSchema = baseConfigSchema.extend({
27
- generatedRouteTree: zod.z.string().optional().default("./src/routeTree.gen.ts"),
28
- disableTypes: zod.z.boolean().optional().default(false),
29
- verboseFileRoutes: zod.z.boolean().optional(),
30
- addExtensions: zod.z.boolean().optional().default(false),
31
- enableRouteTreeFormatting: zod.z.boolean().optional().default(true),
32
- routeTreeFileFooter: zod.z.array(zod.z.string()).optional().default([]),
33
- autoCodeSplitting: zod.z.boolean().optional(),
34
- customScaffolding: zod.z.object({
35
- routeTemplate: zod.z.string().optional(),
36
- lazyRouteTemplate: zod.z.string().optional()
37
- }).optional(),
38
- experimental: zod.z.object({
39
- // TODO: This has been made stable and is now "autoCodeSplitting". Remove in next major version.
40
- enableCodeSplitting: zod.z.boolean().optional()
41
- }).optional(),
42
- plugins: zod.z.array(zod.z.custom()).optional(),
43
- tmpDir: zod.z.string().optional().default("")
44
- });
45
- function resolveConfigPath({ configDirectory }) {
46
- return path.resolve(configDirectory, "tsr.config.json");
47
- }
48
- function getConfig(inlineConfig = {}, configDirectory) {
49
- if (configDirectory === void 0) {
50
- configDirectory = process.cwd();
51
- }
52
- const configFilePathJson = resolveConfigPath({ configDirectory });
53
- const exists = node_fs.existsSync(configFilePathJson);
54
- let config2;
55
- if (exists) {
56
- config2 = configSchema.parse({
57
- ...JSON.parse(node_fs.readFileSync(configFilePathJson, "utf-8")),
58
- ...inlineConfig
59
- });
60
- } else {
61
- config2 = configSchema.parse(inlineConfig);
62
- }
63
- if (config2.disableTypes) {
64
- config2.generatedRouteTree = config2.generatedRouteTree.replace(
65
- /\.(ts|tsx)$/,
66
- ".js"
67
- );
68
- }
69
- if (configDirectory) {
70
- if (path.isAbsolute(configDirectory)) {
71
- config2.routesDirectory = path.resolve(
72
- configDirectory,
73
- config2.routesDirectory
74
- );
75
- config2.generatedRouteTree = path.resolve(
76
- configDirectory,
77
- config2.generatedRouteTree
78
- );
79
- } else {
80
- config2.routesDirectory = path.resolve(
81
- process.cwd(),
82
- configDirectory,
83
- config2.routesDirectory
84
- );
85
- config2.generatedRouteTree = path.resolve(
86
- process.cwd(),
87
- configDirectory,
88
- config2.generatedRouteTree
89
- );
90
- }
91
- }
92
- const resolveTmpDir = (dir) => {
93
- if (Array.isArray(dir)) {
94
- dir = path.join(...dir);
95
- }
96
- if (!path.isAbsolute(dir)) {
97
- dir = path.resolve(process.cwd(), dir);
98
- }
99
- node_fs.mkdirSync(dir, { recursive: true });
100
- return dir;
101
- };
102
- if (config2.tmpDir) {
103
- config2.tmpDir = resolveTmpDir(config2.tmpDir);
104
- } else if (process.env.TSR_TMP_DIR) {
105
- config2.tmpDir = resolveTmpDir(process.env.TSR_TMP_DIR);
106
- } else {
107
- config2.tmpDir = resolveTmpDir([".tanstack", "tmp"]);
108
- }
109
- validateConfig(config2);
110
- return config2;
111
- }
112
- function validateConfig(config2) {
113
- var _a;
114
- if (typeof ((_a = config2.experimental) == null ? void 0 : _a.enableCodeSplitting) !== "undefined") {
115
- const message = `
116
- ------
117
- ⚠️ ⚠️ ⚠️
118
- ERROR: The "experimental.enableCodeSplitting" flag has been made stable and is now "autoCodeSplitting". Please update your configuration file to use "autoCodeSplitting" instead of "experimental.enableCodeSplitting".
119
- ------
120
- `;
121
- console.error(message);
122
- throw new Error(message);
123
- }
124
- if (config2.indexToken === config2.routeToken) {
125
- throw new Error(
126
- `The "indexToken" and "routeToken" options must be different.`
127
- );
128
- }
129
- if (config2.routeFileIgnorePrefix && config2.routeFileIgnorePrefix.trim() === "_") {
130
- throw new Error(
131
- `The "routeFileIgnorePrefix" cannot be an underscore ("_"). This is a reserved character used to denote a pathless route. Please use a different prefix.`
132
- );
133
- }
134
- return config2;
135
- }
136
- exports.baseConfigSchema = baseConfigSchema;
137
- exports.configSchema = configSchema;
138
- exports.getConfig = getConfig;
139
- exports.resolveConfigPath = resolveConfigPath;
140
- //# sourceMappingURL=config.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.cjs","sources":["../../src/config.ts"],"sourcesContent":["import path from 'node:path'\nimport { existsSync, mkdirSync, readFileSync } from 'node:fs'\nimport { z } from 'zod'\nimport { virtualRootRouteSchema } from './filesystem/virtual/config'\nimport type { GeneratorPlugin } from './plugin/types'\n\nexport const baseConfigSchema = z.object({\n target: z.enum(['react', 'solid']).optional().default('react'),\n virtualRouteConfig: virtualRootRouteSchema.or(z.string()).optional(),\n routeFilePrefix: z.string().optional(),\n routeFileIgnorePrefix: z.string().optional().default('-'),\n routeFileIgnorePattern: z.string().optional(),\n routesDirectory: z.string().optional().default('./src/routes'),\n quoteStyle: z.enum(['single', 'double']).optional().default('single'),\n semicolons: z.boolean().optional().default(false),\n disableLogging: z.boolean().optional().default(false),\n routeTreeFileHeader: z\n .array(z.string())\n .optional()\n .default([\n '/* eslint-disable */',\n '// @ts-nocheck',\n '// noinspection JSUnusedGlobalSymbols',\n ]),\n indexToken: z.string().optional().default('index'),\n routeToken: z.string().optional().default('route'),\n pathParamsAllowedCharacters: z\n .array(z.enum([';', ':', '@', '&', '=', '+', '$', ',']))\n .optional(),\n})\n\nexport type BaseConfig = z.infer<typeof baseConfigSchema>\n\nexport const configSchema = baseConfigSchema.extend({\n generatedRouteTree: z.string().optional().default('./src/routeTree.gen.ts'),\n disableTypes: z.boolean().optional().default(false),\n verboseFileRoutes: z.boolean().optional(),\n addExtensions: z.boolean().optional().default(false),\n enableRouteTreeFormatting: z.boolean().optional().default(true),\n routeTreeFileFooter: z.array(z.string()).optional().default([]),\n autoCodeSplitting: z.boolean().optional(),\n customScaffolding: z\n .object({\n routeTemplate: z.string().optional(),\n lazyRouteTemplate: z.string().optional(),\n })\n .optional(),\n experimental: z\n .object({\n // TODO: This has been made stable and is now \"autoCodeSplitting\". Remove in next major version.\n enableCodeSplitting: z.boolean().optional(),\n })\n .optional(),\n plugins: z.array(z.custom<GeneratorPlugin>()).optional(),\n tmpDir: z.string().optional().default(''),\n})\n\nexport type Config = z.infer<typeof configSchema>\n\ntype ResolveParams = {\n configDirectory: string\n}\n\nexport function resolveConfigPath({ configDirectory }: ResolveParams) {\n return path.resolve(configDirectory, 'tsr.config.json')\n}\n\nexport function getConfig(\n inlineConfig: Partial<Config> = {},\n configDirectory?: string,\n): Config {\n if (configDirectory === undefined) {\n configDirectory = process.cwd()\n }\n const configFilePathJson = resolveConfigPath({ configDirectory })\n const exists = existsSync(configFilePathJson)\n\n let config: Config\n\n if (exists) {\n config = configSchema.parse({\n ...JSON.parse(readFileSync(configFilePathJson, 'utf-8')),\n ...inlineConfig,\n })\n } else {\n config = configSchema.parse(inlineConfig)\n }\n\n // If typescript is disabled, make sure the generated route tree is a .js file\n if (config.disableTypes) {\n config.generatedRouteTree = config.generatedRouteTree.replace(\n /\\.(ts|tsx)$/,\n '.js',\n )\n }\n\n // if a configDirectory is used, paths should be relative to that directory\n if (configDirectory) {\n // if absolute configDirectory is provided, use it as the root\n if (path.isAbsolute(configDirectory)) {\n config.routesDirectory = path.resolve(\n configDirectory,\n config.routesDirectory,\n )\n config.generatedRouteTree = path.resolve(\n configDirectory,\n config.generatedRouteTree,\n )\n } else {\n config.routesDirectory = path.resolve(\n process.cwd(),\n configDirectory,\n config.routesDirectory,\n )\n config.generatedRouteTree = path.resolve(\n process.cwd(),\n configDirectory,\n config.generatedRouteTree,\n )\n }\n }\n\n const resolveTmpDir = (dir: string | Array<string>) => {\n if (Array.isArray(dir)) {\n dir = path.join(...dir)\n }\n if (!path.isAbsolute(dir)) {\n dir = path.resolve(process.cwd(), dir)\n }\n mkdirSync(dir, { recursive: true })\n return dir\n }\n\n if (config.tmpDir) {\n config.tmpDir = resolveTmpDir(config.tmpDir)\n } else if (process.env.TSR_TMP_DIR) {\n config.tmpDir = resolveTmpDir(process.env.TSR_TMP_DIR)\n } else {\n config.tmpDir = resolveTmpDir(['.tanstack', 'tmp'])\n }\n\n validateConfig(config)\n return config\n}\n\nfunction validateConfig(config: Config) {\n if (typeof config.experimental?.enableCodeSplitting !== 'undefined') {\n const message = `\n------\n⚠️ ⚠️ ⚠️\nERROR: The \"experimental.enableCodeSplitting\" flag has been made stable and is now \"autoCodeSplitting\". Please update your configuration file to use \"autoCodeSplitting\" instead of \"experimental.enableCodeSplitting\".\n------\n`\n console.error(message)\n throw new Error(message)\n }\n\n if (config.indexToken === config.routeToken) {\n throw new Error(\n `The \"indexToken\" and \"routeToken\" options must be different.`,\n )\n }\n\n if (\n config.routeFileIgnorePrefix &&\n config.routeFileIgnorePrefix.trim() === '_'\n ) {\n throw new Error(\n `The \"routeFileIgnorePrefix\" cannot be an underscore (\"_\"). This is a reserved character used to denote a pathless route. Please use a different prefix.`,\n )\n }\n\n return config\n}\n"],"names":["z","virtualRootRouteSchema","existsSync","config","readFileSync","mkdirSync"],"mappings":";;;;;;AAMa,MAAA,mBAAmBA,MAAE,OAAO;AAAA,EACvC,QAAQA,IAAAA,EAAE,KAAK,CAAC,SAAS,OAAO,CAAC,EAAE,SAAA,EAAW,QAAQ,OAAO;AAAA,EAC7D,oBAAoBC,OAAuB,uBAAA,GAAGD,MAAE,OAAO,CAAC,EAAE,SAAS;AAAA,EACnE,iBAAiBA,IAAA,EAAE,OAAO,EAAE,SAAS;AAAA,EACrC,uBAAuBA,IAAE,EAAA,OAAA,EAAS,SAAS,EAAE,QAAQ,GAAG;AAAA,EACxD,wBAAwBA,IAAA,EAAE,OAAO,EAAE,SAAS;AAAA,EAC5C,iBAAiBA,IAAE,EAAA,OAAA,EAAS,SAAS,EAAE,QAAQ,cAAc;AAAA,EAC7D,YAAYA,IAAAA,EAAE,KAAK,CAAC,UAAU,QAAQ,CAAC,EAAE,SAAA,EAAW,QAAQ,QAAQ;AAAA,EACpE,YAAYA,IAAE,EAAA,QAAA,EAAU,SAAS,EAAE,QAAQ,KAAK;AAAA,EAChD,gBAAgBA,IAAE,EAAA,QAAA,EAAU,SAAS,EAAE,QAAQ,KAAK;AAAA,EACpD,qBAAqBA,IAAAA,EAClB,MAAMA,IAAA,EAAE,QAAQ,EAChB,SAAS,EACT,QAAQ;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,EAAA,CACD;AAAA,EACH,YAAYA,IAAE,EAAA,OAAA,EAAS,SAAS,EAAE,QAAQ,OAAO;AAAA,EACjD,YAAYA,IAAE,EAAA,OAAA,EAAS,SAA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3B,WAAA;AAAA,EACT;AAEA,MAAIF,QAAO,QAAQ;AACV,IAAAA,QAAA,SAAS,cAAcA,QAAO,MAAM;AAAA,EAAA,WAClC,QAAQ,IAAI,aAAa;AAClC,IAAAA,QAAO,SAAS,cAAc,QAAQ,IAAI,WAAW;AAAA,EAAA,OAChD;AACL,IAAAA,QAAO,SAAS,cAAc,CAAC,aAAa,KAAK,CAAC;AAAA,EAAA;AAGpD,iBAAeA,OAAM;AACd,SAAAA;AACT;AAEA,SAAS,eAAeA,SAAgB;;AACtC,MAAI,SAAO,KAAAA,QAAO,iBAAP,mBAAqB,yBAAwB,aAAa;AACnE,UAAM,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAMhB,YAAQ,MAAM,OAAO;AACf,UAAA,IAAI,MAAM,OAAO;AAAA,EAAA;AAGrB,MAAAA,QAAO,eAAeA,QAAO,YAAY;AAC3C,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EAAA;AAGF,MACEA,QAAO,yBACPA,QAAO,sBAAsB,WAAW,KACxC;AACA,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EAAA;AAGK,SAAAA;AACT;;;;;"}
@@ -1,155 +0,0 @@
1
- import { z } from 'zod';
2
- import { GeneratorPlugin } from './plugin/types.cjs';
3
- export declare const baseConfigSchema: z.ZodObject<{
4
- target: z.ZodDefault<z.ZodOptional<z.ZodEnum<["react", "solid"]>>>;
5
- virtualRouteConfig: z.ZodOptional<z.ZodUnion<[z.ZodType<import('@tanstack/virtual-file-routes').VirtualRootRoute, z.ZodTypeDef, import('@tanstack/virtual-file-routes').VirtualRootRoute>, z.ZodString]>>;
6
- routeFilePrefix: z.ZodOptional<z.ZodString>;
7
- routeFileIgnorePrefix: z.ZodDefault<z.ZodOptional<z.ZodString>>;
8
- routeFileIgnorePattern: z.ZodOptional<z.ZodString>;
9
- routesDirectory: z.ZodDefault<z.ZodOptional<z.ZodString>>;
10
- quoteStyle: z.ZodDefault<z.ZodOptional<z.ZodEnum<["single", "double"]>>>;
11
- semicolons: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
12
- disableLogging: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
13
- routeTreeFileHeader: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
14
- indexToken: z.ZodDefault<z.ZodOptional<z.ZodString>>;
15
- routeToken: z.ZodDefault<z.ZodOptional<z.ZodString>>;
16
- pathParamsAllowedCharacters: z.ZodOptional<z.ZodArray<z.ZodEnum<[";", ":", "@", "&", "=", "+", "$", ","]>, "many">>;
17
- }, "strip", z.ZodTypeAny, {
18
- target: "react" | "solid";
19
- routeFileIgnorePrefix: string;
20
- routesDirectory: string;
21
- quoteStyle: "single" | "double";
22
- semicolons: boolean;
23
- disableLogging: boolean;
24
- routeTreeFileHeader: string[];
25
- indexToken: string;
26
- routeToken: string;
27
- virtualRouteConfig?: string | import('@tanstack/virtual-file-routes').VirtualRootRoute | undefined;
28
- routeFilePrefix?: string | undefined;
29
- routeFileIgnorePattern?: string | undefined;
30
- pathParamsAllowedCharacters?: (";" | ":" | "@" | "&" | "=" | "+" | "$" | ",")[] | undefined;
31
- }, {
32
- target?: "react" | "solid" | undefined;
33
- virtualRouteConfig?: string | import('@tanstack/virtual-file-routes').VirtualRootRoute | undefined;
34
- routeFilePrefix?: string | undefined;
35
- routeFileIgnorePrefix?: string | undefined;
36
- routeFileIgnorePattern?: string | undefined;
37
- routesDirectory?: string | undefined;
38
- quoteStyle?: "single" | "double" | undefined;
39
- semicolons?: boolean | undefined;
40
- disableLogging?: boolean | undefined;
41
- routeTreeFileHeader?: string[] | undefined;
42
- indexToken?: string | undefined;
43
- routeToken?: string | undefined;
44
- pathParamsAllowedCharacters?: (";" | ":" | "@" | "&" | "=" | "+" | "$" | ",")[] | undefined;
45
- }>;
46
- export type BaseConfig = z.infer<typeof baseConfigSchema>;
47
- export declare const configSchema: z.ZodObject<{
48
- target: z.ZodDefault<z.ZodOptional<z.ZodEnum<["react", "solid"]>>>;
49
- virtualRouteConfig: z.ZodOptional<z.ZodUnion<[z.ZodType<import('@tanstack/virtual-file-routes').VirtualRootRoute, z.ZodTypeDef, import('@tanstack/virtual-file-routes').VirtualRootRoute>, z.ZodString]>>;
50
- routeFilePrefix: z.ZodOptional<z.ZodString>;
51
- routeFileIgnorePrefix: z.ZodDefault<z.ZodOptional<z.ZodString>>;
52
- routeFileIgnorePattern: z.ZodOptional<z.ZodString>;
53
- routesDirectory: z.ZodDefault<z.ZodOptional<z.ZodString>>;
54
- quoteStyle: z.ZodDefault<z.ZodOptional<z.ZodEnum<["single", "double"]>>>;
55
- semicolons: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
56
- disableLogging: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
57
- routeTreeFileHeader: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
58
- indexToken: z.ZodDefault<z.ZodOptional<z.ZodString>>;
59
- routeToken: z.ZodDefault<z.ZodOptional<z.ZodString>>;
60
- pathParamsAllowedCharacters: z.ZodOptional<z.ZodArray<z.ZodEnum<[";", ":", "@", "&", "=", "+", "$", ","]>, "many">>;
61
- } & {
62
- generatedRouteTree: z.ZodDefault<z.ZodOptional<z.ZodString>>;
63
- disableTypes: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
64
- verboseFileRoutes: z.ZodOptional<z.ZodBoolean>;
65
- addExtensions: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
66
- enableRouteTreeFormatting: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
67
- routeTreeFileFooter: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
68
- autoCodeSplitting: z.ZodOptional<z.ZodBoolean>;
69
- customScaffolding: z.ZodOptional<z.ZodObject<{
70
- routeTemplate: z.ZodOptional<z.ZodString>;
71
- lazyRouteTemplate: z.ZodOptional<z.ZodString>;
72
- }, "strip", z.ZodTypeAny, {
73
- routeTemplate?: string | undefined;
74
- lazyRouteTemplate?: string | undefined;
75
- }, {
76
- routeTemplate?: string | undefined;
77
- lazyRouteTemplate?: string | undefined;
78
- }>>;
79
- experimental: z.ZodOptional<z.ZodObject<{
80
- enableCodeSplitting: z.ZodOptional<z.ZodBoolean>;
81
- }, "strip", z.ZodTypeAny, {
82
- enableCodeSplitting?: boolean | undefined;
83
- }, {
84
- enableCodeSplitting?: boolean | undefined;
85
- }>>;
86
- plugins: z.ZodOptional<z.ZodArray<z.ZodType<GeneratorPlugin, z.ZodTypeDef, GeneratorPlugin>, "many">>;
87
- tmpDir: z.ZodDefault<z.ZodOptional<z.ZodString>>;
88
- }, "strip", z.ZodTypeAny, {
89
- target: "react" | "solid";
90
- routeFileIgnorePrefix: string;
91
- routesDirectory: string;
92
- quoteStyle: "single" | "double";
93
- semicolons: boolean;
94
- disableLogging: boolean;
95
- routeTreeFileHeader: string[];
96
- indexToken: string;
97
- routeToken: string;
98
- generatedRouteTree: string;
99
- disableTypes: boolean;
100
- addExtensions: boolean;
101
- enableRouteTreeFormatting: boolean;
102
- routeTreeFileFooter: string[];
103
- tmpDir: string;
104
- virtualRouteConfig?: string | import('@tanstack/virtual-file-routes').VirtualRootRoute | undefined;
105
- routeFilePrefix?: string | undefined;
106
- routeFileIgnorePattern?: string | undefined;
107
- pathParamsAllowedCharacters?: (";" | ":" | "@" | "&" | "=" | "+" | "$" | ",")[] | undefined;
108
- verboseFileRoutes?: boolean | undefined;
109
- autoCodeSplitting?: boolean | undefined;
110
- customScaffolding?: {
111
- routeTemplate?: string | undefined;
112
- lazyRouteTemplate?: string | undefined;
113
- } | undefined;
114
- experimental?: {
115
- enableCodeSplitting?: boolean | undefined;
116
- } | undefined;
117
- plugins?: GeneratorPlugin[] | undefined;
118
- }, {
119
- target?: "react" | "solid" | undefined;
120
- virtualRouteConfig?: string | import('@tanstack/virtual-file-routes').VirtualRootRoute | undefined;
121
- routeFilePrefix?: string | undefined;
122
- routeFileIgnorePrefix?: string | undefined;
123
- routeFileIgnorePattern?: string | undefined;
124
- routesDirectory?: string | undefined;
125
- quoteStyle?: "single" | "double" | undefined;
126
- semicolons?: boolean | undefined;
127
- disableLogging?: boolean | undefined;
128
- routeTreeFileHeader?: string[] | undefined;
129
- indexToken?: string | undefined;
130
- routeToken?: string | undefined;
131
- pathParamsAllowedCharacters?: (";" | ":" | "@" | "&" | "=" | "+" | "$" | ",")[] | undefined;
132
- generatedRouteTree?: string | undefined;
133
- disableTypes?: boolean | undefined;
134
- verboseFileRoutes?: boolean | undefined;
135
- addExtensions?: boolean | undefined;
136
- enableRouteTreeFormatting?: boolean | undefined;
137
- routeTreeFileFooter?: string[] | undefined;
138
- autoCodeSplitting?: boolean | undefined;
139
- customScaffolding?: {
140
- routeTemplate?: string | undefined;
141
- lazyRouteTemplate?: string | undefined;
142
- } | undefined;
143
- experimental?: {
144
- enableCodeSplitting?: boolean | undefined;
145
- } | undefined;
146
- plugins?: GeneratorPlugin[] | undefined;
147
- tmpDir?: string | undefined;
148
- }>;
149
- export type Config = z.infer<typeof configSchema>;
150
- type ResolveParams = {
151
- configDirectory: string;
152
- };
153
- export declare function resolveConfigPath({ configDirectory }: ResolveParams): string;
154
- export declare function getConfig(inlineConfig?: Partial<Config>, configDirectory?: string): Config;
155
- export {};
@@ -1,204 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const path = require("node:path");
4
- const fsp = require("node:fs/promises");
5
- const utils = require("../../utils.cjs");
6
- const getRouteNodes$1 = require("../virtual/getRouteNodes.cjs");
7
- const loadConfigFile = require("../virtual/loadConfigFile.cjs");
8
- const logger = require("../../logger.cjs");
9
- const rootPathId = require("./rootPathId.cjs");
10
- function _interopNamespaceDefault(e) {
11
- const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
12
- if (e) {
13
- for (const k in e) {
14
- if (k !== "default") {
15
- const d = Object.getOwnPropertyDescriptor(e, k);
16
- Object.defineProperty(n, k, d.get ? d : {
17
- enumerable: true,
18
- get: () => e[k]
19
- });
20
- }
21
- }
22
- }
23
- n.default = e;
24
- return Object.freeze(n);
25
- }
26
- const fsp__namespace = /* @__PURE__ */ _interopNamespaceDefault(fsp);
27
- const disallowedRouteGroupConfiguration = /\(([^)]+)\).(ts|js|tsx|jsx)/;
28
- const virtualConfigFileRegExp = /__virtual\.[mc]?[jt]s$/;
29
- function isVirtualConfigFile(fileName) {
30
- return virtualConfigFileRegExp.test(fileName);
31
- }
32
- async function getRouteNodes(config, root) {
33
- const { routeFilePrefix, routeFileIgnorePrefix, routeFileIgnorePattern } = config;
34
- const logger$1 = logger.logging({ disabled: config.disableLogging });
35
- const routeFileIgnoreRegExp = new RegExp(routeFileIgnorePattern ?? "", "g");
36
- const routeNodes = [];
37
- const allPhysicalDirectories = [];
38
- async function recurse(dir) {
39
- const fullDir = path.resolve(config.routesDirectory, dir);
40
- let dirList = await fsp__namespace.readdir(fullDir, { withFileTypes: true });
41
- dirList = dirList.filter((d) => {
42
- if (d.name.startsWith(".") || routeFileIgnorePrefix && d.name.startsWith(routeFileIgnorePrefix)) {
43
- return false;
44
- }
45
- if (routeFilePrefix) {
46
- return d.name.startsWith(routeFilePrefix);
47
- }
48
- if (routeFileIgnorePattern) {
49
- return !d.name.match(routeFileIgnoreRegExp);
50
- }
51
- return true;
52
- });
53
- const virtualConfigFile = dirList.find((dirent) => {
54
- return dirent.isFile() && isVirtualConfigFile(dirent.name);
55
- });
56
- if (virtualConfigFile !== void 0) {
57
- const virtualRouteConfigExport = await loadConfigFile.loadConfigFile(
58
- path.resolve(fullDir, virtualConfigFile.name)
59
- );
60
- let virtualRouteSubtreeConfig;
61
- if (typeof virtualRouteConfigExport.default === "function") {
62
- virtualRouteSubtreeConfig = await virtualRouteConfigExport.default();
63
- } else {
64
- virtualRouteSubtreeConfig = virtualRouteConfigExport.default;
65
- }
66
- const dummyRoot = {
67
- type: "root",
68
- file: "",
69
- children: virtualRouteSubtreeConfig
70
- };
71
- const { routeNodes: virtualRouteNodes, physicalDirectories } = await getRouteNodes$1.getRouteNodes(
72
- {
73
- ...config,
74
- routesDirectory: fullDir,
75
- virtualRouteConfig: dummyRoot
76
- },
77
- root
78
- );
79
- allPhysicalDirectories.push(...physicalDirectories);
80
- virtualRouteNodes.forEach((node) => {
81
- const filePath = utils.replaceBackslash(path.join(dir, node.filePath));
82
- const routePath = `/${dir}${node.routePath}`;
83
- node.variableName = utils.routePathToVariable(
84
- `${dir}/${utils.removeExt(node.filePath)}`
85
- );
86
- node.routePath = routePath;
87
- node.filePath = filePath;
88
- });
89
- routeNodes.push(...virtualRouteNodes);
90
- return;
91
- }
92
- await Promise.all(
93
- dirList.map(async (dirent) => {
94
- const fullPath = utils.replaceBackslash(path.join(fullDir, dirent.name));
95
- const relativePath = path.posix.join(dir, dirent.name);
96
- if (dirent.isDirectory()) {
97
- await recurse(relativePath);
98
- } else if (fullPath.match(/\.(tsx|ts|jsx|js)$/)) {
99
- const filePath = utils.replaceBackslash(path.join(dir, dirent.name));
100
- const filePathNoExt = utils.removeExt(filePath);
101
- let routePath = utils.determineInitialRoutePath(filePathNoExt);
102
- if (routeFilePrefix) {
103
- routePath = routePath.replaceAll(routeFilePrefix, "");
104
- }
105
- if (disallowedRouteGroupConfiguration.test(dirent.name)) {
106
- const errorMessage = `A route configuration for a route group was found at \`${filePath}\`. This is not supported. Did you mean to use a layout/pathless route instead?`;
107
- logger$1.error(`ERROR: ${errorMessage}`);
108
- throw new Error(errorMessage);
109
- }
110
- const meta = getRouteMeta(routePath, config);
111
- const variableName = meta.variableName;
112
- let routeType = meta.fsRouteType;
113
- if (routeType === "lazy") {
114
- routePath = routePath.replace(/\/lazy$/, "");
115
- }
116
- if (isValidPathlessLayoutRoute(routePath, routeType, config)) {
117
- routeType = "pathless_layout";
118
- }
119
- [
120
- ["component", "component"],
121
- ["errorComponent", "errorComponent"],
122
- ["pendingComponent", "pendingComponent"],
123
- ["loader", "loader"]
124
- ].forEach(([matcher, type]) => {
125
- if (routeType === matcher) {
126
- logger$1.warn(
127
- `WARNING: The \`.${type}.tsx\` suffix used for the ${filePath} file is deprecated. Use the new \`.lazy.tsx\` suffix instead.`
128
- );
129
- }
130
- });
131
- routePath = routePath.replace(
132
- new RegExp(
133
- `/(component|errorComponent|pendingComponent|loader|${config.routeToken}|lazy)$`
134
- ),
135
- ""
136
- );
137
- if (routePath === config.indexToken) {
138
- routePath = "/";
139
- }
140
- routePath = routePath.replace(new RegExp(`/${config.indexToken}$`), "/") || "/";
141
- routeNodes.push({
142
- filePath,
143
- fullPath,
144
- routePath,
145
- variableName,
146
- _fsRouteType: routeType
147
- });
148
- }
149
- })
150
- );
151
- return routeNodes;
152
- }
153
- await recurse("./");
154
- const rootRouteNode = routeNodes.find((d) => d.routePath === `/${rootPathId.rootPathId}`);
155
- if (rootRouteNode) {
156
- rootRouteNode._fsRouteType = "__root";
157
- rootRouteNode.variableName = "root";
158
- }
159
- return {
160
- rootRouteNode,
161
- routeNodes,
162
- physicalDirectories: allPhysicalDirectories
163
- };
164
- }
165
- function getRouteMeta(routePath, config) {
166
- let fsRouteType = "static";
167
- if (routePath.endsWith(`/${config.routeToken}`)) {
168
- fsRouteType = "layout";
169
- } else if (routePath.endsWith("/lazy")) {
170
- fsRouteType = "lazy";
171
- } else if (routePath.endsWith("/loader")) {
172
- fsRouteType = "loader";
173
- } else if (routePath.endsWith("/component")) {
174
- fsRouteType = "component";
175
- } else if (routePath.endsWith("/pendingComponent")) {
176
- fsRouteType = "pendingComponent";
177
- } else if (routePath.endsWith("/errorComponent")) {
178
- fsRouteType = "errorComponent";
179
- }
180
- const variableName = utils.routePathToVariable(routePath);
181
- return { fsRouteType, variableName };
182
- }
183
- function isValidPathlessLayoutRoute(normalizedRoutePath, routeType, config) {
184
- if (routeType === "lazy") {
185
- return false;
186
- }
187
- const segments = normalizedRoutePath.split("/").filter(Boolean);
188
- if (segments.length === 0) {
189
- return false;
190
- }
191
- const lastRouteSegment = segments[segments.length - 1];
192
- const secondToLastRouteSegment = segments[segments.length - 2];
193
- if (lastRouteSegment === rootPathId.rootPathId) {
194
- return false;
195
- }
196
- if (lastRouteSegment === config.routeToken && typeof secondToLastRouteSegment === "string") {
197
- return secondToLastRouteSegment.startsWith("_");
198
- }
199
- return lastRouteSegment !== config.indexToken && lastRouteSegment !== config.routeToken && lastRouteSegment.startsWith("_");
200
- }
201
- exports.getRouteMeta = getRouteMeta;
202
- exports.getRouteNodes = getRouteNodes;
203
- exports.isVirtualConfigFile = isVirtualConfigFile;
204
- //# sourceMappingURL=getRouteNodes.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getRouteNodes.cjs","sources":["../../../../src/filesystem/physical/getRouteNodes.ts"],"sourcesContent":["import path from 'node:path'\nimport * as fsp from 'node:fs/promises'\nimport {\n determineInitialRoutePath,\n removeExt,\n replaceBackslash,\n routePathToVariable,\n} from '../../utils'\nimport { getRouteNodes as getRouteNodesVirtual } from '../virtual/getRouteNodes'\nimport { loadConfigFile } from '../virtual/loadConfigFile'\nimport { logging } from '../../logger'\nimport { rootPathId } from './rootPathId'\nimport type {\n VirtualRootRoute,\n VirtualRouteSubtreeConfig,\n} from '@tanstack/virtual-file-routes'\nimport type { FsRouteType, GetRouteNodesResult, RouteNode } from '../../types'\nimport type { Config } from '../../config'\n\nconst disallowedRouteGroupConfiguration = /\\(([^)]+)\\).(ts|js|tsx|jsx)/\n\nconst virtualConfigFileRegExp = /__virtual\\.[mc]?[jt]s$/\nexport function isVirtualConfigFile(fileName: string): boolean {\n return virtualConfigFileRegExp.test(fileName)\n}\n\nexport async function getRouteNodes(\n config: Pick<\n Config,\n | 'routesDirectory'\n | 'routeFilePrefix'\n | 'routeFileIgnorePrefix'\n | 'routeFileIgnorePattern'\n | 'disableLogging'\n | 'routeToken'\n | 'indexToken'\n >,\n root: string,\n): Promise<GetRouteNodesResult> {\n const { routeFilePrefix, routeFileIgnorePrefix, routeFileIgnorePattern } =\n config\n const logger = logging({ disabled: config.disableLogging })\n const routeFileIgnoreRegExp = new RegExp(routeFileIgnorePattern ?? '', 'g')\n\n const routeNodes: Array<RouteNode> = []\n const allPhysicalDirectories: Array<string> = []\n\n async function recurse(dir: string) {\n const fullDir = path.resolve(config.routesDirectory, dir)\n let dirList = await fsp.readdir(fullDir, { withFileTypes: true })\n\n dirList = dirList.filter((d) => {\n if (\n d.name.startsWith('.') ||\n (routeFileIgnorePrefix && d.name.startsWith(routeFileIgnorePrefix))\n ) {\n return false\n }\n\n if (routeFilePrefix) {\n return d.name.startsWith(routeFilePrefix)\n }\n\n if (routeFileIgnorePattern) {\n return !d.name.match(routeFileIgnoreRegExp)\n }\n\n return true\n })\n\n const virtualConfigFile = dirList.find((dirent) => {\n return dirent.isFile() && isVirtualConfigFile(dirent.name)\n })\n\n if (virtualConfigFile !== undefined) {\n const virtualRouteConfigExport = await loadConfigFile(\n path.resolve(fullDir, virtualConfigFile.name),\n )\n let virtualRouteSubtreeConfig: VirtualRouteSubtreeConfig\n if (typeof virtualRouteConfigExport.default === 'function') {\n virtualRouteSubtreeConfig = await virtualRouteConfigExport.default()\n } else {\n virtualRouteSubtreeConfig = virtualRouteConfigExport.default\n }\n const dummyRoot: VirtualRootRoute = {\n type: 'root',\n file: '',\n children: virtualRouteSubtreeConfig,\n }\n const { routeNodes: virtualRouteNodes, physicalDirectories } =\n await getRouteNodesVirtual(\n {\n ...config,\n routesDirectory: fullDir,\n virtualRouteConfig: dummyRoot,\n },\n root,\n )\n allPhysicalDirectories.push(...physicalDirectories)\n virtualRouteNodes.forEach((node) => {\n const filePath = replaceBackslash(path.join(dir, node.filePath))\n const routePath = `/${dir}${node.routePath}`\n\n node.variableName = routePathToVariable(\n `${dir}/${removeExt(node.filePath)}`,\n )\n node.routePath = routePath\n node.filePath = filePath\n })\n\n routeNodes.push(...virtualRouteNodes)\n\n return\n }\n\n await Promise.all(\n dirList.map(async (dirent) => {\n const fullPath = replaceBackslash(path.join(fullDir, dirent.name))\n const relativePath = path.posix.join(dir, dirent.name)\n\n if (dirent.isDirectory()) {\n await recurse(relativePath)\n } else if (fullPath.match(/\\.(tsx|ts|jsx|js)$/)) {\n const filePath = replaceBackslash(path.join(dir, dirent.name))\n const filePathNoExt = removeExt(filePath)\n let routePath = determineInitialRoutePath(filePathNoExt)\n\n if (routeFilePrefix) {\n routePath = routePath.replaceAll(routeFilePrefix, '')\n }\n\n if (disallowedRouteGroupConfiguration.test(dirent.name)) {\n const errorMessage = `A route configuration for a route group was found at \\`${filePath}\\`. This is not supported. Did you mean to use a layout/pathless route instead?`\n logger.error(`ERROR: ${errorMessage}`)\n throw new Error(errorMessage)\n }\n\n const meta = getRouteMeta(routePath, config)\n const variableName = meta.variableName\n let routeType: FsRouteType = meta.fsRouteType\n\n if (routeType === 'lazy') {\n routePath = routePath.replace(/\\/lazy$/, '')\n }\n\n // this check needs to happen after the lazy route has been cleaned up\n // since the routePath is used to determine if a route is pathless\n if (isValidPathlessLayoutRoute(routePath, routeType, config)) {\n routeType = 'pathless_layout'\n }\n\n ;(\n [\n ['component', 'component'],\n ['errorComponent', 'errorComponent'],\n ['pendingComponent', 'pendingComponent'],\n ['loader', 'loader'],\n ] satisfies Array<[FsRouteType, string]>\n ).forEach(([matcher, type]) => {\n if (routeType === matcher) {\n logger.warn(\n `WARNING: The \\`.${type}.tsx\\` suffix used for the ${filePath} file is deprecated. Use the new \\`.lazy.tsx\\` suffix instead.`,\n )\n }\n })\n\n routePath = routePath.replace(\n new RegExp(\n `/(component|errorComponent|pendingComponent|loader|${config.routeToken}|lazy)$`,\n ),\n '',\n )\n\n if (routePath === config.indexToken) {\n routePath = '/'\n }\n\n routePath =\n routePath.replace(new RegExp(`/${config.indexToken}$`), '/') || '/'\n\n routeNodes.push({\n filePath,\n fullPath,\n routePath,\n variableName,\n _fsRouteType: routeType,\n })\n }\n }),\n )\n\n return routeNodes\n }\n\n await recurse('./')\n\n const rootRouteNode = routeNodes.find((d) => d.routePath === `/${rootPathId}`)\n if (rootRouteNode) {\n rootRouteNode._fsRouteType = '__root'\n rootRouteNode.variableName = 'root'\n }\n\n return {\n rootRouteNode,\n routeNodes,\n physicalDirectories: allPhysicalDirectories,\n }\n}\n\n/**\n * Determines the metadata for a given route path based on the provided configuration.\n *\n * @param routePath - The determined initial routePath.\n * @param config - The user configuration object.\n * @returns An object containing the type of the route and the variable name derived from the route path.\n */\nexport function getRouteMeta(\n routePath: string,\n config: Pick<Config, 'routeToken' | 'indexToken'>,\n): {\n // `__root` is can be more easily determined by filtering down to routePath === /${rootPathId}\n // `pathless` is needs to determined after `lazy` has been cleaned up from the routePath\n fsRouteType: Extract<\n FsRouteType,\n | 'static'\n | 'layout'\n | 'api'\n | 'lazy'\n | 'loader'\n | 'component'\n | 'pendingComponent'\n | 'errorComponent'\n >\n variableName: string\n} {\n let fsRouteType: FsRouteType = 'static'\n\n if (routePath.endsWith(`/${config.routeToken}`)) {\n // layout routes, i.e `/foo/route.tsx` or `/foo/_layout/route.tsx`\n fsRouteType = 'layout'\n } else if (routePath.endsWith('/lazy')) {\n // lazy routes, i.e. `/foo.lazy.tsx`\n fsRouteType = 'lazy'\n } else if (routePath.endsWith('/loader')) {\n // loader routes, i.e. `/foo.loader.tsx`\n fsRouteType = 'loader'\n } else if (routePath.endsWith('/component')) {\n // component routes, i.e. `/foo.component.tsx`\n fsRouteType = 'component'\n } else if (routePath.endsWith('/pendingComponent')) {\n // pending component routes, i.e. `/foo.pendingComponent.tsx`\n fsRouteType = 'pendingComponent'\n } else if (routePath.endsWith('/errorComponent')) {\n // error component routes, i.e. `/foo.errorComponent.tsx`\n fsRouteType = 'errorComponent'\n }\n\n const variableName = routePathToVariable(routePath)\n\n return { fsRouteType, variableName }\n}\n\n/**\n * Used to validate if a route is a pathless layout route\n * @param normalizedRoutePath Normalized route path, i.e `/foo/_layout/route.tsx` and `/foo._layout.route.tsx` to `/foo/_layout/route`\n * @param config The `router-generator` configuration object\n * @returns Boolean indicating if the route is a pathless layout route\n */\nfunction isValidPathlessLayoutRoute(\n normalizedRoutePath: string,\n routeType: FsRouteType,\n config: Pick<Config, 'routeToken' | 'indexToken'>,\n): boolean {\n if (routeType === 'lazy') {\n return false\n }\n\n const segments = normalizedRoutePath.split('/').filter(Boolean)\n\n if (segments.length === 0) {\n return false\n }\n\n const lastRouteSegment = segments[segments.length - 1]!\n const secondToLastRouteSegment = segments[segments.length - 2]\n\n // If segment === __root, then exit as false\n if (lastRouteSegment === rootPathId) {\n return false\n }\n\n // If segment === config.routeToken and secondToLastSegment is a string that starts with _, then exit as true\n // Since the route is actually a configuration route for a layout/pathless route\n // i.e. /foo/_layout/route.tsx === /foo/_layout.tsx\n if (\n lastRouteSegment === config.routeToken &&\n typeof secondToLastRouteSegment === 'string'\n ) {\n return secondToLastRouteSegment.startsWith('_')\n }\n\n // Segment starts with _\n return (\n lastRouteSegment !== config.indexToken &&\n lastRouteSegment !== config.routeToken &&\n lastRouteSegment.startsWith('_')\n )\n}\n"],"names":["logger","logging","fsp","loadConfigFile","getRouteNodesVirtual","replaceBackslash","routePathToVariable","removeExt","determineInitialRoutePath","rootPathId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,MAAM,oCAAoC;AAE1C,MAAM,0BAA0B;AACzB,SAAS,oBAAoB,UAA2B;AACtD,SAAA,wBAAwB,KAAK,QAAQ;AAC9C;AAEsB,eAAA,cACpB,QAUA,MAC8B;AAC9B,QAAM,EAAE,iBAAiB,uBAAuB,uBAC9C,IAAA;AACF,QAAMA,WAASC,OAAAA,QAAQ,EAAE,UAAU,OAAO,gBAAgB;AAC1D,QAAM,wBAAwB,IAAI,OAAO,0BAA0B,IAAI,GAAG;AAE1E,QAAM,aAA+B,CAAC;AACtC,QAAM,yBAAwC,CAAC;AAE/C,iBAAe,QAAQ,KAAa;AAClC,UAAM,UAAU,KAAK,QAAQ,OAAO,iBAAiB,GAAG;AACpD,QAAA,UAAU,MAAMC,eAAI,QAAQ,SAAS,EAAE,eAAe,MAAM;AAEtD,cAAA,QAAQ,OAAO,CA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Q;AACjB,WAAA;AAAA,EAAA;AAGT,QAAM,WAAW,oBAAoB,MAAM,GAAG,EAAE,OAAO,OAAO;AAE1D,MAAA,SAAS,WAAW,GAAG;AAClB,WAAA;AAAA,EAAA;AAGT,QAAM,mBAAmB,SAAS,SAAS,SAAS,CAAC;AACrD,QAAM,2BAA2B,SAAS,SAAS,SAAS,CAAC;AAG7D,MAAI,qBAAqBG,WAAAA,YAAY;AAC5B,WAAA;AAAA,EAAA;AAMT,MACE,qBAAqB,OAAO,cAC5B,OAAO,6BAA6B,UACpC;AACO,WAAA,yBAAyB,WAAW,GAAG;AAAA,EAAA;AAK9C,SAAA,qBAAqB,OAAO,cAC5B,qBAAqB,OAAO,cAC5B,iBAAiB,WAAW,GAAG;AAEnC;;;;"}
@@ -1,15 +0,0 @@
1
- import { FsRouteType, GetRouteNodesResult } from '../../types.cjs';
2
- import { Config } from '../../config.cjs';
3
- export declare function isVirtualConfigFile(fileName: string): boolean;
4
- export declare function getRouteNodes(config: Pick<Config, 'routesDirectory' | 'routeFilePrefix' | 'routeFileIgnorePrefix' | 'routeFileIgnorePattern' | 'disableLogging' | 'routeToken' | 'indexToken'>, root: string): Promise<GetRouteNodesResult>;
5
- /**
6
- * Determines the metadata for a given route path based on the provided configuration.
7
- *
8
- * @param routePath - The determined initial routePath.
9
- * @param config - The user configuration object.
10
- * @returns An object containing the type of the route and the variable name derived from the route path.
11
- */
12
- export declare function getRouteMeta(routePath: string, config: Pick<Config, 'routeToken' | 'indexToken'>): {
13
- fsRouteType: Extract<FsRouteType, 'static' | 'layout' | 'api' | 'lazy' | 'loader' | 'component' | 'pendingComponent' | 'errorComponent'>;
14
- variableName: string;
15
- };
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const rootPathId = "__root";
4
- exports.rootPathId = rootPathId;
5
- //# sourceMappingURL=rootPathId.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rootPathId.cjs","sources":["../../../../src/filesystem/physical/rootPathId.ts"],"sourcesContent":["export const rootPathId = '__root'\n"],"names":[],"mappings":";;AAAO,MAAM,aAAa;;"}
@@ -1 +0,0 @@
1
- export declare const rootPathId = "__root";
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const zod = require("zod");
4
- const indexRouteSchema = zod.z.object({
5
- type: zod.z.literal("index"),
6
- file: zod.z.string()
7
- });
8
- const layoutRouteSchema = zod.z.object({
9
- type: zod.z.literal("layout"),
10
- id: zod.z.string().optional(),
11
- file: zod.z.string(),
12
- children: zod.z.array(zod.z.lazy(() => virtualRouteNodeSchema)).optional()
13
- });
14
- const routeSchema = zod.z.object({
15
- type: zod.z.literal("route"),
16
- file: zod.z.string().optional(),
17
- path: zod.z.string(),
18
- children: zod.z.array(zod.z.lazy(() => virtualRouteNodeSchema)).optional()
19
- });
20
- const physicalSubTreeSchema = zod.z.object({
21
- type: zod.z.literal("physical"),
22
- directory: zod.z.string(),
23
- pathPrefix: zod.z.string()
24
- });
25
- const virtualRouteNodeSchema = zod.z.union([
26
- indexRouteSchema,
27
- layoutRouteSchema,
28
- routeSchema,
29
- physicalSubTreeSchema
30
- ]);
31
- const virtualRootRouteSchema = zod.z.object({
32
- type: zod.z.literal("root"),
33
- file: zod.z.string(),
34
- children: zod.z.array(virtualRouteNodeSchema).optional()
35
- });
36
- exports.virtualRootRouteSchema = virtualRootRouteSchema;
37
- //# sourceMappingURL=config.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.cjs","sources":["../../../../src/filesystem/virtual/config.ts"],"sourcesContent":["import { z } from 'zod'\nimport type {\n LayoutRoute,\n PhysicalSubtree,\n Route,\n VirtualRootRoute,\n} from '@tanstack/virtual-file-routes'\n\nconst indexRouteSchema = z.object({\n type: z.literal('index'),\n file: z.string(),\n})\n\nconst layoutRouteSchema: z.ZodType<LayoutRoute> = z.object({\n type: z.literal('layout'),\n id: z.string().optional(),\n file: z.string(),\n children: z.array(z.lazy(() => virtualRouteNodeSchema)).optional(),\n})\n\nconst routeSchema: z.ZodType<Route> = z.object({\n type: z.literal('route'),\n file: z.string().optional(),\n path: z.string(),\n children: z.array(z.lazy(() => virtualRouteNodeSchema)).optional(),\n})\n\nconst physicalSubTreeSchema: z.ZodType<PhysicalSubtree> = z.object({\n type: z.literal('physical'),\n directory: z.string(),\n pathPrefix: z.string(),\n})\n\nconst virtualRouteNodeSchema = z.union([\n indexRouteSchema,\n layoutRouteSchema,\n routeSchema,\n physicalSubTreeSchema,\n])\n\nexport const virtualRootRouteSchema: z.ZodType<VirtualRootRoute> = z.object({\n type: z.literal('root'),\n file: z.string(),\n children: z.array(virtualRouteNodeSchema).optional(),\n})\n"],"names":["z"],"mappings":";;;AAQA,MAAM,mBAAmBA,MAAE,OAAO;AAAA,EAChC,MAAMA,IAAAA,EAAE,QAAQ,OAAO;AAAA,EACvB,MAAMA,MAAE,OAAO;AACjB,CAAC;AAED,MAAM,oBAA4CA,MAAE,OAAO;AAAA,EACzD,MAAMA,IAAAA,EAAE,QAAQ,QAAQ;AAAA,EACxB,IAAIA,IAAA,EAAE,OAAO,EAAE,SAAS;AAAA,EACxB,MAAMA,MAAE,OAAO;AAAA,EACf,UAAUA,MAAE,MAAMA,IAAAA,EAAE,KAAK,MAAM,sBAAsB,CAAC,EAAE,SAAS;AACnE,CAAC;AAED,MAAM,cAAgCA,MAAE,OAAO;AAAA,EAC7C,MAAMA,IAAAA,EAAE,QAAQ,OAAO;AAAA,EACvB,MAAMA,IAAA,EAAE,OAAO,EAAE,SAAS;AAAA,EAC1B,MAAMA,MAAE,OAAO;AAAA,EACf,UAAUA,MAAE,MAAMA,IAAAA,EAAE,KAAK,MAAM,sBAAsB,CAAC,EAAE,SAAS;AACnE,CAAC;AAED,MAAM,wBAAoDA,MAAE,OAAO;AAAA,EACjE,MAAMA,IAAAA,EAAE,QAAQ,UAAU;AAAA,EAC1B,WAAWA,MAAE,OAAO;AAAA,EACpB,YAAYA,MAAE,OAAO;AACvB,CAAC;AAED,MAAM,yBAAyBA,MAAE,MAAM;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEY,MAAA,yBAAsDA,MAAE,OAAO;AAAA,EAC1E,MAAMA,IAAAA,EAAE,QAAQ,MAAM;AAAA,EACtB,MAAMA,MAAE,OAAO;AAAA,EACf,UAAUA,IAAA,EAAE,MAAM,sBAAsB,EAAE,SAAS;AACrD,CAAC;;"}