Browse Source

fixed github workflows to improve handling of mutl runtimes

pull/722/head
Dan Ditomaso 1 year ago
parent
commit
1cba046cbd
  1. 9
      .github/workflows/ci.yml
  2. 12
      .github/workflows/release.yml
  3. 16
      README.md
  4. 11
      biome.json
  5. 117
      bun.lock
  6. 5472
      deno.lock
  7. 23
      package.json
  8. 11
      packages/core/deno.json
  9. 12
      packages/core/package.json
  10. 6
      packages/core/src/meshDevice.ts
  11. 0
      packages/transport-deno/package.json
  12. 5
      packages/transport-http/jsr.json
  13. 7
      packages/transport-http/package.json
  14. 0
      packages/transport-node/package.json
  15. 5
      packages/transport-web-bluetooth/jsr.json
  16. 4
      packages/transport-web-bluetooth/package.json
  17. 16
      packages/transport-web-bluetooth/src/transport.ts
  18. 14
      packages/transport-web-serial/deno.json
  19. 5
      packages/transport-web-serial/jsr.json
  20. 14
      packages/transport-web-serial/package.json
  21. 4
      packages/web/package.json
  22. 8
      scripts/build_npm_package.ts

9
.github/workflows/ci.yml

@ -30,7 +30,7 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.cache/deno
key: ${{ runner.os }}-deno-${{ hashFiles('**/deno.lock', '**/deno.json', '**/deno.jsonc') }}
key: ${{ runner.os }}-deno-${{ hashFiles('**/deno.lock', '**/package.json') }}
restore-keys: |
${{ runner.os }}-deno-
@ -40,7 +40,7 @@ jobs:
path: |
~/.bun/install/cache
packages/web/node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
@ -60,10 +60,7 @@ jobs:
for pkg_dir in ${{ steps.changed_packages.outputs.all_changed_and_modified_files }}; do
echo "🔍 Inspecting $pkg_dir..."
if [[ -f "$pkg_dir/deno.json" ]]; then
echo "🔧 Building with Deno: $pkg_dir"
deno task build "$pkg_dir"
elif [[ -f "$pkg_dir/bun.lockb" ]]; then
if [[ -f "$pkg_dir/deno.lock" ]]; then
echo "🔧 Building with Bun: $pkg_dir"
(cd "$pkg_dir" && bun install && bun run build)
else

12
.github/workflows/release.yml

@ -47,7 +47,7 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.cache/deno
key: ${{ runner.os }}-deno-${{ hashFiles('**/deno.lock', '**/deno.json', '**/deno.jsonc') }}
key: ${{ runner.os }}-deno-${{ hashFiles('**/deno.lock') }}
restore-keys: |
${{ runner.os }}-deno-
@ -80,7 +80,7 @@ jobs:
run: |
set -euo pipefail
excluded=("packages/web" "packages/transport-deno")
excluded=("packages/web" "packages/transport-deno" "packages/transport-node")
for pkg_dir in ${{ steps.changed_packages.outputs.all_changed_and_modified_files }}; do
echo "🔍 Inspecting $pkg_dir"
@ -90,12 +90,12 @@ jobs:
continue
fi
if [[ -f "$pkg_dir/deno.json" ]]; then
echo "🦕 Building with Deno: $pkg_dir"
deno task build "$pkg_dir"
if [[ -f "$pkg_dir/jsr.json" ]]; then
echo "🦕 Publishing to NPM: $pkg_dir"
bun run build:npm $pkg_dir
echo "📦 Publishing to JSR"
(cd "$pkg_dir" && deno publish --allow-dirty)
elif [[ -f "$pkg_dir/bun.lockb" ]]; then
elif [[ -f "$pkg_dir/bun.lock" ]]; then
echo "🥖 Building with Bun: $pkg_dir"
(cd "$pkg_dir" && bun install && bun run build)
else

16
README.md

@ -56,8 +56,8 @@ This monorepo leverages the following technologies:
### Prerequisites
You'll need to have [Bun](https://bun.sh/) installed to work with this
monorepo. Follow the installation instructions on their home page.
You'll need to have [Bun](https://bun.sh/) installed to work with this monorepo.
Follow the installation instructions on their home page.
### Development Setup
@ -80,22 +80,12 @@ monorepo. Follow the installation instructions on their home page.
To start the development server for the web client:
```bash
bun run --filter web dev
cd ./packages/web && bun run dev
```
This will typically run the web client on http://localhost:3000 and requires a
Chromium browser
## Meshtastic JS Packages
While the js packages are primarily libraries, you can run their tests or
specific development scripts if defined within their package.json files. For
example, to run tests for a specific package:
```bash
bun run --filter core test
```
### Feedback
If you encounter any issues with nightly builds, please report them in our

11
packages/web/biome.json → biome.json

@ -1,7 +1,6 @@
{
"$schema": "https://biomejs.dev/schemas/2.0.5/schema.json",
"files": {
"includes": ["**", "!node_modules/**", "!**/*.css", "!dist/**", "!build/**", "!coverage/**", "!**/*.d.ts"],
"includes": ["**/*.ts", "**/*.tsx", "!**/*.test.ts", "!**/*.test.tsx", "!npm_modules/**", "!dist/**", "!npm/**"],
"ignoreUnknown": false
},
"formatter": {
@ -14,6 +13,7 @@
},
"linter": {
"enabled": true,
"includes": ["**", "!test/**"],
"rules": {
"recommended": true,
"suspicious": {
@ -21,13 +21,9 @@
"noDebugger": "error"
},
"style": {
"useConst": "error",
"useBlockStatements": "error",
"useSingleVarDeclarator": "off"
},
"complexity": {
"noForEach": "off"
},
"correctness": {
"noUnusedVariables": "error",
"noUnusedImports": "error"
@ -42,8 +38,7 @@
},
"json": {
"formatter": {
"indentStyle": "space",
"indentWidth": 2
"enabled": false
}
}
}

117
bun.lock

@ -3,12 +3,51 @@
"workspaces": {
"": {
"name": "meshtastic-web",
"dependencies": {
"@bufbuild/protobuf": "^2.6.1",
"ste-simple-events": "^3.0.11",
"tslog": "^4.9.3",
},
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"bun": "^1.1.18",
"@types/node": "^22.16.4",
"bun": "^1.2.18",
"typescript": "^5.8.3",
},
},
"packages/core": {
"name": "@meshtastic/core",
"version": "2.6.5",
"dependencies": {
"@meshtastic/protobufs": "npm:@jsr/meshtastic__protobufs",
"crc": "npm:crc@^4.3.2",
},
},
"packages/transport-deno": {
"name": "@meshtastic/transport-deno",
"version": "0.1.1",
},
"packages/transport-http": {
"name": "@meshtastic/transport-http",
"version": "0.2.1",
},
"packages/transport-node": {
"name": "@meshtastic/transport-node",
"version": "0.0.1",
},
"packages/transport-web-bluetooth": {
"name": "@meshtastic/transport-web-bluetooth",
"version": "0.1.2",
"devDependencies": {
"@types/web-bluetooth": "npm:@types/web-bluetooth@^0.0.20",
},
},
"packages/transport-web-serial": {
"name": "@meshtastic/transport-web-serial",
"version": "0.2.1",
"dependencies": {
"@types/w3c-web-serial": "npm:@types/w3c-web-serial@^1.0.7",
},
},
"packages/web": {
"name": "meshtastic-web",
"version": "2.7.0-0",
@ -167,25 +206,25 @@
"@babel/types": ["@babel/[email protected]", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1" } }, "sha512-x0LvFTekgSX+83TI28Y9wYPUfzrnl2aT5+5QLnO6v7mSJYtEEevuDRN0F0uSHRk1G1IWZC43o00Y0xDDrpBGPQ=="],
"@biomejs/biome": ["@biomejs/biome@1.9.4", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "1.9.4", "@biomejs/cli-darwin-x64": "1.9.4", "@biomejs/cli-linux-arm64": "1.9.4", "@biomejs/cli-linux-arm64-musl": "1.9.4", "@biomejs/cli-linux-x64": "1.9.4", "@biomejs/cli-linux-x64-musl": "1.9.4", "@biomejs/cli-win32-arm64": "1.9.4", "@biomejs/cli-win32-x64": "1.9.4" }, "bin": { "biome": "bin/biome" } }, "sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog=="],
"@biomejs/biome": ["@biomejs/biome@2.0.6", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.0.6", "@biomejs/cli-darwin-x64": "2.0.6", "@biomejs/cli-linux-arm64": "2.0.6", "@biomejs/cli-linux-arm64-musl": "2.0.6", "@biomejs/cli-linux-x64": "2.0.6", "@biomejs/cli-linux-x64-musl": "2.0.6", "@biomejs/cli-win32-arm64": "2.0.6", "@biomejs/cli-win32-x64": "2.0.6" }, "bin": { "biome": "bin/biome" } }, "sha512-RRP+9cdh5qwe2t0gORwXaa27oTOiQRQvrFf49x2PA1tnpsyU7FIHX4ZOFMtBC4QNtyWsN7Dqkf5EDbg4X+9iqA=="],
"@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@1.9.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw=="],
"@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.0.6", "", { "os": "darwin", "cpu": "arm64" }, "sha512-AzdiNNjNzsE6LfqWyBvcL29uWoIuZUkndu+wwlXW13EKcBHbbKjNQEZIJKYDc6IL+p7bmWGx3v9ZtcRyIoIz5A=="],
"@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@1.9.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg=="],
"@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@2.0.6", "", { "os": "darwin", "cpu": "x64" }, "sha512-wJjjP4E7bO4WJmiQaLnsdXMa516dbtC6542qeRkyJg0MqMXP0fvs4gdsHhZ7p9XWTAmGIjZHFKXdsjBvKGIJJQ=="],
"@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@1.9.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g=="],
"@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@2.0.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-ZSVf6TYo5rNMUHIW1tww+rs/krol7U5A1Is/yzWyHVZguuB0lBnIodqyFuwCNqG9aJGyk7xIMS8HG0qGUPz0SA=="],
"@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@1.9.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA=="],
"@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@2.0.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-CVPEMlin3bW49sBqLBg2x016Pws7eUXA27XYDFlEtponD0luYjg2zQaMJ2nOqlkKG9fqzzkamdYxHdMDc2gZFw=="],
"@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@1.9.4", "", { "os": "linux", "cpu": "x64" }, "sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg=="],
"@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@2.0.6", "", { "os": "linux", "cpu": "x64" }, "sha512-geM1MkHTV1Kh2Cs/Xzot9BOF3WBacihw6bkEmxkz4nSga8B9/hWy5BDiOG3gHDGIBa8WxT0nzsJs2f/hPqQIQw=="],
"@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@1.9.4", "", { "os": "linux", "cpu": "x64" }, "sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg=="],
"@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@2.0.6", "", { "os": "linux", "cpu": "x64" }, "sha512-mKHE/e954hR/hSnAcJSjkf4xGqZc/53Kh39HVW1EgO5iFi0JutTN07TSjEMg616julRtfSNJi0KNyxvc30Y4rQ=="],
"@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@1.9.4", "", { "os": "win32", "cpu": "arm64" }, "sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg=="],
"@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@2.0.6", "", { "os": "win32", "cpu": "arm64" }, "sha512-290V4oSFoKaprKE1zkYVsDfAdn0An5DowZ+GIABgjoq1ndhvNxkJcpxPsiYtT7slbVe3xmlT0ncdfOsN7KruzA=="],
"@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@1.9.4", "", { "os": "win32", "cpu": "x64" }, "sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA=="],
"@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.0.6", "", { "os": "win32", "cpu": "x64" }, "sha512-bfM1Bce0d69Ao7pjTjUS+AWSZ02+5UHdiAP85Th8e9yV5xzw6JrHXbL5YWlcEKQ84FIZMdDc7ncuti1wd2sdbw=="],
"@bufbuild/protobuf": ["@bufbuild/[email protected].0", "", {}, "sha512-6cuonJVNOIL7lTj5zgo/Rc2bKAo4/GvN+rKCrUj7GdEHRzCk8zKOfFwUsL9nAVk5rSIsRmlgcpLzTRysopEeeg=="],
"@bufbuild/protobuf": ["@bufbuild/[email protected].1", "", {}, "sha512-DaG6XlyKpz08bmHY5SGX2gfIllaqtDJ/KwVoxsmP22COOLYwDBe7yD3DZGwXem/Xq7QOc9cuR7R3MpAv5CFfDw=="],
"@esbuild/aix-ppc64": ["@esbuild/[email protected]", "", { "os": "aix", "cpu": "ppc64" }, "sha512-ShbM/3XxwuxjFiuVBHA+d3j5dyac0aEVVq1oluIDf71hUw0aRF59dV/efUsIwFnR6m8JNM2FjZOzmaZ8yG61kw=="],
@ -281,13 +320,19 @@
"@maplibre/maplibre-gl-style-spec": ["@maplibre/[email protected]", "", { "dependencies": { "@mapbox/jsonlint-lines-primitives": "~2.0.2", "@mapbox/unitbezier": "^0.0.1", "json-stringify-pretty-compact": "^4.0.0", "minimist": "^1.2.8", "quickselect": "^3.0.0", "rw": "^1.3.3", "tinyqueue": "^3.0.0" }, "bin": { "gl-style-format": "dist/gl-style-format.mjs", "gl-style-migrate": "dist/gl-style-migrate.mjs", "gl-style-validate": "dist/gl-style-validate.mjs" } }, "sha512-IGJtuBbaGzOUgODdBRg66p8stnwj9iDXkgbYKoYcNiiQmaez5WVRfXm4b03MCDwmZyX93csbfHFWEJJYHnn5oA=="],
"@meshtastic/core": ["@jsr/[email protected]", "https://npm.jsr.io/~/11/@jsr/meshtastic__core/2.6.4.tgz", { "dependencies": { "@bufbuild/protobuf": "^2.2.3", "@jsr/meshtastic__protobufs": "^2.6.2", "crc": "^4.3.2", "ste-simple-events": "^3.0.11", "tslog": "^4.9.3" } }, "sha512-1Kz5DK6peFxluHOJR38vFwfgeJzMXTz+3p6TvibjILVhSQC2U1nu8aJbn6w5zhRqS+j79OmtrRvdzL6VNsTkkQ=="],
"@meshtastic/core": ["@meshtastic/core@workspace:packages/core"],
"@meshtastic/protobufs": ["@jsr/[email protected]", "https://npm.jsr.io/~/11/@jsr/meshtastic__protobufs/2.7.0.tgz", { "dependencies": { "@bufbuild/protobuf": "^2.2.3" } }, "sha512-ndZhUyB/ADSyjJI+iSeSOoIKqNGZ2+ERVjfY0qnh4jgF740tFTwefC5mzZhOqDLbreGFYS79+429NtH5Ujdzdg=="],
"@meshtastic/transport-deno": ["@meshtastic/transport-deno@workspace:packages/transport-deno"],
"@meshtastic/transport-http": ["@jsr/[email protected]", "https://npm.jsr.io/~/11/@jsr/meshtastic__transport-http/0.2.1.tgz", { "dependencies": { "@jsr/meshtastic__core": "^2.6.0" } }, "sha512-lmQKr3aIINKvtGROU4HchmSVqbZSbkIHqajowRRC8IAjsnR0zNTyxz210QyY4pFUF9hpcW3GRjwq5h/VO2JuGg=="],
"@meshtastic/transport-http": ["@meshtastic/transport-http@workspace:packages/transport-http"],
"@meshtastic/transport-web-bluetooth": ["@jsr/[email protected]", "https://npm.jsr.io/~/11/@jsr/meshtastic__transport-web-bluetooth/0.1.2.tgz", { "dependencies": { "@jsr/meshtastic__core": "^2.6.4" } }, "sha512-Z+5pv9RXNgY0/crKExOH3pZ6LT0HIXFmnBL7NX5AO2knOFRn+4lmxQEhhmiTTlkUfqyEfAvbjuY5u4mq9TPTdQ=="],
"@meshtastic/transport-node": ["@meshtastic/transport-node@workspace:packages/transport-node"],
"@meshtastic/transport-web-serial": ["@jsr/[email protected]", "https://npm.jsr.io/~/11/@jsr/meshtastic__transport-web-serial/0.2.1.tgz", { "dependencies": { "@jsr/meshtastic__core": "^2.6.0" } }, "sha512-yumjEGLkAuJYOC3aWKvZzbQqi/LnqaKfNpVCY7Ki7oLtAshNiZrBLiwiFhN7+ZR9FfMdJThyBMqREBDRRWTO1Q=="],
"@meshtastic/transport-web-bluetooth": ["@meshtastic/transport-web-bluetooth@workspace:packages/transport-web-bluetooth"],
"@meshtastic/transport-web-serial": ["@meshtastic/transport-web-serial@workspace:packages/transport-web-serial"],
"@noble/curves": ["@noble/[email protected]", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-HxngEd2XUcg9xi20JkwlLCtYwfoFw4JGkuZpT+WlsPD4gB/cxkvTD8fSsoAnphGZhFdZYKeQIPCuFlWPm1uE0g=="],
@ -781,7 +826,7 @@
"@types/mapbox__vector-tile": ["@types/[email protected]", "", { "dependencies": { "@types/geojson": "*", "@types/mapbox__point-geometry": "*", "@types/pbf": "*" } }, "sha512-bpd8dRn9pr6xKvuEBQup8pwQfD4VUyqO/2deGjfpe6AwC8YRlyEipvefyRJUSiCJTZuCb8Pl1ciVV5ekqJ96Bg=="],
"@types/node": ["@types/node@24.0.14", "", { "dependencies": { "undici-types": "~7.8.0" } }, "sha512-4zXMWD91vBLGRtHK3YbIoFMia+1nqEz72coM42C5ETjnNCa/heoj7NT1G67iAfOqMmcfhuCZ4uNpyz8EjlAejw=="],
"@types/node": ["@types/node@22.16.4", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-PYRhNtZdm2wH/NT2k/oAJ6/f2VD2N2Dag0lGlx2vWgMSJXGNmlce5MiTQzoWAiIJtso30mjnfQCOKVH+kAQC/g=="],
"@types/pbf": ["@types/[email protected]", "", {}, "sha512-j3pOPiEcWZ34R6a6mN07mUkM4o4Lwf6hPNt8eilOeZhTFbxFXmKhvXl9Y28jotFPaI1bpPDJsbCprUoNke6OrA=="],
@ -795,7 +840,7 @@
"@types/w3c-web-serial": ["@types/[email protected]", "", {}, "sha512-QQOT+bxQJhRGXoZDZGLs3ksLud1dMNnMiSQtBA0w8KXvLpXX4oM4TZb6J0GgJ8UbCaHo5s9/4VQT8uXy9JER2A=="],
"@types/web-bluetooth": ["@types/[email protected]1", "", {}, "sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA=="],
"@types/web-bluetooth": ["@types/[email protected]0", "", {}, "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow=="],
"@types/whatwg-mimetype": ["@types/[email protected]", "", {}, "sha512-c2AKvDT8ToxLIOUlN51gTiHXflsfIFisS4pO7pDPoKouJCESkhZnEy623gwP9laCy5lnLDAw1vAzu2vM2YLOrA=="],
@ -1335,7 +1380,7 @@
"typewise-core": ["[email protected]", "", {}, "sha512-2SCC/WLzj2SbUwzFOzqMCkz5amXLlxtJqDKTICqg30x+2DZxcfZN2MvQZmGfXWKNWaKK9pBPsvkcwv8bF/gxKg=="],
"undici-types": ["undici-types@7.8.0", "", {}, "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw=="],
"undici-types": ["undici-types@6.21.0", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="],
"union-value": ["[email protected]", "", { "dependencies": { "arr-union": "^3.1.0", "get-value": "^2.0.6", "is-extendable": "^0.1.1", "set-value": "^2.0.1" } }, "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg=="],
@ -1393,6 +1438,12 @@
"zustand": ["[email protected]", "", { "peerDependencies": { "@types/react": ">=18.0.0", "immer": ">=9.0.6", "react": ">=18.0.0", "use-sync-external-store": ">=1.2.0" }, "optionalPeers": ["@types/react", "immer", "react", "use-sync-external-store"] }, "sha512-ihAqNeUVhe0MAD+X8M5UzqyZ9k3FFZLBTtqo6JLPwV53cbRB/mJwBI0PxcIgqhBBHlEs8G45OTDTMq3gNcLq3A=="],
"@jsr/meshtastic__core/@bufbuild/protobuf": ["@bufbuild/[email protected]", "", {}, "sha512-6cuonJVNOIL7lTj5zgo/Rc2bKAo4/GvN+rKCrUj7GdEHRzCk8zKOfFwUsL9nAVk5rSIsRmlgcpLzTRysopEeeg=="],
"@jsr/meshtastic__protobufs/@bufbuild/protobuf": ["@bufbuild/[email protected]", "", {}, "sha512-6cuonJVNOIL7lTj5zgo/Rc2bKAo4/GvN+rKCrUj7GdEHRzCk8zKOfFwUsL9nAVk5rSIsRmlgcpLzTRysopEeeg=="],
"@meshtastic/protobufs/@bufbuild/protobuf": ["@bufbuild/[email protected]", "", {}, "sha512-6cuonJVNOIL7lTj5zgo/Rc2bKAo4/GvN+rKCrUj7GdEHRzCk8zKOfFwUsL9nAVk5rSIsRmlgcpLzTRysopEeeg=="],
"@tailwindcss/oxide-wasm32-wasi/@emnapi/core": ["@emnapi/[email protected]", "", { "dependencies": { "@emnapi/wasi-threads": "1.0.3", "tslib": "^2.4.0" }, "bundled": true }, "sha512-A9CnAbC6ARNMKcIcrQwq6HeHCjpcBZ5wSx4U01WXCqEKlrzB9F9315WDNHkrs2xbx7YjjSxbUYxuN6EQzpcY2g=="],
"@tailwindcss/oxide-wasm32-wasi/@emnapi/runtime": ["@emnapi/[email protected]", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-hHyapA4A3gPaDCNfiqyZUStTMqIkKRshqPIuDOXv1hcBnD4U3l8cP0T1HMCfGRxQ6V64TGCcoswChANyOAwbQg=="],
@ -1645,7 +1696,15 @@
"lru-cache/yallist": ["[email protected]", "", {}, "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="],
"meshtastic-web/@biomejs/biome": ["@biomejs/[email protected]", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.0.6", "@biomejs/cli-darwin-x64": "2.0.6", "@biomejs/cli-linux-arm64": "2.0.6", "@biomejs/cli-linux-arm64-musl": "2.0.6", "@biomejs/cli-linux-x64": "2.0.6", "@biomejs/cli-linux-x64-musl": "2.0.6", "@biomejs/cli-win32-arm64": "2.0.6", "@biomejs/cli-win32-x64": "2.0.6" }, "bin": { "biome": "bin/biome" } }, "sha512-RRP+9cdh5qwe2t0gORwXaa27oTOiQRQvrFf49x2PA1tnpsyU7FIHX4ZOFMtBC4QNtyWsN7Dqkf5EDbg4X+9iqA=="],
"meshtastic-web/@meshtastic/core": ["@jsr/[email protected]", "https://npm.jsr.io/~/11/@jsr/meshtastic__core/2.6.4.tgz", { "dependencies": { "@bufbuild/protobuf": "^2.2.3", "@jsr/meshtastic__protobufs": "^2.6.2", "crc": "^4.3.2", "ste-simple-events": "^3.0.11", "tslog": "^4.9.3" } }, "sha512-1Kz5DK6peFxluHOJR38vFwfgeJzMXTz+3p6TvibjILVhSQC2U1nu8aJbn6w5zhRqS+j79OmtrRvdzL6VNsTkkQ=="],
"meshtastic-web/@meshtastic/transport-http": ["@jsr/[email protected]", "https://npm.jsr.io/~/11/@jsr/meshtastic__transport-http/0.2.1.tgz", { "dependencies": { "@jsr/meshtastic__core": "^2.6.0" } }, "sha512-lmQKr3aIINKvtGROU4HchmSVqbZSbkIHqajowRRC8IAjsnR0zNTyxz210QyY4pFUF9hpcW3GRjwq5h/VO2JuGg=="],
"meshtastic-web/@meshtastic/transport-web-bluetooth": ["@jsr/[email protected]", "https://npm.jsr.io/~/11/@jsr/meshtastic__transport-web-bluetooth/0.1.2.tgz", { "dependencies": { "@jsr/meshtastic__core": "^2.6.4" } }, "sha512-Z+5pv9RXNgY0/crKExOH3pZ6LT0HIXFmnBL7NX5AO2knOFRn+4lmxQEhhmiTTlkUfqyEfAvbjuY5u4mq9TPTdQ=="],
"meshtastic-web/@meshtastic/transport-web-serial": ["@jsr/[email protected]", "https://npm.jsr.io/~/11/@jsr/meshtastic__transport-web-serial/0.2.1.tgz", { "dependencies": { "@jsr/meshtastic__core": "^2.6.0" } }, "sha512-yumjEGLkAuJYOC3aWKvZzbQqi/LnqaKfNpVCY7Ki7oLtAshNiZrBLiwiFhN7+ZR9FfMdJThyBMqREBDRRWTO1Q=="],
"meshtastic-web/@types/node": ["@types/[email protected]", "", { "dependencies": { "undici-types": "~7.8.0" } }, "sha512-4zXMWD91vBLGRtHK3YbIoFMia+1nqEz72coM42C5ETjnNCa/heoj7NT1G67iAfOqMmcfhuCZ4uNpyz8EjlAejw=="],
"peek-stream/through2": ["[email protected]", "", { "dependencies": { "readable-stream": "~2.3.6", "xtend": "~4.0.1" } }, "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ=="],
@ -1689,23 +1748,9 @@
"geojson-polygon-self-intersections/rbush/quickselect": ["[email protected]", "", {}, "sha512-qN0Gqdw4c4KGPsBOQafj6yj/PA6c/L63f6CaZ/DCF/xF4Esu3jVmKLUDYxghFx8Kb/O7y9tI7x2RjTSXwdK1iQ=="],
"happy-dom/@types/node/undici-types": ["[email protected]", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="],
"meshtastic-web/@biomejs/biome/@biomejs/cli-darwin-arm64": ["@biomejs/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-AzdiNNjNzsE6LfqWyBvcL29uWoIuZUkndu+wwlXW13EKcBHbbKjNQEZIJKYDc6IL+p7bmWGx3v9ZtcRyIoIz5A=="],
"meshtastic-web/@biomejs/biome/@biomejs/cli-darwin-x64": ["@biomejs/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-wJjjP4E7bO4WJmiQaLnsdXMa516dbtC6542qeRkyJg0MqMXP0fvs4gdsHhZ7p9XWTAmGIjZHFKXdsjBvKGIJJQ=="],
"meshtastic-web/@biomejs/biome/@biomejs/cli-linux-arm64": ["@biomejs/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-ZSVf6TYo5rNMUHIW1tww+rs/krol7U5A1Is/yzWyHVZguuB0lBnIodqyFuwCNqG9aJGyk7xIMS8HG0qGUPz0SA=="],
"meshtastic-web/@biomejs/biome/@biomejs/cli-linux-arm64-musl": ["@biomejs/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-CVPEMlin3bW49sBqLBg2x016Pws7eUXA27XYDFlEtponD0luYjg2zQaMJ2nOqlkKG9fqzzkamdYxHdMDc2gZFw=="],
"meshtastic-web/@biomejs/biome/@biomejs/cli-linux-x64": ["@biomejs/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-geM1MkHTV1Kh2Cs/Xzot9BOF3WBacihw6bkEmxkz4nSga8B9/hWy5BDiOG3gHDGIBa8WxT0nzsJs2f/hPqQIQw=="],
"meshtastic-web/@biomejs/biome/@biomejs/cli-linux-x64-musl": ["@biomejs/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-mKHE/e954hR/hSnAcJSjkf4xGqZc/53Kh39HVW1EgO5iFi0JutTN07TSjEMg616julRtfSNJi0KNyxvc30Y4rQ=="],
"meshtastic-web/@biomejs/biome/@biomejs/cli-win32-arm64": ["@biomejs/[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-290V4oSFoKaprKE1zkYVsDfAdn0An5DowZ+GIABgjoq1ndhvNxkJcpxPsiYtT7slbVe3xmlT0ncdfOsN7KruzA=="],
"meshtastic-web/@meshtastic/core/@bufbuild/protobuf": ["@bufbuild/[email protected]", "", {}, "sha512-6cuonJVNOIL7lTj5zgo/Rc2bKAo4/GvN+rKCrUj7GdEHRzCk8zKOfFwUsL9nAVk5rSIsRmlgcpLzTRysopEeeg=="],
"meshtastic-web/@biomejs/biome/@biomejs/cli-win32-x64": ["@biomejs/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-bfM1Bce0d69Ao7pjTjUS+AWSZ02+5UHdiAP85Th8e9yV5xzw6JrHXbL5YWlcEKQ84FIZMdDc7ncuti1wd2sdbw=="],
"meshtastic-web/@types/node/undici-types": ["[email protected]", "", {}, "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw=="],
"peek-stream/through2/readable-stream": ["[email protected]", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="],

5472
deno.lock

File diff suppressed because it is too large

23
package.json

@ -12,13 +12,28 @@
"url": "https://github.com/meshtastic/web/issues"
},
"homepage": "https://meshtastic.org",
"workspaces": ["packages/web"],
"workspaces": ["packages/*"],
"simple-git-hooks": {
"pre-commit": "bun run check:fix"
},
"scripts": {
"lint": "biome lint",
"lint:fix": "biome lint --write",
"format": "biome format",
"format:fix": "biome format . --write",
"check": "biome check",
"check:fix": "biome check --write",
"build:npm": "deno run -A scripts/build_npm_package.ts"
},
"dependencies": {
"@bufbuild/protobuf": "^2.6.1",
"@meshtastic/protobufs": "npm:@jsr/meshtastic__protobufs",
"ste-simple-events": "^3.0.11",
"tslog": "^4.9.3"
},
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"bun": "^1.1.18",
"typescript": "^5.8.3"
"bun": "^1.2.18",
"typescript": "^5.8.3",
"@types/node": "^22.16.4"
}
}

11
packages/core/deno.json

@ -1,11 +0,0 @@
{
"name": "@meshtastic/core",
"version": "2.6.4",
"description": "Core functionalities for Meshtastic web applications.",
"exports": {
".": "./mod.ts"
},
"imports": {
"crc": "npm:crc@^4.3.2"
}
}

12
packages/core/package.json

@ -0,0 +1,12 @@
{
"name": "@meshtastic/core",
"version": "2.6.5",
"description": "Core functionalities for Meshtastic web applications.",
"exports": {
".": "./mod.ts"
},
"dependencies": {
"crc": "npm:crc@^4.3.2"
}
}

6
packages/core/src/meshDevice.ts

@ -201,7 +201,7 @@ export class MeshDevice {
});
if (echoResponse) {
meshPacket.rxTime = Math.trunc(new Date().getTime() / 1000);
meshPacket.rxTime = Math.trunc();
this.handleMeshPacket(meshPacket);
}
return await this.sendRaw(
@ -838,8 +838,8 @@ export class MeshDevice {
dataPacket: Protobuf.Mesh.Data,
meshPacket: Protobuf.Mesh.MeshPacket,
) {
let adminMessage: Protobuf.Admin.AdminMessage | undefined = undefined;
let routingPacket: Protobuf.Mesh.Routing | undefined = undefined;
let adminMessage: Protobuf.Admin.AdminMessage | undefined;
let routingPacket: Protobuf.Mesh.Routing | undefined;
const packetMetadata: Omit<PacketMetadata<unknown>, "data"> = {
id: meshPacket.id,

0
packages/transport-deno/deno.json → packages/transport-deno/package.json

5
packages/transport-http/jsr.json

@ -0,0 +1,5 @@
{
"name": "@meshtastic/transport-http",
"version": "0.2.2",
"exports": "./mod.ts"
}

7
packages/transport-http/deno.json → packages/transport-http/package.json

@ -1,8 +1,9 @@
{
"name": "@meshtastic/transport-http",
"version": "0.2.1",
"version": "0.2.2",
"description": "A transport layer for Meshtastic applications using HTTP.",
"exports": {
".": "./mod.ts"
"exports": "./mod.ts",
"tasks": {
"build": "deno build"
}
}

0
packages/transport-node/deno.json → packages/transport-node/package.json

5
packages/transport-web-bluetooth/jsr.json

@ -0,0 +1,5 @@
{
"name": "@meshtastic/transport-web-bluetooth",
"version": "0.1.3",
"exports": "./mod.ts"
}

4
packages/transport-web-bluetooth/deno.json → packages/transport-web-bluetooth/package.json

@ -1,11 +1,11 @@
{
"name": "@meshtastic/transport-web-bluetooth",
"version": "0.1.2",
"version": "0.1.3",
"description": "A transport layer for Meshtastic applications using Web Bluetooth.",
"exports": {
".": "./mod.ts"
},
"imports": {
"devDependencies": {
"@types/web-bluetooth": "npm:@types/web-bluetooth@^0.0.20"
},
"compilerOptions": {

16
packages/transport-web-bluetooth/src/transport.ts

@ -17,15 +17,15 @@ export class TransportWebBluetooth implements Types.Transport {
public static async create(): Promise<TransportWebBluetooth> {
const device = await navigator.bluetooth.requestDevice({
filters: [{ services: [this.ServiceUuid] }],
filters: [{ services: [TransportWebBluetooth.ServiceUuid] }],
});
return await this.prepareConnection(device);
return await TransportWebBluetooth.prepareConnection(device);
}
public static async createFromDevice(
device: BluetoothDevice,
): Promise<TransportWebBluetooth> {
return await this.prepareConnection(device);
return await TransportWebBluetooth.prepareConnection(device);
}
public static async prepareConnection(
@ -37,16 +37,18 @@ export class TransportWebBluetooth implements Types.Transport {
throw new Error("Failed to connect to GATT server");
}
const service = await gattServer.getPrimaryService(this.ServiceUuid);
const service = await gattServer.getPrimaryService(
TransportWebBluetooth.ServiceUuid,
);
const toRadioCharacteristic = await service.getCharacteristic(
this.ToRadioUuid,
TransportWebBluetooth.ToRadioUuid,
);
const fromRadioCharacteristic = await service.getCharacteristic(
this.FromRadioUuid,
TransportWebBluetooth.FromRadioUuid,
);
const fromNumCharacteristic = await service.getCharacteristic(
this.FromNumUuid,
TransportWebBluetooth.FromNumUuid,
);
if (

14
packages/transport-web-serial/deno.json

@ -1,14 +0,0 @@
{
"name": "@meshtastic/transport-web-serial",
"version": "0.2.1",
"description": "A transport layer for Meshtastic applications using Web Serial API.",
"exports": {
".": "./mod.ts"
},
"imports": {
"@types/w3c-web-serial": "npm:@types/w3c-web-serial@^1.0.7"
},
"compilerOptions": {
"types": ["@types/w3c-web-serial"]
}
}

5
packages/transport-web-serial/jsr.json

@ -0,0 +1,5 @@
{
"name": "@meshtastic/transport-web-serial",
"version": "0.2.2",
"exports": "./mod.ts"
}

14
packages/transport-web-serial/package.json

@ -0,0 +1,14 @@
{
"name": "@meshtastic/transport-web-serial",
"version": "0.2.2",
"description": "A transport layer for Meshtastic applications using Web Serial API.",
"exports": {
".": "./mod.ts"
},
"dependencies": {
"@types/w3c-web-serial": "npm:@types/w3c-web-serial@^1.0.7"
},
"compilerOptions": {
"types": ["@types/w3c-web-serial"]
}
}

4
packages/web/package.json

@ -11,9 +11,7 @@
"bugs": {
"url": "https://github.com/meshtastic/web/issues"
},
"simple-git-hooks": {
"pre-commit": "bun run check:fix"
},
"homepage": "https://meshtastic.org",
"scripts": {
"build": "bunx --bun vite build",

8
scripts/build_npm_package.ts

@ -1,5 +1,5 @@
import { join } from "jsr:@std/path@1/join";
import { build, emptyDir } from "@deno/dnt";
import { build, emptyDir } from "https://jsr.io/@deno/dnt/0.42.3/mod.ts";
import { join } from "https://jsr.io/@std/path/1.1.1/mod.ts";
interface DenoJsonConfig {
name: string;
@ -26,7 +26,7 @@ if (Deno.args.length !== 1) {
}
const packagePath = Deno.args[0];
const denoJsonPath = join(packagePath, "deno.json");
const denoJsonPath = join(packagePath, "package.json");
const outDir = join(packagePath, "npm");
// Read the deno.json file to get the package metadata.
@ -64,6 +64,8 @@ try {
entryPoints: [join(packagePath, "mod.ts")],
outDir,
test: false,
esModule: true,
declaration: false,
shims: {
deno: true,
},

Loading…
Cancel
Save