@octanejs/tanstack-start 0.1.0
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/LICENSE +22 -0
- package/README.md +52 -0
- package/THIRD_PARTY_NOTICES.md +11 -0
- package/package.json +149 -0
- package/src/client-only.d.ts +1 -0
- package/src/client-only.js +0 -0
- package/src/client-rpc.d.ts +1 -0
- package/src/client-rpc.js +1 -0
- package/src/client.d.ts +3 -0
- package/src/client.js +2 -0
- package/src/default-entry/client.js +12 -0
- package/src/default-entry/server.js +13 -0
- package/src/default-entry/start.js +1 -0
- package/src/default-entry-paths.d.ts +5 -0
- package/src/default-entry-paths.js +11 -0
- package/src/index.d.ts +11 -0
- package/src/index.js +22 -0
- package/src/internal/README.md +15 -0
- package/src/internal/router-generator/config.d.ts +255 -0
- package/src/internal/router-generator/config.js +134 -0
- package/src/internal/router-generator/filesystem/physical/getRouteNodes.d.ts +53 -0
- package/src/internal/router-generator/filesystem/physical/getRouteNodes.js +335 -0
- package/src/internal/router-generator/filesystem/physical/rootPathId.d.ts +1 -0
- package/src/internal/router-generator/filesystem/physical/rootPathId.js +4 -0
- package/src/internal/router-generator/filesystem/virtual/config.d.ts +3 -0
- package/src/internal/router-generator/filesystem/virtual/config.js +36 -0
- package/src/internal/router-generator/filesystem/virtual/getRouteNodes.d.ts +31 -0
- package/src/internal/router-generator/filesystem/virtual/getRouteNodes.js +272 -0
- package/src/internal/router-generator/filesystem/virtual/loadConfigFile.d.ts +1 -0
- package/src/internal/router-generator/filesystem/virtual/loadConfigFile.js +10 -0
- package/src/internal/router-generator/generator.d.ts +119 -0
- package/src/internal/router-generator/generator.js +1080 -0
- package/src/internal/router-generator/index.d.ts +40 -0
- package/src/internal/router-generator/index.js +49 -0
- package/src/internal/router-generator/logger.d.ts +8 -0
- package/src/internal/router-generator/logger.js +30 -0
- package/src/internal/router-generator/plugin/types.d.ts +37 -0
- package/src/internal/router-generator/template.d.ts +38 -0
- package/src/internal/router-generator/template.js +220 -0
- package/src/internal/router-generator/transform/transform.d.ts +8 -0
- package/src/internal/router-generator/transform/transform.js +385 -0
- package/src/internal/router-generator/transform/types.d.ts +34 -0
- package/src/internal/router-generator/types.d.ts +73 -0
- package/src/internal/router-generator/utils.d.ts +270 -0
- package/src/internal/router-generator/utils.js +864 -0
- package/src/internal/router-generator/validate-route-params.d.ts +13 -0
- package/src/internal/router-generator/validate-route-params.js +75 -0
- package/src/internal/router-plugin/context.d.ts +2 -0
- package/src/internal/router-plugin/context.js +2 -0
- package/src/internal/router-plugin/core/code-splitter/compilers.d.ts +69 -0
- package/src/internal/router-plugin/core/code-splitter/compilers.js +1042 -0
- package/src/internal/router-plugin/core/code-splitter/framework-options.d.ts +11 -0
- package/src/internal/router-plugin/core/code-splitter/framework-options.js +41 -0
- package/src/internal/router-plugin/core/code-splitter/plugins/framework-plugins.d.ts +12 -0
- package/src/internal/router-plugin/core/code-splitter/plugins/framework-plugins.js +35 -0
- package/src/internal/router-plugin/core/code-splitter/plugins/octane-hmr-split-route-components.d.ts +5 -0
- package/src/internal/router-plugin/core/code-splitter/plugins/octane-hmr-split-route-components.js +106 -0
- package/src/internal/router-plugin/core/code-splitter/plugins/octane-split-route-components.d.ts +8 -0
- package/src/internal/router-plugin/core/code-splitter/plugins/octane-split-route-components.js +85 -0
- package/src/internal/router-plugin/core/code-splitter/plugins/react-refresh-ignored-route-exports.d.ts +2 -0
- package/src/internal/router-plugin/core/code-splitter/plugins/react-refresh-ignored-route-exports.js +55 -0
- package/src/internal/router-plugin/core/code-splitter/plugins/react-refresh-route-components.d.ts +2 -0
- package/src/internal/router-plugin/core/code-splitter/plugins/react-refresh-route-components.js +50 -0
- package/src/internal/router-plugin/core/code-splitter/plugins/react-stable-hmr-split-route-components.d.ts +5 -0
- package/src/internal/router-plugin/core/code-splitter/plugins/react-stable-hmr-split-route-components.js +54 -0
- package/src/internal/router-plugin/core/code-splitter/plugins.d.ts +62 -0
- package/src/internal/router-plugin/core/code-splitter/types.d.ts +9 -0
- package/src/internal/router-plugin/core/config.d.ts +294 -0
- package/src/internal/router-plugin/core/config.js +56 -0
- package/src/internal/router-plugin/core/constants.d.ts +12 -0
- package/src/internal/router-plugin/core/constants.js +13 -0
- package/src/internal/router-plugin/core/framework-plugin-order.d.ts +8 -0
- package/src/internal/router-plugin/core/framework-plugin-order.js +78 -0
- package/src/internal/router-plugin/core/hmr/handle-route-update.d.ts +1 -0
- package/src/internal/router-plugin/core/hmr/handle-route-update.js +126 -0
- package/src/internal/router-plugin/core/hmr/index.d.ts +5 -0
- package/src/internal/router-plugin/core/hmr/select-adapter.d.ts +17 -0
- package/src/internal/router-plugin/core/hmr/select-adapter.js +24 -0
- package/src/internal/router-plugin/core/hmr/vite-adapter.d.ts +18 -0
- package/src/internal/router-plugin/core/hmr/vite-adapter.js +73 -0
- package/src/internal/router-plugin/core/hmr/webpack-adapter.d.ts +22 -0
- package/src/internal/router-plugin/core/hmr/webpack-adapter.js +78 -0
- package/src/internal/router-plugin/core/router-code-splitter-plugin.d.ts +10 -0
- package/src/internal/router-plugin/core/router-code-splitter-plugin.js +244 -0
- package/src/internal/router-plugin/core/router-composed-plugin.d.ts +5 -0
- package/src/internal/router-plugin/core/router-composed-plugin.js +62 -0
- package/src/internal/router-plugin/core/router-generator-plugin.d.ts +10 -0
- package/src/internal/router-plugin/core/router-generator-plugin.js +125 -0
- package/src/internal/router-plugin/core/router-hmr-plugin.d.ts +13 -0
- package/src/internal/router-plugin/core/router-hmr-plugin.js +101 -0
- package/src/internal/router-plugin/core/router-plugin-context.d.ts +5 -0
- package/src/internal/router-plugin/core/router-plugin-context.js +6 -0
- package/src/internal/router-plugin/core/utils.d.ts +17 -0
- package/src/internal/router-plugin/core/utils.js +47 -0
- package/src/internal/router-plugin/esbuild.d.ts +197 -0
- package/src/internal/router-plugin/esbuild.js +58 -0
- package/src/internal/router-plugin/index.d.ts +19 -0
- package/src/internal/router-plugin/index.js +17 -0
- package/src/internal/router-plugin/rspack.d.ts +61 -0
- package/src/internal/router-plugin/rspack.js +92 -0
- package/src/internal/router-plugin/vite.d.ts +201 -0
- package/src/internal/router-plugin/vite.js +62 -0
- package/src/internal/router-plugin/webpack.d.ts +50 -0
- package/src/internal/router-plugin/webpack.js +77 -0
- package/src/internal/start-plugin-core/build-sitemap.d.ts +34 -0
- package/src/internal/start-plugin-core/build-sitemap.js +125 -0
- package/src/internal/start-plugin-core/config-context.d.ts +30 -0
- package/src/internal/start-plugin-core/config-context.js +89 -0
- package/src/internal/start-plugin-core/constants.d.ts +20 -0
- package/src/internal/start-plugin-core/constants.js +24 -0
- package/src/internal/start-plugin-core/debug.d.ts +1 -0
- package/src/internal/start-plugin-core/hydrate-when-transform.d.ts +5 -0
- package/src/internal/start-plugin-core/hydrate-when-transform.js +661 -0
- package/src/internal/start-plugin-core/hydration-constants.d.ts +1 -0
- package/src/internal/start-plugin-core/hydration-constants.js +4 -0
- package/src/internal/start-plugin-core/import-protection/adapterUtils.d.ts +40 -0
- package/src/internal/start-plugin-core/import-protection/adapterUtils.js +42 -0
- package/src/internal/start-plugin-core/import-protection/analysis.d.ts +63 -0
- package/src/internal/start-plugin-core/import-protection/analysis.js +533 -0
- package/src/internal/start-plugin-core/import-protection/constants.d.ts +11 -0
- package/src/internal/start-plugin-core/import-protection/constants.js +39 -0
- package/src/internal/start-plugin-core/import-protection/defaults.d.ts +19 -0
- package/src/internal/start-plugin-core/import-protection/defaults.js +34 -0
- package/src/internal/start-plugin-core/import-protection/extensionlessAbsoluteIdResolver.d.ts +22 -0
- package/src/internal/start-plugin-core/import-protection/extensionlessAbsoluteIdResolver.js +94 -0
- package/src/internal/start-plugin-core/import-protection/matchers.d.ts +18 -0
- package/src/internal/start-plugin-core/import-protection/matchers.js +39 -0
- package/src/internal/start-plugin-core/import-protection/rewrite.d.ts +29 -0
- package/src/internal/start-plugin-core/import-protection/rewrite.js +184 -0
- package/src/internal/start-plugin-core/import-protection/sourceLocation.d.ts +170 -0
- package/src/internal/start-plugin-core/import-protection/sourceLocation.js +376 -0
- package/src/internal/start-plugin-core/import-protection/trace.d.ts +89 -0
- package/src/internal/start-plugin-core/import-protection/trace.js +186 -0
- package/src/internal/start-plugin-core/import-protection/utils.d.ts +78 -0
- package/src/internal/start-plugin-core/import-protection/utils.js +171 -0
- package/src/internal/start-plugin-core/import-protection/virtualModules.d.ts +38 -0
- package/src/internal/start-plugin-core/import-protection/virtualModules.js +241 -0
- package/src/internal/start-plugin-core/index.d.ts +8 -0
- package/src/internal/start-plugin-core/index.js +2 -0
- package/src/internal/start-plugin-core/planning.d.ts +44 -0
- package/src/internal/start-plugin-core/planning.js +98 -0
- package/src/internal/start-plugin-core/post-build.d.ts +12 -0
- package/src/internal/start-plugin-core/post-build.js +40 -0
- package/src/internal/start-plugin-core/prerender.d.ts +17 -0
- package/src/internal/start-plugin-core/prerender.js +172 -0
- package/src/internal/start-plugin-core/queue.d.ts +37 -0
- package/src/internal/start-plugin-core/queue.js +118 -0
- package/src/internal/start-plugin-core/resolve-entries.d.ts +10 -0
- package/src/internal/start-plugin-core/resolve-entries.js +32 -0
- package/src/internal/start-plugin-core/schema.d.ts +1799 -0
- package/src/internal/start-plugin-core/schema.js +252 -0
- package/src/internal/start-plugin-core/serialization-adapters-module.d.ts +18 -0
- package/src/internal/start-plugin-core/serialization-adapters-module.js +37 -0
- package/src/internal/start-plugin-core/start-compiler/compiler.d.ts +181 -0
- package/src/internal/start-plugin-core/start-compiler/compiler.js +1078 -0
- package/src/internal/start-plugin-core/start-compiler/config.d.ts +20 -0
- package/src/internal/start-plugin-core/start-compiler/config.js +84 -0
- package/src/internal/start-plugin-core/start-compiler/handleClientOnlyJSX.d.ts +24 -0
- package/src/internal/start-plugin-core/start-compiler/handleClientOnlyJSX.js +25 -0
- package/src/internal/start-plugin-core/start-compiler/handleCreateIsomorphicFn.d.ts +11 -0
- package/src/internal/start-plugin-core/start-compiler/handleCreateIsomorphicFn.js +24 -0
- package/src/internal/start-plugin-core/start-compiler/handleCreateMiddleware.d.ts +11 -0
- package/src/internal/start-plugin-core/start-compiler/handleCreateMiddleware.js +35 -0
- package/src/internal/start-plugin-core/start-compiler/handleCreateServerFn.d.ts +22 -0
- package/src/internal/start-plugin-core/start-compiler/handleCreateServerFn.js +292 -0
- package/src/internal/start-plugin-core/start-compiler/handleEnvOnly.d.ts +14 -0
- package/src/internal/start-plugin-core/start-compiler/handleEnvOnly.js +41 -0
- package/src/internal/start-plugin-core/start-compiler/host.d.ts +44 -0
- package/src/internal/start-plugin-core/start-compiler/host.js +75 -0
- package/src/internal/start-plugin-core/start-compiler/server-fn-resolver-module.d.ts +10 -0
- package/src/internal/start-plugin-core/start-compiler/server-fn-resolver-module.js +87 -0
- package/src/internal/start-plugin-core/start-compiler/types.d.ts +119 -0
- package/src/internal/start-plugin-core/start-compiler/utils.d.ts +27 -0
- package/src/internal/start-plugin-core/start-compiler/utils.js +36 -0
- package/src/internal/start-plugin-core/start-manifest-plugin/inlineCss.d.ts +16 -0
- package/src/internal/start-plugin-core/start-manifest-plugin/inlineCss.js +131 -0
- package/src/internal/start-plugin-core/start-manifest-plugin/manifestBuilder.d.ts +64 -0
- package/src/internal/start-plugin-core/start-manifest-plugin/manifestBuilder.js +441 -0
- package/src/internal/start-plugin-core/start-router-plugin/constants.d.ts +1 -0
- package/src/internal/start-plugin-core/start-router-plugin/constants.js +4 -0
- package/src/internal/start-plugin-core/start-router-plugin/generator-plugins/compose-generator-plugins.d.ts +6 -0
- package/src/internal/start-plugin-core/start-router-plugin/generator-plugins/compose-generator-plugins.js +6 -0
- package/src/internal/start-plugin-core/start-router-plugin/generator-plugins/prerender-routes-plugin.d.ts +6 -0
- package/src/internal/start-plugin-core/start-router-plugin/generator-plugins/prerender-routes-plugin.js +27 -0
- package/src/internal/start-plugin-core/start-router-plugin/generator-plugins/routes-manifest-plugin.d.ts +6 -0
- package/src/internal/start-plugin-core/start-router-plugin/generator-plugins/routes-manifest-plugin.js +34 -0
- package/src/internal/start-plugin-core/start-router-plugin/pruneServerOnlySubtrees.d.ts +11 -0
- package/src/internal/start-plugin-core/start-router-plugin/pruneServerOnlySubtrees.js +42 -0
- package/src/internal/start-plugin-core/start-router-plugin/route-tree-footer.d.ts +6 -0
- package/src/internal/start-plugin-core/start-router-plugin/route-tree-footer.js +59 -0
- package/src/internal/start-plugin-core/types.d.ts +135 -0
- package/src/internal/start-plugin-core/types.js +4 -0
- package/src/internal/start-plugin-core/utils.d.ts +13 -0
- package/src/internal/start-plugin-core/utils.js +42 -0
- package/src/internal/start-plugin-core/vite/createVirtualModule.d.ts +15 -0
- package/src/internal/start-plugin-core/vite/createVirtualModule.js +27 -0
- package/src/internal/start-plugin-core/vite/dev-server-plugin/dev-styles.d.ts +26 -0
- package/src/internal/start-plugin-core/vite/dev-server-plugin/dev-styles.js +165 -0
- package/src/internal/start-plugin-core/vite/dev-server-plugin/plugin.d.ts +11 -0
- package/src/internal/start-plugin-core/vite/dev-server-plugin/plugin.js +170 -0
- package/src/internal/start-plugin-core/vite/import-protection-plugin/plugin.d.ts +4 -0
- package/src/internal/start-plugin-core/vite/import-protection-plugin/plugin.js +1553 -0
- package/src/internal/start-plugin-core/vite/import-protection-plugin/types.d.ts +103 -0
- package/src/internal/start-plugin-core/vite/import-protection-plugin/virtualModules.d.ts +40 -0
- package/src/internal/start-plugin-core/vite/import-protection-plugin/virtualModules.js +68 -0
- package/src/internal/start-plugin-core/vite/index.d.ts +13 -0
- package/src/internal/start-plugin-core/vite/index.js +4 -0
- package/src/internal/start-plugin-core/vite/load-env-plugin/plugin.d.ts +2 -0
- package/src/internal/start-plugin-core/vite/load-env-plugin/plugin.js +13 -0
- package/src/internal/start-plugin-core/vite/output-directory.d.ts +7 -0
- package/src/internal/start-plugin-core/vite/output-directory.js +18 -0
- package/src/internal/start-plugin-core/vite/planning.d.ts +112 -0
- package/src/internal/start-plugin-core/vite/planning.js +152 -0
- package/src/internal/start-plugin-core/vite/plugin.d.ts +7 -0
- package/src/internal/start-plugin-core/vite/plugin.js +208 -0
- package/src/internal/start-plugin-core/vite/plugins.d.ts +17 -0
- package/src/internal/start-plugin-core/vite/plugins.js +72 -0
- package/src/internal/start-plugin-core/vite/post-server-build.d.ts +9 -0
- package/src/internal/start-plugin-core/vite/post-server-build.js +22 -0
- package/src/internal/start-plugin-core/vite/prerender.d.ts +9 -0
- package/src/internal/start-plugin-core/vite/prerender.js +52 -0
- package/src/internal/start-plugin-core/vite/preview-server-plugin/plugin.d.ts +2 -0
- package/src/internal/start-plugin-core/vite/preview-server-plugin/plugin.js +54 -0
- package/src/internal/start-plugin-core/vite/schema.d.ts +2423 -0
- package/src/internal/start-plugin-core/vite/schema.js +17 -0
- package/src/internal/start-plugin-core/vite/serialization-adapters-plugin.d.ts +5 -0
- package/src/internal/start-plugin-core/vite/serialization-adapters-plugin.js +63 -0
- package/src/internal/start-plugin-core/vite/start-compiler-plugin/hot-update.d.ts +5 -0
- package/src/internal/start-plugin-core/vite/start-compiler-plugin/hot-update.js +14 -0
- package/src/internal/start-plugin-core/vite/start-compiler-plugin/module-specifier.d.ts +5 -0
- package/src/internal/start-plugin-core/vite/start-compiler-plugin/module-specifier.js +25 -0
- package/src/internal/start-plugin-core/vite/start-compiler-plugin/plugin.d.ts +29 -0
- package/src/internal/start-plugin-core/vite/start-compiler-plugin/plugin.js +380 -0
- package/src/internal/start-plugin-core/vite/start-manifest-plugin/normalized-client-build.d.ts +11 -0
- package/src/internal/start-plugin-core/vite/start-manifest-plugin/normalized-client-build.js +114 -0
- package/src/internal/start-plugin-core/vite/start-manifest-plugin/plugin.d.ts +3 -0
- package/src/internal/start-plugin-core/vite/start-manifest-plugin/plugin.js +103 -0
- package/src/internal/start-plugin-core/vite/start-router-plugin/plugin.d.ts +9 -0
- package/src/internal/start-plugin-core/vite/start-router-plugin/plugin.js +143 -0
- package/src/internal/start-plugin-core/vite/types.d.ts +17 -0
- package/src/package-names.js +10 -0
- package/src/plugin-vite.d.ts +23 -0
- package/src/plugin-vite.js +62 -0
- package/src/runtime/client/StartClient.d.ts +11 -0
- package/src/runtime/client/StartClient.js +16 -0
- package/src/runtime/client/hydrateStart.d.ts +4 -0
- package/src/runtime/client/hydrateStart.js +30 -0
- package/src/runtime/server/StartServer.d.ts +10 -0
- package/src/runtime/server/StartServer.js +6 -0
- package/src/runtime/server/defaultRenderHandler.d.ts +3 -0
- package/src/runtime/server/defaultRenderHandler.js +11 -0
- package/src/runtime/server/defaultStreamHandler.d.ts +3 -0
- package/src/runtime/server/defaultStreamHandler.js +13 -0
- package/src/server-entry.d.ts +11 -0
- package/src/server-entry.js +13 -0
- package/src/server-only.d.ts +1 -0
- package/src/server-only.js +0 -0
- package/src/server-rpc.d.ts +1 -0
- package/src/server-rpc.js +1 -0
- package/src/server.d.ts +6 -0
- package/src/server.js +4 -0
- package/src/ssr-rpc.d.ts +1 -0
- package/src/ssr-rpc.js +1 -0
- package/src/use-server-fn.d.ts +3 -0
- package/src/use-server-fn.js +18 -0
- package/src/validate-options.js +7 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021-present Tanner Linsley
|
|
4
|
+
Copyright (c) 2026 Dominic Gannaway
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# @octanejs/tanstack-start
|
|
2
|
+
|
|
3
|
+
TanStack Start for Octane. This package owns the renderer integration needed
|
|
4
|
+
for file-route generation, route code splitting, server functions, streaming
|
|
5
|
+
SSR, hydration, and Vite development and production builds.
|
|
6
|
+
|
|
7
|
+
It uses [`@octanejs/tanstack-router`](../tanstack-router) for the public router
|
|
8
|
+
binding and published renderer-neutral TanStack core packages for shared Start
|
|
9
|
+
and Router behavior. The Octane-specific generator, compiler, and Vite adapter
|
|
10
|
+
live inside this package, so installing it does not require private workspace
|
|
11
|
+
packages or preview release artifacts.
|
|
12
|
+
|
|
13
|
+
## Vite setup
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { defineConfig } from 'vite';
|
|
17
|
+
import { tanstackStart } from '@octanejs/tanstack-start/plugin/vite';
|
|
18
|
+
|
|
19
|
+
export default defineConfig({
|
|
20
|
+
plugins: [tanstackStart()],
|
|
21
|
+
});
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The plugin installs Octane compilation before route analysis, generates TSRX
|
|
25
|
+
file routes with imports from `@octanejs/tanstack-router`, compiles Start's
|
|
26
|
+
environment-specific APIs, and configures the client and SSR Vite environments.
|
|
27
|
+
|
|
28
|
+
Application code imports Start APIs from this package and router APIs from the
|
|
29
|
+
Octane router binding:
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import { createServerFn } from '@octanejs/tanstack-start';
|
|
33
|
+
import { createFileRoute } from '@octanejs/tanstack-router';
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Public entries
|
|
37
|
+
|
|
38
|
+
- `@octanejs/tanstack-start`
|
|
39
|
+
- `@octanejs/tanstack-start/client`
|
|
40
|
+
- `@octanejs/tanstack-start/server`
|
|
41
|
+
- `@octanejs/tanstack-start/plugin/vite`
|
|
42
|
+
- RPC and environment-marker entries used by the Start compiler
|
|
43
|
+
- `@octanejs/tanstack-start/server-entry`
|
|
44
|
+
|
|
45
|
+
The compiler and generator internals are implementation details and are not
|
|
46
|
+
public package exports.
|
|
47
|
+
|
|
48
|
+
## Upstream basis
|
|
49
|
+
|
|
50
|
+
The renderer adapter is derived from TanStack Router pull request #7847 at
|
|
51
|
+
snapshot `753f919e`, with repository-owned fixes for TSRX typing and Octane's
|
|
52
|
+
native streamed HTML injection. See `THIRD_PARTY_NOTICES.md` for attribution.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
The Start compiler, route generator, router plugin, client runtime, and server
|
|
4
|
+
runtime in this package are derived from TanStack Router pull request #7847,
|
|
5
|
+
snapshot `753f919e`, and later Octane-specific fixes maintained in this
|
|
6
|
+
repository. That work is copyright Tanner Linsley and TanStack contributors and
|
|
7
|
+
is used under the MIT License shipped with this package.
|
|
8
|
+
|
|
9
|
+
The native streaming path is adapted to Octane's `StreamOptions.injection` API
|
|
10
|
+
so streamed router HTML is merged by the renderer rather than by a byte-level
|
|
11
|
+
post-processing transform.
|
package/package.json
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@octanejs/tanstack-start",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "TanStack Start for Octane, including file-route generation, server functions, SSR streaming, hydration, and Vite integration.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=22"
|
|
9
|
+
},
|
|
10
|
+
"octane": {
|
|
11
|
+
"hookSlots": {
|
|
12
|
+
"manual": [
|
|
13
|
+
"src"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"author": {
|
|
18
|
+
"name": "Dominic Gannaway",
|
|
19
|
+
"email": "dg@domgan.com"
|
|
20
|
+
},
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git+https://github.com/octanejs/octane.git",
|
|
27
|
+
"directory": "packages/tanstack-start"
|
|
28
|
+
},
|
|
29
|
+
"main": "src/index.js",
|
|
30
|
+
"module": "src/index.js",
|
|
31
|
+
"types": "src/index.d.ts",
|
|
32
|
+
"files": [
|
|
33
|
+
"src",
|
|
34
|
+
"LICENSE",
|
|
35
|
+
"README.md",
|
|
36
|
+
"THIRD_PARTY_NOTICES.md"
|
|
37
|
+
],
|
|
38
|
+
"imports": {
|
|
39
|
+
"#tanstack-start/package-names": "./src/package-names.js",
|
|
40
|
+
"#tanstack-start/router-generator": "./src/internal/router-generator/index.js",
|
|
41
|
+
"#tanstack-start/router-generator/*": "./src/internal/router-generator/*.js",
|
|
42
|
+
"#tanstack-start/router-plugin": "./src/internal/router-plugin/index.js",
|
|
43
|
+
"#tanstack-start/router-plugin/*": "./src/internal/router-plugin/*.js",
|
|
44
|
+
"#tanstack-start/plugin-core": "./src/internal/start-plugin-core/index.js",
|
|
45
|
+
"#tanstack-start/plugin-core/vite": "./src/internal/start-plugin-core/vite/index.js",
|
|
46
|
+
"#tanstack-start/plugin-core/*": "./src/internal/start-plugin-core/*.js"
|
|
47
|
+
},
|
|
48
|
+
"exports": {
|
|
49
|
+
".": {
|
|
50
|
+
"types": "./src/index.d.ts",
|
|
51
|
+
"import": "./src/index.js",
|
|
52
|
+
"default": "./src/index.js"
|
|
53
|
+
},
|
|
54
|
+
"./client": {
|
|
55
|
+
"types": "./src/client.d.ts",
|
|
56
|
+
"import": "./src/client.js",
|
|
57
|
+
"default": "./src/client.js"
|
|
58
|
+
},
|
|
59
|
+
"./server": {
|
|
60
|
+
"types": "./src/server.d.ts",
|
|
61
|
+
"import": "./src/server.js",
|
|
62
|
+
"default": "./src/server.js"
|
|
63
|
+
},
|
|
64
|
+
"./client-rpc": {
|
|
65
|
+
"types": "./src/client-rpc.d.ts",
|
|
66
|
+
"import": "./src/client-rpc.js",
|
|
67
|
+
"default": "./src/client-rpc.js"
|
|
68
|
+
},
|
|
69
|
+
"./server-rpc": {
|
|
70
|
+
"types": "./src/server-rpc.d.ts",
|
|
71
|
+
"import": "./src/server-rpc.js",
|
|
72
|
+
"default": "./src/server-rpc.js"
|
|
73
|
+
},
|
|
74
|
+
"./ssr-rpc": {
|
|
75
|
+
"types": "./src/ssr-rpc.d.ts",
|
|
76
|
+
"import": "./src/ssr-rpc.js",
|
|
77
|
+
"default": "./src/ssr-rpc.js"
|
|
78
|
+
},
|
|
79
|
+
"./server-only": {
|
|
80
|
+
"types": "./src/server-only.d.ts",
|
|
81
|
+
"import": "./src/server-only.js",
|
|
82
|
+
"default": "./src/server-only.js"
|
|
83
|
+
},
|
|
84
|
+
"./client-only": {
|
|
85
|
+
"types": "./src/client-only.d.ts",
|
|
86
|
+
"import": "./src/client-only.js",
|
|
87
|
+
"default": "./src/client-only.js"
|
|
88
|
+
},
|
|
89
|
+
"./plugin/vite": {
|
|
90
|
+
"types": "./src/plugin-vite.d.ts",
|
|
91
|
+
"import": "./src/plugin-vite.js",
|
|
92
|
+
"default": "./src/plugin-vite.js"
|
|
93
|
+
},
|
|
94
|
+
"./server-entry": {
|
|
95
|
+
"types": "./src/server-entry.d.ts",
|
|
96
|
+
"import": "./src/server-entry.js",
|
|
97
|
+
"default": "./src/server-entry.js"
|
|
98
|
+
},
|
|
99
|
+
"./package.json": "./package.json"
|
|
100
|
+
},
|
|
101
|
+
"sideEffects": false,
|
|
102
|
+
"dependencies": {
|
|
103
|
+
"@babel/code-frame": "7.27.1",
|
|
104
|
+
"@babel/core": "7.29.7",
|
|
105
|
+
"@babel/template": "^7.27.2",
|
|
106
|
+
"@babel/types": "^7.28.5",
|
|
107
|
+
"@tanstack/router-core": "1.171.15",
|
|
108
|
+
"@tanstack/router-utils": "1.162.2",
|
|
109
|
+
"@tanstack/start-client-core": "1.170.14",
|
|
110
|
+
"@tanstack/start-server-core": "1.169.17",
|
|
111
|
+
"@tanstack/virtual-file-routes": "1.162.0",
|
|
112
|
+
"chokidar": "^5.0.0",
|
|
113
|
+
"exsolve": "^1.0.7",
|
|
114
|
+
"jiti": "^2.7.0",
|
|
115
|
+
"lightningcss": "^1.32.0",
|
|
116
|
+
"magic-string": "^0.30.21",
|
|
117
|
+
"pathe": "^2.0.3",
|
|
118
|
+
"picomatch": "^4.0.3",
|
|
119
|
+
"prettier": "^3.8.4",
|
|
120
|
+
"seroval": "^1.5.4",
|
|
121
|
+
"source-map": "^0.7.6",
|
|
122
|
+
"srvx": "^0.11.9",
|
|
123
|
+
"tinyglobby": "^0.2.15",
|
|
124
|
+
"ufo": "^1.5.4",
|
|
125
|
+
"unplugin": "^3.0.0",
|
|
126
|
+
"vitefu": "^1.1.1",
|
|
127
|
+
"xmlbuilder2": "^4.0.3",
|
|
128
|
+
"zod": "^4.4.3",
|
|
129
|
+
"@octanejs/tanstack-router": "0.1.10"
|
|
130
|
+
},
|
|
131
|
+
"peerDependencies": {
|
|
132
|
+
"vite": ">=7.0.0",
|
|
133
|
+
"octane": "0.1.11"
|
|
134
|
+
},
|
|
135
|
+
"peerDependenciesMeta": {
|
|
136
|
+
"vite": {
|
|
137
|
+
"optional": true
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"devDependencies": {
|
|
141
|
+
"@types/node": "^24.3.0",
|
|
142
|
+
"vite": "^8.0.16",
|
|
143
|
+
"vitest": "^4.1.9",
|
|
144
|
+
"octane": "0.1.11"
|
|
145
|
+
},
|
|
146
|
+
"scripts": {
|
|
147
|
+
"test": "cd ../.. && vitest run --project tanstack-start"
|
|
148
|
+
}
|
|
149
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@tanstack/start-client-core/client-rpc';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@tanstack/start-client-core/client-rpc';
|
package/src/client.d.ts
ADDED
package/src/client.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { hydrateRoot, initializeHydrationEventCapture } from 'octane';
|
|
2
|
+
import { StartClient, hydrateStart } from '../client.js';
|
|
3
|
+
|
|
4
|
+
initializeHydrationEventCapture();
|
|
5
|
+
|
|
6
|
+
hydrateStart().then((router) => {
|
|
7
|
+
const container = document.getElementById('__app');
|
|
8
|
+
if (!container) {
|
|
9
|
+
throw new Error('TanStack Start could not find the Octane hydration root.');
|
|
10
|
+
}
|
|
11
|
+
hydrateRoot(container, StartClient, { router });
|
|
12
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createStartHandler, defaultStreamHandler } from '../server.js';
|
|
2
|
+
|
|
3
|
+
const fetch = createStartHandler(defaultStreamHandler);
|
|
4
|
+
|
|
5
|
+
export function createServerEntry(entry) {
|
|
6
|
+
return {
|
|
7
|
+
async fetch(...args) {
|
|
8
|
+
return await entry.fetch(...args);
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default createServerEntry({ fetch });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const startInstance = undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
|
|
4
|
+
const sourceDirectory = path.dirname(fileURLToPath(import.meta.url));
|
|
5
|
+
const defaultEntryDirectory = path.resolve(sourceDirectory, 'default-entry');
|
|
6
|
+
|
|
7
|
+
export const octaneStartDefaultEntryPaths = {
|
|
8
|
+
client: path.resolve(defaultEntryDirectory, 'client.js'),
|
|
9
|
+
server: path.resolve(defaultEntryDirectory, 'server.js'),
|
|
10
|
+
start: path.resolve(defaultEntryDirectory, 'start.js'),
|
|
11
|
+
};
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { useServerFn } from './use-server-fn.js';
|
|
2
|
+
export * from '@tanstack/start-client-core';
|
|
3
|
+
export {
|
|
4
|
+
createClientOnlyFn,
|
|
5
|
+
createCsrfMiddleware,
|
|
6
|
+
createIsomorphicFn,
|
|
7
|
+
createMiddleware,
|
|
8
|
+
createServerFn,
|
|
9
|
+
createServerOnlyFn,
|
|
10
|
+
createStart,
|
|
11
|
+
} from '@tanstack/start-client-core';
|
package/src/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useServerFn } from './use-server-fn.js';
|
|
2
|
+
import {
|
|
3
|
+
createClientOnlyFn,
|
|
4
|
+
createCsrfMiddleware,
|
|
5
|
+
createIsomorphicFn,
|
|
6
|
+
createMiddleware,
|
|
7
|
+
createServerFn,
|
|
8
|
+
createServerOnlyFn,
|
|
9
|
+
createStart,
|
|
10
|
+
} from '@tanstack/start-client-core';
|
|
11
|
+
|
|
12
|
+
export * from '@tanstack/start-client-core';
|
|
13
|
+
export {
|
|
14
|
+
createClientOnlyFn,
|
|
15
|
+
createCsrfMiddleware,
|
|
16
|
+
createIsomorphicFn,
|
|
17
|
+
createMiddleware,
|
|
18
|
+
createServerFn,
|
|
19
|
+
createServerOnlyFn,
|
|
20
|
+
createStart,
|
|
21
|
+
useServerFn,
|
|
22
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Start integration internals
|
|
2
|
+
|
|
3
|
+
These modules are the package-owned Router generator, Router Vite plugin, and
|
|
4
|
+
Start compiler/Vite core used by the Octane adapter. They are derived from the
|
|
5
|
+
TanStack framework-adapter snapshot identified in the package notice, with
|
|
6
|
+
Octane package-name mapping and repository fixes applied.
|
|
7
|
+
|
|
8
|
+
They are committed as executable ESM because `plugin/vite` must load from a
|
|
9
|
+
published package in plain Node before an application build exists. Internal
|
|
10
|
+
package-import aliases keep the three implementation layers private while
|
|
11
|
+
allowing their original module boundaries to remain reviewable.
|
|
12
|
+
|
|
13
|
+
When updating the upstream basis, preserve the local package-name helpers,
|
|
14
|
+
TSRX source masking, compiler-before-router plugin order, native streaming
|
|
15
|
+
injection, and focused integration tests.
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { GeneratorPlugin } from './plugin/types.js';
|
|
3
|
+
declare const tokenJsonRegexSchema: z.ZodObject<
|
|
4
|
+
{
|
|
5
|
+
regex: z.ZodString;
|
|
6
|
+
flags: z.ZodOptional<z.ZodString>;
|
|
7
|
+
},
|
|
8
|
+
z.core.$strip
|
|
9
|
+
>;
|
|
10
|
+
declare const tokenMatcherSchema: z.ZodUnion<
|
|
11
|
+
readonly [
|
|
12
|
+
z.ZodString,
|
|
13
|
+
z.ZodCustom<RegExp, RegExp>,
|
|
14
|
+
z.ZodObject<
|
|
15
|
+
{
|
|
16
|
+
regex: z.ZodString;
|
|
17
|
+
flags: z.ZodOptional<z.ZodString>;
|
|
18
|
+
},
|
|
19
|
+
z.core.$strip
|
|
20
|
+
>,
|
|
21
|
+
]
|
|
22
|
+
>;
|
|
23
|
+
export type TokenMatcherJson = string | z.infer<typeof tokenJsonRegexSchema>;
|
|
24
|
+
export type TokenMatcher = z.infer<typeof tokenMatcherSchema>;
|
|
25
|
+
export declare const routerFrameworks: readonly ['react', 'solid', 'vue', 'octane'];
|
|
26
|
+
export declare const baseConfigSchema: z.ZodObject<
|
|
27
|
+
{
|
|
28
|
+
target: z.ZodDefault<
|
|
29
|
+
z.ZodOptional<
|
|
30
|
+
z.ZodEnum<{
|
|
31
|
+
vue: 'vue';
|
|
32
|
+
react: 'react';
|
|
33
|
+
solid: 'solid';
|
|
34
|
+
octane: 'octane';
|
|
35
|
+
}>
|
|
36
|
+
>
|
|
37
|
+
>;
|
|
38
|
+
virtualRouteConfig: z.ZodOptional<
|
|
39
|
+
z.ZodUnion<
|
|
40
|
+
[
|
|
41
|
+
z.ZodType<
|
|
42
|
+
import('@tanstack/virtual-file-routes').VirtualRootRoute,
|
|
43
|
+
unknown,
|
|
44
|
+
z.core.$ZodTypeInternals<
|
|
45
|
+
import('@tanstack/virtual-file-routes').VirtualRootRoute,
|
|
46
|
+
unknown
|
|
47
|
+
>
|
|
48
|
+
>,
|
|
49
|
+
z.ZodString,
|
|
50
|
+
]
|
|
51
|
+
>
|
|
52
|
+
>;
|
|
53
|
+
routeFilePrefix: z.ZodOptional<z.ZodString>;
|
|
54
|
+
routeFileIgnorePrefix: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
55
|
+
routeFileIgnorePattern: z.ZodOptional<z.ZodString>;
|
|
56
|
+
routesDirectory: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
57
|
+
quoteStyle: z.ZodDefault<
|
|
58
|
+
z.ZodOptional<
|
|
59
|
+
z.ZodEnum<{
|
|
60
|
+
single: 'single';
|
|
61
|
+
double: 'double';
|
|
62
|
+
}>
|
|
63
|
+
>
|
|
64
|
+
>;
|
|
65
|
+
semicolons: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
66
|
+
disableLogging: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
67
|
+
routeTreeFileHeader: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
68
|
+
indexToken: z.ZodDefault<
|
|
69
|
+
z.ZodOptional<
|
|
70
|
+
z.ZodUnion<
|
|
71
|
+
readonly [
|
|
72
|
+
z.ZodString,
|
|
73
|
+
z.ZodCustom<RegExp, RegExp>,
|
|
74
|
+
z.ZodObject<
|
|
75
|
+
{
|
|
76
|
+
regex: z.ZodString;
|
|
77
|
+
flags: z.ZodOptional<z.ZodString>;
|
|
78
|
+
},
|
|
79
|
+
z.core.$strip
|
|
80
|
+
>,
|
|
81
|
+
]
|
|
82
|
+
>
|
|
83
|
+
>
|
|
84
|
+
>;
|
|
85
|
+
routeToken: z.ZodDefault<
|
|
86
|
+
z.ZodOptional<
|
|
87
|
+
z.ZodUnion<
|
|
88
|
+
readonly [
|
|
89
|
+
z.ZodString,
|
|
90
|
+
z.ZodCustom<RegExp, RegExp>,
|
|
91
|
+
z.ZodObject<
|
|
92
|
+
{
|
|
93
|
+
regex: z.ZodString;
|
|
94
|
+
flags: z.ZodOptional<z.ZodString>;
|
|
95
|
+
},
|
|
96
|
+
z.core.$strip
|
|
97
|
+
>,
|
|
98
|
+
]
|
|
99
|
+
>
|
|
100
|
+
>
|
|
101
|
+
>;
|
|
102
|
+
pathParamsAllowedCharacters: z.ZodOptional<
|
|
103
|
+
z.ZodArray<
|
|
104
|
+
z.ZodEnum<{
|
|
105
|
+
':': ':';
|
|
106
|
+
$: '$';
|
|
107
|
+
';': ';';
|
|
108
|
+
'@': '@';
|
|
109
|
+
'&': '&';
|
|
110
|
+
'=': '=';
|
|
111
|
+
'+': '+';
|
|
112
|
+
',': ',';
|
|
113
|
+
}>
|
|
114
|
+
>
|
|
115
|
+
>;
|
|
116
|
+
},
|
|
117
|
+
z.core.$strip
|
|
118
|
+
>;
|
|
119
|
+
export type BaseConfig = z.infer<typeof baseConfigSchema>;
|
|
120
|
+
export declare const configSchema: z.ZodObject<
|
|
121
|
+
{
|
|
122
|
+
target: z.ZodDefault<
|
|
123
|
+
z.ZodOptional<
|
|
124
|
+
z.ZodEnum<{
|
|
125
|
+
vue: 'vue';
|
|
126
|
+
react: 'react';
|
|
127
|
+
solid: 'solid';
|
|
128
|
+
octane: 'octane';
|
|
129
|
+
}>
|
|
130
|
+
>
|
|
131
|
+
>;
|
|
132
|
+
virtualRouteConfig: z.ZodOptional<
|
|
133
|
+
z.ZodUnion<
|
|
134
|
+
[
|
|
135
|
+
z.ZodType<
|
|
136
|
+
import('@tanstack/virtual-file-routes').VirtualRootRoute,
|
|
137
|
+
unknown,
|
|
138
|
+
z.core.$ZodTypeInternals<
|
|
139
|
+
import('@tanstack/virtual-file-routes').VirtualRootRoute,
|
|
140
|
+
unknown
|
|
141
|
+
>
|
|
142
|
+
>,
|
|
143
|
+
z.ZodString,
|
|
144
|
+
]
|
|
145
|
+
>
|
|
146
|
+
>;
|
|
147
|
+
routeFilePrefix: z.ZodOptional<z.ZodString>;
|
|
148
|
+
routeFileIgnorePrefix: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
149
|
+
routeFileIgnorePattern: z.ZodOptional<z.ZodString>;
|
|
150
|
+
routesDirectory: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
151
|
+
quoteStyle: z.ZodDefault<
|
|
152
|
+
z.ZodOptional<
|
|
153
|
+
z.ZodEnum<{
|
|
154
|
+
single: 'single';
|
|
155
|
+
double: 'double';
|
|
156
|
+
}>
|
|
157
|
+
>
|
|
158
|
+
>;
|
|
159
|
+
semicolons: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
160
|
+
disableLogging: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
161
|
+
routeTreeFileHeader: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
162
|
+
indexToken: z.ZodDefault<
|
|
163
|
+
z.ZodOptional<
|
|
164
|
+
z.ZodUnion<
|
|
165
|
+
readonly [
|
|
166
|
+
z.ZodString,
|
|
167
|
+
z.ZodCustom<RegExp, RegExp>,
|
|
168
|
+
z.ZodObject<
|
|
169
|
+
{
|
|
170
|
+
regex: z.ZodString;
|
|
171
|
+
flags: z.ZodOptional<z.ZodString>;
|
|
172
|
+
},
|
|
173
|
+
z.core.$strip
|
|
174
|
+
>,
|
|
175
|
+
]
|
|
176
|
+
>
|
|
177
|
+
>
|
|
178
|
+
>;
|
|
179
|
+
routeToken: z.ZodDefault<
|
|
180
|
+
z.ZodOptional<
|
|
181
|
+
z.ZodUnion<
|
|
182
|
+
readonly [
|
|
183
|
+
z.ZodString,
|
|
184
|
+
z.ZodCustom<RegExp, RegExp>,
|
|
185
|
+
z.ZodObject<
|
|
186
|
+
{
|
|
187
|
+
regex: z.ZodString;
|
|
188
|
+
flags: z.ZodOptional<z.ZodString>;
|
|
189
|
+
},
|
|
190
|
+
z.core.$strip
|
|
191
|
+
>,
|
|
192
|
+
]
|
|
193
|
+
>
|
|
194
|
+
>
|
|
195
|
+
>;
|
|
196
|
+
pathParamsAllowedCharacters: z.ZodOptional<
|
|
197
|
+
z.ZodArray<
|
|
198
|
+
z.ZodEnum<{
|
|
199
|
+
':': ':';
|
|
200
|
+
$: '$';
|
|
201
|
+
';': ';';
|
|
202
|
+
'@': '@';
|
|
203
|
+
'&': '&';
|
|
204
|
+
'=': '=';
|
|
205
|
+
'+': '+';
|
|
206
|
+
',': ',';
|
|
207
|
+
}>
|
|
208
|
+
>
|
|
209
|
+
>;
|
|
210
|
+
generatedRouteTree: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
211
|
+
disableTypes: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
212
|
+
addExtensions: z.ZodPipe<
|
|
213
|
+
z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>,
|
|
214
|
+
z.ZodTransform<string | boolean, string | boolean>
|
|
215
|
+
>;
|
|
216
|
+
enableRouteTreeFormatting: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
217
|
+
routeTreeFileFooter: z.ZodOptional<
|
|
218
|
+
z.ZodUnion<
|
|
219
|
+
readonly [
|
|
220
|
+
z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>,
|
|
221
|
+
z.ZodCustom<() => Array<string>, () => Array<string>>,
|
|
222
|
+
]
|
|
223
|
+
>
|
|
224
|
+
>;
|
|
225
|
+
autoCodeSplitting: z.ZodOptional<z.ZodBoolean>;
|
|
226
|
+
customScaffolding: z.ZodOptional<
|
|
227
|
+
z.ZodObject<
|
|
228
|
+
{
|
|
229
|
+
routeTemplate: z.ZodOptional<z.ZodString>;
|
|
230
|
+
lazyRouteTemplate: z.ZodOptional<z.ZodString>;
|
|
231
|
+
},
|
|
232
|
+
z.core.$strip
|
|
233
|
+
>
|
|
234
|
+
>;
|
|
235
|
+
experimental: z.ZodOptional<
|
|
236
|
+
z.ZodObject<
|
|
237
|
+
{
|
|
238
|
+
enableCodeSplitting: z.ZodOptional<z.ZodBoolean>;
|
|
239
|
+
},
|
|
240
|
+
z.core.$strip
|
|
241
|
+
>
|
|
242
|
+
>;
|
|
243
|
+
plugins: z.ZodOptional<z.ZodArray<z.ZodCustom<GeneratorPlugin, GeneratorPlugin>>>;
|
|
244
|
+
tmpDir: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
245
|
+
importRoutesUsingAbsolutePaths: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
246
|
+
},
|
|
247
|
+
z.core.$strip
|
|
248
|
+
>;
|
|
249
|
+
export type Config = z.infer<typeof configSchema>;
|
|
250
|
+
type ResolveParams = {
|
|
251
|
+
configDirectory: string;
|
|
252
|
+
};
|
|
253
|
+
export declare function resolveConfigPath({ configDirectory }: ResolveParams): string;
|
|
254
|
+
export declare function getConfig(inlineConfig?: Partial<Config>, configDirectory?: string): Config;
|
|
255
|
+
export {};
|