small tweaks

This commit is contained in:
EthanShoeDev
2025-10-07 10:19:45 -04:00
parent 8e7ec01e28
commit e4139c6f7b
7 changed files with 99 additions and 32 deletions

View File

@@ -16,11 +16,42 @@ Peer dependencies (you manage): `react`, `react-native`.
### Usage
This package exposes a native Rust module for SSH transport. For a complete,
working integration, see the example app in this monorepo at `apps/mobile`.
working integration, see the example app:
- https://github.com/EthanShoeDev/fressh/tree/main/apps/mobile
### API overview
High-level API surface (see code for full types):
```ts
import { RnRussh } from '@fressh/react-native-uniffi-russh';
await RnRussh.uniffiInitAsync();
const conn = await RnRussh.connect({
host: 'example.com',
port: 22,
username: 'me',
security: { type: 'password', password: '...' },
onServerKey: async () => true,
});
const shell = await conn.startShell({ term: 'Xterm' });
shell.addListener(
(ev) => {
// handle TerminalChunk or DropNotice
},
{ cursor: { mode: 'live' } },
);
```
### Links
- Changelog: [`CHANGELOG.md`](./CHANGELOG.md)
- Contributing: see the monorepo guide at
[`../../CONTRIBUTING.md`](../../CONTRIBUTING.md)
- Changelog:
[`CHANGELOG.md`](https://github.com/EthanShoeDev/fressh/blob/main/packages/react-native-uniffi-russh/CHANGELOG.md)
- Contributing:
[`CONTRIBUTING.md`](https://github.com/EthanShoeDev/fressh/blob/main/CONTRIBUTING.md)
- API source:
[`src/api.ts`](https://github.com/EthanShoeDev/fressh/blob/main/packages/react-native-uniffi-russh/src/api.ts)
- License: MIT

View File

@@ -1,6 +1,6 @@
{
"name": "@fressh/react-native-uniffi-russh",
"homepage": "https://github.com/EthanShoeDev/fressh",
"homepage": "https://github.com/EthanShoeDev/fressh#readme",
"license": "MIT",
"description": "Uniffi bindings for russh",
"version": "0.0.1",
@@ -52,15 +52,23 @@
"release": "GITHUB_TOKEN=$(gh auth token) release-it",
"release:dry": "release-it --dry-run"
},
"keywords": [
"react-native",
"ios",
"android"
],
"repository": {
"type": "git",
"url": "git+https://github.com/EthanShoeDev/fressh.git"
},
"bugs": {
"url": "https://github.com/EthanShoeDev/fressh/issues"
},
"keywords": [
"react-native",
"ssh",
"russh",
"uniffi",
"rust",
"expo",
"android",
"ios"
],
"author": "EthanShoeDev <13422990+EthanShoeDev@users.noreply.github.com> (https://github.com/EthanShoeDev)",
"publishConfig": {
"registry": "https://registry.npmjs.org/"

View File

@@ -24,7 +24,7 @@
"dependsOn": ["build:bob"],
},
"typecheck": {
"dependsOn": ["build:native"],
"dependsOn": ["build:native", "build:bob"],
},
// Special tasks