doc-detective 4.6.0-next.1 → 4.6.0-next.4
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 +2 -10
- package/dist/index.cjs +28 -10
- package/dist/runtime/heavyDeps.d.ts +31 -3
- package/dist/runtime/heavyDeps.d.ts.map +1 -1
- package/dist/runtime/heavyDeps.js +49 -12
- package/dist/runtime/heavyDeps.js.map +1 -1
- package/dist/runtime/loader.d.ts.map +1 -1
- package/dist/runtime/loader.js +6 -1
- package/dist/runtime/loader.js.map +1 -1
- package/package.json +18 -46
package/README.md
CHANGED
|
@@ -37,17 +37,9 @@ Doc Detective has multiple components to integrate with your workflows as you ne
|
|
|
37
37
|
|
|
38
38
|
### Lazy-installed runtime
|
|
39
39
|
|
|
40
|
-
`npm i doc-detective` installs the CLI and a small set of light dependencies. Heavy runtime assets — browsers (Chrome, Firefox), drivers (ChromeDriver, Geckodriver), ffmpeg, and the npm packages that drive them (webdriverio, appium, sharp, etc.) — install lazily into `<os.tmpdir()>/doc-detective/` the first time a test needs them, or up front via `doc-detective install all`.
|
|
40
|
+
`npm i doc-detective` installs only the CLI and a small set of light dependencies — no browser download, no heavy npm packages, no deprecation warnings from their transitive trees. Heavy runtime assets — browsers (Chrome, Firefox), drivers (ChromeDriver, Geckodriver), ffmpeg, and the npm packages that drive them (webdriverio, appium, sharp, etc.) — install lazily into `<os.tmpdir()>/doc-detective/` the first time a test needs them, or up front via `doc-detective install all`.
|
|
41
41
|
|
|
42
|
-
The heavy
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
npm i doc-detective --omit=optional
|
|
46
|
-
# or for CI
|
|
47
|
-
npm ci --omit=optional
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
With `--omit=optional`, the lazy resolver fetches each heavy dep into the cache on first use; without it you still get the speed-of-startup benefits of lazy loading (no `postinstall` browser download) but pay the on-disk cost up front.
|
|
42
|
+
The published package does not declare the heavy packages in `dependencies` or `optionalDependencies`, so npm never fetches them at install time. Their version constraints live in a custom `ddRuntimeDependencies` field that the lazy resolver reads when it installs each dep into the cache on first use.
|
|
51
43
|
|
|
52
44
|
- **Pre-install everything up front:**
|
|
53
45
|
|
package/dist/index.cjs
CHANGED
|
@@ -130484,6 +130484,16 @@ var init_utils = __esm({
|
|
|
130484
130484
|
});
|
|
130485
130485
|
|
|
130486
130486
|
// dist/runtime/heavyDeps.js
|
|
130487
|
+
function withPeerCompanions(names) {
|
|
130488
|
+
const out = [...names];
|
|
130489
|
+
for (const name of names) {
|
|
130490
|
+
for (const companion of RUNTIME_PEER_COMPANIONS[name] ?? []) {
|
|
130491
|
+
if (!out.includes(companion))
|
|
130492
|
+
out.push(companion);
|
|
130493
|
+
}
|
|
130494
|
+
}
|
|
130495
|
+
return out;
|
|
130496
|
+
}
|
|
130487
130497
|
function readShimPackageJson() {
|
|
130488
130498
|
if (cachedPkg)
|
|
130489
130499
|
return cachedPkg;
|
|
@@ -130493,16 +130503,20 @@ function readShimPackageJson() {
|
|
|
130493
130503
|
return cachedPkg;
|
|
130494
130504
|
}
|
|
130495
130505
|
function getDeclaredVersion(name) {
|
|
130496
|
-
|
|
130497
|
-
|
|
130498
|
-
|
|
130499
|
-
|
|
130500
|
-
|
|
130501
|
-
|
|
130502
|
-
|
|
130503
|
-
|
|
130506
|
+
return resolveDeclaredVersion(readShimPackageJson(), name);
|
|
130507
|
+
}
|
|
130508
|
+
function resolveDeclaredVersion(pkg, name) {
|
|
130509
|
+
for (const field of [
|
|
130510
|
+
pkg.ddRuntimeDependencies,
|
|
130511
|
+
pkg.optionalDependencies,
|
|
130512
|
+
pkg.dependencies
|
|
130513
|
+
]) {
|
|
130514
|
+
const declared = field?.[name];
|
|
130515
|
+
if (typeof declared === "string" && declared.length > 0) {
|
|
130516
|
+
return declared;
|
|
130517
|
+
}
|
|
130504
130518
|
}
|
|
130505
|
-
throw new Error(`${name} is not declared in doc-detective's package.json (optionalDependencies or dependencies). Add it before invoking the runtime loader.`);
|
|
130519
|
+
throw new Error(`${name} is not declared in doc-detective's package.json (ddRuntimeDependencies, optionalDependencies, or dependencies). Add it before invoking the runtime loader.`);
|
|
130506
130520
|
}
|
|
130507
130521
|
function satisfiesRange(installed, range) {
|
|
130508
130522
|
if (!range || !installed)
|
|
@@ -130545,7 +130559,7 @@ function compareTuple(a, b) {
|
|
|
130545
130559
|
}
|
|
130546
130560
|
return 0;
|
|
130547
130561
|
}
|
|
130548
|
-
var import_node_fs2, import_node_path2, import_node_url, __dirname, cachedPkg;
|
|
130562
|
+
var import_node_fs2, import_node_path2, import_node_url, __dirname, RUNTIME_PEER_COMPANIONS, cachedPkg;
|
|
130549
130563
|
var init_heavyDeps = __esm({
|
|
130550
130564
|
"dist/runtime/heavyDeps.js"() {
|
|
130551
130565
|
"use strict";
|
|
@@ -130553,6 +130567,9 @@ var init_heavyDeps = __esm({
|
|
|
130553
130567
|
import_node_path2 = __toESM(require("node:path"), 1);
|
|
130554
130568
|
import_node_url = require("node:url");
|
|
130555
130569
|
__dirname = import_node_path2.default.dirname((0, import_node_url.fileURLToPath)(importMetaUrl));
|
|
130570
|
+
RUNTIME_PEER_COMPANIONS = {
|
|
130571
|
+
"@puppeteer/browsers": ["proxy-agent"]
|
|
130572
|
+
};
|
|
130556
130573
|
cachedPkg = null;
|
|
130557
130574
|
}
|
|
130558
130575
|
});
|
|
@@ -130737,6 +130754,7 @@ async function ensureRuntimeInstalled(packages, options = {}) {
|
|
|
130737
130754
|
const spawner = deps.spawn ?? import_node_child_process2.spawn;
|
|
130738
130755
|
if (packages.length === 0)
|
|
130739
130756
|
return;
|
|
130757
|
+
packages = withPeerCompanions(packages);
|
|
130740
130758
|
const toInstall = force ? [...packages] : packages.filter((name) => {
|
|
130741
130759
|
if (tryResolveFromShim(name))
|
|
130742
130760
|
return false;
|
|
@@ -1,15 +1,43 @@
|
|
|
1
1
|
export declare const HEAVY_NPM_DEPS: readonly ["webdriverio", "appium", "appium-chromium-driver", "appium-geckodriver", "appium-safari-driver", "sharp", "@ffmpeg-installer/ffmpeg", "@puppeteer/browsers", "geckodriver", "pixelmatch", "pngjs"];
|
|
2
2
|
export type HeavyDepName = (typeof HEAVY_NPM_DEPS)[number];
|
|
3
|
+
/**
|
|
4
|
+
* Optional peer dependencies that npm will NOT auto-install, but a heavy dep
|
|
5
|
+
* needs for full functionality. `@puppeteer/browsers@3` moved `proxy-agent`
|
|
6
|
+
* from a regular dependency (2.x) to an `optional` peer, so a bare
|
|
7
|
+
* `npm install @puppeteer/browsers` into <cacheDir>/runtime omits it and
|
|
8
|
+
* proxy-based browser downloads break. We install each companion alongside
|
|
9
|
+
* its owner so the cached install matches what 2.x shipped.
|
|
10
|
+
*/
|
|
11
|
+
export declare const RUNTIME_PEER_COMPANIONS: Record<string, string[]>;
|
|
12
|
+
/**
|
|
13
|
+
* Expand a list of runtime package names to include any peer companions
|
|
14
|
+
* (see RUNTIME_PEER_COMPANIONS), preserving order and de-duplicating.
|
|
15
|
+
*/
|
|
16
|
+
export declare function withPeerCompanions(names: string[]): string[];
|
|
17
|
+
export interface ShimPackageJson {
|
|
18
|
+
ddRuntimeDependencies?: Record<string, string>;
|
|
19
|
+
optionalDependencies?: Record<string, string>;
|
|
20
|
+
dependencies?: Record<string, string>;
|
|
21
|
+
}
|
|
3
22
|
/**
|
|
4
23
|
* Returns the version constraint declared in the shim's own package.json
|
|
5
|
-
* for `name`.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
24
|
+
* for `name`. The version source differs between the published package and
|
|
25
|
+
* a source/CI checkout, so we check in priority order:
|
|
26
|
+
* 1. `ddRuntimeDependencies` — the published state. prepack.js moves the
|
|
27
|
+
* heavy deps here so npm never auto-installs them.
|
|
28
|
+
* 2. `optionalDependencies` — the source/CI state (kept for Dependabot).
|
|
29
|
+
* 3. `dependencies` — the legacy state, pre lazy-install migration.
|
|
30
|
+
* The first non-empty match wins.
|
|
8
31
|
*
|
|
9
32
|
* Throws for unknown names; the resolver is the only caller and a missing
|
|
10
33
|
* entry is a programming error, not a user-facing one.
|
|
11
34
|
*/
|
|
12
35
|
export declare function getDeclaredVersion(name: string): string;
|
|
36
|
+
/**
|
|
37
|
+
* Pure field-priority resolution, split out from getDeclaredVersion so it can
|
|
38
|
+
* be unit-tested against synthetic manifests without touching the filesystem.
|
|
39
|
+
*/
|
|
40
|
+
export declare function resolveDeclaredVersion(pkg: ShimPackageJson, name: string): string;
|
|
13
41
|
/** Test seam: drop the cached package.json read. */
|
|
14
42
|
export declare function _resetCacheForTests(): void;
|
|
15
43
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heavyDeps.d.ts","sourceRoot":"","sources":["../../src/runtime/heavyDeps.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,8MAYjB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"heavyDeps.d.ts","sourceRoot":"","sources":["../../src/runtime/heavyDeps.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,8MAYjB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAE5D,CAAC;AAEF;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAQ5D;AAED,MAAM,WAAW,eAAe;IAK9B,qBAAqB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/C,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC;AAaD;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,eAAe,EACpB,IAAI,EAAE,MAAM,GACX,MAAM,CAcR;AAED,oDAAoD;AACpD,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CA2BxE"}
|
|
@@ -15,6 +15,31 @@ export const HEAVY_NPM_DEPS = [
|
|
|
15
15
|
"pixelmatch",
|
|
16
16
|
"pngjs",
|
|
17
17
|
];
|
|
18
|
+
/**
|
|
19
|
+
* Optional peer dependencies that npm will NOT auto-install, but a heavy dep
|
|
20
|
+
* needs for full functionality. `@puppeteer/browsers@3` moved `proxy-agent`
|
|
21
|
+
* from a regular dependency (2.x) to an `optional` peer, so a bare
|
|
22
|
+
* `npm install @puppeteer/browsers` into <cacheDir>/runtime omits it and
|
|
23
|
+
* proxy-based browser downloads break. We install each companion alongside
|
|
24
|
+
* its owner so the cached install matches what 2.x shipped.
|
|
25
|
+
*/
|
|
26
|
+
export const RUNTIME_PEER_COMPANIONS = {
|
|
27
|
+
"@puppeteer/browsers": ["proxy-agent"],
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Expand a list of runtime package names to include any peer companions
|
|
31
|
+
* (see RUNTIME_PEER_COMPANIONS), preserving order and de-duplicating.
|
|
32
|
+
*/
|
|
33
|
+
export function withPeerCompanions(names) {
|
|
34
|
+
const out = [...names];
|
|
35
|
+
for (const name of names) {
|
|
36
|
+
for (const companion of RUNTIME_PEER_COMPANIONS[name] ?? []) {
|
|
37
|
+
if (!out.includes(companion))
|
|
38
|
+
out.push(companion);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return out;
|
|
42
|
+
}
|
|
18
43
|
let cachedPkg = null;
|
|
19
44
|
function readShimPackageJson() {
|
|
20
45
|
if (cachedPkg)
|
|
@@ -27,24 +52,36 @@ function readShimPackageJson() {
|
|
|
27
52
|
}
|
|
28
53
|
/**
|
|
29
54
|
* Returns the version constraint declared in the shim's own package.json
|
|
30
|
-
* for `name`.
|
|
31
|
-
*
|
|
32
|
-
*
|
|
55
|
+
* for `name`. The version source differs between the published package and
|
|
56
|
+
* a source/CI checkout, so we check in priority order:
|
|
57
|
+
* 1. `ddRuntimeDependencies` — the published state. prepack.js moves the
|
|
58
|
+
* heavy deps here so npm never auto-installs them.
|
|
59
|
+
* 2. `optionalDependencies` — the source/CI state (kept for Dependabot).
|
|
60
|
+
* 3. `dependencies` — the legacy state, pre lazy-install migration.
|
|
61
|
+
* The first non-empty match wins.
|
|
33
62
|
*
|
|
34
63
|
* Throws for unknown names; the resolver is the only caller and a missing
|
|
35
64
|
* entry is a programming error, not a user-facing one.
|
|
36
65
|
*/
|
|
37
66
|
export function getDeclaredVersion(name) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
67
|
+
return resolveDeclaredVersion(readShimPackageJson(), name);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Pure field-priority resolution, split out from getDeclaredVersion so it can
|
|
71
|
+
* be unit-tested against synthetic manifests without touching the filesystem.
|
|
72
|
+
*/
|
|
73
|
+
export function resolveDeclaredVersion(pkg, name) {
|
|
74
|
+
for (const field of [
|
|
75
|
+
pkg.ddRuntimeDependencies,
|
|
76
|
+
pkg.optionalDependencies,
|
|
77
|
+
pkg.dependencies,
|
|
78
|
+
]) {
|
|
79
|
+
const declared = field?.[name];
|
|
80
|
+
if (typeof declared === "string" && declared.length > 0) {
|
|
81
|
+
return declared;
|
|
82
|
+
}
|
|
46
83
|
}
|
|
47
|
-
throw new Error(`${name} is not declared in doc-detective's package.json (optionalDependencies or dependencies). Add it before invoking the runtime loader.`);
|
|
84
|
+
throw new Error(`${name} is not declared in doc-detective's package.json (ddRuntimeDependencies, optionalDependencies, or dependencies). Add it before invoking the runtime loader.`);
|
|
48
85
|
}
|
|
49
86
|
/** Test seam: drop the cached package.json read. */
|
|
50
87
|
export function _resetCacheForTests() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heavyDeps.js","sourceRoot":"","sources":["../../src/runtime/heavyDeps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE/D,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,aAAa;IACb,QAAQ;IACR,wBAAwB;IACxB,oBAAoB;IACpB,sBAAsB;IACtB,OAAO;IACP,0BAA0B;IAC1B,qBAAqB;IACrB,aAAa;IACb,YAAY;IACZ,OAAO;CACC,CAAC;
|
|
1
|
+
{"version":3,"file":"heavyDeps.js","sourceRoot":"","sources":["../../src/runtime/heavyDeps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE/D,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,aAAa;IACb,QAAQ;IACR,wBAAwB;IACxB,oBAAoB;IACpB,sBAAsB;IACtB,OAAO;IACP,0BAA0B;IAC1B,qBAAqB;IACrB,aAAa;IACb,YAAY;IACZ,OAAO;CACC,CAAC;AAIX;;;;;;;GA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AC;IAClB,uEAAuE;IACvE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAuCD;;;;;;;;GAQG;AACH,wBAAsB,sBAAsB,CAC1C,QAAQ,EAAE,MAAM,EAAE,EAClB,OAAO,GAAE,6BAAkC,GAC1C,OAAO,CAAC,IAAI,CAAC,CAwIf"}
|
package/dist/runtime/loader.js
CHANGED
|
@@ -3,7 +3,7 @@ import fs from "node:fs";
|
|
|
3
3
|
import { spawn as nodeSpawn } from "node:child_process";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
|
-
import { getDeclaredVersion, satisfiesRange } from "./heavyDeps.js";
|
|
6
|
+
import { getDeclaredVersion, satisfiesRange, withPeerCompanions } from "./heavyDeps.js";
|
|
7
7
|
import { assertSafeRuntimePath, getRuntimeDir, readInstalledRecord, writeInstalledRecord, } from "./cacheDir.js";
|
|
8
8
|
// The default logger gates `debug` output OFF so call sites that omit a
|
|
9
9
|
// logger (the JIT pre-flight, the CLI startup self-update check) don't
|
|
@@ -120,6 +120,11 @@ export async function ensureRuntimeInstalled(packages, options = {}) {
|
|
|
120
120
|
const spawner = deps.spawn ?? nodeSpawn;
|
|
121
121
|
if (packages.length === 0)
|
|
122
122
|
return;
|
|
123
|
+
// Pull in optional peer companions (e.g. proxy-agent for
|
|
124
|
+
// @puppeteer/browsers@3) that npm won't auto-install but the dep needs for
|
|
125
|
+
// full functionality. Done here so both the JIT path (loadHeavyDep) and the
|
|
126
|
+
// bulk path (installRuntime / `install all`) get them.
|
|
127
|
+
packages = withPeerCompanions(packages);
|
|
123
128
|
// Decide what actually needs `npm install`. The skip cases — when
|
|
124
129
|
// not forced — are:
|
|
125
130
|
// 1. The package resolves from the shim's node_modules (npm
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.js","sourceRoot":"","sources":["../../src/runtime/loader.ts"],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3E,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAC;IACxC,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACrC,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE,CAAC;QAC7B,MAAM,gBAAgB,GACpB,6BAA6B,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACvE,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,EAAE,gBAAgB,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC;IACpE,CAAC;IACD,oBAAoB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AACpC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "doc-detective",
|
|
3
|
-
"version": "4.6.0-next.
|
|
3
|
+
"version": "4.6.0-next.4",
|
|
4
4
|
"description": "Treat doc content as testable assertions to validate doc accuracy and product UX.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"doc-detective": "bin/doc-detective.js",
|
|
7
7
|
"doc-detective-runner": "bin/runner-entrypoint.js"
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
|
+
"engines": {
|
|
11
|
+
"node": ">=22.12.0"
|
|
12
|
+
},
|
|
10
13
|
"files": [
|
|
11
14
|
"dist/",
|
|
12
15
|
"bin/",
|
|
@@ -87,51 +90,6 @@
|
|
|
87
90
|
"yaml": "^2.8.3",
|
|
88
91
|
"yargs": "^18.0.0"
|
|
89
92
|
},
|
|
90
|
-
"optionalDependencies": {
|
|
91
|
-
"@ffmpeg-installer/ffmpeg": "^1.1.0",
|
|
92
|
-
"@puppeteer/browsers": "^2.13.0",
|
|
93
|
-
"appium": "^3.3.1",
|
|
94
|
-
"appium-chromium-driver": "^2.2.1",
|
|
95
|
-
"appium-geckodriver": "^2.2.1",
|
|
96
|
-
"appium-safari-driver": "^4.1.12",
|
|
97
|
-
"geckodriver": "^6.1.0",
|
|
98
|
-
"pixelmatch": "^7.1.0",
|
|
99
|
-
"pngjs": "^7.0.0",
|
|
100
|
-
"sharp": "^0.34.5",
|
|
101
|
-
"webdriverio": "^9.27.0",
|
|
102
|
-
"@ffmpeg-installer/darwin-arm64": "4.1.5",
|
|
103
|
-
"@ffmpeg-installer/darwin-x64": "4.1.0",
|
|
104
|
-
"@ffmpeg-installer/linux-arm": "4.1.3",
|
|
105
|
-
"@ffmpeg-installer/linux-arm64": "4.1.4",
|
|
106
|
-
"@ffmpeg-installer/linux-ia32": "4.1.0",
|
|
107
|
-
"@ffmpeg-installer/linux-x64": "4.1.0",
|
|
108
|
-
"@ffmpeg-installer/win32-ia32": "4.1.0",
|
|
109
|
-
"@ffmpeg-installer/win32-x64": "4.1.0",
|
|
110
|
-
"@img/sharp-darwin-arm64": "^0.34.5",
|
|
111
|
-
"@img/sharp-darwin-x64": "^0.34.5",
|
|
112
|
-
"@img/sharp-libvips-darwin-arm64": "^1.2.4",
|
|
113
|
-
"@img/sharp-libvips-darwin-x64": "^1.2.4",
|
|
114
|
-
"@img/sharp-libvips-linux-arm": "^1.2.4",
|
|
115
|
-
"@img/sharp-libvips-linux-arm64": "^1.2.4",
|
|
116
|
-
"@img/sharp-libvips-linux-ppc64": "^1.2.4",
|
|
117
|
-
"@img/sharp-libvips-linux-riscv64": "^1.2.4",
|
|
118
|
-
"@img/sharp-libvips-linux-s390x": "^1.2.4",
|
|
119
|
-
"@img/sharp-libvips-linux-x64": "^1.2.4",
|
|
120
|
-
"@img/sharp-libvips-linuxmusl-arm64": "^1.2.4",
|
|
121
|
-
"@img/sharp-libvips-linuxmusl-x64": "^1.2.4",
|
|
122
|
-
"@img/sharp-linux-arm": "^0.34.5",
|
|
123
|
-
"@img/sharp-linux-arm64": "^0.34.5",
|
|
124
|
-
"@img/sharp-linux-ppc64": "^0.34.5",
|
|
125
|
-
"@img/sharp-linux-riscv64": "^0.34.5",
|
|
126
|
-
"@img/sharp-linux-s390x": "^0.34.5",
|
|
127
|
-
"@img/sharp-linux-x64": "^0.34.5",
|
|
128
|
-
"@img/sharp-linuxmusl-arm64": "^0.34.5",
|
|
129
|
-
"@img/sharp-linuxmusl-x64": "^0.34.5",
|
|
130
|
-
"@img/sharp-wasm32": "^0.34.5",
|
|
131
|
-
"@img/sharp-win32-arm64": "^0.34.5",
|
|
132
|
-
"@img/sharp-win32-ia32": "^0.34.5",
|
|
133
|
-
"@img/sharp-win32-x64": "^0.34.5"
|
|
134
|
-
},
|
|
135
93
|
"devDependencies": {
|
|
136
94
|
"@commitlint/cli": "^20.5.2",
|
|
137
95
|
"@commitlint/config-conventional": "^20.5.0",
|
|
@@ -158,5 +116,19 @@
|
|
|
158
116
|
"semver": "^7.7.4",
|
|
159
117
|
"sinon": "^21.1.2",
|
|
160
118
|
"typescript": "^6.0.3"
|
|
119
|
+
},
|
|
120
|
+
"ddRuntimeDependencies": {
|
|
121
|
+
"@ffmpeg-installer/ffmpeg": "^1.1.0",
|
|
122
|
+
"@puppeteer/browsers": "^3.0.0",
|
|
123
|
+
"appium": "^3.3.1",
|
|
124
|
+
"appium-chromium-driver": "^2.2.1",
|
|
125
|
+
"appium-geckodriver": "^2.2.1",
|
|
126
|
+
"appium-safari-driver": "^4.1.12",
|
|
127
|
+
"geckodriver": "^6.1.0",
|
|
128
|
+
"pixelmatch": "^7.1.0",
|
|
129
|
+
"pngjs": "^7.0.0",
|
|
130
|
+
"proxy-agent": "^8.0.1",
|
|
131
|
+
"sharp": "^0.34.5",
|
|
132
|
+
"webdriverio": "^9.27.0"
|
|
161
133
|
}
|
|
162
134
|
}
|