@dheerajsom/pinhub 0.1.0 → 0.1.1

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.
@@ -1,2 +1,6 @@
1
1
  import type { Board } from "../model.js";
2
+ /**
3
+ * Flagship boards keep richer hand-written modules; the rest of the catalog
4
+ * is generated from the PinHub website data (see cli/scripts/).
5
+ */
2
6
  export declare const boards: Board[];
@@ -3,10 +3,16 @@ import { raspberryPiPico } from "./raspberry-pi-pico.js";
3
3
  import { raspberryPiPicoW } from "./raspberry-pi-pico-w.js";
4
4
  import { arduinoUnoR3 } from "./arduino-uno-r3.js";
5
5
  import { esp32DevkitV1 } from "./esp32-devkit-v1.js";
6
+ import { generatedBoards } from "./generated.js";
7
+ /**
8
+ * Flagship boards keep richer hand-written modules; the rest of the catalog
9
+ * is generated from the PinHub website data (see cli/scripts/).
10
+ */
6
11
  export const boards = [
7
12
  raspberryPi5,
8
13
  raspberryPiPico,
9
14
  raspberryPiPicoW,
10
15
  arduinoUnoR3,
11
16
  esp32DevkitV1,
17
+ ...generatedBoards,
12
18
  ];
@@ -176,6 +176,9 @@ export function renderBoard(board, opts) {
176
176
  }
177
177
  lines.push(...renderWarnings(board, opts));
178
178
  lines.push("");
179
+ if (board.headers.length === 0) {
180
+ lines.push(c.dim(`No pinout data for this board yet — see ph ${board.id} --source for documentation.`));
181
+ }
179
182
  board.headers.forEach((header, index) => {
180
183
  if (index > 0)
181
184
  lines.push("");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dheerajsom/pinhub",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Hardware board pinout diagrams in your terminal. `ph rpi5` and go.",
5
5
  "keywords": [
6
6
  "pinout",
@@ -32,6 +32,7 @@
32
32
  },
33
33
  "scripts": {
34
34
  "dev": "tsx src/cli.ts",
35
+ "generate:boards": "tsx scripts/generate-boards.ts",
35
36
  "build": "tsc -p tsconfig.json",
36
37
  "test": "vitest run",
37
38
  "lint": "eslint .",