create-stitchkit 0.6.0 → 0.6.1

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.
@@ -26,7 +26,13 @@ test('calls the live backend through the typed contract client', async () => {
26
26
  }),
27
27
  );
28
28
 
29
- await expect(client.status()).resolves.toEqual({ status: 'ok' });
29
+ // The release gate runs several isolated starters in parallel. A process can
30
+ // pass readiness and still briefly lose the first new connection while the
31
+ // host is saturated; retry the real typed call, while a dead backend still
32
+ // fails within the bounded acceptance window.
33
+ await expect(async () => {
34
+ await expect(client.status()).resolves.toEqual({ status: 'ok' });
35
+ }).toPass({ timeout: 5_000 });
30
36
  });
31
37
 
32
38
  test('publishes complete page metadata', async ({ page }) => {
@@ -7,7 +7,13 @@
7
7
  "packages/*"
8
8
  ],
9
9
  "catalog": {
10
- "stitchkit": "^0.76.1"
10
+ "stitchkit": "^0.90.5"
11
+ },
12
+ "overrides": {
13
+ "@playwright/test": "1.63.0",
14
+ "playwright": "1.63.0",
15
+ "playwright-core": "1.63.0",
16
+ "zod": "4.6.5"
11
17
  },
12
18
  "scripts": {
13
19
  "dev": "bun scripts/dev.ts",
@@ -37,22 +43,22 @@
37
43
  "gen:declaration": "bun scripts/declaration.ts"
38
44
  },
39
45
  "dependencies": {
40
- "dotenv": "^17.4.2"
46
+ "dotenv": "^18.0.1"
41
47
  },
42
48
  "devDependencies": {
43
49
  "@app/config": "workspace:*",
44
50
  "@app/shared": "workspace:*",
45
51
  "@axe-core/playwright": "^4.13.0",
46
- "@biomejs/biome": "^2.5.11",
52
+ "@biomejs/biome": "^2.5.14",
47
53
  "@modelcontextprotocol/client": "^2.0.0",
48
- "@playwright/test": "^1.62.1",
49
- "@types/bun": "^1.4.0",
50
- "@types/node": "^26.4.0",
51
- "oxc-parser": "^0.147.0",
54
+ "@playwright/test": "^1.63.0",
55
+ "@types/bun": "^1.4.2",
56
+ "@types/node": "^26.6.2",
57
+ "oxc-parser": "^0.150.0",
52
58
  "socket.io-client": "^4.8.3",
53
59
  "stitchkit": "catalog:",
54
60
  "typescript": "^7.0.2",
55
- "zod": "^4.5.4"
61
+ "zod": "^4.6.5"
56
62
  },
57
63
  "engines": {
58
64
  "bun": ">=1.2.0",
@@ -17,15 +17,15 @@
17
17
  "@app/db": "workspace:*",
18
18
  "@app/shared": "workspace:*",
19
19
  "@modelcontextprotocol/server": "^2.0.0",
20
- "@prisma/adapter-pg": "^7.9.1",
21
- "@socket.io/bun-engine": "^0.1.1",
22
- "ai": "^7.0.78",
20
+ "@prisma/adapter-pg": "^7.10.0",
21
+ "@socket.io/bun-engine": "^0.1.2",
22
+ "ai": "^7.0.107",
23
23
  "socket.io": "^4.8.3",
24
24
  "stitchkit": "catalog:",
25
- "zod": "^4.4.3"
25
+ "zod": "^4.6.5"
26
26
  },
27
27
  "devDependencies": {
28
- "@types/bun": "^1.4.0",
28
+ "@types/bun": "^1.4.2",
29
29
  "typescript": "^7.0.2"
30
30
  }
31
31
  }
@@ -16,12 +16,12 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "@t3-oss/env-core": "^0.13.11",
19
- "dotenv": "^17.4.2",
19
+ "dotenv": "^18.0.1",
20
20
  "stitchkit": "catalog:",
21
- "zod": "^4.4.3"
21
+ "zod": "^4.6.5"
22
22
  },
23
23
  "devDependencies": {
24
- "@types/bun": "^1.4.0",
24
+ "@types/bun": "^1.4.2",
25
25
  "typescript": "^7.0.2"
26
26
  }
27
27
  }
@@ -17,13 +17,13 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@app/config": "workspace:*",
20
- "@prisma/adapter-pg": "^7.9.1",
21
- "@prisma/client": "^7.9.1",
20
+ "@prisma/adapter-pg": "^7.10.0",
21
+ "@prisma/client": "^7.10.0",
22
22
  "pg": "^8.23.0"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/pg": "^8.23.1",
26
- "prisma": "^7.9.1",
26
+ "prisma": "^7.10.0",
27
27
  "typescript": "^7.0.2"
28
28
  }
29
29
  }
@@ -25,35 +25,35 @@
25
25
  "@radix-ui/react-tabs": "^1.1.21",
26
26
  "@radix-ui/react-tooltip": "^1.2.16",
27
27
  "@t3-oss/env-nextjs": "^0.13.11",
28
- "@tabler/icons-react": "^3.46.0",
29
- "@tanstack/react-query": "^5.102.3",
30
- "@tanstack/react-table": "^9.1.2",
28
+ "@tabler/icons-react": "^3.47.0",
29
+ "@tanstack/react-query": "^5.103.1",
30
+ "@tanstack/react-table": "^9.2.4",
31
31
  "@wrksz/themes": "^1.2.0",
32
32
  "class-variance-authority": "^0.7.1",
33
33
  "clsx": "^2.1.1",
34
34
  "date-fns": "^4.4.0",
35
- "dotenv": "^17.4.2",
36
- "framer-motion": "^13.1.1",
37
- "next": "^16.3.2",
38
- "next-intl": "^4.13.7",
39
- "react": "^19.2.8",
40
- "react-dom": "^19.2.8",
35
+ "dotenv": "^18.0.1",
36
+ "framer-motion": "^13.4.0",
37
+ "next": "^16.3.5",
38
+ "next-intl": "^4.14.5",
39
+ "react": "^19.3.0",
40
+ "react-dom": "^19.3.0",
41
41
  "react-query-kit": "^3.3.4",
42
42
  "recharts": "^3.10.1",
43
43
  "shiki": "^4.4.3",
44
44
  "socket.io-client": "^4.8.3",
45
45
  "sonner": "^2.0.8",
46
46
  "stitchkit": "catalog:",
47
- "tailwind-merge": "^3.6.0",
47
+ "tailwind-merge": "^3.7.0",
48
48
  "vaul": "^1.1.2",
49
- "zod": "^4.4.3"
49
+ "zod": "^4.6.5"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@tailwindcss/postcss": "^4.3.3",
53
- "@types/bun": "^1.4.0",
54
- "@types/node": "^26.3.0",
55
- "@types/react": "^19.2.18",
56
- "@types/react-dom": "^19.2.5",
53
+ "@types/bun": "^1.4.2",
54
+ "@types/node": "^26.6.2",
55
+ "@types/react": "^19.3.0",
56
+ "@types/react-dom": "^19.3.0",
57
57
  "babel-plugin-react-compiler": "^1.0.0",
58
58
  "tailwindcss": "^4.3.3",
59
59
  "tw-animate-css": "^1.4.0",
@@ -19,4 +19,10 @@ describe('query dehydration policy', () => {
19
19
  expect(shouldDehydrate(successful)).toBe(true);
20
20
  expect(shouldDehydrate(pending)).toBe(true);
21
21
  });
22
+
23
+ test('retries a query once and never retries a mutation', () => {
24
+ const defaults = getQueryClient().getDefaultOptions();
25
+ expect(defaults.queries?.retry).toBe(1);
26
+ expect(defaults.mutations?.retry).toBe(false);
27
+ });
22
28
  });
@@ -1,28 +1,36 @@
1
- import { defaultShouldDehydrateQuery, isServer, QueryClient } from '@tanstack/react-query';
1
+ import {
2
+ defaultShouldDehydrateQuery,
3
+ environmentManager,
4
+ QueryClient,
5
+ type QueryClientConfig,
6
+ } from '@tanstack/react-query';
2
7
  import { cache } from 'react';
3
8
 
4
- function createQueryClient(): QueryClient {
5
- return new QueryClient({
6
- defaultOptions: {
7
- queries: { staleTime: 30_000, retry: 1 },
8
- dehydrate: {
9
- // `pending` queries dehydrate too: a server component may kick off a
10
- // prefetch without awaiting it, and streaming SSR hands the in-flight
11
- // promise to the client, which resumes it instead of refetching. The
12
- // default predicate would drop exactly those queries and reintroduce
13
- // the client-side loading flash.
14
- shouldDehydrateQuery: (query) =>
15
- defaultShouldDehydrateQuery(query) || query.state.status === 'pending',
16
- },
9
+ // The template targets the published catalog release, so it cannot import
10
+ // `createQueryClientFactory` yet; the retry policy below is the part of that
11
+ // factory a released core already lets it state. UPGRADING names the cutover.
12
+ const config = {
13
+ defaultOptions: {
14
+ // One retry for queries, none for mutations — a mutation retried on a
15
+ // timeout may run twice; a query only reads.
16
+ queries: { staleTime: 30_000, retry: 1 },
17
+ mutations: { retry: false },
18
+ dehydrate: {
19
+ shouldDehydrateQuery: (query) =>
20
+ defaultShouldDehydrateQuery(query) || query.state.status === 'pending',
17
21
  },
18
- });
22
+ },
23
+ } satisfies QueryClientConfig;
24
+
25
+ function createQueryClient(): QueryClient {
26
+ return new QueryClient(config);
19
27
  }
20
28
 
21
29
  const getServerQueryClient = cache(createQueryClient);
22
30
  let browserQueryClient: QueryClient | undefined;
23
31
 
24
32
  export function getQueryClient(): QueryClient {
25
- if (isServer) return getServerQueryClient();
26
- if (!browserQueryClient) browserQueryClient = createQueryClient();
33
+ if (environmentManager.isServer()) return getServerQueryClient();
34
+ browserQueryClient ??= createQueryClient();
27
35
  return browserQueryClient;
28
36
  }
@@ -13,10 +13,10 @@
13
13
  },
14
14
  "dependencies": {
15
15
  "stitchkit": "catalog:",
16
- "zod": "^4.4.3"
16
+ "zod": "^4.6.5"
17
17
  },
18
18
  "devDependencies": {
19
- "@types/bun": "^1.4.0",
19
+ "@types/bun": "^1.4.2",
20
20
  "typescript": "^7.0.2"
21
21
  }
22
22
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://biomejs.dev/schemas/2.5.10/schema.json",
2
+ "$schema": "https://biomejs.dev/schemas/2.5.14/schema.json",
3
3
  "files": {
4
4
  "includes": ["**", "!!node_modules", "!!dist", "!!project.json", "!!**/.stitchkit"]
5
5
  },
@@ -16,16 +16,16 @@
16
16
  "build": "bun build src/index.ts --outdir dist --target bun --packages external"
17
17
  },
18
18
  "dependencies": {
19
- "@openrouter/ai-sdk-provider": "^3.0.0",
20
- "ai": "^7.0.87",
19
+ "@openrouter/ai-sdk-provider": "^3.1.0",
20
+ "ai": "^7.0.107",
21
21
  "stitchkit": "file:../../../core",
22
22
  "stitchkit-tui": "file:../../../tui",
23
- "zod": "4.5.4"
23
+ "zod": "4.6.5"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@typescript/native-preview": "7.0.0-dev.20260707.2",
27
- "@types/bun": "^1.4.0",
28
- "@types/react": "^19.2.14",
27
+ "@types/bun": "^1.4.2",
28
+ "@types/react": "^19.3.0",
29
29
  "typescript": "^7.0.2"
30
30
  },
31
31
  "engines": {