@d-zero/print 2.3.5 → 2.4.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.
package/dist/cli.js
CHANGED
|
@@ -21,6 +21,8 @@ const { options, args, hasConfigFile } = createCLI({
|
|
|
21
21
|
'\t-d, --devices <devices> Device presets (comma-separated, default: desktop-compact,mobile)',
|
|
22
22
|
'\t-T, --timeout <ms> Request timeout in milliseconds (default: 30000)',
|
|
23
23
|
'\t--limit <number> Limit concurrent processes',
|
|
24
|
+
'\t--interval <ms> Interval between parallel executions (default: none)',
|
|
25
|
+
'\t Format: number or "min-max" for random range',
|
|
24
26
|
'\t--debug Enable debug mode',
|
|
25
27
|
'\t--verbose Enable verbose logging',
|
|
26
28
|
'',
|
|
@@ -56,6 +58,7 @@ if (hasConfigFile) {
|
|
|
56
58
|
hooks,
|
|
57
59
|
devices,
|
|
58
60
|
timeout: options.timeout,
|
|
61
|
+
interval: options.interval,
|
|
59
62
|
});
|
|
60
63
|
process.exit(0);
|
|
61
64
|
}
|
|
@@ -67,6 +70,7 @@ if (args.length > 0) {
|
|
|
67
70
|
debug: options.debug,
|
|
68
71
|
devices,
|
|
69
72
|
timeout: options.timeout,
|
|
73
|
+
interval: options.interval,
|
|
70
74
|
});
|
|
71
75
|
process.exit(0);
|
|
72
76
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { PrintType } from './types.js';
|
|
2
2
|
import type { PageHook, Sizes } from '@d-zero/puppeteer-page-scan';
|
|
3
|
+
import type { DelayOptions } from '@d-zero/shared/delay';
|
|
3
4
|
import type { LaunchOptions } from 'puppeteer';
|
|
4
5
|
export interface PrintOptions {
|
|
5
6
|
readonly type?: PrintType;
|
|
@@ -9,6 +10,7 @@ export interface PrintOptions {
|
|
|
9
10
|
readonly hooks?: readonly PageHook[];
|
|
10
11
|
readonly devices?: Sizes;
|
|
11
12
|
readonly timeout?: number;
|
|
13
|
+
readonly interval?: number | DelayOptions;
|
|
12
14
|
}
|
|
13
15
|
/**
|
|
14
16
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d-zero/print",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "Print web pages to PDF or image files.",
|
|
5
5
|
"author": "D-ZERO",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,18 +24,18 @@
|
|
|
24
24
|
"clean": "tsc --build --clean"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@d-zero/cli-core": "1.
|
|
27
|
+
"@d-zero/cli-core": "1.2.0",
|
|
28
28
|
"@d-zero/html-distiller": "2.0.1",
|
|
29
|
-
"@d-zero/puppeteer-dealer": "0.5.
|
|
30
|
-
"@d-zero/puppeteer-page-scan": "4.2.
|
|
31
|
-
"@d-zero/puppeteer-screenshot": "3.2.
|
|
29
|
+
"@d-zero/puppeteer-dealer": "0.5.10",
|
|
30
|
+
"@d-zero/puppeteer-page-scan": "4.2.6",
|
|
31
|
+
"@d-zero/puppeteer-screenshot": "3.2.6",
|
|
32
32
|
"@d-zero/readtext": "1.1.12",
|
|
33
|
-
"@d-zero/shared": "0.
|
|
33
|
+
"@d-zero/shared": "0.13.0",
|
|
34
34
|
"ansi-colors": "4.1.3",
|
|
35
35
|
"dayjs": "1.11.18",
|
|
36
36
|
"front-matter": "4.0.2",
|
|
37
37
|
"minimist": "1.2.8",
|
|
38
|
-
"puppeteer": "24.
|
|
38
|
+
"puppeteer": "24.27.0"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "85abd39686d2ce02c7b8db071437464d212dd982"
|
|
41
41
|
}
|