@mailwoman/registry 10.6.0 → 10.7.0
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.
|
@@ -3,14 +3,10 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* Playwright (headless Chromium) is a heavy dev-only dependency — lazy-imported at call time (the
|
|
12
|
-
* corpus-tools lazy-import convention), so importing `@mailwoman/registry/tools` never pays for
|
|
13
|
-
* it.
|
|
6
|
+
* This module configures the shared browser for Plotly and MapLibre rendering.
|
|
7
|
+
* SwiftShader supplies WebGL without a hardware GPU.
|
|
8
|
+
* Each caller owns navigation, readiness checks, and screenshots.
|
|
9
|
+
* The browser package loads Playwright and stealth plugins when a session starts.
|
|
14
10
|
*/
|
|
15
11
|
import type { Page } from "playwright";
|
|
16
12
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../tools/viz/browser.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../tools/viz/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAEtC;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC,QAAQ,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;CAC3C;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,EACvC,OAAO,EAAE,mBAAmB,EAC5B,EAAE,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,GAC5B,OAAO,CAAC;IAAE,MAAM,EAAE,CAAC,CAAC;IAAC,aAAa,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAUjD"}
|
package/out/tools/viz/browser.js
CHANGED
|
@@ -3,15 +3,12 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* Playwright (headless Chromium) is a heavy dev-only dependency — lazy-imported at call time (the
|
|
12
|
-
* corpus-tools lazy-import convention), so importing `@mailwoman/registry/tools` never pays for
|
|
13
|
-
* it.
|
|
6
|
+
* This module configures the shared browser for Plotly and MapLibre rendering.
|
|
7
|
+
* SwiftShader supplies WebGL without a hardware GPU.
|
|
8
|
+
* Each caller owns navigation, readiness checks, and screenshots.
|
|
9
|
+
* The browser package loads Playwright and stealth plugins when a session starts.
|
|
14
10
|
*/
|
|
11
|
+
import { withBrowserPage } from "@mailwoman/browser";
|
|
15
12
|
/**
|
|
16
13
|
* Launch headless Chromium (SwiftShader WebGL), open one page at `deviceScaleFactor: 2`,
|
|
17
14
|
* collect console + page errors, run `fn`, and dispose the browser.
|
|
@@ -19,16 +16,11 @@
|
|
|
19
16
|
* The callback owns navigation, waits and the screenshot.
|
|
20
17
|
*/
|
|
21
18
|
export async function withChromiumPage(options, fn) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
page.on("console", (m) => m.type() === "error" && errors.push(m.text()));
|
|
29
|
-
page.on("pageerror", (e) => errors.push(String(e)));
|
|
30
|
-
const result = await fn(page);
|
|
31
|
-
await browser[Symbol.asyncDispose]();
|
|
32
|
-
return { result, consoleErrors: errors };
|
|
19
|
+
return withBrowserPage({
|
|
20
|
+
launchOptions: {
|
|
21
|
+
args: ["--use-gl=angle", "--use-angle=swiftshader", "--enable-unsafe-swiftshader", "--ignore-gpu-blocklist"],
|
|
22
|
+
},
|
|
23
|
+
contextOptions: { viewport: options.viewport, deviceScaleFactor: 2 },
|
|
24
|
+
}, fn);
|
|
33
25
|
}
|
|
34
26
|
//# sourceMappingURL=browser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../../../tools/viz/browser.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../../../tools/viz/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAUpD;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACrC,OAA4B,EAC5B,EAA8B;IAE9B,OAAO,eAAe,CACrB;QACC,aAAa,EAAE;YACd,IAAI,EAAE,CAAC,gBAAgB,EAAE,yBAAyB,EAAE,6BAA6B,EAAE,wBAAwB,CAAC;SAC5G;QACD,cAAc,EAAE,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,iBAAiB,EAAE,CAAC,EAAE;KACpE,EACD,EAAE,CACF,CAAA;AACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mailwoman/registry",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.7.0",
|
|
4
4
|
"description": "The geocode-first record-matching application: resolve messy contact/organization records into canonical, geocoded entities (block → score → cluster) and export them as GeoJSON for spatial analysis. The clinic-funding use case mailwoman was built for.",
|
|
5
5
|
"license": "AGPL-3.0-only OR LicenseRef-Commercial",
|
|
6
6
|
"repository": {
|
|
@@ -95,19 +95,20 @@
|
|
|
95
95
|
}
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
98
|
-
"@mailwoman/address-id": "10.
|
|
99
|
-
"@mailwoman/annotations": "10.
|
|
100
|
-
"@mailwoman/core": "10.
|
|
101
|
-
"@mailwoman/match": "10.
|
|
102
|
-
"@mailwoman/record": "10.
|
|
103
|
-
"@mailwoman/resolver-wof-sqlite": "10.
|
|
104
|
-
"@mailwoman/spatial": "10.
|
|
105
|
-
"@mailwoman/sqlite": "10.
|
|
98
|
+
"@mailwoman/address-id": "10.7.0",
|
|
99
|
+
"@mailwoman/annotations": "10.7.0",
|
|
100
|
+
"@mailwoman/core": "10.7.0",
|
|
101
|
+
"@mailwoman/match": "10.7.0",
|
|
102
|
+
"@mailwoman/record": "10.7.0",
|
|
103
|
+
"@mailwoman/resolver-wof-sqlite": "10.7.0",
|
|
104
|
+
"@mailwoman/spatial": "10.7.0",
|
|
105
|
+
"@mailwoman/sqlite": "10.7.0",
|
|
106
106
|
"@protomaps/basemaps": "^5.7.2",
|
|
107
107
|
"h3-js": "^4.5.0",
|
|
108
108
|
"spliterator": "^9.2.1"
|
|
109
109
|
},
|
|
110
110
|
"devDependencies": {
|
|
111
|
+
"@mailwoman/browser": "10.5.0",
|
|
111
112
|
"@types/node": "^26.6.4",
|
|
112
113
|
"path-ts": "^2.5.0",
|
|
113
114
|
"playwright": "^1.63.0"
|
package/tools/viz/browser.ts
CHANGED
|
@@ -3,16 +3,13 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* Playwright (headless Chromium) is a heavy dev-only dependency — lazy-imported at call time (the
|
|
12
|
-
* corpus-tools lazy-import convention), so importing `@mailwoman/registry/tools` never pays for
|
|
13
|
-
* it.
|
|
6
|
+
* This module configures the shared browser for Plotly and MapLibre rendering.
|
|
7
|
+
* SwiftShader supplies WebGL without a hardware GPU.
|
|
8
|
+
* Each caller owns navigation, readiness checks, and screenshots.
|
|
9
|
+
* The browser package loads Playwright and stealth plugins when a session starts.
|
|
14
10
|
*/
|
|
15
11
|
|
|
12
|
+
import { withBrowserPage } from "@mailwoman/browser"
|
|
16
13
|
import type { Page } from "playwright"
|
|
17
14
|
|
|
18
15
|
/**
|
|
@@ -32,20 +29,13 @@ export async function withChromiumPage<T>(
|
|
|
32
29
|
options: ChromiumPageOptions,
|
|
33
30
|
fn: (page: Page) => Promise<T>
|
|
34
31
|
): Promise<{ result: T; consoleErrors: string[] }> {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
page.on("console", (m) => m.type() === "error" && errors.push(m.text()))
|
|
45
|
-
page.on("pageerror", (e) => errors.push(String(e)))
|
|
46
|
-
|
|
47
|
-
const result = await fn(page)
|
|
48
|
-
await browser[Symbol.asyncDispose]()
|
|
49
|
-
|
|
50
|
-
return { result, consoleErrors: errors }
|
|
32
|
+
return withBrowserPage(
|
|
33
|
+
{
|
|
34
|
+
launchOptions: {
|
|
35
|
+
args: ["--use-gl=angle", "--use-angle=swiftshader", "--enable-unsafe-swiftshader", "--ignore-gpu-blocklist"],
|
|
36
|
+
},
|
|
37
|
+
contextOptions: { viewport: options.viewport, deviceScaleFactor: 2 },
|
|
38
|
+
},
|
|
39
|
+
fn
|
|
40
|
+
)
|
|
51
41
|
}
|