Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TanStack Start integration #412

Merged
merged 117 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
f96ec74
add `(TeeTo|ReadFrom)ReadableStreamLink` links
phryneas Nov 11, 2024
6890bd9
add `skipDataTransport` function
phryneas Nov 11, 2024
e77d7d7
also export type `ReadableStreamLinkEvent`
phryneas Nov 11, 2024
f3a27e6
forgot file
phryneas Nov 11, 2024
f6977a3
implement multipart streaming
phryneas Nov 13, 2024
711208b
cleanup
phryneas Nov 13, 2024
51562de
WIP
phryneas Nov 13, 2024
09c1be0
handle re-consumption of readFromReadableStreamKey
phryneas Nov 14, 2024
1554899
close on unsubscribe, catch errors
phryneas Nov 14, 2024
6337e38
tryClose, test adjustments
phryneas Nov 14, 2024
88e5e63
adjust errorlink type
phryneas Nov 14, 2024
ecc65ff
streamline bundling
phryneas Nov 14, 2024
5e28770
fix jest integration test
phryneas Nov 14, 2024
888130c
PreloadQuery: add `@defer` example
phryneas Nov 15, 2024
c4c4282
add detail, suspense-transition-bug
phryneas Nov 15, 2024
56adfdb
work around bug for now
phryneas Nov 15, 2024
92abc98
exports
phryneas Dec 16, 2024
b3ae471
add exported types
phryneas Dec 16, 2024
1814410
initialize basic react-router project
phryneas Nov 25, 2024
22c1894
clean up and `yarn react-router reveal`
phryneas Nov 25, 2024
294d6e8
add raw experiment
phryneas Nov 25, 2024
f909ae4
move eslint config into shared position
phryneas Dec 16, 2024
9252735
Fix bundling configuration so parts of the `graphql` package don't en…
phryneas Nov 13, 2024
d4dd572
Release version 0.11.6@latest to npm
phryneas Nov 13, 2024
312629f
Update peer deps for React 19 compatibility (#399)
nphmuller Dec 6, 2024
cfb9d68
update devDependencies to React 19, adjust tests and examples (#400)
phryneas Dec 6, 2024
145f210
Release version 0.11.7@latest to npm
phryneas Dec 6, 2024
bf662df
add example
phryneas Dec 16, 2024
30a154b
update react-router
phryneas Dec 16, 2024
13a3c39
working
phryneas Dec 16, 2024
8318d85
patch PR in
phryneas Dec 16, 2024
6f67975
last adjustments
phryneas Dec 16, 2024
e0dbe98
Merge remote-tracking branch 'origin/next' into pr/multipart-streaming
phryneas Dec 18, 2024
5bacf2e
fix up test for new deps
phryneas Dec 18, 2024
75a49c9
Merge branch 'pr/multipart-streaming' into pr/react-router-7
phryneas Dec 18, 2024
2b91422
clean up template fluff
phryneas Dec 18, 2024
7414a6b
move `IncrementalSchemaLink` and others to `shared`
phryneas Dec 18, 2024
27c5178
use `@defer` in the example
phryneas Dec 18, 2024
7672128
update turbo-stream patch
phryneas Dec 19, 2024
4040b28
update example to React 19
phryneas Dec 19, 2024
9c9945e
adjust `prepublishOnly`
phryneas Dec 20, 2024
849f09b
add to pkg-pr-new-publish
phryneas Dec 20, 2024
f62cb1b
add empty unit test
phryneas Dec 20, 2024
90b50b3
increase delay
phryneas Dec 20, 2024
e2d90b3
streamline integration test build
phryneas Dec 20, 2024
c98500e
needs more time in CI
phryneas Dec 20, 2024
93e20db
exclude shared
phryneas Dec 20, 2024
29378d5
copy react-router package to tanstack-start folder
phryneas Dec 20, 2024
d28e848
package init
phryneas Dec 20, 2024
40ff9fa
init tanstack start project
phryneas Dec 20, 2024
f1ae3c5
current progress
phryneas Dec 20, 2024
b0f2943
fix duplicate `@apollo/client` dependency
phryneas Jan 6, 2025
30cbf01
make things work
phryneas Jan 6, 2025
b02741d
adjustments
phryneas Jan 7, 2025
0a84fb5
generalize apiRoute
phryneas Jan 7, 2025
fd90523
api, use schemalink on server
phryneas Jan 7, 2025
0c15502
update tanstack start
phryneas Jan 7, 2025
8f691c0
add TSR devtools
phryneas Jan 7, 2025
7fc9e52
workaround for https://github.com/TanStack/router/issues/3117
phryneas Jan 7, 2025
4deafa4
trigger CI
phryneas Jan 7, 2025
fc96164
update patchfiles
phryneas Jan 7, 2025
1f9b4ea
add new properties
phryneas Jan 7, 2025
9b8ae14
Merge remote-tracking branch 'origin/next' into pr/react-router-7
phryneas Jan 8, 2025
fb5b988
changeset
phryneas Jan 8, 2025
840d724
trigger CI
phryneas Jan 8, 2025
a8a6f74
fix build warning
phryneas Jan 8, 2025
ab0f394
port over vercel template from https://github.com/remix-run/react-rou…
phryneas Jan 8, 2025
c5f5874
adjust folder structure
phryneas Jan 8, 2025
2feaf0a
more vercel adjustments
phryneas Jan 8, 2025
62d3f7a
use `promiscade` instead of a patched `turbo-stream` package
phryneas Jan 8, 2025
bf2dacc
update promiscade
phryneas Jan 8, 2025
be653a2
add promiscade-related comment
phryneas Jan 8, 2025
ded3c0e
lockfile
phryneas Jan 8, 2025
eb12b32
workarounds for promiscade
phryneas Jan 9, 2025
aecc129
move `graphql` dependency into monorepo
phryneas Jan 9, 2025
fa140bb
adjust comments
phryneas Jan 9, 2025
3eca666
these types are correct now
phryneas Jan 9, 2025
c93bc03
update lockfile
phryneas Jan 9, 2025
cf6d0b4
Merge branch 'pr/react-router-7' into pr/tanstack-start
phryneas Jan 10, 2025
a3f6019
rename route
phryneas Jan 13, 2025
886e9f9
add `useSuspenseQuery` demo, too
phryneas Jan 13, 2025
b3956f4
fix import
phryneas Jan 13, 2025
0d085ca
simplify client-side
phryneas Jan 13, 2025
8e1ba78
remove log
phryneas Jan 13, 2025
5518ff3
remove unneccessary type assertion
phryneas Jan 13, 2025
6518165
slight changes, README
phryneas Jan 13, 2025
f22c9f1
fix up important block
phryneas Jan 13, 2025
3562485
fix typo, reorder
phryneas Jan 13, 2025
1cde256
fixup shape test
phryneas Jan 13, 2025
99a77ec
add bundleInfo, adjust tests
phryneas Jan 13, 2025
47fbda2
adjust tests
phryneas Jan 13, 2025
94cbb2d
adjust for old node
phryneas Jan 13, 2025
96072b7
add globalThis.window in test
phryneas Jan 13, 2025
ca3b929
bump promiscade
phryneas Jan 13, 2025
98f719c
Merge branch 'pr/react-router-7' into pr/tanstack-start
phryneas Jan 13, 2025
e2819fb
update tanstack start, remove workaround for fixed bug
phryneas Jan 14, 2025
f536d23
update package.json
phryneas Jan 14, 2025
15565bc
add https://github.com/TanStack/router/pull/3161
phryneas Jan 14, 2025
4c2f387
lockfile
phryneas Jan 14, 2025
b9d20bc
update correct react types
phryneas Jan 14, 2025
14e97f8
Merge branch 'pr/react-router-7' into pr/tanstack-start
phryneas Jan 14, 2025
64445d9
eliminate context reliance
phryneas Jan 20, 2025
c254b4a
sync updates from https://github.com/TanStack/router/pull/2698
phryneas Jan 20, 2025
f97dafd
lockfiles
phryneas Jan 20, 2025
e45c71c
script
phryneas Jan 20, 2025
2a4d7e5
fighting with duplicate dependencies
phryneas Jan 20, 2025
ed565df
unify react types version
phryneas Jan 20, 2025
7dd0ffe
remove unused path
phryneas Jan 20, 2025
fd8d289
more config file mentions
phryneas Jan 20, 2025
79a11a6
TSR 6d6780b255c458e9776f15c134d93fab0aeafa80
phryneas Jan 21, 2025
561c16e
pass `request` to `makeClient` in entry.server.tsx
phryneas Jan 22, 2025
06a63a7
Merge branch 'pr/react-router-7' into pr/tanstack-start
phryneas Jan 22, 2025
9449892
Merge branch 'next' into pr/tanstack-start
phryneas Jan 22, 2025
e391313
delete file after merge
phryneas Jan 22, 2025
312cbb2
Merge branch 'next' into pr/tanstack-start
phryneas Jan 22, 2025
b3e00c7
lockfile
phryneas Jan 22, 2025
ebe0fe6
Update packages/tanstack-start/README.md
phryneas Jan 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
766 changes: 766 additions & 0 deletions .yarn/patches/@tanstack-react-router-npm-1.97.3-ad16343f36.patch

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions .yarn/patches/@tanstack-start-npm-1.97.3-da273c2822.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/dist/cjs/client/tsrScript.cjs b/dist/cjs/client/tsrScript.cjs
index 1b90ed6231c28246be7cc96ac546977d2b2d0442..f206b954ee627f53a177f974128a1e1be79473cb 100644
--- a/dist/cjs/client/tsrScript.cjs
+++ b/dist/cjs/client/tsrScript.cjs
@@ -1,4 +1,4 @@
"use strict";
-const minifiedScript = 'const __TSR__={matches:[],streamedValues:{},queue:[],runQueue:()=>{let e=!1;__TSR__.queue=__TSR__.queue.filter(r=>r()?(e=!0,!1):!0),e&&__TSR__.runQueue()},initMatch:e=>{__TSR__.queue.push(()=>(__TSR__.matches[e.index]||(__TSR__.matches[e.index]=e,Object.entries(e.extracted).forEach(([r,t])=>{if(t.type==="stream"){let a;t.value=new ReadableStream({start(o){a=o}}),t.value.controller=a}else if(t.type==="promise"){let a,o;t.value=new Promise((l,u)=>{o=u,a=l}),t.value.reject=o,t.value.resolve=a}})),!0)),__TSR__.runQueue()},resolvePromise:e=>{__TSR__.queue.push(()=>{const r=__TSR__.matches[e.matchIndex];if(r){const t=r.extracted[e.id];if(t&&t.type==="promise"&&t.value&&e.promiseState.status==="success")return t.value.resolve(e.promiseState.data),!0}return!1}),__TSR__.runQueue()},cleanScripts:()=>{document.querySelectorAll(".tsr-once").forEach(e=>{e.remove()})}};window.__TSR__=__TSR__;\n';
+const minifiedScript = 'const __TSR__={matches:[],streamedValues:{},setStreamedValue(e,r){__TSR__.streamedValues[e]={value:r},typeof __TSR__ROUTER__<"u"&&__TSR__ROUTER__.emit({type:"onStreamedValue",key:e})},queue:[],runQueue:()=>{let e=!1;__TSR__.queue=__TSR__.queue.filter(r=>r()?(e=!0,!1):!0),e&&__TSR__.runQueue()},initMatch:e=>{__TSR__.queue.push(()=>(__TSR__.matches[e.index]||(__TSR__.matches[e.index]=e,Object.entries(e.extracted).forEach(([r,t])=>{if(t.type==="stream"){let a;t.value=new ReadableStream({start(o){a=o}}),t.value.controller=a}else if(t.type==="promise"){let a,o;t.value=new Promise((l,u)=>{o=u,a=l}),t.value.reject=o,t.value.resolve=a}})),!0)),__TSR__.runQueue()},resolvePromise:e=>{__TSR__.queue.push(()=>{const r=__TSR__.matches[e.matchIndex];if(r){const t=r.extracted[e.id];if(t&&t.type==="promise"&&t.value&&e.promiseState.status==="success")return t.value.resolve(e.promiseState.data),!0}return!1}),__TSR__.runQueue()},cleanScripts:()=>{document.querySelectorAll(".tsr-once").forEach(e=>{e.remove()})}};window.__TSR__=__TSR__;\n';
module.exports = minifiedScript;
//# sourceMappingURL=tsrScript.cjs.map
diff --git a/dist/esm/client/tsrScript.js b/dist/esm/client/tsrScript.js
index eb4cd1eec8da7fee74455d9e5f6c5c634ffabd87..9ace36dd92f618e1f7be2bdf5c88adcfd19872e9 100644
--- a/dist/esm/client/tsrScript.js
+++ b/dist/esm/client/tsrScript.js
@@ -1,4 +1,4 @@
-const minifiedScript = 'const __TSR__={matches:[],streamedValues:{},queue:[],runQueue:()=>{let e=!1;__TSR__.queue=__TSR__.queue.filter(r=>r()?(e=!0,!1):!0),e&&__TSR__.runQueue()},initMatch:e=>{__TSR__.queue.push(()=>(__TSR__.matches[e.index]||(__TSR__.matches[e.index]=e,Object.entries(e.extracted).forEach(([r,t])=>{if(t.type==="stream"){let a;t.value=new ReadableStream({start(o){a=o}}),t.value.controller=a}else if(t.type==="promise"){let a,o;t.value=new Promise((l,u)=>{o=u,a=l}),t.value.reject=o,t.value.resolve=a}})),!0)),__TSR__.runQueue()},resolvePromise:e=>{__TSR__.queue.push(()=>{const r=__TSR__.matches[e.matchIndex];if(r){const t=r.extracted[e.id];if(t&&t.type==="promise"&&t.value&&e.promiseState.status==="success")return t.value.resolve(e.promiseState.data),!0}return!1}),__TSR__.runQueue()},cleanScripts:()=>{document.querySelectorAll(".tsr-once").forEach(e=>{e.remove()})}};window.__TSR__=__TSR__;\n';
+const minifiedScript = 'const __TSR__={matches:[],streamedValues:{},setStreamedValue(e,r){__TSR__.streamedValues[e]={value:r},typeof __TSR__ROUTER__<"u"&&__TSR__ROUTER__.emit({type:"onStreamedValue",key:e})},queue:[],runQueue:()=>{let e=!1;__TSR__.queue=__TSR__.queue.filter(r=>r()?(e=!0,!1):!0),e&&__TSR__.runQueue()},initMatch:e=>{__TSR__.queue.push(()=>(__TSR__.matches[e.index]||(__TSR__.matches[e.index]=e,Object.entries(e.extracted).forEach(([r,t])=>{if(t.type==="stream"){let a;t.value=new ReadableStream({start(o){a=o}}),t.value.controller=a}else if(t.type==="promise"){let a,o;t.value=new Promise((l,u)=>{o=u,a=l}),t.value.reject=o,t.value.resolve=a}})),!0)),__TSR__.runQueue()},resolvePromise:e=>{__TSR__.queue.push(()=>{const r=__TSR__.matches[e.matchIndex];if(r){const t=r.extracted[e.id];if(t&&t.type==="promise"&&t.value&&e.promiseState.status==="success")return t.value.resolve(e.promiseState.data),!0}return!1}),__TSR__.runQueue()},cleanScripts:()=>{document.querySelectorAll(".tsr-once").forEach(e=>{e.remove()})}};window.__TSR__=__TSR__;\n';
export {
minifiedScript as default
};
2 changes: 1 addition & 1 deletion examples/app-dir-experiments/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"lint": "next lint"
},
"dependencies": {
"@apollo/client": "3.10.4",
"@apollo/client": "^3.12.6",
"@apollo/experimental-nextjs-app-support": "workspace:^",
"@apollo/server": "^4.9.5",
"@as-integrations/next": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/hack-the-supergraph-ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"lint": "next lint"
},
"dependencies": {
"@apollo/client": "3.10.4",
"@apollo/client": "^3.12.6",
"@apollo/experimental-nextjs-app-support": "workspace:^",
"@apollo/space-kit": "^9.11.0",
"@chakra-ui/next-js": "2.4.2",
Expand Down
2 changes: 1 addition & 1 deletion examples/polls-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"codegen": "graphql-codegen --config codegen.ts"
},
"dependencies": {
"@apollo/client": "3.10.4",
"@apollo/client": "^3.12.6",
"@apollo/experimental-nextjs-app-support": "workspace:^",
"@apollo/server": "^4.9.5",
"@types/node": "20.12.11",
Expand Down
2 changes: 2 additions & 0 deletions integration-test/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ yalc.lock
.next/
test-results/
webpack-stats.json
.output
.vinxi

This file was deleted.

1 change: 1 addition & 0 deletions integration-test/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"graphql": "^16.7.1",
"graphql-17-alpha2": "npm:[email protected]",
"graphql-tag": "^2.12.6",
"next": "^15.0.3",
"react": "^19.0.0",
Expand Down
10 changes: 8 additions & 2 deletions integration-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@
"@apollo/client-react-streaming": "exec:./shared/build-client-react-streaming.cjs",
"@apollo/experimental-nextjs-app-support": "exec:./shared/build-experimental-nextjs-app-support.cjs",
"@apollo/client-integration-react-router": "exec:./shared/build-client-integration-react-router.cjs",
"graphql": "17.0.0-alpha.2"
"@apollo/client-integration-tanstack-start": "exec:./shared/build-client-integration-tanstack-start.cjs",
"@apollo/client": "3.12.6",
"graphql": "17.0.0-alpha.2",
"turbo-stream": "npm:@phryneas/[email protected]",
"@tanstack/react-router": "patch:@tanstack/react-router@npm%3A1.97.3#~/../.yarn/patches/@tanstack-react-router-npm-1.97.3-ad16343f36.patch",
"@tanstack/start": "patch:@tanstack/start@npm%3A1.97.3#~/../.yarn/patches/@tanstack-start-npm-1.97.3-da273c2822.patch",
"@types/react": "19.0.2"
},
"workspaces": [
"*"
],
"scripts": {
"build:libs": "find . -regextype posix-extended -regex '.*/node_modules/@apollo/(client-react-streaming|experimental-nextjs-app-support|client-integration-react-router)' -printf 'rm -r %p\n' -exec rm -r {} +; glob \"../.yarn/cache/@apollo-*exec*\" \"$HOME/.yarn/berry/cache/@apollo-*exec*\" --cmd='rm -v' ; yarn"
"build:libs": "find . -regextype posix-extended -regex '.*/node_modules/@apollo/(client-react-streaming|experimental-nextjs-app-support|client-integration-react-router|client-integration-tanstack-start)' -printf 'rm -r %p\n' -exec rm -r {} +; glob \"../.yarn/cache/@apollo-*exec*\" \"$HOME/.yarn/berry/cache/@apollo-*exec*\" --cmd='rm -v' ; yarn"
},
"devDependencies": {
"glob": "^10.3.10",
Expand Down
51 changes: 2 additions & 49 deletions integration-test/react-router/app/routes/api.ts
Original file line number Diff line number Diff line change
@@ -1,51 +1,4 @@
import { ActionFunctionArgs } from "react-router";
import { experimentalExecuteIncrementally, parse } from "graphql";
import { schema } from "@integration-test/shared/schema";
import { apiRouteHandler } from "@integration-test/shared/apiRoute";

/**
* `@defer`-capable very crude implementation of a GraphQL server.
*/

export async function action({ request }: ActionFunctionArgs) {
const body = await request.json();
const { query, variables } = body;
const document = parse(query);

const result = await experimentalExecuteIncrementally({
schema,
document,
variableValues: variables,
contextValue: { from: "network" },
});

if (`initialResult` in result) {
const encoder = new TextEncoder();
const generator = async function* (): AsyncIterable<Uint8Array> {
yield encoder.encode(
"\r\n---\r\ncontent-type: application/json; charset=utf-8\r\n\r\n" +
JSON.stringify(result.initialResult) +
"\r\n---\r\n"
);
for await (const partialResult of result.subsequentResults) {
yield encoder.encode(
"content-type: application/json; charset=utf-8\r\n\r\n" +
JSON.stringify(partialResult) +
(partialResult.hasNext ? "\r\n---\r\n" : "\r\n-----\r\n")
);
}
};
return new Response(generator() as any, {
status: 200,
headers: {
"Content-Type": 'multipart/mixed; boundary="-"; deferSpec=20220824',
},
});
} else {
return new Response(JSON.stringify(result), {
status: 200,
headers: {
"Content-Type": "application/json",
},
});
}
}
export const action = apiRouteHandler({ schema });
2 changes: 1 addition & 1 deletion integration-test/react-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"isbot": "^5.1.17",
"react": "^19",
"react-dom": "^19",
"react-router": "patch:react-router@npm%3A7.0.2#~/.yarn/patches/react-router-npm-7.0.2-b96f2bd13c.patch"
"react-router": "patch:react-router@npm%3A7.0.2#~/../.yarn/patches/react-router-npm-7.0.2-b96f2bd13c.patch"
},
"devDependencies": {
"@react-router/dev": "^7.0.1",
Expand Down
63 changes: 63 additions & 0 deletions integration-test/shared/apiRoute.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import {
experimentalExecuteIncrementally,
GraphQLSchema,
parse,
} from "graphql";

/**
* `@defer`-capable very crude implementation of a GraphQL server.
*/

export function apiRouteHandler({
schema,
contextValue = { from: "network" },
}: {
schema: GraphQLSchema;
contextValue?: { from: string };
}) {
return async function handler({
request,
}: {
request: Request;
}): Promise<Response> {
const body = await request.json();
const { query, variables } = body;
const document = parse(query);
const result = await experimentalExecuteIncrementally({
schema,
document,
variableValues: variables,
contextValue,
});
if (`initialResult` in result) {
const encoder = new TextEncoder();
const generator = async function* (): AsyncIterable<Uint8Array> {
yield encoder.encode(
"\r\n---\r\ncontent-type: application/json; charset=utf-8\r\n\r\n" +
JSON.stringify(result.initialResult) +
"\r\n---\r\n"
);
for await (const partialResult of result.subsequentResults) {
yield encoder.encode(
"content-type: application/json; charset=utf-8\r\n\r\n" +
JSON.stringify(partialResult) +
(partialResult.hasNext ? "\r\n---\r\n" : "\r\n-----\r\n")
);
}
};
return new Response(generator() as any, {
status: 200,
headers: {
"Content-Type": 'multipart/mixed; boundary="-"; deferSpec=20220824',
},
});
} else {
return new Response(JSON.stringify(result), {
status: 200,
headers: {
"Content-Type": "application/json",
},
});
}
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
The integration tests need the latest version of the `@apollo/client-react-streaming` package.

This script can be used with the `exec:` protocol (https://yarnpkg.com/protocol/exec) to build
the package.
*/

const { join } = require("node:path");
const { $, cd, retry, sleep } = /** @type {typeof import('zx')} */ (
require(require.resolve("zx", { paths: [process.env.PROJECT_CWD] }))
);

$.stdio = "inherit";

(async function run() {
const monorepoRoot = join(process.env.PROJECT_CWD, "..");
const archive = join(monorepoRoot, "packages/tanstack-start/archive.tgz");

// give the main build script a chance to kick in
await sleep(1000);

await retry(120, "1s", () => $`test -f ${archive}`);

cd(monorepoRoot);
await $`tar -x -z --strip-components=1 -f ${archive} -C ${execEnv.buildDir}`;
})();
3 changes: 3 additions & 0 deletions integration-test/tanstack-start/app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { defineConfig } from "@tanstack/start/config";

export default defineConfig({});
6 changes: 6 additions & 0 deletions integration-test/tanstack-start/app/api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import {
createStartAPIHandler,
defaultAPIFileRouteHandler,
} from "@tanstack/start/api";

export default createStartAPIHandler(defaultAPIFileRouteHandler);
8 changes: 8 additions & 0 deletions integration-test/tanstack-start/app/client.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/// <reference types="vinxi/types/client" />
import { hydrateRoot } from "react-dom/client";
import { StartClient } from "@tanstack/start";
import { createRouter } from "./router";

const router = createRouter();

hydrateRoot(document, <StartClient router={router} />);
Loading
Loading