@parhelia/capture 0.4.13062 → 0.4.13194
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 +23 -4
- package/dist/cli.js +101 -19
- package/dist/cmsJob.d.ts +9 -0
- package/dist/cmsJob.d.ts.map +1 -1
- package/dist/cmsJob.js +81 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/install/install.d.ts +4 -0
- package/dist/install/install.d.ts.map +1 -1
- package/dist/install/install.js +40 -10
- package/dist/install/layout.d.ts +9 -0
- package/dist/install/layout.d.ts.map +1 -1
- package/dist/install/layout.js +7 -1
- package/dist/install/manifestSignature.d.ts +30 -0
- package/dist/install/manifestSignature.d.ts.map +1 -0
- package/dist/install/manifestSignature.js +93 -0
- package/dist/install/releaseKeys.d.ts +2 -0
- package/dist/install/releaseKeys.d.ts.map +1 -0
- package/dist/install/releaseKeys.js +16 -0
- package/dist/install/services.d.ts +12 -0
- package/dist/install/services.d.ts.map +1 -1
- package/dist/install/services.js +45 -1
- package/dist/install/units.d.ts +8 -0
- package/dist/install/units.d.ts.map +1 -1
- package/dist/install/units.js +39 -3
- package/dist/install/updateLock.d.ts +14 -0
- package/dist/install/updateLock.d.ts.map +1 -0
- package/dist/install/updateLock.js +75 -0
- package/dist/install/updater.d.ts +28 -1
- package/dist/install/updater.d.ts.map +1 -1
- package/dist/install/updater.js +74 -2
- package/dist/install/versions.d.ts +11 -1
- package/dist/install/versions.d.ts.map +1 -1
- package/dist/install/versions.js +16 -2
- package/dist/isolation.d.ts +17 -1
- package/dist/isolation.d.ts.map +1 -1
- package/dist/isolation.js +21 -5
- package/dist/keptFor.d.ts +8 -0
- package/dist/keptFor.d.ts.map +1 -0
- package/dist/keptFor.js +28 -0
- package/dist/parheliaClient.d.ts +13 -0
- package/dist/parheliaClient.d.ts.map +1 -1
- package/dist/parheliaClient.js +7 -0
- package/dist/webIsolation.d.ts +2 -0
- package/dist/webIsolation.d.ts.map +1 -1
- package/dist/webIsolation.js +7 -5
- package/dist/webJob.d.ts +13 -0
- package/dist/webJob.d.ts.map +1 -1
- package/dist/webJob.js +90 -10
- package/dist/webPage.d.ts +30 -0
- package/dist/webPage.d.ts.map +1 -0
- package/dist/webPage.js +257 -0
- package/dist/worker.d.ts.map +1 -1
- package/dist/worker.js +6 -5
- package/package.json +2 -2
package/dist/install/updater.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { compareVersions } from "../version.js";
|
|
2
|
+
import { CaptureUpdateError, browserOf, currentVersion, installRelease, pruneVersions, requireSignedManifest, switchCurrent, } from "./versions.js";
|
|
2
3
|
export async function runUpdate(deps, options) {
|
|
3
4
|
const { sys, layout } = deps;
|
|
4
5
|
const log = deps.log ?? (() => undefined);
|
|
@@ -22,13 +23,28 @@ export async function runUpdate(deps, options) {
|
|
|
22
23
|
const wanted = manifest.version;
|
|
23
24
|
if (current === wanted)
|
|
24
25
|
return finish({ result: "up-to-date", current, wanted, policy: answer.updatePolicy, problems: [] });
|
|
26
|
+
// Never back by itself: a signed manifest of an older, since-fixed version stays signed, so the host (or whoever answers
|
|
27
|
+
// for it) must not be able to bring it back. An administrator on the machine can. This comes before the signature: a
|
|
28
|
+
// worker ahead of what it is named (moved back from canary while the stable pin is older, even one from before signing)
|
|
29
|
+
// installs nothing, so there is nothing to refuse and no problem to report.
|
|
30
|
+
if (current && compareVersions(wanted, current) < 0 && !options.allowDowngrade) {
|
|
31
|
+
log(`This machine runs ${current}; Parhelia names the older ${wanted} for it. Nothing is installed ('parhelia-capture update --allow-downgrade' goes back by hand).`);
|
|
32
|
+
return finish({ result: "ahead", current, wanted, policy: answer.updatePolicy, problems: [] });
|
|
33
|
+
}
|
|
34
|
+
// Whoever answers at Parhelia's address names only releases the pipeline signed, whatever the policy does with them.
|
|
35
|
+
try {
|
|
36
|
+
requireSignedManifest(manifest, deps.trustedKeys);
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
return finish({ result: "refused", current, wanted, policy: answer.updatePolicy, problems: [describe(error, "capture-update-signature")] });
|
|
40
|
+
}
|
|
25
41
|
if (options.auto && answer.updatePolicy === "notify")
|
|
26
42
|
return finish({ result: "available", current, wanted, policy: answer.updatePolicy,
|
|
27
43
|
problems: [`Version ${wanted} is available; this worker's update policy is "notify": run 'parhelia-capture update' on it.`] });
|
|
28
44
|
// 1. Side by side, every hash checked.
|
|
29
45
|
let versionDir;
|
|
30
46
|
try {
|
|
31
|
-
versionDir = await installRelease(sys, layout, deps.config, manifest, { fromTarball: options.fromTarball, log });
|
|
47
|
+
versionDir = await installRelease(sys, layout, deps.config, manifest, { fromTarball: options.fromTarball, log, trustedKeys: deps.trustedKeys });
|
|
32
48
|
}
|
|
33
49
|
catch (error) {
|
|
34
50
|
return finish({ result: "refused", current, wanted, policy: answer.updatePolicy, problems: [describe(error, "capture-update-install")] });
|
|
@@ -80,6 +96,62 @@ export async function runUpdate(deps, options) {
|
|
|
80
96
|
deps.firewall?.remove(version);
|
|
81
97
|
return finish({ result: "updated", current: wanted, wanted, policy: answer.updatePolicy, problems: [] });
|
|
82
98
|
}
|
|
99
|
+
/** How long one update wait is held open (the host caps it at its own poll limit; proxies cut longer requests). */
|
|
100
|
+
export const UPDATE_WAIT_MS = 25_000;
|
|
101
|
+
/**
|
|
102
|
+
* "Update now" (Settings › Capture service): the updater's long poll. It holds an outbound request to Parhelia, with the worker
|
|
103
|
+
* key and never through the worker, and runs the update the moment the host answers that one was asked for. Returns "updated"
|
|
104
|
+
* after an update that switched versions (the caller ends, and the service manager starts the new version's watch), "stopped"
|
|
105
|
+
* when the service is stopped. A host that cannot be asked is asked again later; nothing here ends the watch.
|
|
106
|
+
*/
|
|
107
|
+
export async function watchForUpdateRequests(deps) {
|
|
108
|
+
const log = deps.log ?? (() => undefined);
|
|
109
|
+
let failures = 0;
|
|
110
|
+
while (!deps.stopping?.()) {
|
|
111
|
+
const askedAt = deps.now();
|
|
112
|
+
let requested;
|
|
113
|
+
try {
|
|
114
|
+
requested = await deps.wait(UPDATE_WAIT_MS);
|
|
115
|
+
failures = 0;
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
if (deps.stopping?.())
|
|
119
|
+
break;
|
|
120
|
+
failures++;
|
|
121
|
+
const pause = updateWaitPause(error, failures);
|
|
122
|
+
if (failures === 1)
|
|
123
|
+
log(`Parhelia could not be asked for update requests (asking again in ${Math.round(pause / 1000)} s): ${error instanceof Error ? error.message : String(error)}`);
|
|
124
|
+
await deps.sleep(pause);
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
if (!requested) {
|
|
128
|
+
// A wait that was not held (something in between answered for the host) must not become a busy loop.
|
|
129
|
+
if (deps.now() - askedAt < 1_000)
|
|
130
|
+
await deps.sleep(5_000);
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
log("An update was asked for under Settings › Capture service");
|
|
134
|
+
try {
|
|
135
|
+
if ((await deps.update()).result === "updated")
|
|
136
|
+
return "updated";
|
|
137
|
+
}
|
|
138
|
+
catch (error) {
|
|
139
|
+
log(`The update did not run: ${error instanceof Error ? error.message : String(error)}`);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return "stopped";
|
|
143
|
+
}
|
|
144
|
+
/** How long the watch pauses after a wait that failed: a host without the route or a refused key rarely, anything else soon. */
|
|
145
|
+
export function updateWaitPause(error, failures) {
|
|
146
|
+
const status = error?.status;
|
|
147
|
+
// A Parhelia from before "Update now" has no such route; it may be updated later.
|
|
148
|
+
if (status === 404)
|
|
149
|
+
return 10 * 60_000;
|
|
150
|
+
// The key is refused (revoked, or a sign-in sits in front): the worker's own log and `doctor` name it.
|
|
151
|
+
if (status === 401 || status === 403 || status === 407)
|
|
152
|
+
return 5 * 60_000;
|
|
153
|
+
return Math.min(60_000, 5_000 * 2 ** Math.min(failures - 1, 4));
|
|
154
|
+
}
|
|
83
155
|
async function waitForPoll(deps, version, since) {
|
|
84
156
|
const { sys, layout } = deps;
|
|
85
157
|
const until = sys.now() + (deps.healthTimeoutMs ?? 120_000);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type InstalledConfig, type InstallRecord, type Layout } from "./layout.js";
|
|
2
2
|
import type { Sys } from "./sys.js";
|
|
3
|
+
import { type ManifestSignature } from "./manifestSignature.js";
|
|
3
4
|
/** The host's manifest as the worker protocol answers it (CaptureSidecarManifest). */
|
|
4
5
|
export type SidecarManifest = {
|
|
5
6
|
version: string;
|
|
@@ -16,6 +17,8 @@ export type SidecarManifest = {
|
|
|
16
17
|
executable: string;
|
|
17
18
|
}>;
|
|
18
19
|
} | null;
|
|
20
|
+
/** The release pipeline's signatures over the fields above (manifestSignature.ts); absent on a release from before signing. */
|
|
21
|
+
signatures?: ManifestSignature[] | null;
|
|
19
22
|
};
|
|
20
23
|
/** A refusal with a name: the updater reports it under Problems and keeps the old version. */
|
|
21
24
|
export declare class CaptureUpdateError extends Error {
|
|
@@ -23,6 +26,11 @@ export declare class CaptureUpdateError extends Error {
|
|
|
23
26
|
constructor(code: string, message: string);
|
|
24
27
|
}
|
|
25
28
|
export declare const DEFAULT_REGISTRY = "https://registry.npmjs.org";
|
|
29
|
+
/**
|
|
30
|
+
* Refuses, by name, a manifest no trusted release key signed (a build that trusts no key checks nothing: releaseKeys.ts).
|
|
31
|
+
* The hashes prove the download is what the manifest names; this proves the manifest is one the release pipeline wrote.
|
|
32
|
+
*/
|
|
33
|
+
export declare function requireSignedManifest(manifest: SidecarManifest, trustedKeys?: readonly string[]): void;
|
|
26
34
|
export declare function platformKey(sys: Pick<Sys, "platform">, arch?: string): string;
|
|
27
35
|
/** The tarball's URL: the manifest's, on the installation's registry when it names one (the integrity still decides). */
|
|
28
36
|
export declare function tarballUrl(manifest: SidecarManifest, registry?: string): string;
|
|
@@ -34,12 +42,14 @@ export declare function installedVersions(sys: Sys, layout: Layout): string[];
|
|
|
34
42
|
/**
|
|
35
43
|
* Stages and installs one released version from the host's manifest: tarball integrity, then `npm install` of that tarball with
|
|
36
44
|
* scripts off (its shrinkwrap pins every dependency's integrity), then the browser archive's SHA-256 and extraction. Answers the
|
|
37
|
-
* version directory.
|
|
45
|
+
* version directory. Before any of it, the manifest's release signature (when this build trusts a release key). Throws
|
|
46
|
+
* {@link CaptureUpdateError} on any mismatch, leaving no trace of the attempt.
|
|
38
47
|
*/
|
|
39
48
|
export declare function installRelease(sys: Sys, layout: Layout, config: Pick<InstalledConfig, "registry" | "browserMirror" | "browserPath">, manifest: SidecarManifest, options?: {
|
|
40
49
|
fromTarball?: string;
|
|
41
50
|
arch?: string;
|
|
42
51
|
log?: (line: string) => void;
|
|
52
|
+
trustedKeys?: readonly string[];
|
|
43
53
|
}): Promise<string>;
|
|
44
54
|
/**
|
|
45
55
|
* A source build (the host names no release): the running package and its playwright-core are copied, and the browser comes from
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../src/install/versions.ts"],"names":[],"mappings":"AAQA,OAAO,EAAiB,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AACnG,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../src/install/versions.ts"],"names":[],"mappings":"AAQA,OAAO,EAAiB,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AACnG,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAA0B,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAExF,sFAAsF;AACtF,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC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SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAK1F"}
|
package/dist/install/versions.js
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import { PACKAGE_ENTRY } from "./layout.js";
|
|
10
|
+
import { checkManifestSignature } from "./manifestSignature.js";
|
|
10
11
|
/** A refusal with a name: the updater reports it under Problems and keeps the old version. */
|
|
11
12
|
export class CaptureUpdateError extends Error {
|
|
12
13
|
code;
|
|
@@ -17,6 +18,15 @@ export class CaptureUpdateError extends Error {
|
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
20
|
export const DEFAULT_REGISTRY = "https://registry.npmjs.org";
|
|
21
|
+
/**
|
|
22
|
+
* Refuses, by name, a manifest no trusted release key signed (a build that trusts no key checks nothing: releaseKeys.ts).
|
|
23
|
+
* The hashes prove the download is what the manifest names; this proves the manifest is one the release pipeline wrote.
|
|
24
|
+
*/
|
|
25
|
+
export function requireSignedManifest(manifest, trustedKeys) {
|
|
26
|
+
const check = checkManifestSignature(manifest, trustedKeys);
|
|
27
|
+
if (!check.ok)
|
|
28
|
+
throw new CaptureUpdateError("capture-update-signature", check.reason);
|
|
29
|
+
}
|
|
20
30
|
export function platformKey(sys, arch = process.arch) {
|
|
21
31
|
return `${sys.platform === "win32" ? "win" : sys.platform}-${arch}`;
|
|
22
32
|
}
|
|
@@ -37,7 +47,9 @@ export function mirrored(url, mirror) {
|
|
|
37
47
|
}
|
|
38
48
|
export function readRecord(sys, versionDir) {
|
|
39
49
|
try {
|
|
40
|
-
|
|
50
|
+
// The directory's own separators, not this process's: the tests run a Linux install on a Windows machine too.
|
|
51
|
+
const join = versionDir.includes("\\") ? path.win32.join : path.posix.join;
|
|
52
|
+
return JSON.parse(sys.readFile(join(versionDir, "install.json")));
|
|
41
53
|
}
|
|
42
54
|
catch {
|
|
43
55
|
return undefined;
|
|
@@ -73,10 +85,12 @@ function npmCommand(sys) {
|
|
|
73
85
|
/**
|
|
74
86
|
* Stages and installs one released version from the host's manifest: tarball integrity, then `npm install` of that tarball with
|
|
75
87
|
* scripts off (its shrinkwrap pins every dependency's integrity), then the browser archive's SHA-256 and extraction. Answers the
|
|
76
|
-
* version directory.
|
|
88
|
+
* version directory. Before any of it, the manifest's release signature (when this build trusts a release key). Throws
|
|
89
|
+
* {@link CaptureUpdateError} on any mismatch, leaving no trace of the attempt.
|
|
77
90
|
*/
|
|
78
91
|
export async function installRelease(sys, layout, config, manifest, options = {}) {
|
|
79
92
|
const log = options.log ?? (() => undefined);
|
|
93
|
+
requireSignedManifest(manifest, options.trustedKeys);
|
|
80
94
|
if (!manifest.integrity)
|
|
81
95
|
throw new CaptureUpdateError("capture-update-unnamed", `The host names version ${manifest.version} without an integrity hash; nothing is installed.`);
|
|
82
96
|
const target = layout.join(layout.versionsDir, manifest.version);
|
package/dist/isolation.d.ts
CHANGED
|
@@ -21,15 +21,26 @@ export declare function socketDirectoriesOutsideHiddenTrees(root?: string, skip?
|
|
|
21
21
|
export declare function ownAddresses(): string[];
|
|
22
22
|
/** Whether Parhelia runs on this machine (its origin resolves to a loopback address or one of the machine's own). */
|
|
23
23
|
export declare function parheliaIsColocated(parheliaAddresses: readonly string[], own: readonly string[]): boolean;
|
|
24
|
+
/** What the worker reports while `public-web` runs on Parhelia's own Windows machine by the administrator's choice. */
|
|
25
|
+
export declare const COLOCATED_ACCEPTED_CODE = "capture-web-colocated-accepted";
|
|
26
|
+
export declare const COLOCATED_ACCEPTED_NOTE = "Parhelia runs on this Windows machine, where loopback traffic is not filtered: only the egress proxy keeps a captured page from Parhelia and this machine's other local services (accepted at install with --accept-colocated-web). Run the capture service on another machine to have both protections.";
|
|
27
|
+
/** Whether the administrator's acceptance applies: it lifts the Windows co-location refusal and nothing else. */
|
|
28
|
+
export declare function colocatedAccepted(input: {
|
|
29
|
+
platform: string;
|
|
30
|
+
colocated: boolean;
|
|
31
|
+
acceptColocated?: boolean;
|
|
32
|
+
}): boolean;
|
|
24
33
|
/**
|
|
25
34
|
* Why `public-web` cannot run here before any test, or undefined. On Windows, loopback (and so the machine's own LAN
|
|
26
35
|
* addresses) is unfiltered: a browser bypassing the proxy would reach Parhelia on the same machine, so that is refused by
|
|
27
|
-
* name
|
|
36
|
+
* name unless the administrator accepted it (`acceptColocated`). Elsewhere, and on Windows once accepted, a co-located
|
|
37
|
+
* Parhelia is no remote probe; another host must be named.
|
|
28
38
|
*/
|
|
29
39
|
export declare function webPreconditionRefusal(input: {
|
|
30
40
|
platform: string;
|
|
31
41
|
colocated: boolean;
|
|
32
42
|
probeUrl?: string;
|
|
43
|
+
acceptColocated?: boolean;
|
|
33
44
|
}): {
|
|
34
45
|
code: string;
|
|
35
46
|
message: string;
|
|
@@ -37,12 +48,15 @@ export declare function webPreconditionRefusal(input: {
|
|
|
37
48
|
export type IsolationCheck = {
|
|
38
49
|
name: string;
|
|
39
50
|
ok: boolean;
|
|
51
|
+
warn?: boolean;
|
|
40
52
|
detail: string;
|
|
41
53
|
};
|
|
54
|
+
/** `residual`: what a passed test still leaves open by the administrator's choice (the worker reports it as a problem). */
|
|
42
55
|
export type IsolationReport = {
|
|
43
56
|
ok: boolean;
|
|
44
57
|
code?: string;
|
|
45
58
|
reason?: string;
|
|
59
|
+
residual?: string;
|
|
46
60
|
checks: IsolationCheck[];
|
|
47
61
|
};
|
|
48
62
|
export type IsolationEvidence = {
|
|
@@ -66,6 +80,8 @@ export type IsolationEvidence = {
|
|
|
66
80
|
marker: string;
|
|
67
81
|
};
|
|
68
82
|
publicUrl?: string;
|
|
83
|
+
/** Parhelia runs on this Windows machine and the administrator accepted it: the proxy's refusal of Parhelia must be shown. */
|
|
84
|
+
colocatedAccepted?: boolean;
|
|
69
85
|
observations: SelfTestObservations;
|
|
70
86
|
socketDir: string;
|
|
71
87
|
};
|
package/dist/isolation.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isolation.d.ts","sourceRoot":"","sources":["../src/isolation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isolation.d.ts","sourceRoot":"","sources":["../src/isolation.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAoB,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEvF,2FAA2F;AAC3F,eAAO,MAAM,YAAY,YAAI,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAU,CAAC;AAKxF,MAAM,MAAM,WAAW,GAAG;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,kHAAkH;IAClH,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,6GAA6G;IAC7G,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;CACpC,CAAC;AAEF,+HAA+H;AAC/H,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,EAAE,CAwBxE;AAED,0HAA0H;AAC1H,wBAAgB,mCAAmC,CAAC,IAAI,SAAM,EAAE,IAAI,GAAE,SAAS,MAAM,EAAO,GAAG,MAAM,EAAE,CAoBtG;AAED,yEAAyE;AACzE,wBAAgB,YAAY,IAAI,MAAM,EAAE,CAEvC;AAID,qHAAqH;AACrH,wBAAgB,mBAAmB,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,EAAE,GAAG,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAGzG;AAED,uHAAuH;AACvH,eAAO,MAAM,uBAAuB,mCAAmC,CAAC;AACxE,eAAO,MAAM,uBA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AAC,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnF,yFAAyF;IACzF,oBAAoB,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8HAA8H;IAC9H,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,YAAY,EAAE,oBAAoB,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAIF,mHAAmH;AACnH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,iBAAiB,GAAG,eAAe,CAsD3E;AAUD,2GAA2G;AAC3G,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAMjD"}
|
package/dist/isolation.js
CHANGED
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
* every tree sockets live in; only its socket directory is put back. `TemporaryFileSystem=` lists only directories that
|
|
6
6
|
* exist (A6: one missing path fails the unit), and every other directory holding a Unix socket becomes `InaccessiblePaths=`
|
|
7
7
|
* (A7). Windows: an outbound block rule bound to the browser's path (CS6 installs it); loopback is unfiltered there, so a
|
|
8
|
-
* sidecar on the machine that runs Parhelia refuses `public-web` by name
|
|
8
|
+
* sidecar on the machine that runs Parhelia refuses `public-web` by name, unless the administrator accepted that at install
|
|
9
|
+
* (`--accept-colocated-web`): then the egress proxy alone keeps a page from that machine's own services, and the worker says
|
|
10
|
+
* so for as long as it runs that way.
|
|
9
11
|
*
|
|
10
12
|
* The judgement only ever passes on a positive signal: the unrestricted worker fetched each nonce, and the restricted
|
|
11
13
|
* browser did not. "Nothing listens" can never produce a green.
|
|
@@ -83,14 +85,22 @@ export function parheliaIsColocated(parheliaAddresses, own) {
|
|
|
83
85
|
const mine = new Set(own.map((address) => address.toLowerCase()));
|
|
84
86
|
return parheliaAddresses.some((address) => isLoopback(address) || mine.has(address.toLowerCase().replace(/^::ffff:/, "")));
|
|
85
87
|
}
|
|
88
|
+
/** What the worker reports while `public-web` runs on Parhelia's own Windows machine by the administrator's choice. */
|
|
89
|
+
export const COLOCATED_ACCEPTED_CODE = "capture-web-colocated-accepted";
|
|
90
|
+
export const COLOCATED_ACCEPTED_NOTE = "Parhelia runs on this Windows machine, where loopback traffic is not filtered: only the egress proxy keeps a captured page from Parhelia and this machine's other local services (accepted at install with --accept-colocated-web). Run the capture service on another machine to have both protections.";
|
|
91
|
+
/** Whether the administrator's acceptance applies: it lifts the Windows co-location refusal and nothing else. */
|
|
92
|
+
export function colocatedAccepted(input) {
|
|
93
|
+
return input.platform === "win32" && input.colocated && input.acceptColocated === true;
|
|
94
|
+
}
|
|
86
95
|
/**
|
|
87
96
|
* Why `public-web` cannot run here before any test, or undefined. On Windows, loopback (and so the machine's own LAN
|
|
88
97
|
* addresses) is unfiltered: a browser bypassing the proxy would reach Parhelia on the same machine, so that is refused by
|
|
89
|
-
* name
|
|
98
|
+
* name unless the administrator accepted it (`acceptColocated`). Elsewhere, and on Windows once accepted, a co-located
|
|
99
|
+
* Parhelia is no remote probe; another host must be named.
|
|
90
100
|
*/
|
|
91
101
|
export function webPreconditionRefusal(input) {
|
|
92
|
-
if (input.platform === "win32" && input.colocated)
|
|
93
|
-
return { code: "capture-web-colocated", message: "Screenshots of public websites are refused on a Windows machine that also runs Parhelia: loopback traffic is not filtered there, so the browser could reach Parhelia directly. Run the capture service on another machine." };
|
|
102
|
+
if (input.platform === "win32" && input.colocated && !input.acceptColocated)
|
|
103
|
+
return { code: "capture-web-colocated", message: "Screenshots of public websites are refused on a Windows machine that also runs Parhelia: loopback traffic is not filtered there, so the browser could reach Parhelia directly. Run the capture service on another machine, or accept the weaker protection here by installing with --accept-colocated-web." };
|
|
94
104
|
if (input.colocated && !input.probeUrl)
|
|
95
105
|
return { code: "capture-web-unproven", message: "Egress isolation cannot be proven here: Parhelia runs on this machine, so it is no remote probe. Name an endpoint on another host with --probe-url." };
|
|
96
106
|
if (input.platform !== "linux" && input.platform !== "win32")
|
|
@@ -133,6 +143,12 @@ export function judgeIsolation(evidence) {
|
|
|
133
143
|
checks.push({ name: "proxy on: Parhelia's address", ok: !reached(entry, evidence.parheliaThroughProxy.marker),
|
|
134
144
|
detail: reached(entry, evidence.parheliaThroughProxy.marker) ? "the proxy let the browser reach Parhelia" : `refused (${describe(entry)})` });
|
|
135
145
|
}
|
|
146
|
+
else if (evidence.colocatedAccepted) {
|
|
147
|
+
// The proxy is all that stands between a page and Parhelia here: its refusal is shown, never assumed.
|
|
148
|
+
checks.push({ name: "proxy on: Parhelia's address", ok: false, detail: "not tested (Parhelia opened no probe), and the proxy is this machine's only protection" });
|
|
149
|
+
}
|
|
150
|
+
if (evidence.colocatedAccepted)
|
|
151
|
+
checks.push({ name: "Parhelia on this machine", ok: true, warn: true, detail: COLOCATED_ACCEPTED_NOTE });
|
|
136
152
|
if (evidence.publicUrl) {
|
|
137
153
|
const entry = probe("public-proxied");
|
|
138
154
|
const ok = !!entry && !entry.error && (entry.status ?? 0) > 0 && (entry.status ?? 0) < 400;
|
|
@@ -140,7 +156,7 @@ export function judgeIsolation(evidence) {
|
|
|
140
156
|
}
|
|
141
157
|
const failed = checks.filter((check) => !check.ok);
|
|
142
158
|
if (failed.length === 0)
|
|
143
|
-
return { ok: true, checks };
|
|
159
|
+
return { ok: true, checks, ...(evidence.colocatedAccepted ? { residual: `${COLOCATED_ACCEPTED_CODE}: ${COLOCATED_ACCEPTED_NOTE}` } : {}) };
|
|
144
160
|
return { ok: false, code: "capture-web-isolation-unproven",
|
|
145
161
|
reason: `Screenshots of public websites stay off: ${failed.map((check) => `${check.name} (${check.detail})`).join("; ")}.`, checks };
|
|
146
162
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** How long the worker keeps the host's bridge before it asks again. */
|
|
2
|
+
export declare const BRIDGE_KEPT_MS = 60000;
|
|
3
|
+
/**
|
|
4
|
+
* `load`, answered from what it last answered while that is younger than `ms`. Calls that arrive while a load is under way
|
|
5
|
+
* share it. A load that fails is not kept: the next call loads again.
|
|
6
|
+
*/
|
|
7
|
+
export declare function keptFor<T>(load: () => Promise<T>, ms: number, now?: () => number): () => Promise<T>;
|
|
8
|
+
//# sourceMappingURL=keptFor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keptFor.d.ts","sourceRoot":"","sources":["../src/keptFor.ts"],"names":[],"mappings":"AASA,wEAAwE;AACxE,eAAO,MAAM,cAAc,QAAS,CAAC;AAErC;;;GAGG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,GAAE,MAAM,MAAiB,GAAG,MAAM,OAAO,CAAC,CAAC,CAAC,CAW7G"}
|
package/dist/keptFor.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* A value loaded from the host and kept for a while, then loaded again.
|
|
3
|
+
*
|
|
4
|
+
* The worker asks the host for its page bridge and injects it where a head's own bridge did not start. A worker outlives the
|
|
5
|
+
* host's builds: one that kept the bridge for its whole run went on injecting the bridge of the build it had started with,
|
|
6
|
+
* and a capture then lacked what the host's new bridge reports (the BDF demo, 2026-11-22: a host deploy brought a bridge that
|
|
7
|
+
* marks the pictures a page did not get, and the worker's captures had none of the marks until it was restarted).
|
|
8
|
+
*/
|
|
9
|
+
/** How long the worker keeps the host's bridge before it asks again. */
|
|
10
|
+
export const BRIDGE_KEPT_MS = 60_000;
|
|
11
|
+
/**
|
|
12
|
+
* `load`, answered from what it last answered while that is younger than `ms`. Calls that arrive while a load is under way
|
|
13
|
+
* share it. A load that fails is not kept: the next call loads again.
|
|
14
|
+
*/
|
|
15
|
+
export function keptFor(load, ms, now = Date.now) {
|
|
16
|
+
let kept;
|
|
17
|
+
return () => {
|
|
18
|
+
if (kept && now() - kept.at < ms)
|
|
19
|
+
return kept.value;
|
|
20
|
+
const value = load().catch((error) => {
|
|
21
|
+
if (kept?.value === value)
|
|
22
|
+
kept = undefined;
|
|
23
|
+
throw error;
|
|
24
|
+
});
|
|
25
|
+
kept = { at: now(), value };
|
|
26
|
+
return value;
|
|
27
|
+
};
|
|
28
|
+
}
|
package/dist/parheliaClient.d.ts
CHANGED
|
@@ -20,6 +20,14 @@ export type CaptureJobOffer = {
|
|
|
20
20
|
allowlist: string[];
|
|
21
21
|
/** A public-web job: the host's blocked ranges (CIDR), on top of the sidecar's own floor. */
|
|
22
22
|
blockedRanges?: string[] | null;
|
|
23
|
+
/**
|
|
24
|
+
* A `cms` job: the origins its Parhelia answers at for people (its public origins), which the worker loads from its own origin
|
|
25
|
+
* (`cmsJob.ts`, `originAliasesOf`). Versioned: a version this worker does not know is ignored, as an older worker ignores the field.
|
|
26
|
+
*/
|
|
27
|
+
originAliases?: {
|
|
28
|
+
version?: number;
|
|
29
|
+
origins?: unknown;
|
|
30
|
+
} | null;
|
|
23
31
|
deadlineUnixMs: number;
|
|
24
32
|
cookie: string;
|
|
25
33
|
};
|
|
@@ -72,6 +80,11 @@ export declare class ParheliaClient {
|
|
|
72
80
|
poll(capabilities: string[], waitMs: number, signal?: AbortSignal, report?: CaptureWorkerReport): Promise<CapturePollAnswer>;
|
|
73
81
|
/** CS6: the version this host names, its hashes, and this worker's update policy (the updater asks with the worker key). */
|
|
74
82
|
manifest(): Promise<import("./install/updater.js").ManifestAnswer>;
|
|
83
|
+
/**
|
|
84
|
+
* "Update now": the updater's long poll (worker key). True the moment an administrator asks for this worker's update under
|
|
85
|
+
* Settings › Capture service, false when the wait passed. It names no version: the updater reads the manifest as always.
|
|
86
|
+
*/
|
|
87
|
+
updateWait(waitMs: number, signal?: AbortSignal): Promise<boolean>;
|
|
75
88
|
complete(jobId: string, attemptId: string, result: unknown, error?: string): Promise<{
|
|
76
89
|
status: string;
|
|
77
90
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parheliaClient.d.ts","sourceRoot":"","sources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AC,OAAO,sBAAsB,EAAE,cAAc,CAAC,CAEjE;IAED;;;OAGG;IACG,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,CAEvE;IAED,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAEvG;IAED,+GAA+G;IACzG,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAE9B;IAED;;;OAGG;IACG,SAAS,IAAI,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAGzD;IAED,8FAA8F;IAC9F,OAAa,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,GAAE,OAAO,KAAa;kBAOjE,MAAM;cAAQ,MAAM;sBAAgB,MAAM,EAAE;OACpF;YAEa,IAAI;mBAWG,IAAI;CAiB1B"}
|
package/dist/parheliaClient.js
CHANGED
|
@@ -53,6 +53,13 @@ export class ParheliaClient {
|
|
|
53
53
|
manifest() {
|
|
54
54
|
return this.post("/parhelia/capture/worker/manifest", {});
|
|
55
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* "Update now": the updater's long poll (worker key). True the moment an administrator asks for this worker's update under
|
|
58
|
+
* Settings › Capture service, false when the wait passed. It names no version: the updater reads the manifest as always.
|
|
59
|
+
*/
|
|
60
|
+
async updateWait(waitMs, signal) {
|
|
61
|
+
return (await this.post("/parhelia/capture/worker/update-wait", { waitMs }, signal)).requested === true;
|
|
62
|
+
}
|
|
56
63
|
complete(jobId, attemptId, result, error) {
|
|
57
64
|
return this.post("/parhelia/capture/worker/complete", { jobId, attemptId, result: result ?? null, error: error ?? null });
|
|
58
65
|
}
|
package/dist/webIsolation.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export type WebIsolationOptions = {
|
|
|
10
10
|
probeUrl?: string;
|
|
11
11
|
/** A public page the browser must load through the proxy (step 7); omitted: not checked. */
|
|
12
12
|
publicUrl?: string;
|
|
13
|
+
/** Windows: the administrator accepted `public-web` on Parhelia's own machine (`--accept-colocated-web`). */
|
|
14
|
+
acceptColocated?: boolean;
|
|
13
15
|
/** The blocked ranges the proxy applies in the layer-2 checks (the host's table when known). */
|
|
14
16
|
blockedRanges?: readonly string[];
|
|
15
17
|
resolve?: (host: string) => Promise<string[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webIsolation.d.ts","sourceRoot":"","sources":["../src/webIsolation.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,sBAAsB,CAAC;AAE1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAEmB,KAAK,eAAe,EAC7C,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,GAAG,WAAW,CAAC,CAAC;IACrD,IAAI,EAAE,eAAe,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kHAAkH;IAClH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4FAA4F;IAC5F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gGAAgG;IAChG,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC9C,YAAY,CAAC,EAAE,MAAM,MAAM,EAAE,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E,SAAS,MAAM,EAAE,CAAC;IAClC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC9C,YAAY,CAAC,EAAE,MAAM,MAAM,EAAE,CAAC;IAC9B,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;CAC7C,CAAC;AAEF,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAK/G;AAED,oHAAoH;AACpH,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,cAAc,CAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAG7I;AAED,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,eAAe,CAAC,CA4D/F"}
|
package/dist/webIsolation.js
CHANGED
|
@@ -8,7 +8,7 @@ import dns from "node:dns/promises";
|
|
|
8
8
|
import http from "node:http";
|
|
9
9
|
import net from "node:net";
|
|
10
10
|
import { randomBytes } from "node:crypto";
|
|
11
|
-
import { judgeIsolation, ownAddresses, parheliaIsColocated, webPreconditionRefusal, } from "./isolation.js";
|
|
11
|
+
import { colocatedAccepted, judgeIsolation, ownAddresses, parheliaIsColocated, webPreconditionRefusal, } from "./isolation.js";
|
|
12
12
|
export async function resolveAll(host, resolve) {
|
|
13
13
|
const bare = host.replace(/^\[|\]$/g, "");
|
|
14
14
|
if (net.isIP(bare))
|
|
@@ -27,7 +27,8 @@ export async function verifyWebIsolation(options) {
|
|
|
27
27
|
const fetchImpl = options.fetch ?? fetch;
|
|
28
28
|
const parheliaAddresses = await resolveAll(new URL(options.client.origin).hostname, options.resolve).catch(() => []);
|
|
29
29
|
const colocated = parheliaIsColocated(parheliaAddresses, (options.ownAddresses ?? ownAddresses)());
|
|
30
|
-
const refusal = webPreconditionRefusal({ platform, colocated, probeUrl: options.probeUrl });
|
|
30
|
+
const refusal = webPreconditionRefusal({ platform, colocated, probeUrl: options.probeUrl, acceptColocated: options.acceptColocated });
|
|
31
|
+
const accepted = colocatedAccepted({ platform, colocated, acceptColocated: options.acceptColocated });
|
|
31
32
|
if (refusal)
|
|
32
33
|
return { ok: false, code: refusal.code, reason: refusal.message, checks: [] };
|
|
33
34
|
if (!options.link.host)
|
|
@@ -58,8 +59,9 @@ export async function verifyWebIsolation(options) {
|
|
|
58
59
|
browserRemoteUrl = forBrowser.url;
|
|
59
60
|
remote = { ...remote, marker: forBrowser.nonce, url: forBrowser.url };
|
|
60
61
|
}
|
|
61
|
-
// Layer 2: Parhelia's own address through the proxy (a fresh token; its nonce must not come back).
|
|
62
|
-
|
|
62
|
+
// Layer 2: Parhelia's own address through the proxy (a fresh token; its nonce must not come back). Where co-location was
|
|
63
|
+
// accepted the proxy is the only protection of Parhelia, so the verdict requires this probe.
|
|
64
|
+
if (!options.probeUrl || !colocated || accepted) {
|
|
63
65
|
const throughProxy = await options.client.openProbe().catch(() => undefined);
|
|
64
66
|
if (throughProxy)
|
|
65
67
|
parheliaThroughProxy = { url: throughProxy.url, marker: throughProxy.nonce };
|
|
@@ -78,7 +80,7 @@ export async function verifyWebIsolation(options) {
|
|
|
78
80
|
// 4-7. The actual browser in its restricted host.
|
|
79
81
|
const observations = await options.link.selfTest(probes, policy, 90_000, options.egressLog);
|
|
80
82
|
return judgeIsolation({ platform, remote, local: localEvidence, parheliaThroughProxy, publicUrl: options.publicUrl, observations,
|
|
81
|
-
socketDir: options.link.socketDir });
|
|
83
|
+
socketDir: options.link.socketDir, colocatedAccepted: accepted });
|
|
82
84
|
}
|
|
83
85
|
catch (error) {
|
|
84
86
|
return { ok: false, code: "capture-web-isolation-unproven", reason: `The isolation self-test did not complete: ${error instanceof Error ? error.message : String(error)}`, checks: [] };
|
package/dist/webJob.d.ts
CHANGED
|
@@ -2,6 +2,9 @@ import type { Browser } from "playwright-core";
|
|
|
2
2
|
export declare const MAX_IMAGE_HEIGHT = 7680;
|
|
3
3
|
export declare const PNG_SIZE_FALLBACK_THRESHOLD = 2500000;
|
|
4
4
|
export declare const JPEG_QUALITY = 0.9;
|
|
5
|
+
/** The most texts and picture names a job frames a part by, and how long one may be. */
|
|
6
|
+
export declare const MAX_AROUND = 16;
|
|
7
|
+
export declare const MAX_AROUND_CHARS = 200;
|
|
5
8
|
/** The parameters the host sends (CaptureUrlScreenshotFunction), re-checked here: the worker trusts no job blindly. */
|
|
6
9
|
export type WebJobParameters = {
|
|
7
10
|
url: string;
|
|
@@ -9,6 +12,10 @@ export type WebJobParameters = {
|
|
|
9
12
|
viewportWidth?: number;
|
|
10
13
|
viewportHeight?: number;
|
|
11
14
|
maxImageWidth?: number;
|
|
15
|
+
/** Texts the part to show holds, and file names of its pictures: the capture is the block that holds them. */
|
|
16
|
+
around?: string[];
|
|
17
|
+
/** Cookie and consent banners, and the backdrops that come with them, are taken away before the capture. */
|
|
18
|
+
hideOverlays?: boolean;
|
|
12
19
|
};
|
|
13
20
|
export type WebCaptureResult = {
|
|
14
21
|
success: true;
|
|
@@ -24,6 +31,12 @@ export type WebCaptureResult = {
|
|
|
24
31
|
finalUrl: string;
|
|
25
32
|
httpStatus: number | null;
|
|
26
33
|
truncated: boolean;
|
|
34
|
+
/** With `around`: whether the image is the part asked for (false: none of them was found, the image is the scope's). */
|
|
35
|
+
framed?: boolean;
|
|
36
|
+
/** With `around`: how many of the given texts and pictures the page holds. */
|
|
37
|
+
aroundFound?: number;
|
|
38
|
+
/** With `hideOverlays`: how many banners and backdrops were taken away. */
|
|
39
|
+
overlaysHidden?: number;
|
|
27
40
|
};
|
|
28
41
|
export type WebJobOutcome = {
|
|
29
42
|
kind: "result";
|
package/dist/webJob.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webJob.d.ts","sourceRoot":"","sources":["../src/webJob.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"webJob.d.ts","sourceRoot":"","sources":["../src/webJob.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,OAAO,EAAwB,MAAM,iBAAiB,CAAC;AAIrE,eAAO,MAAM,gBAAgB,OAAO,CAAC;AACrC,eAAO,MAAM,2BAA2B,UAAY,CAAC;AACrD,eAAO,MAAM,YAAY,MAAM,CAAC;AAIhC,wFAAwF;AACxF,eAAO,MAAM,UAAU,KAAK,CAAC;AAC7B,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAKpC,uHAAuH;AACvH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,8GAA8G;IAC9G,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,4GAA4G;IAC5G,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,EAAE,UAAU,GAAG,MAAM,CAAC;IAC3B,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IACpF,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,OAA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