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 +14 -2
- package/dist/lib/browser.d.ts +8 -6
- package/dist/lib/browser.js +9 -7
- package/dist/lib/browser.js.map +1 -1
- package/dist/package.json +6 -9
- package/package.json +6 -9
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)** —
|
|
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
|
-
|
|
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:
|
package/dist/lib/browser.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Lazy loader for the playwright-core browser engines.
|
|
3
3
|
*
|
|
4
|
-
* playwright
|
|
5
|
-
*
|
|
6
|
-
* browser
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
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();
|
package/dist/lib/browser.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Lazy loader for the playwright-core browser engines.
|
|
3
3
|
*
|
|
4
|
-
* playwright
|
|
5
|
-
*
|
|
6
|
-
* browser
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
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('
|
|
15
|
+
super('browser engine not available, run: npx playwright install chromium');
|
|
14
16
|
this.name = 'PlaywrightMissingError';
|
|
15
17
|
}
|
|
16
18
|
}
|
package/dist/lib/browser.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../../lib/browser.ts"],"names":[],"mappings":"AAAA
|
|
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.
|
|
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.
|
|
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
|
-
"
|
|
83
|
-
"optional": true
|
|
84
|
-
},
|
|
85
|
-
"playwright-core": {
|
|
82
|
+
"zod": {
|
|
86
83
|
"optional": true
|
|
87
84
|
},
|
|
88
|
-
"
|
|
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.
|
|
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.
|
|
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
|
-
"
|
|
83
|
-
"optional": true
|
|
84
|
-
},
|
|
85
|
-
"playwright-core": {
|
|
82
|
+
"zod": {
|
|
86
83
|
"optional": true
|
|
87
84
|
},
|
|
88
|
-
"
|
|
85
|
+
"playwright": {
|
|
89
86
|
"optional": true
|
|
90
87
|
}
|
|
91
88
|
},
|