diff --git a/apps/api/src/zero.ts b/apps/api/src/zero.ts index ec54755..7b74aa2 100644 --- a/apps/api/src/zero.ts +++ b/apps/api/src/zero.ts @@ -168,6 +168,7 @@ const createMutators = (authData: AuthData | null) => { avaliable: bal.balances.available as any, current: bal.balances.current as any, name: bal.name, + tokenId: account.id, }))).onConflictDoUpdate({ target: balance.plaid_id, set: { current: sql.raw(`excluded.${balance.current.name}`), avaliable: sql.raw(`excluded.${balance.avaliable.name}`) } diff --git a/apps/tui/package.json b/apps/tui/package.json index 20d3c4f..2df4f18 100644 --- a/apps/tui/package.json +++ b/apps/tui/package.json @@ -13,8 +13,8 @@ "@effect/platform-bun": "^0.83.0", "@money/shared": "workspace:*", "@money/ui": "workspace:*", - "@opentui/core": "^0.1.39", - "@opentui/react": "^0.1.39", + "@opentui/core": "^0.1.47", + "@opentui/react": "^0.1.47", "@types/qrcode": "^1.5.6", "effect": "^3.19.4", "qrcode": "^1.5.4", diff --git a/packages/react-native-opentui/index.tsx b/packages/react-native-opentui/index.tsx index f4f97f1..93d9dbd 100644 --- a/packages/react-native-opentui/index.tsx +++ b/packages/react-native-opentui/index.tsx @@ -5,13 +5,54 @@ import type { PressableProps, ScrollViewProps, ModalProps, + + StyleProp, + ViewStyle, + + LinkingImpl, } from "react-native"; import { useTerminalDimensions } from "@opentui/react"; import { RGBA } from "@opentui/core"; +import { platform } from "node:os"; +import { exec } from "node:child_process"; const RATIO_WIDTH = 8.433; const RATIO_HEIGHT = 17; +function attr( + style: StyleProp, + name: K, + type: "string" +): Extract | undefined; + +function attr( + style: StyleProp, + name: K, + type: "number" +): Extract | undefined; + +function attr( + style: StyleProp, + name: K, + type: "boolean" +): Extract | undefined; + +function attr( + style: StyleProp, + name: K, + type: "string" | "number" | "boolean" +) { + if (!style) return undefined; + + const obj: ViewStyle = + Array.isArray(style) + ? Object.assign({}, ...style.filter(Boolean)) + : (style as ViewStyle); + + const v = obj[name]; + return typeof v === type ? v : undefined; +} + export function View({ children, style }: ViewProps) { const bg = style && 'backgroundColor' in style @@ -25,69 +66,27 @@ export function View({ children, style }: ViewProps) { : style.backgroundColor : undefined : undefined; - const flexDirection = style && - 'flexDirection' in style - ? typeof style.flexDirection == 'string' - ? style.flexDirection - : undefined - : undefined; - const flex = style && - 'flex' in style - ? typeof style.flex == 'number' - ? style.flex - : undefined - : undefined; - const flexShrink = style && - 'flexShrink' in style - ? typeof style.flexShrink == 'number' - ? style.flexShrink - : undefined - : undefined; - const overflow = style && - 'overflow' in style - ? typeof style.overflow == 'string' - ? style.overflow - : undefined - : undefined; - const position = style && - 'position' in style - ? typeof style.position == 'string' - ? style.position - : undefined - : undefined; - const justifyContent = style && - 'justifyContent' in style - ? typeof style.justifyContent == 'string' - ? style.justifyContent - : undefined - : undefined; - const alignItems = style && - 'alignItems' in style - ? typeof style.alignItems == 'string' - ? style.alignItems - : undefined - : undefined; - const padding = style && - 'padding' in style - ? typeof style.padding == 'number' - ? style.padding - : undefined - : undefined; + const padding = attr(style, 'padding', 'number'); + + const props = { + overflow: attr(style, 'overflow', 'string'), + position: attr(style, 'position', 'string'), + alignSelf: attr(style, 'alignSelf', 'string'), + alignItems: attr(style, 'alignItems', 'string'), + justifyContent: attr(style, 'justifyContent', 'string'), + flexShrink: attr(style, 'flexShrink', 'number'), + flexDirection: attr(style, 'flexDirection', 'string'), + flexGrow: attr(style, 'flex', 'number') || attr(style, 'flexGrow', 'number'), + }; return {children} } @@ -210,6 +209,18 @@ export const Platform = { OS: "tui", }; +export const Linking = { + openURL: async (url: string) => { + const cmd = + platform() == "darwin" + ? `open ${url}` + : platform() == "win32" + ? `start "" "${url}"` + : `xdg-open "${url}"`; + exec(cmd); + } +} satisfies Partial; + export default { View, Text, diff --git a/packages/shared/src/mutators.ts b/packages/shared/src/mutators.ts index 8c07297..02533d1 100644 --- a/packages/shared/src/mutators.ts +++ b/packages/shared/src/mutators.ts @@ -1,6 +1,7 @@ import type { Transaction } from "@rocicorp/zero"; import type { AuthData } from "./auth"; -import { isLoggedIn, type Schema } from "."; +import { type Schema } from "./zero-schema.gen"; +import { isLoggedIn } from "./zql"; type Tx = Transaction; diff --git a/packages/shared/src/queries.ts b/packages/shared/src/queries.ts index 06db781..a323249 100644 --- a/packages/shared/src/queries.ts +++ b/packages/shared/src/queries.ts @@ -1,6 +1,6 @@ import { syncedQueryWithContext } from "@rocicorp/zero"; import { z } from "zod"; -import { builder } from "."; +import { builder } from "./zero-schema.gen"; import { type AuthData } from "./auth"; import { isLoggedIn } from "./zql"; @@ -22,7 +22,7 @@ export const queries = { isLoggedIn(authData); return builder.plaidLink .where('user_id', '=', authData.user.id) - .where('createdAt', '<', new Date().getTime() + (1000 * 60 * 60 * 4)) + .where('createdAt', '>', new Date().getTime() - (1000 * 60 * 60 * 4)) .orderBy('createdAt', 'desc') .one(); }), diff --git a/packages/shared/src/zql.ts b/packages/shared/src/zql.ts index d9162f2..45bbb86 100644 --- a/packages/shared/src/zql.ts +++ b/packages/shared/src/zql.ts @@ -3,7 +3,6 @@ import type { AuthData } from "./auth"; export function isLoggedIn( authData: AuthData | null, ): asserts authData is AuthData { - console.log("AUTHDATA", authData); if (!authData?.user.id) { throw new Error("User is not logged in"); } diff --git a/packages/ui/components/Button.tsx b/packages/ui/components/Button.tsx index 49c192d..c22b19d 100644 --- a/packages/ui/components/Button.tsx +++ b/packages/ui/components/Button.tsx @@ -1,3 +1,4 @@ +import { useKeyboard } from "../src/useKeyboard"; import type { ReactNode } from "react"; import { Text, Pressable } from "react-native"; @@ -5,6 +6,7 @@ export interface ButtonProps { children: ReactNode; onPress?: () => void; variant?: 'default' | 'secondary' | 'destructive'; + shortcut?: string; } const STYLES: Record, { backgroundColor: string, color: string }> = { @@ -13,10 +15,15 @@ const STYLES: Record, { backgroundColor: str destructive: { backgroundColor: 'red', color: 'white' }, }; -export function Button({ children, variant, onPress }: ButtonProps) { +export function Button({ children, variant, onPress, shortcut }: ButtonProps) { const { backgroundColor, color } = STYLES[variant || "default"]; + useKeyboard((key) => { + if (!shortcut || !onPress) return; + if (key.name == shortcut) onPress(); + }); + return - {children} + {children}{shortcut && ` (${shortcut})`} } diff --git a/packages/ui/src/dialog.tsx b/packages/ui/components/Dialog.tsx similarity index 87% rename from packages/ui/src/dialog.tsx rename to packages/ui/components/Dialog.tsx index 6a3b070..7091d86 100644 --- a/packages/ui/src/dialog.tsx +++ b/packages/ui/components/Dialog.tsx @@ -1,6 +1,6 @@ import { type ReactNode } from "react"; -import { Modal, View, Text, Pressable } from "react-native"; -import { useKeyboard } from "./useKeyboard"; +import { Modal, View, Text } from "react-native"; +import { useKeyboard } from "../src/useKeyboard"; interface ProviderProps { children: ReactNode; @@ -18,7 +18,7 @@ export function Provider({ children, visible, close }: ProviderProps) { {/* close && close()} style={{ justifyContent: 'center', alignItems: 'center', flex: 1, backgroundColor: 'rgba(0,0,0,0.2)', }}> */} - {children} + {visible && children} ); diff --git a/packages/ui/src/list.tsx b/packages/ui/components/List.tsx similarity index 94% rename from packages/ui/src/list.tsx rename to packages/ui/components/List.tsx index e8b2732..19ec212 100644 --- a/packages/ui/src/list.tsx +++ b/packages/ui/components/List.tsx @@ -1,6 +1,6 @@ import { useState, type ReactNode } from "react"; import { View, Text } from "react-native"; -import { useKeyboard } from "./useKeyboard"; +import { useKeyboard } from "../src/useKeyboard"; export type ListProps = { items: T[], diff --git a/packages/ui/src/table.tsx b/packages/ui/components/Table.tsx similarity index 96% rename from packages/ui/src/table.tsx rename to packages/ui/components/Table.tsx index 3f09140..a9775f7 100644 --- a/packages/ui/src/table.tsx +++ b/packages/ui/components/Table.tsx @@ -1,6 +1,6 @@ import { createContext, use, useState, type ReactNode } from "react"; -import { View, Text, ScrollView } from "react-native"; -import { useKeyboard } from "./useKeyboard"; +import { View, Text } from "react-native"; +import { useKeyboard } from "../src/useKeyboard"; import type { KeyEvent } from "@opentui/core"; const HEADER_COLOR = '#7158e2'; @@ -121,7 +121,7 @@ interface RowProps { isSelected: boolean; } function TableRow({ row, isSelected }: RowProps) { - const { data, columns, columnMap } = use(Context); + const { columns, columnMap } = use(Context); return diff --git a/packages/ui/src/index.tsx b/packages/ui/src/index.tsx index 3e34551..f1384c9 100644 --- a/packages/ui/src/index.tsx +++ b/packages/ui/src/index.tsx @@ -1,4 +1,4 @@ -import { createContext, use, useState } from "react"; +import { createContext, use } from "react"; import { Transactions } from "./transactions"; import { View, Text } from "react-native"; import { Settings } from "./settings"; diff --git a/packages/ui/src/settings/accounts.tsx b/packages/ui/src/settings/accounts.tsx index 6bc0bec..36723c9 100644 --- a/packages/ui/src/settings/accounts.tsx +++ b/packages/ui/src/settings/accounts.tsx @@ -1,12 +1,12 @@ import { useQuery, useZero } from "@rocicorp/zero/react"; import { queries, type Mutators, type Schema } from '@money/shared'; -import * as Table from "../table"; import { use, useEffect, useState } from "react"; import { RouterContext } from ".."; -import { View, Text, Modal, Linking } from "react-native"; -import { Button } from "../../components/Button"; +import { View, Text, Linking } from "react-native"; import { useKeyboard } from "../useKeyboard"; -import * as Dialog from "../dialog"; +import { Button } from "../../components/Button"; +import * as Table from "../../components/Table"; +import * as Dialog from "../../components/Dialog"; const COLUMNS: Table.Column[] = [ { name: 'name', label: 'Name' }, @@ -18,25 +18,17 @@ export function Accounts() { const [items] = useQuery(queries.getItems(auth)); const [deleting, setDeleting] = useState([]); const [isAddOpen, setIsAddOpen] = useState(false); - const [link] = useQuery(queries.getPlaidLink(auth)); - const [loadingLink, setLoadingLink] = useState(false); const z = useZero(); - - useKeyboard((key) => { - if (key.name == 'n') { - setDeleting([]); - } else if (key.name == 'y') { - onDelete(); - } - }, [deleting]); - useKeyboard((key) => { - if (key.name == 'a') { - addAccount(); - } - }, [link]) + // useKeyboard((key) => { + // if (key.name == 'n') { + // setDeleting([]); + // } else if (key.name == 'y') { + // onDelete(); + // } + // }, [deleting]); const onDelete = () => { if (!deleting) return @@ -46,32 +38,9 @@ export function Accounts() { } const addAccount = () => { - if (link) { - Linking.openURL(link.link); - } else { - setLoadingLink(true); - z.mutate.link.create(); - } - - // else { - // setLoadingLink(true); - // z.mutate.link.create().server.then(async () => { - // const link = await queries.getPlaidLink(auth).run(); - // setLoadingLink(false); - // if (link) { - // Linking.openURL(link.link); - // } - // }); - // } + setIsAddOpen(true); } - useEffect(() => { - if (loadingLink && link) { - Linking.openURL(link.link); - setLoadingLink(false); - } - }, [link, loadingLink]); - return ( <> @@ -101,17 +70,18 @@ export function Accounts() { - {/* setIsAddOpen(false)}> */} - {/* */} - {/* Add Account */} - {/**/} - {/* */} - {/* */} - {/* */} + setIsAddOpen(false)}> + + Add Account + + + - + + + @@ -130,9 +100,31 @@ export function Accounts() { function AddAccount() { const { auth } = use(RouterContext); - const [link] = useQuery(queries.getPlaidLink(auth)); + const [link, details] = useQuery(queries.getPlaidLink(auth)); + + const openLink = () => { + if (!link) return + Linking.openURL(link.link); + } + + const z = useZero(); + + useEffect(() => { + console.log(link, details); + if (details.type != "complete") return; + if (link != undefined) return; + + console.log("Creating new link"); + z.mutate.link.create(); + }, [link, details]); return ( - {link?.link} + <> + {link ? <> + Please click the button to complete setup. + + + : Loading Plaid Link} + ); } diff --git a/packages/ui/src/transactions.tsx b/packages/ui/src/transactions.tsx index 86ec358..de25d2e 100644 --- a/packages/ui/src/transactions.tsx +++ b/packages/ui/src/transactions.tsx @@ -1,4 +1,4 @@ -import * as Table from "./table"; +import * as Table from "../components/Table"; import { useQuery } from "@rocicorp/zero/react"; import { queries, type Transaction } from '@money/shared'; import { use } from "react"; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6536ccf..d7e1ef8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -175,11 +175,11 @@ importers: specifier: workspace:* version: link:../../packages/ui '@opentui/core': - specifier: ^0.1.39 - version: 0.1.39(stage-js@1.0.0-alpha.17)(typescript@5.9.3)(web-tree-sitter@0.25.10) + specifier: ^0.1.47 + version: 0.1.47(stage-js@1.0.0-alpha.17)(typescript@5.9.3)(web-tree-sitter@0.25.10) '@opentui/react': - specifier: ^0.1.39 - version: 0.1.39(react@19.1.0)(stage-js@1.0.0-alpha.17)(typescript@5.9.3)(web-tree-sitter@0.25.10) + specifier: ^0.1.47 + version: 0.1.47(react@19.1.0)(stage-js@1.0.0-alpha.17)(typescript@5.9.3)(web-tree-sitter@0.25.10) '@types/qrcode': specifier: ^1.5.6 version: 1.5.6 @@ -2299,43 +2299,43 @@ packages: peerDependencies: '@opentelemetry/api': ^1.1.0 - '@opentui/core-darwin-arm64@0.1.39': - resolution: {integrity: sha512-tDUdNdzGeylkDWTiDIy/CalM/9nIeDwMZGN0Q6FLqABnAplwBhdIH2w/gInAcMaTyagm7Qk88p398Wbnxa9uyg==} + '@opentui/core-darwin-arm64@0.1.47': + resolution: {integrity: sha512-0/u4VkJJPvW24cZzMaKf6Dm+VzeO1a94l6NV3AQ1Wb+pPTEyOmNWkRvj03ZrRLMCyQduaFVtlnor8DVCk6OHuQ==} cpu: [arm64] os: [darwin] - '@opentui/core-darwin-x64@0.1.39': - resolution: {integrity: sha512-dWXXNUpdi3ndd+6WotQezsO7g54MLSc/6DmYcl0p7fZrQFct8fX0c9ny/S0xAusNHgBGVS5j5FWE75Mx79301Q==} + '@opentui/core-darwin-x64@0.1.47': + resolution: {integrity: sha512-y1+c/e+IaZAj5N02GnD+oaubbb5JiW5eKgF0h58kw73iXDMfynuoGOpREz58i1rUFYOMYJGdrSjEHtXk2pD2XA==} cpu: [x64] os: [darwin] - '@opentui/core-linux-arm64@0.1.39': - resolution: {integrity: sha512-ookQbxLjsg51iwGb6/KTxCfiVRtE9lSE2OVFLLYork8iVzxg81jX29Uoxe1knZ8FjOJ0+VqTzex2IqQH6mjJlw==} + '@opentui/core-linux-arm64@0.1.47': + resolution: {integrity: sha512-ZESHmqILtfb6FFEfi40JGKl8z0+LhOSoHgfOK1PPyuyRT9Mk8uXeQgPMF5W6Ac0pp4w+uWVC4TrFjijCCSiaUQ==} cpu: [arm64] os: [linux] - '@opentui/core-linux-x64@0.1.39': - resolution: {integrity: sha512-CeXVNa3hB7gTYKYoZAuMtxWMIXn2rPhmXLkHKpEvXvDRjODFDk8wN1AIVnT5tfncXbWNa5z35BhmqewpGkl4oQ==} + '@opentui/core-linux-x64@0.1.47': + resolution: {integrity: sha512-qfvy1qshgnZMcAHQ3MS093IBjxM2pPx+kEnW7icsyud60zoJgoUugdN2kjgJiIJiYX3f3PgE68J6CVW2MCtYfQ==} cpu: [x64] os: [linux] - '@opentui/core-win32-arm64@0.1.39': - resolution: {integrity: sha512-eeBrVOHz7B+JNZ+w7GH6QxXhXQVBxI6jHmw3B05czG905Je62P0skZNHxiol2BZRawDljo1J/nXQdO5XPeAk2A==} + '@opentui/core-win32-arm64@0.1.47': + resolution: {integrity: sha512-f6OoPnaz303H6fudi8blS+iEcJtlFlcqdBoWnWnJQfN9rLmajW3Yf7RfpNOoLUlDcwxQLyTL/5EHwbcG8D4r7A==} cpu: [arm64] os: [win32] - '@opentui/core-win32-x64@0.1.39': - resolution: {integrity: sha512-lLXeQUBg6Wlenauwd+xaBD+0HT4YIcONeZUTHA+Gyd/rqVhxId97rhhzFikp3bBTvNJlYAscJI3yIF2JvRiFNQ==} + '@opentui/core-win32-x64@0.1.47': + resolution: {integrity: sha512-lQnJg7FucyyTbN/ybTj5FZ7S8OAfT5KxXDR5l9Sla7R5MIDY6nBXYM3GWeF81jzDd4K4Z/0hxNFtWSopEXRFYg==} cpu: [x64] os: [win32] - '@opentui/core@0.1.39': - resolution: {integrity: sha512-5gPyg3X/8Nr80RfNEJFiMM8Tj01VFfvFwEMCMQrDiOhmSfFXSH2grF/KPl2bnd2Qa13maXWFEl6W3aATObnrnQ==} + '@opentui/core@0.1.47': + resolution: {integrity: sha512-gKcYX9EJ/e5VLEwBH2kalDr5xoI9MEanzQV7uV3Sb2Z9+ndwEUShKKna3odN8g4E20c4sX2VpwmB9hhl3Tsd9w==} peerDependencies: web-tree-sitter: 0.25.10 - '@opentui/react@0.1.39': - resolution: {integrity: sha512-+d7ftMccu3+jL4jytEEDUX0B0cQjR7PvDHIcdyysog+/WripJq/7q+g0TeNopvTWRWs+VkUrOyhODrT4ImhSYA==} + '@opentui/react@0.1.47': + resolution: {integrity: sha512-UU/3jnBFC5VGKn73aKEmOSIcaltIg7SnEImYv9Zte4cpA7IZmax/+nfQ+3596Z9K2iDyCUS2wOyZYjnSCDew9A==} peerDependencies: react: '>=19.0.0' @@ -3598,8 +3598,8 @@ packages: buffer@6.0.3: resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} - bun-ffi-structs@0.1.0: - resolution: {integrity: sha512-NoRfJ81pgLIHCzw624/2GS2FuxcU0G4SRJww/4PXvheNVUPSIUjkOC6v1/8rk66tJVCb9oR0D6rDNKK0qT5O2Q==} + bun-ffi-structs@0.1.2: + resolution: {integrity: sha512-Lh1oQAYHDcnesJauieA4UNkWGXY9hYck7OA5IaRwE3Bp6K2F2pJSNYqq+hIy7P3uOvo3km3oxS8304g5gDMl/w==} peerDependencies: typescript: ^5 @@ -3608,28 +3608,28 @@ packages: peerDependencies: '@types/react': ^19 - bun-webgpu-darwin-arm64@0.1.3: - resolution: {integrity: sha512-KkNQ9gT7dxGDndQaHTTHss9miukqpczML3pO2nZJoT/nITwe9lw3ZGFJMujkW41BUQ1mDYKFgo5nBGf9xYHPAg==} + bun-webgpu-darwin-arm64@0.1.4: + resolution: {integrity: sha512-eDgLN9teKTfmvrCqgwwmWNsNszxYs7IZdCqk0S1DCarvMhr4wcajoSBlA/nQA0/owwLduPTS8xxCnQp4/N/gDg==} cpu: [arm64] os: [darwin] - bun-webgpu-darwin-x64@0.1.3: - resolution: {integrity: sha512-TODWnMUbCoqD/wqzlB3oGOBIUWIFly0lqMeBFz/MBV+ndjbnkNrP9huaZJCTkCVEPKGtd1FCM3ExZUtBbnGziA==} + bun-webgpu-darwin-x64@0.1.4: + resolution: {integrity: sha512-X+PjwJUWenUmdQBP8EtdItMyieQ6Nlpn+BH518oaouDiSnWj5+b0Y7DNDZJq7Ezom4EaxmqL/uGYZK3aCQ7CXg==} cpu: [x64] os: [darwin] - bun-webgpu-linux-x64@0.1.3: - resolution: {integrity: sha512-lVHORoVu1G61XVM8CRRqUsqr6w8kMlpuSpbPGpKUpmvrsoay6ymXAhT5lRPKyrGNamHUQTknmWdI59aRDCfLtQ==} + bun-webgpu-linux-x64@0.1.4: + resolution: {integrity: sha512-zMLs2YIGB+/jxrYFXaFhVKX/GBt05UTF45lc9srcHc9JXGjEj+12CIo1CHLTAWatXMTqt0Jsu6ukWEoWVT/ayA==} cpu: [x64] os: [linux] - bun-webgpu-win32-x64@0.1.3: - resolution: {integrity: sha512-vlspsFffctJlBnFfs2lW3QgDD6LyFu8VT18ryID7Qka5poTj0clGVRxz7DFRi7yva3GovEGw/82z/WVc5US8Pw==} + bun-webgpu-win32-x64@0.1.4: + resolution: {integrity: sha512-Z5yAK28xrcm8Wb5k7TZ8FJKpOI/r+aVCRdlHYAqI2SDJFN3nD4mJs900X6kNVmG/xFzb5yOuKVYWGg+6ZXWbyA==} cpu: [x64] os: [win32] - bun-webgpu@0.1.3: - resolution: {integrity: sha512-IXFxaIi4rgsEEpl9n/QVDm5RajCK/0FcOXZeMb52YRjoiAR1YVYK5hLrXT8cm+KDi6LVahA9GJFqOR4yiloVCw==} + bun-webgpu@0.1.4: + resolution: {integrity: sha512-Kw+HoXl1PMWJTh9wvh63SSRofTA8vYBFCw0XEP1V1fFdQEDhI8Sgf73sdndE/oDpN/7CMx0Yv/q8FCvO39ROMQ==} bytes@3.1.2: resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} @@ -9805,48 +9805,48 @@ snapshots: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 2.2.0(@opentelemetry/api@1.9.0) - '@opentui/core-darwin-arm64@0.1.39': + '@opentui/core-darwin-arm64@0.1.47': optional: true - '@opentui/core-darwin-x64@0.1.39': + '@opentui/core-darwin-x64@0.1.47': optional: true - '@opentui/core-linux-arm64@0.1.39': + '@opentui/core-linux-arm64@0.1.47': optional: true - '@opentui/core-linux-x64@0.1.39': + '@opentui/core-linux-x64@0.1.47': optional: true - '@opentui/core-win32-arm64@0.1.39': + '@opentui/core-win32-arm64@0.1.47': optional: true - '@opentui/core-win32-x64@0.1.39': + '@opentui/core-win32-x64@0.1.47': optional: true - '@opentui/core@0.1.39(stage-js@1.0.0-alpha.17)(typescript@5.9.3)(web-tree-sitter@0.25.10)': + '@opentui/core@0.1.47(stage-js@1.0.0-alpha.17)(typescript@5.9.3)(web-tree-sitter@0.25.10)': dependencies: - bun-ffi-structs: 0.1.0(typescript@5.9.3) + bun-ffi-structs: 0.1.2(typescript@5.9.3) jimp: 1.6.0 web-tree-sitter: 0.25.10 yoga-layout: 3.2.1 optionalDependencies: '@dimforge/rapier2d-simd-compat': 0.17.3 - '@opentui/core-darwin-arm64': 0.1.39 - '@opentui/core-darwin-x64': 0.1.39 - '@opentui/core-linux-arm64': 0.1.39 - '@opentui/core-linux-x64': 0.1.39 - '@opentui/core-win32-arm64': 0.1.39 - '@opentui/core-win32-x64': 0.1.39 - bun-webgpu: 0.1.3 + '@opentui/core-darwin-arm64': 0.1.47 + '@opentui/core-darwin-x64': 0.1.47 + '@opentui/core-linux-arm64': 0.1.47 + '@opentui/core-linux-x64': 0.1.47 + '@opentui/core-win32-arm64': 0.1.47 + '@opentui/core-win32-x64': 0.1.47 + bun-webgpu: 0.1.4 planck: 1.4.2(stage-js@1.0.0-alpha.17) three: 0.177.0 transitivePeerDependencies: - stage-js - typescript - '@opentui/react@0.1.39(react@19.1.0)(stage-js@1.0.0-alpha.17)(typescript@5.9.3)(web-tree-sitter@0.25.10)': + '@opentui/react@0.1.47(react@19.1.0)(stage-js@1.0.0-alpha.17)(typescript@5.9.3)(web-tree-sitter@0.25.10)': dependencies: - '@opentui/core': 0.1.39(stage-js@1.0.0-alpha.17)(typescript@5.9.3)(web-tree-sitter@0.25.10) + '@opentui/core': 0.1.47(stage-js@1.0.0-alpha.17)(typescript@5.9.3)(web-tree-sitter@0.25.10) react: 19.1.0 react-reconciler: 0.32.0(react@19.1.0) transitivePeerDependencies: @@ -11654,7 +11654,7 @@ snapshots: base64-js: 1.5.1 ieee754: 1.2.1 - bun-ffi-structs@0.1.0(typescript@5.9.3): + bun-ffi-structs@0.1.2(typescript@5.9.3): dependencies: typescript: 5.9.3 @@ -11664,26 +11664,26 @@ snapshots: '@types/react': 19.1.17 optional: true - bun-webgpu-darwin-arm64@0.1.3: + bun-webgpu-darwin-arm64@0.1.4: optional: true - bun-webgpu-darwin-x64@0.1.3: + bun-webgpu-darwin-x64@0.1.4: optional: true - bun-webgpu-linux-x64@0.1.3: + bun-webgpu-linux-x64@0.1.4: optional: true - bun-webgpu-win32-x64@0.1.3: + bun-webgpu-win32-x64@0.1.4: optional: true - bun-webgpu@0.1.3: + bun-webgpu@0.1.4: dependencies: '@webgpu/types': 0.1.66 optionalDependencies: - bun-webgpu-darwin-arm64: 0.1.3 - bun-webgpu-darwin-x64: 0.1.3 - bun-webgpu-linux-x64: 0.1.3 - bun-webgpu-win32-x64: 0.1.3 + bun-webgpu-darwin-arm64: 0.1.4 + bun-webgpu-darwin-x64: 0.1.4 + bun-webgpu-linux-x64: 0.1.4 + bun-webgpu-win32-x64: 0.1.4 optional: true bytes@3.1.2: {} diff --git a/process-compose.yaml b/process-compose.yaml index 567275d..2cf17dd 100644 --- a/process-compose.yaml +++ b/process-compose.yaml @@ -41,7 +41,10 @@ processes: command: | createdb -h localhost -p 5432 -U postgres money 2>/dev/null || true - psql -h localhost -p 5432 -U postgres -c "ALTER SYSTEM SET wal_level = 'logical';" + psql -h localhost -p 5432 -U postgres \ + -c "ALTER SYSTEM SET wal_level = 'logical';" \ + -c "ALTER SYSTEM SET timezone = 'UTC'" \ + -c "SELECT pg_reload_conf();" echo "Migration and seeding complete!" depends_on: