Feat/add js repo to monorepo (#683)

* feat: move js repo into web monorepo

* added readme

* Update packages/core/README.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update packages/transport-http/README.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update packages/transport-web-bluetooth/README.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Dan Ditomaso
2025-06-26 11:52:57 -04:00
committed by GitHub
co-authored by Copilot
parent 1c13343e8a
commit 72edb1897f
34 changed files with 3249 additions and 24 deletions
+27
View File
@@ -0,0 +1,27 @@
# @meshtastic/transport-deno
[![JSR](https://jsr.io/badges/@meshtastic/transport-deno)](https://jsr.io/@meshtastic/transport-deno)
[![CI](https://img.shields.io/github/actions/workflow/status/meshtastic/js/ci.yml?branch=master&label=actions&logo=github&color=yellow)](https://github.com/meshtastic/js/actions/workflows/ci.yml)
[![CLA assistant](https://cla-assistant.io/readme/badge/meshtastic/meshtastic.js)](https://cla-assistant.io/meshtastic/meshtastic.js)
[![Fiscal Contributors](https://opencollective.com/meshtastic/tiers/badge.svg?label=Fiscal%20Contributors&color=deeppink)](https://opencollective.com/meshtastic/)
[![Vercel](https://img.shields.io/static/v1?label=Powered%20by&message=Vercel&style=flat&logo=vercel&color=000000)](https://vercel.com?utm_source=meshtastic&utm_campaign=oss)
## Overview
`@meshtastic/transport-deno` Provides TCP transport (Deno) for Meshtastic
devices. Installation instructions are avaliable at
[JSR](https://jsr.io/@meshtastic/transport-deno)
## Usage
```ts
import { MeshDevice } from "@meshtastic/core";
import { TransportDeno } from "@meshtastic/transport-deno";
const transport = await TransportDeno.create("10.10.0.57");
const device = new MeshDevice(transport);
```
## Stats
![Alt](https://repobeats.axiom.co/api/embed/5330641586e92a2ec84676fedb98f6d4a7b25d69.svg "Repobeats analytics image")
+7
View File
@@ -0,0 +1,7 @@
{
"name": "@meshtastic/transport-deno",
"version": "0.1.1",
"exports": {
".": "./mod.ts"
}
}
+1
View File
@@ -0,0 +1 @@
export { TransportDeno } from "./src/transport.ts";
+32
View File
@@ -0,0 +1,32 @@
import { Utils } from "@meshtastic/core";
import type { Types } from "@meshtastic/core";
export class TransportDeno implements Types.Transport {
private _toDevice: WritableStream<Uint8Array>;
private _fromDevice: ReadableStream<Types.DeviceOutput>;
public static async create(hostname: string): Promise<TransportDeno> {
const connection = await Deno.connect({
hostname,
port: 4403,
});
return new TransportDeno(connection);
}
constructor(connection: Deno.Conn) {
Utils.toDeviceStream.readable.pipeTo(connection.writable);
this._toDevice = Utils.toDeviceStream.writable;
this._fromDevice = connection.readable.pipeThrough(
Utils.fromDeviceStream(),
);
}
get toDevice(): WritableStream<Uint8Array> {
return this._toDevice;
}
get fromDevice(): ReadableStream<Types.DeviceOutput> {
return this._fromDevice;
}
}