@tanstack/router-cli 0.0.1-beta.225 → 0.0.1-beta.227

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.
@@ -23,7 +23,10 @@ const configSchema = zod.z.object({
23
23
  const configFilePathJson = path.resolve(process.cwd(), 'tsr.config.json');
24
24
  async function getConfig() {
25
25
  const config = await fs.readJson(configFilePathJson);
26
- return configSchema.parse(config);
26
+ return {
27
+ routeFileIgnorePrefix: '-',
28
+ ...configSchema.parse(config)
29
+ };
27
30
  }
28
31
 
29
32
  exports.getConfig = getConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sources":["../../src/config.ts"],"sourcesContent":["import path from 'path'\nimport fs from 'fs-extra'\nimport { z } from 'zod'\n\nconst configSchema = z.object({\n routeFilePrefix: z.string().optional(),\n routeFileIgnorePrefix: z.string().optional(),\n routesDirectory: z.string(),\n generatedRouteTree: z.string(),\n})\n\nexport type Config = z.infer<typeof configSchema>\n\nconst configFilePathJson = path.resolve(process.cwd(), 'tsr.config.json')\n\nexport async function getConfig() {\n const config = (await fs.readJson(configFilePathJson)) as unknown as Config\n\n return configSchema.parse(config)\n}\n"],"names":["configSchema","z","object","routeFilePrefix","string","optional","routeFileIgnorePrefix","routesDirectory","generatedRouteTree","configFilePathJson","path","resolve","process","cwd","getConfig","config","fs","readJson","parse"],"mappings":";;;;;;;;;;;;;;;;AAIA,MAAMA,YAAY,GAAGC,KAAC,CAACC,MAAM,CAAC;EAC5BC,eAAe,EAAEF,KAAC,CAACG,MAAM,EAAE,CAACC,QAAQ,EAAE;EACtCC,qBAAqB,EAAEL,KAAC,CAACG,MAAM,EAAE,CAACC,QAAQ,EAAE;AAC5CE,EAAAA,eAAe,EAAEN,KAAC,CAACG,MAAM,EAAE;AAC3BI,EAAAA,kBAAkB,EAAEP,KAAC,CAACG,MAAM,EAAC;AAC/B,CAAC,CAAC,CAAA;AAIF,MAAMK,kBAAkB,GAAGC,IAAI,CAACC,OAAO,CAACC,OAAO,CAACC,GAAG,EAAE,EAAE,iBAAiB,CAAC,CAAA;AAElE,eAAeC,SAASA,GAAG;EAChC,MAAMC,MAAM,GAAI,MAAMC,EAAE,CAACC,QAAQ,CAACR,kBAAkB,CAAuB,CAAA;AAE3E,EAAA,OAAOT,YAAY,CAACkB,KAAK,CAACH,MAAM,CAAC,CAAA;AACnC;;;;"}
1
+ {"version":3,"file":"config.js","sources":["../../src/config.ts"],"sourcesContent":["import path from 'path'\nimport fs from 'fs-extra'\nimport { z } from 'zod'\n\nconst configSchema = z.object({\n routeFilePrefix: z.string().optional(),\n routeFileIgnorePrefix: z.string().optional(),\n routesDirectory: z.string(),\n generatedRouteTree: z.string(),\n})\n\nexport type Config = z.infer<typeof configSchema>\n\nconst configFilePathJson = path.resolve(process.cwd(), 'tsr.config.json')\n\nexport async function getConfig(): Promise<Config> {\n const config = (await fs.readJson(configFilePathJson)) as unknown as Config\n\n return { routeFileIgnorePrefix: '-', ...configSchema.parse(config) }\n}\n"],"names":["configSchema","z","object","routeFilePrefix","string","optional","routeFileIgnorePrefix","routesDirectory","generatedRouteTree","configFilePathJson","path","resolve","process","cwd","getConfig","config","fs","readJson","parse"],"mappings":";;;;;;;;;;;;;;;;AAIA,MAAMA,YAAY,GAAGC,KAAC,CAACC,MAAM,CAAC;EAC5BC,eAAe,EAAEF,KAAC,CAACG,MAAM,EAAE,CAACC,QAAQ,EAAE;EACtCC,qBAAqB,EAAEL,KAAC,CAACG,MAAM,EAAE,CAACC,QAAQ,EAAE;AAC5CE,EAAAA,eAAe,EAAEN,KAAC,CAACG,MAAM,EAAE;AAC3BI,EAAAA,kBAAkB,EAAEP,KAAC,CAACG,MAAM,EAAC;AAC/B,CAAC,CAAC,CAAA;AAIF,MAAMK,kBAAkB,GAAGC,IAAI,CAACC,OAAO,CAACC,OAAO,CAACC,GAAG,EAAE,EAAE,iBAAiB,CAAC,CAAA;AAElE,eAAeC,SAASA,GAAoB;EACjD,MAAMC,MAAM,GAAI,MAAMC,EAAE,CAACC,QAAQ,CAACR,kBAAkB,CAAuB,CAAA;EAE3E,OAAO;AAAEH,IAAAA,qBAAqB,EAAE,GAAG;AAAE,IAAA,GAAGN,YAAY,CAACkB,KAAK,CAACH,MAAM,CAAA;GAAG,CAAA;AACtE;;;;"}
@@ -16,10 +16,5 @@ declare const configSchema: z.ZodObject<{
16
16
  routeFileIgnorePrefix?: string | undefined;
17
17
  }>;
18
18
  export type Config = z.infer<typeof configSchema>;
19
- export declare function getConfig(): Promise<{
20
- routesDirectory: string;
21
- generatedRouteTree: string;
22
- routeFilePrefix?: string | undefined;
23
- routeFileIgnorePrefix?: string | undefined;
24
- }>;
19
+ export declare function getConfig(): Promise<Config>;
25
20
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tanstack/router-cli",
3
3
  "author": "Tanner Linsley",
4
- "version": "0.0.1-beta.225",
4
+ "version": "0.0.1-beta.227",
5
5
  "license": "MIT",
6
6
  "repository": "tanstack/router",
7
7
  "homepage": "https://tanstack.com/router",
package/src/config.ts CHANGED
@@ -13,8 +13,8 @@ export type Config = z.infer<typeof configSchema>
13
13
 
14
14
  const configFilePathJson = path.resolve(process.cwd(), 'tsr.config.json')
15
15
 
16
- export async function getConfig() {
16
+ export async function getConfig(): Promise<Config> {
17
17
  const config = (await fs.readJson(configFilePathJson)) as unknown as Config
18
18
 
19
- return configSchema.parse(config)
19
+ return { routeFileIgnorePrefix: '-', ...configSchema.parse(config) }
20
20
  }