mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
update orpc tanstack query integration (#299)
This commit is contained in:
@@ -87,12 +87,9 @@ export const dependencyVersionMap = {
|
||||
|
||||
"@prisma/extension-accelerate": "^1.3.0",
|
||||
|
||||
"@orpc/server": "^1.2.0",
|
||||
"@orpc/client": "^1.2.0",
|
||||
"@orpc/react-query": "^1.2.0",
|
||||
"@orpc/solid-query": "^1.2.0",
|
||||
"@orpc/vue-query": "^1.2.0",
|
||||
"@orpc/svelte-query": "^1.2.0",
|
||||
"@orpc/server": "^1.4.1",
|
||||
"@orpc/client": "^1.4.1",
|
||||
"@orpc/tanstack-query": "^1.4.1",
|
||||
|
||||
"@trpc/tanstack-react-query": "^11.0.0",
|
||||
"@trpc/server": "^11.0.0",
|
||||
|
||||
@@ -54,7 +54,11 @@ export async function setupApi(config: ProjectConfig): Promise<void> {
|
||||
if (hasReactWeb) {
|
||||
if (api === "orpc") {
|
||||
await addPackageDependency({
|
||||
dependencies: ["@orpc/react-query", "@orpc/client", "@orpc/server"],
|
||||
dependencies: [
|
||||
"@orpc/tanstack-query",
|
||||
"@orpc/client",
|
||||
"@orpc/server",
|
||||
],
|
||||
projectDir: webDir,
|
||||
});
|
||||
} else if (api === "trpc") {
|
||||
@@ -70,7 +74,11 @@ export async function setupApi(config: ProjectConfig): Promise<void> {
|
||||
} else if (hasNuxtWeb) {
|
||||
if (api === "orpc") {
|
||||
await addPackageDependency({
|
||||
dependencies: ["@orpc/vue-query", "@orpc/client", "@orpc/server"],
|
||||
dependencies: [
|
||||
"@orpc/tanstack-query",
|
||||
"@orpc/client",
|
||||
"@orpc/server",
|
||||
],
|
||||
projectDir: webDir,
|
||||
});
|
||||
}
|
||||
@@ -78,7 +86,7 @@ export async function setupApi(config: ProjectConfig): Promise<void> {
|
||||
if (api === "orpc") {
|
||||
await addPackageDependency({
|
||||
dependencies: [
|
||||
"@orpc/svelte-query",
|
||||
"@orpc/tanstack-query",
|
||||
"@orpc/client",
|
||||
"@orpc/server",
|
||||
"@tanstack/svelte-query",
|
||||
@@ -90,7 +98,7 @@ export async function setupApi(config: ProjectConfig): Promise<void> {
|
||||
if (api === "orpc") {
|
||||
await addPackageDependency({
|
||||
dependencies: [
|
||||
"@orpc/solid-query",
|
||||
"@orpc/tanstack-query",
|
||||
"@orpc/client",
|
||||
"@orpc/server",
|
||||
"@tanstack/solid-query",
|
||||
@@ -113,7 +121,11 @@ export async function setupApi(config: ProjectConfig): Promise<void> {
|
||||
});
|
||||
} else if (api === "orpc") {
|
||||
await addPackageDependency({
|
||||
dependencies: ["@orpc/react-query", "@orpc/client", "@orpc/server"],
|
||||
dependencies: [
|
||||
"@orpc/tanstack-query",
|
||||
"@orpc/client",
|
||||
"@orpc/server",
|
||||
],
|
||||
projectDir: nativeDir,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -30,7 +30,8 @@ export function processAndValidateFlags(
|
||||
if (options.api === "none") {
|
||||
if (
|
||||
options.examples &&
|
||||
!(options.examples.length === 1 && options.examples[0] === "none")
|
||||
!(options.examples.length === 1 && options.examples[0] === "none") &&
|
||||
options.backend !== "convex"
|
||||
) {
|
||||
consola.fatal(
|
||||
"Cannot use '--examples' when '--api' is set to 'none'. Please remove the --examples flag or choose an API type.",
|
||||
|
||||
Reference in New Issue
Block a user