apify-cli 0.8.0-beta.0 → 0.8.0-beta.3
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 +10 -10
- package/package.json +1 -1
- package/src/commands/push.js +10 -5
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ However, we recommend using JavaScript / Node.js, for which we provide most libr
|
|
|
22
22
|
|
|
23
23
|
## Installation
|
|
24
24
|
|
|
25
|
-
First, make sure you have [Node.js](https://nodejs.org) version
|
|
25
|
+
First, make sure you have [Node.js](https://nodejs.org) version 16 or higher with NPM installed on your computer:
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
28
|
node --version
|
|
@@ -44,8 +44,8 @@ sudo npm -g install apify-cli
|
|
|
44
44
|
Alternativaly, you can use [Node Version Manager (nvm)](https://github.com/nvm-sh/nvm) and install Apify CLI only into a selected user-level Node version without requiring root privileges:
|
|
45
45
|
|
|
46
46
|
```
|
|
47
|
-
nvm install
|
|
48
|
-
nvm use
|
|
47
|
+
nvm install 16
|
|
48
|
+
nvm use 16
|
|
49
49
|
npm -g install apify-cli
|
|
50
50
|
```
|
|
51
51
|
|
|
@@ -57,7 +57,7 @@ apify --version
|
|
|
57
57
|
|
|
58
58
|
which should print something like:
|
|
59
59
|
```
|
|
60
|
-
apify-cli/0.
|
|
60
|
+
apify-cli/0.8.0 darwin-x64 node-v16.16.0
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
## Basic usage
|
|
@@ -359,7 +359,7 @@ OPTIONS
|
|
|
359
359
|
-w, --wait-for-finish=wait-for-finish Seconds for waiting to run to finish, if no value passed, it waits forever.
|
|
360
360
|
|
|
361
361
|
DESCRIPTION
|
|
362
|
-
The actor is run under your current Apify account, therefore you need to be logged in by calling "apify login". It
|
|
362
|
+
The actor is run under your current Apify account, therefore you need to be logged in by calling "apify login". It
|
|
363
363
|
takes input for the actor from the default local key-value store by default.
|
|
364
364
|
```
|
|
365
365
|
|
|
@@ -410,7 +410,7 @@ ARGUMENTS
|
|
|
410
410
|
ACTORNAME Name of the actor. If not provided, you will be prompted for it.
|
|
411
411
|
|
|
412
412
|
DESCRIPTION
|
|
413
|
-
The command only creates the "apify.json" file and the "storage" directory in the current directory, but will not
|
|
413
|
+
The command only creates the "apify.json" file and the "storage" directory in the current directory, but will not
|
|
414
414
|
touch anything else.
|
|
415
415
|
|
|
416
416
|
WARNING: The directory at "storage" will be overwritten if it already exists.
|
|
@@ -430,7 +430,7 @@ OPTIONS
|
|
|
430
430
|
-t, --token=token [Optional] Apify API token
|
|
431
431
|
|
|
432
432
|
DESCRIPTION
|
|
433
|
-
The API token and other account information is stored in the ~/.apify directory, from where it is read by all other
|
|
433
|
+
The API token and other account information is stored in the ~/.apify directory, from where it is read by all other
|
|
434
434
|
"apify" commands. To log out, call "apify logout".
|
|
435
435
|
```
|
|
436
436
|
|
|
@@ -476,9 +476,9 @@ OPTIONS
|
|
|
476
476
|
should be pushed. By default, it is taken from the "apify.json" file.
|
|
477
477
|
|
|
478
478
|
DESCRIPTION
|
|
479
|
-
The actor settings are read from the "apify.json" file in the current directory, but they can be overridden using
|
|
479
|
+
The actor settings are read from the "apify.json" file in the current directory, but they can be overridden using
|
|
480
480
|
command-line options.
|
|
481
|
-
NOTE: If the source files are smaller than 3 MB then they are uploaded as
|
|
481
|
+
NOTE: If the source files are smaller than 3 MB then they are uploaded as
|
|
482
482
|
"Multiple source files", otherwise they are uploaded as "Zip file".
|
|
483
483
|
|
|
484
484
|
WARNING: If the target actor already exists in your Apify account, it will be overwritten!
|
|
@@ -510,7 +510,7 @@ DESCRIPTION
|
|
|
510
510
|
example, this causes the actor input, as well as all other data in key-value stores, datasets or request queues to be
|
|
511
511
|
stored in the "storage" directory, rather than on the Apify platform.
|
|
512
512
|
|
|
513
|
-
NOTE: You can override the default behaviour of command overriding npm start script value in a package.json file. You
|
|
513
|
+
NOTE: You can override the default behaviour of command overriding npm start script value in a package.json file. You
|
|
514
514
|
can set up your own main file or environment variables by changing it.
|
|
515
515
|
```
|
|
516
516
|
|
package/package.json
CHANGED
package/src/commands/push.js
CHANGED
|
@@ -13,6 +13,11 @@ const { transformEnvToEnvVars } = require('../lib/secrets');
|
|
|
13
13
|
const outputs = require('../lib/outputs');
|
|
14
14
|
|
|
15
15
|
const TEMP_ZIP_FILE_NAME = 'temp_file.zip';
|
|
16
|
+
const DEFAULT_RUN_OPTIONS = {
|
|
17
|
+
build: 'latest',
|
|
18
|
+
memoryMbytes: 4096,
|
|
19
|
+
timeoutSecs: 3600,
|
|
20
|
+
};
|
|
16
21
|
|
|
17
22
|
class PushCommand extends ApifyCommand {
|
|
18
23
|
async run() {
|
|
@@ -43,16 +48,16 @@ class PushCommand extends ApifyCommand {
|
|
|
43
48
|
actorId = actor.id;
|
|
44
49
|
} else {
|
|
45
50
|
const { templates } = await actorTemplates.fetchManifest();
|
|
46
|
-
|
|
47
|
-
|
|
51
|
+
const actorTemplate = templates.find((t) => t.name === localConfig.template);
|
|
52
|
+
const defaultRunOptions = actorTemplate.defaultRunOptions || DEFAULT_RUN_OPTIONS;
|
|
48
53
|
const newActor = {
|
|
49
54
|
name: localConfig.name,
|
|
50
|
-
defaultRunOptions
|
|
55
|
+
defaultRunOptions,
|
|
51
56
|
versions: [{
|
|
52
57
|
versionNumber: version,
|
|
53
58
|
buildTag,
|
|
54
|
-
sourceType: ACT_SOURCE_TYPES.
|
|
55
|
-
|
|
59
|
+
sourceType: ACT_SOURCE_TYPES.SOURCE_FILES,
|
|
60
|
+
sourceFiles: [],
|
|
56
61
|
}],
|
|
57
62
|
};
|
|
58
63
|
actor = await apifyClient.actors().create(newActor);
|