@tanstack/start-plugin-core 1.132.41 → 1.132.42
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.
- package/dist/esm/plugin.js +1 -0
- package/dist/esm/plugin.js.map +1 -1
- package/dist/esm/schema.d.ts +114 -84
- package/dist/esm/schema.js +7 -1
- package/dist/esm/schema.js.map +1 -1
- package/package.json +4 -4
- package/src/plugin.ts +1 -0
- package/src/schema.ts +10 -0
package/dist/esm/plugin.js
CHANGED
|
@@ -256,6 +256,7 @@ function TanStackStartVitePluginCore(corePluginOpts, startPluginOpts) {
|
|
|
256
256
|
// This is the ID that will be available to look up and import
|
|
257
257
|
// our server function manifest and resolve its module
|
|
258
258
|
manifestVirtualImportId: VIRTUAL_MODULES.serverFnManifest,
|
|
259
|
+
generateFunctionId: startPluginOpts?.serverFns?.generateFunctionId,
|
|
259
260
|
client: {
|
|
260
261
|
getRuntimeCode: () => `import { createClientRpc } from '@tanstack/${corePluginOpts.framework}-start/client-rpc'`,
|
|
261
262
|
replacer: (d) => `createClientRpc('${d.functionId}')`,
|
package/dist/esm/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["../../src/plugin.ts"],"sourcesContent":["import { joinPaths } from '@tanstack/router-core'\nimport { VIRTUAL_MODULES } from '@tanstack/start-server-core'\nimport { TanStackServerFnPluginEnv } from '@tanstack/server-functions-plugin'\nimport * as vite from 'vite'\nimport { crawlFrameworkPkgs } from 'vitefu'\nimport { join } from 'pathe'\nimport { escapePath } from 'tinyglobby'\nimport { startManifestPlugin } from './start-manifest-plugin/plugin'\nimport { startCompilerPlugin } from './start-compiler-plugin/plugin'\nimport { ENTRY_POINTS, VITE_ENVIRONMENT_NAMES } from './constants'\nimport { tanStackStartRouter } from './start-router-plugin/plugin'\nimport { loadEnvPlugin } from './load-env-plugin/plugin'\nimport { devServerPlugin } from './dev-server-plugin/plugin'\nimport { parseStartConfig } from './schema'\nimport { resolveEntry } from './resolve-entries'\nimport {\n getClientOutputDirectory,\n getServerOutputDirectory,\n} from './output-directory'\nimport { postServerBuild } from './post-server-build'\nimport { createServerFnPlugin } from './create-server-fn-plugin/plugin'\nimport type { ViteEnvironmentNames } from './constants'\nimport type {\n TanStackStartInputConfig,\n TanStackStartOutputConfig,\n} from './schema'\nimport type { PluginOption } from 'vite'\nimport type { CompileStartFrameworkOptions } from './start-compiler-plugin/compilers'\n\nexport interface TanStackStartVitePluginCoreOptions {\n framework: CompileStartFrameworkOptions\n defaultEntryPaths: {\n client: string\n server: string\n start: string\n }\n}\n\nexport interface ResolvedStartConfig {\n root: string\n startFilePath: string | undefined\n routerFilePath: string\n srcDirectory: string\n viteAppBase: string\n}\n\nexport type GetConfigFn = () => {\n startConfig: TanStackStartOutputConfig\n resolvedStartConfig: ResolvedStartConfig\n}\n\nfunction isFullUrl(str: string): boolean {\n try {\n new URL(str)\n return true\n } catch {\n return false\n }\n}\n\nexport function TanStackStartVitePluginCore(\n corePluginOpts: TanStackStartVitePluginCoreOptions,\n startPluginOpts: TanStackStartInputConfig,\n): Array<PluginOption> {\n const resolvedStartConfig: ResolvedStartConfig = {\n root: '',\n startFilePath: undefined,\n routerFilePath: '',\n srcDirectory: '',\n viteAppBase: '',\n }\n\n let startConfig: TanStackStartOutputConfig | null\n const getConfig: GetConfigFn = () => {\n if (!resolvedStartConfig.root) {\n throw new Error(`Cannot get config before root is resolved`)\n }\n if (!startConfig) {\n startConfig = parseStartConfig(\n startPluginOpts,\n corePluginOpts,\n resolvedStartConfig.root,\n )\n }\n return { startConfig, resolvedStartConfig }\n }\n\n const capturedBundle: Partial<\n Record<ViteEnvironmentNames, vite.Rollup.OutputBundle>\n > = {}\n\n function getBundle(envName: ViteEnvironmentNames): vite.Rollup.OutputBundle {\n const bundle = capturedBundle[envName]\n if (!bundle) {\n throw new Error(`No bundle captured for environment: ${envName}`)\n }\n return bundle\n }\n\n return [\n {\n name: 'tanstack-start-core:config',\n enforce: 'pre',\n async config(viteConfig, { command }) {\n resolvedStartConfig.viteAppBase = viteConfig.base ?? '/'\n if (!isFullUrl(resolvedStartConfig.viteAppBase)) {\n resolvedStartConfig.viteAppBase = joinPaths([\n '/',\n viteConfig.base,\n '/',\n ])\n }\n const root = viteConfig.root || process.cwd()\n resolvedStartConfig.root = root\n\n const { startConfig } = getConfig()\n if (startConfig.router.basepath === undefined) {\n if (!isFullUrl(resolvedStartConfig.viteAppBase)) {\n startConfig.router.basepath =\n resolvedStartConfig.viteAppBase.replace(/^\\/|\\/$/g, '')\n } else {\n startConfig.router.basepath = '/'\n }\n } else {\n if (command === 'serve' && !viteConfig.server?.middlewareMode) {\n // when serving, we must ensure that router basepath and viteAppBase are aligned\n if (\n !joinPaths(['/', startConfig.router.basepath, '/']).startsWith(\n joinPaths(['/', resolvedStartConfig.viteAppBase, '/']),\n )\n ) {\n this.error(\n '[tanstack-start]: During `vite dev`, `router.basepath` must start with the vite `base` config value',\n )\n }\n }\n }\n\n const TSS_SERVER_FN_BASE = joinPaths([\n '/',\n startConfig.router.basepath,\n startConfig.serverFns.base,\n '/',\n ])\n const resolvedSrcDirectory = join(root, startConfig.srcDirectory)\n resolvedStartConfig.srcDirectory = resolvedSrcDirectory\n\n const startFilePath = resolveEntry({\n type: 'start entry',\n configuredEntry: startConfig.start.entry,\n defaultEntry: 'start',\n resolvedSrcDirectory,\n required: false,\n })\n resolvedStartConfig.startFilePath = startFilePath\n\n const routerFilePath = resolveEntry({\n type: 'router entry',\n configuredEntry: startConfig.router.entry,\n defaultEntry: 'router',\n resolvedSrcDirectory,\n required: true,\n })\n resolvedStartConfig.routerFilePath = routerFilePath\n\n const clientEntryPath = resolveEntry({\n type: 'client entry',\n configuredEntry: startConfig.client.entry,\n defaultEntry: 'client',\n resolvedSrcDirectory,\n required: false,\n })\n\n const serverEntryPath = resolveEntry({\n type: 'server entry',\n configuredEntry: startConfig.server.entry,\n defaultEntry: 'server',\n resolvedSrcDirectory,\n required: false,\n })\n\n const clientAlias = vite.normalizePath(\n clientEntryPath ?? corePluginOpts.defaultEntryPaths.client,\n )\n const serverAlias = vite.normalizePath(\n serverEntryPath ?? corePluginOpts.defaultEntryPaths.server,\n )\n const startAlias = vite.normalizePath(\n startFilePath ?? corePluginOpts.defaultEntryPaths.start,\n )\n const routerAlias = vite.normalizePath(routerFilePath)\n\n const entryAliasConfiguration: Record<\n (typeof ENTRY_POINTS)[keyof typeof ENTRY_POINTS],\n string\n > = {\n [ENTRY_POINTS.client]: clientAlias,\n [ENTRY_POINTS.server]: serverAlias,\n [ENTRY_POINTS.start]: startAlias,\n [ENTRY_POINTS.router]: routerAlias,\n }\n\n const startPackageName =\n `@tanstack/${corePluginOpts.framework}-start` as const\n\n // crawl packages that have start in \"peerDependencies\"\n // see https://github.com/svitejs/vitefu/blob/d8d82fa121e3b2215ba437107093c77bde51b63b/src/index.js#L95-L101\n\n // this is currently uncached; could be implemented similarly as vite handles lock file changes\n // see https://github.com/vitejs/vite/blob/557f797d29422027e8c451ca50dd84bf8c41b5f0/packages/vite/src/node/optimizer/index.ts#L1282\n\n const crawlFrameworkPkgsResult = await crawlFrameworkPkgs({\n root: process.cwd(),\n isBuild: command === 'build',\n isFrameworkPkgByJson(pkgJson) {\n const peerDependencies = pkgJson['peerDependencies']\n\n if (peerDependencies) {\n return startPackageName in peerDependencies\n }\n\n return false\n },\n })\n\n return {\n // see https://vite.dev/config/shared-options.html#apptype\n // this will prevent vite from injecting middlewares that we don't want\n appType: viteConfig.appType ?? 'custom',\n environments: {\n [VITE_ENVIRONMENT_NAMES.client]: {\n consumer: 'client',\n build: {\n rollupOptions: {\n input: {\n main: ENTRY_POINTS.client,\n },\n },\n outDir: getClientOutputDirectory(viteConfig),\n },\n optimizeDeps: {\n // Ensure user code can be crawled for dependencies\n entries: [clientAlias, routerAlias].map((entry) =>\n // Entries are treated as `tinyglobby` patterns so need to be escaped\n escapePath(entry),\n ),\n },\n },\n [VITE_ENVIRONMENT_NAMES.server]: {\n consumer: 'server',\n build: {\n ssr: true,\n rollupOptions: {\n input:\n viteConfig.environments?.[VITE_ENVIRONMENT_NAMES.server]\n ?.build?.rollupOptions?.input ?? ENTRY_POINTS.server,\n },\n outDir: getServerOutputDirectory(viteConfig),\n commonjsOptions: {\n include: [/node_modules/],\n },\n copyPublicDir:\n viteConfig.environments?.[VITE_ENVIRONMENT_NAMES.server]\n ?.build?.copyPublicDir ?? false,\n },\n optimizeDeps: {\n // Ensure user code can be crawled for dependencies\n entries: [serverAlias, startAlias, routerAlias].map((entry) =>\n // Entries are treated as `tinyglobby` patterns so need to be escaped\n escapePath(entry),\n ),\n },\n },\n },\n\n resolve: {\n noExternal: [\n // ENTRY_POINTS.start,\n '@tanstack/start**',\n `@tanstack/${corePluginOpts.framework}-start**`,\n ...crawlFrameworkPkgsResult.ssr.noExternal.sort(),\n ],\n alias: {\n ...entryAliasConfiguration,\n },\n },\n /* prettier-ignore */\n define: {\n // define is an esbuild function that replaces the any instances of given keys with the given values\n // i.e: __FRAMEWORK_NAME__ can be replaced with JSON.stringify(\"TanStack Start\")\n // This is not the same as injecting environment variables.\n\n ...defineReplaceEnv('TSS_SERVER_FN_BASE', TSS_SERVER_FN_BASE),\n ...defineReplaceEnv('TSS_CLIENT_OUTPUT_DIR', getClientOutputDirectory(viteConfig)),\n ...defineReplaceEnv('TSS_ROUTER_BASEPATH', startConfig.router.basepath),\n ...(command === 'serve' ? defineReplaceEnv('TSS_SHELL', startConfig.spa?.enabled ? 'true' : 'false') : {}),\n ...defineReplaceEnv('TSS_DEV_SERVER', command === 'serve' ? 'true' : 'false'),\n },\n builder: {\n sharedPlugins: true,\n async buildApp(builder) {\n const client = builder.environments[VITE_ENVIRONMENT_NAMES.client]\n const server = builder.environments[VITE_ENVIRONMENT_NAMES.server]\n\n if (!client) {\n throw new Error('Client environment not found')\n }\n\n if (!server) {\n throw new Error('SSR environment not found')\n }\n\n if (!client.isBuilt) {\n // Build the client bundle first\n await builder.build(client)\n }\n if (!server.isBuilt) {\n // Build the SSR bundle\n await builder.build(server)\n }\n const serverBundle = getBundle(VITE_ENVIRONMENT_NAMES.server)\n await postServerBuild({ builder, startConfig, serverBundle })\n },\n },\n }\n },\n },\n tanStackStartRouter(startPluginOpts, getConfig, corePluginOpts),\n // N.B. TanStackStartCompilerPlugin must be before the TanStackServerFnPluginEnv\n startCompilerPlugin(corePluginOpts.framework),\n createServerFnPlugin(corePluginOpts.framework),\n\n TanStackServerFnPluginEnv({\n // This is the ID that will be available to look up and import\n // our server function manifest and resolve its module\n manifestVirtualImportId: VIRTUAL_MODULES.serverFnManifest,\n client: {\n getRuntimeCode: () =>\n `import { createClientRpc } from '@tanstack/${corePluginOpts.framework}-start/client-rpc'`,\n replacer: (d) => `createClientRpc('${d.functionId}')`,\n envName: VITE_ENVIRONMENT_NAMES.client,\n },\n server: {\n getRuntimeCode: () =>\n `import { createServerRpc } from '@tanstack/${corePluginOpts.framework}-start/server-rpc'`,\n replacer: (d) => `createServerRpc('${d.functionId}', ${d.fn})`,\n envName: VITE_ENVIRONMENT_NAMES.server,\n },\n }),\n loadEnvPlugin(),\n startManifestPlugin({\n getClientBundle: () => getBundle(VITE_ENVIRONMENT_NAMES.client),\n getConfig,\n }),\n devServerPlugin({ getConfig }),\n {\n name: 'tanstack-start:core:capture-bundle',\n applyToEnvironment(e) {\n return (\n e.name === VITE_ENVIRONMENT_NAMES.client ||\n e.name === VITE_ENVIRONMENT_NAMES.server\n )\n },\n enforce: 'post',\n generateBundle(_options, bundle) {\n const environment = this.environment.name as ViteEnvironmentNames\n if (!Object.values(VITE_ENVIRONMENT_NAMES).includes(environment)) {\n throw new Error(`Unknown environment: ${environment}`)\n }\n capturedBundle[environment] = bundle\n },\n },\n ]\n}\n\nfunction defineReplaceEnv<TKey extends string, TValue extends string>(\n key: TKey,\n value: TValue,\n): { [P in `process.env.${TKey}` | `import.meta.env.${TKey}`]: TValue } {\n return {\n [`process.env.${key}`]: JSON.stringify(value),\n [`import.meta.env.${key}`]: JSON.stringify(value),\n } as { [P in `process.env.${TKey}` | `import.meta.env.${TKey}`]: TValue }\n}\n"],"names":["startConfig"],"mappings":";;;;;;;;;;;;;;;;;;AAmDA,SAAS,UAAU,KAAsB;AACvC,MAAI;AACF,QAAI,IAAI,GAAG;AACX,WAAO;AAAA,EACT,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEO,SAAS,4BACd,gBACA,iBACqB;AACrB,QAAM,sBAA2C;AAAA,IAC/C,MAAM;AAAA,IACN,eAAe;AAAA,IACf,gBAAgB;AAAA,IAChB,cAAc;AAAA,IACd,aAAa;AAAA,EAAA;AAGf,MAAI;AACJ,QAAM,YAAyB,MAAM;AACnC,QAAI,CAAC,oBAAoB,MAAM;AAC7B,YAAM,IAAI,MAAM,2CAA2C;AAAA,IAC7D;AACA,QAAI,CAAC,aAAa;AAChB,oBAAc;AAAA,QACZ;AAAA,QACA;AAAA,QACA,oBAAoB;AAAA,MAAA;AAAA,IAExB;AACA,WAAO,EAAE,aAAa,oBAAA;AAAA,EACxB;AAEA,QAAM,iBAEF,CAAA;AAEJ,WAAS,UAAU,SAAyD;AAC1E,UAAM,SAAS,eAAe,OAAO;AACrC,QAAI,CAAC,QAAQ;AACX,YAAM,IAAI,MAAM,uCAAuC,OAAO,EAAE;AAAA,IAClE;AACA,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,MACE,MAAM;AAAA,MACN,SAAS;AAAA,MACT,MAAM,OAAO,YAAY,EAAE,WAAW;AACpC,4BAAoB,cAAc,WAAW,QAAQ;AACrD,YAAI,CAAC,UAAU,oBAAoB,WAAW,GAAG;AAC/C,8BAAoB,cAAc,UAAU;AAAA,YAC1C;AAAA,YACA,WAAW;AAAA,YACX;AAAA,UAAA,CACD;AAAA,QACH;AACA,cAAM,OAAO,WAAW,QAAQ,QAAQ,IAAA;AACxC,4BAAoB,OAAO;AAE3B,cAAM,EAAE,aAAAA,aAAAA,IAAgB,UAAA;AACxB,YAAIA,aAA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AEtC;AAAA,MACA,SAAS;AAAA,MACT,eAAe,UAAU,QAAQ;AAC/B,cAAM,cAAc,KAAK,YAAY;AACrC,YAAI,CAAC,OAAO,OAAO,sBAAsB,EAAE,SAAS,WAAW,GAAG;AAChE,gBAAM,IAAI,MAAM,wBAAwB,WAAW,EAAE;AAAA,QACvD;AACA,uBAAe,WAAW,IAAI;AAAA,MAChC;AAAA,IAAA;AAAA,EACF;AAEJ;AAEA,SAAS,iBACP,KACA,OACsE;AACtE,SAAO;AAAA,IACL,CAAC,eAAe,GAAG,EAAE,GAAG,KAAK,UAAU,KAAK;AAAA,IAC5C,CAAC,mBAAmB,GAAG,EAAE,GAAG,KAAK,UAAU,KAAK;AAAA,EAAA;AAEpD;"}
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["../../src/plugin.ts"],"sourcesContent":["import { joinPaths } from '@tanstack/router-core'\nimport { VIRTUAL_MODULES } from '@tanstack/start-server-core'\nimport { TanStackServerFnPluginEnv } from '@tanstack/server-functions-plugin'\nimport * as vite from 'vite'\nimport { crawlFrameworkPkgs } from 'vitefu'\nimport { join } from 'pathe'\nimport { escapePath } from 'tinyglobby'\nimport { startManifestPlugin } from './start-manifest-plugin/plugin'\nimport { startCompilerPlugin } from './start-compiler-plugin/plugin'\nimport { ENTRY_POINTS, VITE_ENVIRONMENT_NAMES } from './constants'\nimport { tanStackStartRouter } from './start-router-plugin/plugin'\nimport { loadEnvPlugin } from './load-env-plugin/plugin'\nimport { devServerPlugin } from './dev-server-plugin/plugin'\nimport { parseStartConfig } from './schema'\nimport { resolveEntry } from './resolve-entries'\nimport {\n getClientOutputDirectory,\n getServerOutputDirectory,\n} from './output-directory'\nimport { postServerBuild } from './post-server-build'\nimport { createServerFnPlugin } from './create-server-fn-plugin/plugin'\nimport type { ViteEnvironmentNames } from './constants'\nimport type {\n TanStackStartInputConfig,\n TanStackStartOutputConfig,\n} from './schema'\nimport type { PluginOption } from 'vite'\nimport type { CompileStartFrameworkOptions } from './start-compiler-plugin/compilers'\n\nexport interface TanStackStartVitePluginCoreOptions {\n framework: CompileStartFrameworkOptions\n defaultEntryPaths: {\n client: string\n server: string\n start: string\n }\n}\n\nexport interface ResolvedStartConfig {\n root: string\n startFilePath: string | undefined\n routerFilePath: string\n srcDirectory: string\n viteAppBase: string\n}\n\nexport type GetConfigFn = () => {\n startConfig: TanStackStartOutputConfig\n resolvedStartConfig: ResolvedStartConfig\n}\n\nfunction isFullUrl(str: string): boolean {\n try {\n new URL(str)\n return true\n } catch {\n return false\n }\n}\n\nexport function TanStackStartVitePluginCore(\n corePluginOpts: TanStackStartVitePluginCoreOptions,\n startPluginOpts: TanStackStartInputConfig,\n): Array<PluginOption> {\n const resolvedStartConfig: ResolvedStartConfig = {\n root: '',\n startFilePath: undefined,\n routerFilePath: '',\n srcDirectory: '',\n viteAppBase: '',\n }\n\n let startConfig: TanStackStartOutputConfig | null\n const getConfig: GetConfigFn = () => {\n if (!resolvedStartConfig.root) {\n throw new Error(`Cannot get config before root is resolved`)\n }\n if (!startConfig) {\n startConfig = parseStartConfig(\n startPluginOpts,\n corePluginOpts,\n resolvedStartConfig.root,\n )\n }\n return { startConfig, resolvedStartConfig }\n }\n\n const capturedBundle: Partial<\n Record<ViteEnvironmentNames, vite.Rollup.OutputBundle>\n > = {}\n\n function getBundle(envName: ViteEnvironmentNames): vite.Rollup.OutputBundle {\n const bundle = capturedBundle[envName]\n if (!bundle) {\n throw new Error(`No bundle captured for environment: ${envName}`)\n }\n return bundle\n }\n\n return [\n {\n name: 'tanstack-start-core:config',\n enforce: 'pre',\n async config(viteConfig, { command }) {\n resolvedStartConfig.viteAppBase = viteConfig.base ?? '/'\n if (!isFullUrl(resolvedStartConfig.viteAppBase)) {\n resolvedStartConfig.viteAppBase = joinPaths([\n '/',\n viteConfig.base,\n '/',\n ])\n }\n const root = viteConfig.root || process.cwd()\n resolvedStartConfig.root = root\n\n const { startConfig } = getConfig()\n if (startConfig.router.basepath === undefined) {\n if (!isFullUrl(resolvedStartConfig.viteAppBase)) {\n startConfig.router.basepath =\n resolvedStartConfig.viteAppBase.replace(/^\\/|\\/$/g, '')\n } else {\n startConfig.router.basepath = '/'\n }\n } else {\n if (command === 'serve' && !viteConfig.server?.middlewareMode) {\n // when serving, we must ensure that router basepath and viteAppBase are aligned\n if (\n !joinPaths(['/', startConfig.router.basepath, '/']).startsWith(\n joinPaths(['/', resolvedStartConfig.viteAppBase, '/']),\n )\n ) {\n this.error(\n '[tanstack-start]: During `vite dev`, `router.basepath` must start with the vite `base` config value',\n )\n }\n }\n }\n\n const TSS_SERVER_FN_BASE = joinPaths([\n '/',\n startConfig.router.basepath,\n startConfig.serverFns.base,\n '/',\n ])\n const resolvedSrcDirectory = join(root, startConfig.srcDirectory)\n resolvedStartConfig.srcDirectory = resolvedSrcDirectory\n\n const startFilePath = resolveEntry({\n type: 'start entry',\n configuredEntry: startConfig.start.entry,\n defaultEntry: 'start',\n resolvedSrcDirectory,\n required: false,\n })\n resolvedStartConfig.startFilePath = startFilePath\n\n const routerFilePath = resolveEntry({\n type: 'router entry',\n configuredEntry: startConfig.router.entry,\n defaultEntry: 'router',\n resolvedSrcDirectory,\n required: true,\n })\n resolvedStartConfig.routerFilePath = routerFilePath\n\n const clientEntryPath = resolveEntry({\n type: 'client entry',\n configuredEntry: startConfig.client.entry,\n defaultEntry: 'client',\n resolvedSrcDirectory,\n required: false,\n })\n\n const serverEntryPath = resolveEntry({\n type: 'server entry',\n configuredEntry: startConfig.server.entry,\n defaultEntry: 'server',\n resolvedSrcDirectory,\n required: false,\n })\n\n const clientAlias = vite.normalizePath(\n clientEntryPath ?? corePluginOpts.defaultEntryPaths.client,\n )\n const serverAlias = vite.normalizePath(\n serverEntryPath ?? corePluginOpts.defaultEntryPaths.server,\n )\n const startAlias = vite.normalizePath(\n startFilePath ?? corePluginOpts.defaultEntryPaths.start,\n )\n const routerAlias = vite.normalizePath(routerFilePath)\n\n const entryAliasConfiguration: Record<\n (typeof ENTRY_POINTS)[keyof typeof ENTRY_POINTS],\n string\n > = {\n [ENTRY_POINTS.client]: clientAlias,\n [ENTRY_POINTS.server]: serverAlias,\n [ENTRY_POINTS.start]: startAlias,\n [ENTRY_POINTS.router]: routerAlias,\n }\n\n const startPackageName =\n `@tanstack/${corePluginOpts.framework}-start` as const\n\n // crawl packages that have start in \"peerDependencies\"\n // see https://github.com/svitejs/vitefu/blob/d8d82fa121e3b2215ba437107093c77bde51b63b/src/index.js#L95-L101\n\n // this is currently uncached; could be implemented similarly as vite handles lock file changes\n // see https://github.com/vitejs/vite/blob/557f797d29422027e8c451ca50dd84bf8c41b5f0/packages/vite/src/node/optimizer/index.ts#L1282\n\n const crawlFrameworkPkgsResult = await crawlFrameworkPkgs({\n root: process.cwd(),\n isBuild: command === 'build',\n isFrameworkPkgByJson(pkgJson) {\n const peerDependencies = pkgJson['peerDependencies']\n\n if (peerDependencies) {\n return startPackageName in peerDependencies\n }\n\n return false\n },\n })\n\n return {\n // see https://vite.dev/config/shared-options.html#apptype\n // this will prevent vite from injecting middlewares that we don't want\n appType: viteConfig.appType ?? 'custom',\n environments: {\n [VITE_ENVIRONMENT_NAMES.client]: {\n consumer: 'client',\n build: {\n rollupOptions: {\n input: {\n main: ENTRY_POINTS.client,\n },\n },\n outDir: getClientOutputDirectory(viteConfig),\n },\n optimizeDeps: {\n // Ensure user code can be crawled for dependencies\n entries: [clientAlias, routerAlias].map((entry) =>\n // Entries are treated as `tinyglobby` patterns so need to be escaped\n escapePath(entry),\n ),\n },\n },\n [VITE_ENVIRONMENT_NAMES.server]: {\n consumer: 'server',\n build: {\n ssr: true,\n rollupOptions: {\n input:\n viteConfig.environments?.[VITE_ENVIRONMENT_NAMES.server]\n ?.build?.rollupOptions?.input ?? ENTRY_POINTS.server,\n },\n outDir: getServerOutputDirectory(viteConfig),\n commonjsOptions: {\n include: [/node_modules/],\n },\n copyPublicDir:\n viteConfig.environments?.[VITE_ENVIRONMENT_NAMES.server]\n ?.build?.copyPublicDir ?? false,\n },\n optimizeDeps: {\n // Ensure user code can be crawled for dependencies\n entries: [serverAlias, startAlias, routerAlias].map((entry) =>\n // Entries are treated as `tinyglobby` patterns so need to be escaped\n escapePath(entry),\n ),\n },\n },\n },\n\n resolve: {\n noExternal: [\n // ENTRY_POINTS.start,\n '@tanstack/start**',\n `@tanstack/${corePluginOpts.framework}-start**`,\n ...crawlFrameworkPkgsResult.ssr.noExternal.sort(),\n ],\n alias: {\n ...entryAliasConfiguration,\n },\n },\n /* prettier-ignore */\n define: {\n // define is an esbuild function that replaces the any instances of given keys with the given values\n // i.e: __FRAMEWORK_NAME__ can be replaced with JSON.stringify(\"TanStack Start\")\n // This is not the same as injecting environment variables.\n\n ...defineReplaceEnv('TSS_SERVER_FN_BASE', TSS_SERVER_FN_BASE),\n ...defineReplaceEnv('TSS_CLIENT_OUTPUT_DIR', getClientOutputDirectory(viteConfig)),\n ...defineReplaceEnv('TSS_ROUTER_BASEPATH', startConfig.router.basepath),\n ...(command === 'serve' ? defineReplaceEnv('TSS_SHELL', startConfig.spa?.enabled ? 'true' : 'false') : {}),\n ...defineReplaceEnv('TSS_DEV_SERVER', command === 'serve' ? 'true' : 'false'),\n },\n builder: {\n sharedPlugins: true,\n async buildApp(builder) {\n const client = builder.environments[VITE_ENVIRONMENT_NAMES.client]\n const server = builder.environments[VITE_ENVIRONMENT_NAMES.server]\n\n if (!client) {\n throw new Error('Client environment not found')\n }\n\n if (!server) {\n throw new Error('SSR environment not found')\n }\n\n if (!client.isBuilt) {\n // Build the client bundle first\n await builder.build(client)\n }\n if (!server.isBuilt) {\n // Build the SSR bundle\n await builder.build(server)\n }\n const serverBundle = getBundle(VITE_ENVIRONMENT_NAMES.server)\n await postServerBuild({ builder, startConfig, serverBundle })\n },\n },\n }\n },\n },\n tanStackStartRouter(startPluginOpts, getConfig, corePluginOpts),\n // N.B. TanStackStartCompilerPlugin must be before the TanStackServerFnPluginEnv\n startCompilerPlugin(corePluginOpts.framework),\n createServerFnPlugin(corePluginOpts.framework),\n\n TanStackServerFnPluginEnv({\n // This is the ID that will be available to look up and import\n // our server function manifest and resolve its module\n manifestVirtualImportId: VIRTUAL_MODULES.serverFnManifest,\n generateFunctionId: startPluginOpts?.serverFns?.generateFunctionId,\n client: {\n getRuntimeCode: () =>\n `import { createClientRpc } from '@tanstack/${corePluginOpts.framework}-start/client-rpc'`,\n replacer: (d) => `createClientRpc('${d.functionId}')`,\n envName: VITE_ENVIRONMENT_NAMES.client,\n },\n server: {\n getRuntimeCode: () =>\n `import { createServerRpc } from '@tanstack/${corePluginOpts.framework}-start/server-rpc'`,\n replacer: (d) => `createServerRpc('${d.functionId}', ${d.fn})`,\n envName: VITE_ENVIRONMENT_NAMES.server,\n },\n }),\n loadEnvPlugin(),\n startManifestPlugin({\n getClientBundle: () => getBundle(VITE_ENVIRONMENT_NAMES.client),\n getConfig,\n }),\n devServerPlugin({ getConfig }),\n {\n name: 'tanstack-start:core:capture-bundle',\n applyToEnvironment(e) {\n return (\n e.name === VITE_ENVIRONMENT_NAMES.client ||\n e.name === VITE_ENVIRONMENT_NAMES.server\n )\n },\n enforce: 'post',\n generateBundle(_options, bundle) {\n const environment = this.environment.name as ViteEnvironmentNames\n if (!Object.values(VITE_ENVIRONMENT_NAMES).includes(environment)) {\n throw new Error(`Unknown environment: ${environment}`)\n }\n capturedBundle[environment] = bundle\n },\n },\n ]\n}\n\nfunction defineReplaceEnv<TKey extends string, TValue extends string>(\n key: TKey,\n value: TValue,\n): { [P in `process.env.${TKey}` | `import.meta.env.${TKey}`]: TValue } {\n return {\n [`process.env.${key}`]: JSON.stringify(value),\n [`import.meta.env.${key}`]: JSON.stringify(value),\n } as { [P in `process.env.${TKey}` | `import.meta.env.${TKey}`]: TValue }\n}\n"],"names":["startConfig"],"mappings":";;;;;;;;;;;;;;;;;;AAmDA,SAAS,UAAU,KAAsB;AACvC,MAAI;AACF,QAAI,IAAI,GAAG;AACX,WAAO;AAAA,EACT,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AA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ACvD;AACA,uBAAe,WAAW,IAAI;AAAA,MAChC;AAAA,IAAA;AAAA,EACF;AAEJ;AAEA,SAAS,iBACP,KACA,OACsE;AACtE,SAAO;AAAA,IACL,CAAC,eAAe,GAAG,EAAE,GAAG,KAAK,UAAU,KAAK;AAAA,IAC5C,CAAC,mBAAmB,GAAG,EAAE,GAAG,KAAK,UAAU,KAAK;AAAA,EAAA;AAEpD;"}
|
package/dist/esm/schema.d.ts
CHANGED
|
@@ -55,13 +55,17 @@ export declare function parseStartConfig(opts: z.input<typeof tanstackStartOptio
|
|
|
55
55
|
srcDirectory: string;
|
|
56
56
|
serverFns: {
|
|
57
57
|
base: string;
|
|
58
|
+
generateFunctionId?: ((args_0: {
|
|
59
|
+
filename: string;
|
|
60
|
+
functionName: string;
|
|
61
|
+
}, ...args: unknown[]) => string | undefined) | undefined;
|
|
58
62
|
};
|
|
59
63
|
pages: {
|
|
60
64
|
path: string;
|
|
61
65
|
sitemap?: {
|
|
62
66
|
exclude?: boolean | undefined;
|
|
63
67
|
priority?: number | undefined;
|
|
64
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
68
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
65
69
|
lastmod?: string | Date | undefined;
|
|
66
70
|
alternateRefs?: {
|
|
67
71
|
href: string;
|
|
@@ -96,7 +100,7 @@ export declare function parseStartConfig(opts: z.input<typeof tanstackStartOptio
|
|
|
96
100
|
sitemap?: {
|
|
97
101
|
exclude?: boolean | undefined;
|
|
98
102
|
priority?: number | undefined;
|
|
99
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
103
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
100
104
|
lastmod?: string | Date | undefined;
|
|
101
105
|
alternateRefs?: {
|
|
102
106
|
href: string;
|
|
@@ -138,7 +142,7 @@ export declare function parseStartConfig(opts: z.input<typeof tanstackStartOptio
|
|
|
138
142
|
sitemap?: {
|
|
139
143
|
exclude?: boolean | undefined;
|
|
140
144
|
priority?: number | undefined;
|
|
141
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
145
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
142
146
|
lastmod?: string | Date | undefined;
|
|
143
147
|
alternateRefs?: {
|
|
144
148
|
href: string;
|
|
@@ -176,7 +180,7 @@ export declare function parseStartConfig(opts: z.input<typeof tanstackStartOptio
|
|
|
176
180
|
sitemap?: {
|
|
177
181
|
exclude?: boolean | undefined;
|
|
178
182
|
priority?: number | undefined;
|
|
179
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
183
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
180
184
|
lastmod?: string | Date | undefined;
|
|
181
185
|
alternateRefs?: {
|
|
182
186
|
href: string;
|
|
@@ -211,7 +215,7 @@ export declare function parseStartConfig(opts: z.input<typeof tanstackStartOptio
|
|
|
211
215
|
sitemap?: {
|
|
212
216
|
exclude?: boolean | undefined;
|
|
213
217
|
priority?: number | undefined;
|
|
214
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
218
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
215
219
|
lastmod?: string | Date | undefined;
|
|
216
220
|
alternateRefs?: {
|
|
217
221
|
href: string;
|
|
@@ -254,7 +258,7 @@ export declare function parseStartConfig(opts: z.input<typeof tanstackStartOptio
|
|
|
254
258
|
sitemap?: {
|
|
255
259
|
exclude?: boolean | undefined;
|
|
256
260
|
priority?: number | undefined;
|
|
257
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
261
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
258
262
|
lastmod?: string | Date | undefined;
|
|
259
263
|
alternateRefs?: {
|
|
260
264
|
href: string;
|
|
@@ -344,7 +348,7 @@ declare const pageSchema: z.ZodObject<{
|
|
|
344
348
|
}, "strip", z.ZodTypeAny, {
|
|
345
349
|
exclude?: boolean | undefined;
|
|
346
350
|
priority?: number | undefined;
|
|
347
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
351
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
348
352
|
lastmod?: string | Date | undefined;
|
|
349
353
|
alternateRefs?: {
|
|
350
354
|
href: string;
|
|
@@ -366,7 +370,7 @@ declare const pageSchema: z.ZodObject<{
|
|
|
366
370
|
}, {
|
|
367
371
|
exclude?: boolean | undefined;
|
|
368
372
|
priority?: number | undefined;
|
|
369
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
373
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
370
374
|
lastmod?: string | Date | undefined;
|
|
371
375
|
alternateRefs?: {
|
|
372
376
|
href: string;
|
|
@@ -457,7 +461,7 @@ declare const pageSchema: z.ZodObject<{
|
|
|
457
461
|
}, "strip", z.ZodTypeAny, {
|
|
458
462
|
exclude?: boolean | undefined;
|
|
459
463
|
priority?: number | undefined;
|
|
460
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
464
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
461
465
|
lastmod?: string | Date | undefined;
|
|
462
466
|
alternateRefs?: {
|
|
463
467
|
href: string;
|
|
@@ -479,7 +483,7 @@ declare const pageSchema: z.ZodObject<{
|
|
|
479
483
|
}, {
|
|
480
484
|
exclude?: boolean | undefined;
|
|
481
485
|
priority?: number | undefined;
|
|
482
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
486
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
483
487
|
lastmod?: string | Date | undefined;
|
|
484
488
|
alternateRefs?: {
|
|
485
489
|
href: string;
|
|
@@ -505,7 +509,7 @@ declare const pageSchema: z.ZodObject<{
|
|
|
505
509
|
sitemap?: {
|
|
506
510
|
exclude?: boolean | undefined;
|
|
507
511
|
priority?: number | undefined;
|
|
508
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
512
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
509
513
|
lastmod?: string | Date | undefined;
|
|
510
514
|
alternateRefs?: {
|
|
511
515
|
href: string;
|
|
@@ -531,7 +535,7 @@ declare const pageSchema: z.ZodObject<{
|
|
|
531
535
|
sitemap?: {
|
|
532
536
|
exclude?: boolean | undefined;
|
|
533
537
|
priority?: number | undefined;
|
|
534
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
538
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
535
539
|
lastmod?: string | Date | undefined;
|
|
536
540
|
alternateRefs?: {
|
|
537
541
|
href: string;
|
|
@@ -561,7 +565,7 @@ declare const pageSchema: z.ZodObject<{
|
|
|
561
565
|
sitemap?: {
|
|
562
566
|
exclude?: boolean | undefined;
|
|
563
567
|
priority?: number | undefined;
|
|
564
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
568
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
565
569
|
lastmod?: string | Date | undefined;
|
|
566
570
|
alternateRefs?: {
|
|
567
571
|
href: string;
|
|
@@ -590,7 +594,7 @@ declare const pageSchema: z.ZodObject<{
|
|
|
590
594
|
sitemap?: {
|
|
591
595
|
exclude?: boolean | undefined;
|
|
592
596
|
priority?: number | undefined;
|
|
593
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
597
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
594
598
|
lastmod?: string | Date | undefined;
|
|
595
599
|
alternateRefs?: {
|
|
596
600
|
href: string;
|
|
@@ -628,7 +632,7 @@ declare const pageSchema: z.ZodObject<{
|
|
|
628
632
|
sitemap?: {
|
|
629
633
|
exclude?: boolean | undefined;
|
|
630
634
|
priority?: number | undefined;
|
|
631
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
635
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
632
636
|
lastmod?: string | Date | undefined;
|
|
633
637
|
alternateRefs?: {
|
|
634
638
|
href: string;
|
|
@@ -666,7 +670,7 @@ declare const pageSchema: z.ZodObject<{
|
|
|
666
670
|
sitemap?: {
|
|
667
671
|
exclude?: boolean | undefined;
|
|
668
672
|
priority?: number | undefined;
|
|
669
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
673
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
670
674
|
lastmod?: string | Date | undefined;
|
|
671
675
|
alternateRefs?: {
|
|
672
676
|
href: string;
|
|
@@ -696,7 +700,7 @@ declare const pageSchema: z.ZodObject<{
|
|
|
696
700
|
sitemap?: {
|
|
697
701
|
exclude?: boolean | undefined;
|
|
698
702
|
priority?: number | undefined;
|
|
699
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
703
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
700
704
|
lastmod?: string | Date | undefined;
|
|
701
705
|
alternateRefs?: {
|
|
702
706
|
href: string;
|
|
@@ -731,7 +735,7 @@ declare const pageSchema: z.ZodObject<{
|
|
|
731
735
|
sitemap?: {
|
|
732
736
|
exclude?: boolean | undefined;
|
|
733
737
|
priority?: number | undefined;
|
|
734
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
738
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
735
739
|
lastmod?: string | Date | undefined;
|
|
736
740
|
alternateRefs?: {
|
|
737
741
|
href: string;
|
|
@@ -761,7 +765,7 @@ declare const pageSchema: z.ZodObject<{
|
|
|
761
765
|
sitemap?: {
|
|
762
766
|
exclude?: boolean | undefined;
|
|
763
767
|
priority?: number | undefined;
|
|
764
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
768
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
765
769
|
lastmod?: string | Date | undefined;
|
|
766
770
|
alternateRefs?: {
|
|
767
771
|
href: string;
|
|
@@ -796,7 +800,7 @@ declare const pageSchema: z.ZodObject<{
|
|
|
796
800
|
sitemap?: {
|
|
797
801
|
exclude?: boolean | undefined;
|
|
798
802
|
priority?: number | undefined;
|
|
799
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
803
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
800
804
|
lastmod?: string | Date | undefined;
|
|
801
805
|
alternateRefs?: {
|
|
802
806
|
href: string;
|
|
@@ -987,10 +991,28 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
987
991
|
}>>>;
|
|
988
992
|
serverFns: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
989
993
|
base: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
994
|
+
generateFunctionId: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
995
|
+
filename: z.ZodString;
|
|
996
|
+
functionName: z.ZodString;
|
|
997
|
+
}, "strip", z.ZodTypeAny, {
|
|
998
|
+
filename: string;
|
|
999
|
+
functionName: string;
|
|
1000
|
+
}, {
|
|
1001
|
+
filename: string;
|
|
1002
|
+
functionName: string;
|
|
1003
|
+
}>], z.ZodUnknown>, z.ZodOptional<z.ZodString>>>;
|
|
990
1004
|
}, "strip", z.ZodTypeAny, {
|
|
991
1005
|
base: string;
|
|
1006
|
+
generateFunctionId?: ((args_0: {
|
|
1007
|
+
filename: string;
|
|
1008
|
+
functionName: string;
|
|
1009
|
+
}, ...args: unknown[]) => string | undefined) | undefined;
|
|
992
1010
|
}, {
|
|
993
1011
|
base?: string | undefined;
|
|
1012
|
+
generateFunctionId?: ((args_0: {
|
|
1013
|
+
filename: string;
|
|
1014
|
+
functionName: string;
|
|
1015
|
+
}, ...args: unknown[]) => string | undefined) | undefined;
|
|
994
1016
|
}>>>;
|
|
995
1017
|
pages: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
996
1018
|
path: z.ZodString;
|
|
@@ -1053,7 +1075,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
1053
1075
|
}, "strip", z.ZodTypeAny, {
|
|
1054
1076
|
exclude?: boolean | undefined;
|
|
1055
1077
|
priority?: number | undefined;
|
|
1056
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
1078
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
1057
1079
|
lastmod?: string | Date | undefined;
|
|
1058
1080
|
alternateRefs?: {
|
|
1059
1081
|
href: string;
|
|
@@ -1075,7 +1097,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
1075
1097
|
}, {
|
|
1076
1098
|
exclude?: boolean | undefined;
|
|
1077
1099
|
priority?: number | undefined;
|
|
1078
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
1100
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
1079
1101
|
lastmod?: string | Date | undefined;
|
|
1080
1102
|
alternateRefs?: {
|
|
1081
1103
|
href: string;
|
|
@@ -1166,7 +1188,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
1166
1188
|
}, "strip", z.ZodTypeAny, {
|
|
1167
1189
|
exclude?: boolean | undefined;
|
|
1168
1190
|
priority?: number | undefined;
|
|
1169
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
1191
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
1170
1192
|
lastmod?: string | Date | undefined;
|
|
1171
1193
|
alternateRefs?: {
|
|
1172
1194
|
href: string;
|
|
@@ -1188,7 +1210,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
1188
1210
|
}, {
|
|
1189
1211
|
exclude?: boolean | undefined;
|
|
1190
1212
|
priority?: number | undefined;
|
|
1191
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
1213
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
1192
1214
|
lastmod?: string | Date | undefined;
|
|
1193
1215
|
alternateRefs?: {
|
|
1194
1216
|
href: string;
|
|
@@ -1214,7 +1236,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
1214
1236
|
sitemap?: {
|
|
1215
1237
|
exclude?: boolean | undefined;
|
|
1216
1238
|
priority?: number | undefined;
|
|
1217
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
1239
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
1218
1240
|
lastmod?: string | Date | undefined;
|
|
1219
1241
|
alternateRefs?: {
|
|
1220
1242
|
href: string;
|
|
@@ -1240,7 +1262,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
1240
1262
|
sitemap?: {
|
|
1241
1263
|
exclude?: boolean | undefined;
|
|
1242
1264
|
priority?: number | undefined;
|
|
1243
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
1265
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
1244
1266
|
lastmod?: string | Date | undefined;
|
|
1245
1267
|
alternateRefs?: {
|
|
1246
1268
|
href: string;
|
|
@@ -1270,7 +1292,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
1270
1292
|
sitemap?: {
|
|
1271
1293
|
exclude?: boolean | undefined;
|
|
1272
1294
|
priority?: number | undefined;
|
|
1273
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
1295
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
1274
1296
|
lastmod?: string | Date | undefined;
|
|
1275
1297
|
alternateRefs?: {
|
|
1276
1298
|
href: string;
|
|
@@ -1299,7 +1321,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
1299
1321
|
sitemap?: {
|
|
1300
1322
|
exclude?: boolean | undefined;
|
|
1301
1323
|
priority?: number | undefined;
|
|
1302
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
1324
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
1303
1325
|
lastmod?: string | Date | undefined;
|
|
1304
1326
|
alternateRefs?: {
|
|
1305
1327
|
href: string;
|
|
@@ -1337,7 +1359,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
1337
1359
|
sitemap?: {
|
|
1338
1360
|
exclude?: boolean | undefined;
|
|
1339
1361
|
priority?: number | undefined;
|
|
1340
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
1362
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
1341
1363
|
lastmod?: string | Date | undefined;
|
|
1342
1364
|
alternateRefs?: {
|
|
1343
1365
|
href: string;
|
|
@@ -1375,7 +1397,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
1375
1397
|
sitemap?: {
|
|
1376
1398
|
exclude?: boolean | undefined;
|
|
1377
1399
|
priority?: number | undefined;
|
|
1378
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
1400
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
1379
1401
|
lastmod?: string | Date | undefined;
|
|
1380
1402
|
alternateRefs?: {
|
|
1381
1403
|
href: string;
|
|
@@ -1405,7 +1427,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
1405
1427
|
sitemap?: {
|
|
1406
1428
|
exclude?: boolean | undefined;
|
|
1407
1429
|
priority?: number | undefined;
|
|
1408
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
1430
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
1409
1431
|
lastmod?: string | Date | undefined;
|
|
1410
1432
|
alternateRefs?: {
|
|
1411
1433
|
href: string;
|
|
@@ -1440,7 +1462,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
1440
1462
|
sitemap?: {
|
|
1441
1463
|
exclude?: boolean | undefined;
|
|
1442
1464
|
priority?: number | undefined;
|
|
1443
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
1465
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
1444
1466
|
lastmod?: string | Date | undefined;
|
|
1445
1467
|
alternateRefs?: {
|
|
1446
1468
|
href: string;
|
|
@@ -1470,7 +1492,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
1470
1492
|
sitemap?: {
|
|
1471
1493
|
exclude?: boolean | undefined;
|
|
1472
1494
|
priority?: number | undefined;
|
|
1473
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
1495
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
1474
1496
|
lastmod?: string | Date | undefined;
|
|
1475
1497
|
alternateRefs?: {
|
|
1476
1498
|
href: string;
|
|
@@ -1505,7 +1527,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
1505
1527
|
sitemap?: {
|
|
1506
1528
|
exclude?: boolean | undefined;
|
|
1507
1529
|
priority?: number | undefined;
|
|
1508
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
1530
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
1509
1531
|
lastmod?: string | Date | undefined;
|
|
1510
1532
|
alternateRefs?: {
|
|
1511
1533
|
href: string;
|
|
@@ -1608,7 +1630,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
1608
1630
|
}, "strip", z.ZodTypeAny, {
|
|
1609
1631
|
exclude?: boolean | undefined;
|
|
1610
1632
|
priority?: number | undefined;
|
|
1611
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
1633
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
1612
1634
|
lastmod?: string | Date | undefined;
|
|
1613
1635
|
alternateRefs?: {
|
|
1614
1636
|
href: string;
|
|
@@ -1630,7 +1652,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
1630
1652
|
}, {
|
|
1631
1653
|
exclude?: boolean | undefined;
|
|
1632
1654
|
priority?: number | undefined;
|
|
1633
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
1655
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
1634
1656
|
lastmod?: string | Date | undefined;
|
|
1635
1657
|
alternateRefs?: {
|
|
1636
1658
|
href: string;
|
|
@@ -1721,7 +1743,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
1721
1743
|
}, "strip", z.ZodTypeAny, {
|
|
1722
1744
|
exclude?: boolean | undefined;
|
|
1723
1745
|
priority?: number | undefined;
|
|
1724
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
1746
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
1725
1747
|
lastmod?: string | Date | undefined;
|
|
1726
1748
|
alternateRefs?: {
|
|
1727
1749
|
href: string;
|
|
@@ -1743,7 +1765,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
1743
1765
|
}, {
|
|
1744
1766
|
exclude?: boolean | undefined;
|
|
1745
1767
|
priority?: number | undefined;
|
|
1746
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
1768
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
1747
1769
|
lastmod?: string | Date | undefined;
|
|
1748
1770
|
alternateRefs?: {
|
|
1749
1771
|
href: string;
|
|
@@ -1769,7 +1791,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
1769
1791
|
sitemap?: {
|
|
1770
1792
|
exclude?: boolean | undefined;
|
|
1771
1793
|
priority?: number | undefined;
|
|
1772
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
1794
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
1773
1795
|
lastmod?: string | Date | undefined;
|
|
1774
1796
|
alternateRefs?: {
|
|
1775
1797
|
href: string;
|
|
@@ -1795,7 +1817,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
1795
1817
|
sitemap?: {
|
|
1796
1818
|
exclude?: boolean | undefined;
|
|
1797
1819
|
priority?: number | undefined;
|
|
1798
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
1820
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
1799
1821
|
lastmod?: string | Date | undefined;
|
|
1800
1822
|
alternateRefs?: {
|
|
1801
1823
|
href: string;
|
|
@@ -1825,7 +1847,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
1825
1847
|
sitemap?: {
|
|
1826
1848
|
exclude?: boolean | undefined;
|
|
1827
1849
|
priority?: number | undefined;
|
|
1828
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
1850
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
1829
1851
|
lastmod?: string | Date | undefined;
|
|
1830
1852
|
alternateRefs?: {
|
|
1831
1853
|
href: string;
|
|
@@ -1854,7 +1876,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
1854
1876
|
sitemap?: {
|
|
1855
1877
|
exclude?: boolean | undefined;
|
|
1856
1878
|
priority?: number | undefined;
|
|
1857
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
1879
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
1858
1880
|
lastmod?: string | Date | undefined;
|
|
1859
1881
|
alternateRefs?: {
|
|
1860
1882
|
href: string;
|
|
@@ -1892,7 +1914,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
1892
1914
|
sitemap?: {
|
|
1893
1915
|
exclude?: boolean | undefined;
|
|
1894
1916
|
priority?: number | undefined;
|
|
1895
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
1917
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
1896
1918
|
lastmod?: string | Date | undefined;
|
|
1897
1919
|
alternateRefs?: {
|
|
1898
1920
|
href: string;
|
|
@@ -1930,7 +1952,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
1930
1952
|
sitemap?: {
|
|
1931
1953
|
exclude?: boolean | undefined;
|
|
1932
1954
|
priority?: number | undefined;
|
|
1933
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
1955
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
1934
1956
|
lastmod?: string | Date | undefined;
|
|
1935
1957
|
alternateRefs?: {
|
|
1936
1958
|
href: string;
|
|
@@ -1960,7 +1982,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
1960
1982
|
sitemap?: {
|
|
1961
1983
|
exclude?: boolean | undefined;
|
|
1962
1984
|
priority?: number | undefined;
|
|
1963
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
1985
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
1964
1986
|
lastmod?: string | Date | undefined;
|
|
1965
1987
|
alternateRefs?: {
|
|
1966
1988
|
href: string;
|
|
@@ -1995,7 +2017,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
1995
2017
|
sitemap?: {
|
|
1996
2018
|
exclude?: boolean | undefined;
|
|
1997
2019
|
priority?: number | undefined;
|
|
1998
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
2020
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
1999
2021
|
lastmod?: string | Date | undefined;
|
|
2000
2022
|
alternateRefs?: {
|
|
2001
2023
|
href: string;
|
|
@@ -2025,7 +2047,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
2025
2047
|
sitemap?: {
|
|
2026
2048
|
exclude?: boolean | undefined;
|
|
2027
2049
|
priority?: number | undefined;
|
|
2028
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
2050
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
2029
2051
|
lastmod?: string | Date | undefined;
|
|
2030
2052
|
alternateRefs?: {
|
|
2031
2053
|
href: string;
|
|
@@ -2060,7 +2082,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
2060
2082
|
sitemap?: {
|
|
2061
2083
|
exclude?: boolean | undefined;
|
|
2062
2084
|
priority?: number | undefined;
|
|
2063
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
2085
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
2064
2086
|
lastmod?: string | Date | undefined;
|
|
2065
2087
|
alternateRefs?: {
|
|
2066
2088
|
href: string;
|
|
@@ -2093,7 +2115,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
2093
2115
|
sitemap?: {
|
|
2094
2116
|
exclude?: boolean | undefined;
|
|
2095
2117
|
priority?: number | undefined;
|
|
2096
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
2118
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
2097
2119
|
lastmod?: string | Date | undefined;
|
|
2098
2120
|
alternateRefs?: {
|
|
2099
2121
|
href: string;
|
|
@@ -2128,7 +2150,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
2128
2150
|
sitemap?: {
|
|
2129
2151
|
exclude?: boolean | undefined;
|
|
2130
2152
|
priority?: number | undefined;
|
|
2131
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
2153
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
2132
2154
|
lastmod?: string | Date | undefined;
|
|
2133
2155
|
alternateRefs?: {
|
|
2134
2156
|
href: string;
|
|
@@ -2163,7 +2185,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
2163
2185
|
sitemap?: {
|
|
2164
2186
|
exclude?: boolean | undefined;
|
|
2165
2187
|
priority?: number | undefined;
|
|
2166
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
2188
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
2167
2189
|
lastmod?: string | Date | undefined;
|
|
2168
2190
|
alternateRefs?: {
|
|
2169
2191
|
href: string;
|
|
@@ -2198,7 +2220,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
2198
2220
|
sitemap?: {
|
|
2199
2221
|
exclude?: boolean | undefined;
|
|
2200
2222
|
priority?: number | undefined;
|
|
2201
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
2223
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
2202
2224
|
lastmod?: string | Date | undefined;
|
|
2203
2225
|
alternateRefs?: {
|
|
2204
2226
|
href: string;
|
|
@@ -2296,7 +2318,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
2296
2318
|
}, "strip", z.ZodTypeAny, {
|
|
2297
2319
|
exclude?: boolean | undefined;
|
|
2298
2320
|
priority?: number | undefined;
|
|
2299
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
2321
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
2300
2322
|
lastmod?: string | Date | undefined;
|
|
2301
2323
|
alternateRefs?: {
|
|
2302
2324
|
href: string;
|
|
@@ -2318,7 +2340,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
2318
2340
|
}, {
|
|
2319
2341
|
exclude?: boolean | undefined;
|
|
2320
2342
|
priority?: number | undefined;
|
|
2321
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
2343
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
2322
2344
|
lastmod?: string | Date | undefined;
|
|
2323
2345
|
alternateRefs?: {
|
|
2324
2346
|
href: string;
|
|
@@ -2344,7 +2366,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
2344
2366
|
sitemap?: {
|
|
2345
2367
|
exclude?: boolean | undefined;
|
|
2346
2368
|
priority?: number | undefined;
|
|
2347
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
2369
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
2348
2370
|
lastmod?: string | Date | undefined;
|
|
2349
2371
|
alternateRefs?: {
|
|
2350
2372
|
href: string;
|
|
@@ -2370,7 +2392,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
2370
2392
|
sitemap?: {
|
|
2371
2393
|
exclude?: boolean | undefined;
|
|
2372
2394
|
priority?: number | undefined;
|
|
2373
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
2395
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
2374
2396
|
lastmod?: string | Date | undefined;
|
|
2375
2397
|
alternateRefs?: {
|
|
2376
2398
|
href: string;
|
|
@@ -2400,7 +2422,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
2400
2422
|
sitemap?: {
|
|
2401
2423
|
exclude?: boolean | undefined;
|
|
2402
2424
|
priority?: number | undefined;
|
|
2403
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
2425
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
2404
2426
|
lastmod?: string | Date | undefined;
|
|
2405
2427
|
alternateRefs?: {
|
|
2406
2428
|
href: string;
|
|
@@ -2429,7 +2451,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
2429
2451
|
sitemap?: {
|
|
2430
2452
|
exclude?: boolean | undefined;
|
|
2431
2453
|
priority?: number | undefined;
|
|
2432
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
2454
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
2433
2455
|
lastmod?: string | Date | undefined;
|
|
2434
2456
|
alternateRefs?: {
|
|
2435
2457
|
href: string;
|
|
@@ -2467,7 +2489,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
2467
2489
|
sitemap?: {
|
|
2468
2490
|
exclude?: boolean | undefined;
|
|
2469
2491
|
priority?: number | undefined;
|
|
2470
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
2492
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
2471
2493
|
lastmod?: string | Date | undefined;
|
|
2472
2494
|
alternateRefs?: {
|
|
2473
2495
|
href: string;
|
|
@@ -2505,7 +2527,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
2505
2527
|
sitemap?: {
|
|
2506
2528
|
exclude?: boolean | undefined;
|
|
2507
2529
|
priority?: number | undefined;
|
|
2508
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
2530
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
2509
2531
|
lastmod?: string | Date | undefined;
|
|
2510
2532
|
alternateRefs?: {
|
|
2511
2533
|
href: string;
|
|
@@ -2602,7 +2624,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
2602
2624
|
}, "strip", z.ZodTypeAny, {
|
|
2603
2625
|
exclude?: boolean | undefined;
|
|
2604
2626
|
priority?: number | undefined;
|
|
2605
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
2627
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
2606
2628
|
lastmod?: string | Date | undefined;
|
|
2607
2629
|
alternateRefs?: {
|
|
2608
2630
|
href: string;
|
|
@@ -2624,7 +2646,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
2624
2646
|
}, {
|
|
2625
2647
|
exclude?: boolean | undefined;
|
|
2626
2648
|
priority?: number | undefined;
|
|
2627
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
2649
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
2628
2650
|
lastmod?: string | Date | undefined;
|
|
2629
2651
|
alternateRefs?: {
|
|
2630
2652
|
href: string;
|
|
@@ -2650,7 +2672,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
2650
2672
|
sitemap?: {
|
|
2651
2673
|
exclude?: boolean | undefined;
|
|
2652
2674
|
priority?: number | undefined;
|
|
2653
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
2675
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
2654
2676
|
lastmod?: string | Date | undefined;
|
|
2655
2677
|
alternateRefs?: {
|
|
2656
2678
|
href: string;
|
|
@@ -2676,7 +2698,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
2676
2698
|
sitemap?: {
|
|
2677
2699
|
exclude?: boolean | undefined;
|
|
2678
2700
|
priority?: number | undefined;
|
|
2679
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
2701
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
2680
2702
|
lastmod?: string | Date | undefined;
|
|
2681
2703
|
alternateRefs?: {
|
|
2682
2704
|
href: string;
|
|
@@ -2706,7 +2728,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
2706
2728
|
sitemap?: {
|
|
2707
2729
|
exclude?: boolean | undefined;
|
|
2708
2730
|
priority?: number | undefined;
|
|
2709
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
2731
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
2710
2732
|
lastmod?: string | Date | undefined;
|
|
2711
2733
|
alternateRefs?: {
|
|
2712
2734
|
href: string;
|
|
@@ -2735,7 +2757,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
2735
2757
|
sitemap?: {
|
|
2736
2758
|
exclude?: boolean | undefined;
|
|
2737
2759
|
priority?: number | undefined;
|
|
2738
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
2760
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
2739
2761
|
lastmod?: string | Date | undefined;
|
|
2740
2762
|
alternateRefs?: {
|
|
2741
2763
|
href: string;
|
|
@@ -2773,7 +2795,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
2773
2795
|
sitemap?: {
|
|
2774
2796
|
exclude?: boolean | undefined;
|
|
2775
2797
|
priority?: number | undefined;
|
|
2776
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
2798
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
2777
2799
|
lastmod?: string | Date | undefined;
|
|
2778
2800
|
alternateRefs?: {
|
|
2779
2801
|
href: string;
|
|
@@ -2811,7 +2833,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
2811
2833
|
sitemap?: {
|
|
2812
2834
|
exclude?: boolean | undefined;
|
|
2813
2835
|
priority?: number | undefined;
|
|
2814
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
2836
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
2815
2837
|
lastmod?: string | Date | undefined;
|
|
2816
2838
|
alternateRefs?: {
|
|
2817
2839
|
href: string;
|
|
@@ -2849,7 +2871,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
2849
2871
|
sitemap?: {
|
|
2850
2872
|
exclude?: boolean | undefined;
|
|
2851
2873
|
priority?: number | undefined;
|
|
2852
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
2874
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
2853
2875
|
lastmod?: string | Date | undefined;
|
|
2854
2876
|
alternateRefs?: {
|
|
2855
2877
|
href: string;
|
|
@@ -2887,7 +2909,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
2887
2909
|
sitemap?: {
|
|
2888
2910
|
exclude?: boolean | undefined;
|
|
2889
2911
|
priority?: number | undefined;
|
|
2890
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
2912
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
2891
2913
|
lastmod?: string | Date | undefined;
|
|
2892
2914
|
alternateRefs?: {
|
|
2893
2915
|
href: string;
|
|
@@ -2928,7 +2950,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
2928
2950
|
sitemap?: {
|
|
2929
2951
|
exclude?: boolean | undefined;
|
|
2930
2952
|
priority?: number | undefined;
|
|
2931
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
2953
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
2932
2954
|
lastmod?: string | Date | undefined;
|
|
2933
2955
|
alternateRefs?: {
|
|
2934
2956
|
href: string;
|
|
@@ -2970,7 +2992,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
2970
2992
|
sitemap?: {
|
|
2971
2993
|
exclude?: boolean | undefined;
|
|
2972
2994
|
priority?: number | undefined;
|
|
2973
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
2995
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
2974
2996
|
lastmod?: string | Date | undefined;
|
|
2975
2997
|
alternateRefs?: {
|
|
2976
2998
|
href: string;
|
|
@@ -3057,13 +3079,17 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
3057
3079
|
};
|
|
3058
3080
|
serverFns: {
|
|
3059
3081
|
base: string;
|
|
3082
|
+
generateFunctionId?: ((args_0: {
|
|
3083
|
+
filename: string;
|
|
3084
|
+
functionName: string;
|
|
3085
|
+
}, ...args: unknown[]) => string | undefined) | undefined;
|
|
3060
3086
|
};
|
|
3061
3087
|
pages: {
|
|
3062
3088
|
path: string;
|
|
3063
3089
|
sitemap?: {
|
|
3064
3090
|
exclude?: boolean | undefined;
|
|
3065
3091
|
priority?: number | undefined;
|
|
3066
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
3092
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
3067
3093
|
lastmod?: string | Date | undefined;
|
|
3068
3094
|
alternateRefs?: {
|
|
3069
3095
|
href: string;
|
|
@@ -3098,7 +3124,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
3098
3124
|
sitemap?: {
|
|
3099
3125
|
exclude?: boolean | undefined;
|
|
3100
3126
|
priority?: number | undefined;
|
|
3101
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
3127
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
3102
3128
|
lastmod?: string | Date | undefined;
|
|
3103
3129
|
alternateRefs?: {
|
|
3104
3130
|
href: string;
|
|
@@ -3140,7 +3166,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
3140
3166
|
sitemap?: {
|
|
3141
3167
|
exclude?: boolean | undefined;
|
|
3142
3168
|
priority?: number | undefined;
|
|
3143
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
3169
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
3144
3170
|
lastmod?: string | Date | undefined;
|
|
3145
3171
|
alternateRefs?: {
|
|
3146
3172
|
href: string;
|
|
@@ -3178,7 +3204,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
3178
3204
|
sitemap?: {
|
|
3179
3205
|
exclude?: boolean | undefined;
|
|
3180
3206
|
priority?: number | undefined;
|
|
3181
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
3207
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
3182
3208
|
lastmod?: string | Date | undefined;
|
|
3183
3209
|
alternateRefs?: {
|
|
3184
3210
|
href: string;
|
|
@@ -3213,7 +3239,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
3213
3239
|
sitemap?: {
|
|
3214
3240
|
exclude?: boolean | undefined;
|
|
3215
3241
|
priority?: number | undefined;
|
|
3216
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
3242
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
3217
3243
|
lastmod?: string | Date | undefined;
|
|
3218
3244
|
alternateRefs?: {
|
|
3219
3245
|
href: string;
|
|
@@ -3256,7 +3282,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
3256
3282
|
sitemap?: {
|
|
3257
3283
|
exclude?: boolean | undefined;
|
|
3258
3284
|
priority?: number | undefined;
|
|
3259
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
3285
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
3260
3286
|
lastmod?: string | Date | undefined;
|
|
3261
3287
|
alternateRefs?: {
|
|
3262
3288
|
href: string;
|
|
@@ -3308,7 +3334,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
3308
3334
|
sitemap?: {
|
|
3309
3335
|
exclude?: boolean | undefined;
|
|
3310
3336
|
priority?: number | undefined;
|
|
3311
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
3337
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
3312
3338
|
lastmod?: string | Date | undefined;
|
|
3313
3339
|
alternateRefs?: {
|
|
3314
3340
|
href: string;
|
|
@@ -3380,6 +3406,10 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
3380
3406
|
}) | undefined;
|
|
3381
3407
|
serverFns?: {
|
|
3382
3408
|
base?: string | undefined;
|
|
3409
|
+
generateFunctionId?: ((args_0: {
|
|
3410
|
+
filename: string;
|
|
3411
|
+
functionName: string;
|
|
3412
|
+
}, ...args: unknown[]) => string | undefined) | undefined;
|
|
3383
3413
|
} | undefined;
|
|
3384
3414
|
sitemap?: {
|
|
3385
3415
|
enabled?: boolean | undefined;
|
|
@@ -3392,7 +3422,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
3392
3422
|
sitemap?: {
|
|
3393
3423
|
exclude?: boolean | undefined;
|
|
3394
3424
|
priority?: number | undefined;
|
|
3395
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
3425
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
3396
3426
|
lastmod?: string | Date | undefined;
|
|
3397
3427
|
alternateRefs?: {
|
|
3398
3428
|
href: string;
|
|
@@ -3427,7 +3457,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
3427
3457
|
sitemap?: {
|
|
3428
3458
|
exclude?: boolean | undefined;
|
|
3429
3459
|
priority?: number | undefined;
|
|
3430
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
3460
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
3431
3461
|
lastmod?: string | Date | undefined;
|
|
3432
3462
|
alternateRefs?: {
|
|
3433
3463
|
href: string;
|
|
@@ -3470,7 +3500,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
3470
3500
|
sitemap?: {
|
|
3471
3501
|
exclude?: boolean | undefined;
|
|
3472
3502
|
priority?: number | undefined;
|
|
3473
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
3503
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
3474
3504
|
lastmod?: string | Date | undefined;
|
|
3475
3505
|
alternateRefs?: {
|
|
3476
3506
|
href: string;
|
|
@@ -3500,7 +3530,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
3500
3530
|
sitemap?: {
|
|
3501
3531
|
exclude?: boolean | undefined;
|
|
3502
3532
|
priority?: number | undefined;
|
|
3503
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
3533
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
3504
3534
|
lastmod?: string | Date | undefined;
|
|
3505
3535
|
alternateRefs?: {
|
|
3506
3536
|
href: string;
|
|
@@ -3535,7 +3565,7 @@ declare const tanstackStartOptionsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject
|
|
|
3535
3565
|
sitemap?: {
|
|
3536
3566
|
exclude?: boolean | undefined;
|
|
3537
3567
|
priority?: number | undefined;
|
|
3538
|
-
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" |
|
|
3568
|
+
changefreq?: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | undefined;
|
|
3539
3569
|
lastmod?: string | Date | undefined;
|
|
3540
3570
|
alternateRefs?: {
|
|
3541
3571
|
href: string;
|
package/dist/esm/schema.js
CHANGED
|
@@ -109,7 +109,13 @@ const tanstackStartOptionsSchema = z.object({
|
|
|
109
109
|
entry: z.string().optional()
|
|
110
110
|
}).optional().default({}),
|
|
111
111
|
serverFns: z.object({
|
|
112
|
-
base: z.string().optional().default("/_serverFn")
|
|
112
|
+
base: z.string().optional().default("/_serverFn"),
|
|
113
|
+
generateFunctionId: z.function().args(
|
|
114
|
+
z.object({
|
|
115
|
+
filename: z.string(),
|
|
116
|
+
functionName: z.string()
|
|
117
|
+
})
|
|
118
|
+
).returns(z.string().optional()).optional()
|
|
113
119
|
}).optional().default({}),
|
|
114
120
|
pages: z.array(pageSchema).optional().default([]),
|
|
115
121
|
sitemap: z.object({
|
package/dist/esm/schema.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sources":["../../src/schema.ts"],"sourcesContent":["import path from 'node:path'\nimport { z } from 'zod'\nimport { configSchema, getConfig } from '@tanstack/router-plugin'\nimport type { TanStackStartVitePluginCoreOptions } from './plugin'\n\nconst tsrConfig = configSchema\n .omit({ autoCodeSplitting: true, target: true, verboseFileRoutes: true })\n .partial()\n\nexport function parseStartConfig(\n opts: z.input<typeof tanstackStartOptionsSchema>,\n corePluginOpts: TanStackStartVitePluginCoreOptions,\n root: string,\n) {\n const options = tanstackStartOptionsSchema.parse(opts)\n\n const srcDirectory = options.srcDirectory\n\n const routesDirectory = path.resolve(\n root,\n srcDirectory,\n options.router.routesDirectory ?? 'routes',\n )\n\n const generatedRouteTree = path.resolve(\n root,\n srcDirectory,\n options.router.generatedRouteTree ?? 'routeTree.gen.ts',\n )\n\n return {\n ...options,\n router: {\n ...options.router,\n ...getConfig(\n {\n ...options.router,\n routesDirectory,\n generatedRouteTree,\n },\n root,\n ),\n target: corePluginOpts.framework,\n },\n }\n}\n\nconst pageSitemapOptionsSchema = z.object({\n exclude: z.boolean().optional(),\n priority: z.number().min(0).max(1).optional(),\n changefreq: z\n .enum(['always', 'hourly', 'daily', 'weekly', 'monthly', 'yearly', 'never'])\n .optional(),\n lastmod: z.union([z.string(), z.date()]).optional(),\n alternateRefs: z\n .array(\n z.object({\n href: z.string(),\n hreflang: z.string(),\n }),\n )\n .optional(),\n images: z\n .array(\n z.object({\n loc: z.string(),\n caption: z.string().optional(),\n title: z.string().optional(),\n }),\n )\n .optional(),\n news: z\n .object({\n publication: z.object({\n name: z.string(),\n language: z.string(),\n }),\n publicationDate: z.union([z.string(), z.date()]),\n title: z.string(),\n })\n .optional(),\n})\n\nconst pageBaseSchema = z.object({\n path: z.string(),\n sitemap: pageSitemapOptionsSchema.optional(),\n fromCrawl: z.boolean().optional(),\n})\n\nconst pagePrerenderOptionsSchema = z.object({\n enabled: z.boolean().optional(),\n outputPath: z.string().optional(),\n autoSubfolderIndex: z.boolean().optional(),\n crawlLinks: z.boolean().optional(),\n retryCount: z.number().optional(),\n retryDelay: z.number().optional(),\n onSuccess: z\n .function()\n .args(\n z.object({\n page: pageBaseSchema,\n html: z.string(),\n }),\n )\n .returns(z.any())\n .optional(),\n headers: z.record(z.string(), z.string()).optional(),\n})\n\nconst spaSchema = z.object({\n enabled: z.boolean().optional().default(true),\n maskPath: z.string().optional().default('/'),\n prerender: pagePrerenderOptionsSchema\n .optional()\n .default({})\n .transform((opts) => ({\n outputPath: opts.outputPath ?? '/_shell',\n crawlLinks: false,\n retryCount: 0,\n ...opts,\n enabled: true,\n })),\n})\n\nconst pageSchema = pageBaseSchema.extend({\n prerender: pagePrerenderOptionsSchema.optional(),\n})\n\nconst tanstackStartOptionsSchema = z\n .object({\n srcDirectory: z.string().optional().default('src'),\n start: z\n .object({\n entry: z.string().optional(),\n })\n .optional()\n .default({}),\n router: z\n .object({\n entry: z.string().optional(),\n basepath: z.string().optional(),\n })\n .and(tsrConfig.optional().default({}))\n .optional()\n .default({}),\n client: z\n .object({\n entry: z.string().optional(),\n base: z.string().optional().default('/_build'),\n })\n .optional()\n .default({}),\n server: z\n .object({\n entry: z.string().optional(),\n })\n .optional()\n .default({}),\n serverFns: z\n .object({\n base: z.string().optional().default('/_serverFn'),\n })\n .optional()\n .default({}),\n pages: z.array(pageSchema).optional().default([]),\n sitemap: z\n .object({\n enabled: z.boolean().optional().default(true),\n host: z.string().optional(),\n outputPath: z.string().optional().default('sitemap.xml'),\n })\n .optional(),\n prerender: z\n .object({\n enabled: z.boolean().optional(),\n concurrency: z.number().optional(),\n filter: z.function().args(pageSchema).returns(z.any()).optional(),\n failOnError: z.boolean().optional(),\n })\n .and(pagePrerenderOptionsSchema.optional())\n .optional(),\n spa: spaSchema.optional(),\n vite: z\n .object({ installDevServerMiddleware: z.boolean().optional() })\n .optional(),\n })\n .optional()\n .default({})\n\nexport type Page = z.infer<typeof pageSchema>\n\nexport type TanStackStartInputConfig = z.input<\n typeof tanstackStartOptionsSchema\n>\nexport type TanStackStartOutputConfig = ReturnType<typeof parseStartConfig>\n"],"names":[],"mappings":";;;AAKA,MAAM,YAAY,aACf,KAAK,EAAE,mBAAmB,MAAM,QAAQ,MAAM,mBAAmB,KAAA,CAAM,EACvE,QAAA;AAEI,SAAS,iBACd,MACA,gBACA,MACA;AACA,QAAM,UAAU,2BAA2B,MAAM,IAAI;AAErD,QAAM,eAAe,QAAQ;AAE7B,QAAM,kBAAkB,KAAK;AAAA,IAC3B;AAAA,IACA;AAAA,IACA,QAAQ,OAAO,mBAAmB;AAAA,EAAA;AAGpC,QAAM,qBAAqB,KAAK;AAAA,IAC9B;AAAA,IACA;AAAA,IACA,QAAQ,OAAO,sBAAsB;AAAA,EAAA;AAGvC,SAAO;AAAA,IACL,GAAG;AAAA,IACH,QAAQ;AAAA,MACN,GAAG,QAAQ;AAAA,MACX,GAAG;AAAA,QACD;AAAA,UACE,GAAG,QAAQ;AAAA,UACX;AAAA,UACA;AAAA,QAAA;AAAA,QAEF;AAAA,MAAA;AAAA,MAEF,QAAQ,eAAe;AAAA,IAAA;AAAA,EACzB;AAEJ;AAEA,MAAM,2BAA2B,EAAE,OAAO;AAAA,EACxC,SAAS,EAAE,QAAA,EAAU,SAAA;AAAA,EACrB,UAAU,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,CAAC,EAAE,SAAA;AAAA,EACnC,YAAY,EACT,KAAK,CAAC,UAAU,UAAU,SAAS,UAAU,WAAW,UAAU,OAAO,CAAC,EAC1E,SAAA;AAAA,EACH,SAAS,EAAE,MAAM,CAAC,EAAE,UAAU,EAAE,KAAA,CAAM,CAAC,EAAE,SAAA;AAAA,EACzC,eAAe,EACZ;AAAA,IACC,EAAE,OAAO;AAAA,MACP,MAAM,EAAE,OAAA;AAAA,MACR,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Q,YAAY;AAAA,
|
|
1
|
+
{"version":3,"file":"schema.js","sources":["../../src/schema.ts"],"sourcesContent":["import path from 'node:path'\nimport { z } from 'zod'\nimport { configSchema, getConfig } from '@tanstack/router-plugin'\nimport type { TanStackStartVitePluginCoreOptions } from './plugin'\n\nconst tsrConfig = configSchema\n .omit({ autoCodeSplitting: true, target: true, verboseFileRoutes: true })\n .partial()\n\nexport function parseStartConfig(\n opts: z.input<typeof tanstackStartOptionsSchema>,\n corePluginOpts: TanStackStartVitePluginCoreOptions,\n root: string,\n) {\n const options = tanstackStartOptionsSchema.parse(opts)\n\n const srcDirectory = options.srcDirectory\n\n const routesDirectory = path.resolve(\n root,\n srcDirectory,\n options.router.routesDirectory ?? 'routes',\n )\n\n const generatedRouteTree = path.resolve(\n root,\n srcDirectory,\n options.router.generatedRouteTree ?? 'routeTree.gen.ts',\n )\n\n return {\n ...options,\n router: {\n ...options.router,\n ...getConfig(\n {\n ...options.router,\n routesDirectory,\n generatedRouteTree,\n },\n root,\n ),\n target: corePluginOpts.framework,\n },\n }\n}\n\nconst pageSitemapOptionsSchema = z.object({\n exclude: z.boolean().optional(),\n priority: z.number().min(0).max(1).optional(),\n changefreq: z\n .enum(['always', 'hourly', 'daily', 'weekly', 'monthly', 'yearly', 'never'])\n .optional(),\n lastmod: z.union([z.string(), z.date()]).optional(),\n alternateRefs: z\n .array(\n z.object({\n href: z.string(),\n hreflang: z.string(),\n }),\n )\n .optional(),\n images: z\n .array(\n z.object({\n loc: z.string(),\n caption: z.string().optional(),\n title: z.string().optional(),\n }),\n )\n .optional(),\n news: z\n .object({\n publication: z.object({\n name: z.string(),\n language: z.string(),\n }),\n publicationDate: z.union([z.string(), z.date()]),\n title: z.string(),\n })\n .optional(),\n})\n\nconst pageBaseSchema = z.object({\n path: z.string(),\n sitemap: pageSitemapOptionsSchema.optional(),\n fromCrawl: z.boolean().optional(),\n})\n\nconst pagePrerenderOptionsSchema = z.object({\n enabled: z.boolean().optional(),\n outputPath: z.string().optional(),\n autoSubfolderIndex: z.boolean().optional(),\n crawlLinks: z.boolean().optional(),\n retryCount: z.number().optional(),\n retryDelay: z.number().optional(),\n onSuccess: z\n .function()\n .args(\n z.object({\n page: pageBaseSchema,\n html: z.string(),\n }),\n )\n .returns(z.any())\n .optional(),\n headers: z.record(z.string(), z.string()).optional(),\n})\n\nconst spaSchema = z.object({\n enabled: z.boolean().optional().default(true),\n maskPath: z.string().optional().default('/'),\n prerender: pagePrerenderOptionsSchema\n .optional()\n .default({})\n .transform((opts) => ({\n outputPath: opts.outputPath ?? '/_shell',\n crawlLinks: false,\n retryCount: 0,\n ...opts,\n enabled: true,\n })),\n})\n\nconst pageSchema = pageBaseSchema.extend({\n prerender: pagePrerenderOptionsSchema.optional(),\n})\n\nconst tanstackStartOptionsSchema = z\n .object({\n srcDirectory: z.string().optional().default('src'),\n start: z\n .object({\n entry: z.string().optional(),\n })\n .optional()\n .default({}),\n router: z\n .object({\n entry: z.string().optional(),\n basepath: z.string().optional(),\n })\n .and(tsrConfig.optional().default({}))\n .optional()\n .default({}),\n client: z\n .object({\n entry: z.string().optional(),\n base: z.string().optional().default('/_build'),\n })\n .optional()\n .default({}),\n server: z\n .object({\n entry: z.string().optional(),\n })\n .optional()\n .default({}),\n serverFns: z\n .object({\n base: z.string().optional().default('/_serverFn'),\n generateFunctionId: z\n .function()\n .args(\n z.object({\n filename: z.string(),\n functionName: z.string(),\n }),\n )\n .returns(z.string().optional())\n .optional(),\n })\n .optional()\n .default({}),\n pages: z.array(pageSchema).optional().default([]),\n sitemap: z\n .object({\n enabled: z.boolean().optional().default(true),\n host: z.string().optional(),\n outputPath: z.string().optional().default('sitemap.xml'),\n })\n .optional(),\n prerender: z\n .object({\n enabled: z.boolean().optional(),\n concurrency: z.number().optional(),\n filter: z.function().args(pageSchema).returns(z.any()).optional(),\n failOnError: z.boolean().optional(),\n })\n .and(pagePrerenderOptionsSchema.optional())\n .optional(),\n spa: spaSchema.optional(),\n vite: z\n .object({ installDevServerMiddleware: z.boolean().optional() })\n .optional(),\n })\n .optional()\n .default({})\n\nexport type Page = z.infer<typeof pageSchema>\n\nexport type TanStackStartInputConfig = z.input<\n typeof tanstackStartOptionsSchema\n>\nexport type TanStackStartOutputConfig = ReturnType<typeof parseStartConfig>\n"],"names":[],"mappings":";;;AAKA,MAAM,YAAY,aACf,KAAK,EAAE,mBAAmB,MAAM,QAAQ,MAAM,mBAAmB,KAAA,CAAM,EACvE,QAAA;AAEI,SAAS,iBACd,MACA,gBACA,MACA;AACA,QAAM,UAAU,2BAA2B,MAAM,IAAI;AAErD,QAAM,eAAe,QAAQ;AAE7B,QAAM,kBAAkB,KAAK;AAAA,IAC3B;AAAA,IACA;AAAA,IACA,QAAQ,OAAO,mBAAmB;AAAA,EAAA;AAGpC,QAAM,qBAAqB,KAAK;AAAA,IAC9B;AAAA,IACA;AAAA,IACA,QAAQ,OAAO,sBAAsB;AAAA,EAAA;AAGvC,SAAO;AAAA,IACL,GAAG;AAAA,IACH,QAAQ;AAAA,MACN,GAAG,QAAQ;AAAA,MACX,GAAG;AAAA,QACD;AAAA,UACE,GAAG,QAAQ;AAAA,UACX;AAAA,UACA;AAAA,QAAA;AAAA,QAEF;AAAA,MAAA;AAAA,MAEF,QAAQ,eAAe;AAAA,IAAA;AAAA,EACzB;AAEJ;AAEA,MAAM,2BAA2B,EAAE,OAAO;AAAA,EACxC,SAAS,EAAE,QAAA,EAAU,SAAA;AAAA,EACrB,UAAU,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,IAAI,CAAC,EAAE,SAAA;AAAA,EACnC,YAAY,EACT,KAAK,CAAC,UAAU,UAAU,SAAS,UAAU,WAAW,UAAU,OAAO,CAAC,EAC1E,SAAA;AAAA,EACH,SAAS,EAAE,MAAM,CAAC,EAAE,UAAU,EAAE,KAAA,CAAM,CAAC,EAAE,SAAA;AAAA,EACzC,eAAe,EACZ;AAAA,IACC,EAAE,OAAO;AAAA,MACP,MAAM,EAAE,OAAA;AAAA,MACR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AQ,YAAY;AAAA,IAChD,oBAAoB,EACjB,SAAA,EACA;AAAA,MACC,EAAE,OAAO;AAAA,QACP,UAAU,EAAE,OAAA;AAAA,QACZ,cAAc,EAAE,OAAA;AAAA,MAAO,CACxB;AAAA,IAAA,EAEF,QAAQ,EAAE,OAAA,EAAS,SAAA,CAAU,EAC7B,SAAA;AAAA,EAAS,CACb,EACA,SAAA,EACA,QAAQ,EAAE;AAAA,EACb,OAAO,EAAE,MAAM,UAAU,EAAE,SAAA,EAAW,QAAQ,EAAE;AAAA,EAChD,SAAS,EACN,OAAO;AAAA,IACN,SAAS,EAAE,QAAA,EAAU,SAAA,EAAW,QAAQ,IAAI;AAAA,IAC5C,MAAM,EAAE,OAAA,EAAS,SAAA;AAAA,IACjB,YAAY,EAAE,OAAA,EAAS,SAAA,EAAW,QAAQ,aAAa;AAAA,EAAA,CACxD,EACA,SAAA;AAAA,EACH,WAAW,EACR,OAAO;AAAA,IACN,SAAS,EAAE,QAAA,EAAU,SAAA;AAAA,IACrB,aAAa,EAAE,OAAA,EAAS,SAAA;AAAA,IACxB,QAAQ,EAAE,SAAA,EAAW,KAAK,UAAU,EAAE,QAAQ,EAAE,IAAA,CAAK,EAAE,SAAA;AAAA,IACvD,aAAa,EAAE,QAAA,EAAU,SAAA;AAAA,EAAS,CACnC,EACA,IAAI,2BAA2B,SAAA,CAAU,EACzC,SAAA;AAAA,EACH,KAAK,UAAU,SAAA;AAAA,EACf,MAAM,EACH,OAAO,EAAE,4BAA4B,EAAE,UAAU,WAAS,CAAG,EAC7D,SAAA;AACL,CAAC,EACA,SAAA,EACA,QAAQ,EAAE;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/start-plugin-core",
|
|
3
|
-
"version": "1.132.
|
|
3
|
+
"version": "1.132.42",
|
|
4
4
|
"description": "Modern and scalable routing for React applications",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -59,11 +59,11 @@
|
|
|
59
59
|
"vitefu": "^1.1.1",
|
|
60
60
|
"xmlbuilder2": "^3.1.1",
|
|
61
61
|
"zod": "^3.24.2",
|
|
62
|
-
"@tanstack/router-core": "1.132.41",
|
|
63
62
|
"@tanstack/router-generator": "1.132.41",
|
|
64
|
-
"@tanstack/router-utils": "1.132.31",
|
|
65
|
-
"@tanstack/server-functions-plugin": "1.132.31",
|
|
66
63
|
"@tanstack/router-plugin": "1.132.41",
|
|
64
|
+
"@tanstack/router-utils": "1.132.31",
|
|
65
|
+
"@tanstack/server-functions-plugin": "1.132.42",
|
|
66
|
+
"@tanstack/router-core": "1.132.41",
|
|
67
67
|
"@tanstack/start-server-core": "1.132.41"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
package/src/plugin.ts
CHANGED
|
@@ -334,6 +334,7 @@ export function TanStackStartVitePluginCore(
|
|
|
334
334
|
// This is the ID that will be available to look up and import
|
|
335
335
|
// our server function manifest and resolve its module
|
|
336
336
|
manifestVirtualImportId: VIRTUAL_MODULES.serverFnManifest,
|
|
337
|
+
generateFunctionId: startPluginOpts?.serverFns?.generateFunctionId,
|
|
337
338
|
client: {
|
|
338
339
|
getRuntimeCode: () =>
|
|
339
340
|
`import { createClientRpc } from '@tanstack/${corePluginOpts.framework}-start/client-rpc'`,
|
package/src/schema.ts
CHANGED
|
@@ -159,6 +159,16 @@ const tanstackStartOptionsSchema = z
|
|
|
159
159
|
serverFns: z
|
|
160
160
|
.object({
|
|
161
161
|
base: z.string().optional().default('/_serverFn'),
|
|
162
|
+
generateFunctionId: z
|
|
163
|
+
.function()
|
|
164
|
+
.args(
|
|
165
|
+
z.object({
|
|
166
|
+
filename: z.string(),
|
|
167
|
+
functionName: z.string(),
|
|
168
|
+
}),
|
|
169
|
+
)
|
|
170
|
+
.returns(z.string().optional())
|
|
171
|
+
.optional(),
|
|
162
172
|
})
|
|
163
173
|
.optional()
|
|
164
174
|
.default({}),
|