create-surf-app 1.0.0-alpha.12 → 1.0.0-alpha.14
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/dist/templates/default/backend/package.json +1 -1
- package/dist/templates/nextjs/CLAUDE.md +1 -1
- package/dist/templates/nextjs/app/providers.tsx +3 -20
- package/dist/templates/nextjs/next.config.ts +0 -3
- package/dist/templates/nextjs/package.json +1 -3
- package/package.json +1 -1
- package/dist/templates/default/package.json +0 -11
|
@@ -79,7 +79,7 @@ Tables are auto-synced on server start and when `db/schema.ts` changes in dev mo
|
|
|
79
79
|
- `db/index.ts` - database connection
|
|
80
80
|
- `lib/boot.ts` - infrastructure (schema sync, cron init)
|
|
81
81
|
- `app/layout.tsx` - root layout and providers
|
|
82
|
-
- `app/providers.tsx` - client-side
|
|
82
|
+
- `app/providers.tsx` - client-side preview bridge hooks
|
|
83
83
|
- `eslint.config.mjs` - lint rules
|
|
84
84
|
- `globals.css` - only imports, do not add styles here (use Tailwind classes)
|
|
85
85
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { useEffect, useState } from "react"
|
|
3
|
+
import { useEffect } from "react"
|
|
5
4
|
|
|
6
5
|
// Notify parent frame that the app has rendered.
|
|
7
6
|
// DO NOT REMOVE — the hosting app uses this to dismiss the loading overlay.
|
|
@@ -22,7 +21,7 @@ function useSurfAppReady() {
|
|
|
22
21
|
const _basePath = process.env.NEXT_PUBLIC_BASE_PATH || ""
|
|
23
22
|
if (typeof window !== "undefined" && _basePath) {
|
|
24
23
|
const _origFetch = window.fetch
|
|
25
|
-
window.fetch = function patchedFetch(input, init) {
|
|
24
|
+
window.fetch = function patchedFetch(this: typeof globalThis, input: RequestInfo | URL, init?: RequestInit) {
|
|
26
25
|
if (typeof input === "string" && input.startsWith("/api/")) {
|
|
27
26
|
input = _basePath + input
|
|
28
27
|
}
|
|
@@ -32,21 +31,5 @@ if (typeof window !== "undefined" && _basePath) {
|
|
|
32
31
|
|
|
33
32
|
export function Providers({ children }: { children: React.ReactNode }) {
|
|
34
33
|
useSurfAppReady()
|
|
35
|
-
|
|
36
|
-
const [queryClient] = useState(
|
|
37
|
-
() =>
|
|
38
|
-
new QueryClient({
|
|
39
|
-
defaultOptions: {
|
|
40
|
-
queries: {
|
|
41
|
-
refetchOnWindowFocus: false,
|
|
42
|
-
retry: 3,
|
|
43
|
-
staleTime: 30 * 1000,
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
})
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
return (
|
|
50
|
-
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
|
|
51
|
-
)
|
|
34
|
+
return children
|
|
52
35
|
}
|
|
@@ -7,9 +7,6 @@ const nextConfig: NextConfig = {
|
|
|
7
7
|
NEXT_PUBLIC_BASE_PATH: process.env.BASE_PATH!.replace(/\/+$/, ''),
|
|
8
8
|
},
|
|
9
9
|
serverExternalPackages: ['@surf-ai/sdk', 'drizzle-orm', 'drizzle-kit', 'croner'],
|
|
10
|
-
logging: {
|
|
11
|
-
browserToTerminal: true,
|
|
12
|
-
},
|
|
13
10
|
}
|
|
14
11
|
|
|
15
12
|
export default nextConfig
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type-check": "tsc --noEmit --incremental"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@surf-ai/sdk": "1.0.0-alpha.
|
|
11
|
+
"@surf-ai/sdk": "1.0.0-alpha.14",
|
|
12
12
|
"@surf-ai/theme": "latest",
|
|
13
13
|
"next": "15.5.14",
|
|
14
14
|
"react": "19.2.4",
|
|
@@ -59,8 +59,6 @@
|
|
|
59
59
|
"@hookform/resolvers": "5.2.2",
|
|
60
60
|
"date-fns": "4.1.0",
|
|
61
61
|
"zod": "3.25.76",
|
|
62
|
-
"@tanstack/react-query": "5.94.5",
|
|
63
|
-
"@tanstack/query-core": "5.94.5",
|
|
64
62
|
"scheduler": "0.27.0"
|
|
65
63
|
},
|
|
66
64
|
"devDependencies": {
|
package/package.json
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "surf-app",
|
|
3
|
-
"private": true,
|
|
4
|
-
"workspaces": ["backend", "frontend"],
|
|
5
|
-
"scripts": {
|
|
6
|
-
"dev": "concurrently \"npm run dev --workspace backend\" \"npm run dev --workspace frontend\""
|
|
7
|
-
},
|
|
8
|
-
"devDependencies": {
|
|
9
|
-
"concurrently": "^9.0.0"
|
|
10
|
-
}
|
|
11
|
-
}
|