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.
Files changed (3) hide show
  1. package/README.md +12 -4
  2. package/mbflash.mjs +3 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -3,9 +3,17 @@
3
3
  [![CI](https://github.com/tai/mbflash/actions/workflows/ci.yml/badge.svg)](https://github.com/tai/mbflash/actions/workflows/ci.yml)
4
4
  [![npm](https://img.shields.io/npm/v/mbflash.svg)](https://www.npmjs.com/package/mbflash)
5
5
 
6
- A dependency-free CLI for driving the micro:bit MakeCode editor over CDP:
7
- load TypeScript, commit it to Blocks, compile/download the `.hex`, and flash it
8
- by writing to the `MICROBIT` volume (no WebUSB pairing needed).
6
+ ![The Test5 project in the micro:bit MakeCode editor: blocks on the canvas and the micro:bit simulator, as seen by an agent-driven mbflash session](https://raw.githubusercontent.com/tai/mbflash/main/docs/makecode-test5.png)
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.1 # use the new version
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 = "1.2.0";
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mbflash",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "Load, build, and flash micro:bit MakeCode projects over CDP",
5
5
  "type": "module",
6
6
  "bin": {