dembrandt 0.19.2 → 0.19.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 CHANGED
@@ -62,7 +62,7 @@ Load extractions, track token drift, and compare snapshots. **[dembrandt.com/app
62
62
 
63
63
  ## Recipes
64
64
 
65
- **[dembrandt.com/recipes](https://www.dembrandt.com/recipes)** — 38 ready-to-run workflows. Copy a command, paste a prompt, get a result. Covers competitor benchmarking, WCAG audits, CI/CD drift detection, Figma token push, and agentic design system builds. Filterable by role.
65
+ **[dembrandt.com/recipes](https://www.dembrandt.com/recipes)** — ready-to-run workflows. Copy a command, paste a prompt, get a result. Covers competitor benchmarking, WCAG audits, CI/CD drift detection, Figma token push, and agentic design system builds. Filterable by role.
66
66
 
67
67
  ## What to expect from extraction?
68
68
 
@@ -143,12 +143,24 @@ dembrandt example.com --browser=firefox --save-output --dtcg
143
143
  - WSL environments where headless Chromium may struggle
144
144
 
145
145
  **Installation:**
146
- Firefox browser is installed automatically with `npm install`. If you need to install manually:
146
+ Browsers are installed on demand, not by `npm install` (dembrandt depends on the lean `playwright-core`, which carries no browser binaries). Fetch the engine you need, matched to the installed `playwright-core`:
147
147
 
148
148
  ```bash
149
+ npm run install-browser # chromium (default)
150
+ # or a specific engine:
149
151
  npx playwright@$(node -p "require('playwright-core/package.json').version") install firefox
150
152
  ```
151
153
 
154
+ ### Connect to an existing browser (CDP)
155
+
156
+ Skip the bundled browser entirely and drive an already-running Chromium over the DevTools Protocol. Useful in CI or containers where a browser is already up, and it needs no local browser download at all:
157
+
158
+ ```bash
159
+ BROWSER_CDP_ENDPOINT=http://localhost:9222 dembrandt example.com --browser chromium
160
+ ```
161
+
162
+ CDP is supported only with `--browser chromium`.
163
+
152
164
  ### W3C Design Tokens (DTCG) Format
153
165
 
154
166
  Use `--dtcg` to export in the standardized [W3C Design Tokens Community Group](https://www.designtokens.org/) format:
@@ -1,12 +1,14 @@
1
1
  /**
2
2
  * Lazy loader for the playwright-core browser engines.
3
3
  *
4
- * playwright is an optional peer dependency: consumers that use only the pure
5
- * exports (drift, types, normalize, dtcg) are not forced to install the
6
- * browser stack. Anything that actually drives a browser routes its import
7
- * through here, so a missing install surfaces a clear instruction instead of
8
- * a raw ERR_MODULE_NOT_FOUND at startup. Static `import` would fail at module
9
- * load, before any guard could run; dynamic `import()` defers it to use.
4
+ * playwright-core (the driver, ~10MB, no browser download) is a regular
5
+ * dependency, so the import resolves on a plain install without pulling the
6
+ * ~150MB browser binaries onto every consumer library-only importers
7
+ * (drift, types, normalize, dtcg) and Vercel/CI installs stay lean. The actual
8
+ * browser binary is fetched on demand (`npx playwright install chromium` or
9
+ * `npm run install-browser`), so only callers that really extract pay for it.
10
+ * The import is still routed through here and guarded so a missing engine
11
+ * surfaces a clear instruction; dynamic `import()` defers resolution to use.
10
12
  */
11
13
  export declare class PlaywrightMissingError extends Error {
12
14
  constructor();
@@ -1,16 +1,18 @@
1
1
  /**
2
2
  * Lazy loader for the playwright-core browser engines.
3
3
  *
4
- * playwright is an optional peer dependency: consumers that use only the pure
5
- * exports (drift, types, normalize, dtcg) are not forced to install the
6
- * browser stack. Anything that actually drives a browser routes its import
7
- * through here, so a missing install surfaces a clear instruction instead of
8
- * a raw ERR_MODULE_NOT_FOUND at startup. Static `import` would fail at module
9
- * load, before any guard could run; dynamic `import()` defers it to use.
4
+ * playwright-core (the driver, ~10MB, no browser download) is a regular
5
+ * dependency, so the import resolves on a plain install without pulling the
6
+ * ~150MB browser binaries onto every consumer library-only importers
7
+ * (drift, types, normalize, dtcg) and Vercel/CI installs stay lean. The actual
8
+ * browser binary is fetched on demand (`npx playwright install chromium` or
9
+ * `npm run install-browser`), so only callers that really extract pay for it.
10
+ * The import is still routed through here and guarded so a missing engine
11
+ * surfaces a clear instruction; dynamic `import()` defers resolution to use.
10
12
  */
11
13
  export class PlaywrightMissingError extends Error {
12
14
  constructor() {
13
- super('playwright not installed, run: npm i playwright');
15
+ super('browser engine not available, run: npx playwright install chromium');
14
16
  this.name = 'PlaywrightMissingError';
15
17
  }
16
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"browser.js","sourceRoot":"","sources":["../../lib/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IAC/C;QACE,KAAK,CAAC,iDAAiD,CAAC,CAAC;QACzD,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;IACvC,CAAC;CACF;AAED,MAAM,CAAC,KAAK,UAAU,kBAAkB;IACtC,IAAI,CAAC;QACH,OAAO,MAAM,MAAM,CAAC,iBAAiB,CAAC,CAAC;IACzC,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,sBAAsB,EAAE,CAAC;IACrC,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"browser.js","sourceRoot":"","sources":["../../lib/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IAC/C;QACE,KAAK,CAAC,oEAAoE,CAAC,CAAC;QAC5E,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;IACvC,CAAC;CACF;AAED,MAAM,CAAC,KAAK,UAAU,kBAAkB;IACtC,IAAI,CAAC;QACH,OAAO,MAAM,MAAM,CAAC,iBAAiB,CAAC,CAAC;IACzC,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,sBAAsB,EAAE,CAAC;IACrC,CAAC;AACH,CAAC"}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dembrandt",
3
- "version": "0.19.2",
3
+ "version": "0.19.3",
4
4
  "description": "Extract design tokens and publicly visible CSS information from any website",
5
5
  "mcpName": "io.github.dembrandt/dembrandt",
6
6
  "main": "dist/index.js",
@@ -67,25 +67,22 @@
67
67
  "dependencies": {
68
68
  "chalk": "^5.3.0",
69
69
  "commander": "^11.1.0",
70
- "ora": "^7.0.1"
70
+ "ora": "^7.0.1",
71
+ "playwright-core": "^1.60.0"
71
72
  },
72
73
  "peerDependencies": {
73
74
  "@modelcontextprotocol/sdk": "1.29.0",
74
- "playwright": "^1.57.0",
75
- "playwright-core": "1.60.0",
75
+ "playwright": "^1.60.0",
76
76
  "zod": "4.3.6"
77
77
  },
78
78
  "peerDependenciesMeta": {
79
79
  "@modelcontextprotocol/sdk": {
80
80
  "optional": true
81
81
  },
82
- "playwright": {
83
- "optional": true
84
- },
85
- "playwright-core": {
82
+ "zod": {
86
83
  "optional": true
87
84
  },
88
- "zod": {
85
+ "playwright": {
89
86
  "optional": true
90
87
  }
91
88
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dembrandt",
3
- "version": "0.19.2",
3
+ "version": "0.19.3",
4
4
  "description": "Extract design tokens and publicly visible CSS information from any website",
5
5
  "mcpName": "io.github.dembrandt/dembrandt",
6
6
  "main": "dist/index.js",
@@ -67,25 +67,22 @@
67
67
  "dependencies": {
68
68
  "chalk": "^5.3.0",
69
69
  "commander": "^11.1.0",
70
- "ora": "^7.0.1"
70
+ "ora": "^7.0.1",
71
+ "playwright-core": "^1.60.0"
71
72
  },
72
73
  "peerDependencies": {
73
74
  "@modelcontextprotocol/sdk": "1.29.0",
74
- "playwright": "^1.57.0",
75
- "playwright-core": "1.60.0",
75
+ "playwright": "^1.60.0",
76
76
  "zod": "4.3.6"
77
77
  },
78
78
  "peerDependenciesMeta": {
79
79
  "@modelcontextprotocol/sdk": {
80
80
  "optional": true
81
81
  },
82
- "playwright": {
83
- "optional": true
84
- },
85
- "playwright-core": {
82
+ "zod": {
86
83
  "optional": true
87
84
  },
88
- "zod": {
85
+ "playwright": {
89
86
  "optional": true
90
87
  }
91
88
  },