@tanstack/create 0.49.2 → 0.59.4
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/CHANGELOG.md +603 -0
- package/dist/add-ons.js +42 -2
- package/dist/add-to-app.js +36 -7
- package/dist/custom-add-ons/add-on.js +2 -26
- package/dist/custom-add-ons/starter.js +1 -2
- package/dist/file-helpers.js +11 -10
- package/dist/frameworks/react/add-ons/ai/assets/src/data/demo-guitars.ts +93 -0
- package/dist/frameworks/react/add-ons/ai/assets/src/hooks/demo-useAudioRecorder.ts +85 -0
- package/dist/frameworks/react/add-ons/ai/assets/src/hooks/demo-useTTS.ts +78 -0
- package/dist/frameworks/react/add-ons/ai/assets/src/lib/demo-ai-hook.ts +22 -0
- package/dist/frameworks/react/add-ons/ai/assets/src/lib/demo-guitar-tools.ts +40 -0
- package/dist/frameworks/react/add-ons/ai/assets/src/routes/demo/api.ai.chat.ts +99 -0
- package/dist/frameworks/react/add-ons/ai/assets/src/routes/demo/api.ai.image.ts +72 -0
- package/dist/frameworks/react/add-ons/ai/assets/src/routes/demo/api.ai.structured.ts +136 -0
- package/dist/frameworks/react/add-ons/ai/assets/src/routes/demo/api.ai.transcription.ts +89 -0
- package/dist/frameworks/react/add-ons/ai/assets/src/routes/demo/api.ai.tts.ts +81 -0
- package/dist/frameworks/react/add-ons/ai/info.json +1 -1
- package/dist/frameworks/react/add-ons/apollo-client/info.json +1 -1
- package/dist/frameworks/react/add-ons/better-auth/assets/src/lib/auth-client.ts +3 -0
- package/dist/frameworks/react/add-ons/better-auth/assets/src/lib/auth.ts +9 -0
- package/dist/frameworks/react/add-ons/better-auth/assets/src/routes/api/auth/$.ts +11 -0
- package/dist/frameworks/react/add-ons/better-auth/info.json +0 -2
- package/dist/frameworks/react/add-ons/clerk/info.json +0 -1
- package/dist/frameworks/react/add-ons/convex/assets/convex/schema.ts +14 -0
- package/dist/frameworks/react/add-ons/convex/assets/convex/todos.ts +43 -0
- package/dist/frameworks/react/add-ons/db/assets/src/db-collections/index.ts +20 -0
- package/dist/frameworks/react/add-ons/db/assets/src/hooks/demo.useChat.ts +62 -0
- package/dist/frameworks/react/add-ons/db/assets/src/routes/demo/db-chat-api.ts +83 -0
- package/dist/frameworks/react/add-ons/db/info.json +1 -1
- package/dist/frameworks/react/add-ons/drizzle/info.json +1 -1
- package/dist/frameworks/react/add-ons/drizzle/package.json.ejs +4 -0
- package/dist/frameworks/react/add-ons/form/assets/src/hooks/demo.form-context.ts +4 -0
- package/dist/frameworks/react/add-ons/form/assets/src/hooks/demo.form.ts +22 -0
- package/dist/frameworks/react/add-ons/mcp/assets/src/mcp-todos.ts +51 -0
- package/dist/frameworks/react/add-ons/mcp/assets/src/routes/demo/api.mcp-todos.ts +37 -0
- package/dist/frameworks/react/add-ons/mcp/assets/src/routes/mcp.ts +53 -0
- package/dist/frameworks/react/add-ons/mcp/assets/src/utils/mcp-handler.ts +61 -0
- package/dist/frameworks/react/add-ons/mcp/info.json +1 -2
- package/dist/frameworks/react/add-ons/neon/assets/neon-vite-plugin.ts +10 -0
- package/dist/frameworks/react/add-ons/neon/assets/src/db.ts +13 -0
- package/dist/frameworks/react/add-ons/neon/info.json +1 -2
- package/dist/frameworks/react/add-ons/oRPC/assets/src/orpc/client.ts +29 -0
- package/dist/frameworks/react/add-ons/oRPC/assets/src/orpc/router/index.ts +6 -0
- package/dist/frameworks/react/add-ons/oRPC/assets/src/orpc/router/todos.ts +20 -0
- package/dist/frameworks/react/add-ons/oRPC/assets/src/orpc/schema.ts +6 -0
- package/dist/frameworks/react/add-ons/oRPC/assets/src/polyfill.ts +21 -0
- package/dist/frameworks/react/add-ons/oRPC/assets/src/routes/api.$.ts +77 -0
- package/dist/frameworks/react/add-ons/oRPC/assets/src/routes/api.rpc.$.ts +29 -0
- package/dist/frameworks/react/add-ons/oRPC/info.json +1 -1
- package/dist/frameworks/react/add-ons/paraglide/info.json +1 -1
- package/dist/frameworks/react/add-ons/prisma/info.json +1 -1
- package/dist/frameworks/react/add-ons/prisma/package.json.ejs +4 -0
- package/dist/frameworks/react/add-ons/sentry/info.json +1 -2
- package/dist/frameworks/react/add-ons/shadcn/assets/src/lib/utils.ts +6 -0
- package/dist/frameworks/react/add-ons/store/assets/src/lib/demo-store.ts +13 -0
- package/dist/frameworks/react/add-ons/storybook/assets/_dot_storybook/main.ts +17 -0
- package/dist/frameworks/react/add-ons/storybook/assets/_dot_storybook/preview.ts +15 -0
- package/dist/frameworks/react/add-ons/storybook/assets/src/components/storybook/button.stories.ts +67 -0
- package/dist/frameworks/react/add-ons/storybook/assets/src/components/storybook/index.ts +14 -0
- package/dist/frameworks/react/add-ons/storybook/assets/src/components/storybook/input.stories.ts +43 -0
- package/dist/frameworks/react/add-ons/storybook/assets/src/components/storybook/radio-group.stories.ts +53 -0
- package/dist/frameworks/react/add-ons/storybook/assets/src/components/storybook/slider.stories.ts +55 -0
- package/dist/frameworks/react/add-ons/strapi/assets/src/lib/strapiClient.ts +7 -0
- package/dist/frameworks/react/add-ons/t3env/assets/src/env.ts +39 -0
- package/dist/frameworks/react/add-ons/tRPC/assets/src/integrations/trpc/init.ts +9 -0
- package/dist/frameworks/react/add-ons/tRPC/assets/src/integrations/trpc/react.ts +4 -0
- package/dist/frameworks/react/add-ons/tRPC/assets/src/integrations/trpc/router.ts +27 -0
- package/dist/frameworks/react/add-ons/tRPC/info.json +1 -1
- package/dist/frameworks/react/add-ons/table/assets/src/data/demo-table-data.ts +50 -0
- package/dist/frameworks/react/add-ons/tanstack-query/assets/src/integrations/tanstack-query/root-provider.tsx.ejs +1 -29
- package/dist/frameworks/react/add-ons/workos/info.json +0 -1
- package/dist/frameworks/react/examples/events/assets/content-collections.ts +56 -0
- package/dist/frameworks/react/examples/events/assets/src/lib/conference-ai-hook.ts +26 -0
- package/dist/frameworks/react/examples/events/assets/src/lib/conference-tools.ts +210 -0
- package/dist/frameworks/react/examples/events/assets/src/lib/utils.ts +6 -0
- package/dist/frameworks/react/examples/events/assets/src/routes/api.remy-chat.ts +121 -0
- package/dist/frameworks/react/examples/resume/assets/content-collections.ts +36 -0
- package/dist/frameworks/react/examples/resume/assets/src/lib/resume-ai-hook.ts +21 -0
- package/dist/frameworks/react/examples/resume/assets/src/lib/resume-tools.ts +165 -0
- package/dist/frameworks/react/examples/resume/assets/src/lib/utils.ts +6 -0
- package/dist/frameworks/react/examples/resume/assets/src/routes/api.resume-chat.ts +110 -0
- package/dist/frameworks/react/hosts/cloudflare/info.json +0 -1
- package/dist/frameworks/react/hosts/netlify/info.json +0 -1
- package/dist/frameworks/react/hosts/nitro/info.json +0 -1
- package/dist/frameworks/react/hosts/railway/info.json +0 -1
- package/dist/frameworks/react/index.js +1 -6
- package/dist/frameworks/react/project/base/README.md.ejs +86 -436
- package/dist/frameworks/react/project/base/_dot_gitignore +4 -0
- package/dist/frameworks/react/project/base/package.json +8 -5
- package/dist/frameworks/react/project/base/src/components/Header.tsx.ejs +2 -32
- package/dist/frameworks/react/project/base/src/routes/__root.tsx.ejs +4 -44
- package/dist/frameworks/react/project/base/src/routes/index.tsx.ejs +99 -61
- package/dist/frameworks/react/project/base/src/styles.css.ejs +3 -3
- package/dist/frameworks/react/project/base/tsconfig.json.ejs +1 -1
- package/dist/frameworks/react/project/base/vite.config.ts.ejs +33 -27
- package/dist/frameworks/react/project/packages.json +2 -2
- package/dist/frameworks/solid/add-ons/better-auth/assets/src/lib/auth-client.ts +3 -0
- package/dist/frameworks/solid/add-ons/better-auth/assets/src/lib/auth.ts +9 -0
- package/dist/frameworks/solid/add-ons/better-auth/assets/src/routes/api/auth/$.ts +11 -0
- package/dist/frameworks/solid/add-ons/better-auth/info.json +1 -1
- package/dist/frameworks/solid/add-ons/convex/assets/convex/schema.ts +14 -0
- package/dist/frameworks/solid/add-ons/convex/assets/convex/todos.ts +43 -0
- package/dist/frameworks/solid/add-ons/solid-ui/assets/src/lib/utils.ts +6 -0
- package/dist/frameworks/solid/add-ons/store/assets/src/lib/demo-store.ts +13 -0
- package/dist/frameworks/solid/add-ons/strapi/assets/src/lib/strapiClient.ts +7 -0
- package/dist/frameworks/solid/add-ons/t3env/assets/src/env.ts +39 -0
- package/dist/frameworks/solid/examples/tanchat/assets/ai-streaming-server/src/index.ts +102 -0
- package/dist/frameworks/solid/examples/tanchat/assets/src/lib/demo-store.ts +13 -0
- package/dist/frameworks/solid/examples/tanchat/assets/src/store/demo.hooks.ts +17 -0
- package/dist/frameworks/solid/examples/tanchat/assets/src/store/demo.store.ts +133 -0
- package/dist/frameworks/solid/hosts/cloudflare/info.json +0 -1
- package/dist/frameworks/solid/hosts/netlify/info.json +0 -1
- package/dist/frameworks/solid/hosts/nitro/info.json +0 -1
- package/dist/frameworks/solid/hosts/railway/info.json +0 -1
- package/dist/frameworks/solid/index.js +1 -6
- package/dist/frameworks/solid/project/base/README.md.ejs +43 -117
- package/dist/frameworks/solid/project/base/_dot_gitignore +4 -0
- package/dist/frameworks/solid/project/base/package.json +8 -3
- package/dist/frameworks/solid/project/base/src/components/Header.tsx.ejs +2 -25
- package/dist/frameworks/solid/project/base/src/routes/__root.tsx.ejs +3 -30
- package/dist/frameworks/solid/project/base/src/routes/index.tsx.ejs +97 -35
- package/dist/frameworks/solid/project/base/tsconfig.json.ejs +1 -1
- package/dist/frameworks/solid/project/base/vite.config.ts.ejs +15 -20
- package/dist/frameworks/solid/project/packages.json +2 -2
- package/dist/frameworks.js +0 -1
- package/dist/package-json.js +6 -10
- package/dist/template-file.js +21 -7
- package/dist/types/custom-add-ons/add-on.d.ts +1 -1
- package/dist/types/file-helpers.d.ts +0 -1
- package/dist/types/types.d.ts +12 -12
- package/dist/types.js +1 -2
- package/package.json +2 -2
- package/src/add-ons.ts +54 -2
- package/src/add-to-app.ts +42 -7
- package/src/custom-add-ons/add-on.ts +2 -33
- package/src/custom-add-ons/starter.ts +1 -2
- package/src/file-helpers.ts +11 -10
- package/src/frameworks/react/add-ons/ai/info.json +1 -1
- package/src/frameworks/react/add-ons/apollo-client/info.json +1 -1
- package/src/frameworks/react/add-ons/better-auth/info.json +0 -2
- package/src/frameworks/react/add-ons/clerk/info.json +0 -1
- package/src/frameworks/react/add-ons/db/info.json +1 -1
- package/src/frameworks/react/add-ons/drizzle/info.json +1 -1
- package/src/frameworks/react/add-ons/drizzle/package.json.ejs +4 -0
- package/src/frameworks/react/add-ons/mcp/info.json +1 -2
- package/src/frameworks/react/add-ons/neon/assets/neon-vite-plugin.ts +1 -1
- package/src/frameworks/react/add-ons/neon/info.json +1 -2
- package/src/frameworks/react/add-ons/oRPC/info.json +1 -1
- package/src/frameworks/react/add-ons/paraglide/info.json +1 -1
- package/src/frameworks/react/add-ons/prisma/info.json +1 -1
- package/src/frameworks/react/add-ons/prisma/package.json.ejs +4 -0
- package/src/frameworks/react/add-ons/sentry/info.json +1 -2
- package/src/frameworks/react/add-ons/tRPC/info.json +1 -1
- package/src/frameworks/react/add-ons/tanstack-query/assets/src/integrations/tanstack-query/root-provider.tsx.ejs +1 -29
- package/src/frameworks/react/add-ons/workos/info.json +0 -1
- package/src/frameworks/react/hosts/cloudflare/info.json +0 -1
- package/src/frameworks/react/hosts/netlify/info.json +0 -1
- package/src/frameworks/react/hosts/nitro/info.json +0 -1
- package/src/frameworks/react/hosts/railway/info.json +0 -1
- package/src/frameworks/react/index.ts +1 -6
- package/src/frameworks/react/project/base/README.md.ejs +86 -436
- package/src/frameworks/react/project/base/_dot_gitignore +4 -0
- package/src/frameworks/react/project/base/package.json +8 -5
- package/src/frameworks/react/project/base/src/components/Header.tsx.ejs +2 -32
- package/src/frameworks/react/project/base/src/routes/__root.tsx.ejs +4 -44
- package/src/frameworks/react/project/base/src/routes/index.tsx.ejs +99 -61
- package/src/frameworks/react/project/base/src/styles.css.ejs +3 -3
- package/src/frameworks/react/project/base/tsconfig.json.ejs +1 -1
- package/src/frameworks/react/project/base/vite.config.ts.ejs +33 -27
- package/src/frameworks/react/project/packages.json +2 -2
- package/src/frameworks/solid/add-ons/better-auth/info.json +1 -1
- package/src/frameworks/solid/hosts/cloudflare/info.json +0 -1
- package/src/frameworks/solid/hosts/netlify/info.json +0 -1
- package/src/frameworks/solid/hosts/nitro/info.json +0 -1
- package/src/frameworks/solid/hosts/railway/info.json +0 -1
- package/src/frameworks/solid/index.ts +1 -6
- package/src/frameworks/solid/project/base/README.md.ejs +43 -117
- package/src/frameworks/solid/project/base/_dot_gitignore +4 -0
- package/src/frameworks/solid/project/base/package.json +8 -3
- package/src/frameworks/solid/project/base/src/components/Header.tsx.ejs +2 -25
- package/src/frameworks/solid/project/base/src/routes/__root.tsx.ejs +3 -30
- package/src/frameworks/solid/project/base/src/routes/index.tsx.ejs +97 -35
- package/src/frameworks/solid/project/base/tsconfig.json.ejs +1 -1
- package/src/frameworks/solid/project/base/vite.config.ts.ejs +15 -20
- package/src/frameworks/solid/project/packages.json +2 -2
- package/src/frameworks.ts +0 -1
- package/src/package-json.ts +6 -10
- package/src/template-file.ts +27 -8
- package/src/types.ts +1 -2
- package/tests/add-to-app.test.ts +37 -0
- package/tests/copy-assets.test.ts +53 -0
- package/tests/file-helper.test.ts +23 -2
- package/tests/package-json.test.ts +32 -0
- package/tests/template-file.test.ts +28 -0
- package/dist/frameworks/react/add-ons/module-federation/assets/module-federation.config.js.ejs +0 -31
- package/dist/frameworks/react/add-ons/module-federation/assets/src/demo-mf-component.tsx +0 -3
- package/dist/frameworks/react/add-ons/module-federation/assets/src/demo-mf-self-contained.tsx +0 -11
- package/dist/frameworks/react/add-ons/module-federation/info.json +0 -11
- package/dist/frameworks/react/add-ons/module-federation/package.json +0 -5
- package/dist/frameworks/react/add-ons/module-federation/small-logo.svg +0 -87
- package/dist/frameworks/react/add-ons/start/assets/_dot_gitignore.append +0 -3
- package/dist/frameworks/react/add-ons/start/assets/src/router.tsx.ejs +0 -77
- package/dist/frameworks/react/add-ons/start/assets/src/routes/demo/api.tq-todos.ts.ejs +0 -35
- package/dist/frameworks/react/add-ons/start/assets/src/routes/demo/start.api-request.tsx.ejs +0 -68
- package/dist/frameworks/react/add-ons/start/assets/src/routes/demo/start.css.ejs +0 -43
- package/dist/frameworks/react/add-ons/start/assets/src/routes/demo/start.server-funcs.tsx.ejs +0 -183
- package/dist/frameworks/react/add-ons/start/assets/src/routes/demo/start.ssr.data-only.tsx.ejs +0 -55
- package/dist/frameworks/react/add-ons/start/assets/src/routes/demo/start.ssr.full-ssr.tsx.ejs +0 -55
- package/dist/frameworks/react/add-ons/start/assets/src/routes/demo/start.ssr.index.tsx.ejs +0 -62
- package/dist/frameworks/react/add-ons/start/assets/src/routes/demo/start.ssr.spa-mode.tsx.ejs +0 -62
- package/dist/frameworks/react/add-ons/start/assets/src/routes/index.tsx.ejs +0 -142
- package/dist/frameworks/react/add-ons/start/assets/src/server.ts.ejs +0 -9
- package/dist/frameworks/react/add-ons/start/assets/vite.config.ts.ejs +0 -40
- package/dist/frameworks/react/add-ons/start/info.json +0 -61
- package/dist/frameworks/react/add-ons/start/package.json +0 -12
- package/dist/frameworks/react/add-ons/start/small-logo.svg +0 -1
- package/dist/frameworks/react/project/base/index.html.ejs +0 -20
- package/dist/frameworks/react/project/base/src/App.css.ejs +0 -38
- package/dist/frameworks/react/project/base/src/App.tsx.ejs +0 -63
- package/dist/frameworks/react/project/base/src/components/Header.css.ejs +0 -18
- package/dist/frameworks/react/project/base/src/logo.svg +0 -12
- package/dist/frameworks/react/project/base/src/main.tsx.ejs +0 -166
- package/dist/frameworks/react/project/base/src/reportWebVitals.ts.ejs +0 -28
- package/dist/frameworks/solid/add-ons/module-federation/assets/module-federation.config.js.ejs +0 -27
- package/dist/frameworks/solid/add-ons/module-federation/assets/src/demo-mf-component.tsx +0 -3
- package/dist/frameworks/solid/add-ons/module-federation/assets/src/demo-mf-self-contained.tsx +0 -9
- package/dist/frameworks/solid/add-ons/module-federation/info.json +0 -10
- package/dist/frameworks/solid/add-ons/module-federation/package.json +0 -5
- package/dist/frameworks/solid/add-ons/module-federation/small-logo.svg +0 -87
- package/dist/frameworks/solid/add-ons/start/assets/public/tanstack-circle-logo.png +0 -0
- package/dist/frameworks/solid/add-ons/start/assets/public/tanstack-word-logo-white.svg +0 -1
- package/dist/frameworks/solid/add-ons/start/assets/src/router.tsx.ejs +0 -30
- package/dist/frameworks/solid/add-ons/start/assets/src/routes/demo.start.server-funcs.tsx +0 -49
- package/dist/frameworks/solid/add-ons/start/assets/src/routes/index.tsx.ejs +0 -138
- package/dist/frameworks/solid/add-ons/start/assets/vite.config.ts.ejs +0 -22
- package/dist/frameworks/solid/add-ons/start/info.json +0 -18
- package/dist/frameworks/solid/add-ons/start/package.json +0 -15
- package/dist/frameworks/solid/add-ons/start/small-logo.svg +0 -1
- package/dist/frameworks/solid/project/base/index.html.ejs +0 -20
- package/dist/frameworks/solid/project/base/src/App.css.ejs +0 -38
- package/dist/frameworks/solid/project/base/src/App.tsx.ejs +0 -34
- package/dist/frameworks/solid/project/base/src/logo.svg +0 -120
- package/dist/frameworks/solid/project/base/src/main.tsx.ejs +0 -126
- package/src/frameworks/react/add-ons/module-federation/assets/module-federation.config.js.ejs +0 -31
- package/src/frameworks/react/add-ons/module-federation/assets/src/demo-mf-component.tsx +0 -3
- package/src/frameworks/react/add-ons/module-federation/assets/src/demo-mf-self-contained.tsx +0 -11
- package/src/frameworks/react/add-ons/module-federation/info.json +0 -11
- package/src/frameworks/react/add-ons/module-federation/package.json +0 -5
- package/src/frameworks/react/add-ons/module-federation/small-logo.svg +0 -87
- package/src/frameworks/react/add-ons/start/assets/_dot_gitignore.append +0 -3
- package/src/frameworks/react/add-ons/start/assets/src/data/demo.punk-songs.ts +0 -13
- package/src/frameworks/react/add-ons/start/assets/src/router.tsx.ejs +0 -77
- package/src/frameworks/react/add-ons/start/assets/src/routes/demo/api.names.ts +0 -10
- package/src/frameworks/react/add-ons/start/assets/src/routes/demo/api.tq-todos.ts.ejs +0 -35
- package/src/frameworks/react/add-ons/start/assets/src/routes/demo/start.api-request.tsx.ejs +0 -68
- package/src/frameworks/react/add-ons/start/assets/src/routes/demo/start.css.ejs +0 -43
- package/src/frameworks/react/add-ons/start/assets/src/routes/demo/start.server-funcs.tsx.ejs +0 -183
- package/src/frameworks/react/add-ons/start/assets/src/routes/demo/start.ssr.data-only.tsx.ejs +0 -55
- package/src/frameworks/react/add-ons/start/assets/src/routes/demo/start.ssr.full-ssr.tsx.ejs +0 -55
- package/src/frameworks/react/add-ons/start/assets/src/routes/demo/start.ssr.index.tsx.ejs +0 -62
- package/src/frameworks/react/add-ons/start/assets/src/routes/demo/start.ssr.spa-mode.tsx.ejs +0 -62
- package/src/frameworks/react/add-ons/start/assets/src/routes/index.tsx.ejs +0 -142
- package/src/frameworks/react/add-ons/start/assets/src/server.ts.ejs +0 -9
- package/src/frameworks/react/add-ons/start/assets/vite.config.ts.ejs +0 -40
- package/src/frameworks/react/add-ons/start/info.json +0 -61
- package/src/frameworks/react/add-ons/start/package.json +0 -12
- package/src/frameworks/react/add-ons/start/small-logo.svg +0 -1
- package/src/frameworks/react/project/base/index.html.ejs +0 -20
- package/src/frameworks/react/project/base/src/App.css.ejs +0 -38
- package/src/frameworks/react/project/base/src/App.tsx.ejs +0 -63
- package/src/frameworks/react/project/base/src/components/Header.css.ejs +0 -18
- package/src/frameworks/react/project/base/src/logo.svg +0 -12
- package/src/frameworks/react/project/base/src/main.tsx.ejs +0 -166
- package/src/frameworks/react/project/base/src/reportWebVitals.ts.ejs +0 -28
- package/src/frameworks/solid/add-ons/module-federation/assets/module-federation.config.js.ejs +0 -27
- package/src/frameworks/solid/add-ons/module-federation/assets/src/demo-mf-component.tsx +0 -3
- package/src/frameworks/solid/add-ons/module-federation/assets/src/demo-mf-self-contained.tsx +0 -9
- package/src/frameworks/solid/add-ons/module-federation/info.json +0 -10
- package/src/frameworks/solid/add-ons/module-federation/package.json +0 -5
- package/src/frameworks/solid/add-ons/module-federation/small-logo.svg +0 -87
- package/src/frameworks/solid/add-ons/start/assets/public/tanstack-circle-logo.png +0 -0
- package/src/frameworks/solid/add-ons/start/assets/public/tanstack-word-logo-white.svg +0 -1
- package/src/frameworks/solid/add-ons/start/assets/src/router.tsx.ejs +0 -30
- package/src/frameworks/solid/add-ons/start/assets/src/routes/demo.start.server-funcs.tsx +0 -49
- package/src/frameworks/solid/add-ons/start/assets/src/routes/index.tsx.ejs +0 -138
- package/src/frameworks/solid/add-ons/start/assets/vite.config.ts.ejs +0 -22
- package/src/frameworks/solid/add-ons/start/info.json +0 -18
- package/src/frameworks/solid/add-ons/start/package.json +0 -15
- package/src/frameworks/solid/add-ons/start/small-logo.svg +0 -1
- package/src/frameworks/solid/project/base/index.html.ejs +0 -20
- package/src/frameworks/solid/project/base/src/App.css.ejs +0 -38
- package/src/frameworks/solid/project/base/src/App.tsx.ejs +0 -34
- package/src/frameworks/solid/project/base/src/logo.svg +0 -120
- package/src/frameworks/solid/project/base/src/main.tsx.ejs +0 -126
|
@@ -1,41 +1,103 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
import { createFileRoute } from "@tanstack/solid-router";
|
|
2
|
+
import { For } from "solid-js"
|
|
3
|
+
import {
|
|
4
|
+
Zap, Server, Route as RouteIcon, Shield, Waves, Sparkles,
|
|
5
|
+
} from "lucide-solid";
|
|
3
6
|
|
|
4
|
-
|
|
7
|
+
export const Route = createFileRoute("/")({ component: App });
|
|
5
8
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
function App() {
|
|
10
|
+
const features = [
|
|
11
|
+
{
|
|
12
|
+
icon: <Zap class="w-12 h-12 text-cyan-400" />,
|
|
13
|
+
title: "Powerful Server Functions",
|
|
14
|
+
description: "Write server-side code that seamlessly integrates with your client components. Type-safe, secure, and simple.",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
icon: <Server class="w-12 h-12 text-cyan-400" />,
|
|
18
|
+
title: "Flexible Server Side Rendering",
|
|
19
|
+
description: "Full-document SSR, streaming, and progressive enhancement out of the box. Control exactly what renders where.",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
icon: <RouteIcon class="w-12 h-12 text-cyan-400" />,
|
|
23
|
+
title: "API Routes",
|
|
24
|
+
description: "Build type-safe API endpoints alongside your application. No separate backend needed.",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
icon: <Shield class="w-12 h-12 text-cyan-400" />,
|
|
28
|
+
title: "Strongly Typed Everything",
|
|
29
|
+
description: "End-to-end type safety from server to client. Catch errors before they reach production.",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
icon: <Waves class="w-12 h-12 text-cyan-400" />,
|
|
33
|
+
title: "Full Streaming Support",
|
|
34
|
+
description: "Stream data from server to client progressively. Perfect for AI applications and real-time updates.",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
icon: <Sparkles class="w-12 h-12 text-cyan-400" />,
|
|
38
|
+
title: "Next Generation Ready",
|
|
39
|
+
description: "Built from the ground up for modern web applications. Deploy anywhere JavaScript runs.",
|
|
40
|
+
},
|
|
41
|
+
];
|
|
9
42
|
|
|
10
|
-
function IndexComponent() {
|
|
11
43
|
return (
|
|
12
|
-
<div class="
|
|
13
|
-
<
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
class="
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
<div class="min-h-screen bg-gradient-to-b from-slate-900 via-slate-800 to-slate-900">
|
|
45
|
+
<section class="relative py-20 px-6 text-center overflow-hidden">
|
|
46
|
+
<div class="absolute inset-0 bg-gradient-to-r from-cyan-500/10 via-blue-500/10 to-purple-500/10"></div>
|
|
47
|
+
<div class="relative max-w-5xl mx-auto">
|
|
48
|
+
<div class="flex items-center justify-center gap-6 mb-6">
|
|
49
|
+
<img
|
|
50
|
+
src="/tanstack-circle-logo.png"
|
|
51
|
+
alt="TanStack Logo"
|
|
52
|
+
class="w-24 h-24 md:w-32 md:h-32"
|
|
53
|
+
/>
|
|
54
|
+
<h1 class="text-6xl md:text-7xl font-black text-white [letter-spacing:-0.08em]">
|
|
55
|
+
<span class="text-gray-300">TANSTACK</span>{" "}
|
|
56
|
+
<span class="bg-gradient-to-r from-cyan-400 to-blue-400 bg-clip-text text-transparent">
|
|
57
|
+
START
|
|
58
|
+
</span>
|
|
59
|
+
</h1>
|
|
60
|
+
</div>
|
|
61
|
+
<p class="text-2xl md:text-3xl text-gray-300 mb-4 font-light">
|
|
62
|
+
The framework for next generation AI applications
|
|
63
|
+
</p>
|
|
64
|
+
<p class="text-lg text-gray-400 max-w-3xl mx-auto mb-8">
|
|
65
|
+
Full-stack framework powered by TanStack Router for React and Solid.
|
|
66
|
+
Build modern applications with server functions, streaming, and type
|
|
67
|
+
safety.
|
|
68
|
+
</p>
|
|
69
|
+
<div class="flex flex-col items-center gap-4">
|
|
70
|
+
<a
|
|
71
|
+
href="https://tanstack.com/start"
|
|
72
|
+
target="_blank"
|
|
73
|
+
rel="noopener noreferrer"
|
|
74
|
+
class="px-8 py-3 bg-cyan-500 hover:bg-cyan-600 text-white font-semibold rounded-lg transition-colors shadow-lg shadow-cyan-500/50"
|
|
75
|
+
>
|
|
76
|
+
Documentation
|
|
77
|
+
</a>
|
|
78
|
+
<p class="text-gray-400 text-sm mt-2">
|
|
79
|
+
Begin your TanStack Start journey by editing{" "}
|
|
80
|
+
<code class="px-2 py-1 bg-slate-700 rounded text-cyan-400">
|
|
81
|
+
/src/routes/index.tsx
|
|
82
|
+
</code>
|
|
83
|
+
</p>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</section>
|
|
87
|
+
|
|
88
|
+
<section class="py-16 px-6 max-w-7xl mx-auto">
|
|
89
|
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
90
|
+
<For each={features}>
|
|
91
|
+
{(feature) => (
|
|
92
|
+
<div class="bg-slate-800/50 backdrop-blur-sm border border-slate-700 rounded-xl p-6 hover:border-cyan-500/50 transition-all duration-300 hover:shadow-lg hover:shadow-cyan-500/10">
|
|
93
|
+
<div class="mb-4">{feature.icon}</div>
|
|
94
|
+
<h3 class="text-xl font-semibold text-white mb-3">{feature.title}</h3>
|
|
95
|
+
<p class="text-gray-400 leading-relaxed">{feature.description}</p>
|
|
96
|
+
</div>
|
|
97
|
+
)}
|
|
98
|
+
</For>
|
|
99
|
+
</div>
|
|
100
|
+
</section>
|
|
39
101
|
</div>
|
|
40
|
-
)
|
|
102
|
+
);
|
|
41
103
|
}
|
|
@@ -1,26 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
import { defineConfig } from "vite";
|
|
2
2
|
import { devtools } from '@tanstack/devtools-vite'
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
import federationConfig from "./module-federation.config.js";
|
|
9
|
-
<% } %><% for(const integration of integrations.filter(i => i.type === 'vite-plugin')) { %>
|
|
10
|
-
<%- integrationImportContent(integration) %>
|
|
3
|
+
import viteTsConfigPaths from 'vite-tsconfig-paths'
|
|
4
|
+
import tailwindcss from "@tailwindcss/vite"
|
|
5
|
+
import { tanstackStart } from "@tanstack/solid-start/plugin/vite";
|
|
6
|
+
import solidPlugin from 'vite-plugin-solid';
|
|
7
|
+
<% for(const integration of integrations.filter(i => i.type === 'vite-plugin')) { %><%- integrationImportContent(integration) %>
|
|
11
8
|
<% } %>
|
|
9
|
+
import lucidePreprocess from "vite-plugin-lucide-preprocess";
|
|
12
10
|
|
|
13
|
-
// https://vitejs.dev/config/
|
|
14
11
|
export default defineConfig({
|
|
15
|
-
plugins: [devtools(), <% for(const integration of integrations.filter(i => i.type === 'vite-plugin')) { %><%- integrationImportCode(integration) %>,<% } %>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
plugins: [lucidePreprocess(), devtools(), <% for(const integration of integrations.filter(i => i.type === 'vite-plugin')) { %><%- integrationImportCode(integration) %>,<% } %>
|
|
13
|
+
// this is the plugin that enables path aliases
|
|
14
|
+
viteTsConfigPaths({
|
|
15
|
+
projects: ['./tsconfig.json'],
|
|
16
|
+
}),
|
|
19
17
|
tailwindcss(),
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
'~': resolve(__dirname, './src'),
|
|
24
|
-
},
|
|
25
|
-
},<% } %>
|
|
18
|
+
tanstackStart(),
|
|
19
|
+
solidPlugin({ ssr: true }),
|
|
20
|
+
],
|
|
26
21
|
})
|
package/dist/frameworks.js
CHANGED
|
@@ -28,7 +28,6 @@ export function scanAddOnDirectories(addOnsDirectories) {
|
|
|
28
28
|
const filePath = resolve(addOnsBase, dir, 'info.json');
|
|
29
29
|
const fileContent = readFileSync(filePath, 'utf-8');
|
|
30
30
|
const info = JSON.parse(fileContent);
|
|
31
|
-
info.tailwind = info.tailwind ?? true;
|
|
32
31
|
let packageAdditions = {};
|
|
33
32
|
let packageTemplate = undefined;
|
|
34
33
|
if (existsSync(resolve(addOnsBase, dir, 'package.json'))) {
|
package/dist/package-json.js
CHANGED
|
@@ -24,12 +24,8 @@ export function createPackageJSON(options) {
|
|
|
24
24
|
name: options.projectName,
|
|
25
25
|
};
|
|
26
26
|
const additions = [
|
|
27
|
-
options.typescript
|
|
28
|
-
|
|
29
|
-
: undefined,
|
|
30
|
-
options.tailwind
|
|
31
|
-
? options.framework.optionalPackages.tailwindcss
|
|
32
|
-
: undefined,
|
|
27
|
+
options.framework.optionalPackages.typescript,
|
|
28
|
+
options.framework.optionalPackages.tailwindcss,
|
|
33
29
|
options.mode ? options.framework.optionalPackages[options.mode] : undefined,
|
|
34
30
|
];
|
|
35
31
|
for (const addition of additions.filter(Boolean)) {
|
|
@@ -42,10 +38,10 @@ export function createPackageJSON(options) {
|
|
|
42
38
|
const templateValues = {
|
|
43
39
|
packageManager: options.packageManager,
|
|
44
40
|
projectName: options.projectName,
|
|
45
|
-
typescript:
|
|
46
|
-
tailwind:
|
|
47
|
-
js:
|
|
48
|
-
jsx:
|
|
41
|
+
typescript: true,
|
|
42
|
+
tailwind: true,
|
|
43
|
+
js: 'ts',
|
|
44
|
+
jsx: 'tsx',
|
|
49
45
|
fileRouter: options.mode === 'file-router',
|
|
50
46
|
codeRouter: options.mode === 'code-router',
|
|
51
47
|
addOnEnabled: options.chosenAddOns.reduce((acc, addon) => {
|
package/dist/template-file.js
CHANGED
|
@@ -10,6 +10,22 @@ function convertDotFilesAndPaths(path) {
|
|
|
10
10
|
.map((segment) => segment.replace(/^_dot_/, '.'))
|
|
11
11
|
.join(sep);
|
|
12
12
|
}
|
|
13
|
+
function normalizeSourceExtension(target, typescript) {
|
|
14
|
+
if (!typescript) {
|
|
15
|
+
return target;
|
|
16
|
+
}
|
|
17
|
+
const normalizedTarget = target.replace(/\\/g, '/');
|
|
18
|
+
if (!normalizedTarget.startsWith('src/')) {
|
|
19
|
+
return target;
|
|
20
|
+
}
|
|
21
|
+
if (normalizedTarget.endsWith('.js')) {
|
|
22
|
+
return `${target.slice(0, -3)}.ts`;
|
|
23
|
+
}
|
|
24
|
+
if (normalizedTarget.endsWith('.jsx')) {
|
|
25
|
+
return `${target.slice(0, -4)}.tsx`;
|
|
26
|
+
}
|
|
27
|
+
return target;
|
|
28
|
+
}
|
|
13
29
|
export function createTemplateFile(environment, options) {
|
|
14
30
|
function getPackageManagerAddScript(packageName, isDev = false) {
|
|
15
31
|
return formatCommand(getPackageManagerInstallCommand(options.packageManager, packageName, isDev));
|
|
@@ -57,10 +73,10 @@ export function createTemplateFile(environment, options) {
|
|
|
57
73
|
const templateValues = {
|
|
58
74
|
packageManager: options.packageManager,
|
|
59
75
|
projectName: options.projectName,
|
|
60
|
-
typescript:
|
|
61
|
-
tailwind:
|
|
62
|
-
js:
|
|
63
|
-
jsx:
|
|
76
|
+
typescript: true,
|
|
77
|
+
tailwind: true,
|
|
78
|
+
js: 'ts',
|
|
79
|
+
jsx: 'tsx',
|
|
64
80
|
fileRouter: options.mode === 'file-router',
|
|
65
81
|
codeRouter: options.mode === 'code-router',
|
|
66
82
|
addOnEnabled,
|
|
@@ -97,6 +113,7 @@ export function createTemplateFile(environment, options) {
|
|
|
97
113
|
return;
|
|
98
114
|
}
|
|
99
115
|
let target = convertDotFilesAndPaths(file.replace('.ejs', ''));
|
|
116
|
+
target = normalizeSourceExtension(target, options.typescript);
|
|
100
117
|
// Strip option prefixes from filename (e.g., __postgres__schema.prisma -> schema.prisma)
|
|
101
118
|
const prefixMatch = target.match(/^(.+\/)?__([^_]+)__(.+)$/);
|
|
102
119
|
if (prefixMatch) {
|
|
@@ -116,9 +133,6 @@ export function createTemplateFile(environment, options) {
|
|
|
116
133
|
parser: 'typescript',
|
|
117
134
|
});
|
|
118
135
|
}
|
|
119
|
-
if (!options.typescript) {
|
|
120
|
-
target = target.replace(/\.tsx$/, '.jsx').replace(/\.ts$/, '.js');
|
|
121
|
-
}
|
|
122
136
|
if (append) {
|
|
123
137
|
await environment.appendFile(resolve(options.targetDir, target), content);
|
|
124
138
|
}
|
|
@@ -16,7 +16,6 @@ export declare function generateProject(persistedOptions: PersistedOptions): Pro
|
|
|
16
16
|
description: string;
|
|
17
17
|
id: string;
|
|
18
18
|
name: string;
|
|
19
|
-
tailwind: boolean;
|
|
20
19
|
modes: string[];
|
|
21
20
|
phase: "add-on" | "setup";
|
|
22
21
|
command?: {
|
|
@@ -39,6 +38,7 @@ export declare function generateProject(persistedOptions: PersistedOptions): Pro
|
|
|
39
38
|
link?: string | undefined;
|
|
40
39
|
license?: string | undefined;
|
|
41
40
|
warning?: string | undefined;
|
|
41
|
+
tailwind?: boolean | undefined;
|
|
42
42
|
category?: "other" | "tanstack" | "database" | "orm" | "auth" | "deploy" | "styling" | "monitoring" | "cms" | "api" | "i18n" | "tooling" | undefined;
|
|
43
43
|
exclusive?: ("database" | "orm" | "auth" | "deploy" | "linter")[] | undefined;
|
|
44
44
|
color?: string | undefined;
|
|
@@ -5,7 +5,6 @@ export declare function convertBinaryContentsToBase64(contents: any): string;
|
|
|
5
5
|
export declare function isBase64(content: string): boolean;
|
|
6
6
|
export declare function getBinaryFile(content: string): string | null;
|
|
7
7
|
/**
|
|
8
|
-
* Convert an absolute path to a clean relative path by removing a base directory.
|
|
9
8
|
* Returns a path without leading ./ or / prefix.
|
|
10
9
|
*/
|
|
11
10
|
export declare function toCleanPath(absolutePath: string, baseDir: string): string;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -112,7 +112,7 @@ export declare const AddOnBaseSchema: z.ZodObject<{
|
|
|
112
112
|
link: z.ZodOptional<z.ZodString>;
|
|
113
113
|
license: z.ZodOptional<z.ZodString>;
|
|
114
114
|
warning: z.ZodOptional<z.ZodString>;
|
|
115
|
-
tailwind: z.
|
|
115
|
+
tailwind: z.ZodOptional<z.ZodBoolean>;
|
|
116
116
|
type: z.ZodEnum<["add-on", "example", "starter", "toolchain", "deployment"]>;
|
|
117
117
|
category: z.ZodOptional<z.ZodEnum<["tanstack", "database", "orm", "auth", "deploy", "styling", "monitoring", "cms", "api", "i18n", "tooling", "other"]>>;
|
|
118
118
|
exclusive: z.ZodOptional<z.ZodArray<z.ZodEnum<["orm", "auth", "deploy", "database", "linter"]>, "many">>;
|
|
@@ -204,7 +204,6 @@ export declare const AddOnBaseSchema: z.ZodObject<{
|
|
|
204
204
|
description: string;
|
|
205
205
|
id: string;
|
|
206
206
|
name: string;
|
|
207
|
-
tailwind: boolean;
|
|
208
207
|
command?: {
|
|
209
208
|
command: string;
|
|
210
209
|
args?: string[] | undefined;
|
|
@@ -225,6 +224,7 @@ export declare const AddOnBaseSchema: z.ZodObject<{
|
|
|
225
224
|
link?: string | undefined;
|
|
226
225
|
license?: string | undefined;
|
|
227
226
|
warning?: string | undefined;
|
|
227
|
+
tailwind?: boolean | undefined;
|
|
228
228
|
category?: "other" | "tanstack" | "database" | "orm" | "auth" | "deploy" | "styling" | "monitoring" | "cms" | "api" | "i18n" | "tooling" | undefined;
|
|
229
229
|
exclusive?: ("database" | "orm" | "auth" | "deploy" | "linter")[] | undefined;
|
|
230
230
|
color?: string | undefined;
|
|
@@ -305,6 +305,7 @@ export declare const StarterSchema: z.ZodObject<{
|
|
|
305
305
|
link: z.ZodOptional<z.ZodString>;
|
|
306
306
|
license: z.ZodOptional<z.ZodString>;
|
|
307
307
|
warning: z.ZodOptional<z.ZodString>;
|
|
308
|
+
tailwind: z.ZodOptional<z.ZodBoolean>;
|
|
308
309
|
type: z.ZodEnum<["add-on", "example", "starter", "toolchain", "deployment"]>;
|
|
309
310
|
category: z.ZodOptional<z.ZodEnum<["tanstack", "database", "orm", "auth", "deploy", "styling", "monitoring", "cms", "api", "i18n", "tooling", "other"]>>;
|
|
310
311
|
exclusive: z.ZodOptional<z.ZodArray<z.ZodEnum<["orm", "auth", "deploy", "database", "linter"]>, "many">>;
|
|
@@ -395,14 +396,12 @@ export declare const StarterSchema: z.ZodObject<{
|
|
|
395
396
|
framework: z.ZodString;
|
|
396
397
|
mode: z.ZodString;
|
|
397
398
|
typescript: z.ZodBoolean;
|
|
398
|
-
tailwind: z.ZodBoolean;
|
|
399
399
|
banner: z.ZodOptional<z.ZodString>;
|
|
400
400
|
}, "strip", z.ZodTypeAny, {
|
|
401
401
|
type: "add-on" | "example" | "starter" | "toolchain" | "deployment";
|
|
402
402
|
description: string;
|
|
403
403
|
id: string;
|
|
404
404
|
name: string;
|
|
405
|
-
tailwind: boolean;
|
|
406
405
|
framework: string;
|
|
407
406
|
mode: string;
|
|
408
407
|
typescript: boolean;
|
|
@@ -426,6 +425,7 @@ export declare const StarterSchema: z.ZodObject<{
|
|
|
426
425
|
link?: string | undefined;
|
|
427
426
|
license?: string | undefined;
|
|
428
427
|
warning?: string | undefined;
|
|
428
|
+
tailwind?: boolean | undefined;
|
|
429
429
|
category?: "other" | "tanstack" | "database" | "orm" | "auth" | "deploy" | "styling" | "monitoring" | "cms" | "api" | "i18n" | "tooling" | undefined;
|
|
430
430
|
exclusive?: ("database" | "orm" | "auth" | "deploy" | "linter")[] | undefined;
|
|
431
431
|
color?: string | undefined;
|
|
@@ -454,7 +454,6 @@ export declare const StarterSchema: z.ZodObject<{
|
|
|
454
454
|
description: string;
|
|
455
455
|
id: string;
|
|
456
456
|
name: string;
|
|
457
|
-
tailwind: boolean;
|
|
458
457
|
framework: string;
|
|
459
458
|
mode: string;
|
|
460
459
|
typescript: boolean;
|
|
@@ -478,6 +477,7 @@ export declare const StarterSchema: z.ZodObject<{
|
|
|
478
477
|
link?: string | undefined;
|
|
479
478
|
license?: string | undefined;
|
|
480
479
|
warning?: string | undefined;
|
|
480
|
+
tailwind?: boolean | undefined;
|
|
481
481
|
category?: "other" | "tanstack" | "database" | "orm" | "auth" | "deploy" | "styling" | "monitoring" | "cms" | "api" | "i18n" | "tooling" | undefined;
|
|
482
482
|
exclusive?: ("database" | "orm" | "auth" | "deploy" | "linter")[] | undefined;
|
|
483
483
|
color?: string | undefined;
|
|
@@ -511,6 +511,7 @@ export declare const StarterCompiledSchema: z.ZodObject<{
|
|
|
511
511
|
link: z.ZodOptional<z.ZodString>;
|
|
512
512
|
license: z.ZodOptional<z.ZodString>;
|
|
513
513
|
warning: z.ZodOptional<z.ZodString>;
|
|
514
|
+
tailwind: z.ZodOptional<z.ZodBoolean>;
|
|
514
515
|
type: z.ZodEnum<["add-on", "example", "starter", "toolchain", "deployment"]>;
|
|
515
516
|
category: z.ZodOptional<z.ZodEnum<["tanstack", "database", "orm", "auth", "deploy", "styling", "monitoring", "cms", "api", "i18n", "tooling", "other"]>>;
|
|
516
517
|
exclusive: z.ZodOptional<z.ZodArray<z.ZodEnum<["orm", "auth", "deploy", "database", "linter"]>, "many">>;
|
|
@@ -601,7 +602,6 @@ export declare const StarterCompiledSchema: z.ZodObject<{
|
|
|
601
602
|
framework: z.ZodString;
|
|
602
603
|
mode: z.ZodString;
|
|
603
604
|
typescript: z.ZodBoolean;
|
|
604
|
-
tailwind: z.ZodBoolean;
|
|
605
605
|
banner: z.ZodOptional<z.ZodString>;
|
|
606
606
|
} & {
|
|
607
607
|
files: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
@@ -611,7 +611,6 @@ export declare const StarterCompiledSchema: z.ZodObject<{
|
|
|
611
611
|
description: string;
|
|
612
612
|
id: string;
|
|
613
613
|
name: string;
|
|
614
|
-
tailwind: boolean;
|
|
615
614
|
framework: string;
|
|
616
615
|
mode: string;
|
|
617
616
|
typescript: boolean;
|
|
@@ -637,6 +636,7 @@ export declare const StarterCompiledSchema: z.ZodObject<{
|
|
|
637
636
|
link?: string | undefined;
|
|
638
637
|
license?: string | undefined;
|
|
639
638
|
warning?: string | undefined;
|
|
639
|
+
tailwind?: boolean | undefined;
|
|
640
640
|
category?: "other" | "tanstack" | "database" | "orm" | "auth" | "deploy" | "styling" | "monitoring" | "cms" | "api" | "i18n" | "tooling" | undefined;
|
|
641
641
|
exclusive?: ("database" | "orm" | "auth" | "deploy" | "linter")[] | undefined;
|
|
642
642
|
color?: string | undefined;
|
|
@@ -665,7 +665,6 @@ export declare const StarterCompiledSchema: z.ZodObject<{
|
|
|
665
665
|
description: string;
|
|
666
666
|
id: string;
|
|
667
667
|
name: string;
|
|
668
|
-
tailwind: boolean;
|
|
669
668
|
framework: string;
|
|
670
669
|
mode: string;
|
|
671
670
|
typescript: boolean;
|
|
@@ -691,6 +690,7 @@ export declare const StarterCompiledSchema: z.ZodObject<{
|
|
|
691
690
|
link?: string | undefined;
|
|
692
691
|
license?: string | undefined;
|
|
693
692
|
warning?: string | undefined;
|
|
693
|
+
tailwind?: boolean | undefined;
|
|
694
694
|
category?: "other" | "tanstack" | "database" | "orm" | "auth" | "deploy" | "styling" | "monitoring" | "cms" | "api" | "i18n" | "tooling" | undefined;
|
|
695
695
|
exclusive?: ("database" | "orm" | "auth" | "deploy" | "linter")[] | undefined;
|
|
696
696
|
color?: string | undefined;
|
|
@@ -743,7 +743,7 @@ export declare const AddOnInfoSchema: z.ZodObject<{
|
|
|
743
743
|
link: z.ZodOptional<z.ZodString>;
|
|
744
744
|
license: z.ZodOptional<z.ZodString>;
|
|
745
745
|
warning: z.ZodOptional<z.ZodString>;
|
|
746
|
-
tailwind: z.
|
|
746
|
+
tailwind: z.ZodOptional<z.ZodBoolean>;
|
|
747
747
|
type: z.ZodEnum<["add-on", "example", "starter", "toolchain", "deployment"]>;
|
|
748
748
|
category: z.ZodOptional<z.ZodEnum<["tanstack", "database", "orm", "auth", "deploy", "styling", "monitoring", "cms", "api", "i18n", "tooling", "other"]>>;
|
|
749
749
|
exclusive: z.ZodOptional<z.ZodArray<z.ZodEnum<["orm", "auth", "deploy", "database", "linter"]>, "many">>;
|
|
@@ -858,7 +858,6 @@ export declare const AddOnInfoSchema: z.ZodObject<{
|
|
|
858
858
|
description: string;
|
|
859
859
|
id: string;
|
|
860
860
|
name: string;
|
|
861
|
-
tailwind: boolean;
|
|
862
861
|
modes: string[];
|
|
863
862
|
phase: "add-on" | "setup";
|
|
864
863
|
command?: {
|
|
@@ -881,6 +880,7 @@ export declare const AddOnInfoSchema: z.ZodObject<{
|
|
|
881
880
|
link?: string | undefined;
|
|
882
881
|
license?: string | undefined;
|
|
883
882
|
warning?: string | undefined;
|
|
883
|
+
tailwind?: boolean | undefined;
|
|
884
884
|
category?: "other" | "tanstack" | "database" | "orm" | "auth" | "deploy" | "styling" | "monitoring" | "cms" | "api" | "i18n" | "tooling" | undefined;
|
|
885
885
|
exclusive?: ("database" | "orm" | "auth" | "deploy" | "linter")[] | undefined;
|
|
886
886
|
color?: string | undefined;
|
|
@@ -979,7 +979,7 @@ export declare const AddOnCompiledSchema: z.ZodObject<{
|
|
|
979
979
|
link: z.ZodOptional<z.ZodString>;
|
|
980
980
|
license: z.ZodOptional<z.ZodString>;
|
|
981
981
|
warning: z.ZodOptional<z.ZodString>;
|
|
982
|
-
tailwind: z.
|
|
982
|
+
tailwind: z.ZodOptional<z.ZodBoolean>;
|
|
983
983
|
type: z.ZodEnum<["add-on", "example", "starter", "toolchain", "deployment"]>;
|
|
984
984
|
category: z.ZodOptional<z.ZodEnum<["tanstack", "database", "orm", "auth", "deploy", "styling", "monitoring", "cms", "api", "i18n", "tooling", "other"]>>;
|
|
985
985
|
exclusive: z.ZodOptional<z.ZodArray<z.ZodEnum<["orm", "auth", "deploy", "database", "linter"]>, "many">>;
|
|
@@ -1098,7 +1098,6 @@ export declare const AddOnCompiledSchema: z.ZodObject<{
|
|
|
1098
1098
|
description: string;
|
|
1099
1099
|
id: string;
|
|
1100
1100
|
name: string;
|
|
1101
|
-
tailwind: boolean;
|
|
1102
1101
|
files: Record<string, string>;
|
|
1103
1102
|
deletedFiles: string[];
|
|
1104
1103
|
modes: string[];
|
|
@@ -1123,6 +1122,7 @@ export declare const AddOnCompiledSchema: z.ZodObject<{
|
|
|
1123
1122
|
link?: string | undefined;
|
|
1124
1123
|
license?: string | undefined;
|
|
1125
1124
|
warning?: string | undefined;
|
|
1125
|
+
tailwind?: boolean | undefined;
|
|
1126
1126
|
category?: "other" | "tanstack" | "database" | "orm" | "auth" | "deploy" | "styling" | "monitoring" | "cms" | "api" | "i18n" | "tooling" | undefined;
|
|
1127
1127
|
exclusive?: ("database" | "orm" | "auth" | "deploy" | "linter")[] | undefined;
|
|
1128
1128
|
color?: string | undefined;
|
package/dist/types.js
CHANGED
|
@@ -22,7 +22,7 @@ export const AddOnBaseSchema = z.object({
|
|
|
22
22
|
link: z.string().optional(),
|
|
23
23
|
license: z.string().optional(),
|
|
24
24
|
warning: z.string().optional(),
|
|
25
|
-
tailwind: z.boolean().optional()
|
|
25
|
+
tailwind: z.boolean().optional(),
|
|
26
26
|
type: z.enum(['add-on', 'example', 'starter', 'toolchain', 'deployment']),
|
|
27
27
|
category: z
|
|
28
28
|
.enum([
|
|
@@ -80,7 +80,6 @@ export const StarterSchema = AddOnBaseSchema.extend({
|
|
|
80
80
|
framework: z.string(),
|
|
81
81
|
mode: z.string(),
|
|
82
82
|
typescript: z.boolean(),
|
|
83
|
-
tailwind: z.boolean(),
|
|
84
83
|
banner: z.string().optional(),
|
|
85
84
|
});
|
|
86
85
|
export const StarterCompiledSchema = StarterSchema.extend({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/create",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.59.4",
|
|
4
4
|
"description": "TanStack Application Builder Engine",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build": "tsc && npm run copy-assets",
|
|
47
|
-
"copy-assets": "node -e \"const fs=require('fs');const path=require('path');function copyDir(src,dest){if(!fs.existsSync(dest))fs.mkdirSync(dest,{recursive:true});for(const entry of fs.readdirSync(src,{withFileTypes:true})){const srcPath=path.join(src,entry.name);const destPath=path.join(dest,entry.name);if(entry.isDirectory())copyDir(srcPath,destPath);else
|
|
47
|
+
"copy-assets": "node -e \"const fs=require('fs');const path=require('path');function copyDir(src,dest){if(!fs.existsSync(dest))fs.mkdirSync(dest,{recursive:true});for(const entry of fs.readdirSync(src,{withFileTypes:true})){const srcPath=path.join(src,entry.name);const destPath=path.join(dest,entry.name);if(entry.isDirectory())copyDir(srcPath,destPath);else fs.copyFileSync(srcPath,destPath)}}['react','solid'].forEach(fw=>{['add-ons','toolchains','hosts','examples','project'].forEach(dir=>{const src='src/frameworks/'+fw+'/'+dir;const dest='dist/frameworks/'+fw+'/'+dir;if(fs.existsSync(src))copyDir(src,dest)})})\"",
|
|
48
48
|
"dev": "tsc --watch",
|
|
49
49
|
"test": "eslint ./src && vitest run",
|
|
50
50
|
"test:watch": "vitest",
|
package/src/add-ons.ts
CHANGED
|
@@ -25,14 +25,24 @@ export async function finalizeAddOns(
|
|
|
25
25
|
|
|
26
26
|
for (const addOnID of finalAddOnIDs) {
|
|
27
27
|
let addOn: AddOn | undefined
|
|
28
|
-
const localAddOn =
|
|
28
|
+
const localAddOn =
|
|
29
|
+
addOns.find((a) => a.id === addOnID) ??
|
|
30
|
+
addOns.find((a) => a.id.toLowerCase() === addOnID.toLowerCase())
|
|
29
31
|
if (localAddOn) {
|
|
30
32
|
addOn = loadAddOn(localAddOn)
|
|
33
|
+
if (localAddOn.id !== addOnID) {
|
|
34
|
+
// Replace the mistyped ID with the canonical one
|
|
35
|
+
finalAddOnIDs.delete(addOnID)
|
|
36
|
+
finalAddOnIDs.add(localAddOn.id)
|
|
37
|
+
}
|
|
31
38
|
} else if (addOnID.startsWith('http')) {
|
|
32
39
|
addOn = await loadRemoteAddOn(addOnID)
|
|
33
40
|
addOns.push(addOn)
|
|
34
41
|
} else {
|
|
35
|
-
|
|
42
|
+
const suggestion = findClosestAddOn(addOnID, addOns)
|
|
43
|
+
throw new Error(
|
|
44
|
+
`Add-on ${addOnID} not found${suggestion ? `. Did you mean "${suggestion}"?` : ''}`,
|
|
45
|
+
)
|
|
36
46
|
}
|
|
37
47
|
|
|
38
48
|
for (const dependsOn of addOn.dependsOn || []) {
|
|
@@ -55,6 +65,48 @@ function loadAddOn(addOn: AddOn): AddOn {
|
|
|
55
65
|
return addOn
|
|
56
66
|
}
|
|
57
67
|
|
|
68
|
+
function findClosestAddOn(
|
|
69
|
+
input: string,
|
|
70
|
+
addOns: Array<AddOn>,
|
|
71
|
+
): string | undefined {
|
|
72
|
+
const inputLower = input.toLowerCase()
|
|
73
|
+
let bestMatch: string | undefined
|
|
74
|
+
let bestDistance = Infinity
|
|
75
|
+
|
|
76
|
+
for (const addOn of addOns) {
|
|
77
|
+
const d = levenshtein(inputLower, addOn.id.toLowerCase())
|
|
78
|
+
if (d < bestDistance) {
|
|
79
|
+
bestDistance = d
|
|
80
|
+
bestMatch = addOn.id
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Only suggest if the distance is reasonable (less than half the input length)
|
|
85
|
+
if (bestMatch && bestDistance <= Math.max(Math.floor(input.length / 2), 2)) {
|
|
86
|
+
return bestMatch
|
|
87
|
+
}
|
|
88
|
+
return undefined
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function levenshtein(a: string, b: string): number {
|
|
92
|
+
const m = a.length
|
|
93
|
+
const n = b.length
|
|
94
|
+
let prev = Array.from({ length: n + 1 }, (_, j) => j)
|
|
95
|
+
|
|
96
|
+
for (let i = 1; i <= m; i++) {
|
|
97
|
+
const curr = [i]
|
|
98
|
+
for (let j = 1; j <= n; j++) {
|
|
99
|
+
curr[j] =
|
|
100
|
+
a[i - 1] === b[j - 1]
|
|
101
|
+
? prev[j - 1]
|
|
102
|
+
: 1 + Math.min(prev[j], curr[j - 1], prev[j - 1])
|
|
103
|
+
}
|
|
104
|
+
prev = curr
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return prev[n]
|
|
108
|
+
}
|
|
109
|
+
|
|
58
110
|
export function populateAddOnOptionsDefaults(
|
|
59
111
|
chosenAddOns: Array<AddOn>,
|
|
60
112
|
): Record<string, Record<string, any>> {
|