@d-zero/puppeteer-dealer 0.5.9 → 0.5.10
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/deal.js +5 -6
- package/package.json +7 -7
package/dist/deal.js
CHANGED
|
@@ -12,17 +12,16 @@ export function deal(list, header, createProcess, options) {
|
|
|
12
12
|
const urlObj = new URL(url);
|
|
13
13
|
return !!(urlObj.username && urlObj.password);
|
|
14
14
|
});
|
|
15
|
-
return coreDeal(list, ({ id, url }, update, index) => {
|
|
15
|
+
return coreDeal(list, ({ id, url }, update, index, setLineHeader) => {
|
|
16
16
|
const fileId = id || index.toString().padStart(3, '0');
|
|
17
17
|
const lineHeader = `%braille% ${c.bgWhite(` ${fileId} `)} ${c.gray(url.toString())}: `;
|
|
18
|
+
setLineHeader(lineHeader);
|
|
18
19
|
return async () => {
|
|
19
|
-
update(
|
|
20
|
+
update(`Using ${needAuth ? 'auth' : 'no auth'}`);
|
|
20
21
|
const processManager = createProcess()(needAuth);
|
|
21
|
-
update(
|
|
22
|
+
update(`Booting ChildProcess%dots%`);
|
|
22
23
|
await processManager.ready();
|
|
23
|
-
processManager.log((log) =>
|
|
24
|
-
update(`${lineHeader}${log}`);
|
|
25
|
-
});
|
|
24
|
+
processManager.log((log) => update(log));
|
|
26
25
|
const result = await processManager.each(fileId, url.toString(), index);
|
|
27
26
|
if (options?.each) {
|
|
28
27
|
await options.each(result);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d-zero/puppeteer-dealer",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.10",
|
|
4
4
|
"description": "Puppeteer handles each page",
|
|
5
5
|
"author": "D-ZERO",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,17 +23,17 @@
|
|
|
23
23
|
"clean": "tsc --build --clean"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@d-zero/dealer": "1.
|
|
27
|
-
"@d-zero/proc-talk": "0.4.
|
|
28
|
-
"@d-zero/shared": "0.
|
|
26
|
+
"@d-zero/dealer": "1.4.0",
|
|
27
|
+
"@d-zero/proc-talk": "0.4.8",
|
|
28
|
+
"@d-zero/shared": "0.13.0",
|
|
29
29
|
"ansi-colors": "4.1.3",
|
|
30
30
|
"debug": "4.4.3"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"puppeteer": "24.
|
|
33
|
+
"puppeteer": "24.27.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"puppeteer": "24.
|
|
36
|
+
"puppeteer": "24.27.0"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "85abd39686d2ce02c7b8db071437464d212dd982"
|
|
39
39
|
}
|