create-terreno-app 57.21.0 → 58.0.0-beta.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.
- package/CHANGELOG.md +43 -0
- package/dist/generate.d.ts +7 -0
- package/dist/generate.d.ts.map +1 -1
- package/dist/generate.js +243 -548
- package/dist/generate.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -20,6 +20,49 @@ Upgrade notes for consumer action live in [`mcp-server/src/docs/upgrades/`](mcp-
|
|
|
20
20
|
|
|
21
21
|
Unreleased changes live in [`changelog/unreleased/`](changelog/unreleased/). Add one Markdown file per feature (see that directory's README) instead of editing this section.
|
|
22
22
|
|
|
23
|
+
## [58.0.0-beta.1] - 2026-11-02
|
|
24
|
+
|
|
25
|
+
Upgrade note: [`mcp-server/src/docs/upgrades/58.0.0-beta.1.md`](mcp-server/src/docs/upgrades/58.0.0-beta.1.md).
|
|
26
|
+
|
|
27
|
+
### Breaking
|
|
28
|
+
|
|
29
|
+
- Terreno 58 targets Expo SDK 58 (`~58.0.14`), React Native `0.88.0`, and React `19.3.0`. `@terreno/ui` peers `react-native` `0.88.0`. Native catalog moves with the SDK: `react-native-gesture-handler` `~3.3.0`, `react-native-reanimated` `4.7.1` + `react-native-worklets` `0.13.0`, `react-native-screens` `~4.30.0`, `react-native-webview` `14.0.1`, `@sentry/react-native` `~8.28.0`, `@shopify/flash-list` `2.3.2`, `@shopify/react-native-skia` `2.14.0`. Rebuild dev clients and store binaries.
|
|
30
|
+
- Expo Router 58: set `export const unstable_settings = {initialRouteName}` on the layout instead of passing `initialRouteName` to `<Slot>` / navigators. `SidebarNavigation` ignores the prop.
|
|
31
|
+
- Expo Router 58 static rendering: a custom `app/+html.tsx` must render `headNodes` and `bodyNodes` from `useServerDocumentContext()` (`expo-router/html`), or exported pages ship without their JavaScript. `example-frontend` is updated.
|
|
32
|
+
- React Native 0.88 generated types: type refs as `ViewInstance`, `TextInstance`, `ScrollViewInstance`, and `TextInputInstance` (`Box.scrollRef`, `TextField.inputRef`, `Text` `ref`).
|
|
33
|
+
- `create-terreno-app` scaffolds Expo `~58.0.14`, React Native `0.88.0`, and React `19.3.0`.
|
|
34
|
+
- The Terreno 58 native module baseline lands in `example-frontend` and `demo`: `@stripe/stripe-react-native` 0.81.0, `react-native-purchases` and `react-native-purchases-ui` 10.12.2, `expo-device`, `expo-crypto`, `expo-local-authentication`, `expo-system-ui`, and `expo-build-properties` (Android Kotlin 2.2.21 and `compileSdkVersion` 37 pins). Rebuild every dev client and store binary. `react-native-otp-verify` is left out because it does not support the New Architecture. The demo has a hidden **Native Modules** page that shows each module's version and whether the running binary links it. See the 58.0.0 upgrade note.
|
|
35
|
+
- `TerrenoApp` turns HTTP rate limiting on by default. Omitting `rateLimit` now mounts the limiter with the memory store (auth 20 / 15 min, api 600 / 15 min). Pass `rateLimit: false` to turn it off. On Cloud Run pass `rateLimit: {trustProxy: 1}` so unauthenticated traffic keys by client IP. See the 58.0.0 upgrade note.
|
|
36
|
+
- `@terreno/admin-frontend` no longer takes an RTK `api`. The `api` prop is removed from every admin component (`AdminProvider`, `AdminShellLayout`, `AdminHome`, `AdminModelList`, `AdminModelTable`, `AdminModelForm`, `AdminScreenRouter`, `ConfigurationScreen`, `DocumentStorageBrowser`, `ConsentHistory`, comms, jobs, org, consent, and announcement screens, and widget props), and admin hooks drop their `api` argument (`useAdminConfig(apiBase)`, `useAdminScripts(apiBase)`, `useAdminRoles(apiBase)`, `useConfigurationApi({basePath})`, `useDocumentStorageApi(basePath)`, `useConsentHistory(baseUrl)`, `useOrganizationsApi(basePath)`, `useCommsDashboardApi()`, `useJobsDashboardApi()`, and the `useAiObservability*Api()` hooks).
|
|
37
|
+
- `useAdminApi(api, routePath, modelName)` is removed. Use `useAdminModelApi(routePath, modelName)`, which keeps the same hook names and calls the same `/admin/{routePath}` URLs through the admin fetch client. `AdminApi`, `EndpointBuilder`, and admin `injectEndpoints` are gone; `@reduxjs/toolkit` and `react-redux` are no longer peers of admin-frontend.
|
|
38
|
+
- `AdminProvider` is now the required auth binding for every admin request, including ObjectId and API-only model CRUD. Cookie SPAs pass `credentials="same-origin"`; embedded apps pass `apiOrigin` and `getAuthHeaders`. Product screens that reuse admin components wrap them in `AdminProvider`. See the 58.0.0 upgrade guide.
|
|
39
|
+
- Removed the legacy RTK realtime path. Use `sync` on `modelRouter` with `@terreno/syncdb` for live collection updates. `RealtimeApp`, `SyncApp`, socket auth, `sync:delta`, and admin `admin:model.changed` events are unchanged. See the 58.0.0 upgrade note.
|
|
40
|
+
- `@terreno/api`: `modelRouter` no longer accepts `realtime` (now a TypeScript error), and the change stream no longer emits the `sync` websocket event. Removed `RealtimeConfig`, `RealtimeEvent`, `DocumentSubscription`, `QuerySubscription`, `registerRealtime`, `getRealtimeRegistry`, `findRegistryEntryByCollection`, `findRegistryEntryByRoutePath`, `updateRealtimeRegistryOptions`, `clearRealtimeRegistry`, `RealtimeRegistryEntry`, the query-subscription store (`addQuerySubscription`, `removeQuerySubscription`, `removeAllSocketQueries`, `getQuerySubscriptionsForCollection`, `computeQueryId`, `clearQueryStore`), and `MAX_MODEL_SUBSCRIPTIONS` / `MAX_DOCUMENT_SUBSCRIPTIONS` / `MAX_QUERY_SUBSCRIPTIONS`. Sockets no longer handle `subscribe:model`, `subscribe:document`, or `subscribe:query`.
|
|
41
|
+
- `@terreno/rtk`: removed `realtimeList`, `realtimeDocument`, `setRealtimeSocket`, `getRealtimeSocket`, `useSyncConnection`, and the `RealtimeEvent` type. The rest of `@terreno/rtk` (including `useSocketConnection` and `useRealtimeDebug`) is removed in the same release; see `remove-rtk.md`.
|
|
42
|
+
- Removed `@terreno/rtk` and every Redux dependency (`@reduxjs/toolkit`, `react-redux`, `redux-persist`, `@rtk-query/codegen-openapi`). `@terreno/rtk` is not published for 58. `@terreno/syncdb` is the only frontend data, request, and session layer. Follow `docs/how-to/migrate-rtk-to-syncdb.md`, which maps every removed export to its replacement, and the 58.0.0 upgrade note.
|
|
43
|
+
- `@terreno/syncdb` adds `@terreno/syncdb/api` (`createApiClient`, `ApiError`), request hooks in `@terreno/syncdb/react` (`ApiClientProvider`, `useApiQuery`, `useLazyApiQuery`, `useApiMutation`, `useSocketEvent`), `@terreno/syncdb/config` (`baseUrl`, `baseWebsocketsUrl`, `appHeaders`), `@terreno/syncdb/auth` (`createBetterAuthClient`, `SessionProvider`, `useSession`, `jwtAuthAdapter`, `useJwtAuth`, token-expiry helpers), `@terreno/syncdb/flags` (`useFeatureFlags`, `useTerrenoFeatureFlags` on the sync socket), `@terreno/syncdb/app` (`useUpgradeCheck`, `hasPermission`, `canOpenAdminPage`, `installDevConsoleLogger`, `useMCPTools`), and `@terreno/syncdb/buildNumber`.
|
|
44
|
+
- `terreno-syncdb-codegen --api-out` generates typed hooks for every non-synced OpenAPI operation (same names as the RTK codegen), replacing `@rtk-query/codegen-openapi`. `bun run sdk` writes `store/apiSdk.ts`.
|
|
45
|
+
- `@terreno/ui` `ConsentNavigator`, `AnnouncementNavigator`, `useConsentForms`, `useSubmitConsent`, `useAnnouncements`, and `useAcknowledgeAnnouncement` take a request `client` instead of an RTK `api`.
|
|
46
|
+
- `GptHistory` (`gpt/histories`) and `McpServiceToken` (`mcp/service-tokens`, read-only) are synced collections with String ids. Run the `gptHistoryStringIdsMigration` (`@terreno/ai`) and `mcpServiceTokenStringIdsMigration` (`@terreno/api`) before deploying 58 frontends.
|
|
47
|
+
- `create-terreno-app`, the `terreno_bootstrap` prompt, and the `terreno_generate_screen` tool scaffold apps without Redux or `@terreno/rtk`. The terreno-mcp-local `get_rtk_state` tool, the MCP resource `terreno://docs/rtk`, and `terreno state --slice rtk` are removed; use `get_syncdb_state` and `terreno state`.
|
|
48
|
+
|
|
49
|
+
### Added
|
|
50
|
+
|
|
51
|
+
- `DataTable` columns size themselves when `width` is omitted. Each auto column starts at the wider of its header and its content (sampled from at most 50 rows, measured with a canvas on web and estimated on native), clamped to 80–360px, and auto columns grow to fill the table's container. Columns that set `width` keep it. `DataTableColumn.width` is now optional.
|
|
52
|
+
|
|
53
|
+
### Changed
|
|
54
|
+
|
|
55
|
+
- The repository's agent rules now generate with rulesync 17 (up from 9). The root rule `.rulesync/rules/00-root.md` now generates `AGENTS.md`, which Devin and other AGENTS.md readers load, in place of `.devin/rules/00-root.md`. Never edit `AGENTS.md` by hand: edit the root rule and run `bun run rules`. The examples that existed only in the old hand-edited `AGENTS.md` (syncdb and RTK SDK usage) moved into the root rule, so `CLAUDE.md`, the Cursor root rule, and Copilot instructions get them too. Links in the root rule now resolve from the repository root. Generated Copilot hooks use the portable `command` field. Generated Copilot subagents no longer list `agent/runSubagent` as their only tool, so they get every default tool. Generated skills carry their `license`, `disable-model-invocation`, and Devin `triggers` frontmatter.
|
|
56
|
+
- `@terreno/syncdb/auth` `SessionProvider`: `logout()` no longer clears the session before the server answers. The session stays in the state until `authClient.signOut()` finishes (`signOutTimeoutMs`, default 10 seconds), and then it is cleared. Meanwhile the new `isSigningOut` state (`useSession().isSigningOut`) is true; `isLoading` is left alone, so a navigator gated on it keeps its screen. Before, a login screen that opened at once could find the still-live session and sign the user straight back in. A sign-out that fails or times out checks the session first. A session that is still live, or a cookie or native session the server cannot be asked about, stays signed in, and `error` is set to `SIGN_OUT_FAILED_MESSAGE` ("Couldn't sign out. Check your connection and try again."). A web bearer client, which drops its token before the request leaves, ends signed out. The global `auth/logout` action (a refused session) now ends signed out even when the sign-out request fails. With `apisToReset` (57.17.0), `logout()` purges the cache when the session clears, not when it is dispatched: a purge at dispatch refetched every mounted screen mid-sign-out, and a refetch that could not reach the server answered 401 and signed the user out even though the sign-out failed. A failed sign-out keeps both the session and the cache. The global `auth/logout` action still purges at once (only the first of several in flight) and again when the session clears. A sign-in for another user that lands while a sign-out is in flight is kept; a sign-out that started signed out asks `getSession` first, so a restore of the session it revoked is cleared. Show `selectBetterAuthIsSigningOut` on the sign-out control and `selectBetterAuthError` after a failed sign-out.
|
|
57
|
+
|
|
58
|
+
### Removed
|
|
59
|
+
|
|
60
|
+
- `@terreno/ui` no longer exports the `Filter` and `FilterProps` aliases deprecated in 57.7.0. Import `DropdownPanel` and `DropdownPanelProps` instead. `FilterSelectMenu`, `FilterBoolean`, `FilterAccordion`, and `FilterChangesBadge` keep their names.
|
|
61
|
+
|
|
62
|
+
### Fixed
|
|
63
|
+
|
|
64
|
+
- `@terreno/syncdb`: logging out while `syncDb.start()` is still running no longer loses local writes or logs errors. `start()` now resolves the web encryption key from `GET /sync/key` before it loads the store, so the flush in `stop()` never needs the network after the session has ended. A `stop()` or `signOut()` call now cancels a `start()` that is running or queued ahead of it, so the transport never connects without a session. A failed key fetch is now retried on the next save instead of failing every save for the rest of the session.
|
|
65
|
+
|
|
23
66
|
## [57.21.0] - 2026-11-01
|
|
24
67
|
|
|
25
68
|
Upgrade note: [`mcp-server/src/docs/upgrades/57.21.0.md`](mcp-server/src/docs/upgrades/57.21.0.md).
|
package/dist/generate.d.ts
CHANGED
|
@@ -5,6 +5,13 @@ export declare const MONGOOSE_VERSION = "9.7.4";
|
|
|
5
5
|
export declare const MONGODB_VERSION = "7.2.0";
|
|
6
6
|
export declare const BSON_VERSION = "7.2.0";
|
|
7
7
|
export declare const PACKAGE_VERSION: string;
|
|
8
|
+
/** Better Auth client + Expo plugin, pinned together (the monorepo overrides both to 1.6.25). */
|
|
9
|
+
export declare const BETTER_AUTH_VERSION = "^1.6.25";
|
|
10
|
+
/**
|
|
11
|
+
* Regenerates `store/apiSdk.ts` (typed hooks for every non-synced route) from the running
|
|
12
|
+
* backend's OpenAPI spec with the `@terreno/syncdb` codegen.
|
|
13
|
+
*/
|
|
14
|
+
export declare const API_SDK_SCRIPT = "terreno-syncdb-codegen --schema ${OPENAPI_URL:-http://localhost:4000/openapi.json} --api-out ./store/apiSdk.ts";
|
|
8
15
|
export interface BootstrapArgs {
|
|
9
16
|
appName: string;
|
|
10
17
|
appDisplayName: string;
|
package/dist/generate.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../src/generate.ts"],"names":[],"mappings":"AAEA,8FAA8F;AAC9F,eAAO,MAAM,8BAA8B,WAAW,CAAC;AAEvD,2GAA2G;AAC3G,eAAO,MAAM,gBAAgB,UAAU,CAAC;AACxC,eAAO,MAAM,eAAe,UAAU,CAAC;AACvC,eAAO,MAAM,YAAY,UAAU,CAAC;AAEpC,eAAO,MAAM,eAAe,QAAsB,CAAC;AAGnD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../src/generate.ts"],"names":[],"mappings":"AAEA,8FAA8F;AAC9F,eAAO,MAAM,8BAA8B,WAAW,CAAC;AAEvD,2GAA2G;AAC3G,eAAO,MAAM,gBAAgB,UAAU,CAAC;AACxC,eAAO,MAAM,eAAe,UAAU,CAAC;AACvC,eAAO,MAAM,YAAY,UAAU,CAAC;AAEpC,eAAO,MAAM,eAAe,QAAsB,CAAC;AAGnD,iGAAiG;AACjG,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,cAAc,mHAEuF,CAAC;AAEnH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAg/ED,eAAO,MAAM,gBAAgB,GAAI,UAAU,MAAM,KAAG,MAcnD,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,MAAM,aAAa,KAAG,aAAa,EAsFnE,CAAC"}
|
package/dist/generate.js
CHANGED
|
@@ -7,6 +7,15 @@ export const MONGODB_VERSION = "7.2.0";
|
|
|
7
7
|
export const BSON_VERSION = "7.2.0";
|
|
8
8
|
export const PACKAGE_VERSION = packageJson.version;
|
|
9
9
|
const TERRENO_DEP_VERSION = `^${PACKAGE_VERSION}`;
|
|
10
|
+
/** Better Auth client + Expo plugin, pinned together (the monorepo overrides both to 1.6.25). */
|
|
11
|
+
export const BETTER_AUTH_VERSION = "^1.6.25";
|
|
12
|
+
/**
|
|
13
|
+
* Regenerates `store/apiSdk.ts` (typed hooks for every non-synced route) from the running
|
|
14
|
+
* backend's OpenAPI spec with the `@terreno/syncdb` codegen.
|
|
15
|
+
*/
|
|
16
|
+
export const API_SDK_SCRIPT =
|
|
17
|
+
// biome-ignore lint/suspicious/noTemplateCurlyInString: shell default expansion in a package.json script
|
|
18
|
+
"terreno-syncdb-codegen --schema ${OPENAPI_URL:-http://localhost:4000/openapi.json} --api-out ./store/apiSdk.ts";
|
|
10
19
|
const generateCursorRules = (args) => {
|
|
11
20
|
const { appDisplayName } = args;
|
|
12
21
|
return `# ${appDisplayName}
|
|
@@ -15,7 +24,7 @@ A full-stack application built with the Terreno framework.
|
|
|
15
24
|
|
|
16
25
|
## Project Structure
|
|
17
26
|
|
|
18
|
-
- **frontend/** - Expo/React Native frontend using @terreno/ui
|
|
27
|
+
- **frontend/** - Expo/React Native frontend using @terreno/ui and @terreno/syncdb (data, request client, generated API hooks, Better Auth session)
|
|
19
28
|
- **backend/** - Express/Mongoose backend using @terreno/api
|
|
20
29
|
|
|
21
30
|
## Development
|
|
@@ -28,7 +37,7 @@ cd backend && bun run dev # Start backend on port 4000
|
|
|
28
37
|
|
|
29
38
|
# Frontend
|
|
30
39
|
cd frontend && bun run web # Start web frontend
|
|
31
|
-
cd frontend && bun run sdk # Regenerate
|
|
40
|
+
cd frontend && bun run sdk # Regenerate store/apiSdk.ts after backend changes
|
|
32
41
|
\`\`\`
|
|
33
42
|
|
|
34
43
|
## Code Style
|
|
@@ -53,7 +62,7 @@ cd frontend && bun run sdk # Regenerate SDK after backend changes
|
|
|
53
62
|
- Use functional components with \`React.FC\` type
|
|
54
63
|
- Add explanatory comment above each \`useEffect\`
|
|
55
64
|
- Wrap callbacks in \`useCallback\`
|
|
56
|
-
- Use
|
|
65
|
+
- Use React context, local state, or \`useStoredState\` for app state (no Redux)
|
|
57
66
|
|
|
58
67
|
### Backend Conventions
|
|
59
68
|
- Use \`modelRouter\` for CRUD endpoints
|
|
@@ -63,9 +72,10 @@ cd frontend && bun run sdk # Regenerate SDK after backend changes
|
|
|
63
72
|
|
|
64
73
|
### Frontend Conventions
|
|
65
74
|
- Use \`@terreno/syncdb/react\` hooks (\`useQuery\`, \`useMutate\`) for synced collection CRUD
|
|
66
|
-
- Use generated
|
|
75
|
+
- Use generated hooks from \`@/store/apiSdk\` (\`useGetAuthMeQuery\`, \`usePatchAuthMeMutation\`, ...) for non-synced routes only
|
|
76
|
+
- Read the session with \`useSession()\` from \`@terreno/syncdb/auth\` (\`userId\`, \`isLoading\`, \`logout\`, \`refresh\`)
|
|
67
77
|
- Use @terreno/ui components (Box, Page, Button, TextField, etc.)
|
|
68
|
-
- Never modify \`
|
|
78
|
+
- Never modify \`apiSdk.ts\` manually - regenerate with \`bun run sdk\`
|
|
69
79
|
|
|
70
80
|
## AI Assistance
|
|
71
81
|
|
|
@@ -136,7 +146,7 @@ Full-stack Terreno app generated by [\`create-terreno-app\`](https://www.npmjs.c
|
|
|
136
146
|
## Project structure
|
|
137
147
|
|
|
138
148
|
- **backend/** — Express/Mongoose API (\`@terreno/api\`, Better Auth, admin, sync)
|
|
139
|
-
- **frontend/** — Expo universal app (\`@terreno/ui\`, \`@terreno/syncdb
|
|
149
|
+
- **frontend/** — Expo universal app (\`@terreno/ui\`, \`@terreno/syncdb\`)
|
|
140
150
|
|
|
141
151
|
## Local development
|
|
142
152
|
|
|
@@ -169,7 +179,7 @@ cd backend && bun run dev
|
|
|
169
179
|
cd frontend && bun run web
|
|
170
180
|
\`\`\`
|
|
171
181
|
|
|
172
|
-
After backend route changes, regenerate the
|
|
182
|
+
After backend route changes, regenerate the typed API hooks in \`frontend/store/apiSdk.ts\` (the backend must be running):
|
|
173
183
|
|
|
174
184
|
\`\`\`bash
|
|
175
185
|
cd frontend && bun run sdk
|
|
@@ -287,7 +297,7 @@ cd backend && bun run dev
|
|
|
287
297
|
# Start frontend (port 8082)
|
|
288
298
|
cd frontend && bun run web
|
|
289
299
|
|
|
290
|
-
# Regenerate
|
|
300
|
+
# Regenerate frontend/store/apiSdk.ts after backend changes (backend running)
|
|
291
301
|
cd frontend && bun run sdk
|
|
292
302
|
\`\`\`
|
|
293
303
|
|
|
@@ -296,7 +306,7 @@ cd frontend && bun run sdk
|
|
|
296
306
|
1. Create model in \`backend/src/models/\`
|
|
297
307
|
2. Create route in \`backend/src/api/\`
|
|
298
308
|
3. Register route in \`backend/src/server.ts\`
|
|
299
|
-
4. Regenerate
|
|
309
|
+
4. Regenerate API hooks: \`cd frontend && bun run sdk\` (writes \`store/apiSdk.ts\`)
|
|
300
310
|
5. Create screens in \`frontend/app/\`
|
|
301
311
|
|
|
302
312
|
## Code Style
|
|
@@ -514,6 +524,7 @@ export const start = async (skipListen = false): Promise<express.Application> =>
|
|
|
514
524
|
organizations: {
|
|
515
525
|
settingsSchema: organizationSettingsSchema,
|
|
516
526
|
},
|
|
527
|
+
rateLimit: isDeployed ? {trustProxy: 1} : false,
|
|
517
528
|
skipListen,
|
|
518
529
|
// noExplicitAny: User model type mismatch
|
|
519
530
|
// biome-ignore lint/suspicious/noExplicitAny: User model type mismatch
|
|
@@ -1211,37 +1222,34 @@ const generateFrontendPackageJson = (args) => {
|
|
|
1211
1222
|
const { appName } = args;
|
|
1212
1223
|
return JSON.stringify({
|
|
1213
1224
|
dependencies: {
|
|
1225
|
+
"@better-auth/expo": BETTER_AUTH_VERSION,
|
|
1214
1226
|
"@expo/vector-icons": "^15.1.1",
|
|
1215
1227
|
"@react-native-async-storage/async-storage": "2.2.0",
|
|
1216
|
-
"@reduxjs/toolkit": "^2.11.1",
|
|
1217
1228
|
"@sentry/react": "^10.29.0",
|
|
1218
1229
|
"@terreno/admin-frontend": TERRENO_DEP_VERSION,
|
|
1219
|
-
"@terreno/rtk": TERRENO_DEP_VERSION,
|
|
1220
1230
|
"@terreno/syncdb": TERRENO_DEP_VERSION,
|
|
1221
1231
|
"@terreno/ui": TERRENO_DEP_VERSION,
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
"expo-
|
|
1225
|
-
"expo-
|
|
1232
|
+
"better-auth": BETTER_AUTH_VERSION,
|
|
1233
|
+
expo: "~58.0.14",
|
|
1234
|
+
"expo-constants": "~58.0.12",
|
|
1235
|
+
"expo-network": "~58.0.3",
|
|
1236
|
+
"expo-router": "~58.0.23",
|
|
1237
|
+
"expo-secure-store": "~58.0.2",
|
|
1238
|
+
"expo-sqlite": "~58.0.13",
|
|
1226
1239
|
lodash: "^4.18.1",
|
|
1227
1240
|
luxon: "^3.7.2",
|
|
1228
|
-
react: "19.
|
|
1229
|
-
"react-dom": "19.
|
|
1230
|
-
"react-native": "0.
|
|
1231
|
-
"react-native-reanimated": "4.
|
|
1232
|
-
"react-redux": "^9.2.0",
|
|
1233
|
-
"redux-persist": "^6.0.0",
|
|
1241
|
+
react: "19.3.0",
|
|
1242
|
+
"react-dom": "19.3.0",
|
|
1243
|
+
"react-native": "0.88.0",
|
|
1244
|
+
"react-native-reanimated": "4.7.1",
|
|
1234
1245
|
},
|
|
1235
1246
|
devDependencies: {
|
|
1236
1247
|
"@biomejs/biome": "^2.3.6",
|
|
1237
1248
|
"@playwright/test": "^1.58.2",
|
|
1238
|
-
"@rtk-query/codegen-openapi": "^2.2.0",
|
|
1239
1249
|
"@types/bun": "^1.4.0",
|
|
1240
1250
|
"@types/lodash": "^4.17.17",
|
|
1241
1251
|
"@types/luxon": "^3.7.1",
|
|
1242
|
-
"@types/react": "~19.
|
|
1243
|
-
"ts-node": "^10.9.2",
|
|
1244
|
-
tsx: "^4.23.12",
|
|
1252
|
+
"@types/react": "~19.3.0",
|
|
1245
1253
|
typescript: "~6.0.3",
|
|
1246
1254
|
},
|
|
1247
1255
|
main: "expo-router/entry",
|
|
@@ -1249,12 +1257,13 @@ const generateFrontendPackageJson = (args) => {
|
|
|
1249
1257
|
private: true,
|
|
1250
1258
|
scripts: {
|
|
1251
1259
|
android: "EXPO_UNSTABLE_MCP_SERVER=1 bun expo start --android --port 8082",
|
|
1260
|
+
"api-sdk": API_SDK_SCRIPT,
|
|
1252
1261
|
compile: "tsc",
|
|
1253
1262
|
ios: "EXPO_UNSTABLE_MCP_SERVER=1 bun expo start --ios --port 8082",
|
|
1254
1263
|
lint: "bun biome check .",
|
|
1255
1264
|
"lint:fix": "bun biome check --write .",
|
|
1256
1265
|
"lint:unsafefix": "biome check --write . --unsafe",
|
|
1257
|
-
sdk: "bun
|
|
1266
|
+
sdk: "bun run api-sdk",
|
|
1258
1267
|
start: "EXPO_UNSTABLE_MCP_SERVER=1 bun expo start --port 8082",
|
|
1259
1268
|
test: "bun test",
|
|
1260
1269
|
web: "EXPO_UNSTABLE_MCP_SERVER=1 bun expo start --web --port 8082",
|
|
@@ -1298,7 +1307,6 @@ const generateFrontendTsConfig = () => {
|
|
|
1298
1307
|
paths: {
|
|
1299
1308
|
"@/*": ["./*"],
|
|
1300
1309
|
"@components/*": ["./components/*"],
|
|
1301
|
-
"@store": ["./store/index"],
|
|
1302
1310
|
"@store/*": ["./store/*"],
|
|
1303
1311
|
"@utils": ["./utils/index"],
|
|
1304
1312
|
"@utils/*": ["./utils/*"],
|
|
@@ -1348,17 +1356,6 @@ config.resolver.resolveRequest = (context, moduleName, platform) => {
|
|
|
1348
1356
|
module.exports = config;
|
|
1349
1357
|
`;
|
|
1350
1358
|
};
|
|
1351
|
-
const generateFrontendTsConfigCodegen = () => {
|
|
1352
|
-
return JSON.stringify({
|
|
1353
|
-
compilerOptions: {
|
|
1354
|
-
module: "commonjs",
|
|
1355
|
-
moduleResolution: "bundler",
|
|
1356
|
-
skipLibCheck: true,
|
|
1357
|
-
strict: true,
|
|
1358
|
-
target: "es2022",
|
|
1359
|
-
},
|
|
1360
|
-
}, null, 2);
|
|
1361
|
-
};
|
|
1362
1359
|
const generateFrontendBiomeJsonc = () => {
|
|
1363
1360
|
return `{
|
|
1364
1361
|
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
|
|
@@ -1442,126 +1439,146 @@ const generateFrontendBiomeJsonc = () => {
|
|
|
1442
1439
|
}
|
|
1443
1440
|
`;
|
|
1444
1441
|
};
|
|
1445
|
-
const
|
|
1446
|
-
return
|
|
1442
|
+
const generateFrontendApiClient = () => {
|
|
1443
|
+
return `/**
|
|
1444
|
+
* Request client for every non-synced backend route (\`/auth/me\`, modelRouter actions, admin).
|
|
1445
|
+
* Synced collections go through \`syncDb\` instead. Generated hooks in \`store/apiSdk.ts\` use the
|
|
1446
|
+
* client that \`ApiClientProvider\` (in \`app/_layout.tsx\`) puts in context.
|
|
1447
|
+
*/
|
|
1448
|
+
import {type ApiClient, createApiClient} from "@terreno/syncdb/api";
|
|
1449
|
+
import {appHeaders, baseUrl} from "@terreno/syncdb/config";
|
|
1450
|
+
import {authProvider} from "@/store/syncdb";
|
|
1447
1451
|
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
apiImport: "emptySplitApi",
|
|
1451
|
-
argSuffix: "Args",
|
|
1452
|
-
exportName: "openapi",
|
|
1453
|
-
flattenArg: true,
|
|
1454
|
-
hooks: true,
|
|
1455
|
-
outputFile: "./store/openApiSdk.ts",
|
|
1456
|
-
responseSuffix: "Res",
|
|
1457
|
-
schemaFile: process.env.OPENAPI_URL ?? "http://localhost:4000/openapi.json",
|
|
1458
|
-
tag: true,
|
|
1459
|
-
};
|
|
1452
|
+
/** Failures callers already handle (signed out, missing rows) are not worth a warning. */
|
|
1453
|
+
const QUIET_STATUSES = new Set([401, 404]);
|
|
1460
1454
|
|
|
1461
|
-
export
|
|
1455
|
+
export const apiClient: ApiClient = createApiClient({
|
|
1456
|
+
authProvider,
|
|
1457
|
+
baseUrl,
|
|
1458
|
+
credentials: "include",
|
|
1459
|
+
headers: appHeaders,
|
|
1460
|
+
onError: (error, args): void => {
|
|
1461
|
+
if (QUIET_STATUSES.has(error.status)) {
|
|
1462
|
+
return;
|
|
1463
|
+
}
|
|
1464
|
+
console.warn(\`\${args.method ?? "GET"} \${args.url} failed: \${error.message}\`);
|
|
1465
|
+
},
|
|
1466
|
+
});
|
|
1467
|
+
|
|
1468
|
+
/** Bearer header for \`@terreno/admin-frontend\`'s \`AdminProvider\` fetch client. */
|
|
1469
|
+
export const getAdminAuthHeaders = async (): Promise<Record<string, string>> => {
|
|
1470
|
+
const token = await authProvider.getToken();
|
|
1471
|
+
if (!token) {
|
|
1472
|
+
return {};
|
|
1473
|
+
}
|
|
1474
|
+
return {Authorization: \`Bearer \${token}\`};
|
|
1475
|
+
};
|
|
1462
1476
|
`;
|
|
1463
1477
|
};
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1478
|
+
/**
|
|
1479
|
+
* Starter `store/apiSdk.ts`: the `/auth/me` hooks the profile screen uses, in the exact shape
|
|
1480
|
+
* `terreno-syncdb-codegen --api-out` emits. `bun run sdk` replaces it with hooks for every
|
|
1481
|
+
* non-synced route the running backend serves.
|
|
1482
|
+
*/
|
|
1483
|
+
const generateFrontendApiSdk = () => {
|
|
1484
|
+
return `// GENERATED by @terreno/syncdb (terreno-syncdb-codegen --api-out). Do not edit.
|
|
1485
|
+
// Typed request hooks for every non-synced @terreno/api route. Synced collections use the
|
|
1486
|
+
// collection hooks from the sync SDK instead. Run \`bun run sdk\` with the backend running to
|
|
1487
|
+
// regenerate this file from its OpenAPI spec.
|
|
1488
|
+
// biome-ignore-all lint/suspicious/noConfusingVoidType: no-argument operations type their argument as void so callers can omit it
|
|
1489
|
+
|
|
1490
|
+
import type {ApiRequestArgs} from "@terreno/syncdb/api";
|
|
1491
|
+
import {
|
|
1492
|
+
type UseApiMutationOptions,
|
|
1493
|
+
type UseApiMutationResult,
|
|
1494
|
+
type UseApiQueryOptions,
|
|
1495
|
+
type UseApiQueryResult,
|
|
1496
|
+
type UseLazyApiQueryOptions,
|
|
1497
|
+
type UseLazyApiQueryResult,
|
|
1498
|
+
useApiMutation,
|
|
1499
|
+
useApiQuery,
|
|
1500
|
+
useLazyApiQuery,
|
|
1501
|
+
} from "@terreno/syncdb/react";
|
|
1502
|
+
|
|
1503
|
+
type ApiSdkQueryOptions<T> = Omit<UseApiQueryOptions<T, T>, "providesTags" | "transformResponse">;
|
|
1504
|
+
type ApiSdkLazyOptions<T> = Omit<UseLazyApiQueryOptions<T, never>, "providesTags" | "toRequest">;
|
|
1505
|
+
|
|
1506
|
+
export type GetAuthMeArgs = void;
|
|
1507
|
+
|
|
1508
|
+
export type GetAuthMeRes = {
|
|
1509
|
+
admin?: boolean;
|
|
1510
|
+
email: string;
|
|
1511
|
+
name?: string;
|
|
1512
|
+
_id: string;
|
|
1513
|
+
id: string;
|
|
1514
|
+
created?: string;
|
|
1515
|
+
updated?: string;
|
|
1501
1516
|
};
|
|
1502
1517
|
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
}
|
|
1518
|
+
export const getAuthMeRequest = (): ApiRequestArgs => ({
|
|
1519
|
+
method: "GET",
|
|
1520
|
+
url: \`/auth/me\`,
|
|
1521
|
+
});
|
|
1507
1522
|
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1523
|
+
/** Get the current user */
|
|
1524
|
+
export const useGetAuthMeQuery = (
|
|
1525
|
+
_arg?: GetAuthMeArgs,
|
|
1526
|
+
options: ApiSdkQueryOptions<GetAuthMeRes> = {}
|
|
1527
|
+
): UseApiQueryResult<GetAuthMeRes> =>
|
|
1528
|
+
useApiQuery<GetAuthMeRes>(getAuthMeRequest(), {...options, providesTags: ["auth"]});
|
|
1529
|
+
|
|
1530
|
+
export const useLazyGetAuthMeQuery = (
|
|
1531
|
+
options: ApiSdkLazyOptions<GetAuthMeRes> = {}
|
|
1532
|
+
): UseLazyApiQueryResult<GetAuthMeRes, GetAuthMeArgs> =>
|
|
1533
|
+
useLazyApiQuery<GetAuthMeRes, GetAuthMeArgs>({
|
|
1534
|
+
...options,
|
|
1535
|
+
providesTags: ["auth"],
|
|
1536
|
+
toRequest: (): ApiRequestArgs => getAuthMeRequest(),
|
|
1537
|
+
});
|
|
1520
1538
|
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
"// biome-ignore-all lint/suspicious/noExplicitAny: types are generated from backend OpenAPI schemas\\n" +
|
|
1527
|
-
content;
|
|
1528
|
-
}
|
|
1529
|
-
writeFileSync(sdkPath, content, "utf8");
|
|
1530
|
-
}
|
|
1539
|
+
export type PatchAuthMeArgs = {
|
|
1540
|
+
currentPassword?: string;
|
|
1541
|
+
email?: string;
|
|
1542
|
+
name?: string;
|
|
1543
|
+
};
|
|
1531
1544
|
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
+
export type PatchAuthMeRes = GetAuthMeRes;
|
|
1546
|
+
|
|
1547
|
+
export const patchAuthMeRequest = (arg: PatchAuthMeArgs): ApiRequestArgs => ({
|
|
1548
|
+
body: arg,
|
|
1549
|
+
method: "PATCH",
|
|
1550
|
+
url: \`/auth/me\`,
|
|
1551
|
+
});
|
|
1552
|
+
|
|
1553
|
+
/** Update the current user */
|
|
1554
|
+
export const usePatchAuthMeMutation = (
|
|
1555
|
+
options: UseApiMutationOptions<PatchAuthMeArgs, PatchAuthMeRes> = {}
|
|
1556
|
+
): UseApiMutationResult<PatchAuthMeArgs, PatchAuthMeRes> =>
|
|
1557
|
+
useApiMutation<PatchAuthMeArgs, PatchAuthMeRes>(patchAuthMeRequest, {
|
|
1558
|
+
invalidatesTags: ["auth"],
|
|
1559
|
+
...options,
|
|
1560
|
+
});
|
|
1545
1561
|
`;
|
|
1546
1562
|
};
|
|
1547
1563
|
const generateFrontendRootLayout = (_args) => {
|
|
1548
|
-
return `import {
|
|
1564
|
+
return `import {SessionProvider, useSession} from "@terreno/syncdb/auth";
|
|
1565
|
+
import {baseUrl} from "@terreno/syncdb/config";
|
|
1566
|
+
import {ApiClientProvider, SyncDbProvider} from "@terreno/syncdb/react";
|
|
1567
|
+
import {Spinner, TerrenoProvider} from "@terreno/ui";
|
|
1549
1568
|
import {Stack} from "expo-router";
|
|
1569
|
+
import {DefaultTheme, ThemeProvider} from "expo-router/react-navigation";
|
|
1570
|
+
import type React from "react";
|
|
1550
1571
|
import {useEffect} from "react";
|
|
1551
1572
|
import "react-native-reanimated";
|
|
1552
|
-
import {
|
|
1553
|
-
import {
|
|
1554
|
-
import {
|
|
1555
|
-
import {Spinner, TerrenoProvider} from "@terreno/ui";
|
|
1556
|
-
import {Provider, useSelector} from "react-redux";
|
|
1557
|
-
import {PersistGate} from "redux-persist/integration/react";
|
|
1558
|
-
import store, {persistor, syncBetterAuthSession} from "@/store/index";
|
|
1573
|
+
import {installDevConsoleLogger} from "@terreno/syncdb/app";
|
|
1574
|
+
import {betterAuthClient} from "@/lib/betterAuth";
|
|
1575
|
+
import {apiClient} from "@/store/apiClient";
|
|
1559
1576
|
import {setSyncDbReady, syncDb} from "@/store/syncdb";
|
|
1560
1577
|
|
|
1561
1578
|
// Dev-only: forwards console errors/warnings and uncaught errors to the backend's
|
|
1562
1579
|
// POST /__terreno/browser-logs so terreno-mcp-local \`read_logs\` / \`last_error\` can read them.
|
|
1563
1580
|
// No-op outside __DEV__.
|
|
1564
|
-
|
|
1581
|
+
installDevConsoleLogger({baseUrl});
|
|
1565
1582
|
|
|
1566
1583
|
export {ErrorBoundary} from "expo-router";
|
|
1567
1584
|
|
|
@@ -1569,30 +1586,34 @@ export const unstable_settings = {
|
|
|
1569
1586
|
initialRouteName: "(tabs)",
|
|
1570
1587
|
};
|
|
1571
1588
|
|
|
1589
|
+
// Logging out signs syncDb out (stop + wipe) and drops cached API responses so the next
|
|
1590
|
+
// user never sees the previous user's data.
|
|
1591
|
+
const SYNC_DBS = [syncDb];
|
|
1592
|
+
|
|
1572
1593
|
// TerrenoProvider loads the Nunito/Titillium Web families @terreno/ui renders with, so this
|
|
1573
1594
|
// app ships no font assets of its own. Add \`useFonts\` here only for extra custom faces.
|
|
1574
|
-
|
|
1595
|
+
// SessionProvider owns the Better Auth session (\`useSession()\`); ApiClientProvider gives the
|
|
1596
|
+
// generated hooks in store/apiSdk.ts their request client. No Redux store.
|
|
1597
|
+
export default function RootLayout(): React.ReactElement {
|
|
1575
1598
|
return (
|
|
1576
|
-
<
|
|
1577
|
-
<
|
|
1578
|
-
<
|
|
1599
|
+
<TerrenoProvider openAPISpecUrl={\`\${baseUrl}/openapi.json\`}>
|
|
1600
|
+
<ApiClientProvider client={apiClient}>
|
|
1601
|
+
<SessionProvider
|
|
1602
|
+
authClient={betterAuthClient}
|
|
1603
|
+
onLogout={apiClient.reset}
|
|
1604
|
+
syncDbs={SYNC_DBS}
|
|
1605
|
+
>
|
|
1579
1606
|
<RootLayoutNav />
|
|
1580
|
-
</
|
|
1581
|
-
</
|
|
1582
|
-
</
|
|
1607
|
+
</SessionProvider>
|
|
1608
|
+
</ApiClientProvider>
|
|
1609
|
+
</TerrenoProvider>
|
|
1583
1610
|
);
|
|
1584
1611
|
}
|
|
1585
1612
|
|
|
1586
1613
|
function RootLayoutNav(): React.ReactElement {
|
|
1587
|
-
const userId =
|
|
1588
|
-
const isAuthLoading = useSelector(selectBetterAuthIsLoading);
|
|
1589
|
-
|
|
1590
|
-
// Hydrate Better Auth session into Redux on startup.
|
|
1591
|
-
useEffect(() => {
|
|
1592
|
-
void syncBetterAuthSession(store.dispatch);
|
|
1593
|
-
}, []);
|
|
1614
|
+
const {userId, isLoading: isAuthLoading} = useSession();
|
|
1594
1615
|
|
|
1595
|
-
// Start syncdb after login; stop on logout.
|
|
1616
|
+
// Start syncdb after login; stop on logout or user switch.
|
|
1596
1617
|
useEffect(() => {
|
|
1597
1618
|
if (!userId) {
|
|
1598
1619
|
setSyncDbReady(false);
|
|
@@ -1644,12 +1665,11 @@ function RootLayoutNav(): React.ReactElement {
|
|
|
1644
1665
|
`;
|
|
1645
1666
|
};
|
|
1646
1667
|
const generateFrontendLogin = () => {
|
|
1647
|
-
return `import {TerrenoLoginScreen} from "@terreno/
|
|
1668
|
+
return `import {TerrenoLoginScreen, useSession} from "@terreno/syncdb/auth";
|
|
1648
1669
|
import {useLocalSearchParams, useRouter} from "expo-router";
|
|
1649
1670
|
import type React from "react";
|
|
1650
1671
|
import {useCallback} from "react";
|
|
1651
1672
|
import {betterAuthClient, rememberedAccounts} from "@/lib/betterAuth";
|
|
1652
|
-
import {syncBetterAuthSession, useAppDispatch} from "@/store/index";
|
|
1653
1673
|
|
|
1654
1674
|
/**
|
|
1655
1675
|
* Renders only the sign-in methods the server's /terreno/methods turns on. A social sign-in
|
|
@@ -1658,13 +1678,14 @@ import {syncBetterAuthSession, useAppDispatch} from "@/store/index";
|
|
|
1658
1678
|
*/
|
|
1659
1679
|
const Login: React.FC = () => {
|
|
1660
1680
|
const router = useRouter();
|
|
1661
|
-
const
|
|
1681
|
+
const {refresh} = useSession();
|
|
1662
1682
|
const {error} = useLocalSearchParams<{error?: string}>();
|
|
1663
1683
|
|
|
1664
1684
|
const handleSignedIn = useCallback(async (): Promise<void> => {
|
|
1665
|
-
|
|
1685
|
+
// Resolve the new session now instead of waiting for the next session push.
|
|
1686
|
+
await refresh();
|
|
1666
1687
|
router.replace("/(tabs)");
|
|
1667
|
-
}, [
|
|
1688
|
+
}, [refresh, router]);
|
|
1668
1689
|
|
|
1669
1690
|
const handleSignUpPress = useCallback((): void => {
|
|
1670
1691
|
router.push("/signup");
|
|
@@ -1689,7 +1710,7 @@ export default Login;
|
|
|
1689
1710
|
`;
|
|
1690
1711
|
};
|
|
1691
1712
|
const generateFrontendSettingsSecurity = () => {
|
|
1692
|
-
return `import {TerrenoAccountSecurityScreen} from "@terreno/
|
|
1713
|
+
return `import {TerrenoAccountSecurityScreen} from "@terreno/syncdb/auth";
|
|
1693
1714
|
import {useLocalSearchParams} from "expo-router";
|
|
1694
1715
|
import type React from "react";
|
|
1695
1716
|
import {betterAuthClient} from "@/lib/betterAuth";
|
|
@@ -1714,16 +1735,16 @@ export default SecurityScreen;
|
|
|
1714
1735
|
`;
|
|
1715
1736
|
};
|
|
1716
1737
|
const generateFrontendSignup = () => {
|
|
1717
|
-
return `import {
|
|
1738
|
+
return `import {useSession} from "@terreno/syncdb/auth";
|
|
1739
|
+
import {SignUpScreen, simplePasswordRequirements} from "@terreno/ui";
|
|
1718
1740
|
import {useRouter} from "expo-router";
|
|
1719
1741
|
import type React from "react";
|
|
1720
1742
|
import {useCallback, useState} from "react";
|
|
1721
1743
|
import {betterAuthClient} from "@/lib/betterAuth";
|
|
1722
|
-
import {syncBetterAuthSession, useAppDispatch} from "@/store/index";
|
|
1723
1744
|
|
|
1724
1745
|
const SignUp: React.FC = () => {
|
|
1725
1746
|
const router = useRouter();
|
|
1726
|
-
const
|
|
1747
|
+
const {refresh} = useSession();
|
|
1727
1748
|
const [errorMessage, setErrorMessage] = useState<string | undefined>(undefined);
|
|
1728
1749
|
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
1729
1750
|
|
|
@@ -1738,7 +1759,8 @@ const SignUp: React.FC = () => {
|
|
|
1738
1759
|
setErrorMessage(result.error.message ?? "Sign up failed.");
|
|
1739
1760
|
return;
|
|
1740
1761
|
}
|
|
1741
|
-
|
|
1762
|
+
// Resolve the new session now instead of waiting for the next session push.
|
|
1763
|
+
await refresh();
|
|
1742
1764
|
router.replace("/(tabs)");
|
|
1743
1765
|
} catch {
|
|
1744
1766
|
setErrorMessage("Sign up failed. Please try again.");
|
|
@@ -1746,7 +1768,7 @@ const SignUp: React.FC = () => {
|
|
|
1746
1768
|
setIsSubmitting(false);
|
|
1747
1769
|
}
|
|
1748
1770
|
},
|
|
1749
|
-
[
|
|
1771
|
+
[refresh, router]
|
|
1750
1772
|
);
|
|
1751
1773
|
|
|
1752
1774
|
return (
|
|
@@ -1775,11 +1797,16 @@ import {Tabs} from "expo-router";
|
|
|
1775
1797
|
import type React from "react";
|
|
1776
1798
|
import type {ColorValue} from "react-native";
|
|
1777
1799
|
|
|
1800
|
+
type IconColor = React.ComponentProps<typeof FontAwesome>["color"];
|
|
1801
|
+
|
|
1778
1802
|
const TabBarIcon: React.FC<{
|
|
1779
1803
|
name: React.ComponentProps<typeof FontAwesome>["name"];
|
|
1780
1804
|
color: ColorValue;
|
|
1781
1805
|
}> = ({name, color}) => {
|
|
1782
|
-
|
|
1806
|
+
// React Native 0.88's ColorValue also admits number and null; tab tints are theme strings.
|
|
1807
|
+
return (
|
|
1808
|
+
<FontAwesome color={color as IconColor} name={name} size={24} style={{marginBottom: -3}} />
|
|
1809
|
+
);
|
|
1783
1810
|
};
|
|
1784
1811
|
|
|
1785
1812
|
const TabLayout: React.FC = () => {
|
|
@@ -1845,26 +1872,23 @@ export default HomeScreen;
|
|
|
1845
1872
|
`;
|
|
1846
1873
|
};
|
|
1847
1874
|
const generateFrontendTabsProfile = () => {
|
|
1848
|
-
return `import {
|
|
1875
|
+
return `import {useSession} from "@terreno/syncdb/auth";
|
|
1876
|
+
import {Box, Button, Card, Heading, Page, Spinner, TapToEdit, Text, TextField} from "@terreno/ui";
|
|
1849
1877
|
import {useRouter} from "expo-router";
|
|
1850
1878
|
import type React from "react";
|
|
1851
1879
|
import {useCallback, useEffect, useMemo, useState} from "react";
|
|
1852
|
-
import {
|
|
1853
|
-
import {logout, syncBetterAuthSession, useAppDispatch} from "@/store/index";
|
|
1854
|
-
import {useGetMeQuery, usePatchMeMutation} from "@/store/sdk";
|
|
1880
|
+
import {useGetAuthMeQuery, usePatchAuthMeMutation} from "@/store/apiSdk";
|
|
1855
1881
|
|
|
1856
1882
|
const ProfileScreen: React.FC = () => {
|
|
1857
|
-
const
|
|
1883
|
+
const {logout} = useSession();
|
|
1858
1884
|
const router = useRouter();
|
|
1859
|
-
const {data:
|
|
1860
|
-
const [updateProfile] =
|
|
1885
|
+
const {data: user, isLoading} = useGetAuthMeQuery();
|
|
1886
|
+
const [updateProfile] = usePatchAuthMeMutation();
|
|
1861
1887
|
const [name, setName] = useState<string>("");
|
|
1862
1888
|
const [email, setEmail] = useState<string>("");
|
|
1863
1889
|
const [currentPassword, setCurrentPassword] = useState<string>("");
|
|
1864
1890
|
const [saveError, setSaveError] = useState<string | null>(null);
|
|
1865
1891
|
|
|
1866
|
-
const user = profile;
|
|
1867
|
-
|
|
1868
1892
|
// Copy the server name into local state without resetting an in-progress email edit.
|
|
1869
1893
|
useEffect(() => {
|
|
1870
1894
|
if (!user) {
|
|
@@ -1881,11 +1905,10 @@ const ProfileScreen: React.FC = () => {
|
|
|
1881
1905
|
setEmail(user.email || "");
|
|
1882
1906
|
}, [user?.email]);
|
|
1883
1907
|
|
|
1908
|
+
// logout signs out Better Auth, then syncDb, and clears cached API responses.
|
|
1884
1909
|
const handleLogout = useCallback(async (): Promise<void> => {
|
|
1885
|
-
await
|
|
1886
|
-
|
|
1887
|
-
await syncBetterAuthSession(dispatch);
|
|
1888
|
-
}, [dispatch]);
|
|
1910
|
+
await logout();
|
|
1911
|
+
}, [logout]);
|
|
1889
1912
|
|
|
1890
1913
|
const handleOpenSecurity = useCallback((): void => {
|
|
1891
1914
|
router.push("/settings/security");
|
|
@@ -1991,11 +2014,24 @@ export default ProfileScreen;
|
|
|
1991
2014
|
`;
|
|
1992
2015
|
};
|
|
1993
2016
|
const generateFrontendAdminLayout = () => {
|
|
1994
|
-
return `import {
|
|
2017
|
+
return `import {AdminProvider} from "@terreno/admin-frontend";
|
|
2018
|
+
import {baseUrl} from "@terreno/syncdb/config";
|
|
2019
|
+
import {Stack} from "expo-router";
|
|
1995
2020
|
import type React from "react";
|
|
2021
|
+
import {getAdminAuthHeaders} from "@/store/apiClient";
|
|
1996
2022
|
|
|
2023
|
+
// AdminProvider binds every admin request to the API origin and the Better Auth session.
|
|
1997
2024
|
const AdminLayout: React.FC = () => {
|
|
1998
|
-
return
|
|
2025
|
+
return (
|
|
2026
|
+
<AdminProvider
|
|
2027
|
+
apiBase="/admin"
|
|
2028
|
+
apiOrigin={baseUrl}
|
|
2029
|
+
getAuthHeaders={getAdminAuthHeaders}
|
|
2030
|
+
routeBase="/admin"
|
|
2031
|
+
>
|
|
2032
|
+
<Stack screenOptions={{headerShown: false}} />
|
|
2033
|
+
</AdminProvider>
|
|
2034
|
+
);
|
|
1999
2035
|
};
|
|
2000
2036
|
|
|
2001
2037
|
export default AdminLayout;
|
|
@@ -2004,16 +2040,9 @@ export default AdminLayout;
|
|
|
2004
2040
|
const generateFrontendAdminIndex = () => {
|
|
2005
2041
|
return `import {AdminModelList} from "@terreno/admin-frontend";
|
|
2006
2042
|
import type React from "react";
|
|
2007
|
-
import {adminTerrenoApi} from "@/store/sdk";
|
|
2008
2043
|
|
|
2009
2044
|
const AdminListScreen: React.FC = () => {
|
|
2010
|
-
return
|
|
2011
|
-
<AdminModelList
|
|
2012
|
-
api={adminTerrenoApi}
|
|
2013
|
-
baseUrl="/admin"
|
|
2014
|
-
configurationPath="/admin/configuration"
|
|
2015
|
-
/>
|
|
2016
|
-
);
|
|
2045
|
+
return <AdminModelList baseUrl="/admin" configurationPath="/admin/configuration" />;
|
|
2017
2046
|
};
|
|
2018
2047
|
|
|
2019
2048
|
export default AdminListScreen;
|
|
@@ -2022,10 +2051,9 @@ export default AdminListScreen;
|
|
|
2022
2051
|
const generateFrontendAdminConfiguration = () => {
|
|
2023
2052
|
return `import {ConfigurationScreen} from "@terreno/admin-frontend";
|
|
2024
2053
|
import type React from "react";
|
|
2025
|
-
import {adminTerrenoApi} from "@/store/sdk";
|
|
2026
2054
|
|
|
2027
2055
|
const ConfigurationPage: React.FC = () => {
|
|
2028
|
-
return <ConfigurationScreen
|
|
2056
|
+
return <ConfigurationScreen />;
|
|
2029
2057
|
};
|
|
2030
2058
|
|
|
2031
2059
|
export default ConfigurationPage;
|
|
@@ -2055,315 +2083,6 @@ const NotFoundScreen: React.FC = () => {
|
|
|
2055
2083
|
export default NotFoundScreen;
|
|
2056
2084
|
`;
|
|
2057
2085
|
};
|
|
2058
|
-
const generateFrontendStoreIndex = () => {
|
|
2059
|
-
return `import AsyncStorage from "@react-native-async-storage/async-storage";
|
|
2060
|
-
import {combineReducers, configureStore, type Store} from "@reduxjs/toolkit";
|
|
2061
|
-
import {
|
|
2062
|
-
type BetterAuthClientInterface,
|
|
2063
|
-
generateBetterAuthSlice,
|
|
2064
|
-
registerTerrenoDevStore,
|
|
2065
|
-
setTokenSource,
|
|
2066
|
-
} from "@terreno/rtk";
|
|
2067
|
-
import {DateTime} from "luxon";
|
|
2068
|
-
import {useDispatch} from "react-redux";
|
|
2069
|
-
import type {Storage} from "redux-persist";
|
|
2070
|
-
import {persistReducer, persistStore} from "redux-persist";
|
|
2071
|
-
import {betterAuthClient} from "@/lib/betterAuth";
|
|
2072
|
-
|
|
2073
|
-
import appState from "./appState";
|
|
2074
|
-
import {rtkQueryErrorMiddleware} from "./errors";
|
|
2075
|
-
import {terrenoApi} from "./sdk";
|
|
2076
|
-
import {authProvider} from "./syncdb";
|
|
2077
|
-
|
|
2078
|
-
// Registered before the store exists, so the first RTK request already reads the Better Auth
|
|
2079
|
-
// token instead of rtk's default JWT source.
|
|
2080
|
-
setTokenSource(authProvider);
|
|
2081
|
-
|
|
2082
|
-
const betterAuth = generateBetterAuthSlice({
|
|
2083
|
-
authClient: betterAuthClient as unknown as BetterAuthClientInterface,
|
|
2084
|
-
});
|
|
2085
|
-
|
|
2086
|
-
export const logout = betterAuth.actions.logout;
|
|
2087
|
-
export const syncBetterAuthSession = betterAuth.syncSession;
|
|
2088
|
-
|
|
2089
|
-
const createSafeStorage = (): Storage => {
|
|
2090
|
-
return {
|
|
2091
|
-
getItem: async (key: string): Promise<string | null> => {
|
|
2092
|
-
if (typeof window !== "undefined") {
|
|
2093
|
-
return AsyncStorage.getItem(key);
|
|
2094
|
-
}
|
|
2095
|
-
return null;
|
|
2096
|
-
},
|
|
2097
|
-
removeItem: async (key: string): Promise<void> => {
|
|
2098
|
-
if (typeof window !== "undefined") {
|
|
2099
|
-
return AsyncStorage.removeItem(key);
|
|
2100
|
-
}
|
|
2101
|
-
},
|
|
2102
|
-
setItem: async (key: string, value: string): Promise<void> => {
|
|
2103
|
-
if (typeof window !== "undefined") {
|
|
2104
|
-
return AsyncStorage.setItem(key, value);
|
|
2105
|
-
}
|
|
2106
|
-
},
|
|
2107
|
-
};
|
|
2108
|
-
};
|
|
2109
|
-
|
|
2110
|
-
const persistConfig = {
|
|
2111
|
-
blacklist: ["terreno-rtk", "betterAuth"],
|
|
2112
|
-
key: "root",
|
|
2113
|
-
storage: createSafeStorage(),
|
|
2114
|
-
timeout: 0,
|
|
2115
|
-
version: 1,
|
|
2116
|
-
};
|
|
2117
|
-
|
|
2118
|
-
const rootReducer = combineReducers({
|
|
2119
|
-
appState,
|
|
2120
|
-
betterAuth: betterAuth.reducer,
|
|
2121
|
-
"terreno-rtk": terrenoApi.reducer,
|
|
2122
|
-
});
|
|
2123
|
-
|
|
2124
|
-
const persistedReducer = persistReducer(persistConfig, rootReducer);
|
|
2125
|
-
|
|
2126
|
-
const store = configureStore({
|
|
2127
|
-
devTools: process.env.NODE_ENV !== "production" && {
|
|
2128
|
-
name: \`App-\${
|
|
2129
|
-
typeof window !== "undefined"
|
|
2130
|
-
// biome-ignore lint/suspicious/noAssignInExpressions: Window name assignment
|
|
2131
|
-
? window.name || ((window.name = \`Window-\${DateTime.now().toFormat("HH:mm:ss")}\`))
|
|
2132
|
-
: "Unknown"
|
|
2133
|
-
}\`,
|
|
2134
|
-
},
|
|
2135
|
-
middleware: (getDefaultMiddleware) => {
|
|
2136
|
-
return getDefaultMiddleware({
|
|
2137
|
-
immutableCheck: false,
|
|
2138
|
-
serializableCheck: false,
|
|
2139
|
-
thunk: true,
|
|
2140
|
-
}).concat([
|
|
2141
|
-
...betterAuth.middleware,
|
|
2142
|
-
// noExplicitAny: RTK Query middleware typing
|
|
2143
|
-
// biome-ignore lint/suspicious/noExplicitAny: RTK Query middleware typing
|
|
2144
|
-
terrenoApi.middleware as any,
|
|
2145
|
-
rtkQueryErrorMiddleware,
|
|
2146
|
-
// noExplicitAny: Middleware array typing
|
|
2147
|
-
// biome-ignore lint/suspicious/noExplicitAny: Middleware array typing
|
|
2148
|
-
]) as any;
|
|
2149
|
-
},
|
|
2150
|
-
reducer: persistedReducer,
|
|
2151
|
-
});
|
|
2152
|
-
|
|
2153
|
-
registerTerrenoDevStore(store as unknown as Store<Record<string, unknown>>);
|
|
2154
|
-
|
|
2155
|
-
export const persistor = persistStore(store);
|
|
2156
|
-
|
|
2157
|
-
export type RootState = ReturnType<typeof store.getState>;
|
|
2158
|
-
export type AppDispatch = typeof store.dispatch;
|
|
2159
|
-
|
|
2160
|
-
export const useAppDispatch: () => AppDispatch = useDispatch;
|
|
2161
|
-
|
|
2162
|
-
export default store;
|
|
2163
|
-
`;
|
|
2164
|
-
};
|
|
2165
|
-
const generateFrontendStoreAppState = () => {
|
|
2166
|
-
return `import {createSlice, type PayloadAction} from "@reduxjs/toolkit";
|
|
2167
|
-
import {type TypedUseSelectorHook, useSelector} from "react-redux";
|
|
2168
|
-
import type {RootState} from "./index";
|
|
2169
|
-
|
|
2170
|
-
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;
|
|
2171
|
-
|
|
2172
|
-
export type AppState = {
|
|
2173
|
-
darkMode: boolean;
|
|
2174
|
-
language: string;
|
|
2175
|
-
};
|
|
2176
|
-
|
|
2177
|
-
const initialState: AppState = {
|
|
2178
|
-
darkMode: false,
|
|
2179
|
-
language: "en",
|
|
2180
|
-
};
|
|
2181
|
-
|
|
2182
|
-
export const appStateSlice = createSlice({
|
|
2183
|
-
initialState,
|
|
2184
|
-
name: "appState",
|
|
2185
|
-
reducers: {
|
|
2186
|
-
resetAppState: () => initialState,
|
|
2187
|
-
setDarkMode: (state, action: PayloadAction<boolean>) => {
|
|
2188
|
-
state.darkMode = action.payload;
|
|
2189
|
-
},
|
|
2190
|
-
setLanguage: (state, action: PayloadAction<string>) => {
|
|
2191
|
-
state.language = action.payload;
|
|
2192
|
-
},
|
|
2193
|
-
},
|
|
2194
|
-
});
|
|
2195
|
-
|
|
2196
|
-
export const {setDarkMode, setLanguage, resetAppState} = appStateSlice.actions;
|
|
2197
|
-
|
|
2198
|
-
export const useSelectDarkMode = (): boolean => {
|
|
2199
|
-
return useAppSelector((state) => state.appState.darkMode);
|
|
2200
|
-
};
|
|
2201
|
-
|
|
2202
|
-
export const useSelectLanguage = (): string => {
|
|
2203
|
-
return useAppSelector((state) => state.appState.language);
|
|
2204
|
-
};
|
|
2205
|
-
|
|
2206
|
-
export default appStateSlice.reducer;
|
|
2207
|
-
`;
|
|
2208
|
-
};
|
|
2209
|
-
const generateFrontendStoreErrors = () => {
|
|
2210
|
-
return `import type {Middleware} from "@reduxjs/toolkit";
|
|
2211
|
-
import {useToast} from "@terreno/ui";
|
|
2212
|
-
|
|
2213
|
-
const ignoredErrors = [
|
|
2214
|
-
"Password or username is incorrect",
|
|
2215
|
-
"Token refresh failed with 401",
|
|
2216
|
-
"Failed to refresh token",
|
|
2217
|
-
];
|
|
2218
|
-
|
|
2219
|
-
// noExplicitAny: Generic middleware
|
|
2220
|
-
// biome-ignore lint/suspicious/noExplicitAny: Generic middleware
|
|
2221
|
-
export const rtkQueryErrorMiddleware: Middleware = () => (next) => (action: any) => {
|
|
2222
|
-
if (action?.error && action?.payload) {
|
|
2223
|
-
const errorMessage =
|
|
2224
|
-
action.payload?.data?.title ??
|
|
2225
|
-
action.payload?.data?.message ??
|
|
2226
|
-
action.payload?.error ??
|
|
2227
|
-
JSON.stringify(action.payload);
|
|
2228
|
-
|
|
2229
|
-
let endpointInfo = "unknown endpoint";
|
|
2230
|
-
if (action.meta?.baseQueryMeta?.request?.method && action.meta?.baseQueryMeta?.request?.url) {
|
|
2231
|
-
endpointInfo = \`\${action.meta.baseQueryMeta.request.url} \${action.meta.baseQueryMeta.request.method}\`;
|
|
2232
|
-
} else if (action.meta?.arg?.endpointName) {
|
|
2233
|
-
endpointInfo = \`\${action.meta.arg.endpointName} rejected \${action.meta.arg.type || ""}\`;
|
|
2234
|
-
}
|
|
2235
|
-
|
|
2236
|
-
const message = \`\${endpointInfo.trim()}: \${errorMessage}\`;
|
|
2237
|
-
console.debug(message);
|
|
2238
|
-
|
|
2239
|
-
if (action.payload.status === 404 || action.payload.status === 401) {
|
|
2240
|
-
return next(action);
|
|
2241
|
-
}
|
|
2242
|
-
|
|
2243
|
-
const shouldIgnore = ignoredErrors.some((err) => errorMessage.includes(err));
|
|
2244
|
-
if (!shouldIgnore) {
|
|
2245
|
-
console.warn(message);
|
|
2246
|
-
}
|
|
2247
|
-
}
|
|
2248
|
-
|
|
2249
|
-
return next(action);
|
|
2250
|
-
};
|
|
2251
|
-
|
|
2252
|
-
export const useSentryAndToast = (): ((errorMessage: string) => void) => {
|
|
2253
|
-
const toast = useToast();
|
|
2254
|
-
return (error: string): void => {
|
|
2255
|
-
if (!error) {
|
|
2256
|
-
return;
|
|
2257
|
-
}
|
|
2258
|
-
toast.error(error);
|
|
2259
|
-
console.warn(\`Error: \${error}\`);
|
|
2260
|
-
};
|
|
2261
|
-
};
|
|
2262
|
-
`;
|
|
2263
|
-
};
|
|
2264
|
-
const generateFrontendStoreSdk = () => {
|
|
2265
|
-
return `import type {AdminScreenProps} from "@terreno/admin-frontend";
|
|
2266
|
-
import {generateTags} from "@terreno/rtk";
|
|
2267
|
-
import startCase from "lodash/startCase";
|
|
2268
|
-
|
|
2269
|
-
import {addTagTypes, openapi} from "./openApiSdk";
|
|
2270
|
-
|
|
2271
|
-
/** emptyApi unwraps the \`data\` envelope — profile fields are top-level on the response. */
|
|
2272
|
-
export interface ProfileResponse {
|
|
2273
|
-
_id: string;
|
|
2274
|
-
id: string;
|
|
2275
|
-
email: string;
|
|
2276
|
-
name: string;
|
|
2277
|
-
}
|
|
2278
|
-
|
|
2279
|
-
export interface UpdateProfileRequest {
|
|
2280
|
-
name?: string;
|
|
2281
|
-
/** The app User's email; the Better Auth sign-in email does not change. */
|
|
2282
|
-
email?: string;
|
|
2283
|
-
/** Required by the server when \`email\` changes the mailbox. */
|
|
2284
|
-
currentPassword?: string;
|
|
2285
|
-
}
|
|
2286
|
-
|
|
2287
|
-
export const terrenoApi = openapi
|
|
2288
|
-
.enhanceEndpoints({
|
|
2289
|
-
addTagTypes: ["profile"],
|
|
2290
|
-
})
|
|
2291
|
-
.injectEndpoints({
|
|
2292
|
-
endpoints: (builder) => ({
|
|
2293
|
-
getMe: builder.query<ProfileResponse, void>({
|
|
2294
|
-
providesTags: ["profile"],
|
|
2295
|
-
query: () => ({
|
|
2296
|
-
method: "GET",
|
|
2297
|
-
url: "/auth/me",
|
|
2298
|
-
}),
|
|
2299
|
-
}),
|
|
2300
|
-
patchMe: builder.mutation<ProfileResponse, UpdateProfileRequest>({
|
|
2301
|
-
invalidatesTags: ["profile"],
|
|
2302
|
-
query: (body) => ({
|
|
2303
|
-
body,
|
|
2304
|
-
method: "PATCH",
|
|
2305
|
-
url: "/auth/me",
|
|
2306
|
-
}),
|
|
2307
|
-
}),
|
|
2308
|
-
}),
|
|
2309
|
-
})
|
|
2310
|
-
.enhanceEndpoints({
|
|
2311
|
-
endpoints: {
|
|
2312
|
-
...generateTags(openapi, [...addTagTypes]),
|
|
2313
|
-
},
|
|
2314
|
-
});
|
|
2315
|
-
|
|
2316
|
-
/** Type-erased API instance for @terreno/admin-frontend screens. */
|
|
2317
|
-
export const adminTerrenoApi = terrenoApi as unknown as AdminScreenProps["api"];
|
|
2318
|
-
|
|
2319
|
-
export const {
|
|
2320
|
-
useGetMeQuery,
|
|
2321
|
-
usePatchMeMutation,
|
|
2322
|
-
} = terrenoApi;
|
|
2323
|
-
export * from "./openApiSdk";
|
|
2324
|
-
|
|
2325
|
-
type OpenApiEndpoints = Record<string, unknown>;
|
|
2326
|
-
|
|
2327
|
-
export const getSdkHook = (
|
|
2328
|
-
modelName: string,
|
|
2329
|
-
type: "list" | "read" | "create" | "update" | "remove"
|
|
2330
|
-
): Record<string, unknown> => {
|
|
2331
|
-
const modelPath = startCase(modelName).replace(/\\s/g, "");
|
|
2332
|
-
const endpoints = openapi.endpoints as OpenApiEndpoints;
|
|
2333
|
-
switch (type) {
|
|
2334
|
-
case "list":
|
|
2335
|
-
return endpoints[\`get\${modelPath}\`] as Record<string, unknown>;
|
|
2336
|
-
case "read":
|
|
2337
|
-
return endpoints[\`get\${modelPath}ById\`] as Record<string, unknown>;
|
|
2338
|
-
case "create":
|
|
2339
|
-
return endpoints[\`post\${modelPath}\`] as Record<string, unknown>;
|
|
2340
|
-
case "update":
|
|
2341
|
-
return endpoints[\`patch\${modelPath}ById\`] as Record<string, unknown>;
|
|
2342
|
-
case "remove":
|
|
2343
|
-
return endpoints[\`delete\${modelPath}ById\`] as Record<string, unknown>;
|
|
2344
|
-
default:
|
|
2345
|
-
throw new Error(\`Invalid SDK hook: \${modelName}/\${type}\`);
|
|
2346
|
-
}
|
|
2347
|
-
};
|
|
2348
|
-
`;
|
|
2349
|
-
};
|
|
2350
|
-
const generateFrontendStoreOpenApiSdk = () => {
|
|
2351
|
-
return `// THIS FILE IS AUTO-GENERATED. DO NOT EDIT.
|
|
2352
|
-
// Run "bun run sdk" to regenerate this file from the backend OpenAPI spec.
|
|
2353
|
-
|
|
2354
|
-
import {emptySplitApi as api} from "@terreno/rtk";
|
|
2355
|
-
export const addTagTypes = ["Users", "Auth", "profile"] as const;
|
|
2356
|
-
const injectedRtkApi = api
|
|
2357
|
-
.enhanceEndpoints({
|
|
2358
|
-
addTagTypes,
|
|
2359
|
-
})
|
|
2360
|
-
.injectEndpoints({
|
|
2361
|
-
endpoints: () => ({}),
|
|
2362
|
-
overrideExisting: false,
|
|
2363
|
-
});
|
|
2364
|
-
export {injectedRtkApi as openapi};
|
|
2365
|
-
`;
|
|
2366
|
-
};
|
|
2367
2086
|
const generateFrontendTheme = () => {
|
|
2368
2087
|
return `// Theme configuration for the app
|
|
2369
2088
|
// Override these values to customize the app's appearance
|
|
@@ -2540,7 +2259,8 @@ NODE_ENV=development
|
|
|
2540
2259
|
};
|
|
2541
2260
|
const generateFrontendBetterAuthLib = (args) => {
|
|
2542
2261
|
const { appName } = args;
|
|
2543
|
-
return `import {
|
|
2262
|
+
return `import {createBetterAuthClient, createRememberedAccountsStore} from "@terreno/syncdb/auth";
|
|
2263
|
+
import {baseUrl} from "@terreno/syncdb/config";
|
|
2544
2264
|
import Constants from "expo-constants";
|
|
2545
2265
|
|
|
2546
2266
|
const getAppScheme = (): string => {
|
|
@@ -2548,8 +2268,12 @@ const getAppScheme = (): string => {
|
|
|
2548
2268
|
return expoExtra?.scheme ?? "${appName}";
|
|
2549
2269
|
};
|
|
2550
2270
|
|
|
2551
|
-
|
|
2552
|
-
|
|
2271
|
+
/**
|
|
2272
|
+
* Expo-ready Better Auth client (SecureStore on native, AsyncStorage on web). Feeds
|
|
2273
|
+
* \`SessionProvider\` (app/_layout.tsx) and the shared auth provider in store/syncdb.ts.
|
|
2274
|
+
* The client features match the auth suite backend/src/utils/betterAuthConfig.ts turns on. The
|
|
2275
|
+
* login screen shows the two-factor step itself, so twoFactor needs no redirect.
|
|
2276
|
+
*/
|
|
2553
2277
|
export const betterAuthClient = createBetterAuthClient({
|
|
2554
2278
|
baseURL: baseUrl,
|
|
2555
2279
|
features: {
|
|
@@ -2567,56 +2291,33 @@ export const betterAuthClient = createBetterAuthClient({
|
|
|
2567
2291
|
* method is kept; pass \`rememberIdentity: true\` to also keep name, masked email and avatar.
|
|
2568
2292
|
*/
|
|
2569
2293
|
export const rememberedAccounts = createRememberedAccountsStore({rememberIdentity: false});
|
|
2570
|
-
|
|
2571
|
-
export const signOut = async (): Promise<void> => {
|
|
2572
|
-
await betterAuthClient.signOut();
|
|
2573
|
-
};
|
|
2574
2294
|
`;
|
|
2575
2295
|
};
|
|
2576
2296
|
const generateFrontendSyncDb = (args) => {
|
|
2577
2297
|
const { appName } = args;
|
|
2578
|
-
|
|
2579
|
-
return `import {baseUrl} from "@terreno/rtk";
|
|
2580
|
-
import {
|
|
2581
|
-
type BetterAuthClientLike,
|
|
2298
|
+
return `import {
|
|
2582
2299
|
betterAuthAdapter,
|
|
2300
|
+
bridgeBetterAuthReactClient,
|
|
2583
2301
|
createSyncDb,
|
|
2584
2302
|
type SyncDb,
|
|
2585
2303
|
} from "@terreno/syncdb";
|
|
2304
|
+
import {baseUrl} from "@terreno/syncdb/config";
|
|
2586
2305
|
import {betterAuthClient} from "@/lib/betterAuth";
|
|
2587
2306
|
|
|
2588
|
-
export const SYNC_DB_NAME = "${
|
|
2307
|
+
export const SYNC_DB_NAME = "${appName}";
|
|
2589
2308
|
|
|
2590
2309
|
/** Add synced collection names here as you register modelRouter sync scopes on the backend. */
|
|
2591
2310
|
export const SYNC_COLLECTIONS: string[] = [];
|
|
2592
2311
|
|
|
2593
2312
|
/**
|
|
2594
|
-
*
|
|
2595
|
-
*
|
|
2596
|
-
*
|
|
2597
|
-
*
|
|
2598
|
-
* atom to the shape the adapter expects so auth changes are event-driven instead.
|
|
2313
|
+
* Shared by the sync client and the request client (store/apiClient.ts) so both send the same
|
|
2314
|
+
* Better Auth session token and refresh the same way. bridgeBetterAuthReactClient turns the
|
|
2315
|
+
* Better Auth session atom into push updates; pollIntervalMs is only a fallback if that atom
|
|
2316
|
+
* is unavailable, so keep it slow.
|
|
2599
2317
|
*/
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
).$store?.atoms?.session;
|
|
2604
|
-
|
|
2605
|
-
const syncAuthClient: BetterAuthClientLike = {
|
|
2606
|
-
getSession: () => betterAuthClient.getSession(),
|
|
2607
|
-
...(sessionAtom
|
|
2608
|
-
? {useSession: {subscribe: (listener): (() => void) => sessionAtom.subscribe(listener)}}
|
|
2609
|
-
: {}),
|
|
2610
|
-
};
|
|
2611
|
-
|
|
2612
|
-
/**
|
|
2613
|
-
* The app's one token source: syncdb authenticates with it, and store/index.ts registers it
|
|
2614
|
-
* with @terreno/rtk so RTK Query requests read the same Better Auth token.
|
|
2615
|
-
*
|
|
2616
|
-
* pollIntervalMs is only used as a fallback if the session atom bridge above is unavailable
|
|
2617
|
-
* (e.g. a future Better Auth client shape change); keep it slow.
|
|
2618
|
-
*/
|
|
2619
|
-
export const authProvider = betterAuthAdapter(syncAuthClient, {pollIntervalMs: 60_000});
|
|
2318
|
+
export const authProvider = betterAuthAdapter(bridgeBetterAuthReactClient(betterAuthClient), {
|
|
2319
|
+
pollIntervalMs: 60_000,
|
|
2320
|
+
});
|
|
2620
2321
|
|
|
2621
2322
|
export const syncDb: SyncDb = createSyncDb({
|
|
2622
2323
|
authProvider,
|
|
@@ -2625,6 +2326,10 @@ export const syncDb: SyncDb = createSyncDb({
|
|
|
2625
2326
|
name: SYNC_DB_NAME,
|
|
2626
2327
|
});
|
|
2627
2328
|
|
|
2329
|
+
/**
|
|
2330
|
+
* Tracks whether \`syncDb.start()\` has resolved for the current login. Screens gate
|
|
2331
|
+
* \`mutate()\` on it: \`start()\` must resolve an authenticated user before writes are safe.
|
|
2332
|
+
*/
|
|
2628
2333
|
let syncDbReady = false;
|
|
2629
2334
|
const syncDbReadyListeners = new Set<() => void>();
|
|
2630
2335
|
|
|
@@ -2656,10 +2361,6 @@ const generateFrontendUtilsIndex = () => {
|
|
|
2656
2361
|
export const captureMessage = (message: string): void => {
|
|
2657
2362
|
console.warn("Captured message:", message);
|
|
2658
2363
|
};
|
|
2659
|
-
|
|
2660
|
-
export const createSentryReduxEnhancer = (): unknown => {
|
|
2661
|
-
return undefined;
|
|
2662
|
-
};
|
|
2663
2364
|
`;
|
|
2664
2365
|
};
|
|
2665
2366
|
const generateBackendCiWorkflow = (_args) => {
|
|
@@ -2840,11 +2541,8 @@ export const generateAllFiles = (args) => {
|
|
|
2840
2541
|
{ content: generateFrontendPackageJson(args), path: `${frontendDir}/package.json` },
|
|
2841
2542
|
{ content: generateFrontendAppJson(args), path: `${frontendDir}/app.json` },
|
|
2842
2543
|
{ content: generateFrontendTsConfig(), path: `${frontendDir}/tsconfig.json` },
|
|
2843
|
-
{ content: generateFrontendTsConfigCodegen(), path: `${frontendDir}/tsconfig.codegen.json` },
|
|
2844
2544
|
{ content: generateFrontendMetroConfig(), path: `${frontendDir}/metro.config.js` },
|
|
2845
2545
|
{ content: generateFrontendBiomeJsonc(), path: `${frontendDir}/biome.jsonc` },
|
|
2846
|
-
{ content: generateFrontendOpenApiConfig(), path: `${frontendDir}/openapi-config.ts` },
|
|
2847
|
-
{ content: generateFrontendGenerateSdk(), path: `${frontendDir}/scripts/generate-sdk.ts` },
|
|
2848
2546
|
{ content: generateFrontendRootLayout(args), path: `${frontendDir}/app/_layout.tsx` },
|
|
2849
2547
|
{ content: generateFrontendLogin(), path: `${frontendDir}/app/login.tsx` },
|
|
2850
2548
|
{ content: generateFrontendSignup(), path: `${frontendDir}/app/signup.tsx` },
|
|
@@ -2862,11 +2560,8 @@ export const generateAllFiles = (args) => {
|
|
|
2862
2560
|
content: generateFrontendAdminConfiguration(),
|
|
2863
2561
|
path: `${frontendDir}/app/(tabs)/admin/configuration.tsx`,
|
|
2864
2562
|
},
|
|
2865
|
-
{ content:
|
|
2866
|
-
{ content:
|
|
2867
|
-
{ content: generateFrontendStoreErrors(), path: `${frontendDir}/store/errors.ts` },
|
|
2868
|
-
{ content: generateFrontendStoreSdk(), path: `${frontendDir}/store/sdk.ts` },
|
|
2869
|
-
{ content: generateFrontendStoreOpenApiSdk(), path: `${frontendDir}/store/openApiSdk.ts` },
|
|
2563
|
+
{ content: generateFrontendApiClient(), path: `${frontendDir}/store/apiClient.ts` },
|
|
2564
|
+
{ content: generateFrontendApiSdk(), path: `${frontendDir}/store/apiSdk.ts` },
|
|
2870
2565
|
{ content: generateFrontendBetterAuthLib(args), path: `${frontendDir}/lib/betterAuth.ts` },
|
|
2871
2566
|
{ content: generateFrontendSyncDb(args), path: `${frontendDir}/store/syncdb.ts` },
|
|
2872
2567
|
{ content: generateFrontendTheme(), path: `${frontendDir}/constants/theme.ts` },
|
package/dist/generate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../src/generate.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,iBAAiB,CAAC,OAAM,IAAI,EAAE,MAAM,EAAC,CAAC;AAE9D,8FAA8F;AAC9F,MAAM,CAAC,MAAM,8BAA8B,GAAG,QAAQ,CAAC;AAEvD,2GAA2G;AAC3G,MAAM,CAAC,MAAM,gBAAgB,G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AAE,IAAI,EAAE,GAAG,WAAW,qBAAqB,EAAC;QAC7E,EAAC,OAAO,EAAE,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,WAAW,iBAAiB,EAAC;QAC9E,EAAC,OAAO,EAAE,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,WAAW,OAAO,EAAC;QAC7D,EAAC,OAAO,EAAE,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,WAAW,eAAe,EAAC;QAE5E,2BAA2B;QAC3B,EAAC,OAAO,EAAE,yBAAyB,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,kCAAkC,EAAC;QACpF,EAAC,OAAO,EAAE,0BAA0B,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,mCAAmC,EAAC;KACvF,CAAC;AACJ,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"description": "Scaffold a deployable Terreno full-stack app — part of Terreno, the batteries-included TypeScript framework for universal apps.",
|
|
9
9
|
"devDependencies": {
|
|
10
10
|
"@biomejs/biome": "^2.3.6",
|
|
11
|
-
"@terreno/test": "
|
|
11
|
+
"@terreno/test": "58.0.0-beta.1",
|
|
12
12
|
"@types/bun": "^1.4.0",
|
|
13
13
|
"@types/node": "^25.3.0",
|
|
14
14
|
"chai": "^6.2.2",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"typecheck": "tsc -p tsconfig.typecheck.json"
|
|
60
60
|
},
|
|
61
61
|
"type": "module",
|
|
62
|
-
"version": "
|
|
62
|
+
"version": "58.0.0-beta.1"
|
|
63
63
|
}
|