mbflash 1.2.1 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -4
- package/mbflash.mjs +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,9 +3,17 @@
|
|
|
3
3
|
[](https://github.com/tai/mbflash/actions/workflows/ci.yml)
|
|
4
4
|
[](https://www.npmjs.com/package/mbflash)
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+

|
|
7
|
+
|
|
8
|
+
mbflash is a bridge between an AI coding agent and the micro:bit MakeCode
|
|
9
|
+
editor. It connects an agentic coding workflow — where a model writes files on
|
|
10
|
+
disk and runs commands — to the traditional text and block experience people
|
|
11
|
+
actually use in MakeCode: an agent writes ordinary TypeScript, mbflash pushes it
|
|
12
|
+
into a live editor tab, and the program reappears as Blocks.
|
|
13
|
+
|
|
14
|
+
From there mbflash can compile and download the `.hex` and flash it by writing
|
|
15
|
+
to the `MICROBIT` volume, so there is no WebUSB pairing step. The CLI itself is
|
|
16
|
+
dependency-free and talks to the browser over CDP.
|
|
9
17
|
|
|
10
18
|
```sh
|
|
11
19
|
mbflash main.ts
|
|
@@ -253,7 +261,7 @@ This repository is <https://github.com/tai/mbflash>.
|
|
|
253
261
|
```sh
|
|
254
262
|
npm test
|
|
255
263
|
npm publish
|
|
256
|
-
git tag v1.2.
|
|
264
|
+
git tag v1.2.3 # use the new version
|
|
257
265
|
git push origin main --tags
|
|
258
266
|
```
|
|
259
267
|
|
package/mbflash.mjs
CHANGED
|
@@ -20,7 +20,9 @@ if (nodeMajor < 22 || (nodeMajor === 22 && nodeMinor < 4) || typeof globalThis.W
|
|
|
20
20
|
process.exit(1);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
const VERSION =
|
|
23
|
+
const VERSION = JSON.parse(
|
|
24
|
+
fs.readFileSync(new URL("./package.json", import.meta.url), "utf8"),
|
|
25
|
+
).version;
|
|
24
26
|
const DEFAULT_HOST = "makecode.microbit.org";
|
|
25
27
|
const DEFAULT_CDP = "127.0.0.1:9222";
|
|
26
28
|
|