Skip to content

Commit

Permalink
namespace protobufs
Browse files Browse the repository at this point in the history
  • Loading branch information
sachaw committed Jan 3, 2024
1 parent ce918ee commit 8263c92
Show file tree
Hide file tree
Showing 18 changed files with 219 additions and 224 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Biome
uses: biomejs/setup-biome@v1
with:
version: latest

- name: Run Biome
run: biome ci .
publish:
Expand All @@ -32,6 +34,11 @@ jobs:
with:
version: latest

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'latest'

- name: Install Dependencies
run: pnpm install

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@meshtastic/js",
"version": "2.2.17-3",
"version": "2.2.17-4",
"description": "Browser library for interfacing with meshtastic devices",
"license": "GPL-3.0-only",
"scripts": {
Expand Down Expand Up @@ -32,18 +32,18 @@
"url": "git+https://github.com/meshtastic/js.git"
},
"dependencies": {
"@buf/meshtastic_protobufs.bufbuild_es": "1.6.0-20231227193150-3f9c1dfd2a29.1",
"crc": "^4.3.2",
"sub-events": "^1.9.0",
"tslog": "^4.9.2"
},
"devDependencies": {
"@buf/meshtastic_protobufs.bufbuild_es": "1.6.0-20231227193150-3f9c1dfd2a29.1",
"@types/node": "^20.10.6",
"@types/w3c-web-serial": "^1.0.6",
"@types/web-bluetooth": "^0.0.20",
"biome": "^0.3.3",
"tsup": "^8.0.1",
"typedoc": "^0.25.4",
"typedoc": "^0.25.6",
"typescript": "^5.3.3"
}
}
24 changes: 12 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/adapters/bleConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from "../constants.js";
import { MeshDevice } from "../meshDevice.js";
import * as Types from "../types.js";
import { typedArrayToBuffer } from "../utils/general.js";
import { typedArrayToBuffer } from "../utils/index.js";

/** Allows to connect to a Meshtastic device via bluetooth */
export class BleConnection extends MeshDevice {
Expand Down
2 changes: 1 addition & 1 deletion src/adapters/httpConnection.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { MeshDevice } from "../meshDevice.js";
import * as Types from "../types.js";
import { typedArrayToBuffer } from "../utils/general.js";
import { typedArrayToBuffer } from "../utils/index.js";

/** Allows to connect to a Meshtastic device over HTTP(S) */
export class HttpConnection extends MeshDevice {
Expand Down
3 changes: 3 additions & 0 deletions src/adapters/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from "./bleConnection.js";
export * from "./httpConnection.js";
export * from "./serialConnection.js";
2 changes: 1 addition & 1 deletion src/adapters/serialConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { SubEvent } from "sub-events";

import { MeshDevice } from "../meshDevice.js";
import * as Types from "../types.js";
import { transformHandler } from "../utils/transformHandler.js";
import { transformHandler } from "../utils/index.js";

/** Allows to connect to a Meshtastic device over WebSerial */
export class SerialConnection extends MeshDevice {
Expand Down
8 changes: 5 additions & 3 deletions src/client.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { BleConnection } from "./adapters/bleConnection.js";
import { HttpConnection } from "./adapters/httpConnection.js";
import { SerialConnection } from "./adapters/serialConnection.js";
import {
BleConnection,
HttpConnection,
SerialConnection,
} from "./adapters/index.js";
import * as Types from "./types.js";

/**
Expand Down
25 changes: 6 additions & 19 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
import { BleConnection } from "./adapters/bleConnection.js";
import { HttpConnection } from "./adapters/httpConnection.js";
import { SerialConnection } from "./adapters/serialConnection.js";
import { Client } from "./client.js";
import { Constants } from "./constants.js";
import { MeshDevice } from "./meshDevice.js";
import * as Protobuf from "./protobufs.js";
import * as Types from "./types.js";

export {
Client,
MeshDevice,
BleConnection,
HttpConnection,
SerialConnection,
Types,
Constants,
Protobuf,
};
export * from "./adapters/index.js";
export * from "./client.js";
export * from "./constants.js";
export * from "./meshDevice.js";
export * as Protobuf from "./protobufs.js";
export * as Types from "./types.js";
Loading

0 comments on commit 8263c92

Please sign in to comment.