update deps, add abort signals

This commit is contained in:
EthanShoeDev
2025-09-15 00:14:06 -04:00
parent 0cf2d06000
commit 2078b022ea
7 changed files with 630 additions and 342 deletions

View File

@@ -33,8 +33,8 @@
"@react-navigation/bottom-tabs": "^7.4.0",
"@react-navigation/elements": "^2.6.4",
"@react-navigation/native": "^7.1.8",
"@tanstack/react-form": "^1.19.5",
"@tanstack/react-query": "^5.87.1",
"@tanstack/react-form": "^1.20.0",
"@tanstack/react-query": "^5.87.4",
"expo": "54.0.7",
"expo-clipboard": "~8.0.7",
"expo-constants": "~18.0.8",
@@ -61,7 +61,7 @@
"react-native-screens": "~4.16.0",
"react-native-web": "~0.21.1",
"react-native-worklets": "~0.5.1",
"zod": "^4.1.5"
"zod": "^4.1.8"
},
"devDependencies": {
"@epic-web/config": "^1.21.3",

View File

@@ -5,6 +5,7 @@ import { useMutation, useQuery } from '@tanstack/react-query';
import { useRouter } from 'expo-router';
import React from 'react';
import { Pressable, ScrollView, StyleSheet, Text, View } from 'react-native';
import { AbortSignalTimeout } from '@/lib/utils';
import { useAppForm, useFieldContext } from '../components/form-components';
import { KeyManagerModal } from '../components/key-manager-modal';
import {
@@ -45,6 +46,7 @@ const useSshConnMutation = () => {
onStatusChange: (status) => {
console.log('SSH connection status', status);
},
abortSignal: AbortSignalTimeout(5_000),
});
await secretsManager.connections.utils.upsertConnection({
@@ -57,6 +59,7 @@ const useSshConnMutation = () => {
onStatusChange: (status) => {
console.log('SSH shell status', status);
},
abortSignal: AbortSignalTimeout(5_000),
});
const channelId = shellInterface.channelId as number;

View File

@@ -3,3 +3,11 @@ import { QueryClient } from '@tanstack/react-query';
export const queryClient = new QueryClient();
export type StrictOmit<T, K extends keyof T> = Omit<T, K>;
export const AbortSignalTimeout = (timeout: number) => {
// AbortSignal.timeout is not available as of expo 54
// TypeError: AbortSignal.timeout is not a function (it is undefined)
const controller = new AbortController();
setTimeout(() => controller.abort(), timeout);
return controller.signal;
}

View File

@@ -5,7 +5,7 @@
// https://github.com/jhugman/uniffi-bindgen-react-native/pull/198
// https://github.com/microsoft/TypeScript/issues/41883#issuecomment-1758692340
// TODO: Get this merged
// https://github.com/EthanShoeDev/uniffi-bindgen-react-native/tree/build-ts
// https://github.com/jhugman/uniffi-bindgen-react-native/pull/297
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,

View File

@@ -2,7 +2,7 @@
"name": "fressh",
"private": true,
"version": "workspace:*",
"packageManager": "pnpm@10.16.0",
"packageManager": "pnpm@10.16.1",
"type": "module",
"engines": {
"node": ">=22"

View File

@@ -65,11 +65,11 @@
"@react-native/babel-preset": "0.81.1",
"@react-native/eslint-config": "^0.81.1",
"@release-it/conventional-changelog": "^10.0.1",
"@types/jest": "^29.5.14",
"@types/jest": "^30.0.0",
"@types/react": "~19.1.12",
"del-cli": "^6.0.0",
"eslint": "^9.35.0",
"jest": "^29.7.0",
"jest": "^30.1.3",
"prettier": "^3.6.2",
"react": "19.1.0",
"react-native": "0.81.4",
@@ -82,7 +82,6 @@
"react": "19.1.0",
"react-native": "0.81.4"
},
"packageManager": "pnpm@10.15.1",
"jest": {
"preset": "react-native",
"modulePathIgnorePatterns": [

946
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff