@d-zero/replicator 0.4.0 → 0.5.1
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/index.js +2 -2
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -35,7 +35,6 @@ export async function replicate(url, outputDir, options = {}) {
|
|
|
35
35
|
progress(`🌐 Launching browser...`);
|
|
36
36
|
const browser = await launch({
|
|
37
37
|
headless: true,
|
|
38
|
-
timeout,
|
|
39
38
|
});
|
|
40
39
|
try {
|
|
41
40
|
// Process each device size
|
|
@@ -105,7 +104,7 @@ export async function replicate(url, outputDir, options = {}) {
|
|
|
105
104
|
* @param options.progress
|
|
106
105
|
*/
|
|
107
106
|
async function processPageForSize(page, url, baseUrl, resources, options) {
|
|
108
|
-
const { sizeName, width, resolution, log, progress } = options;
|
|
107
|
+
const { sizeName, width, resolution, timeout, log, progress } = options;
|
|
109
108
|
const requestPromises = [];
|
|
110
109
|
// Set up resource detection
|
|
111
110
|
page.on('request', (request) => {
|
|
@@ -161,6 +160,7 @@ async function processPageForSize(page, url, baseUrl, resources, options) {
|
|
|
161
160
|
name: sizeName,
|
|
162
161
|
width,
|
|
163
162
|
resolution,
|
|
163
|
+
timeout,
|
|
164
164
|
listener: (phase, data) => {
|
|
165
165
|
switch (phase) {
|
|
166
166
|
case 'setViewport': {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d-zero/replicator",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Replicate web pages with all their resources to local directories",
|
|
5
5
|
"author": "D-ZERO",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,16 +24,16 @@
|
|
|
24
24
|
"clean": "tsc --build --clean"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@d-zero/cli-core": "1.1.
|
|
28
|
-
"@d-zero/puppeteer-page-scan": "4.1
|
|
29
|
-
"@d-zero/puppeteer-scroll": "3.0.
|
|
27
|
+
"@d-zero/cli-core": "1.1.2",
|
|
28
|
+
"@d-zero/puppeteer-page-scan": "4.2.1",
|
|
29
|
+
"@d-zero/puppeteer-scroll": "3.0.7",
|
|
30
30
|
"@d-zero/shared": "0.9.2",
|
|
31
31
|
"ansi-colors": "4.1.3",
|
|
32
32
|
"minimist": "1.2.8",
|
|
33
|
-
"puppeteer": "24.
|
|
33
|
+
"puppeteer": "24.23.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/minimist": "1.2.5"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "85b9a1f15d2db8798cf24a6a3f035cee1db6ba3d"
|
|
39
39
|
}
|