@crawlee/cli 4.0.0-beta.98 → 4.0.0-rc.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.
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { execSync } from 'node:child_process';
|
|
2
2
|
import { mkdirSync } from 'node:fs';
|
|
3
|
-
import { readFile, writeFile } from 'node:fs/promises';
|
|
3
|
+
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
4
4
|
import { get } from 'node:https';
|
|
5
5
|
import { dirname, join, resolve } from 'node:path';
|
|
6
6
|
import { setTimeout } from 'node:timers/promises';
|
|
7
7
|
import { fetchManifest } from '@crawlee/templates';
|
|
8
8
|
import { input, select } from '@inquirer/prompts';
|
|
9
9
|
import colors from 'ansi-colors';
|
|
10
|
-
import { ensureDir } from 'fs-extra/esm';
|
|
11
10
|
function validateProjectName(name) {
|
|
12
11
|
if (name.length === 0) {
|
|
13
12
|
throw new Error('The project name cannot be empty string.');
|
|
@@ -49,7 +48,7 @@ async function downloadTemplateFilesToDisk(template, destinationDirectory) {
|
|
|
49
48
|
// Make sure the folder for the file exists
|
|
50
49
|
const fileDirName = dirname(file.path);
|
|
51
50
|
const fileFolder = resolve(destinationDirectory, fileDirName);
|
|
52
|
-
await
|
|
51
|
+
await mkdir(fileFolder, { recursive: true });
|
|
53
52
|
// Write the actual file
|
|
54
53
|
await writeFile(resolve(destinationDirectory, file.path), buffer);
|
|
55
54
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crawlee/cli",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-rc.0",
|
|
4
4
|
"description": "The scalable web crawling and scraping library for JavaScript/Node.js. Enables development of data extraction and web automation jobs (not only) with headless Chrome and Puppeteer.",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22.0.0"
|
|
@@ -45,10 +45,9 @@
|
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@crawlee/templates": "4.0.0-
|
|
48
|
+
"@crawlee/templates": "4.0.0-rc.0",
|
|
49
49
|
"@inquirer/prompts": "^7.5.0",
|
|
50
50
|
"ansi-colors": "^4.1.3",
|
|
51
|
-
"fs-extra": "^11.3.0",
|
|
52
51
|
"tslib": "^2.8.1",
|
|
53
52
|
"yargs": "^18.0.0"
|
|
54
53
|
},
|
|
@@ -59,5 +58,5 @@
|
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
60
|
},
|
|
62
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "79ab33dacdacb83e0197e6516d145f3aceef80c7"
|
|
63
62
|
}
|